diff --git a/generators/src/main/java/com/algolia/codegen/cts/tests/TestsClient.java b/generators/src/main/java/com/algolia/codegen/cts/tests/TestsClient.java index c18dd14cefc..840732a1093 100644 --- a/generators/src/main/java/com/algolia/codegen/cts/tests/TestsClient.java +++ b/generators/src/main/java/com/algolia/codegen/cts/tests/TestsClient.java @@ -95,6 +95,13 @@ public void run(Map models, Map stepOut.put("customHosts", step.parameters.get("customHosts")); } + boolean hasTransformationRegion = step.parameters != null && step.parameters.containsKey("transformationRegion"); + if (hasTransformationRegion) testOut.put("useEchoRequester", false); + stepOut.put("hasTransformationRegion", hasTransformationRegion); + if (hasTransformationRegion) { + stepOut.put("transformationRegion", step.parameters.get("transformationRegion")); + } + boolean gzipEncoding = step.parameters != null && step.parameters.getOrDefault("gzip", false).equals(true); // many languages don't support gzip yet if ( diff --git a/scripts/cts/runCts.ts b/scripts/cts/runCts.ts index 0ebfa12882c..463c81b79bb 100644 --- a/scripts/cts/runCts.ts +++ b/scripts/cts/runCts.ts @@ -9,6 +9,7 @@ import { assertValidAccountCopyIndex } from './testServer/accountCopyIndex.ts'; import { printBenchmarkReport } from './testServer/benchmark.ts'; import { assertChunkWrapperValid } from './testServer/chunkWrapper.ts'; import { startTestServer } from './testServer/index.ts'; +import { assertPushMockValid } from './testServer/pushMock.ts'; import { assertValidReplaceAllObjects } from './testServer/replaceAllObjects.ts'; import { assertValidReplaceAllObjectsFailed } from './testServer/replaceAllObjectsFailed.ts'; import { assertValidReplaceAllObjectsScopes } from './testServer/replaceAllObjectsScopes.ts'; @@ -157,6 +158,7 @@ export async function runCts( assertValidReplaceAllObjectsFailed(languages.length - skip('dart')); assertValidReplaceAllObjectsScopes(languages.length - skip('dart')); assertValidWaitForApiKey(languages.length - skip('dart')); + assertPushMockValid(only('javascript') + only('go') + only('python')); } if (withBenchmarkServer) { printBenchmarkReport(); diff --git a/scripts/cts/testServer/index.ts b/scripts/cts/testServer/index.ts index 4549ed225f2..7bfe72eecba 100644 --- a/scripts/cts/testServer/index.ts +++ b/scripts/cts/testServer/index.ts @@ -13,6 +13,7 @@ import { apiKeyServer } from './apiKey.ts'; import { benchmarkServer } from './benchmark.ts'; import { chunkWrapperServer } from './chunkWrapper.ts'; import { gzipServer } from './gzip.ts'; +import { pushMockServer } from './pushMock.ts'; import { replaceAllObjectsServer } from './replaceAllObjects.ts'; import { replaceAllObjectsServerFailed } from './replaceAllObjectsFailed.ts'; import { replaceAllObjectsScopesServer } from './replaceAllObjectsScopes.ts'; @@ -35,6 +36,7 @@ export async function startTestServer(suites: Record): Promise waitForApiKeyServer(), apiKeyServer(), algoliaMockServer(), + pushMockServer(), ); } if (suites.benchmark) { diff --git a/scripts/cts/testServer/pushMock.ts b/scripts/cts/testServer/pushMock.ts new file mode 100644 index 00000000000..560cb61d933 --- /dev/null +++ b/scripts/cts/testServer/pushMock.ts @@ -0,0 +1,89 @@ +import type { Server } from 'http'; + +import { expect } from 'chai'; +import type { Express } from 'express'; +import express from 'express'; + +import { setupServer } from './index.ts'; + +const pushMockState: Record = {}; + +export function assertPushMockValid(expectedCount: number): void { + if (Object.values(pushMockState).length !== expectedCount) { + throw new Error('unexpected number of call to pushMock'); + } + for (const [lang, state] of Object.entries(pushMockState)) { + let numberOfTestSuites = 1; + + if (lang === 'python') { + numberOfTestSuites = 2; + } + + expect(state).to.deep.equal({ + saveObjectsWithTransformation: Number(numberOfTestSuites), + partialUpdateObjectsWithTransformation: Number(numberOfTestSuites), + }); + } +} + +function addRoutes(app: Express): void { + app.use(express.urlencoded({ extended: true })); + app.use( + express.json({ + type: ['application/json', 'text/plain'], // the js client sends the body as text/plain + }), + ); + + app.post('/1/push/:indexName', (req, res) => { + const match = req.params.indexName.match(/^cts_e2e_(\w+)_(.*)$/); + const helper = match?.[1] as string; + const lang = match?.[2] as string; + + if (!pushMockState[lang]) { + pushMockState[lang] = {}; + } + + pushMockState[lang][helper] = (pushMockState[lang][helper] ?? 0) + 1; + switch (helper) { + case 'saveObjectsWithTransformation': + expect(req.body).to.deep.equal({ + action: 'addObject', + records: [ + { objectID: '1', name: 'Adam' }, + { objectID: '2', name: 'Benoit' }, + ], + }); + + res.json({ + runID: 'b1b7a982-524c-40d2-bb7f-48aab075abda', + eventID: '113b2068-6337-4c85-b5c2-e7b213d82925', + message: 'OK', + createdAt: '2022-05-12T06:24:30.049Z', + }); + + break; + case 'partialUpdateObjectsWithTransformation': + expect(req.body).to.deep.equal({ + action: 'partialUpdateObject', + records: [ + { objectID: '1', name: 'Adam' }, + { objectID: '2', name: 'Benoit' }, + ], + }); + + res.json({ + runID: 'b1b7a982-524c-40d2-bb7f-48aab075abda', + eventID: '113b2068-6337-4c85-b5c2-e7b213d82925', + message: 'OK', + createdAt: '2022-05-12T06:24:30.049Z', + }); + break; + default: + throw new Error('unknown helper'); + } + }); +} + +export function pushMockServer(): Promise { + return setupServer('pushMock', 6689, addRoutes); +} diff --git a/specs/search/helpers/partialUpdateObjectsWithTransformation.yml b/specs/search/helpers/partialUpdateObjectsWithTransformation.yml index 8fbc30c07b0..1bc802b6eb5 100644 --- a/specs/search/helpers/partialUpdateObjectsWithTransformation.yml +++ b/specs/search/helpers/partialUpdateObjectsWithTransformation.yml @@ -1,6 +1,10 @@ method: post: x-helper: true + x-available-languages: + - javascript + - go + - python tags: - Records operationId: partialUpdateObjectsWithTransformation diff --git a/specs/search/helpers/saveObjectsWithTransformation.yml b/specs/search/helpers/saveObjectsWithTransformation.yml index 3bb6e3ae6f5..76c2aeaafe1 100644 --- a/specs/search/helpers/saveObjectsWithTransformation.yml +++ b/specs/search/helpers/saveObjectsWithTransformation.yml @@ -1,6 +1,10 @@ method: get: x-helper: true + x-available-languages: + - javascript + - go + - python tags: - Records operationId: saveObjectsWithTransformation diff --git a/templates/go/client.mustache b/templates/go/client.mustache index 77db9945180..c02ecbe2f3d 100644 --- a/templates/go/client.mustache +++ b/templates/go/client.mustache @@ -85,14 +85,26 @@ func NewClientWithConfig(cfg {{#lambda.titlecase}}{{#lambda.camelcase}}{{client} } {{#isSearchClient}} - if cfg.Transformation != nil && cfg.Transformation.Region != "" { - ingestionClient, err := ingestion.NewClient(apiClient.appID, cfg.ApiKey, cfg.Transformation.Region) - if err != nil { - return nil, err //nolint:wrapcheck + if cfg.Transformation != nil && cfg.Transformation.Region != "" { + ingestionConfig := ingestion.IngestionConfiguration{ + Configuration: transport.Configuration{ + AppID: cfg.AppID, + ApiKey: cfg.ApiKey, + }, + Region: cfg.Transformation.Region, } - apiClient.ingestionTransporter = ingestionClient - } + if len(cfg.Hosts) > 0 { + ingestionConfig.Hosts = cfg.Hosts + } + + ingestionClient, err := ingestion.NewClientWithConfig(ingestionConfig) + if err != nil { + return nil, err //nolint:wrapcheck + } + + apiClient.ingestionTransporter = ingestionClient + } {{/isSearchClient}} return &apiClient, nil diff --git a/templates/go/tests/client/createClient.mustache b/templates/go/tests/client/createClient.mustache index 5541e8e520f..f0ff743823e 100644 --- a/templates/go/tests/client/createClient.mustache +++ b/templates/go/tests/client/createClient.mustache @@ -13,5 +13,8 @@ cfg = {{clientPrefix}}.{{clientName}}Configuration{ {{/gzipEncoding}} },{{#hasRegionalHost}}{{#parametersWithDataTypeMap.region.value}} Region: {{clientPrefix}}.Region("{{parametersWithDataTypeMap.region.value}}"),{{/parametersWithDataTypeMap.region.value}}{{/hasRegionalHost}} + {{#hasTransformationRegion}} + Transformation: &search.TransformationConfiguration{ Region: "{{{transformationRegion}}}" }, + {{/hasTransformationRegion}} } client, err = {{clientPrefix}}.NewClientWithConfig(cfg) \ No newline at end of file diff --git a/templates/javascript/tests/client/createClient.mustache b/templates/javascript/tests/client/createClient.mustache index 4fdc5fa709c..04537b1f96b 100644 --- a/templates/javascript/tests/client/createClient.mustache +++ b/templates/javascript/tests/client/createClient.mustache @@ -17,8 +17,11 @@ protocol: 'http' }, {{/customHosts}} - ] + ], {{/hasCustomHosts}} + {{#hasTransformationRegion}} + transformation: { region : "{{{transformationRegion}}}" }, + {{/hasTransformationRegion}} } {{/isStandaloneClient}} ){{^isStandaloneClient}}.{{{initMethod}}}( diff --git a/templates/python/api.mustache b/templates/python/api.mustache index 9083efb55be..2d465fabd2a 100644 --- a/templates/python/api.mustache +++ b/templates/python/api.mustache @@ -54,10 +54,6 @@ class {{classname}}{{#isSyncClient}}Sync{{/isSyncClient}}: config = {{#lambda.pascalcase}}{{client}}Config{{/lambda.pascalcase}}(transporter.config.app_id, transporter.config.api_key{{#hasRegionalHost}}, region{{/hasRegionalHost}}) elif config is None: config = {{#lambda.pascalcase}}{{client}}Config{{/lambda.pascalcase}}(app_id, api_key{{#hasRegionalHost}}, region{{/hasRegionalHost}}) - {{#isSearchClient}} - elif config.region is not None: - self._ingestion_transporter = IngestionClient{{#isSyncClient}}Sync{{/isSyncClient}}.create_with_config(IngestionConfig(config.app_id, config.api_key, config.region)) - {{/isSearchClient}} self._config = config self._request_options = RequestOptions(config) @@ -84,7 +80,19 @@ class {{classname}}{{#isSyncClient}}Sync{{/isSyncClient}}: if transporter is None: transporter = Transporter{{#isSyncClient}}Sync{{/isSyncClient}}(config) - return {{classname}}{{#isSyncClient}}Sync{{/isSyncClient}}(app_id=config.app_id, api_key=config.api_key, {{#hasRegionalHost}}region=config.region, {{/hasRegionalHost}}transporter=transporter, config=config) + client = {{classname}}{{#isSyncClient}}Sync{{/isSyncClient}}(app_id=config.app_id, api_key=config.api_key, {{#hasRegionalHost}}region=config.region, {{/hasRegionalHost}}transporter=transporter, config=config) + + {{#isSearchClient}} + if config.region is not None: + ingestion_config = IngestionConfig(config.app_id, config.api_key, config.region) + + if config.hosts is not None: + ingestion_config.hosts = config.hosts + + client._ingestion_transporter = IngestionClient{{#isSyncClient}}Sync{{/isSyncClient}}.create_with_config(ingestion_config) + {{/isSearchClient}} + + return client {{^isSyncClient}} async def __aenter__(self) -> Self: diff --git a/templates/python/tests/client/createClient.mustache b/templates/python/tests/client/createClient.mustache index 870bf423ecd..15c6606719a 100644 --- a/templates/python/tests/client/createClient.mustache +++ b/templates/python/tests/client/createClient.mustache @@ -2,4 +2,7 @@ _config = {{#lambda.pascalcase}}{{clientPrefix}}Config{{/lambda.pascalcase}}("{{ {{#hasCustomHosts}} {{#isError}} {{/isError}}_config.hosts = HostsCollection([{{#customHosts}}Host(url='localhost' if environ.get('CI') == 'true' else 'host.docker.internal', scheme='http', port={{port}}){{^-last}},{{/-last}}{{/customHosts}}]) {{/hasCustomHosts}} + {{#hasTransformationRegion}} + {{#isError}} {{/isError}}_config.with_transformation("{{{transformationRegion}}}") + {{/hasTransformationRegion}} {{#isError}} {{/isError}}_client = {{#lambda.pascalcase}}{{{client}}}{{/lambda.pascalcase}}{{#isSyncClient}}Sync{{/isSyncClient}}.create_with_config(config=_config{{#useEchoRequester}}, transporter=EchoTransporter{{#isSyncClient}}Sync{{/isSyncClient}}(_config){{/useEchoRequester}}) \ No newline at end of file diff --git a/tests/CTS/client/search/partialUpdateObjectsWithTransformation.json b/tests/CTS/client/search/partialUpdateObjectsWithTransformation.json new file mode 100644 index 00000000000..4383129ff08 --- /dev/null +++ b/tests/CTS/client/search/partialUpdateObjectsWithTransformation.json @@ -0,0 +1,48 @@ +[ + { + "testName": "call partialUpdateObjectsWithTransformation with createIfNotExists=true", + "autoCreateClient": false, + "steps": [ + { + "type": "createClient", + "parameters": { + "appId": "test-app-id", + "apiKey": "test-api-key", + "customHosts": [ + { + "port": 6689 + } + ], + "transformationRegion": "us" + } + }, + { + "type": "method", + "method": "partialUpdateObjectsWithTransformation", + "parameters": { + "indexName": "cts_e2e_partialUpdateObjectsWithTransformation_${{language}}", + "objects": [ + { + "objectID": "1", + "name": "Adam" + }, + { + "objectID": "2", + "name": "Benoit" + } + ], + "createIfNotExists": true + }, + "expected": { + "type": "response", + "match": { + "runID": "b1b7a982-524c-40d2-bb7f-48aab075abda", + "eventID": "113b2068-6337-4c85-b5c2-e7b213d82925", + "message": "OK", + "createdAt": "2022-05-12T06:24:30.049Z" + } + } + } + ] + } +] diff --git a/tests/CTS/client/search/saveObjectsWithTransformation.json b/tests/CTS/client/search/saveObjectsWithTransformation.json new file mode 100644 index 00000000000..51d616b0b6d --- /dev/null +++ b/tests/CTS/client/search/saveObjectsWithTransformation.json @@ -0,0 +1,47 @@ +[ + { + "testName": "call saveObjectsWithTransformation without error", + "autoCreateClient": false, + "steps": [ + { + "type": "createClient", + "parameters": { + "appId": "test-app-id", + "apiKey": "test-api-key", + "customHosts": [ + { + "port": 6689 + } + ], + "transformationRegion": "us" + } + }, + { + "type": "method", + "method": "saveObjectsWithTransformation", + "parameters": { + "indexName": "cts_e2e_saveObjectsWithTransformation_${{language}}", + "objects": [ + { + "objectID": "1", + "name": "Adam" + }, + { + "objectID": "2", + "name": "Benoit" + } + ] + }, + "expected": { + "type": "response", + "match": { + "runID": "b1b7a982-524c-40d2-bb7f-48aab075abda", + "eventID": "113b2068-6337-4c85-b5c2-e7b213d82925", + "message": "OK", + "createdAt": "2022-05-12T06:24:30.049Z" + } + } + } + ] + } +] diff --git a/tests/output/javascript/yarn.lock b/tests/output/javascript/yarn.lock index 4af7fc031b3..170f013d597 100644 --- a/tests/output/javascript/yarn.lock +++ b/tests/output/javascript/yarn.lock @@ -257,146 +257,162 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.40.1" +"@rollup/rollup-android-arm-eabi@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.41.1" conditions: os=android & cpu=arm languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-android-arm64@npm:4.40.1" +"@rollup/rollup-android-arm64@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-android-arm64@npm:4.41.1" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-darwin-arm64@npm:4.40.1" +"@rollup/rollup-darwin-arm64@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-darwin-arm64@npm:4.41.1" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-darwin-x64@npm:4.40.1" +"@rollup/rollup-darwin-x64@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-darwin-x64@npm:4.41.1" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-freebsd-arm64@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-freebsd-arm64@npm:4.40.1" +"@rollup/rollup-freebsd-arm64@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-freebsd-arm64@npm:4.41.1" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-freebsd-x64@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-freebsd-x64@npm:4.40.1" +"@rollup/rollup-freebsd-x64@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-freebsd-x64@npm:4.41.1" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.40.1" +"@rollup/rollup-linux-arm-gnueabihf@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.41.1" conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm-musleabihf@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.40.1" +"@rollup/rollup-linux-arm-musleabihf@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.41.1" conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.40.1" +"@rollup/rollup-linux-arm64-gnu@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.41.1" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.40.1" +"@rollup/rollup-linux-arm64-musl@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.41.1" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-loongarch64-gnu@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.40.1" +"@rollup/rollup-linux-loongarch64-gnu@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.41.1" conditions: os=linux & cpu=loong64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.40.1" +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.41.1" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.40.1" +"@rollup/rollup-linux-riscv64-gnu@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.41.1" conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-musl@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-linux-riscv64-musl@npm:4.40.1" +"@rollup/rollup-linux-riscv64-musl@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-linux-riscv64-musl@npm:4.41.1" conditions: os=linux & cpu=riscv64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-s390x-gnu@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.40.1" +"@rollup/rollup-linux-s390x-gnu@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.41.1" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.40.1" +"@rollup/rollup-linux-x64-gnu@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.41.1" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.40.1" +"@rollup/rollup-linux-x64-musl@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.41.1" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.40.1" +"@rollup/rollup-win32-arm64-msvc@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.41.1" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.40.1" +"@rollup/rollup-win32-ia32-msvc@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.41.1" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.40.1": - version: 4.40.1 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.40.1" +"@rollup/rollup-win32-x64-msvc@npm:4.41.1": + version: 4.41.1 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.41.1" conditions: os=win32 & cpu=x64 languageName: node linkType: hard +"@types/chai@npm:^5.2.2": + version: 5.2.2 + resolution: "@types/chai@npm:5.2.2" + dependencies: + "@types/deep-eql": "npm:*" + checksum: 10/de425e7b02cc1233a93923866e019dffbafa892774813940b780ebb1ac9f8a8c57b7438c78686bf4e5db05cd3fc8a970fedf6b83638543995ecca88ef2060668 + languageName: node + linkType: hard + +"@types/deep-eql@npm:*": + version: 4.0.2 + resolution: "@types/deep-eql@npm:4.0.2" + checksum: 10/249a27b0bb22f6aa28461db56afa21ec044fa0e303221a62dff81831b20c8530502175f1a49060f7099e7be06181078548ac47c668de79ff9880241968d43d0c + languageName: node + linkType: hard + "@types/estree@npm:1.0.7, @types/estree@npm:^1.0.0": version: 1.0.7 resolution: "@types/estree@npm:1.0.7" @@ -404,93 +420,103 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:22.15.3": - version: 22.15.3 - resolution: "@types/node@npm:22.15.3" +"@types/node@npm:22.15.29": + version: 22.15.29 + resolution: "@types/node@npm:22.15.29" dependencies: undici-types: "npm:~6.21.0" - checksum: 10/6b4ff03c36598432b419980f828281aa16383e2de6eb61f73275495ef8d2cbf8cb5607659b4cae5ff8b2b2ff69913ea07ffcc0be029e4280b6e8bc138dc6629b + checksum: 10/3426790c5aa22df445213d7f37e57ea261cf3013030fe9b3025d87c302097799a9db3b848e2a9bdb07cab8ec6c7e9947ac770cf11e12e420148296b63d63e7db languageName: node linkType: hard -"@vitest/expect@npm:3.1.2": - version: 3.1.2 - resolution: "@vitest/expect@npm:3.1.2" +"@vitest/expect@npm:3.2.0": + version: 3.2.0 + resolution: "@vitest/expect@npm:3.2.0" dependencies: - "@vitest/spy": "npm:3.1.2" - "@vitest/utils": "npm:3.1.2" + "@types/chai": "npm:^5.2.2" + "@vitest/spy": "npm:3.2.0" + "@vitest/utils": "npm:3.2.0" chai: "npm:^5.2.0" tinyrainbow: "npm:^2.0.0" - checksum: 10/3c414e376154c8095f40efe409bb5f2c9380ba05a15b20552ee2e29f73197ab73068177e3da298ac135ef72673d1ea92090c466c78443ee69a7438bc8ab65f4f + checksum: 10/c43234eda5754f21854e48151050956402175538d81dcf9ddfd9a4ddad7c052f5ba2f52eedff117bbb2da2b066b1ec71377561d854a36fcdf76565eb49a13550 languageName: node linkType: hard -"@vitest/mocker@npm:3.1.2": - version: 3.1.2 - resolution: "@vitest/mocker@npm:3.1.2" +"@vitest/mocker@npm:3.2.0": + version: 3.2.0 + resolution: "@vitest/mocker@npm:3.2.0" dependencies: - "@vitest/spy": "npm:3.1.2" + "@vitest/spy": "npm:3.2.0" estree-walker: "npm:^3.0.3" magic-string: "npm:^0.30.17" peerDependencies: msw: ^2.4.9 - vite: ^5.0.0 || ^6.0.0 + vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 peerDependenciesMeta: msw: optional: true vite: optional: true - checksum: 10/e6d730400daa7a97fb277159733df1366a932b5b06ac83d72e094e5383191c2597b4a5ae3538b28de6112b9e5d314cb50b44e031e79522f43f3dfc8ab022a584 + checksum: 10/fc152aa7ed8ae9c8f7b06bb88b752773b560c0895cc279a5df9d7654150361e26792a3f64d238593357852b6b91c77455df30a3aee45557d508c1bd7292a21a5 languageName: node linkType: hard -"@vitest/pretty-format@npm:3.1.2, @vitest/pretty-format@npm:^3.1.2": - version: 3.1.2 - resolution: "@vitest/pretty-format@npm:3.1.2" +"@vitest/pretty-format@npm:3.2.0": + version: 3.2.0 + resolution: "@vitest/pretty-format@npm:3.2.0" dependencies: tinyrainbow: "npm:^2.0.0" - checksum: 10/454d0a8c250dbe52f7ec9dab4968e7c769fa10c8318eb5c54cb4b6d5b524772c04856e1990279f2c6e76705ffa107fddcbc1973560ed3b88167c231ccfeada16 + checksum: 10/174336cf787923c575a2f5d8b4c67bd52e0a83a139b53785db1bac5aa4c3dcee1d201dd8d43839cb20f47ede79198f210152e37a37fa4fd249c2681712017834 languageName: node linkType: hard -"@vitest/runner@npm:3.1.2": - version: 3.1.2 - resolution: "@vitest/runner@npm:3.1.2" +"@vitest/pretty-format@npm:^3.2.0": + version: 3.2.1 + resolution: "@vitest/pretty-format@npm:3.2.1" + dependencies: + tinyrainbow: "npm:^2.0.0" + checksum: 10/caaa4ad5b87e3ba0fcd77fbfb373b227d55050a6bc58b6d7a1d373e6990acbaa775e00e6194b03a0ba4bc15e7203d303b2cd0884b8e6187a1ddf0cf80721cfed + languageName: node + linkType: hard + +"@vitest/runner@npm:3.2.0": + version: 3.2.0 + resolution: "@vitest/runner@npm:3.2.0" dependencies: - "@vitest/utils": "npm:3.1.2" + "@vitest/utils": "npm:3.2.0" pathe: "npm:^2.0.3" - checksum: 10/b09c1ff3a556f318585307e6bb8954d219d0d35d1e17708fdd5d5ae1a230e6f29eba4f37a86faa71192f72406bb96b576c1b620d49d686def87bc5dcb8bf5737 + checksum: 10/d1f8022e0535b563ce4df49a193cb72b9b41e76a20fb93f99b54900caf4443145d19e456bf0df4eae5ed5138126054eb65832f4b4467265985cb9525b2838fd3 languageName: node linkType: hard -"@vitest/snapshot@npm:3.1.2": - version: 3.1.2 - resolution: "@vitest/snapshot@npm:3.1.2" +"@vitest/snapshot@npm:3.2.0": + version: 3.2.0 + resolution: "@vitest/snapshot@npm:3.2.0" dependencies: - "@vitest/pretty-format": "npm:3.1.2" + "@vitest/pretty-format": "npm:3.2.0" magic-string: "npm:^0.30.17" pathe: "npm:^2.0.3" - checksum: 10/dda969b697bdcd8616f17e98c74ad5e95a5f3c2284140aa72390ce668db34e70936ee0b8ebe89adb2e0dea332500689d54c8ff03f8adf1e00be70639ec9032bf + checksum: 10/61bfb88c867f9018018ebb77527dec98922fa4a2c496c751a7d02f873e21e4337a1804ae05f1d40f0406254bc9ffb3041a103aca0d18603d2de8fc32c2292065 languageName: node linkType: hard -"@vitest/spy@npm:3.1.2": - version: 3.1.2 - resolution: "@vitest/spy@npm:3.1.2" +"@vitest/spy@npm:3.2.0": + version: 3.2.0 + resolution: "@vitest/spy@npm:3.2.0" dependencies: - tinyspy: "npm:^3.0.2" - checksum: 10/c2c638368fa4130f903901fdf4e86da6f90d5d6a8cf7ce880cdd24768a1f8e6b726ea3428501c97e00c34ac2e8e39ac09b3a03606dffd8081559e0a35c892ddc + tinyspy: "npm:^4.0.3" + checksum: 10/7cf401b550e48be5e3acc6593ad29a8add77df0767ce601e75b423d1be8376ebe9a0654f7145a2ae6b818cd3a75337ec8ee18dced510eb1c527e35cbacca2b7b languageName: node linkType: hard -"@vitest/utils@npm:3.1.2": - version: 3.1.2 - resolution: "@vitest/utils@npm:3.1.2" +"@vitest/utils@npm:3.2.0": + version: 3.2.0 + resolution: "@vitest/utils@npm:3.2.0" dependencies: - "@vitest/pretty-format": "npm:3.1.2" + "@vitest/pretty-format": "npm:3.2.0" loupe: "npm:^3.1.3" tinyrainbow: "npm:^2.0.0" - checksum: 10/221faaaf6c69ef24eacdcf68581c833cb99bf3e5125945b5dec928af7ef1af4359aa520b90c42413a128b308037bf3217d8c41a41f44ca4aee3ac44e3f0d56b5 + checksum: 10/2f9189fcef439da54a17c4673a87861191563cd089f1b93d645a364f259e446de694c097df330011e39c4416665a8445c549cb361a50f5ead2f50c3ec4b654a5 languageName: node linkType: hard @@ -648,7 +674,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.3.4, debug@npm:^4.4.0": +"debug@npm:4, debug@npm:^4.3.4": version: 4.4.0 resolution: "debug@npm:4.4.0" dependencies: @@ -660,6 +686,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.4.1": + version: 4.4.1 + resolution: "debug@npm:4.4.1" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/8e2709b2144f03c7950f8804d01ccb3786373df01e406a0f66928e47001cf2d336cbed9ee137261d4f90d68d8679468c755e3548ed83ddacdc82b194d2468afe + languageName: node + linkType: hard + "deep-eql@npm:^5.0.1": version: 5.0.2 resolution: "deep-eql@npm:5.0.2" @@ -718,7 +756,7 @@ __metadata: languageName: node linkType: hard -"es-module-lexer@npm:^1.6.0": +"es-module-lexer@npm:^1.7.0": version: 1.7.0 resolution: "es-module-lexer@npm:1.7.0" checksum: 10/b6f3e576a3fed4d82b0d0ad4bbf6b3a5ad694d2e7ce8c4a069560da3db6399381eaba703616a182b16dde50ce998af64e07dcf49f2ae48153b9e07be3f107087 @@ -1001,11 +1039,11 @@ __metadata: "@algolia/client-composition": "link:../../../clients/algoliasearch-client-javascript/packages/client-composition" "@algolia/composition": "link:../../../clients/algoliasearch-client-javascript/packages/composition" "@algolia/requester-testing": "link:../../../clients/algoliasearch-client-javascript/packages/requester-testing" - "@types/node": "npm:22.15.3" + "@types/node": "npm:22.15.29" algoliasearch: "link:../../../clients/algoliasearch-client-javascript/packages/algoliasearch" dotenv: "npm:16.5.0" typescript: "npm:5.8.3" - vitest: "npm:3.1.2" + vitest: "npm:3.2.0" languageName: unknown linkType: soft @@ -1300,30 +1338,30 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^4.34.9": - version: 4.40.1 - resolution: "rollup@npm:4.40.1" - dependencies: - "@rollup/rollup-android-arm-eabi": "npm:4.40.1" - "@rollup/rollup-android-arm64": "npm:4.40.1" - "@rollup/rollup-darwin-arm64": "npm:4.40.1" - "@rollup/rollup-darwin-x64": "npm:4.40.1" - "@rollup/rollup-freebsd-arm64": "npm:4.40.1" - "@rollup/rollup-freebsd-x64": "npm:4.40.1" - "@rollup/rollup-linux-arm-gnueabihf": "npm:4.40.1" - "@rollup/rollup-linux-arm-musleabihf": "npm:4.40.1" - "@rollup/rollup-linux-arm64-gnu": "npm:4.40.1" - "@rollup/rollup-linux-arm64-musl": "npm:4.40.1" - "@rollup/rollup-linux-loongarch64-gnu": "npm:4.40.1" - "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.40.1" - "@rollup/rollup-linux-riscv64-gnu": "npm:4.40.1" - "@rollup/rollup-linux-riscv64-musl": "npm:4.40.1" - "@rollup/rollup-linux-s390x-gnu": "npm:4.40.1" - "@rollup/rollup-linux-x64-gnu": "npm:4.40.1" - "@rollup/rollup-linux-x64-musl": "npm:4.40.1" - "@rollup/rollup-win32-arm64-msvc": "npm:4.40.1" - "@rollup/rollup-win32-ia32-msvc": "npm:4.40.1" - "@rollup/rollup-win32-x64-msvc": "npm:4.40.1" +"rollup@npm:^4.40.0": + version: 4.41.1 + resolution: "rollup@npm:4.41.1" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.41.1" + "@rollup/rollup-android-arm64": "npm:4.41.1" + "@rollup/rollup-darwin-arm64": "npm:4.41.1" + "@rollup/rollup-darwin-x64": "npm:4.41.1" + "@rollup/rollup-freebsd-arm64": "npm:4.41.1" + "@rollup/rollup-freebsd-x64": "npm:4.41.1" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.41.1" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.41.1" + "@rollup/rollup-linux-arm64-gnu": "npm:4.41.1" + "@rollup/rollup-linux-arm64-musl": "npm:4.41.1" + "@rollup/rollup-linux-loongarch64-gnu": "npm:4.41.1" + "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.41.1" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.41.1" + "@rollup/rollup-linux-riscv64-musl": "npm:4.41.1" + "@rollup/rollup-linux-s390x-gnu": "npm:4.41.1" + "@rollup/rollup-linux-x64-gnu": "npm:4.41.1" + "@rollup/rollup-linux-x64-musl": "npm:4.41.1" + "@rollup/rollup-win32-arm64-msvc": "npm:4.41.1" + "@rollup/rollup-win32-ia32-msvc": "npm:4.41.1" + "@rollup/rollup-win32-x64-msvc": "npm:4.41.1" "@types/estree": "npm:1.0.7" fsevents: "npm:~2.3.2" dependenciesMeta: @@ -1371,7 +1409,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 10/35d5e83a69000ddd6c087015eb5f862943c53b6e20702575ef50aeb99ce99b864fa74cca630815eb97cdfe1f278f5602f782e55f227b32ac2301f2a5f1fc5373 + checksum: 10/b7b5a5668bc05445766b1b7342475d9dbb173925e806805720bcfad277a591c5452f11fe1f1fd9f8030b4e52f093610a10200599258ad5faad9104944b984c36 languageName: node linkType: hard @@ -1554,7 +1592,7 @@ __metadata: languageName: node linkType: hard -"tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.13": +"tinyglobby@npm:^0.2.12": version: 0.2.13 resolution: "tinyglobby@npm:0.2.13" dependencies: @@ -1564,10 +1602,20 @@ __metadata: languageName: node linkType: hard -"tinypool@npm:^1.0.2": - version: 1.0.2 - resolution: "tinypool@npm:1.0.2" - checksum: 10/6109322f14b3763f65c8fa49fddab72cd3edd96b82dd50e05e63de74867329ff5353bff4377281ec963213d9314f37f4a353e9ee34bbac85fd4c1e4a568d6076 +"tinyglobby@npm:^0.2.14": + version: 0.2.14 + resolution: "tinyglobby@npm:0.2.14" + dependencies: + fdir: "npm:^6.4.4" + picomatch: "npm:^4.0.2" + checksum: 10/3d306d319718b7cc9d79fb3f29d8655237aa6a1f280860a217f93417039d0614891aee6fc47c5db315f4fcc6ac8d55eb8e23e2de73b2c51a431b42456d9e5764 + languageName: node + linkType: hard + +"tinypool@npm:^1.1.0": + version: 1.1.0 + resolution: "tinypool@npm:1.1.0" + checksum: 10/2e99e76f01699bb3244463a4b1b473fb9a166473d417b5ce373bbd12ef4626c221100533540d90f6bddbc83149ebf97e7ce052c0d1c5ae1a5066c5690cfee538 languageName: node linkType: hard @@ -1578,10 +1626,10 @@ __metadata: languageName: node linkType: hard -"tinyspy@npm:^3.0.2": - version: 3.0.2 - resolution: "tinyspy@npm:3.0.2" - checksum: 10/5db671b2ff5cd309de650c8c4761ca945459d7204afb1776db9a04fb4efa28a75f08517a8620c01ee32a577748802231ad92f7d5b194dc003ee7f987a2a06337 +"tinyspy@npm:^4.0.3": + version: 4.0.3 + resolution: "tinyspy@npm:4.0.3" + checksum: 10/b6a3ed40dd76a2b3c020250cf1401506b456509d1fb9dba0c7b0e644d258dac722843b85c57ccc36c8687db1e7978cb6adcc43e3b71c475910c085b96d41cb53 languageName: node linkType: hard @@ -1630,41 +1678,41 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:3.1.2": - version: 3.1.2 - resolution: "vite-node@npm:3.1.2" +"vite-node@npm:3.2.0": + version: 3.2.0 + resolution: "vite-node@npm:3.2.0" dependencies: cac: "npm:^6.7.14" - debug: "npm:^4.4.0" - es-module-lexer: "npm:^1.6.0" + debug: "npm:^4.4.1" + es-module-lexer: "npm:^1.7.0" pathe: "npm:^2.0.3" - vite: "npm:^5.0.0 || ^6.0.0" + vite: "npm:^5.0.0 || ^6.0.0 || ^7.0.0-0" bin: vite-node: vite-node.mjs - checksum: 10/8af0465810c6f27200dc899792002320995f3d85c432aaa411bf7ff15580c0b93c4a5153d8a93c7af89b496a6e1a7979a7777984e37ebd7311851ea7572eaac7 + checksum: 10/72d45d71c8bfdee1209c4140ca21bdcf13da3d374b4ac400d5af1b1379555f72a467a91c05c836907747f1e58b6d0d4a1f80fdbf3f8f361c60e729ccdf38ed00 languageName: node linkType: hard -"vite@npm:^5.0.0 || ^6.0.0": - version: 6.3.5 - resolution: "vite@npm:6.3.5" +"vite@npm:^5.0.0 || ^6.0.0 || ^7.0.0-0": + version: 7.0.0-beta.0 + resolution: "vite@npm:7.0.0-beta.0" dependencies: esbuild: "npm:^0.25.0" fdir: "npm:^6.4.4" fsevents: "npm:~2.3.3" picomatch: "npm:^4.0.2" postcss: "npm:^8.5.3" - rollup: "npm:^4.34.9" - tinyglobby: "npm:^0.2.13" + rollup: "npm:^4.40.0" + tinyglobby: "npm:^0.2.14" peerDependencies: - "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 + "@types/node": ^20.19.0 || >=22.12.0 jiti: ">=1.21.0" - less: "*" + less: ^4.0.0 lightningcss: ^1.21.0 - sass: "*" - sass-embedded: "*" - stylus: "*" - sugarss: "*" + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: ">=0.54.8" + sugarss: ^5.0.0 terser: ^5.16.0 tsx: ^4.8.1 yaml: ^2.4.2 @@ -1696,41 +1744,43 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 10/7bc3a1c5ef79413ad70daeeaf69b76cd1218d16aa18ed8ee08d74648ef17284f4a17c11f5cf42b573b6dc5e3d5f115110b67b1d23c2c699cfe404757764a634a + checksum: 10/87a5837832f9b6ca873c1808fd57e031d9ddfdea788b24bc7d137316af6dcf842ec4d81701d24b7e3bb6eef33a7b718c1aa33a1304c952f3e3eab9e8498b60b0 languageName: node linkType: hard -"vitest@npm:3.1.2": - version: 3.1.2 - resolution: "vitest@npm:3.1.2" - dependencies: - "@vitest/expect": "npm:3.1.2" - "@vitest/mocker": "npm:3.1.2" - "@vitest/pretty-format": "npm:^3.1.2" - "@vitest/runner": "npm:3.1.2" - "@vitest/snapshot": "npm:3.1.2" - "@vitest/spy": "npm:3.1.2" - "@vitest/utils": "npm:3.1.2" +"vitest@npm:3.2.0": + version: 3.2.0 + resolution: "vitest@npm:3.2.0" + dependencies: + "@types/chai": "npm:^5.2.2" + "@vitest/expect": "npm:3.2.0" + "@vitest/mocker": "npm:3.2.0" + "@vitest/pretty-format": "npm:^3.2.0" + "@vitest/runner": "npm:3.2.0" + "@vitest/snapshot": "npm:3.2.0" + "@vitest/spy": "npm:3.2.0" + "@vitest/utils": "npm:3.2.0" chai: "npm:^5.2.0" - debug: "npm:^4.4.0" + debug: "npm:^4.4.1" expect-type: "npm:^1.2.1" magic-string: "npm:^0.30.17" pathe: "npm:^2.0.3" + picomatch: "npm:^4.0.2" std-env: "npm:^3.9.0" tinybench: "npm:^2.9.0" tinyexec: "npm:^0.3.2" - tinyglobby: "npm:^0.2.13" - tinypool: "npm:^1.0.2" + tinyglobby: "npm:^0.2.14" + tinypool: "npm:^1.1.0" tinyrainbow: "npm:^2.0.0" - vite: "npm:^5.0.0 || ^6.0.0" - vite-node: "npm:3.1.2" + vite: "npm:^5.0.0 || ^6.0.0 || ^7.0.0-0" + vite-node: "npm:3.2.0" why-is-node-running: "npm:^2.3.0" peerDependencies: "@edge-runtime/vm": "*" "@types/debug": ^4.1.12 "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 - "@vitest/browser": 3.1.2 - "@vitest/ui": 3.1.2 + "@vitest/browser": 3.2.0 + "@vitest/ui": 3.2.0 happy-dom: "*" jsdom: "*" peerDependenciesMeta: @@ -1750,7 +1800,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: 10/aa5638bf37b2811b01ad8ff0563cdec09202f7a28d9dbcb8eabb2e51cadefc57309cba4f5ff2bac4a72edda44055a844236fc4a09eb72127ef1bd34eb25d0808 + checksum: 10/a85298f8c6e1cdd42e9d8412bd63bacc029966d703059c6b38da3e937766aedc559e915be4a55c77222ae57df691f8e566d195af480322f359c49633b80132c6 languageName: node linkType: hard