Skip to content

Commit

Permalink
chore(deps): Bump the sap-cloud-sdk group across 1 directory with 7 u…
Browse files Browse the repository at this point in the history
…pdates (#206)

* chore(deps): Bump the sap-cloud-sdk group across 1 directory with 7 updates

Bumps the sap-cloud-sdk group with 7 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@sap-cloud-sdk/connectivity](https://github.com/SAP/cloud-sdk-js) | `3.21.0` | `3.22.1` |
| [@sap-cloud-sdk/eslint-config](https://github.com/SAP/cloud-sdk-js) | `3.21.0` | `3.22.1` |
| [@sap-cloud-sdk/generator-common](https://github.com/SAP/cloud-sdk-js) | `3.21.0` | `3.22.1` |
| [@sap-cloud-sdk/http-client](https://github.com/SAP/cloud-sdk-js) | `3.21.0` | `3.22.1` |
| [@sap-cloud-sdk/openapi-generator](https://github.com/SAP/cloud-sdk-js) | `3.21.0` | `3.22.1` |
| [@sap-cloud-sdk/util](https://github.com/SAP/cloud-sdk-js) | `3.21.0` | `3.22.1` |
| [@sap-cloud-sdk/openapi](https://github.com/SAP/cloud-sdk-js) | `3.21.0` | `3.22.1` |



Updates `@sap-cloud-sdk/connectivity` from 3.21.0 to 3.22.1
- [Release notes](https://github.com/SAP/cloud-sdk-js/releases)
- [Changelog](https://github.com/SAP/cloud-sdk-js/blob/main/CHANGELOG.md)
- [Commits](SAP/cloud-sdk-js@v3.21.0...v3.22.1)

Updates `@sap-cloud-sdk/eslint-config` from 3.21.0 to 3.22.1
- [Release notes](https://github.com/SAP/cloud-sdk-js/releases)
- [Changelog](https://github.com/SAP/cloud-sdk-js/blob/main/CHANGELOG.md)
- [Commits](SAP/cloud-sdk-js@v3.21.0...v3.22.1)

Updates `@sap-cloud-sdk/generator-common` from 3.21.0 to 3.22.1
- [Release notes](https://github.com/SAP/cloud-sdk-js/releases)
- [Changelog](https://github.com/SAP/cloud-sdk-js/blob/main/CHANGELOG.md)
- [Commits](SAP/cloud-sdk-js@v3.21.0...v3.22.1)

Updates `@sap-cloud-sdk/http-client` from 3.21.0 to 3.22.1
- [Release notes](https://github.com/SAP/cloud-sdk-js/releases)
- [Changelog](https://github.com/SAP/cloud-sdk-js/blob/main/CHANGELOG.md)
- [Commits](SAP/cloud-sdk-js@v3.21.0...v3.22.1)

Updates `@sap-cloud-sdk/openapi-generator` from 3.21.0 to 3.22.1
- [Release notes](https://github.com/SAP/cloud-sdk-js/releases)
- [Changelog](https://github.com/SAP/cloud-sdk-js/blob/main/CHANGELOG.md)
- [Commits](SAP/cloud-sdk-js@v3.21.0...v3.22.1)

Updates `@sap-cloud-sdk/util` from 3.21.0 to 3.22.1
- [Release notes](https://github.com/SAP/cloud-sdk-js/releases)
- [Changelog](https://github.com/SAP/cloud-sdk-js/blob/main/CHANGELOG.md)
- [Commits](SAP/cloud-sdk-js@v3.21.0...v3.22.1)

Updates `@sap-cloud-sdk/openapi` from 3.21.0 to 3.22.1
- [Release notes](https://github.com/SAP/cloud-sdk-js/releases)
- [Changelog](https://github.com/SAP/cloud-sdk-js/blob/main/CHANGELOG.md)
- [Commits](SAP/cloud-sdk-js@v3.21.0...v3.22.1)

---
updated-dependencies:
- dependency-name: "@sap-cloud-sdk/connectivity"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: sap-cloud-sdk
- dependency-name: "@sap-cloud-sdk/eslint-config"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: sap-cloud-sdk
- dependency-name: "@sap-cloud-sdk/generator-common"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: sap-cloud-sdk
- dependency-name: "@sap-cloud-sdk/http-client"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: sap-cloud-sdk
- dependency-name: "@sap-cloud-sdk/openapi-generator"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: sap-cloud-sdk
- dependency-name: "@sap-cloud-sdk/util"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: sap-cloud-sdk
- dependency-name: "@sap-cloud-sdk/openapi"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: sap-cloud-sdk
...

Signed-off-by: dependabot[bot] <[email protected]>

* lint

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marika Marszalkowski <[email protected]>
  • Loading branch information
dependabot[bot] and marikaner authored Oct 8, 2024
1 parent 8f4b834 commit a49118e
Show file tree
Hide file tree
Showing 49 changed files with 624 additions and 386 deletions.
47 changes: 28 additions & 19 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
import flatConfig from '@sap-cloud-sdk/eslint-config/flat-config.js';

export default [
...flatConfig,
{
// Eslint flat config is not supported by eslint-plugin-import.
// https://github.com/import-js/eslint-plugin-import/issues/2556
files: ['**/*.ts'],
rules: {
'import/namespace': 'off',
'import/no-internal-modules': 'off'
// TODO: add this once there is a new release of eslint-plugin-import
// 'import/no-internal-modules': [
// 'error',
// { allow: ['@sap-cloud-sdk/*/internal.js'] }
// ]
'import/no-internal-modules': [
'error',
{
allow: [
'@sap-cloud-sdk/*/internal.js',
'@sap-ai-sdk/*/internal.js',
'@langchain/core/**',
'langchain/**',
'*/index.js',
'*/client/**/index.js'
]
}
],
'import/no-useless-path-segments': [
'error',
{
noUselessIndex: false
}
]
}
},
{
Expand All @@ -25,19 +36,17 @@ export default [
},
{
files: [
'**/test-util/**/*.ts'
'**/test/**/*',
'**/test-util/**/*',
'**/*.test.ts',
'**/*.spec.ts',
'**/dist-cjs/**/*'
],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'import/no-internal-modules': 'off',
'no-unused-expressions': 'off',
'jsdoc/require-jsdoc': 'off'
}
},
{
files: ['packages/langchain/**/*.ts'],
rules: {
'import/no-internal-modules': 'off'
}
},
{
ignores: ['**/dist-cjs/**/*']
}
];
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
"@sap-ai-sdk/core": "workspace:^",
"@sap-ai-sdk/foundation-models": "workspace:^",
"@sap-ai-sdk/orchestration": "workspace:^",
"@sap-cloud-sdk/connectivity": "^3.21.0",
"@sap-cloud-sdk/eslint-config": "^3.21.0",
"@sap-cloud-sdk/generator-common": "^3.21.0",
"@sap-cloud-sdk/http-client": "^3.21.0",
"@sap-cloud-sdk/openapi-generator": "^3.21.0",
"@sap-cloud-sdk/util": "^3.21.0",
"@sap-cloud-sdk/connectivity": "^3.22.1",
"@sap-cloud-sdk/eslint-config": "^3.22.1",
"@sap-cloud-sdk/generator-common": "^3.22.1",
"@sap-cloud-sdk/http-client": "^3.22.1",
"@sap-cloud-sdk/openapi-generator": "^3.22.1",
"@sap-cloud-sdk/util": "^3.22.1",
"@types/jest": "^29.5.13",
"@types/jsonwebtoken": "^9.0.7",
"@types/mock-fs": "^4.13.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
},
"dependencies": {
"@sap-ai-sdk/core": "workspace:^",
"@sap-cloud-sdk/connectivity": "^3.21.0"
"@sap-cloud-sdk/connectivity": "^3.22.1"
}
}
12 changes: 6 additions & 6 deletions packages/ai-api/src/tests/artifact-api.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import nock from 'nock';
import {
AiArtifactCreationResponse,
AiArtifactList,
AiArtifactPostData,
ArtifactApi
} from '../client/AI_CORE_API/index.js';
import { ArtifactApi } from '../client/AI_CORE_API';
import {
aiCoreDestination,
mockClientCredentialsGrantCall
} from '../../../../test-util/mock-http.js';
import type {
AiArtifactCreationResponse,
AiArtifactList,
AiArtifactPostData
} from '../client/AI_CORE_API';

describe('artifact', () => {
beforeEach(() => {
Expand Down
12 changes: 6 additions & 6 deletions packages/ai-api/src/tests/configuration-api.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import nock from 'nock';
import {
AiConfigurationBaseData,
AiConfigurationCreationResponse,
AiConfigurationList,
ConfigurationApi
} from '../client/AI_CORE_API/index.js';
import { ConfigurationApi } from '../client/AI_CORE_API';
import {
aiCoreDestination,
mockClientCredentialsGrantCall
} from '../../../../test-util/mock-http.js';
import type {
AiConfigurationBaseData,
AiConfigurationCreationResponse,
AiConfigurationList
} from '../client/AI_CORE_API';

describe('configuration', () => {
beforeEach(() => {
Expand Down
14 changes: 7 additions & 7 deletions packages/ai-api/src/tests/deployment-api.test.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import nock from 'nock';
import { DeploymentApi } from '../client/AI_CORE_API';
import {
aiCoreDestination,
mockClientCredentialsGrantCall
} from '../../../../test-util/mock-http.js';
import type {
AiDeploymentCreationRequest,
AiDeploymentCreationResponse,
AiDeploymentDeletionResponse,
AiDeploymentList,
AiDeploymentModificationRequest,
AiDeploymentModificationResponse,
AiDeploymentTargetStatus,
DeploymentApi
} from '../client/AI_CORE_API/index.js';
import {
aiCoreDestination,
mockClientCredentialsGrantCall
} from '../../../../test-util/mock-http.js';
AiDeploymentTargetStatus
} from '../client/AI_CORE_API';

describe('deployment', () => {
beforeEach(() => {
Expand Down
12 changes: 6 additions & 6 deletions packages/ai-api/src/tests/execution-api.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import nock from 'nock';
import {
AiEnactmentCreationRequest,
AiExecutionCreationResponse,
AiExecutionList,
ExecutionApi
} from '../client/AI_CORE_API/index.js';
import { ExecutionApi } from '../client/AI_CORE_API';
import {
aiCoreDestination,
mockClientCredentialsGrantCall
} from '../../../../test-util/mock-http.js';
import type {
AiEnactmentCreationRequest,
AiExecutionCreationResponse,
AiExecutionList
} from '../client/AI_CORE_API';

describe('execution', () => {
beforeEach(() => {
Expand Down
3 changes: 2 additions & 1 deletion packages/ai-api/src/tests/scenario-api.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import nock from 'nock';
import { ScenarioApi, AiScenarioList } from '../client/AI_CORE_API/index.js';
import { ScenarioApi } from '../client/AI_CORE_API';
import {
aiCoreDestination,
mockClientCredentialsGrantCall
} from '../../../../test-util/mock-http.js';
import type { AiScenarioList } from '../client/AI_CORE_API';

describe('scenario', () => {
beforeEach(() => {
Expand Down
4 changes: 2 additions & 2 deletions packages/ai-api/src/utils/deployment-cache.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type AiDeployment } from '../client/AI_CORE_API/index.js';
import { type AiDeployment } from '../client/AI_CORE_API';
import { deploymentCache } from './deployment-cache.js';
import { FoundationModel } from './model.js';
import type { FoundationModel } from './model.js';

describe('deployment cache', () => {
afterEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-api/src/utils/deployment-resolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
aiCoreDestination,
mockDeploymentsList
} from '../../../../test-util/mock-http.js';
import { type AiDeployment } from '../client/AI_CORE_API/index.js';
import { type AiDeployment } from '../client/AI_CORE_API';
import { resolveDeploymentId } from './deployment-resolver.js';
import { deploymentCache } from './deployment-cache.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/ai-api/src/utils/model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AiDeployment } from '../client/AI_CORE_API/index.js';
import type { AiDeployment } from '../client/AI_CORE_API/index.js';

/**
* A foundation model is identified by its name and optionally a version.
Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"check:public-api": "node --loader ts-node/esm ../../scripts/check-public-api-cli.ts"
},
"dependencies": {
"@sap-cloud-sdk/connectivity": "^3.21.0",
"@sap-cloud-sdk/http-client": "^3.21.0",
"@sap-cloud-sdk/openapi": "^3.21.0",
"@sap-cloud-sdk/util": "^3.21.0"
"@sap-cloud-sdk/connectivity": "^3.22.1",
"@sap-cloud-sdk/http-client": "^3.22.1",
"@sap-cloud-sdk/openapi": "^3.22.1",
"@sap-cloud-sdk/util": "^3.22.1"
}
}
8 changes: 5 additions & 3 deletions packages/core/src/context.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { createLogger } from '@sap-cloud-sdk/util';
import {
HttpDestination,
Service,
ServiceCredentials,
getServiceBinding,
transformServiceBindingToDestination
} from '@sap-cloud-sdk/connectivity';
import type {
HttpDestination,
Service,
ServiceCredentials
} from '@sap-cloud-sdk/connectivity';

const logger = createLogger({
package: 'core',
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/http-client.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { mergeIgnoreCase, removeLeadingSlashes } from '@sap-cloud-sdk/util';
import {
executeHttpRequest,
import { executeHttpRequest } from '@sap-cloud-sdk/http-client';
import { getAiCoreDestination } from './context.js';
import type {
HttpRequestConfig,
HttpResponse
} from '@sap-cloud-sdk/http-client';
import { getAiCoreDestination } from './context.js';

/**
* The type for parameters in custom request configuration.
Expand Down
8 changes: 3 additions & 5 deletions packages/core/src/openapi-request-builder.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import {
OpenApiRequestBuilder as CloudSDKOpenApiRequestBuilder,
OpenApiRequestParameters
} from '@sap-cloud-sdk/openapi';
import { HttpResponse, Method } from '@sap-cloud-sdk/http-client';
import { OpenApiRequestBuilder as CloudSDKOpenApiRequestBuilder } from '@sap-cloud-sdk/openapi';
import { executeRequest } from './http-client.js';
import type { OpenApiRequestParameters } from '@sap-cloud-sdk/openapi';
import type { HttpResponse, Method } from '@sap-cloud-sdk/http-client';

/**
* Request builder for OpenAPI requests.
Expand Down
4 changes: 2 additions & 2 deletions packages/foundation-models/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"dependencies": {
"@sap-ai-sdk/ai-api": "workspace:^",
"@sap-ai-sdk/core": "workspace:^",
"@sap-cloud-sdk/http-client": "^3.21.0",
"@sap-cloud-sdk/util": "^3.21.0"
"@sap-cloud-sdk/http-client": "^3.22.1",
"@sap-cloud-sdk/util": "^3.22.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
parseMockResponse
} from '../../../../test-util/mock-http.js';
import { AzureOpenAiChatClient } from './azure-openai-chat-client.js';
import type { AzureOpenAiCreateChatCompletionResponse } from './client/inference/schema/index.js';
import { apiVersion } from './model-types.js';
import type { AzureOpenAiCreateChatCompletionResponse } from './client/inference/schema';

describe('Azure OpenAI chat client', () => {
const chatCompletionEndpoint = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
getResourceGroup,
type ModelDeployment
} from '@sap-ai-sdk/ai-api/internal.js';
import type { AzureOpenAiCreateChatCompletionRequest } from './client/inference/schema/index.js';
import { apiVersion, type AzureOpenAiChatModel } from './model-types.js';
import { AzureOpenAiChatCompletionResponse } from './azure-openai-chat-completion-response.js';
import type { AzureOpenAiCreateChatCompletionRequest } from './client/inference/schema/index.js';

/**
* Azure OpenAI client for chat completion.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createLogger } from '@sap-cloud-sdk/util';
import { jest } from '@jest/globals';
import { parseMockResponse } from '../../../../test-util/mock-http.js';
import { AzureOpenAiChatCompletionResponse } from './azure-openai-chat-completion-response.js';
import { AzureOpenAiCreateChatCompletionResponse } from './client/inference/schema/index.js';
import type { AzureOpenAiCreateChatCompletionResponse } from './client/inference/schema';
describe('OpenAI chat completion response', () => {
const mockResponse =
parseMockResponse<AzureOpenAiCreateChatCompletionResponse>(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpResponse } from '@sap-cloud-sdk/http-client';
import { createLogger } from '@sap-cloud-sdk/util';
import type { HttpResponse } from '@sap-cloud-sdk/http-client';
import type { AzureOpenAiCreateChatCompletionResponse } from './client/inference/schema/index.js';

const logger = createLogger({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {
mockInference,
parseMockResponse
} from '../../../../test-util/mock-http.js';
import {
import { AzureOpenAiEmbeddingClient } from './azure-openai-embedding-client.js';
import { apiVersion } from './model-types.js';
import type {
AzureOpenAiEmbeddingOutput,
AzureOpenAiEmbeddingParameters
} from './azure-openai-embedding-types.js';
import { AzureOpenAiEmbeddingClient } from './azure-openai-embedding-client.js';
import { apiVersion } from './model-types.js';

describe('Azure OpenAI embedding client', () => {
const embeddingsEndpoint = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
type ModelDeployment
} from '@sap-ai-sdk/ai-api/internal.js';
import { AzureOpenAiEmbeddingResponse } from './azure-openai-embedding-response.js';
import type { AzureOpenAiEmbeddingParameters } from './azure-openai-embedding-types.js';
import { apiVersion, type AzureOpenAiEmbeddingModel } from './model-types.js';
import type { AzureOpenAiEmbeddingParameters } from './azure-openai-embedding-types.js';

/**
* Azure OpenAI client for embeddings.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HttpResponse } from '@sap-cloud-sdk/http-client';
import { createLogger } from '@sap-cloud-sdk/util';
import { AzureOpenAiEmbeddingOutput } from './azure-openai-embedding-types.js';
import type { HttpResponse } from '@sap-cloud-sdk/http-client';
import type { AzureOpenAiEmbeddingOutput } from './azure-openai-embedding-types.js';

const logger = createLogger({
package: 'foundation-models',
Expand Down
6 changes: 3 additions & 3 deletions packages/langchain/src/openai/chat.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
import { BaseMessage } from '@langchain/core/messages';
import type { ChatResult } from '@langchain/core/outputs';
import { AzureOpenAiChatClient as AzureOpenAiChatClientBase } from '@sap-ai-sdk/foundation-models';
import { BaseChatModel } from '@langchain/core/language_models/chat_models';
import { mapLangchainToAiClient, mapOutputToChatResult } from './util.js';
import type { BaseMessage } from '@langchain/core/messages';
import type { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
import type { ChatResult } from '@langchain/core/outputs';
import type {
AzureOpenAiChatCallOptions,
AzureOpenAiChatModelParams
Expand Down
8 changes: 4 additions & 4 deletions packages/langchain/src/openai/embedding.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {
AzureOpenAiEmbeddingClient as AzureOpenAiEmbeddingClientBase,
import { AzureOpenAiEmbeddingClient as AzureOpenAiEmbeddingClientBase } from '@sap-ai-sdk/foundation-models';
import { Embeddings } from '@langchain/core/embeddings';
import type {
AzureOpenAiEmbeddingModel,
AzureOpenAiEmbeddingParameters
} from '@sap-ai-sdk/foundation-models';
import { Embeddings } from '@langchain/core/embeddings';
import { AzureOpenAiEmbeddingModelParams } from './types.js';
import type { AzureOpenAiEmbeddingModelParams } from './types.js';

/**
* LangChain embedding client for Azure OpenAI consumption on SAP BTP.
Expand Down
2 changes: 1 addition & 1 deletion packages/langchain/src/openai/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { BaseLLMParams } from '@langchain/core/language_models/llms';
import type {
BaseChatModelCallOptions,
BaseChatModelParams
} from '@langchain/core/language_models/chat_models';
import { BaseLLMParams } from '@langchain/core/language_models/llms';
import type {
AzureOpenAiCreateChatCompletionRequest,
AzureOpenAiChatModel,
Expand Down
Loading

0 comments on commit a49118e

Please sign in to comment.