From ff7fb984ce5c39039ab00a0fc6ca0b5726fe0214 Mon Sep 17 00:00:00 2001 From: Oleksii Zubko Date: Tue, 28 Jul 2026 15:57:23 +0300 Subject: [PATCH] Prepare to v3.0.0 Migrate the monorepo tooling: npm workspaces instead of yarn and lerna, vitest instead of mocha, nyc and karma, eslint instead of tslint, and current versions of the GitHub actions and of Java for MockServer. Replace the six per-package prettier configs with one at the root, pinning the trailing comma style that prettier 3 would otherwise have changed. Drop the properties-reader dependency, which leaves the authentication package with no third-party dependencies at all, and report the body of a failed token request so the correlationId reaches the caller. Remove catch handlers that only re-rejected, write the lcov paths from the monorepo root so the six package reports stop colliding, keep the oauth-requester entry point out of coverage, and cover the error paths and branches that no test reached. Two tests that asserted inside a `setTimeout` firing after the test had ended now drive the clock with fake timers. Relates-To: MAJOR See also: HERESUP-71374 Signed-off-by: Oleksii Zubko --- .github/workflows/ci.yml | 17 +- .github/workflows/deploy.yml | 13 +- .gitignore | 2 + .husky/pre-commit | 1 + .nvmrc | 1 + .prettierrc.json | 4 + @here/olp-sdk-authentication/.prettierrc.json | 3 - @here/olp-sdk-authentication/lib/UserAuth.ts | 25 +- .../lib/buildErrorMessage.ts | 46 + .../lib/loadCredentialsFromFile.ts | 52 +- .../lib/requestToken_common.ts | 7 +- @here/olp-sdk-authentication/package.json | 67 +- .../olp-sdk-authentication/test/OAuth.test.ts | 366 +- .../test/loadCredentialsFromFile.test.ts | 44 +- @here/olp-sdk-authentication/test/mocha.opts | 8 - .../test/requestTokenWeb.test.ts | 78 +- .../test/test-credentials-comments.properties | 9 + .../olp-sdk-authentication/test/tsconfig.json | 6 +- @here/olp-sdk-authentication/tsconfig.json | 1 - @here/olp-sdk-authentication/tslint.json | 155 - @here/olp-sdk-authentication/vitest.config.ts | 25 + .../olp-sdk-authentication/webpack.config.js | 11 +- @here/olp-sdk-core/.prettierrc.json | 3 - @here/olp-sdk-core/README.md | 6 +- .../lib/cache/ApiCacheRepository.ts | 10 +- @here/olp-sdk-core/lib/cache/KeyValueCache.ts | 5 +- .../lib/client/OlpClientSettings.ts | 12 +- .../lib/utils/DataStoreDownloadManager.ts | 24 +- .../lib/utils/DataStoreRequestBuilder.ts | 12 +- .../lib/utils/RequestBuilderFactory.ts | 110 +- @here/olp-sdk-core/package.json | 64 +- @here/olp-sdk-core/test/mocha.opts | 8 - @here/olp-sdk-core/test/tsconfig.json | 6 +- .../test/unit/ApiCacheRepository.test.ts | 215 +- .../unit/DataStoreDownloadManager.test.ts | 104 +- .../test/unit/DataStoreRequestBuilder.test.ts | 477 +- @here/olp-sdk-core/test/unit/HRN.test.ts | 24 +- .../test/unit/KeyValueCache.test.ts | 34 +- @here/olp-sdk-core/test/unit/LRU.test.ts | 26 +- .../test/unit/OlpClientSettings.test.ts | 74 +- .../test/unit/RequestBuilderFactory.test.ts | 381 +- @here/olp-sdk-core/test/unit/TileKey.test.ts | 58 +- @here/olp-sdk-core/test/unit/Uuid.test.ts | 18 +- .../test/unit/getEnvLookupUrl.test.ts | 35 +- .../olp-sdk-core/test/unit/userAgent.test.ts | 20 +- @here/olp-sdk-core/tsconfig.json | 1 - @here/olp-sdk-core/tslint.json | 163 - @here/olp-sdk-core/vitest.config.ts | 20 + @here/olp-sdk-core/webpack.config.js | 9 +- .../olp-sdk-dataservice-api/.prettierrc.json | 3 - @here/olp-sdk-dataservice-api/package.json | 58 +- .../test/ArtifactApi.test.ts | 66 +- .../test/AuthorizationApi.test.ts | 371 +- .../test/BlobApi.test.ts | 65 +- .../test/BlobV2Api.test.ts | 71 +- .../test/ConfigApi.test.ts | 66 +- .../test/CoverageApi.test.ts | 42 +- .../test/DataStoreApi.test.ts | 8 +- .../test/IndexApi.test.ts | 35 +- .../test/InteractiveV1Api.test.ts | 56 +- .../test/LookupApi.test.ts | 30 +- .../test/MetadataApi.test.ts | 47 +- .../test/PublishApiV2.test.ts | 42 +- .../test/QuetyApi.test.ts | 38 +- .../test/RequestBuilder.test.ts | 231 +- .../test/StreamApi.test.ts | 48 +- .../test/VolatileBlobApi.test.ts | 39 +- @here/olp-sdk-dataservice-api/test/mocha.opts | 8 - .../test/tsconfig.json | 6 +- @here/olp-sdk-dataservice-api/tsconfig.json | 1 - @here/olp-sdk-dataservice-api/tslint.json | 155 - .../olp-sdk-dataservice-api/vitest.config.ts | 32 + .../olp-sdk-dataservice-api/webpack.config.js | 11 +- .../olp-sdk-dataservice-read/.prettierrc.json | 3 - @here/olp-sdk-dataservice-read/README.md | 6 +- .../lib/client/ArtifactClient.ts | 16 +- .../lib/client/CatalogClient.ts | 33 +- .../lib/client/CatalogRequest.ts | 4 +- .../lib/client/CatalogVersionRequest.ts | 4 +- .../lib/client/CatalogsRequest.ts | 4 +- .../lib/client/ConfigClient.ts | 6 +- .../lib/client/DataRequest.ts | 4 +- .../lib/client/IndexLayerClient.ts | 12 +- .../lib/client/LayerVersionsRequest.ts | 4 +- .../lib/client/PartitionsRequest.ts | 8 +- .../lib/client/QuadKeyPartitionsRequest.ts | 8 +- .../lib/client/QuadTreeIndexRequest.ts | 4 +- .../lib/client/QueryClient.ts | 24 +- .../lib/client/SchemaDetailsRequest.ts | 4 +- .../lib/client/SchemaRequest.ts | 4 +- .../lib/client/StatisticsClient.ts | 17 +- .../lib/client/StatisticsRequest.ts | 4 +- .../lib/client/StreamLayerClient.ts | 98 +- .../lib/client/SummaryRequest.ts | 4 +- .../lib/client/TileRequest.ts | 4 +- .../lib/client/VersionedLayerClient.ts | 41 +- .../lib/client/VolatileLayerClient.ts | 40 +- .../lib/utils/getTile.ts | 26 +- @here/olp-sdk-dataservice-read/package.json | 66 +- .../olp-sdk-dataservice-read/test/mocha.opts | 8 - .../test/tsconfig.json | 6 +- .../test/unit/ArtifactClient.test.ts | 107 +- .../test/unit/CatalogClient.test.ts | 191 +- .../test/unit/CatalogRequest.test.ts | 33 +- .../test/unit/CatalogVersionRequest.test.ts | 40 +- .../test/unit/CatalogsRequest.test.ts | 40 +- .../test/unit/ConfigClient.test.ts | 82 +- .../test/unit/DataRequest.test.ts | 39 +- .../test/unit/IndexLayerClient.test.ts | 130 +- .../test/unit/IndexQueryRequest.test.ts | 40 +- .../test/unit/LayerVersionsRequest.test.ts | 38 +- .../test/unit/PartitionsRequest.test.ts | 57 +- .../test/unit/PollRequest.test.ts | 29 +- .../unit/QuadKeyPartitionsRequest.test.ts | 55 +- .../test/unit/QuadTreeIndexRequest.test.ts | 45 +- .../test/unit/QueryClient.test.ts | 119 +- .../test/unit/SchemaDetailsRequest.test.ts | 40 +- .../test/unit/SchemaRequest.test.ts | 40 +- .../test/unit/SeekRequest.test.ts | 29 +- .../test/unit/StatisticsClient.test.ts | 136 +- .../test/unit/StatisticsRequest.test.ts | 55 +- .../test/unit/StreamLayerClient.test.ts | 440 +- .../test/unit/SubscribeRequest.test.ts | 51 +- .../test/unit/SummaryRequest.test.ts | 45 +- .../test/unit/TileRequest.test.ts | 28 +- .../test/unit/UnsubscribeRequest.test.ts | 29 +- .../test/unit/VersionedLayerClient.test.ts | 401 +- .../test/unit/VolatileLayerClient.test.ts | 259 +- .../test/unit/getTile.test.ts | 145 +- .../test/unit/stub-instance.ts | 45 + @here/olp-sdk-dataservice-read/tsconfig.json | 1 - @here/olp-sdk-dataservice-read/tslint.json | 163 - .../olp-sdk-dataservice-read/vitest.config.ts | 20 + .../webpack.config.js | 9 +- .../.prettierrc.json | 3 - @here/olp-sdk-dataservice-write/README.md | 6 +- .../lib/client/VersionedLayerClient.ts | 30 +- .../lib/utils/MultiPartUploadWrapper.ts | 8 +- .../multipartupload-internal/BufferData.ts | 4 +- .../multipartupload-internal/NodeFileData.ts | 142 +- .../utils/multipartupload-internal/WebData.ts | 4 +- @here/olp-sdk-dataservice-write/package.json | 66 +- .../olp-sdk-dataservice-write/test/mocha.opts | 8 - .../test/tsconfig.json | 6 +- .../test/unit/BlobV1UploadRequest.test.ts | 74 +- .../test/unit/BlobV2UploadRequest.test.ts | 77 +- .../test/unit/BufferData.test.ts | 24 +- .../test/unit/CancelBatchRequest.test.ts | 26 +- .../test/unit/CheckDataExistsRequest.test.ts | 26 +- .../test/unit/CompleteBatchRequest.test.ts | 26 +- .../test/unit/GetBatchRequest.test.ts | 26 +- .../test/unit/MultiPartUploadWrapper.test.ts | 1464 +-- .../test/unit/NodeFileData.test.ts | 43 +- .../PublishSinglePartitionRequest.test.ts | 26 +- .../test/unit/StartBatchRequest.test.ts | 26 +- .../test/unit/UploadBlobRequest.test.ts | 26 +- .../test/unit/UploadBlobResult.test.ts | 26 +- .../test/unit/UploadPartitionsRequest.test.ts | 26 +- .../test/unit/VersionedLayerClient.test.ts | 497 +- .../test/unit/WebData.test.ts | 24 +- .../test/unit/stub-instance.ts | 45 + @here/olp-sdk-dataservice-write/tsconfig.json | 1 - @here/olp-sdk-dataservice-write/tslint.json | 163 - .../vitest.config.ts | 20 + .../webpack.config.js | 9 +- @here/olp-sdk-fetch/.prettierrc.json | 3 - @here/olp-sdk-fetch/package.json | 60 +- @here/olp-sdk-fetch/test/Fetch.test.ts | 82 +- @here/olp-sdk-fetch/test/mocha.opts | 8 - @here/olp-sdk-fetch/test/tsconfig.json | 6 +- @here/olp-sdk-fetch/tsconfig.json | 1 - @here/olp-sdk-fetch/tslint.json | 163 - @here/olp-sdk-fetch/vitest.config.ts | 21 + @here/olp-sdk-fetch/webpack.config.js | 9 +- CHANGELOG.md | 9 + README.md | 2 +- docs/GettingStartedGuide.md | 9 +- eslint.config.mjs | 51 + examples/authorization-example/package.json | 6 +- examples/nodejs-example/package.json | 8 +- examples/react-app-example/README.md | 8 +- examples/react-app-example/package.json | 10 +- lerna.json | 8 - package-lock.json | 5093 +++++++++ package.json | 85 +- scripts/linux/psv/build_test_psv.sh | 13 +- scripts/publish-packages.sh | 19 +- scripts/static-server.js | 66 + tests/functional/StreamLayerReadData.test.ts | 547 +- tests/functional/mocha.opts | 9 - .../api-breaks/ArtifactApi.test.ts | 1219 +-- .../api-breaks/ArtifactClient.test.ts | 115 +- .../api-breaks/AuthorizationApi.test.ts | 1628 +-- tests/integration/api-breaks/BlobApi.test.ts | 699 +- .../api-breaks/CatalogClient.test.ts | 307 +- .../api-breaks/CatalogRequest.test.ts | 72 +- .../api-breaks/CatalogVersionRequest.test.ts | 144 +- .../api-breaks/CatalogsRequest.test.ts | 106 +- .../integration/api-breaks/ConfigApi.test.ts | 869 +- .../api-breaks/ConfigClient.test.ts | 87 +- .../api-breaks/CoverageApi.test.ts | 425 +- .../api-breaks/DataRequest.test.ts | 174 +- .../integration/api-breaks/HttpError.test.ts | 47 +- .../api-breaks/HttpErrorAuth.test.ts | 47 +- tests/integration/api-breaks/IndexApi.test.ts | 303 +- .../api-breaks/IndexLayerClient.test.ts | 366 +- .../api-breaks/IndexQueryRequest.test.ts | 116 +- .../api-breaks/KeyValueCache.test.ts | 75 +- .../api-breaks/LayerVersionsRequest.test.ts | 110 +- .../integration/api-breaks/LookupApi.test.ts | 250 +- .../api-breaks/MetadataApi.test.ts | 803 +- .../api-breaks/PartitionsRequest.test.ts | 200 +- .../api-breaks/PollRequest.test.ts | 106 +- .../QuadKeyPartitionsRequest.test.ts | 266 +- .../api-breaks/QuadTreeIndexRequest.test.ts | 372 +- tests/integration/api-breaks/QueryApi.test.ts | 543 +- .../api-breaks/QueryClient.test.ts | 199 +- .../api-breaks/SchemaDetailsRequest.test.ts | 110 +- .../api-breaks/SchemaRequest.test.ts | 122 +- .../api-breaks/SeekRequest.test.ts | 172 +- .../api-breaks/StatisticsClient.test.ts | 139 +- .../api-breaks/StatisticsRequest.test.ts | 286 +- .../integration/api-breaks/StreamApi.test.ts | 833 +- .../api-breaks/StreamLayerClient.test.ts | 503 +- .../api-breaks/SubscribeRequest.test.ts | 204 +- .../api-breaks/SummaryRequest.test.ts | 113 +- .../api-breaks/UnsubscribeRequest.test.ts | 106 +- tests/integration/api-breaks/UserAuth.test.ts | 380 +- .../api-breaks/VersionedLayerClient.test.ts | 395 +- .../VersionedLayerClientWrite.test.ts | 213 +- .../api-breaks/VolatileBlob.test.ts | 321 +- .../api-breaks/VolatileLayerClient.test.ts | 393 +- tests/integration/api-breaks/mocha.opts | 8 - .../bundles/umd/olp-sdk-generated.test.ts | 109 +- .../bundles/umd/olp-sdk-published.test.ts | 107 +- tests/integration/mocha.opts | 8 - .../ArtifactClient.test.ts | 515 +- .../CatalogClient.test.ts | 1133 +- .../ConfigClient.test.ts | 250 +- .../Handling-versions.test.ts | 1656 +-- .../IndexLayerClient.test.ts | 469 +- .../Metadata-api.test.ts | 207 +- .../StatisticsClient.test.ts | 558 +- .../StreamLayerClient.test.ts | 1103 +- .../VersionedLayerClient.test.ts | 2297 ++-- .../VolatileLayerClient.test.ts | 1619 +-- .../olp-sdk-dataservice-read/getTile.test.ts | 250 +- .../MultiPartUploadWrapper.test.ts | 419 +- .../VersionedLayer.test.ts | 190 +- tsconfig.json | 15 +- vitest.api-breaks.config.ts | 9 + vitest.bundles-generated.config.ts | 10 + vitest.bundles-published.config.ts | 10 + vitest.functional.config.ts | 14 + vitest.integration.config.ts | 9 + vitest.shared.ts | 41 + yarn.lock | 9448 ----------------- 257 files changed, 24014 insertions(+), 27458 deletions(-) create mode 100644 .husky/pre-commit create mode 100644 .nvmrc create mode 100644 .prettierrc.json delete mode 100644 @here/olp-sdk-authentication/.prettierrc.json create mode 100644 @here/olp-sdk-authentication/lib/buildErrorMessage.ts delete mode 100644 @here/olp-sdk-authentication/test/mocha.opts create mode 100644 @here/olp-sdk-authentication/test/test-credentials-comments.properties delete mode 100644 @here/olp-sdk-authentication/tslint.json create mode 100644 @here/olp-sdk-authentication/vitest.config.ts delete mode 100644 @here/olp-sdk-core/.prettierrc.json delete mode 100644 @here/olp-sdk-core/test/mocha.opts delete mode 100644 @here/olp-sdk-core/tslint.json create mode 100644 @here/olp-sdk-core/vitest.config.ts delete mode 100644 @here/olp-sdk-dataservice-api/.prettierrc.json delete mode 100644 @here/olp-sdk-dataservice-api/test/mocha.opts delete mode 100644 @here/olp-sdk-dataservice-api/tslint.json create mode 100644 @here/olp-sdk-dataservice-api/vitest.config.ts delete mode 100644 @here/olp-sdk-dataservice-read/.prettierrc.json delete mode 100644 @here/olp-sdk-dataservice-read/test/mocha.opts create mode 100644 @here/olp-sdk-dataservice-read/test/unit/stub-instance.ts delete mode 100644 @here/olp-sdk-dataservice-read/tslint.json create mode 100644 @here/olp-sdk-dataservice-read/vitest.config.ts delete mode 100644 @here/olp-sdk-dataservice-write/.prettierrc.json delete mode 100644 @here/olp-sdk-dataservice-write/test/mocha.opts create mode 100644 @here/olp-sdk-dataservice-write/test/unit/stub-instance.ts delete mode 100644 @here/olp-sdk-dataservice-write/tslint.json create mode 100644 @here/olp-sdk-dataservice-write/vitest.config.ts delete mode 100644 @here/olp-sdk-fetch/.prettierrc.json delete mode 100644 @here/olp-sdk-fetch/test/mocha.opts delete mode 100644 @here/olp-sdk-fetch/tslint.json create mode 100644 @here/olp-sdk-fetch/vitest.config.ts create mode 100644 eslint.config.mjs delete mode 100644 lerna.json create mode 100644 package-lock.json create mode 100644 scripts/static-server.js delete mode 100644 tests/functional/mocha.opts delete mode 100644 tests/integration/api-breaks/mocha.opts delete mode 100644 tests/integration/mocha.opts create mode 100644 vitest.api-breaks.config.ts create mode 100644 vitest.bundles-generated.config.ts create mode 100644 vitest.bundles-published.config.ts create mode 100644 vitest.functional.config.ts create mode 100644 vitest.integration.config.ts create mode 100644 vitest.shared.ts delete mode 100644 yarn.lock diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2fa1a0c..696d4ddd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,16 +13,23 @@ jobs: name: PSV / Linux Build / Tests / Code coverage runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Use Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: - node-version: 18 + node-version: 24 cache: npm + # MockServer, which backs the functional tests, ships Java 17 bytecode. + # The runner defaults to Java 11, so pin the version the jar needs. + - name: Use Java + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: 17 - name: Build / Tests / Coverage run: scripts/linux/psv/build_test_psv.sh - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v7 with: fail_ci_if_error: true # optional (default = false) verbose: true # optional (default = false) @@ -33,7 +40,7 @@ jobs: name: PSV.Commit.Checker runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: fetch-depth: 0 - name: Commit checker script. Verify commit text diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0e535fe3..ae941a3a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,12 +26,19 @@ jobs: echo "Package to deploy: $PACKAGE_NAME" env: PACKAGE_NAME: ${{ inputs.chooseDeploy }} - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Use Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: - node-version: '18' + node-version: '24' cache: npm + # MockServer, which backs the functional tests, ships Java 17 bytecode. + # The runner defaults to Java 11, so pin the version the jar needs. + - name: Use Java + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: '17' - name: Build / Tests run: scripts/linux/psv/build_test_psv.sh && env - name: Deploy to NPM diff --git a/.gitignore b/.gitignore index 6fa8262e..5a978dcc 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ coverage xunit.xml *.js !webpack.config.js +!scripts/static-server.js *.d.ts *.js.map app.ts @@ -22,6 +23,7 @@ heaptrack/ heaptrack_report.html !tests/utils/mocked-olp-server/*.js CertificateAuthorityCertificate.pem +mockserver-ca.pem demo-app build .DS_Store diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 00000000..2312dc58 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..18c92ea9 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v24 \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..bdf18c21 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,4 @@ +{ + "tabWidth": 4, + "trailingComma": "none" +} diff --git a/@here/olp-sdk-authentication/.prettierrc.json b/@here/olp-sdk-authentication/.prettierrc.json deleted file mode 100644 index ab28f3ed..00000000 --- a/@here/olp-sdk-authentication/.prettierrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "tabWidth": 4 -} \ No newline at end of file diff --git a/@here/olp-sdk-authentication/lib/UserAuth.ts b/@here/olp-sdk-authentication/lib/UserAuth.ts index ea58ee4c..67ffdf70 100644 --- a/@here/olp-sdk-authentication/lib/UserAuth.ts +++ b/@here/olp-sdk-authentication/lib/UserAuth.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ */ import { HttpError, SENT_WITH_PARAM } from "@here/olp-sdk-core"; +import { buildErrorMessage } from "./buildErrorMessage"; import { OAuthArgs, Token } from "./requestToken_common"; /** @@ -213,15 +214,13 @@ export class UserAuth { ); } - const response = await this.config - .tokenRequester({ - url: this.config.customUrl || this.m_apiUrl + "oauth2/token", - consumerKey: this.m_credentials.accessKeyId, - secretKey: this.m_credentials.accessKeySecret, - scope: this.m_scope, - expiresIn: this.m_expiresIn - }) - .catch(err => Promise.reject(err)); + const response = await this.config.tokenRequester({ + url: this.config.customUrl || this.m_apiUrl + "oauth2/token", + consumerKey: this.m_credentials.accessKeyId, + secretKey: this.m_credentials.accessKeySecret, + scope: this.m_scope, + expiresIn: this.m_expiresIn + }); if (response.accessToken) { this.m_accessToken = response.accessToken; @@ -265,7 +264,7 @@ export class UserAuth { if (!request.ok) { return Promise.reject( - new HttpError(request.status, request.statusText) + new HttpError(request.status, await buildErrorMessage(request)) ); } @@ -296,7 +295,9 @@ export class UserAuth { return Promise.reject( new HttpError( request.status, - `Error fetching user info: ${request.statusText}` + `Error fetching user info: ${await buildErrorMessage( + request + )}` ) ); } diff --git a/@here/olp-sdk-authentication/lib/buildErrorMessage.ts b/@here/olp-sdk-authentication/lib/buildErrorMessage.ts new file mode 100644 index 00000000..26f8771c --- /dev/null +++ b/@here/olp-sdk-authentication/lib/buildErrorMessage.ts @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2026 HERE Europe B.V. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * License-Filename: LICENSE + */ + +/** + * Builds the description of a failed authentication request. + * + * The response body carries the `correlationId` and the error description + * reported by the platform. Both are needed to investigate a failure, so the + * body is appended to the status text. `statusText` is empty over HTTP/2, in + * which case the body becomes the whole message. + * + * @param response The failed response. + * @return The human-readable description of the failure. + */ +export async function buildErrorMessage(response: Response): Promise { + // A body that cannot be read must not mask the HTTP error itself. + const rawBody = + typeof response.text === "function" + ? await response.text().catch(() => "") + : ""; + const body = rawBody.trim(); + + if (body.length === 0) { + return response.statusText; + } + + return response.statusText.length > 0 + ? `${response.statusText} | Info: ${body}` + : body; +} diff --git a/@here/olp-sdk-authentication/lib/loadCredentialsFromFile.ts b/@here/olp-sdk-authentication/lib/loadCredentialsFromFile.ts index ec2b6239..753ec95c 100644 --- a/@here/olp-sdk-authentication/lib/loadCredentialsFromFile.ts +++ b/@here/olp-sdk-authentication/lib/loadCredentialsFromFile.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,49 @@ * License-Filename: LICENSE */ -import * as PropertiesReader from "properties-reader"; +import * as fs from "fs"; import { AuthCredentials } from "./UserAuth"; +/** + * Reads the `key = value` pairs of a **.properties** file. + * + * Only the subset of the format that the HERE platform emits is recognized: + * one pair per line, blank lines, and `#` or `!` comments. The value is + * everything after the first `=` or `:`, so values that themselves contain a + * separator (for example base64 padding in a secret) are kept intact. + * + * @param path The path to the file to read. + * @return The parsed properties, keyed by property name. + */ +function readProperties(path: string): Map { + const properties = new Map(); + + for (const line of fs.readFileSync(path, "utf8").split(/\r?\n/)) { + const entry = line.trim(); + + if ( + entry.length === 0 || + entry.startsWith("#") || + entry.startsWith("!") + ) { + continue; + } + + const separator = entry.search(/[=:]/); + + if (separator === -1) { + continue; + } + + properties.set( + entry.slice(0, separator).trim(), + entry.slice(separator + 1).trim() + ); + } + + return properties; +} + /** * Parses the **credentials.properties** file from the * [HERE platform](https://developer.here.com/documentation/access-control/user-guide/topics/get-credentials.html) @@ -30,21 +70,21 @@ import { AuthCredentials } from "./UserAuth"; * @return The object with the access key ID and access key secret. */ export function loadCredentialsFromFile(path: string): AuthCredentials { - const config = PropertiesReader(path); + const config = readProperties(path); const configAccessKeyIdValueName = "here.access.key.id"; const configAccessKeySecretValueName = "here.access.key.secret"; const parseValueFromConfig = ( - value: string | number | boolean | null, + value: string | undefined, valueName: string ): string => { - if (!value) { + if (value === undefined || value.length === 0) { throw new Error( `Error parsing value ${valueName} from configuration` ); } - return value.toString(); + return value; }; return { diff --git a/@here/olp-sdk-authentication/lib/requestToken_common.ts b/@here/olp-sdk-authentication/lib/requestToken_common.ts index 7b0d11be..2ba99e19 100644 --- a/@here/olp-sdk-authentication/lib/requestToken_common.ts +++ b/@here/olp-sdk-authentication/lib/requestToken_common.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ import { HttpError, SENT_WITH_PARAM } from "@here/olp-sdk-core"; +import { buildErrorMessage } from "./buildErrorMessage"; /** * Platform-specific parts of signing a request using HMAC algorithms. @@ -97,7 +98,7 @@ async function signLatin1( function generateUid(randomValues: Uint8Array): string { const pad2 = (str: string) => (str.length === 1 ? "0" + str : str); return randomValues.reduce( - (result, byte) => (result += pad2(byte.toString(UID_SIZE))), + (result, byte) => result + pad2(byte.toString(UID_SIZE)), "" ); } @@ -175,7 +176,7 @@ export async function requestToken_common( if (!request.ok) { return Promise.reject( - new HttpError(request.status, request.statusText) + new HttpError(request.status, await buildErrorMessage(request)) ); } diff --git a/@here/olp-sdk-authentication/package.json b/@here/olp-sdk-authentication/package.json index 3132e900..a3a6833b 100644 --- a/@here/olp-sdk-authentication/package.json +++ b/@here/olp-sdk-authentication/package.json @@ -1,6 +1,6 @@ { "name": "@here/olp-sdk-authentication", - "version": "2.0.0", + "version": "3.0.0", "description": "Wrapper around the HERE Authentication and Authorization REST API obtaining short-lived access tokens that are used to authenticate requests to HERE services.", "main": "index.js", "browser": "index.web.js", @@ -12,32 +12,13 @@ }, "scripts": { "build": "tsc", - "lint": "tslint -c tslint.json -p tsconfig.json", - "test": "tsc -p ./test/tsconfig.json && mocha", - "coverage": "nyc npm run test", - "codecov": "npm run coverage && nyc report --reporter=lcov", - "prepare": "tsc --sourceMap false && npm run bundle", + "lint": "eslint .", + "test": "vitest run", + "coverage": "vitest run --coverage", + "prepack": "tsc --sourceMap false && npm run bundle", "bundle": "npm run bundle:dev && npm run bundle:prod", - "bundle:prod": "webpack --env.NODE_ENV=production", - "bundle:dev": "webpack --env.NODE_ENV=development" - }, - "nyc": { - "include": [ - "lib/**/*.ts", - "lib/**/*.js" - ], - "extension": [ - ".ts" - ], - "require": [ - "ts-node/register" - ], - "reporter": [ - "text", - "html" - ], - "sourceMap": true, - "instrument": true + "bundle:prod": "webpack --env NODE_ENV=production", + "bundle:dev": "webpack --env NODE_ENV=development" }, "repository": { "type": "git", @@ -49,38 +30,10 @@ }, "license": "Apache-2.0", "dependencies": { - "@here/olp-sdk-core": "^2.0.0", - "@here/olp-sdk-fetch": "^2.0.0", - "properties-reader": "2.3.0" - }, - "devDependencies": { - "@types/properties-reader": "^2.1.3", - "@types/chai": "^4.2.7", - "@types/fetch-mock": "^7.3.2", - "@types/mocha": "^5.2.7", - "@types/node": "18.7.14", - "@types/sinon-chai": "^3.2.3", - "@types/sinon": "7.0.3", - "chai": "^4.2.0", - "fetch-mock": "^9.11.0", - "husky": "^3.1.0", - "lint-staged": "^9.5.0", - "mocha": "^6.2.2", - "nyc": "^15.0.0", - "prettier": "^1.19.1", - "sinon-chai": "^3.4.0", - "sinon": "7.4.2", - "source-map-support": "^0.5.16", - "ts-node": "10.9.2", - "tslint": "^6.1.3", - "tslint-config-prettier": "^1.18.0", - "typedoc": "^0.22.13", - "typescript": "4.0.3", - "webpack": "^4.46.0", - "webpack-cli": "^3.3.10", - "terser-webpack-plugin": "^1.4.5" + "@here/olp-sdk-core": "^3.0.0", + "@here/olp-sdk-fetch": "^3.0.0" }, "engines": { - "node": ">= 18.0.0" + "node": ">= 24.0.0" } } diff --git a/@here/olp-sdk-authentication/test/OAuth.test.ts b/@here/olp-sdk-authentication/test/OAuth.test.ts index d8c7c167..d9f99869 100644 --- a/@here/olp-sdk-authentication/test/OAuth.test.ts +++ b/@here/olp-sdk-authentication/test/OAuth.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,30 +17,36 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { requestToken, Token, UserAuth } from "../index"; -import * as crypto from "crypto"; import { HttpError, SENT_WITH_PARAM } from "@here/olp-sdk-core"; -import fetchMock = require("fetch-mock"); +import fetchMock from "fetch-mock"; +import { buildErrorMessage } from "../lib/buildErrorMessage"; import { loadCredentialsFromFile } from "../lib/loadCredentialsFromFile"; import { OAuthArgs } from "../lib/requestToken_common"; -import { TokenRequesterFn } from "../lib/UserAuth"; +import { TokenRequesterFn, UserAuthConfig } from "../lib/UserAuth"; const REPLY_TIMEOUT_MS = 600; const MOCK_CREATED_TIME = 1550777140; const MOCK_UPDATED_TIME = 1550777141; -const assert = chai.assert; -const expect = chai.expect; - -describe("oauth-request", function() { +describe("oauth-request", function () { // requires CONSUMER_KEY and SECRET_KEY env variables, disabled by default - xit("requestTokenOnline", async function() { + it.skip("requestTokenOnline", async function () { let consumerKey = ""; let secretKey = ""; - assert.doesNotThrow(function() { + assert.doesNotThrow(function () { consumerKey = process.env.CONSUMER_KEY as string; secretKey = process.env.SECRET_KEY as string; }); @@ -61,19 +67,15 @@ describe("oauth-request", function() { }); }); -describe("oauth-request-offline", function() { - let sandbox: sinon.SinonSandbox; - - before(function() { - sandbox = sinon.createSandbox(); - }); +describe("oauth-request-offline", function () { + beforeAll(function () {}); const mock_token = "eyJhbGciOiJSUzUxMiIsImN0eSI6IkpXVCIsIm"; const mock_id = "mock-id"; const mock_scrt = "mock-str"; - beforeEach(function() { - fetchMock.config.overwriteRoutes = true; + beforeEach(function () { + fetchMock.mockGlobal(); fetchMock.post( "https://account.api.here.com/oauth2/token?" + SENT_WITH_PARAM, { @@ -84,18 +86,17 @@ describe("oauth-request-offline", function() { ); }); - afterEach(function() { - fetchMock.reset(); - sandbox.restore(); + afterEach(function () { + fetchMock.hardReset(); + vi.restoreAllMocks(); }); // tslint:disable-next-line: only-arrow-functions - it("SHA-256 to sign token requests", async function() { - const mockedOauthSignature = "mocked_oauth_signature"; - sandbox.stub(crypto, "createHmac").returns(({ - update: sandbox.stub(), - digest: sandbox.stub().returns(mockedOauthSignature) - } as unknown) as crypto.Hmac); + it("SHA-256 to sign token requests", async function () { + // The HMAC-SHA256 signature is deterministic for the fixed inputs below, + // so the real crypto implementation is exercised and asserted directly. + const expectedOauthSignature = + "Lwmma%2FFvEsjg5FnCB6KosgD46mD%2FnZiy4fIBEwLHy0s%3D"; const result = await requestToken({ consumerKey: "mocked-key", @@ -106,13 +107,14 @@ describe("oauth-request-offline", function() { timestamp: MOCK_CREATED_TIME }); - const options: RequestInit & any = fetchMock.calls()[0][1]; + const options: RequestInit & any = + fetchMock.callHistory.calls()[0].args[1]; expect(options.headers.get("Authorization")).to.be.equal( - `OAuth oauth_consumer_key="mocked-key",oauth_nonce="mocked-nonce",oauth_signature_method="HMAC-SHA256",oauth_timestamp="1550777140",oauth_version="1.0",oauth_signature="${mockedOauthSignature}"` + `OAuth oauth_consumer_key="mocked-key",oauth_nonce="mocked-nonce",oauth_signature_method="HMAC-SHA256",oauth_timestamp="1550777140",oauth_version="1.0",oauth_signature="${expectedOauthSignature}"` ); }); - it("requestToken", async function() { + it("requestToken", async function () { const consumerKey = "key"; const secretKey = "secret"; @@ -127,7 +129,7 @@ describe("oauth-request-offline", function() { assert.isNotEmpty(reply.accessToken); }); - it("getTokenAuthModeFile", async function() { + it("getTokenAuthModeFile", async function () { let token: string | null = null; const credentialsFilePath = "./test/test-credentials.properties"; const credentials = loadCredentialsFromFile(credentialsFilePath); @@ -147,7 +149,7 @@ describe("oauth-request-offline", function() { } }); - it("getTokenAuthModeForm", async function() { + it("getTokenAuthModeForm", async function () { let token: string | null = null; const userAuth = new UserAuth({ @@ -168,7 +170,7 @@ describe("oauth-request-offline", function() { } }); - it("validateAccessToken", async function() { + it("validateAccessToken", async function () { const userAuth = new UserAuth({ credentials: { accessKeyId: mock_id, @@ -195,7 +197,7 @@ describe("oauth-request-offline", function() { } }); - it("validateAccessTokenFalse", async function() { + it("validateAccessTokenFalse", async function () { const userAuth = new UserAuth({ credentials: { accessKeyId: mock_id, @@ -213,14 +215,50 @@ describe("oauth-request-offline", function() { responseStatus ); - await userAuth.validateAccessToken(mock_token).catch(err => { + await userAuth.validateAccessToken(mock_token).catch((err) => { assert.isTrue(err instanceof HttpError); assert.equal(err.status, responseStatus); assert.equal(err.message, responseText); }); }); - it("getAccessTokenFalse", async function() { + it("validateAccessTokenForwardsErrorBody", async function () { + const userAuth = new UserAuth({ + credentials: { + accessKeyId: mock_id, + accessKeySecret: mock_scrt + }, + tokenRequester: requestToken + }); + + const responseStatus = 401; + const errorBody = { + errorId: "ERROR-2c9a1f7e-4d8b-4a6c-8f2e-7b1c3d5e9a04", + httpStatus: responseStatus, + errorCode: 401204, + message: "Token is expired.", + correlationId: "1d2e3f40-5a6b-4c7d-8e9f-0a1b2c3d4e5f" + }; + + fetchMock.post( + "https://account.api.here.com/verify/accessToken?" + + SENT_WITH_PARAM, + { + status: responseStatus, + body: errorBody + } + ); + + await expect( + userAuth.validateAccessToken(mock_token) + ).rejects.toMatchObject({ + name: "HttpError", + status: responseStatus, + message: `Unauthorized | Info: ${JSON.stringify(errorBody)}` + }); + }); + + it("getAccessTokenFalse", async function () { const userAuth = new UserAuth({ credentials: { accessKeyId: mock_id, @@ -232,26 +270,93 @@ describe("oauth-request-offline", function() { const responseStatus = 401; const responseText = "Unauthorized"; + // The token route registered in `beforeEach` has to be dropped first: + // fetch-mock matches the first registered route, so the failing + // response below would otherwise never be used. + fetchMock.removeRoutes(); fetchMock.post( "https://account.api.here.com/oauth2/token?" + SENT_WITH_PARAM, responseStatus ); - await userAuth.getToken().catch(err => { + await userAuth.getToken().catch((err) => { assert.isTrue(err instanceof HttpError); assert.equal(err.status, responseStatus); assert.equal(err.message, responseText); }); }); + + it("getAccessTokenForwardsErrorBody", async function () { + const responseStatus = 401; + const errorBody = { + errorId: "ERROR-b6f4ff4f-27f7-4a1b-9a25-2b0d0e9a6f18", + httpStatus: responseStatus, + errorCode: 401300, + message: "Signature mismatch.", + correlationId: "8f14e45f-ceea-467a-9575-6f6c1e0d3b21" + }; + + // The token route registered in `beforeEach` has to be dropped first: + // fetch-mock matches the first registered route, so the failing + // response below would otherwise never be used. + fetchMock.removeRoutes(); + fetchMock.post( + "https://account.api.here.com/oauth2/token?" + SENT_WITH_PARAM, + { + status: responseStatus, + body: errorBody + } + ); + + await expect( + requestToken({ + url: "https://account.api.here.com/oauth2/token", + consumerKey: mock_id, + secretKey: mock_scrt + }) + ).rejects.toMatchObject({ + name: "HttpError", + status: responseStatus, + // The platform reports the reason of the failure only in the body, + // so both the correlation ID and the description have to survive. + message: `Unauthorized | Info: ${JSON.stringify(errorBody)}` + }); + }); + + it("getAccessTokenKeepsStatusTextWhenBodyIsUnreadable", async function () { + const responseStatus = 401; + + fetchMock.removeRoutes(); + fetchMock.post( + "https://account.api.here.com/oauth2/token?" + SENT_WITH_PARAM, + responseStatus + ); + + vi.spyOn(Response.prototype, "text").mockRejectedValue( + new Error("Stream is already read") + ); + + await expect( + requestToken({ + url: "https://account.api.here.com/oauth2/token", + consumerKey: mock_id, + secretKey: mock_scrt + }) + ).rejects.toMatchObject({ + name: "HttpError", + status: responseStatus, + message: "Unauthorized" + }); + }); }); -describe("oauth-request-lookupapi", function() { +describe("oauth-request-lookupapi", function () { const mock_token = "eyJhbGciOiJSUzUxMiIsImN0eSI6IkpXVCIsIm"; const mock_id = "mock-id"; const mock_scrt = "mock-str"; - beforeEach(function() { - fetchMock.config.overwriteRoutes = true; + beforeEach(function () { + fetchMock.mockGlobal(); fetchMock.post( "https://account.api.here.com/oauth2/token?" + SENT_WITH_PARAM, { @@ -262,11 +367,11 @@ describe("oauth-request-lookupapi", function() { ); }); - afterEach(function() { - fetchMock.reset(); + afterEach(function () { + fetchMock.hardReset(); }); - it("getUserInfo-ProdEnv", async function() { + it("getUserInfo-ProdEnv", async function () { const userAuth = new UserAuth({ env: "here", credentials: { @@ -316,7 +421,7 @@ describe("oauth-request-lookupapi", function() { } }); - it("getUserInfo-DevEnv", async function() { + it("getUserInfo-DevEnv", async function () { const userAuth = new UserAuth({ env: "here-dev", credentials: { @@ -366,7 +471,7 @@ describe("oauth-request-lookupapi", function() { } }); - it("getUserInfo-CnEnv", async function() { + it("getUserInfo-CnEnv", async function () { const userAuth = new UserAuth({ env: "here-cn", credentials: { @@ -417,7 +522,7 @@ describe("oauth-request-lookupapi", function() { } }); - it("getUserInfo-CnDevEnv", async function() { + it("getUserInfo-CnDevEnv", async function () { const userAuth = new UserAuth({ env: "here-cn-dev", credentials: { @@ -468,7 +573,7 @@ describe("oauth-request-lookupapi", function() { } }); - it("getUserInfo-CustomUrl", async function() { + it("getUserInfo-CustomUrl", async function () { const userAuth = new UserAuth({ customUrl: "http://localhost/", credentials: { @@ -515,7 +620,7 @@ describe("oauth-request-lookupapi", function() { } }); - it("getUserInfo-default", async function() { + it("getUserInfo-default", async function () { const userAuth = new UserAuth({ credentials: { accessKeyId: mock_id, @@ -563,9 +668,45 @@ describe("oauth-request-lookupapi", function() { assert.fail(); } }); + + it("getUserInfoForwardsErrorBody", async function () { + const userAuth = new UserAuth({ + credentials: { + accessKeyId: mock_id, + accessKeySecret: mock_scrt + }, + tokenRequester: requestToken + }); + + const responseStatus = 403; + const errorBody = { + errorId: "ERROR-7e5b0c1a-93d4-4f8a-b2c6-0e1f4a7d8b93", + httpStatus: responseStatus, + errorCode: 403000, + message: "Insufficient rights to read the user profile.", + correlationId: "aa11bb22-cc33-4d44-8e55-66ff77008899" + }; + + fetchMock.get( + "https://account.api.here.com/user/me?" + SENT_WITH_PARAM, + { + status: responseStatus, + body: errorBody + } + ); + + await expect(userAuth.getUserInfo(mock_token)).rejects.toMatchObject({ + name: "HttpError", + status: responseStatus, + // The existing prefix has to stay in front of the forwarded body. + message: `Error fetching user info: Forbidden | Info: ${JSON.stringify( + errorBody + )}` + }); + }); }); -describe("auth-request-project-scope", function() { +describe("auth-request-project-scope", function () { let token: string | null = null; const mockedScope = "mocked-scope"; const mock_id = "mock-id"; @@ -580,7 +721,7 @@ describe("auth-request-project-scope", function() { return Promise.resolve(mockedToken); }; - it("Should scope be present on userAuth", async function() { + it("Should scope be present on userAuth", async function () { const userAuth = new UserAuth({ env: "here-dev", credentials: { @@ -601,7 +742,7 @@ describe("auth-request-project-scope", function() { } }); - it("Should customUrl be present in getToken request", async function() { + it("Should customUrl be present in getToken request", async function () { const mockedUrl = "https://example.com/my/custom/url"; const mockedTokenRequest = async (params: any): Promise => { assert.strictEqual(params.url, mockedUrl); @@ -629,9 +770,9 @@ describe("auth-request-project-scope", function() { }); }); -describe("expired token refreshing", async function() { +describe("expired token refreshing", async function () { let mockedTokenRequester: TokenRequesterFn; - beforeEach(function() { + beforeEach(function () { const defaultTokenExpirationTime = 3600; mockedTokenRequester = async (params: OAuthArgs): Promise => { const expirationDate = new Date(); @@ -649,7 +790,7 @@ describe("expired token refreshing", async function() { }; }); - it("Should getToken return the same token for two requests in row", async function() { + it("Should getToken return the same token for two requests in row", async function () { const userAuth = new UserAuth({ env: "here", tokenRequester: mockedTokenRequester, @@ -667,11 +808,22 @@ describe("expired token refreshing", async function() { expect(token1).to.be.equal(token2); }); - it("Should getToken return the different tokens for two requests with delay", async function() { + it("Should getToken return the different tokens for two requests with delay", async function () { const userProvidedTokenExpirationTime = 10; + const millisecondsInSecond = 1000; + let issued = 0; + const countingTokenRequester = async (): Promise => { + issued += 1; + return Promise.resolve({ + accessToken: `token-${issued}`, + expiresIn: userProvidedTokenExpirationTime, + tokenType: "fake" + }); + }; + const userAuth = new UserAuth({ env: "here", - tokenRequester: mockedTokenRequester, + tokenRequester: countingTokenRequester, credentials: { accessKeyId: "appId", accessKeySecret: "keyScrt" @@ -679,15 +831,97 @@ describe("expired token refreshing", async function() { expiresIn: userProvidedTokenExpirationTime }); - const token1 = await userAuth.getToken(); - - setTimeout(async function() { + // The cached token is kept until its expiration date passes, so the + // clock has to move for the second call to reach the requester. + vi.useFakeTimers(); + try { + const token1 = await userAuth.getToken(); + vi.advanceTimersByTime( + (userProvidedTokenExpirationTime + 1) * millisecondsInSecond + ); const token2 = await userAuth.getToken(); - assert.isDefined(token1); - assert.isDefined(token2); - expect(token1).to.be.not.equal(token2); - // tslint:disable-next-line: no-magic-numbers - }, 15000); + expect(token1).to.be.equal("token-1"); + expect(token2).to.be.equal("token-2"); + } finally { + vi.useRealTimers(); + } + }); +}); + +describe("auth-credentials-errors", function () { + const mockedTokenRequester = async (): Promise => + Promise.resolve({ + accessToken: "fake-access-token", + expiresIn: 42, + tokenType: "fake" + }); + + it("Should throw when constructed without credentials", function () { + expect( + () => + new UserAuth({ + env: "here", + tokenRequester: mockedTokenRequester + } as UserAuthConfig) + ).toThrow( + "The credentials has not been added, please add credentials!" + ); + }); + + it("Should reject getToken when the access key secret is missing", async function () { + const userAuth = new UserAuth({ + env: "here", + tokenRequester: mockedTokenRequester, + credentials: { + accessKeyId: "appId" + } + }); + + await expect(userAuth.getToken()).rejects.toBe( + "Error getting token. The credentials has not been added!" + ); + }); + + it("Should reject getToken with the response that carries no token", async function () { + const emptyResponse: Token = { + accessToken: "", + expiresIn: 42, + tokenType: "fake" + }; + + const userAuth = new UserAuth({ + env: "here", + tokenRequester: async () => Promise.resolve(emptyResponse), + credentials: { + accessKeyId: "appId", + accessKeySecret: "keyScrt" + } + }); + + // The whole response is handed over, since it is the only place that + // can explain why the platform issued no token. + await expect(userAuth.getToken()).rejects.toBe(emptyResponse); + }); +}); + +describe("buildErrorMessage", function () { + it("Should return the body alone when there is no status text", async function () { + const message = await buildErrorMessage({ + statusText: "", + text: async () => `{"errorCode":401300}` + } as unknown as Response); + + expect(message).to.be.equal(`{"errorCode":401300}`); + }); + + it("Should return the status text when the response cannot be read", async function () { + // Not every Response like object carries a body reader, for example + // the ones the SDK builds itself to report a cache miss. + const message = await buildErrorMessage({ + statusText: "Unauthorized" + } as unknown as Response); + + expect(message).to.be.equal("Unauthorized"); }); }); diff --git a/@here/olp-sdk-authentication/test/loadCredentialsFromFile.test.ts b/@here/olp-sdk-authentication/test/loadCredentialsFromFile.test.ts index 8d89aaa4..ec628f2c 100644 --- a/@here/olp-sdk-authentication/test/loadCredentialsFromFile.test.ts +++ b/@here/olp-sdk-authentication/test/loadCredentialsFromFile.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,11 +17,21 @@ * License-Filename: LICENSE */ -import { assert } from "chai"; +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { loadCredentialsFromFile } from "../lib/loadCredentialsFromFile"; -describe("loadCredentialsFromFile", function() { - it("should return correct AuthCredentials", function() { +describe("loadCredentialsFromFile", function () { + it("should return correct AuthCredentials", function () { const credentials = loadCredentialsFromFile( "./test/test-credentials.properties" ); @@ -33,14 +43,22 @@ describe("loadCredentialsFromFile", function() { ); }); - it("should throw an error", function() { - try { - loadCredentialsFromFile("./test/test-error-credentials.properties"); - } catch (error) { - assert.strictEqual( - error.message, - "Error parsing value here.access.key.id from configuration" - ); - } + it("should skip what is not a pair and keep separators inside a value", function () { + // The fixture also holds a line without any separator, which is not a + // property and must not stop the rest of the file from being read. + const credentials = loadCredentialsFromFile( + "./test/test-credentials-comments.properties" + ); + + assert.strictEqual(credentials.accessKeyId, "Tt7wZRTAar"); + // Only the first `=` separates the key from the value, so the base64 + // padding of the secret has to survive parsing. + assert.strictEqual(credentials.accessKeySecret, "abc123/xyz+=="); + }); + + it("should throw an error", function () { + expect(() => + loadCredentialsFromFile("./test/test-error-credentials.properties") + ).toThrow("Error parsing value here.access.key.id from configuration"); }); }); diff --git a/@here/olp-sdk-authentication/test/mocha.opts b/@here/olp-sdk-authentication/test/mocha.opts deleted file mode 100644 index a38909c5..00000000 --- a/@here/olp-sdk-authentication/test/mocha.opts +++ /dev/null @@ -1,8 +0,0 @@ ---require ts-node/register ---require source-map-support/register ---full-trace ---bail ---check-leaks ---reporter xunit ---reporter-option output=xunit.xml -test/**/*.test.ts \ No newline at end of file diff --git a/@here/olp-sdk-authentication/test/requestTokenWeb.test.ts b/@here/olp-sdk-authentication/test/requestTokenWeb.test.ts index c593bfb5..3bf8c342 100644 --- a/@here/olp-sdk-authentication/test/requestTokenWeb.test.ts +++ b/@here/olp-sdk-authentication/test/requestTokenWeb.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,11 +17,21 @@ * License-Filename: LICENSE */ -import { assert } from "chai"; +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { requestToken } from "../index.web"; import { SENT_WITH_PARAM } from "@here/olp-sdk-core/lib"; -import fetchMock = require("fetch-mock"); +import fetchMock from "fetch-mock"; const REPLY_TIMEOUT_MS = 600; @@ -30,22 +40,25 @@ const REPLY_TIMEOUT_MS = 600; * @see ../lib/requestToken.web.ts */ declare var global: any; -global.crypto = { - subtle: { - importKey: () => "mocked-key", - // tslint:disable-next-line: no-magic-numbers - sign: () => Promise.resolve(new ArrayBuffer(162)) - }, - getRandomValues: () => new Uint8Array() -}; +Object.defineProperty(global, "crypto", { + configurable: true, + writable: true, + value: { + subtle: { + importKey: () => "mocked-key", + sign: () => Promise.resolve(new ArrayBuffer(162)) + }, + getRandomValues: () => new Uint8Array() + } +}); global.btoa = () => "mocked-btoa-string"; -describe("oauth-request-offline", function() { +describe("oauth-request-offline", function () { const mock_token = "eyJhbGciOiJSUzUxMiIsImN0eSI6IkpXVCIsIm"; - beforeEach(function() { - fetchMock.config.overwriteRoutes = true; + beforeEach(function () { + fetchMock.mockGlobal(); fetchMock.post( "https://account.api.here.com/oauth2/token?" + SENT_WITH_PARAM, { @@ -56,11 +69,11 @@ describe("oauth-request-offline", function() { ); }); - afterEach(function() { - fetchMock.reset(); + afterEach(function () { + fetchMock.hardReset(); }); - it("requestTokenWeb", async function() { + it("requestTokenWeb", async function () { const consumerKey = "key"; const secretKey = "secret"; @@ -74,4 +87,35 @@ describe("oauth-request-offline", function() { assert.isAbove(reply.expiresIn, REPLY_TIMEOUT_MS); assert.isNotEmpty(reply.accessToken); }); + + it("requestTokenWebInsecureContext", async function () { + const secureCrypto = global.crypto; + // Browsers expose `crypto.subtle` only over https, and the request + // cannot be signed without it. + Object.defineProperty(global, "crypto", { + configurable: true, + writable: true, + value: { + getRandomValues: () => new Uint8Array() + } + }); + + try { + await expect( + requestToken({ + url: "https://account.api.here.com/oauth2/token", + consumerKey: "key", + secretKey: "secret" + }) + ).rejects.toThrow( + "Failed to sign request: 'crypto.subtle' is undefined in insecure contexts." + ); + } finally { + Object.defineProperty(global, "crypto", { + configurable: true, + writable: true, + value: secureCrypto + }); + } + }); }); diff --git a/@here/olp-sdk-authentication/test/test-credentials-comments.properties b/@here/olp-sdk-authentication/test/test-credentials-comments.properties new file mode 100644 index 00000000..abe6a0d0 --- /dev/null +++ b/@here/olp-sdk-authentication/test/test-credentials-comments.properties @@ -0,0 +1,9 @@ +# Generated credentials file, with comments and a padded secret. +! Exclamation marks start a comment too. +a line carrying no separator at all + +here.user.id = test-user-id +here.client.id = test-client-id +here.access.key.id = Tt7wZRTAar +here.access.key.secret = abc123/xyz+== +here.token.endpoint.url = https://account.api.here.com/oauth2/token diff --git a/@here/olp-sdk-authentication/test/tsconfig.json b/@here/olp-sdk-authentication/test/tsconfig.json index 67b930c6..cb5bfb67 100644 --- a/@here/olp-sdk-authentication/test/tsconfig.json +++ b/@here/olp-sdk-authentication/test/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../tsconfig.json", "compilerOptions": { - "importHelpers": true - } + "importHelpers": true, + "noImplicitAny": false + }, + "include": ["../lib/**/*.ts", "../index*.ts", "./**/*.ts"] } diff --git a/@here/olp-sdk-authentication/tsconfig.json b/@here/olp-sdk-authentication/tsconfig.json index 18ddde74..a43bc5c6 100644 --- a/@here/olp-sdk-authentication/tsconfig.json +++ b/@here/olp-sdk-authentication/tsconfig.json @@ -2,7 +2,6 @@ "extends": "../../tsconfig.json", "include": [ "./lib", - "./test", "index.ts", "index.web.ts" ] diff --git a/@here/olp-sdk-authentication/tslint.json b/@here/olp-sdk-authentication/tslint.json deleted file mode 100644 index 176dede1..00000000 --- a/@here/olp-sdk-authentication/tslint.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "extends": ["tslint:recommended", "tslint-config-prettier"], - "rules": { - "interface-name": [true, "never-prefix"], - "object-literal-sort-keys": false, - "max-classes-per-file": false, - "variable-name": [true, "check-format", "allow-leading-underscore", "allow-snake-case"], - - "arrow-return-shorthand": true, - "await-promise": true, - "ban-comma-operator": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "none" - }, - "eofline": true, - "forin": false, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - { - "limit": 140, - "ignore-pattern": - { - "type": "string" - } - } - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-conditional-assignment": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-imports": true, - "no-duplicate-super": true, - "no-duplicate-switch-case": true, - "no-empty": false, - "no-empty-interface": false, - "no-eval": true, - "no-for-in-array": true, - "no-import-side-effect": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-inferred-empty-object-type": false, - "no-internal-module": true, - "no-invalid-template-strings": true, - "no-invalid-this": true, - "no-magic-numbers": [ - true, - -1, 0, 1, 2 - ], - "no-misused-new": true, - "no-namespace": true, - "no-non-null-assertion": false, - "no-parameter-reassignment": false, - "no-reference": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-sparse-arrays": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": false, - "no-unnecessary-initializer": true, - "no-unsafe-finally": true, - "no-unused-expression": false, - "no-var-keyword": true, - "no-var-requires": true, - "no-void-expression": true, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "only-arrow-functions": [ - false, - "allow-declarations", - "allow-named-functions" - ], - "prefer-const": true, - "promise-function-async": true, - "quotemark": [ - true, - "double" - ], - "radix": true, - "restrict-plus-operands": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] - } -} diff --git a/@here/olp-sdk-authentication/vitest.config.ts b/@here/olp-sdk-authentication/vitest.config.ts new file mode 100644 index 00000000..28eddffd --- /dev/null +++ b/@here/olp-sdk-authentication/vitest.config.ts @@ -0,0 +1,25 @@ +import { defineConfig } from "vitest/config"; +import { coverageReporters } from "../../vitest.shared"; + +export default defineConfig({ + resolve: { + // Prefer TypeScript sources over the compiled `.js` that `npm run build` + // leaves next to them. Without this the tests exercise the compiled + // output while `coverage.include` points at `.ts`, so the package + // reports no coverage at all. + extensions: [".ts", ".mjs", ".js", ".mts", ".json"] + }, + test: { + include: ["test/**/*.test.ts"], + environment: "node", + coverage: { + provider: "v8", + include: ["lib/**/*.ts", "index*.ts"], + // The `oauth-requester` command line entry point. It is not + // exported from any index and it runs on import, so it is measured + // as dead library code instead of the executable it is. + exclude: ["lib/tokenRequester.ts"], + reporter: coverageReporters + } + } +}); diff --git a/@here/olp-sdk-authentication/webpack.config.js b/@here/olp-sdk-authentication/webpack.config.js index d801f4f9..80308a2b 100644 --- a/@here/olp-sdk-authentication/webpack.config.js +++ b/@here/olp-sdk-authentication/webpack.config.js @@ -1,26 +1,21 @@ const path = require("path"); -const TerserPlugin = require("terser-webpack-plugin"); module.exports = env => { const isProd = env.NODE_ENV === "production"; return { - mode: env.NODE_ENV, target: "web", + mode: env.NODE_ENV, devtool: isProd ? undefined : "inline-source-map", resolve: { extensions: [".js"] }, entry: "./index.web.js", output: { - filename: `bundle.umd${isProd ? '.min' : '.dev'}.js`, + filename: `bundle.umd${isProd ? ".min" : ".dev"}.js`, path: path.resolve(__dirname), libraryTarget: "umd", - globalObject: 'this' - }, - optimization: { - minimize: true, - minimizer: [new TerserPlugin()], + globalObject: "this" } }; }; diff --git a/@here/olp-sdk-core/.prettierrc.json b/@here/olp-sdk-core/.prettierrc.json deleted file mode 100644 index ab28f3ed..00000000 --- a/@here/olp-sdk-core/.prettierrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "tabWidth": 4 -} \ No newline at end of file diff --git a/@here/olp-sdk-core/README.md b/@here/olp-sdk-core/README.md index 3f6af4dc..3f5690bb 100644 --- a/@here/olp-sdk-core/README.md +++ b/@here/olp-sdk-core/README.md @@ -21,8 +21,8 @@ Here is an overview of the top-level files of the repository: The following NPM packages are required to build/test the library: - - node: >= 10.0.0 - - npm: >= 6.0.0 + - node: >= 24.0.0 + - npm: >= 10.0.0 ### Build @@ -65,6 +65,6 @@ npm run prepublish-bundle ## LICENSE -Copyright (C) 2020-2023 HERE Europe B.V. +Copyright (C) 2020-2026 HERE Europe B.V. For license details, see the [LICENSE](LICENSE). diff --git a/@here/olp-sdk-core/lib/cache/ApiCacheRepository.ts b/@here/olp-sdk-core/lib/cache/ApiCacheRepository.ts index 645a18a7..46a34432 100644 --- a/@here/olp-sdk-core/lib/cache/ApiCacheRepository.ts +++ b/@here/olp-sdk-core/lib/cache/ApiCacheRepository.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,8 @@ * License-Filename: LICENSE */ -import { HRN, KeyValueCache } from "@here/olp-sdk-core"; +import { HRN } from "../utils/HRN"; +import { KeyValueCache } from "./KeyValueCache"; /** * The list of the API endpoints names that the HERE Data SDK for TypeScript uses. @@ -57,7 +58,10 @@ export class ApiCacheRepository { * @param hrn The HERE Resource Name (HRN) for which you want to use the [[ApiCacheRepository]] instance. * @return The [[ApiCacheRepository]] instance. */ - constructor(private readonly cache: KeyValueCache, hrn?: HRN) { + constructor( + private readonly cache: KeyValueCache, + hrn?: HRN + ) { this.hrn = hrn ? hrn.toString() : "platform-api"; } diff --git a/@here/olp-sdk-core/lib/cache/KeyValueCache.ts b/@here/olp-sdk-core/lib/cache/KeyValueCache.ts index 4287875e..303bc7d6 100644 --- a/@here/olp-sdk-core/lib/cache/KeyValueCache.ts +++ b/@here/olp-sdk-core/lib/cache/KeyValueCache.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,8 @@ * License-Filename: LICENSE */ -import { getDataSize, LRUCache } from "@here/olp-sdk-core"; +import { getDataSize } from "../utils/getDataSizeUtil"; +import { LRUCache } from "./LRUCache"; const BYTES_IN_MB = 1024; diff --git a/@here/olp-sdk-core/lib/client/OlpClientSettings.ts b/@here/olp-sdk-core/lib/client/OlpClientSettings.ts index df26a73a..38f79471 100644 --- a/@here/olp-sdk-core/lib/client/OlpClientSettings.ts +++ b/@here/olp-sdk-core/lib/client/OlpClientSettings.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,12 +17,10 @@ * License-Filename: LICENSE */ -import { - DataStoreDownloadManager, - DownloadManager, - EnvironmentName, - KeyValueCache -} from "@here/olp-sdk-core"; +import { KeyValueCache } from "../cache/KeyValueCache"; +import { DataStoreDownloadManager } from "../utils/DataStoreDownloadManager"; +import { DownloadManager } from "../utils/DownloadManager"; +import { EnvironmentName } from "../utils/getEnvLookupUrl"; /** * Parameters used to construct the [[OlpClientSettings]] class. diff --git a/@here/olp-sdk-core/lib/utils/DataStoreDownloadManager.ts b/@here/olp-sdk-core/lib/utils/DataStoreDownloadManager.ts index 2ebf499c..02cb2602 100644 --- a/@here/olp-sdk-core/lib/utils/DataStoreDownloadManager.ts +++ b/@here/olp-sdk-core/lib/utils/DataStoreDownloadManager.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,12 +17,10 @@ * License-Filename: LICENSE */ -import { - addSentWithParam, - DownloadManager, - HttpError, - STATUS_CODES -} from "@here/olp-sdk-core"; +import { DownloadManager } from "./DownloadManager"; +import { HttpError } from "./HttpError"; +import { STATUS_CODES } from "./index"; +import { addSentWithParam } from "./userAgent"; /** @internal * 'DeferredPromise' takes an executor function for executing it later, when [[exec]] is called. @@ -47,9 +45,7 @@ class DeferredPromise { * When `exec` is called the deferred executor function is executed. */ exec() { - this.executor() - .then(this.resolveFunc) - .catch(this.rejectFunc); + this.executor().then(this.resolveFunc).catch(this.rejectFunc); } } @@ -153,7 +149,9 @@ export class DataStoreDownloadManager implements DownloadManager { } private static async waitFor(milliseconds: number): Promise { - return new Promise(resolve => setTimeout(resolve, milliseconds)); + return new Promise((resolve) => + setTimeout(resolve, milliseconds) + ); } /** @@ -203,11 +201,11 @@ export class DataStoreDownloadManager implements DownloadManager { url, init ) - .then(response => { + .then((response) => { this.onDownloadDone(); return response; }) - .catch(async err => { + .catch(async (err) => { this.onDownloadDone(); return Promise.reject(err); }); diff --git a/@here/olp-sdk-core/lib/utils/DataStoreRequestBuilder.ts b/@here/olp-sdk-core/lib/utils/DataStoreRequestBuilder.ts index e7619386..27aa78ca 100644 --- a/@here/olp-sdk-core/lib/utils/DataStoreRequestBuilder.ts +++ b/@here/olp-sdk-core/lib/utils/DataStoreRequestBuilder.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,8 @@ * License-Filename: LICENSE */ -import { DownloadManager, LIB_VERSION } from "@here/olp-sdk-core"; +import { LIB_VERSION } from "../../lib.version"; +import { DownloadManager } from "./DownloadManager"; import { RequestBuilder } from "@here/olp-sdk-dataservice-api"; /** @@ -119,8 +120,7 @@ export class DataStoreRequestBuilder extends RequestBuilder { } return this.downloadManager .download(url, options) - .then(result => result.json()) - .catch(err => Promise.reject(err)); + .then((result) => result.json()); } /** @@ -139,9 +139,7 @@ export class DataStoreRequestBuilder extends RequestBuilder { ...this.addAbortSignal(init) }; } - return this.downloadManager - .download(url, options) - .catch(err => Promise.reject(err)); + return this.downloadManager.download(url, options); } private async addBearerToken(init?: RequestInit): Promise { diff --git a/@here/olp-sdk-core/lib/utils/RequestBuilderFactory.ts b/@here/olp-sdk-core/lib/utils/RequestBuilderFactory.ts index 931eecae..5b8991c1 100644 --- a/@here/olp-sdk-core/lib/utils/RequestBuilderFactory.ts +++ b/@here/olp-sdk-core/lib/utils/RequestBuilderFactory.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,15 +17,12 @@ * License-Filename: LICENSE */ -import { - ApiCacheRepository, - ApiName, - DataStoreRequestBuilder, - getEnvLookUpUrl, - HRN, - HttpError, - OlpClientSettings -} from "@here/olp-sdk-core"; +import { ApiCacheRepository, ApiName } from "../cache/ApiCacheRepository"; +import { OlpClientSettings } from "../client/OlpClientSettings"; +import { DataStoreRequestBuilder } from "./DataStoreRequestBuilder"; +import { HRN } from "./HRN"; +import { HttpError } from "./HttpError"; +import { getEnvLookUpUrl } from "./getEnvLookupUrl"; import { LookupApi } from "@here/olp-sdk-dataservice-api"; const MILLISECONDS_IN_SECOND = 1000; @@ -122,65 +119,62 @@ export class RequestFactory { }) : LookupApi.getPlatformAPIList(lookUpApiRequest); - return lookupPromise - .then(async (resp: any) => { - let maxAge: number; - if (resp.headers) { - const cacheControl = resp.headers.get("cache-control"); - if (cacheControl) { - const maxSize = cacheControl.match(/max-age=(\d+)/); - maxAge = maxSize ? parseInt(maxSize[1], 10) : 0; - } + return lookupPromise.then(async (resp: any) => { + let maxAge: number; + if (resp.headers) { + const cacheControl = resp.headers.get("cache-control"); + if (cacheControl) { + const maxSize = cacheControl.match(/max-age=(\d+)/); + maxAge = maxSize ? parseInt(maxSize[1], 10) : 0; } + } - const res = await resp.json(); + const res = await resp.json(); - if (!Array.isArray(res)) { - throw new HttpError( - res.status || NO_CONTENT_CODE, - res.title || "No content" - ); - } + if (!Array.isArray(res)) { + throw new HttpError( + res.status || NO_CONTENT_CODE, + res.title || "No content" + ); + } - res.forEach(item => { - if (item.version === cacheOnlyVersion) { + res.forEach((item) => { + if (item.version === cacheOnlyVersion) { + apiCache.put( + item.api as ApiName, + item.version, + item.baseURL, + "api" + ); + if (maxAge) { + const time = + new Date().getTime() + + maxAge * MILLISECONDS_IN_SECOND; apiCache.put( item.api as ApiName, item.version, - item.baseURL, - "api" + time.toString(), + "age" ); - if (maxAge) { - const time = - new Date().getTime() + - maxAge * MILLISECONDS_IN_SECOND; - apiCache.put( - item.api as ApiName, - item.version, - time.toString(), - "age" - ); - } } - }); + } + }); - const baseUrlIndex = res.findIndex( - item => - item.api === serviceName && - item.version === serviceVersion - ); + const baseUrlIndex = res.findIndex( + (item) => + item.api === serviceName && item.version === serviceVersion + ); - if (baseUrlIndex === -1) { - throw new HttpError( - NOT_FOUND_CODE, - `No BaseUrl found for ${serviceName}, ${serviceVersion} ${ - hrn ? hrn.toString() : "" - }` - ); - } + if (baseUrlIndex === -1) { + throw new HttpError( + NOT_FOUND_CODE, + `No BaseUrl found for ${serviceName}, ${serviceVersion} ${ + hrn ? hrn.toString() : "" + }` + ); + } - return res[baseUrlIndex].baseURL; - }) - .catch(err => Promise.reject(err)); + return res[baseUrlIndex].baseURL; + }); } } diff --git a/@here/olp-sdk-core/package.json b/@here/olp-sdk-core/package.json index 2d779146..8117f1d8 100644 --- a/@here/olp-sdk-core/package.json +++ b/@here/olp-sdk-core/package.json @@ -1,6 +1,6 @@ { "name": "@here/olp-sdk-core", - "version": "2.0.0", + "version": "3.0.0", "description": "Core features of the HERE Data Platform", "main": "index.js", "browser": "index.web.js", @@ -11,32 +11,13 @@ }, "scripts": { "build": "tsc", - "lint": "tslint -c tslint.json -p tsconfig.json", - "test": "tsc -p ./test/tsconfig.json && mocha", - "coverage": "nyc npm run test", - "codecov": "npm run coverage && nyc report --reporter=lcov", - "prepare": "tsc --sourceMap false && npm run bundle", + "lint": "eslint .", + "test": "vitest run", + "coverage": "vitest run --coverage", + "prepack": "tsc --sourceMap false && npm run bundle", "bundle": "npm run bundle:dev && npm run bundle:prod", - "bundle:prod": "webpack --env.NODE_ENV=production", - "bundle:dev": "webpack --env.NODE_ENV=development" - }, - "nyc": { - "include": [ - "lib/**/*.ts", - "lib/**/*.js" - ], - "extension": [ - ".ts" - ], - "require": [ - "ts-node/register" - ], - "reporter": [ - "text", - "html" - ], - "sourceMap": true, - "instrument": true + "bundle:prod": "webpack --env NODE_ENV=production", + "bundle:dev": "webpack --env NODE_ENV=development" }, "repository": { "type": "git", @@ -49,35 +30,10 @@ }, "license": "Apache-2.0", "dependencies": { - "@here/olp-sdk-fetch": "^2.0.0", - "@here/olp-sdk-dataservice-api": "^2.0.0" - }, - "devDependencies": { - "@types/chai": "^4.2.7", - "@types/mocha": "^5.2.7", - "@types/node": "18.7.14", - "@types/sinon": "7.0.3", - "@types/sinon-chai": "^3.2.3", - "chai": "^4.2.0", - "glob": "^7.1.6", - "husky": "^3.1.0", - "lint-staged": "^9.5.0", - "mocha": "^6.2.2", - "nyc": "^15.0.0", - "prettier": "^1.19.1", - "sinon": "7.4.2", - "sinon-chai": "^3.4.0", - "source-map-support": "^0.5.16", - "ts-node": "10.9.2", - "tslint": "^6.1.3", - "tslint-config-prettier": "^1.18.0", - "typedoc": "^0.22.13", - "typescript": "4.0.3", - "webpack": "^4.46.0", - "webpack-cli": "^3.3.10", - "terser-webpack-plugin": "^1.4.5" + "@here/olp-sdk-fetch": "^3.0.0", + "@here/olp-sdk-dataservice-api": "^3.0.0" }, "engines": { - "node": ">= 18.0.0" + "node": ">= 24.0.0" } } diff --git a/@here/olp-sdk-core/test/mocha.opts b/@here/olp-sdk-core/test/mocha.opts deleted file mode 100644 index a38909c5..00000000 --- a/@here/olp-sdk-core/test/mocha.opts +++ /dev/null @@ -1,8 +0,0 @@ ---require ts-node/register ---require source-map-support/register ---full-trace ---bail ---check-leaks ---reporter xunit ---reporter-option output=xunit.xml -test/**/*.test.ts \ No newline at end of file diff --git a/@here/olp-sdk-core/test/tsconfig.json b/@here/olp-sdk-core/test/tsconfig.json index 67b930c6..cb5bfb67 100644 --- a/@here/olp-sdk-core/test/tsconfig.json +++ b/@here/olp-sdk-core/test/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../tsconfig.json", "compilerOptions": { - "importHelpers": true - } + "importHelpers": true, + "noImplicitAny": false + }, + "include": ["../lib/**/*.ts", "../index*.ts", "./**/*.ts"] } diff --git a/@here/olp-sdk-core/test/unit/ApiCacheRepository.test.ts b/@here/olp-sdk-core/test/unit/ApiCacheRepository.test.ts index 207cb440..9ea7f11e 100644 --- a/@here/olp-sdk-core/test/unit/ApiCacheRepository.test.ts +++ b/@here/olp-sdk-core/test/unit/ApiCacheRepository.test.ts @@ -1,106 +1,109 @@ -/* - * Copyright (C) 2020 HERE Europe B.V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * License-Filename: LICENSE - */ - -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - -import * as lib from "@here/olp-sdk-core"; - -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("ApiCacheRepository", function() { - let testCache = new lib.KeyValueCache(); - testCache.put("test-key", "test-value"); - let apiCacheRepository = new lib.ApiCacheRepository(testCache); - - const testServiceApiName = "config"; - const testServiceVersion = "service-version"; - const testServiceUrl = "service-url"; - - const testServiceApiName2 = "metadata"; - const testServiceVersion2 = "service-version2"; - const testServiceUrl2 = "service-url2"; - - const testServiceApiName3 = "query"; - const testServiceVersion3 = "service-version3"; - const testServiceUrl3 = "service-url3"; - - it("Shoud be initialised", async function() { - assert.isDefined(apiCacheRepository); - expect(apiCacheRepository).be.instanceOf(lib.ApiCacheRepository); - }); - - it("Method put should store a new key-value pair in the cache", async function() { - const operationIsSuccessful = apiCacheRepository.put( - testServiceApiName, - testServiceVersion, - testServiceUrl, - "api" - ); - - expect(operationIsSuccessful).equal(true); - expect( - apiCacheRepository.get( - testServiceApiName, - testServiceVersion, - "api" - ) - ).equal(testServiceUrl); - }); - - it("Method get should return the base URL from the cache.", async function() { - apiCacheRepository.put( - testServiceApiName2, - testServiceVersion2, - testServiceUrl2, - "api" - ); - apiCacheRepository.put( - testServiceApiName3, - testServiceVersion3, - testServiceUrl3, - "api" - ); - - expect( - apiCacheRepository.get( - testServiceApiName, - testServiceVersion, - "api" - ) - ).equal(testServiceUrl); - expect( - apiCacheRepository.get( - testServiceApiName2, - testServiceVersion2, - "api" - ) - ).equal(testServiceUrl2); - expect( - apiCacheRepository.get( - testServiceApiName3, - testServiceVersion3, - "api" - ) - ).equal(testServiceUrl3); - }); -}); +/* + * Copyright (C) 2020-2026 HERE Europe B.V. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * License-Filename: LICENSE + */ + +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import * as lib from "@here/olp-sdk-core"; + +describe("ApiCacheRepository", function () { + let testCache = new lib.KeyValueCache(); + testCache.put("test-key", "test-value"); + let apiCacheRepository = new lib.ApiCacheRepository(testCache); + + const testServiceApiName = "config"; + const testServiceVersion = "service-version"; + const testServiceUrl = "service-url"; + + const testServiceApiName2 = "metadata"; + const testServiceVersion2 = "service-version2"; + const testServiceUrl2 = "service-url2"; + + const testServiceApiName3 = "query"; + const testServiceVersion3 = "service-version3"; + const testServiceUrl3 = "service-url3"; + + it("Shoud be initialised", async function () { + assert.isDefined(apiCacheRepository); + expect(apiCacheRepository).be.instanceOf(lib.ApiCacheRepository); + }); + + it("Method put should store a new key-value pair in the cache", async function () { + const operationIsSuccessful = apiCacheRepository.put( + testServiceApiName, + testServiceVersion, + testServiceUrl, + "api" + ); + + expect(operationIsSuccessful).equal(true); + expect( + apiCacheRepository.get( + testServiceApiName, + testServiceVersion, + "api" + ) + ).equal(testServiceUrl); + }); + + it("Method get should return the base URL from the cache.", async function () { + apiCacheRepository.put( + testServiceApiName2, + testServiceVersion2, + testServiceUrl2, + "api" + ); + apiCacheRepository.put( + testServiceApiName3, + testServiceVersion3, + testServiceUrl3, + "api" + ); + + expect( + apiCacheRepository.get( + testServiceApiName, + testServiceVersion, + "api" + ) + ).equal(testServiceUrl); + expect( + apiCacheRepository.get( + testServiceApiName2, + testServiceVersion2, + "api" + ) + ).equal(testServiceUrl2); + expect( + apiCacheRepository.get( + testServiceApiName3, + testServiceVersion3, + "api" + ) + ).equal(testServiceUrl3); + }); +}); diff --git a/@here/olp-sdk-core/test/unit/DataStoreDownloadManager.test.ts b/@here/olp-sdk-core/test/unit/DataStoreDownloadManager.test.ts index c139f162..7b2eb71b 100644 --- a/@here/olp-sdk-core/test/unit/DataStoreDownloadManager.test.ts +++ b/@here/olp-sdk-core/test/unit/DataStoreDownloadManager.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,16 +17,20 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { DataStoreDownloadManager, SENT_WITH_PARAM } from "@here/olp-sdk-core"; -chai.use(sinonChai); -const assert = chai.assert; -const expect = chai.expect; - -describe("DataStoreDownloadManager", function() { +describe("DataStoreDownloadManager", function () { const fakeDataUrl = `https://download.example.url`; function createMockDownloadResponse() { @@ -36,26 +40,26 @@ describe("DataStoreDownloadManager", function() { statusText: "success", ok: true, headers: [], - arrayBuffer: sinon.stub(), - json: sinon.stub(), - text: sinon.stub() + arrayBuffer: vi.fn(), + json: vi.fn(), + text: vi.fn() }; return mock; } - it("#download handles successful download response", async function() { + it("#download handles successful download response", async function () { const mock = createMockDownloadResponse(); mock.status = 302; - const fetchStub = sinon.stub().resolves(mock); + const fetchStub = vi.fn().mockResolvedValue(mock); const downloadMgr = new DataStoreDownloadManager(fetchStub, 5); // Act const response = await downloadMgr.download(fakeDataUrl); // Assert - assert.isTrue(fetchStub.calledOnce); + assert.isTrue(fetchStub.mock.calls.length === 1); assert.isTrue( - fetchStub.getCall(0).args[0] === fakeDataUrl + "?" + SENT_WITH_PARAM + fetchStub.mock.calls[0][0] === fakeDataUrl + "?" + SENT_WITH_PARAM ); assert.deepEqual(response.statusText, "success"); @@ -63,43 +67,43 @@ describe("DataStoreDownloadManager", function() { // Arrange const mock = createMockDownloadResponse(); mock.status = responseStatus; - const fetchStub = sinon.stub().resolves(mock); + const fetchStub = vi.fn().mockResolvedValue(mock); const downloadMgr = new DataStoreDownloadManager(fetchStub, 5); // Act const response = await downloadMgr.download(fakeDataUrl); // Assert - assert.isTrue(fetchStub.calledOnce); + assert.isTrue(fetchStub.mock.calls.length === 1); assert.isTrue( - fetchStub.getCall(0).args[0] === + fetchStub.mock.calls[0][0] === fakeDataUrl + "?" + SENT_WITH_PARAM ); assert.deepEqual(response.statusText, "success"); } }); - it("#download handles HTTP 503 status response max retries", async function() { + it("#download handles HTTP 503 status response max retries", async function () { // Arrange const mock = createMockDownloadResponse(); mock.status = 503; mock.ok = false; mock.statusText = "Service unavailable!"; - mock.json.resolves({ statusText: "Service unavailable!" }); - const fetchStub = sinon.stub().resolves(mock); + mock.json.mockResolvedValue({ statusText: "Service unavailable!" }); + const fetchStub = vi.fn().mockResolvedValue(mock); const downloadMgr = new DataStoreDownloadManager(fetchStub, 3); // Act const downloadResponse = await downloadMgr .download(fakeDataUrl) - .catch(error => { + .catch((error) => { // Assert - assert(fetchStub.called) as any; + assert(fetchStub.mock.calls.length > 0) as any; // callCount should be 4. (1 first call + 3 retries) - assert(fetchStub.callCount === 4) as any; + assert(fetchStub.mock.calls.length === 4) as any; assert( - fetchStub.getCall(0).args[0] === + fetchStub.mock.calls[0][0] === fakeDataUrl + "?" + SENT_WITH_PARAM ) as any; assert.equal(error.status, 503); @@ -107,27 +111,27 @@ describe("DataStoreDownloadManager", function() { }); }); - it("#download handles HTTP 500 status response max retries", async function() { + it("#download handles HTTP 500 status response max retries", async function () { // Arrange const mock = createMockDownloadResponse(); mock.status = 500; mock.ok = false; mock.statusText = "Internal Server Error"; - mock.json.resolves({ statusText: "Internal Server Error" }); - const fetchStub = sinon.stub().resolves(mock); + mock.json.mockResolvedValue({ statusText: "Internal Server Error" }); + const fetchStub = vi.fn().mockResolvedValue(mock); const downloadMgr = new DataStoreDownloadManager(fetchStub, 3); // Act const downloadResponse = await downloadMgr .download(fakeDataUrl) - .catch(error => { + .catch((error) => { // Assert - assert(fetchStub.called) as any; + assert(fetchStub.mock.calls.length > 0) as any; // callCount should be 4. (1 first call + 3 retries) - assert(fetchStub.callCount === 4) as any; + assert(fetchStub.mock.calls.length === 4) as any; assert( - fetchStub.getCall(0).args[0] === + fetchStub.mock.calls[0][0] === fakeDataUrl + "?" + SENT_WITH_PARAM ) as any; assert.equal(error.status, 500); @@ -135,27 +139,27 @@ describe("DataStoreDownloadManager", function() { }); }); - it("#download handles HTTP 429 status response max retries", async function() { + it("#download handles HTTP 429 status response max retries", async function () { // Arrange const mock = createMockDownloadResponse(); mock.status = 429; mock.ok = false; mock.statusText = "To many requests"; - mock.json.resolves({ statusText: "To many requests" }); - const fetchStub = sinon.stub().resolves(mock); + mock.json.mockResolvedValue({ statusText: "To many requests" }); + const fetchStub = vi.fn().mockResolvedValue(mock); const downloadMgr = new DataStoreDownloadManager(fetchStub, 3); // Act const downloadResponse = await downloadMgr .download(fakeDataUrl) - .catch(error => { + .catch((error) => { // Assert - assert(fetchStub.called) as any; + assert(fetchStub.mock.calls.length > 0) as any; // callCount should be 4. (1 first call + 3 retries) - assert(fetchStub.callCount === 4) as any; + assert(fetchStub.mock.calls.length === 4) as any; assert( - fetchStub.getCall(0).args[0] === + fetchStub.mock.calls[0][0] === fakeDataUrl + "?" + SENT_WITH_PARAM ) as any; assert.equal(error.status, 429); @@ -167,14 +171,14 @@ describe("DataStoreDownloadManager", function() { * Note, DataStoreDownloadManager limits the number of html headers sent to MAX_PARALLEL_DOWNLOADS, but * will allow more then MAX_PARALLEL_DOWNLOADS of parallel download under the hood. */ - it("#download performs download with maxParallelDownloads exceeded", async function() { + it("#download performs download with maxParallelDownloads exceeded", async function () { // Arrange const MAX_PARALLEL_DOWNLOADS = 16; const CALLS_NUMBER = 32; const mock = createMockDownloadResponse(); - mock.json.resolves({ version: "4" }); - const fetchStub = sinon.stub().resolves(mock); + mock.json.mockResolvedValue({ version: "4" }); + const fetchStub = vi.fn().mockResolvedValue(mock); const downloadMgr = new DataStoreDownloadManager(fetchStub, 5); // Act @@ -184,24 +188,24 @@ describe("DataStoreDownloadManager", function() { } await Promise.all( - downloadResponses.map(downloadRespPromise => { - return downloadRespPromise.then(downloadResp => { + downloadResponses.map((downloadRespPromise) => { + return downloadRespPromise.then((downloadResp) => { return downloadResp.arrayBuffer(); }); }) ); // Assert - assert(fetchStub.callCount === CALLS_NUMBER) as any; + assert(fetchStub.mock.calls.length === CALLS_NUMBER) as any; assert( - fetchStub.getCall(MAX_PARALLEL_DOWNLOADS - 1).args[0] === + fetchStub.mock.calls[MAX_PARALLEL_DOWNLOADS - 1][0] === fakeDataUrl + "?" + SENT_WITH_PARAM ) as any; }); - it("Aborting request", async function() { + it("Aborting request", async function () { const mockedFetch = async ( - input: RequestInfo, + input: RequestInfo | URL, init?: any ): Promise => { return !init.signal.aborted @@ -214,7 +218,7 @@ describe("DataStoreDownloadManager", function() { abortController.abort(); await dm .download(fakeDataUrl, { signal: abortController.signal }) - .catch(error => { + .catch((error) => { return assert.equal(error, "aborted"); }); }); diff --git a/@here/olp-sdk-core/test/unit/DataStoreRequestBuilder.test.ts b/@here/olp-sdk-core/test/unit/DataStoreRequestBuilder.test.ts index d8acbe73..3030b3e9 100644 --- a/@here/olp-sdk-core/test/unit/DataStoreRequestBuilder.test.ts +++ b/@here/olp-sdk-core/test/unit/DataStoreRequestBuilder.test.ts @@ -1,237 +1,240 @@ -/* - * Copyright (C) 2020 HERE Europe B.V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * License-Filename: LICENSE - */ - -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - -import * as lib from "@here/olp-sdk-core"; - -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("addBearerToken", function() { - const USER_AGENT = `OLP-TS-SDK/${lib.LIB_VERSION}`; - const dm = ({ - download: async (url: string, init?: RequestInit) => - Promise.resolve({ json: () => Promise.resolve(init) }) - } as unknown) as lib.DownloadManager; - - const requestBuilder = new lib.DataStoreRequestBuilder( - dm, - "mocked-base-url", - () => Promise.resolve("mocked-token") - ); - - it("Shoud be added token to the request headers with empty params from the user", async function() { - const result: any = await requestBuilder.download("mocked-url"); - expect(result.headers.get("Authorization")).equals( - "Bearer mocked-token" - ); - }); - - it("Shoud be added token to the request headers with not empty params from the user", async function() { - const result: any = await requestBuilder.download("mocked-url", { - body: "test-string" - }); - expect(result.body).equals("test-string"); - expect(result.headers.get("Authorization")).equals( - "Bearer mocked-token" - ); - }); - - it("Shoud be added token to the request headers with some headers in params from the user", async function() { - const result: any = await requestBuilder.download("mocked-url", { - body: "test-string", - headers: [ - ["test-header-from-the-user", "test-header-from-the-user-value"] - ] - }); - expect(result.body).equals("test-string"); - expect(result.headers.get("Authorization")).equals( - "Bearer mocked-token" - ); - expect(result.headers.get("test-header-from-the-user")).equals( - "test-header-from-the-user-value" - ); - }); - - it("Shoud be added token to the request headers with some instance of Headers in params from the user", async function() { - const result: any = await requestBuilder.download("mocked-url", { - body: "test-string", - headers: new Headers({ "test-header": "test-header-value" }) - }); - expect(result.body).equals("test-string"); - expect(result.headers.get("Authorization")).equals( - "Bearer mocked-token" - ); - expect(result.headers.get("test-header")).equals("test-header-value"); - }); - - it("Shoud be added token to the request headers with some empty headers object in params from the user", async function() { - const result: any = await requestBuilder.download("mocked-url", { - body: "test-string", - headers: {} - }); - expect(result.body).equals("test-string"); - expect(result.headers.get("Authorization")).equals( - "Bearer mocked-token" - ); - }); - - it("Shoud be added token to the request headers with some not empty headers object in params from the user", async function() { - const result: any = await requestBuilder.download("mocked-url", { - body: "test-string", - headers: { "test-header": "test-header-value" } - }); - expect(result.body).equals("test-string"); - expect(result.headers.get("Authorization")).equals( - "Bearer mocked-token" - ); - expect(result.headers.get("test-header")).equals("test-header-value"); - }); -}); - -describe("DataStoreRequestBuilder", function() { - let sandbox: sinon.SinonSandbox; - let getBaseUrlRequestStub: sinon.SinonStub; - - let dataStore: any; - let dataStoreError: any; - const fakeURL = "http://fake-base.url"; - const mockedUrl = "test-url"; - const baseurl = "base-url"; - let token = () => Promise.resolve("token"); - let abortSignalTest: any; - - let dm = ({ - download: (url: any, options: any) => - Promise.resolve(({ - status: 200, - statusText: "Test Success", - json: function() { - return this; - } - } as unknown) as Response) - } as unknown) as lib.DownloadManager; - - let dmError = ({ - download: (url: any, options: any) => - Promise.reject(({ - status: 404, - statusText: "Test Error" - } as unknown) as Response) - } as unknown) as lib.DownloadManager; - - before(function() { - sandbox = sinon.createSandbox(); - }); - - beforeEach(function() { - getBaseUrlRequestStub = sandbox.stub(lib.RequestFactory, "getBaseUrl"); - getBaseUrlRequestStub.callsFake(() => Promise.resolve(fakeURL)); - - dataStore = new lib.DataStoreRequestBuilder( - dm, - baseurl, - token, - abortSignalTest - ); - - dataStoreError = new lib.DataStoreRequestBuilder( - dmError, - baseurl, - token, - abortSignalTest - ); - }); - - afterEach(function() { - sandbox.restore(); - }); - - it("Shoud be initialized", async function() { - assert.isDefined(dataStore); - expect(dataStore).be.instanceOf(lib.DataStoreRequestBuilder); - }); - - it("Shoud downloads data from the provided URL", async function() { - const response = await dataStore.download(mockedUrl); - - assert.isDefined(response); - expect(response.status).to.be.equal(200); - expect(response.statusText).to.be.equal("Test Success"); - }); - - it("Shoud download method return error when downloadManager crashed", async function() { - try { - await dataStoreError.download(mockedUrl); - } catch (error) { - assert.isDefined(error); - expect(error.status).to.be.equal(404); - expect(error.statusText).to.be.equal("Test Error"); - } - }); - - it("Shoud downloads the blob data from the provided URL", async function() { - const response = await dataStore.downloadBlob(mockedUrl); - - assert.isDefined(response); - expect(response.status).to.be.equal(200); - expect(response.statusText).to.be.equal("Test Success"); - }); - - it("Shoud downloadBlob method return error when downloadManager crashed", async function() { - try { - await dataStoreError.downloadBlob(mockedUrl); - } catch (error) { - assert.isDefined(error); - expect(error.status).to.be.equal(404); - expect(error.statusText).to.be.equal("Test Error"); - } - }); - - it("Shoud abort signal be added to the headers of the requests", async function() { - const dm = ({ - download: (url: any, options: any) => { - assert.isDefined(options.signal.aborted); - expect(options.signal.aborted).equals(false); - return Promise.resolve(({ - status: 200, - statusText: "Test Success", - json: function() { - return this; - } - } as unknown) as Response); - } - } as unknown) as lib.DownloadManager; - const abortController = new AbortController(); - const requestBuilder = new lib.DataStoreRequestBuilder( - dm, - baseurl, - token, - abortController.signal - ); - - await requestBuilder.download(mockedUrl); - await requestBuilder.downloadBlob(mockedUrl); - }); -}); +/* + * Copyright (C) 2020-2026 HERE Europe B.V. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * License-Filename: LICENSE + */ + +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import * as lib from "@here/olp-sdk-core"; + +describe("addBearerToken", function () { + const USER_AGENT = `OLP-TS-SDK/${lib.LIB_VERSION}`; + const dm = { + download: async (url: string, init?: RequestInit) => + Promise.resolve({ json: () => Promise.resolve(init) }) + } as unknown as lib.DownloadManager; + + const requestBuilder = new lib.DataStoreRequestBuilder( + dm, + "mocked-base-url", + () => Promise.resolve("mocked-token") + ); + + it("Shoud be added token to the request headers with empty params from the user", async function () { + const result: any = await requestBuilder.download("mocked-url"); + expect(result.headers.get("Authorization")).equals( + "Bearer mocked-token" + ); + }); + + it("Shoud be added token to the request headers with not empty params from the user", async function () { + const result: any = await requestBuilder.download("mocked-url", { + body: "test-string" + }); + expect(result.body).equals("test-string"); + expect(result.headers.get("Authorization")).equals( + "Bearer mocked-token" + ); + }); + + it("Shoud be added token to the request headers with some headers in params from the user", async function () { + const result: any = await requestBuilder.download("mocked-url", { + body: "test-string", + headers: [ + ["test-header-from-the-user", "test-header-from-the-user-value"] + ] + }); + expect(result.body).equals("test-string"); + expect(result.headers.get("Authorization")).equals( + "Bearer mocked-token" + ); + expect(result.headers.get("test-header-from-the-user")).equals( + "test-header-from-the-user-value" + ); + }); + + it("Shoud be added token to the request headers with some instance of Headers in params from the user", async function () { + const result: any = await requestBuilder.download("mocked-url", { + body: "test-string", + headers: new Headers({ "test-header": "test-header-value" }) + }); + expect(result.body).equals("test-string"); + expect(result.headers.get("Authorization")).equals( + "Bearer mocked-token" + ); + expect(result.headers.get("test-header")).equals("test-header-value"); + }); + + it("Shoud be added token to the request headers with some empty headers object in params from the user", async function () { + const result: any = await requestBuilder.download("mocked-url", { + body: "test-string", + headers: {} + }); + expect(result.body).equals("test-string"); + expect(result.headers.get("Authorization")).equals( + "Bearer mocked-token" + ); + }); + + it("Shoud be added token to the request headers with some not empty headers object in params from the user", async function () { + const result: any = await requestBuilder.download("mocked-url", { + body: "test-string", + headers: { "test-header": "test-header-value" } + }); + expect(result.body).equals("test-string"); + expect(result.headers.get("Authorization")).equals( + "Bearer mocked-token" + ); + expect(result.headers.get("test-header")).equals("test-header-value"); + }); +}); + +describe("DataStoreRequestBuilder", function () { + let getBaseUrlRequestStub: any; + + let dataStore: any; + let dataStoreError: any; + const fakeURL = "http://fake-base.url"; + const mockedUrl = "test-url"; + const baseurl = "base-url"; + let token = () => Promise.resolve("token"); + let abortSignalTest: any; + + let dm = { + download: (url: any, options: any) => + Promise.resolve({ + status: 200, + statusText: "Test Success", + json: function () { + return this; + } + } as unknown as Response) + } as unknown as lib.DownloadManager; + + let dmError = { + download: (url: any, options: any) => + Promise.reject({ + status: 404, + statusText: "Test Error" + } as unknown as Response) + } as unknown as lib.DownloadManager; + + beforeAll(function () {}); + + beforeEach(function () { + getBaseUrlRequestStub = vi + .spyOn(lib.RequestFactory, "getBaseUrl") + .mockReturnValue(undefined as any); + getBaseUrlRequestStub.mockImplementation(() => + Promise.resolve(fakeURL) + ); + + dataStore = new lib.DataStoreRequestBuilder( + dm, + baseurl, + token, + abortSignalTest + ); + + dataStoreError = new lib.DataStoreRequestBuilder( + dmError, + baseurl, + token, + abortSignalTest + ); + }); + + afterEach(function () { + vi.restoreAllMocks(); + }); + + it("Shoud be initialized", async function () { + assert.isDefined(dataStore); + expect(dataStore).be.instanceOf(lib.DataStoreRequestBuilder); + }); + + it("Shoud downloads data from the provided URL", async function () { + const response = await dataStore.download(mockedUrl); + + assert.isDefined(response); + expect(response.status).to.be.equal(200); + expect(response.statusText).to.be.equal("Test Success"); + }); + + it("Shoud download method return error when downloadManager crashed", async function () { + try { + await dataStoreError.download(mockedUrl); + } catch (error) { + assert.isDefined(error); + expect(error.status).to.be.equal(404); + expect(error.statusText).to.be.equal("Test Error"); + } + }); + + it("Shoud downloads the blob data from the provided URL", async function () { + const response = await dataStore.downloadBlob(mockedUrl); + + assert.isDefined(response); + expect(response.status).to.be.equal(200); + expect(response.statusText).to.be.equal("Test Success"); + }); + + it("Shoud downloadBlob method return error when downloadManager crashed", async function () { + try { + await dataStoreError.downloadBlob(mockedUrl); + } catch (error) { + assert.isDefined(error); + expect(error.status).to.be.equal(404); + expect(error.statusText).to.be.equal("Test Error"); + } + }); + + it("Shoud abort signal be added to the headers of the requests", async function () { + const dm = { + download: (url: any, options: any) => { + assert.isDefined(options.signal.aborted); + expect(options.signal.aborted).equals(false); + return Promise.resolve({ + status: 200, + statusText: "Test Success", + json: function () { + return this; + } + } as unknown as Response); + } + } as unknown as lib.DownloadManager; + const abortController = new AbortController(); + const requestBuilder = new lib.DataStoreRequestBuilder( + dm, + baseurl, + token, + abortController.signal + ); + + await requestBuilder.download(mockedUrl); + await requestBuilder.downloadBlob(mockedUrl); + }); +}); diff --git a/@here/olp-sdk-core/test/unit/HRN.test.ts b/@here/olp-sdk-core/test/unit/HRN.test.ts index 05a10359..a87cd8ec 100644 --- a/@here/olp-sdk-core/test/unit/HRN.test.ts +++ b/@here/olp-sdk-core/test/unit/HRN.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,16 +17,26 @@ * License-Filename: LICENSE */ -import { assert } from "chai"; +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { HRN } from "@here/olp-sdk-core"; -describe("HRN", function() { - it("fromString", function() { +describe("HRN", function () { + it("fromString", function () { const hrnString = "hrn:here:datastore:::testcatalog"; assert.strictEqual(HRN.fromString(hrnString).toString(), hrnString); }); - it("localURL", function() { + it("localURL", function () { const hrn = HRN.fromString("http://localhost:5000"); assert.strictEqual(hrn.data.partition, "catalog-url"); @@ -35,7 +45,7 @@ describe("HRN", function() { assert.strictEqual(hrn.data.account, ""); }); - it("additionalFields", function() { + it("additionalFields", function () { const hrn = HRN.fromString( "hrn:here:datastore:::testcatalog:some:additional:fields" ); @@ -47,7 +57,7 @@ describe("HRN", function() { ]); }); - it("HRN throw Error on malformed input data", function() { + it("HRN throw Error on malformed input data", function () { let caught = false; try { // tslint:disable-next-line:no-unused-variable diff --git a/@here/olp-sdk-core/test/unit/KeyValueCache.test.ts b/@here/olp-sdk-core/test/unit/KeyValueCache.test.ts index b596b2b8..ee615eee 100644 --- a/@here/olp-sdk-core/test/unit/KeyValueCache.test.ts +++ b/@here/olp-sdk-core/test/unit/KeyValueCache.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,24 +17,28 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { KeyValueCache } from "@here/olp-sdk-core"; -chai.use(sinonChai); -const expect = chai.expect; - -describe("KeyValueCache", function() { - let sandbox: sinon.SinonSandbox; +describe("KeyValueCache", function () { let keyValueCache1 = new KeyValueCache(); - beforeEach(function() { + beforeEach(function () { keyValueCache1.put("key1", "value1"); keyValueCache1.put("key2", "value2"); }); - it("Should put new key value", function() { + it("Should put new key value", function () { keyValueCache1.put("key3", "value3"); expect(keyValueCache1.get("key1")).equal("value1"); @@ -42,7 +46,7 @@ describe("KeyValueCache", function() { expect(keyValueCache1.get("key3")).equal("value3"); }); - it("Should put handle error", function() { + it("Should put handle error", function () { const cache = new KeyValueCache(); const resp1 = cache.put("key", "somedata"); expect(resp1).equal(true); @@ -51,12 +55,12 @@ describe("KeyValueCache", function() { expect(resp2).equal(false); }); - it("Should getCapacity return cache capacity", function() { + it("Should getCapacity return cache capacity", function () { const cache = new KeyValueCache(); expect(cache.getCapacity()).equal(2097152); }); - it("Should clear() clear the cache and remove all ietms", function() { + it("Should clear() clear the cache and remove all ietms", function () { const cache = new KeyValueCache(); cache.put("key", "value"); expect(cache.get("key")).equal("value"); @@ -64,7 +68,7 @@ describe("KeyValueCache", function() { expect(cache.get("key")).equal(undefined); }); - it("Should get key value", function() { + it("Should get key value", function () { expect(keyValueCache1.get("key1")).equal("value1"); expect(keyValueCache1.get("key2")).equal("value2"); }); diff --git a/@here/olp-sdk-core/test/unit/LRU.test.ts b/@here/olp-sdk-core/test/unit/LRU.test.ts index d0c4bc17..f8c9423b 100644 --- a/@here/olp-sdk-core/test/unit/LRU.test.ts +++ b/@here/olp-sdk-core/test/unit/LRU.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,11 +17,21 @@ * License-Filename: LICENSE */ -import { assert } from "chai"; +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { LRUCache } from "@here/olp-sdk-core"; -describe("LRU", function() { - it("set", function() { +describe("LRU", function () { + it("set", function () { const cache = new LRUCache(3); cache.set(1, 1); cache.set(2, 2); @@ -32,7 +42,7 @@ describe("LRU", function() { assert.strictEqual(cache.get(3), 3); }); - it("get", function() { + it("get", function () { const cache = new LRUCache(3); assert.strictEqual(cache.get(1), undefined); assert.strictEqual(cache.get(2), undefined); @@ -44,7 +54,7 @@ describe("LRU", function() { assert.strictEqual(cache.get(3), undefined); }); - it("overflow", function() { + it("overflow", function () { const cache = new LRUCache(3); cache.set(1, 1); cache.set(2, 2); @@ -57,7 +67,7 @@ describe("LRU", function() { assert.strictEqual(cache.get(4), 4); }); - it("clear", function() { + it("clear", function () { const cache = new LRUCache(3); cache.set(1, 1); cache.set(2, 2); @@ -67,7 +77,7 @@ describe("LRU", function() { assert.strictEqual(cache.get(2), undefined); }); - it("resize", function() { + it("resize", function () { const cache = new LRUCache(2); cache.set(1, 1); diff --git a/@here/olp-sdk-core/test/unit/OlpClientSettings.test.ts b/@here/olp-sdk-core/test/unit/OlpClientSettings.test.ts index 3eb8c431..c81a9500 100644 --- a/@here/olp-sdk-core/test/unit/OlpClientSettings.test.ts +++ b/@here/olp-sdk-core/test/unit/OlpClientSettings.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,13 +17,20 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import * as lib from "@here/olp-sdk-core"; - -chai.use(sinonChai); -const expect = chai.expect; +import * as KeyValueCacheModule from "../../lib/cache/KeyValueCache"; +import * as DataStoreDownloadManagerModule from "../../lib/utils/DataStoreDownloadManager"; class MockedKeyValueCache { private readonly cache: Map; @@ -51,34 +58,33 @@ class MockedCustomDataStoreDownloadManager { } } -describe("OlpClientSettings", function() { - let KeyValueCacheStub: sinon.SinonStub; - let DataStoreDownloadManagerStub: sinon.SinonStub; - - let sandbox: sinon.SinonSandbox; +describe("OlpClientSettings", function () { + let KeyValueCacheStub: any; + let DataStoreDownloadManagerStub: any; - before(function() { - sandbox = sinon.createSandbox(); - }); + beforeAll(function () {}); - afterEach(function() { - sandbox.restore(); + afterEach(function () { + vi.restoreAllMocks(); }); - beforeEach(function() { - KeyValueCacheStub = sandbox.stub(lib, "KeyValueCache"); - KeyValueCacheStub.callsFake((cache, hrn) => new MockedKeyValueCache()); + beforeEach(function () { + KeyValueCacheStub = vi + .spyOn(KeyValueCacheModule, "KeyValueCache") + .mockReturnValue(undefined as any); + KeyValueCacheStub.mockImplementation(function () { + return new MockedKeyValueCache(); + }); - DataStoreDownloadManagerStub = sandbox.stub( - lib, - "DataStoreDownloadManager" - ); - DataStoreDownloadManagerStub.callsFake( - (cache, hrn) => new MockedDataStoreDownloadManager() - ); + DataStoreDownloadManagerStub = vi + .spyOn(DataStoreDownloadManagerModule, "DataStoreDownloadManager") + .mockReturnValue(undefined as any); + DataStoreDownloadManagerStub.mockImplementation(function () { + return new MockedDataStoreDownloadManager(); + }); }); - it("Should be configured with correct params and default download manager", async function() { + it("Should be configured with correct params and default download manager", async function () { const settings = new lib.OlpClientSettings({ environment: "test-env", getToken: () => Promise.resolve("test-token") @@ -89,9 +95,8 @@ describe("OlpClientSettings", function() { ); expect(settings.environment).equal("test-env"); - const downloadedResult = await settings.downloadManager.download( - "fake-url" - ); + const downloadedResult = + await settings.downloadManager.download("fake-url"); expect(downloadedResult).equal( "test-download-manager-downloaded-result" ); @@ -100,16 +105,15 @@ describe("OlpClientSettings", function() { expect(tokenStr).equal("test-token"); }); - it("Should be configured with correct params and custom download manager", async function() { + it("Should be configured with correct params and custom download manager", async function () { const settings = new lib.OlpClientSettings({ environment: "test-env", getToken: () => Promise.resolve("test-token"), dm: new MockedCustomDataStoreDownloadManager() }); - const downloadedResult = await settings.downloadManager.download( - "fake-url" - ); + const downloadedResult = + await settings.downloadManager.download("fake-url"); expect(await downloadedResult.text()).equal( "test-custom-download-manager-downloaded-result" ); diff --git a/@here/olp-sdk-core/test/unit/RequestBuilderFactory.test.ts b/@here/olp-sdk-core/test/unit/RequestBuilderFactory.test.ts index 858699d3..1da359e4 100644 --- a/@here/olp-sdk-core/test/unit/RequestBuilderFactory.test.ts +++ b/@here/olp-sdk-core/test/unit/RequestBuilderFactory.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,14 +17,22 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import * as lib from "@here/olp-sdk-core"; import * as dataServiceApi from "@here/olp-sdk-dataservice-api"; - -chai.use(sinonChai); -const expect = chai.expect; +import * as ApiCacheRepositoryModule from "../../lib/cache/ApiCacheRepository"; +import * as DataStoreRequestBuilderModule from "../../lib/utils/DataStoreRequestBuilder"; +import * as getEnvLookUpUrlModule from "../../lib/utils/getEnvLookupUrl"; class MockedHrn { constructor(private readonly data: lib.HRNData) {} @@ -155,7 +163,10 @@ class MockedOlpClientSettings { class MockedApiCacheRepository { private readonly hrn: string; - constructor(private readonly cache: any, hrn?: MockedHrn) { + constructor( + private readonly cache: any, + hrn?: MockedHrn + ) { this.hrn = hrn ? hrn.toString() : "plathorm-api"; } @@ -182,41 +193,36 @@ class MockedDataStoreRequestBuilder { ) {} } -describe("RequestFactory", function() { - let ApiCacheRepositoryStub: sinon.SinonStub; - let DataStoreRequestBuilderStub: sinon.SinonStub; +describe("RequestFactory", function () { + let ApiCacheRepositoryStub: any; + let DataStoreRequestBuilderStub: any; - let sandbox: sinon.SinonSandbox; + beforeAll(function () {}); - before(function() { - sandbox = sinon.createSandbox(); + afterEach(function () { + vi.restoreAllMocks(); }); - afterEach(function() { - sandbox.restore(); - }); - - beforeEach(function() { - ApiCacheRepositoryStub = sandbox.stub(lib, "ApiCacheRepository"); - ApiCacheRepositoryStub.callsFake( - (cache, hrn) => new MockedApiCacheRepository(cache, hrn) + beforeEach(function () { + ApiCacheRepositoryStub = vi + .spyOn(ApiCacheRepositoryModule, "ApiCacheRepository") + .mockImplementation(function (cache: any, hrn: any) { + return new MockedApiCacheRepository(cache, hrn) as any; + }); + + DataStoreRequestBuilderStub = vi + .spyOn(DataStoreRequestBuilderModule, "DataStoreRequestBuilder") + .mockImplementation(function (dm: any, url: any, token: any) { + return new MockedDataStoreRequestBuilder(dm, url, token) as any; + }); + + vi.spyOn(getEnvLookUpUrlModule, "getEnvLookUpUrl").mockImplementation( + () => "http://fake-lookup.service.url" ); - - DataStoreRequestBuilderStub = sandbox.stub( - lib, - "DataStoreRequestBuilder" - ); - DataStoreRequestBuilderStub.callsFake((dm, url, token) => { - return new MockedDataStoreRequestBuilder(dm, url, token); - }); - - sandbox - .stub(lib, "getEnvLookUpUrl") - .callsFake(() => "http://fake-lookup.service.url"); }); - describe("create()", function() { - it("Should return created RequestBuilder with correct base url for platform service", async function() { + describe("create()", function () { + it("Should return created RequestBuilder with correct base url for platform service", async function () { const headers = new Headers(); headers.append("cache-control", "max-age=3600"); const response = { @@ -229,15 +235,16 @@ describe("RequestFactory", function() { "test-base-url-to-platform-service-for-request-builder" } ], - json: function() { + json: function () { return this.resp; } }; - sandbox - .stub(dataServiceApi.LookupApi, "getPlatformAPIList") - .callsFake(() => - Promise.resolve((response as unknown) as Response) - ); + vi.spyOn( + dataServiceApi.LookupApi, + "getPlatformAPIList" + ).mockImplementation(() => + Promise.resolve(response as unknown as Response) + ); const settings = new MockedOlpClientSettings(); const requestBuilder = await lib.RequestFactory.create( @@ -251,19 +258,20 @@ describe("RequestFactory", function() { ); }); - it("Should reject with correct error about base url", async function() { - sandbox - .stub(dataServiceApi.LookupApi, "getPlatformAPIList") - .callsFake( - () => - Promise.resolve({ - status: 204, - title: "No content", - json: function() { - return this; - } - }) as any - ); + it("Should reject with correct error about base url", async function () { + vi.spyOn( + dataServiceApi.LookupApi, + "getPlatformAPIList" + ).mockImplementation( + () => + Promise.resolve({ + status: 204, + title: "No content", + json: function () { + return this; + } + }) as any + ); const settings = new MockedOlpClientSettings(); @@ -277,10 +285,42 @@ describe("RequestFactory", function() { expect(error.message).to.be.equal("No content"); } }); + + it("Should reject if the service is listed without a base url", async function () { + const headers = new Headers(); + headers.append("cache-control", "max-age=3600"); + const response = { + headers, + resp: [ + { + api: "statistics", + version: "v1", + baseURL: "" + } + ], + json: function () { + return this.resp; + } + }; + vi.spyOn( + dataServiceApi.LookupApi, + "getPlatformAPIList" + ).mockImplementation(() => + Promise.resolve(response as unknown as Response) + ); + + const settings = new MockedOlpClientSettings(); + + await expect( + lib.RequestFactory.create("statistics", "v1", settings as any) + ).rejects.toThrow( + "Error getting base url to the service: statistics" + ); + }); }); - describe("getBaseUrl()", function() { - it("Should return correct base url for platform service", async function() { + describe("getBaseUrl()", function () { + it("Should return correct base url for platform service", async function () { const headers = new Headers(); headers.append("cache-control", "max-age=3600"); const response = { @@ -292,15 +332,16 @@ describe("RequestFactory", function() { baseURL: "test-base-url-to-platform-service" } ], - json: function() { + json: function () { return this.resp; } }; - sandbox - .stub(dataServiceApi.LookupApi, "getPlatformAPIList") - .callsFake(() => - Promise.resolve((response as unknown) as Response) - ); + vi.spyOn( + dataServiceApi.LookupApi, + "getPlatformAPIList" + ).mockImplementation(() => + Promise.resolve(response as unknown as Response) + ); const settings = new MockedOlpClientSettings(); const baseUrl = await lib.RequestFactory.getBaseUrl( "statistics", @@ -310,7 +351,7 @@ describe("RequestFactory", function() { expect(baseUrl).to.be.equal("test-base-url-to-platform-service"); }); - it("Should return correct base url for resource service", async function() { + it("Should return correct base url for resource service", async function () { const headers = new Headers(); headers.append("cache-control", "max-age=3600"); const response = { @@ -322,15 +363,16 @@ describe("RequestFactory", function() { baseURL: "test-base-url-to-resource-service" } ], - json: function() { + json: function () { return this.resp; } }; - sandbox - .stub(dataServiceApi.LookupApi, "getResourceAPIList") - .callsFake(() => - Promise.resolve((response as unknown) as Response) - ); + vi.spyOn( + dataServiceApi.LookupApi, + "getResourceAPIList" + ).mockImplementation(() => + Promise.resolve(response as unknown as Response) + ); const settings = new MockedOlpClientSettings(); const baseUrl = await lib.RequestFactory.getBaseUrl( @@ -346,19 +388,20 @@ describe("RequestFactory", function() { expect(baseUrl).to.be.equal("test-base-url-to-resource-service"); }); - it("Should reject with correct error message", async function() { - sandbox - .stub(dataServiceApi.LookupApi, "getPlatformAPIList") - .callsFake(() => - Promise.resolve(({ - status: 404, - title: "Service Not Found", - detail: [], - json: function() { - return this; - } - } as unknown) as Response) - ); + it("Should reject with correct error message", async function () { + vi.spyOn( + dataServiceApi.LookupApi, + "getPlatformAPIList" + ).mockImplementation(() => + Promise.resolve({ + status: 404, + title: "Service Not Found", + detail: [], + json: function () { + return this; + } + } as unknown as Response) + ); const settings = new MockedOlpClientSettings(); try { await lib.RequestFactory.getBaseUrl( @@ -371,16 +414,17 @@ describe("RequestFactory", function() { } }); - it("Should reject with correct custom error message", async function() { - sandbox - .stub(dataServiceApi.LookupApi, "getPlatformAPIList") - .callsFake(() => - Promise.resolve(({ - json: function() { - return this; - } - } as unknown) as Response) - ); + it("Should reject with correct custom error message", async function () { + vi.spyOn( + dataServiceApi.LookupApi, + "getPlatformAPIList" + ).mockImplementation(() => + Promise.resolve({ + json: function () { + return this; + } + } as unknown as Response) + ); const settings = new MockedOlpClientSettings(); try { await lib.RequestFactory.getBaseUrl( @@ -393,7 +437,7 @@ describe("RequestFactory", function() { } }); - it("Should reject with not found error message", async function() { + it("Should reject with not found error message", async function () { const headers = new Headers(); headers.append("cache-control", "max-age=3600"); const response = { @@ -405,15 +449,16 @@ describe("RequestFactory", function() { baseURL: "test-base-url-to-platform-service" } ], - json: function() { + json: function () { return this.resp; } }; - sandbox - .stub(dataServiceApi.LookupApi, "getPlatformAPIList") - .callsFake(() => - Promise.resolve((response as unknown) as Response) - ); + vi.spyOn( + dataServiceApi.LookupApi, + "getPlatformAPIList" + ).mockImplementation(() => + Promise.resolve(response as unknown as Response) + ); const settings = new MockedOlpClientSettings(); try { await lib.RequestFactory.getBaseUrl( @@ -426,7 +471,7 @@ describe("RequestFactory", function() { } }); - it("Should reject with not found error message for hrn", async function() { + it("Should reject with not found error message for hrn", async function () { const headers = new Headers(); headers.append("cache-control", "max-age=3600"); const response = { @@ -438,15 +483,16 @@ describe("RequestFactory", function() { baseURL: "test-base-url-to-platform-service" } ], - json: function() { + json: function () { return this.resp; } }; - sandbox - .stub(dataServiceApi.LookupApi, "getResourceAPIList") - .callsFake(() => - Promise.resolve((response as unknown) as Response) - ); + vi.spyOn( + dataServiceApi.LookupApi, + "getResourceAPIList" + ).mockImplementation(() => + Promise.resolve(response as unknown as Response) + ); const settings = new MockedOlpClientSettings(); try { await lib.RequestFactory.getBaseUrl( @@ -467,7 +513,7 @@ describe("RequestFactory", function() { } }); - it("Should return correct base url for resource service from cache while max-age is valid", async function() { + it("Should return correct base url for resource service from cache while max-age is valid", async function () { const headers = new Headers(); headers.append("cache-control", "max-age=2"); const response = { @@ -479,23 +525,21 @@ describe("RequestFactory", function() { baseURL: "test-base-url-to-resource-service" } ], - json: function() { + json: function () { return this.resp; } }; - const resourceApiStub = sandbox.stub( - dataServiceApi.LookupApi, - "getResourceAPIList" - ); + const resourceApiStub = vi + .spyOn(dataServiceApi.LookupApi, "getResourceAPIList") + .mockReturnValue(undefined as any); - resourceApiStub.callsFake(() => - Promise.resolve((response as unknown) as Response) + resourceApiStub.mockImplementation(() => + Promise.resolve(response as unknown as Response) ); const settings = new MockedOlpClientSettings(); - const platformApiStub = sandbox.stub( - dataServiceApi.LookupApi, - "getPlatformAPIList" - ); + const platformApiStub = vi + .spyOn(dataServiceApi.LookupApi, "getPlatformAPIList") + .mockReturnValue(undefined as any); const baseUrl1 = await lib.RequestFactory.getBaseUrl( "statistics", @@ -507,7 +551,7 @@ describe("RequestFactory", function() { service: "here-test-service" }) as any ); - expect(resourceApiStub.callCount).to.be.equal(1); + expect(resourceApiStub.mock.calls.length).to.be.equal(1); expect(baseUrl1).to.be.equal("test-base-url-to-resource-service"); const baseUrl2 = await lib.RequestFactory.getBaseUrl( @@ -521,10 +565,15 @@ describe("RequestFactory", function() { }) as any ); - expect(resourceApiStub.callCount).to.be.equal(1); + expect(resourceApiStub.mock.calls.length).to.be.equal(1); expect(baseUrl2).to.be.equal("test-base-url-to-resource-service"); - setTimeout(async function() { + // Move past the two seconds the response allowed the entry to be + // cached for, so the third call has to look the service up again. + vi.useFakeTimers(); + try { + vi.advanceTimersByTime(3000); + const baseUrl3 = await lib.RequestFactory.getBaseUrl( "statistics", "v1", @@ -536,11 +585,95 @@ describe("RequestFactory", function() { }) as any ); - expect(resourceApiStub.callCount).to.be.equal(2); + expect(resourceApiStub.mock.calls.length).to.be.equal(2); expect(baseUrl3).to.be.equal( "test-base-url-to-resource-service" ); - }, 3000); + } finally { + vi.useRealTimers(); + } + }); + + it("Should not cache the age if the response carries no cache control", async function () { + const response = { + headers: new Headers(), + resp: [ + { + api: "statistics", + version: "v1", + baseURL: "test-base-url-to-platform-service" + }, + { + api: "statistics", + version: "v2", + baseURL: "test-base-url-of-a-version-that-is-not-cached" + } + ], + json: function () { + return this.resp; + } + }; + const platformApiStub = vi + .spyOn(dataServiceApi.LookupApi, "getPlatformAPIList") + .mockImplementation(() => + Promise.resolve(response as unknown as Response) + ); + const settings = new MockedOlpClientSettings(); + + const baseUrl1 = await lib.RequestFactory.getBaseUrl( + "statistics", + "v1", + settings as any + ); + const baseUrl2 = await lib.RequestFactory.getBaseUrl( + "statistics", + "v1", + settings as any + ); + + expect(baseUrl1).to.be.equal("test-base-url-to-platform-service"); + expect(baseUrl2).to.be.equal("test-base-url-to-platform-service"); + // Without an age the cached url is never taken for a fresh one. + expect(platformApiStub.mock.calls.length).to.be.equal(2); + }); + + it("Should not cache the age if the cache control carries no max age", async function () { + const headers = new Headers(); + headers.append("cache-control", "no-store"); + const response = { + headers, + resp: [ + { + api: "statistics", + version: "v1", + baseURL: "test-base-url-to-platform-service" + } + ], + json: function () { + return this.resp; + } + }; + const platformApiStub = vi + .spyOn(dataServiceApi.LookupApi, "getPlatformAPIList") + .mockImplementation(() => + Promise.resolve(response as unknown as Response) + ); + const settings = new MockedOlpClientSettings(); + + const baseUrl1 = await lib.RequestFactory.getBaseUrl( + "statistics", + "v1", + settings as any + ); + const baseUrl2 = await lib.RequestFactory.getBaseUrl( + "statistics", + "v1", + settings as any + ); + + expect(baseUrl1).to.be.equal("test-base-url-to-platform-service"); + expect(baseUrl2).to.be.equal("test-base-url-to-platform-service"); + expect(platformApiStub.mock.calls.length).to.be.equal(2); }); }); }); diff --git a/@here/olp-sdk-core/test/unit/TileKey.test.ts b/@here/olp-sdk-core/test/unit/TileKey.test.ts index 8f25e221..57cb52f5 100644 --- a/@here/olp-sdk-core/test/unit/TileKey.test.ts +++ b/@here/olp-sdk-core/test/unit/TileKey.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,11 +17,21 @@ * License-Filename: LICENSE */ -import { assert } from "chai"; +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { TileKey } from "@here/olp-sdk-core"; -describe("TileKey", function() { - it("largeNumberDivision", function() { +describe("TileKey", function () { + it("largeNumberDivision", function () { // make sure that dividing by a large number by 2 actually produces correct results let x = Math.pow(2, 52); for (let i = 51; i > 0; --i) { @@ -30,7 +40,7 @@ describe("TileKey", function() { } }); - it("getSubHereTile", function() { + it("getSubHereTile", function () { assert.strictEqual( "4", TileKey.fromRowColumnLevel(2, 2, 2).getSubHereTile(1) @@ -49,7 +59,7 @@ describe("TileKey", function() { ); }); - it("toQuadKey", function() { + it("toQuadKey", function () { assert.strictEqual( "30", TileKey.fromRowColumnLevel(2, 2, 2).toQuadKey() @@ -76,7 +86,7 @@ describe("TileKey", function() { ); }); - it("fromQuadKey", function() { + it("fromQuadKey", function () { assert.isTrue( TileKey.fromQuadKey("30").equals( TileKey.fromRowColumnLevel(2, 2, 2) @@ -107,17 +117,17 @@ describe("TileKey", function() { ); }); - it("columnsAtLevel", function() { + it("columnsAtLevel", function () { assert.strictEqual(8, TileKey.columnsAtLevel(3)); assert.strictEqual(8192, TileKey.columnsAtLevel(13)); }); - it("rowsAtLevel", function() { + it("rowsAtLevel", function () { assert.strictEqual(8, TileKey.rowsAtLevel(3)); assert.strictEqual(8192, TileKey.rowsAtLevel(13)); }); - it("parent", function() { + it("parent", function () { assert.isTrue( TileKey.fromRowColumnLevel(1637, 4042, 12).equals( TileKey.fromMortonCode(100000155).parent() @@ -125,7 +135,7 @@ describe("TileKey", function() { ); }); - it("addedSubKey", function() { + it("addedSubKey", function () { assert.isTrue( TileKey.fromRowColumnLevel(10, 15, 4).equals( TileKey.fromRowColumnLevel(2, 3, 2).addedSubKey("31") @@ -133,7 +143,7 @@ describe("TileKey", function() { ); }); - it("changedLevelBy", function() { + it("changedLevelBy", function () { assert.isTrue( TileKey.fromRowColumnLevel(2, 3, 2).equals( TileKey.fromRowColumnLevel(2, 3, 2).changedLevelBy(0) @@ -151,7 +161,7 @@ describe("TileKey", function() { ); }); - it("fromMortonCode", function() { + it("fromMortonCode", function () { assert.isTrue( TileKey.fromRowColumnLevel(1637, 4042, 12).equals( TileKey.fromMortonCode(25000038) @@ -164,28 +174,28 @@ describe("TileKey", function() { ); }); - it("rowCount", function() { + it("rowCount", function () { assert.strictEqual( 4096, TileKey.fromRowColumnLevel(1637, 4042, 12).rowCount() ); }); - it("columnCount", function() { + it("columnCount", function () { assert.strictEqual( 8192, TileKey.fromRowColumnLevel(3275, 8085, 13).columnCount() ); }); - it("toHereTile", function() { + it("toHereTile", function () { assert.strictEqual( "100000155", TileKey.fromRowColumnLevel(3275, 8085, 13).toHereTile() ); }); - it("changedLevelTo", function() { + it("changedLevelTo", function () { assert.isTrue( TileKey.fromRowColumnLevel(6, 15, 4).equals( TileKey.fromRowColumnLevel(3275, 8085, 13).changedLevelTo(4) @@ -193,7 +203,7 @@ describe("TileKey", function() { ); }); - it("fromHereTile", function() { + it("fromHereTile", function () { assert.isTrue( TileKey.fromHereTile("100000155").equals( TileKey.fromRowColumnLevel(3275, 8085, 13) @@ -201,11 +211,11 @@ describe("TileKey", function() { ); }); - it("parentMortonCode", function() { + it("parentMortonCode", function () { assert.strictEqual(25000038, TileKey.parentMortonCode(100000155)); }); - it("addedSubHereTile", function() { + it("addedSubHereTile", function () { assert.isTrue( TileKey.fromRowColumnLevel(49, 124, 7).equals( TileKey.fromRowColumnLevel(6, 15, 4).addedSubHereTile("82") @@ -213,7 +223,7 @@ describe("TileKey", function() { ); }); - it("atCoords", function() { + it("atCoords", function () { assert.isTrue( TileKey.fromRowColumnLevel(3, 6, 5).equals( TileKey.atCoords(5, 8.8, 6.486, 45, 55) @@ -221,7 +231,7 @@ describe("TileKey", function() { ); }); - it("throws an error", function() { + it("throws an error", function () { try { TileKey.fromRowColumnLevel(0, 0, 0).parent(); } catch (error) { @@ -232,7 +242,7 @@ describe("TileKey", function() { } }); - it("Tile is not valid if the row/column is out of bounds", function() { + it("Tile is not valid if the row/column is out of bounds", function () { const invalid_tile_1 = { row: 5, column: 1, level: 1 }; assert.isFalse(TileKey.isValid(invalid_tile_1)); @@ -246,7 +256,7 @@ describe("TileKey", function() { assert.isFalse(TileKey.isValid(invalid_tile_4)); }); - it("Tile is not valid if the level is out of bounds", function() { + it("Tile is not valid if the level is out of bounds", function () { const invalid_tile_1 = { row: 0, column: 0, level: -1 }; assert.isFalse(TileKey.isValid(invalid_tile_1)); diff --git a/@here/olp-sdk-core/test/unit/Uuid.test.ts b/@here/olp-sdk-core/test/unit/Uuid.test.ts index 7af32224..3fda8190 100644 --- a/@here/olp-sdk-core/test/unit/Uuid.test.ts +++ b/@here/olp-sdk-core/test/unit/Uuid.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,11 +17,21 @@ * License-Filename: LICENSE */ -import { assert } from "chai"; +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { Uuid } from "@here/olp-sdk-core"; -describe("Uuid", function() { - it("Should be unique and valid value", function() { +describe("Uuid", function () { + it("Should be unique and valid value", function () { const validator = new RegExp( "^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$", "i" diff --git a/@here/olp-sdk-core/test/unit/getEnvLookupUrl.test.ts b/@here/olp-sdk-core/test/unit/getEnvLookupUrl.test.ts index c4af4222..f452467b 100644 --- a/@here/olp-sdk-core/test/unit/getEnvLookupUrl.test.ts +++ b/@here/olp-sdk-core/test/unit/getEnvLookupUrl.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,16 +17,21 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { getEnvLookUpUrl } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const expect = chai.expect; - -describe("getEnvLookUpUrl", function() { - it("Should return default url", function() { +describe("getEnvLookUpUrl", function () { + it("Should return default url", function () { expect(getEnvLookUpUrl("invalid environment name string")).to.be.equal( "https://api-lookup.data.api.platform.here.com/lookup/v1" ); @@ -35,37 +40,37 @@ describe("getEnvLookUpUrl", function() { ); }); - it("Should return url to the development instance", function() { + it("Should return url to the development instance", function () { expect(getEnvLookUpUrl("here-dev")).to.be.equal( "https://api-lookup.data.api.platform.sit.here.com/lookup/v1" ); }); - it("Should return url to the production instance", function() { + it("Should return url to the production instance", function () { expect(getEnvLookUpUrl("here")).to.be.equal( "https://api-lookup.data.api.platform.here.com/lookup/v1" ); }); - it("Should return url to the china production instance", function() { + it("Should return url to the china production instance", function () { expect(getEnvLookUpUrl("here-cn")).to.be.equal( "https://api-lookup.data.api.platform.hereolp.cn/lookup/v1" ); }); - it("Should return url to the china development instance", function() { + it("Should return url to the china development instance", function () { expect(getEnvLookUpUrl("here-cn-dev")).to.be.equal( "https://api-lookup.data.api.platform.in.hereolp.cn/lookup/v1" ); }); - it("Should return url to the localhost instance", function() { + it("Should return url to the localhost instance", function () { expect(getEnvLookUpUrl("local")).to.be.equal( "http://localhost:31005/lookup/v1" ); }); - it("Should return url to the custom instance", function() { + it("Should return url to the custom instance", function () { expect(getEnvLookUpUrl("http://localhost:3000/lookup/v1")).to.be.equal( "http://localhost:3000/lookup/v1" ); diff --git a/@here/olp-sdk-core/test/unit/userAgent.test.ts b/@here/olp-sdk-core/test/unit/userAgent.test.ts index 64c343fa..9a9bc44a 100644 --- a/@here/olp-sdk-core/test/unit/userAgent.test.ts +++ b/@here/olp-sdk-core/test/unit/userAgent.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,11 +17,21 @@ * License-Filename: LICENSE */ -import { assert } from "chai"; +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { addSentWithParam, SENT_WITH_PARAM } from "@here/olp-sdk-core"; -describe("addSentWithParam", function() { - it("Should be preparing string as an adding additional param", function() { +describe("addSentWithParam", function () { + it("Should be preparing string as an adding additional param", function () { const url = "https://example.com/test/url?someParam=test"; const result = addSentWithParam(url); @@ -29,7 +39,7 @@ describe("addSentWithParam", function() { assert.isTrue(result === url + "&" + SENT_WITH_PARAM); }); - it("Should be preparing string as an adding the first param", function() { + it("Should be preparing string as an adding the first param", function () { const url = "https://example.com/test/url"; const result = addSentWithParam(url); diff --git a/@here/olp-sdk-core/tsconfig.json b/@here/olp-sdk-core/tsconfig.json index 18ddde74..a43bc5c6 100644 --- a/@here/olp-sdk-core/tsconfig.json +++ b/@here/olp-sdk-core/tsconfig.json @@ -2,7 +2,6 @@ "extends": "../../tsconfig.json", "include": [ "./lib", - "./test", "index.ts", "index.web.ts" ] diff --git a/@here/olp-sdk-core/tslint.json b/@here/olp-sdk-core/tslint.json deleted file mode 100644 index dbd8a239..00000000 --- a/@here/olp-sdk-core/tslint.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "extends": ["tslint:recommended", "tslint-config-prettier"], - "rules": { - "interface-name": [true, "never-prefix"], - "object-literal-sort-keys": false, - "max-classes-per-file": false, - "variable-name": [true, "check-format", "allow-leading-underscore", "allow-snake-case"], - - "arrow-return-shorthand": true, - "await-promise": true, - "ban-comma-operator": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "warn" - }, - "eofline": true, - "forin": false, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - { - "limit": 140, - "ignore-pattern": - { - "type": "string" - } - } - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-conditional-assignment": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-imports": true, - "no-duplicate-super": true, - "no-duplicate-switch-case": true, - "no-empty": false, - "no-empty-interface": false, - "no-eval": true, - "no-for-in-array": true, - "no-import-side-effect": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-inferred-empty-object-type": false, - "no-internal-module": true, - "no-invalid-template-strings": true, - "no-invalid-this": true, - "no-magic-numbers": [ - true, - -1, 0, 1, 2, - 200, 204, 400, 404, 500 - ], - "no-misused-new": true, - "no-namespace": true, - "no-non-null-assertion": false, - "no-parameter-reassignment": false, - "no-reference": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-sparse-arrays": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": false, - "no-unnecessary-initializer": true, - "no-unsafe-finally": true, - "no-unused-expression": false, - "no-var-keyword": true, - "no-var-requires": true, - "no-void-expression": true, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "only-arrow-functions": [ - true, - "allow-declarations", - "allow-named-functions" - ], - "prefer-const": true, - "promise-function-async": true, - "quotemark": [ - true, - "double" - ], - "radix": true, - "restrict-plus-operands": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] - }, - "linterOptions": { - "exclude": [ - "test/**/*.ts", - "test/integration/**/*.ts", - "@here/**/**/*.d.ts" - ] - } -} diff --git a/@here/olp-sdk-core/vitest.config.ts b/@here/olp-sdk-core/vitest.config.ts new file mode 100644 index 00000000..348c152d --- /dev/null +++ b/@here/olp-sdk-core/vitest.config.ts @@ -0,0 +1,20 @@ +import { defineConfig } from "vitest/config"; +import { coverageReporters, hereAliases } from "../../vitest.shared"; + +export default defineConfig({ + resolve: { + alias: hereAliases, + // Prefer TypeScript sources over the compiled `.js` that sit next to them + // so the aliased packages resolve to a single, consistent source graph. + extensions: [".ts", ".mjs", ".js", ".mts", ".json"] + }, + test: { + include: ["test/**/*.test.ts"], + environment: "node", + coverage: { + provider: "v8", + include: ["lib/**/*.ts", "index*.ts"], + reporter: coverageReporters + } + } +}); diff --git a/@here/olp-sdk-core/webpack.config.js b/@here/olp-sdk-core/webpack.config.js index 91f98712..80308a2b 100644 --- a/@here/olp-sdk-core/webpack.config.js +++ b/@here/olp-sdk-core/webpack.config.js @@ -1,5 +1,4 @@ const path = require("path"); -const TerserPlugin = require("terser-webpack-plugin"); module.exports = env => { const isProd = env.NODE_ENV === "production"; @@ -13,14 +12,10 @@ module.exports = env => { }, entry: "./index.web.js", output: { - filename: `bundle.umd${isProd ? '.min' : '.dev'}.js`, + filename: `bundle.umd${isProd ? ".min" : ".dev"}.js`, path: path.resolve(__dirname), libraryTarget: "umd", - globalObject: 'this' - }, - optimization: { - minimize: true, - minimizer: [new TerserPlugin()], + globalObject: "this" } }; }; diff --git a/@here/olp-sdk-dataservice-api/.prettierrc.json b/@here/olp-sdk-dataservice-api/.prettierrc.json deleted file mode 100644 index ab28f3ed..00000000 --- a/@here/olp-sdk-dataservice-api/.prettierrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "tabWidth": 4 -} \ No newline at end of file diff --git a/@here/olp-sdk-dataservice-api/package.json b/@here/olp-sdk-dataservice-api/package.json index eacec604..4e55f218 100644 --- a/@here/olp-sdk-dataservice-api/package.json +++ b/@here/olp-sdk-dataservice-api/package.json @@ -1,6 +1,6 @@ { "name": "@here/olp-sdk-dataservice-api", - "version": "2.0.0", + "version": "3.0.0", "description": "Generated from the OpenAPI specification of the HERE Open Location Platform Data API", "main": "index.js", "typings": "index", @@ -10,32 +10,13 @@ }, "scripts": { "build": "tsc", - "lint": "tslint -c tslint.json -p tsconfig.json", - "test": "tsc -p ./test/tsconfig.json && mocha", - "coverage": "nyc npm run test", - "codecov": "npm run coverage && nyc report --reporter=lcov", - "prepare": "tsc --sourceMap false && npm run bundle", + "lint": "eslint .", + "test": "vitest run", + "coverage": "vitest run --coverage", + "prepack": "tsc --sourceMap false && npm run bundle", "bundle": "npm run bundle:dev && npm run bundle:prod", - "bundle:prod": "webpack --env.NODE_ENV=production", - "bundle:dev": "webpack --env.NODE_ENV=development" - }, - "nyc": { - "include": [ - "lib/**/*.ts", - "lib/**/*.js" - ], - "extension": [ - ".ts" - ], - "require": [ - "ts-node/register" - ], - "reporter": [ - "text", - "html" - ], - "sourceMap": true, - "instrument": true + "bundle:prod": "webpack --env NODE_ENV=production", + "bundle:dev": "webpack --env NODE_ENV=development" }, "repository": { "type": "git", @@ -48,30 +29,7 @@ }, "license": "Apache-2.0", "dependencies": {}, - "devDependencies": { - "@types/chai": "^4.2.7", - "@types/mocha": "^5.2.7", - "@types/sinon-chai": "^3.2.3", - "@types/sinon": "7.0.3", - "chai": "^4.2.0", - "husky": "^3.1.0", - "lint-staged": "^9.5.0", - "mocha": "^6.2.2", - "sinon-chai": "^3.4.0", - "sinon": "7.4.2", - "nyc": "^15.0.0", - "prettier": "^1.19.1", - "ts-node": "10.9.2", - "source-map-support": "^0.5.16", - "tslint": "^6.1.3", - "tslint-config-prettier": "^1.18.0", - "typescript": "4.0.3", - "webpack": "^4.46.0", - "webpack-cli": "^3.3.10", - "typedoc": "^0.22.13", - "terser-webpack-plugin": "^1.4.5" - }, "engines": { - "node": ">= 18.0.0" + "node": ">= 24.0.0" } } diff --git a/@here/olp-sdk-dataservice-api/test/ArtifactApi.test.ts b/@here/olp-sdk-dataservice-api/test/ArtifactApi.test.ts index eb08fdd2..d07d6d4f 100644 --- a/@here/olp-sdk-dataservice-api/test/ArtifactApi.test.ts +++ b/@here/olp-sdk-dataservice-api/test/ArtifactApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,22 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { ArtifactApi } from "@here/olp-sdk-dataservice-api"; import { RequestBuilder, UrlBuilder } from "../lib/RequestBuilder"; -chai.use(sinonChai); - -const expect = chai.expect; - -describe("ArtifactApi", function() { - it("deleteArtifactUsingDELETE", async function() { +describe("ArtifactApi", function () { + it("deleteArtifactUsingDELETE", async function () { const params = { artifactHrn: "mocked-artifactHrn" }; @@ -43,14 +47,14 @@ describe("ArtifactApi", function() { } }; const result = await ArtifactApi.deleteArtifactUsingDELETE( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("deleteFileUsingDELETE", async function() { + it("deleteFileUsingDELETE", async function () { const params = { artifactHrn: "mocked-artifactHrn", fileName: "mocked-fileName" @@ -66,14 +70,14 @@ describe("ArtifactApi", function() { } }; const result = await ArtifactApi.deleteFileUsingDELETE( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getArtifactFileUsingGET", async function() { + it("getArtifactFileUsingGET", async function () { const params = { artifactHrn: "mocked-artifactHrn", fileName: "mocked-fileName" @@ -89,14 +93,14 @@ describe("ArtifactApi", function() { } }; const result = await ArtifactApi.getArtifactFileUsingGET( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getArtifactUsingGET", async function() { + it("getArtifactUsingGET", async function () { const params = { artifactHrn: "mocked-artifactHrn", fileName: "mocked-fileName" @@ -112,14 +116,14 @@ describe("ArtifactApi", function() { } }; const result = await ArtifactApi.getArtifactUsingGET( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("putArtifactFileUsingPUT", async function() { + it("putArtifactFileUsingPUT", async function () { const params = { artifactHrn: "mocked-artifactHrn", fileName: "mocked-fileName", @@ -140,14 +144,14 @@ describe("ArtifactApi", function() { } }; const result = await ArtifactApi.putArtifactFileUsingPUT( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("registerArtifactUsingPUT", async function() { + it("registerArtifactUsingPUT", async function () { const params = { groupId: "mocked-groupId", artifactId: "mocked-artifactId", @@ -170,14 +174,14 @@ describe("ArtifactApi", function() { } }; const result = await ArtifactApi.registerArtifactUsingPUT( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("deleteSchemaUsingDELETE", async function() { + it("deleteSchemaUsingDELETE", async function () { const params = { schemaHrn: "mocked-schemaHrn" }; @@ -192,14 +196,14 @@ describe("ArtifactApi", function() { } }; const result = await ArtifactApi.deleteSchemaUsingDELETE( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getDocumentUsingGET", async function() { + it("getDocumentUsingGET", async function () { const params = { schemaHrn: "mocked-schemaHrn", file: "mocked-file" @@ -215,14 +219,14 @@ describe("ArtifactApi", function() { } }; const result = await ArtifactApi.getDocumentUsingGET( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getSchemaUsingGET", async function() { + it("getSchemaUsingGET", async function () { const params = { schemaHrn: "mocked-schemaHrn" }; @@ -237,14 +241,14 @@ describe("ArtifactApi", function() { } }; const result = await ArtifactApi.getSchemaUsingGET( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("listUsingGET", async function() { + it("listUsingGET", async function () { const params = { sort: "mocked-sort", order: "mocked-order" as any, @@ -262,14 +266,14 @@ describe("ArtifactApi", function() { } }; const result = await ArtifactApi.listUsingGET( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("updateSchemaPermissionUsingPOST", async function() { + it("updateSchemaPermissionUsingPOST", async function () { const params = { schemaHrn: "mocked-schemaHrn", updatePermissionRequest: "mocked-updatePermissionRequest" as any @@ -291,7 +295,7 @@ describe("ArtifactApi", function() { } }; const result = await ArtifactApi.updateSchemaPermissionUsingPOST( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); diff --git a/@here/olp-sdk-dataservice-api/test/AuthorizationApi.test.ts b/@here/olp-sdk-dataservice-api/test/AuthorizationApi.test.ts index e502b879..d07c2c01 100644 --- a/@here/olp-sdk-dataservice-api/test/AuthorizationApi.test.ts +++ b/@here/olp-sdk-dataservice-api/test/AuthorizationApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,19 +17,23 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { AuthorizationAPI } from "@here/olp-sdk-dataservice-api"; import { RequestBuilder, UrlBuilder } from "../lib/RequestBuilder"; -chai.use(sinonChai); - -const expect = chai.expect; - -describe("AuthorizationApi", function() { - it("getEntityGroupMembership", async function() { +describe("AuthorizationApi", function () { + it("getEntityGroupMembership", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -41,7 +45,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getEntityGroupMembership( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { realm: "mocked-realm", member: "mocked-member", @@ -53,7 +57,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getEntityManagedGroups", async function() { + it("getEntityManagedGroups", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -65,7 +69,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getEntityManagedGroups( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { realm: "mocked-realm", member: "mocked-member", @@ -77,7 +81,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getRealmMember", async function() { + it("getRealmMember", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -89,7 +93,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getRealmMember( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { realm: "mocked-realm", member: "mocked-member" @@ -99,7 +103,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getRealmMembers", async function() { + it("getRealmMembers", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -111,7 +115,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getRealmMembers( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { realm: "mocked-realm", pageToken: "mocked-page-token", @@ -125,7 +129,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("cancelRealmMemberInvite", async function() { + it("cancelRealmMemberInvite", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -140,7 +144,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.cancelRealmMemberInvite( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { realm: "mocked-realm", invite: "mocked-invite" @@ -150,7 +154,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("createRealmMemberInvite", async function() { + it("createRealmMemberInvite", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -165,7 +169,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.createRealmMemberInvite( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { realm: "mocked-realm", body: { @@ -180,7 +184,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("resendRealmMemberInvite", async function() { + it("resendRealmMemberInvite", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -195,7 +199,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.resendRealmMemberInvite( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { realm: "mocked-realm", invite: "mocked-invite" @@ -205,7 +209,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("searchRealmMemberInvites", async function() { + it("searchRealmMemberInvites", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -217,7 +221,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.searchRealmMemberInvites( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { realm: "mocked-realm", group: "mocked-group", @@ -230,7 +234,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("addGrant", async function() { + it("addGrant", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -242,7 +246,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.addGrant( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { resourceHrn: "mocked-resourceHrn", entityId: "mocked-entityId", @@ -254,7 +258,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getGrant", async function() { + it("getGrant", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -266,7 +270,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getGrant( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { resourceHrn: "mocked-resourceHrn", entityId: "mocked-entityId", @@ -278,7 +282,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getGrants", async function() { + it("getGrants", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -290,7 +294,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getGrants( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { resourceHrn: "mocked-resourceHrn", entityId: "mocked-entityId", @@ -301,7 +305,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("listGrants", async function() { + it("listGrants", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -313,7 +317,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.listGrants( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { resourceHrn: "mocked-resourceHrn", entityType: "mocked-entityType", @@ -325,7 +329,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("removeGrant", async function() { + it("removeGrant", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -340,7 +344,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.removeGrant( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { resourceHrn: "mocked-resourceHrn", entityId: "mocked-entityId", @@ -352,7 +356,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("addRoleEntity", async function() { + it("addRoleEntity", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -367,7 +371,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.addRoleEntity( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { role: "mocked-role", entity: "mocked-entity" @@ -377,7 +381,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("deleteRoleEntity", async function() { + it("deleteRoleEntity", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -392,7 +396,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.deleteRoleEntity( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { role: "mocked-role", entity: "mocked-entity" @@ -402,7 +406,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getMyRoles", async function() { + it("getMyRoles", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -414,7 +418,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getMyRoles( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { pageToken: "mocked-pageToken", count: 5 @@ -424,7 +428,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getRole", async function() { + it("getRole", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -436,7 +440,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getRole( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { role: "mocked-role" } @@ -445,7 +449,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getRoleEntities", async function() { + it("getRoleEntities", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -457,7 +461,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getRoleEntities( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { role: "mocked-role", pageToken: "mocked-pageToken", @@ -468,7 +472,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getRoleEntity", async function() { + it("getRoleEntity", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -480,7 +484,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getRoleEntity( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { role: "mocked-role", entity: "mocked-entity" @@ -490,7 +494,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getRolePermissions", async function() { + it("getRolePermissions", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -502,7 +506,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getRolePermissions( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { role: "mocked-role", pageToken: "mocked-pageToken", @@ -513,7 +517,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getRolePermission", async function() { + it("getRolePermission", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -525,7 +529,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getRolePermission( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { role: "mocked-role", permission: "mocked-permission" @@ -535,7 +539,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getRoles", async function() { + it("getRoles", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -547,7 +551,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getRoles( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { pageToken: "mocked-pageToken", count: 5, @@ -559,7 +563,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("addGroupMember", async function() { + it("addGroupMember", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -574,7 +578,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.addGroupMember( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { groupId: "mocked-groupId", member: "mocked-member" @@ -584,7 +588,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("createGroup", async function() { + it("createGroup", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -598,7 +602,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.createGroup( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { body: { name: "mocked-group", @@ -613,7 +617,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("deleteGroup", async function() { + it("deleteGroup", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -628,7 +632,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.deleteGroup( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { groupId: "mocked-groupId" } @@ -637,7 +641,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getGroup", async function() { + it("getGroup", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -649,7 +653,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getGroup( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { groupId: "mocked-groupId" } @@ -658,7 +662,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getGroupMember", async function() { + it("getGroupMember", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -670,7 +674,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getGroupMember( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { groupId: "mocked-groupId", member: "mocked-member" @@ -680,7 +684,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getGroupMembers", async function() { + it("getGroupMembers", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -692,7 +696,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getGroupMembers( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { groupId: "mocked-groupId", pageToken: "mocked-pageToken", @@ -704,7 +708,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getGroupRoles", async function() { + it("getGroupRoles", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -716,7 +720,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getGroupRoles( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { groupId: "mocked-groupId", pageToken: "mocked-pageToken", @@ -727,7 +731,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getGroups", async function() { + it("getGroups", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -739,7 +743,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getGroups( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { pageToken: "mocked-pageToken", count: 5, @@ -750,7 +754,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getMyGroups", async function() { + it("getMyGroups", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -762,7 +766,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getMyGroups( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { pageToken: "mocked-pageToken", count: 5 @@ -772,7 +776,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("leaveGroup", async function() { + it("leaveGroup", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -787,7 +791,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.leaveGroup( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { groupId: "mocked-groupId" } @@ -796,7 +800,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("removeGroupMember", async function() { + it("removeGroupMember", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -811,7 +815,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.removeGroupMember( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { groupId: "mocked-groupId", member: "mocked-member" @@ -821,7 +825,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("updateGroup", async function() { + it("updateGroup", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: RequestInit) => { @@ -837,7 +841,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.updateGroup( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { groupId: "mocked-groupId", body: { @@ -853,7 +857,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("addProjectMember", async function() { + it("addProjectMember", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -872,7 +876,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.addProjectMember( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", member: "mocked-member", @@ -883,7 +887,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("addProjectResourceRelation", async function() { + it("addProjectResourceRelation", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -906,7 +910,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.addProjectResourceRelation( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", resource: "mocked-resource", @@ -922,7 +926,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("checkProjectExistance", async function() { + it("checkProjectExistance", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -941,7 +945,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.checkProjectExistance( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", xCorrelationID: "mocked-xCorrelationID" @@ -951,7 +955,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("createProject", async function() { + it("createProject", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -977,7 +981,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.createProject( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { body: { id: "mocked-project-id", @@ -991,7 +995,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("deleteProject", async function() { + it("deleteProject", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -1010,7 +1014,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.deleteProject( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", xCorrelationID: "mocked-xCorrelationID" @@ -1020,7 +1024,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("deleteProjectMember", async function() { + it("deleteProjectMember", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -1039,7 +1043,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.deleteProjectMember( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", member: "mocked-member", @@ -1050,7 +1054,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("deleteProjectResourceReference", async function() { + it("deleteProjectResourceReference", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -1074,7 +1078,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.deleteProjectResourceReference( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", relation: "mocked-relation", @@ -1089,7 +1093,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getAllProjectList", async function() { + it("getAllProjectList", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1108,7 +1112,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getAllProjectList( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { limit: 5, pageToken: "mocked-page-token", @@ -1119,7 +1123,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getProject", async function() { + it("getProject", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1138,7 +1142,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getProject( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", xCorrelationID: "mocked-xCorrelationID" @@ -1148,7 +1152,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getProjectList", async function() { + it("getProjectList", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1167,7 +1171,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getProjectList( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { limit: 5, pageToken: "mocked-page-token", @@ -1180,7 +1184,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getProjectMember", async function() { + it("getProjectMember", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1199,7 +1203,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getProjectMember( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", member: "mocked-member", @@ -1210,7 +1214,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getProjectResource", async function() { + it("getProjectResource", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1229,7 +1233,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getProjectResource( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", resource: "mocked-resource", @@ -1241,7 +1245,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("leaveProject", async function() { + it("leaveProject", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -1260,7 +1264,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.leaveProject( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", xCorrelationID: "mocked-xCorrelationID" @@ -1270,7 +1274,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("listProjectMembers", async function() { + it("listProjectMembers", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1289,7 +1293,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.listProjectMembers( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", limit: 5, @@ -1302,7 +1306,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("listProjectResources", async function() { + it("listProjectResources", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1321,7 +1325,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.listProjectResources( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", limit: 5, @@ -1335,7 +1339,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("patchProject", async function() { + it("patchProject", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1360,7 +1364,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.patchProject( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", body: { @@ -1374,7 +1378,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getResource", async function() { + it("getResource", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1393,7 +1397,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getResource( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { resource: "mocked-resource", referenceable: true, @@ -1404,7 +1408,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getListOfWaysResourceIsLinkable", async function() { + it("getListOfWaysResourceIsLinkable", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1423,7 +1427,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getListOfWaysResourceIsLinkable( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { resource: "mocked-resource", limit: 5, @@ -1435,7 +1439,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getResourceLinkability", async function() { + it("getResourceLinkability", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1454,7 +1458,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getResourceLinkability( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { resource: "mocked-resource", availableToHrn: "mocked-availableToHrn", @@ -1465,7 +1469,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getResourceProjects", async function() { + it("getResourceProjects", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1484,7 +1488,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getResourceProjects( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { resource: "mocked-resource", limit: 5, @@ -1497,7 +1501,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getResources", async function() { + it("getResources", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1516,7 +1520,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getResources( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { type: "catalog", limit: 5, @@ -1531,7 +1535,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("listRealmResources", async function() { + it("listRealmResources", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1550,7 +1554,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.listRealmResources( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { type: "catalog", limit: 5, @@ -1562,7 +1566,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("makeResourceLinkable", async function() { + it("makeResourceLinkable", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1588,7 +1592,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.makeResourceLinkable( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { resource: "mocked-resource", body: { @@ -1603,7 +1607,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("removeResourceLinkability", async function() { + it("removeResourceLinkability", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -1622,7 +1626,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.removeResourceLinkability( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { resource: "mocked-resource", availableToHrn: "mocked-availableToHrn", @@ -1633,7 +1637,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("updateResourceLinkability", async function() { + it("updateResourceLinkability", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1659,7 +1663,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.updateResourceLinkability( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { resource: "mocked-resource", availableToHrn: "mocked-availableToHrn", @@ -1675,7 +1679,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("attachProjectPolicyToMember", async function() { + it("attachProjectPolicyToMember", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -1690,7 +1694,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.attachProjectPolicyToMember( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", member: "mocked-member", @@ -1701,7 +1705,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("createProjectPolicy", async function() { + it("createProjectPolicy", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1729,7 +1733,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.createProjectPolicy( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", body: { @@ -1748,7 +1752,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("deleteProjectPolicy", async function() { + it("deleteProjectPolicy", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -1763,7 +1767,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.deleteProjectPolicy( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", policy: "mocked-policy" @@ -1773,7 +1777,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("detachProjectPolicyFromMember", async function() { + it("detachProjectPolicyFromMember", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async ( @@ -1788,7 +1792,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.detachProjectPolicyFromMember( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", policy: "mocked-policy", @@ -1799,7 +1803,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getAllProjectMembersWithAttachedPolicy", async function() { + it("getAllProjectMembersWithAttachedPolicy", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1816,21 +1820,22 @@ describe("AuthorizationApi", function() { return Promise.resolve("success"); } }; - const result = await AuthorizationAPI.getAllProjectMembersWithAttachedPolicy( - (builder as unknown) as RequestBuilder, - { - project: "mocked-project", - policy: "mocked-policy", - xCorrelationID: "mocked-xCorelationID", - limit: 5, - pageToken: "mocked-page-token" - } - ); + const result = + await AuthorizationAPI.getAllProjectMembersWithAttachedPolicy( + builder as unknown as RequestBuilder, + { + project: "mocked-project", + policy: "mocked-policy", + xCorrelationID: "mocked-xCorelationID", + limit: 5, + pageToken: "mocked-page-token" + } + ); expect(result).to.be.equal("success"); }); - it("getAttachedProjectPoliciesForMember", async function() { + it("getAttachedProjectPoliciesForMember", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1847,21 +1852,22 @@ describe("AuthorizationApi", function() { return Promise.resolve("success"); } }; - const result = await AuthorizationAPI.getAttachedProjectPoliciesForMember( - (builder as unknown) as RequestBuilder, - { - project: "mocked-project", - member: "mocked-member", - xCorrelationID: "mocked-xCorelationID", - limit: 5, - pageToken: "mocked-page-token" - } - ); + const result = + await AuthorizationAPI.getAttachedProjectPoliciesForMember( + builder as unknown as RequestBuilder, + { + project: "mocked-project", + member: "mocked-member", + xCorrelationID: "mocked-xCorelationID", + limit: 5, + pageToken: "mocked-page-token" + } + ); expect(result).to.be.equal("success"); }); - it("getAttachedProjectPolicyForMember", async function() { + it("getAttachedProjectPolicyForMember", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1876,7 +1882,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getAttachedProjectPolicyForMember( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", member: "mocked-member", @@ -1887,7 +1893,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getProjectPolicy", async function() { + it("getProjectPolicy", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1902,7 +1908,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getProjectPolicy( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", policy: "mocked-policy" @@ -1912,7 +1918,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getProjectPolicyList", async function() { + it("getProjectPolicyList", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1930,7 +1936,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getProjectPolicyList( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", projectPolicyType: "mocked-projectPolicyType", @@ -1943,7 +1949,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("setAttachedProjectPoliciesToMember", async function() { + it("setAttachedProjectPoliciesToMember", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -1965,23 +1971,24 @@ describe("AuthorizationApi", function() { return Promise.resolve("success"); } }; - const result = await AuthorizationAPI.setAttachedProjectPoliciesToMember( - (builder as unknown) as RequestBuilder, - { - project: "mocked-project", - member: "mocked-member", - body: [ - { - policy: "mocked-policy" - } - ] - } - ); + const result = + await AuthorizationAPI.setAttachedProjectPoliciesToMember( + builder as unknown as RequestBuilder, + { + project: "mocked-project", + member: "mocked-member", + body: [ + { + policy: "mocked-policy" + } + ] + } + ); expect(result).to.be.equal("success"); }); - it("updateProjectPolicy", async function() { + it("updateProjectPolicy", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -2009,7 +2016,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.updateProjectPolicy( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", policy: "mocked-policy", @@ -2029,7 +2036,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getResourceActionsForProject", async function() { + it("getResourceActionsForProject", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -2047,7 +2054,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getResourceActionsForProject( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { project: "mocked-project", resource: "mocked-resource", @@ -2059,7 +2066,7 @@ describe("AuthorizationApi", function() { expect(result).to.be.equal("success"); }); - it("getResourceTypeActionList", async function() { + it("getResourceTypeActionList", async function () { const builder = { baseUrl: "http://mocked.url", request: async ( @@ -2077,7 +2084,7 @@ describe("AuthorizationApi", function() { } }; const result = await AuthorizationAPI.getResourceTypeActionList( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { resourceType: "artifact", xCorrelationID: "mocked-xCorelationID", diff --git a/@here/olp-sdk-dataservice-api/test/BlobApi.test.ts b/@here/olp-sdk-dataservice-api/test/BlobApi.test.ts index 5e2e6094..c02ab580 100644 --- a/@here/olp-sdk-dataservice-api/test/BlobApi.test.ts +++ b/@here/olp-sdk-dataservice-api/test/BlobApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,19 +17,22 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { BlobApi } from "@here/olp-sdk-dataservice-api"; import { RequestBuilder, UrlBuilder } from "../lib/RequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("BlobApi", function() { - it("cancelMultipartUpload", async function() { +describe("BlobApi", function () { + it("cancelMultipartUpload", async function () { const params = { layerId: "mocked-id", dataHandle: "mocked-datahandle", @@ -47,14 +50,14 @@ describe("BlobApi", function() { } }; const result = await BlobApi.cancelMultipartUpload( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("checkBlobExistsStatus", async function() { + it("checkBlobExistsStatus", async function () { const params = { layerId: "mocked-id", dataHandle: "mocked-datahandle", @@ -71,17 +74,16 @@ describe("BlobApi", function() { } }; const result = await BlobApi.checkBlobExistsStatus( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("doCompleteMultipartUpload", async function() { + it("doCompleteMultipartUpload", async function () { const params = { - url: - "http://mocked.url/layers/mocked-id/data/mocked-datahandle/multiparts/mocked-multiPartToken", + url: "http://mocked.url/layers/mocked-id/data/mocked-datahandle/multiparts/mocked-multiPartToken", layerId: "mocked-id", dataHandle: "mocked-datahandle", multiPartToken: "mocked-multiPartToken", @@ -107,14 +109,14 @@ describe("BlobApi", function() { } }; const result = await BlobApi.doCompleteMultipartUpload( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("deleteBlob", async function() { + it("deleteBlob", async function () { const params = { layerId: "mocked-id", dataHandle: "mocked-datahandle", @@ -131,14 +133,14 @@ describe("BlobApi", function() { } }; const result = await BlobApi.deleteBlob( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getBlob", async function() { + it("getBlob", async function () { const params = { layerId: "mocked-id", dataHandle: "mocked-datahandle", @@ -157,14 +159,14 @@ describe("BlobApi", function() { } }; const result = await BlobApi.getBlob( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getMultipartUploadStatus", async function() { + it("getMultipartUploadStatus", async function () { const params = { layerId: "mocked-id", dataHandle: "mocked-datahandle", @@ -182,14 +184,14 @@ describe("BlobApi", function() { } }; const result = await BlobApi.getMultipartUploadStatus( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("putData", async function() { + it("putData", async function () { const content = Buffer.from("mocked-data", "utf8"); const params = { layerId: "mocked-id", @@ -218,14 +220,14 @@ describe("BlobApi", function() { } }; const result = await BlobApi.putData( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("startMultipartUpload", async function() { + it("startMultipartUpload", async function () { const params = { layerId: "mocked-id", dataHandle: "mocked-datahandle", @@ -244,7 +246,7 @@ describe("BlobApi", function() { } }; const result = await BlobApi.startMultipartUpload( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); @@ -252,10 +254,9 @@ describe("BlobApi", function() { }); }); -it("doUploadPart", async function() { +it("doUploadPart", async function () { const params = { - url: - "http://mocked.url/layers/mocked-id/data/mocked-datahandle/multiparts/mocked-multiPartToken/parts", + url: "http://mocked.url/layers/mocked-id/data/mocked-datahandle/multiparts/mocked-multiPartToken/parts", layerId: "mocked-id", dataHandle: "mocked-datahandle", billingTag: "mocked-billingTag", @@ -279,7 +280,7 @@ it("doUploadPart", async function() { } }; const result = await BlobApi.doUploadPart( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); diff --git a/@here/olp-sdk-dataservice-api/test/BlobV2Api.test.ts b/@here/olp-sdk-dataservice-api/test/BlobV2Api.test.ts index 672f5601..d1a6c36b 100644 --- a/@here/olp-sdk-dataservice-api/test/BlobV2Api.test.ts +++ b/@here/olp-sdk-dataservice-api/test/BlobV2Api.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 HERE Europe B.V. + * Copyright (C) 2021-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,19 +17,22 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { ObjectStoreApi } from "@here/olp-sdk-dataservice-api"; import { RequestBuilder, UrlBuilder } from "../lib/RequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("ObjectStoreApi", function() { - it("cancelMultipartUploadByKey", async function() { +describe("ObjectStoreApi", function () { + it("cancelMultipartUploadByKey", async function () { const params = { layerId: "mocked-id", multipartToken: "mocked-multiPartToken" @@ -45,14 +48,14 @@ describe("ObjectStoreApi", function() { } }; const result = await ObjectStoreApi.cancelMultipartUploadByKey( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("checkKeyExists", async function() { + it("checkKeyExists", async function () { const params = { layerId: "mocked-id", key: "mocked-key" @@ -68,14 +71,14 @@ describe("ObjectStoreApi", function() { } }; const result = await ObjectStoreApi.checkKeyExists( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("completeMultipartUploadByKey", async function() { + it("completeMultipartUploadByKey", async function () { const params = { layerId: "mocked-id", multipartToken: "mocked-multiPartToken" @@ -91,14 +94,14 @@ describe("ObjectStoreApi", function() { } }; const result = await ObjectStoreApi.completeMultipartUploadByKey( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("deleteBlobByKey", async function() { + it("deleteBlobByKey", async function () { const params = { layerId: "mocked-id", key: "mocked-key" @@ -114,14 +117,14 @@ describe("ObjectStoreApi", function() { } }; const result = await ObjectStoreApi.deleteBlobByKey( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getBlobByKey", async function() { + it("getBlobByKey", async function () { const params = { layerId: "mocked-id", key: "mocked-key" @@ -137,14 +140,14 @@ describe("ObjectStoreApi", function() { } }; const result = await ObjectStoreApi.getBlobByKey( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getMultipartUploadStatusByKey", async function() { + it("getMultipartUploadStatusByKey", async function () { const params = { layerId: "mocked-id", multipartToken: "mocked-multiPartToken" @@ -160,14 +163,14 @@ describe("ObjectStoreApi", function() { } }; const result = await ObjectStoreApi.getMultipartUploadStatusByKey( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("listKeys", async function() { + it("listKeys", async function () { const params = { layerId: "mocked-id" }; @@ -182,14 +185,14 @@ describe("ObjectStoreApi", function() { } }; const result = await ObjectStoreApi.listKeys( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("putBlobByKey", async function() { + it("putBlobByKey", async function () { const params = { layerId: "mocked-id", key: "mocked-key", @@ -209,14 +212,14 @@ describe("ObjectStoreApi", function() { } }; const result = await ObjectStoreApi.putBlobByKey( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("startMultipartUploadByKey", async function() { + it("startMultipartUploadByKey", async function () { const params = { layerId: "mocked-id", key: "mocked-key", @@ -240,14 +243,14 @@ describe("ObjectStoreApi", function() { } }; const result = await ObjectStoreApi.startMultipartUploadByKey( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("uploadPartByKey data is string", async function() { + it("uploadPartByKey data is string", async function () { const params = { layerId: "mocked-id", body: "mocked-body", @@ -266,14 +269,14 @@ describe("ObjectStoreApi", function() { } }; const result = await ObjectStoreApi.uploadPartByKey( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("uploadPartByKey data us buffer", async function() { + it("uploadPartByKey data us buffer", async function () { const mockedData = Buffer.from("mocked-body", "utf8"); const params = { layerId: "mocked-id", @@ -300,14 +303,14 @@ describe("ObjectStoreApi", function() { } }; const result = await ObjectStoreApi.uploadPartByKey( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("doUploadPartByKey witout required params", async function() { + it("doUploadPartByKey witout required params", async function () { const mockedData = Buffer.from("mocked-body", "utf8"); const params = { layerId: "mocked-id", @@ -332,7 +335,7 @@ describe("ObjectStoreApi", function() { } }; const result = await ObjectStoreApi.uploadPartByKey( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); diff --git a/@here/olp-sdk-dataservice-api/test/ConfigApi.test.ts b/@here/olp-sdk-dataservice-api/test/ConfigApi.test.ts index fb57aa45..aa6908c3 100644 --- a/@here/olp-sdk-dataservice-api/test/ConfigApi.test.ts +++ b/@here/olp-sdk-dataservice-api/test/ConfigApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,22 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { ConfigApi } from "@here/olp-sdk-dataservice-api"; import { RequestBuilder, UrlBuilder } from "../lib/RequestBuilder"; -chai.use(sinonChai); - -const expect = chai.expect; - -describe("ConfigApi", function() { - it("catalogExists", async function() { +describe("ConfigApi", function () { + it("catalogExists", async function () { const params = { catalogHrn: "mocked-catalogHrn", billingTag: "mocked-billingTag" @@ -44,14 +48,14 @@ describe("ConfigApi", function() { } }; const result = await ConfigApi.catalogExists( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("createCatalog", async function() { + it("createCatalog", async function () { const params = { body: "mocked-body" as any, billingTag: "mocked-billingTag" @@ -68,14 +72,14 @@ describe("ConfigApi", function() { } }; const result = await ConfigApi.createCatalog( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("deleteCatalog", async function() { + it("deleteCatalog", async function () { const params = { catalogHrn: "mocked-catalogHrn", billingTag: "mocked-billingTag" @@ -91,14 +95,14 @@ describe("ConfigApi", function() { } }; const result = await ConfigApi.deleteCatalog( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("deleteLayer", async function() { + it("deleteLayer", async function () { const params = { catalogHrn: "mocked-catalogHrn", layerId: "mocked-layerId" @@ -114,14 +118,14 @@ describe("ConfigApi", function() { } }; const result = await ConfigApi.deleteLayer( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("disableAutomaticVersionDeletion", async function() { + it("disableAutomaticVersionDeletion", async function () { const params = { catalogHrn: "mocked-catalogHrn" }; @@ -136,14 +140,14 @@ describe("ConfigApi", function() { } }; const result = await ConfigApi.disableAutomaticVersionDeletion( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getCatalog", async function() { + it("getCatalog", async function () { const params = { catalogHrn: "mocked-catalogHrn", billingTag: "mocked-billingTag" @@ -159,14 +163,14 @@ describe("ConfigApi", function() { } }; const result = await ConfigApi.getCatalog( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getCatalogStatus", async function() { + it("getCatalogStatus", async function () { const params = { token: "mocked-token", billingTag: "mocked-billingTag" @@ -182,14 +186,14 @@ describe("ConfigApi", function() { } }; const result = await ConfigApi.getCatalogStatus( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getCatalogs", async function() { + it("getCatalogs", async function () { const params = { billingTag: "mocked-billingTag" as any, verbose: "mocked-verbose" as any, @@ -218,14 +222,14 @@ describe("ConfigApi", function() { } }; const result = await ConfigApi.getCatalogs( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("patchCatalog", async function() { + it("patchCatalog", async function () { const params = { catalogHrn: "mocked-catalogHrn", body: "mocked-body" as any @@ -245,14 +249,14 @@ describe("ConfigApi", function() { } }; const result = await ConfigApi.patchCatalog( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("patchLayer", async function() { + it("patchLayer", async function () { const params = { catalogHrn: "mocked-catalogHrn", layerId: "mocked-layerId", @@ -273,14 +277,14 @@ describe("ConfigApi", function() { } }; const result = await ConfigApi.patchLayer( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("updateCatalog", async function() { + it("updateCatalog", async function () { const params = { catalogHrn: "mocked-catalogHrn", body: "mocked-body" as any, @@ -301,7 +305,7 @@ describe("ConfigApi", function() { } }; const result = await ConfigApi.updateCatalog( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); diff --git a/@here/olp-sdk-dataservice-api/test/CoverageApi.test.ts b/@here/olp-sdk-dataservice-api/test/CoverageApi.test.ts index 7f62150e..83f16b2e 100644 --- a/@here/olp-sdk-dataservice-api/test/CoverageApi.test.ts +++ b/@here/olp-sdk-dataservice-api/test/CoverageApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,22 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { CoverageApi } from "@here/olp-sdk-dataservice-api"; import { RequestBuilder, UrlBuilder } from "../lib/RequestBuilder"; -chai.use(sinonChai); - -const expect = chai.expect; - -describe("CoverageApi", function() { - it("getDataCoverageAdminAreas", async function() { +describe("CoverageApi", function () { + it("getDataCoverageAdminAreas", async function () { const params = { layerId: "mocked-layerId", datalevel: "mocked-datalevel" @@ -44,14 +48,14 @@ describe("CoverageApi", function() { } }; const result = await CoverageApi.getDataCoverageAdminAreas( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getDataCoverageSizeMap", async function() { + it("getDataCoverageSizeMap", async function () { const params = { layerId: "mocked-layerId", datalevel: 12 @@ -67,14 +71,14 @@ describe("CoverageApi", function() { } }; const result = await CoverageApi.getDataCoverageSizeMap( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getDataCoverageSummary", async function() { + it("getDataCoverageSummary", async function () { const params = { layerId: "mocked-layerId" }; @@ -89,14 +93,14 @@ describe("CoverageApi", function() { } }; const result = await CoverageApi.getDataCoverageSummary( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getDataCoverageTile", async function() { + it("getDataCoverageTile", async function () { const params = { layerId: "mocked-layerId", datalevel: 12 @@ -112,14 +116,14 @@ describe("CoverageApi", function() { } }; const result = await CoverageApi.getDataCoverageTile( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getDataCoverageTimeMap", async function() { + it("getDataCoverageTimeMap", async function () { const params = { layerId: "mocked-layerId", datalevel: 12, @@ -136,7 +140,7 @@ describe("CoverageApi", function() { } }; const result = await CoverageApi.getDataCoverageTimeMap( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); diff --git a/@here/olp-sdk-dataservice-api/test/DataStoreApi.test.ts b/@here/olp-sdk-dataservice-api/test/DataStoreApi.test.ts index 8089eab5..c25532a1 100644 --- a/@here/olp-sdk-dataservice-api/test/DataStoreApi.test.ts +++ b/@here/olp-sdk-dataservice-api/test/DataStoreApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,10 +17,10 @@ * License-Filename: LICENSE */ -import { assert } from "chai"; +import { describe, it, assert } from "vitest"; -describe("DataStoreApiTest", function() { - it("ok", function() { +describe("DataStoreApiTest", function () { + it("ok", function () { assert(true); }); }); diff --git a/@here/olp-sdk-dataservice-api/test/IndexApi.test.ts b/@here/olp-sdk-dataservice-api/test/IndexApi.test.ts index 1c4453e5..fe8c8055 100644 --- a/@here/olp-sdk-dataservice-api/test/IndexApi.test.ts +++ b/@here/olp-sdk-dataservice-api/test/IndexApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,19 +17,22 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { IndexApi } from "@here/olp-sdk-dataservice-api"; import { RequestBuilder, UrlBuilder } from "../lib/RequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("IndexApi", function() { - it("Should performQuery provide data", async function() { +describe("IndexApi", function () { + it("Should performQuery provide data", async function () { const mockedResponse = { data: [ { @@ -58,7 +61,7 @@ describe("IndexApi", function() { } }; const response = await IndexApi.performQuery( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); assert.isDefined(response.data); @@ -66,7 +69,7 @@ describe("IndexApi", function() { expect(response).to.be.equal(mockedResponse); }); - it("Should performUpdate provide data", async function() { + it("Should performUpdate provide data", async function () { const params = { layerID: "mocked-id", request: {} @@ -82,13 +85,13 @@ describe("IndexApi", function() { } }; const result = await IndexApi.performUpdate( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("Should insertIndexes provide data", async function() { + it("Should insertIndexes provide data", async function () { const params = { layerID: "mocked-id", indexes: [{ id: "test-index" }] @@ -105,7 +108,7 @@ describe("IndexApi", function() { } }; const result = await IndexApi.insertIndexes( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); diff --git a/@here/olp-sdk-dataservice-api/test/InteractiveV1Api.test.ts b/@here/olp-sdk-dataservice-api/test/InteractiveV1Api.test.ts index c723f65c..a7277064 100644 --- a/@here/olp-sdk-dataservice-api/test/InteractiveV1Api.test.ts +++ b/@here/olp-sdk-dataservice-api/test/InteractiveV1Api.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 HERE Europe B.V. + * Copyright (C) 2021-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,18 +19,22 @@ // tslint:disable: no-magic-numbers -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { InteractiveApi, RequestOptions } from "@here/olp-sdk-dataservice-api"; import { MockedRequestBuilder } from "./MockedRequestBuilder"; -chai.use(sinonChai); - -const expect = chai.expect; - -describe("InteractiveApi", function() { - it("getApiVersion", async function() { +describe("InteractiveApi", function () { + it("getApiVersion", async function () { expect( await InteractiveApi.getApiVersion( new MockedRequestBuilder({ @@ -44,7 +48,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("getHealth", async function() { + it("getHealth", async function () { expect( await InteractiveApi.getHealth( new MockedRequestBuilder({ @@ -58,7 +62,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("getFeature", async function() { + it("getFeature", async function () { expect( await InteractiveApi.getFeature( new MockedRequestBuilder({ @@ -117,7 +121,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("getFeatures", async function() { + it("getFeatures", async function () { expect( await InteractiveApi.getFeatures( new MockedRequestBuilder({ @@ -158,7 +162,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("getFeaturesByBBox", async function() { + it("getFeaturesByBBox", async function () { expect( await InteractiveApi.getFeaturesByBBox( new MockedRequestBuilder({ @@ -238,7 +242,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("getFeaturesBySpatial", async function() { + it("getFeaturesBySpatial", async function () { expect( await InteractiveApi.getFeaturesBySpatial( new MockedRequestBuilder({ @@ -315,7 +319,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("getFeaturesBySpatialPost", async function() { + it("getFeaturesBySpatialPost", async function () { expect( await InteractiveApi.getFeaturesBySpatialPost( new MockedRequestBuilder({ @@ -414,7 +418,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("getFeaturesByTile", async function() { + it("getFeaturesByTile", async function () { expect( await InteractiveApi.getFeaturesByTile( new MockedRequestBuilder({ @@ -478,7 +482,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("getStatistics", async function() { + it("getStatistics", async function () { expect( await InteractiveApi.getStatistics( new MockedRequestBuilder({ @@ -515,7 +519,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("iterateFeatures", async function() { + it("iterateFeatures", async function () { expect( await InteractiveApi.iterateFeatures( new MockedRequestBuilder({ @@ -558,7 +562,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("searchFeatures", async function() { + it("searchFeatures", async function () { expect( await InteractiveApi.searchFeatures( new MockedRequestBuilder({ @@ -620,7 +624,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("deleteFeature", async function() { + it("deleteFeature", async function () { expect( await InteractiveApi.deleteFeature( new MockedRequestBuilder({ @@ -643,7 +647,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("deleteFeatures", async function() { + it("deleteFeatures", async function () { expect( await InteractiveApi.deleteFeatures( new MockedRequestBuilder({ @@ -666,7 +670,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("patchFeature", async function() { + it("patchFeature", async function () { expect( await InteractiveApi.patchFeature( new MockedRequestBuilder({ @@ -695,7 +699,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("postFeatures", async function() { + it("postFeatures", async function () { expect( await InteractiveApi.postFeatures( new MockedRequestBuilder({ @@ -726,7 +730,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("putFeature", async function() { + it("putFeature", async function () { expect( await InteractiveApi.putFeature( new MockedRequestBuilder({ @@ -752,7 +756,7 @@ describe("InteractiveApi", function() { ).eqls("success"); }); - it("putFeatures", async function() { + it("putFeatures", async function () { expect( await InteractiveApi.putFeatures( new MockedRequestBuilder({ diff --git a/@here/olp-sdk-dataservice-api/test/LookupApi.test.ts b/@here/olp-sdk-dataservice-api/test/LookupApi.test.ts index 32f14629..a27ffa2a 100644 --- a/@here/olp-sdk-dataservice-api/test/LookupApi.test.ts +++ b/@here/olp-sdk-dataservice-api/test/LookupApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,22 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { LookupApi } from "@here/olp-sdk-dataservice-api"; import { RequestBuilder, UrlBuilder } from "../lib/RequestBuilder"; -chai.use(sinonChai); - -const expect = chai.expect; - -describe("lookupAPI", function() { - it("platformAPI", async function() { +describe("lookupAPI", function () { + it("platformAPI", async function () { const params = { api: "mocked-api", version: "mocked-version" @@ -44,14 +48,14 @@ describe("lookupAPI", function() { } }; const result = await LookupApi.platformAPI( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("resourceAPI", async function() { + it("resourceAPI", async function () { const params = { hrn: "mocked-hrn", api: "mocked-api", @@ -69,7 +73,7 @@ describe("lookupAPI", function() { } }; const result = await LookupApi.resourceAPI( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); diff --git a/@here/olp-sdk-dataservice-api/test/MetadataApi.test.ts b/@here/olp-sdk-dataservice-api/test/MetadataApi.test.ts index effa2570..ac2f085d 100644 --- a/@here/olp-sdk-dataservice-api/test/MetadataApi.test.ts +++ b/@here/olp-sdk-dataservice-api/test/MetadataApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,19 +17,22 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { MetadataApi } from "@here/olp-sdk-dataservice-api"; import { RequestBuilder, UrlBuilder } from "../lib/RequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("MetadataApi", function() { - it("Should getChanges provide data", async function() { +describe("MetadataApi", function () { + it("Should getChanges provide data", async function () { const mockedResponse = { partitions: [ { @@ -62,14 +65,14 @@ describe("MetadataApi", function() { } }; const changes = await MetadataApi.getChanges( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); assert.equal(changes.partitions.length, 2); expect(changes).to.be.equal(mockedResponse); }); - it("Should getLayerVersions provide data", async function() { + it("Should getLayerVersions provide data", async function () { const mockedResponse = { layerVersions: [ { @@ -94,7 +97,7 @@ describe("MetadataApi", function() { } }; const versions = await MetadataApi.getLayerVersions( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { version: 42 } @@ -103,7 +106,7 @@ describe("MetadataApi", function() { expect(versions.version).to.be.equal(mockedResponse.version); }); - it("Should getPartitions provide data", async function() { + it("Should getPartitions provide data", async function () { const mockedResponse = { partitions: [ { @@ -135,14 +138,14 @@ describe("MetadataApi", function() { } }; const changes = await MetadataApi.getPartitions( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); assert.equal(changes.partitions.length, 2); expect(changes).to.be.equal(mockedResponse); }); - it("Should latestVersion provide data", async function() { + it("Should latestVersion provide data", async function () { const mockedStartedVersion = 1; const mockedResponse = { version: 42 @@ -158,7 +161,7 @@ describe("MetadataApi", function() { } }; const version = await MetadataApi.latestVersion( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { startVersion: mockedStartedVersion } @@ -166,7 +169,7 @@ describe("MetadataApi", function() { expect(version.version).to.be.equal(mockedResponse.version); }); - it("Should listVersions provide data", async function() { + it("Should listVersions provide data", async function () { const mockedStartedVersion = 1; const mockedEndVersion = 42; const mockedResponse = { @@ -192,7 +195,7 @@ describe("MetadataApi", function() { } }; const versions = await MetadataApi.listVersions( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, { startVersion: mockedStartedVersion, endVersion: mockedEndVersion @@ -202,7 +205,7 @@ describe("MetadataApi", function() { expect(versions).to.be.equal(mockedResponse); }); - it("Should minimumVersion provide data", async function() { + it("Should minimumVersion provide data", async function () { const mockedResponse = { version: 42 }; @@ -217,7 +220,7 @@ describe("MetadataApi", function() { } }; const version = await MetadataApi.minimumVersion( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, {} ); expect(version.version).to.be.equal(mockedResponse.version); diff --git a/@here/olp-sdk-dataservice-api/test/PublishApiV2.test.ts b/@here/olp-sdk-dataservice-api/test/PublishApiV2.test.ts index 8c95eb5c..1da94ad6 100644 --- a/@here/olp-sdk-dataservice-api/test/PublishApiV2.test.ts +++ b/@here/olp-sdk-dataservice-api/test/PublishApiV2.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,19 +17,23 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { PublishApi } from "@here/olp-sdk-dataservice-api"; import { RequestBuilder, UrlBuilder } from "../lib/RequestBuilder"; -chai.use(sinonChai); - -const expect = chai.expect; - -describe("PublishApi", function() { - it("getPublication", async function() { +describe("PublishApi", function () { + it("getPublication", async function () { const params = { publicationId: "mocked-publicationId", billingTag: "mocked-billingTag" @@ -45,14 +49,14 @@ describe("PublishApi", function() { } }; const result = await PublishApi.getPublication( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("initPublication", async function() { + it("initPublication", async function () { const params = { publicationId: "mocked-publicationId", body: { @@ -80,14 +84,14 @@ describe("PublishApi", function() { } }; const result = await PublishApi.initPublication( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("submitPublication", async function() { + it("submitPublication", async function () { const params = { publicationId: "mocked-publicationId", billingTag: "mocked-billingTag" @@ -106,14 +110,14 @@ describe("PublishApi", function() { } }; const result = await PublishApi.submitPublication( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("uploadPartitions", async function() { + it("uploadPartitions", async function () { const params = { layerId: "mocked-layer-id", publicationId: "mocked-publicationId", @@ -145,14 +149,14 @@ describe("PublishApi", function() { } }; const result = await PublishApi.uploadPartitions( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("cancelPublication", async function() { + it("cancelPublication", async function () { const params = { publicationId: "mocked-publicationId", billingTag: "mocked-billingTag" @@ -168,7 +172,7 @@ describe("PublishApi", function() { } }; const result = await PublishApi.cancelPublication( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); diff --git a/@here/olp-sdk-dataservice-api/test/QuetyApi.test.ts b/@here/olp-sdk-dataservice-api/test/QuetyApi.test.ts index 50b86708..c7f876ca 100644 --- a/@here/olp-sdk-dataservice-api/test/QuetyApi.test.ts +++ b/@here/olp-sdk-dataservice-api/test/QuetyApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,22 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { QueryApi } from "@here/olp-sdk-dataservice-api"; import { RequestBuilder, UrlBuilder } from "../lib/RequestBuilder"; -chai.use(sinonChai); - -const expect = chai.expect; - -describe("QueryApi", function() { - it("getChangesById", async function() { +describe("QueryApi", function () { + it("getChangesById", async function () { const params = { layerId: "mocked-layerId", startVersion: "mocked-startVersion", @@ -49,14 +53,14 @@ describe("QueryApi", function() { } }; const result = await QueryApi.getChangesById( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getPartitionsById", async function() { + it("getPartitionsById", async function () { const params = { layerId: "mocked-layerId", partition: ["mocked-partition-1", "mocked-partition-2"], @@ -75,14 +79,14 @@ describe("QueryApi", function() { } }; const result = await QueryApi.getPartitionsById( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("quadTreeIndex", async function() { + it("quadTreeIndex", async function () { const params = { layerId: "mocked-layerId", version: 124, @@ -105,14 +109,14 @@ describe("QueryApi", function() { } }; const result = await QueryApi.quadTreeIndex( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("quadTreeIndexVolatile", async function() { + it("quadTreeIndexVolatile", async function () { const params = { layerId: "mocked-layerId", quadKey: "mocked-quadKey", @@ -134,7 +138,7 @@ describe("QueryApi", function() { } }; const result = await QueryApi.quadTreeIndexVolatile( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); diff --git a/@here/olp-sdk-dataservice-api/test/RequestBuilder.test.ts b/@here/olp-sdk-dataservice-api/test/RequestBuilder.test.ts index c55e8e7f..5558714b 100644 --- a/@here/olp-sdk-dataservice-api/test/RequestBuilder.test.ts +++ b/@here/olp-sdk-dataservice-api/test/RequestBuilder.test.ts @@ -1,112 +1,119 @@ -/* - * Copyright (C) 2020 HERE Europe B.V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * License-Filename: LICENSE - */ - -import * as chai from "chai"; -import { UrlBuilder } from "../index"; - -const assert = chai.assert; -const expect = chai.expect; - -describe("UrlBuilderTest", function() { - const testUrlBuilder = new UrlBuilder("test-url"); - - it("UrlBuilder shoud be initialized", async function() { - assert.isDefined(testUrlBuilder); - expect(testUrlBuilder).to.be.instanceOf(UrlBuilder); - }); - - it("Method stringifyQuery should return URL query string from a key, value paris provided as params.", async function() { - const mockedUrlQueryResult = "testKey=testValuetestKey2=testValue2"; - - const urlQueryResult = UrlBuilder.stringifyQuery({ - testKey: "testValue", - testKey2: "testValue2" - }); - expect(urlQueryResult).to.be.equal(mockedUrlQueryResult); - }); - - it("Method appendQuery should appends parameters key, value to the URL.", async function() { - const mockedUrl = "test-url?testKey=testValue"; - - testUrlBuilder.appendQuery("testKey", "testValue"); - - assert.isDefined(testUrlBuilder); - expect(testUrlBuilder.url).to.be.equal(mockedUrl); - expect(testUrlBuilder.hasQuery).to.be.equal(true); - }); - - it("Method appendQuery should not appends parameters to the URL if value is undefined.", async function() { - const testUrlBuilder2 = new UrlBuilder("test-url"); - const mockedUrl = "test-url"; - - testUrlBuilder2.appendQuery("testKey"); - - assert.isDefined(testUrlBuilder2); - - expect(testUrlBuilder2.url).to.be.equal(mockedUrl); - expect(testUrlBuilder2.hasQuery).to.be.equal(false); - }); - - it("Method appendQuery should appends parameters key, value to the URL, when parameter value type is number", async function() { - const testUrlBuilder3 = new UrlBuilder("test-url"); - const mockedValue = 33; - const mockedUrl = "test-url?testKey3=33"; - - testUrlBuilder3.appendQuery("testKey3", mockedValue); - - assert.isDefined(testUrlBuilder3); - - expect(testUrlBuilder3.url).to.be.equal(mockedUrl); - expect(testUrlBuilder3.hasQuery).to.be.equal(true); - }); - - it("Method appendQuery should appends parameters key, value to the URL, when parameter value type is boolean", async function() { - const testBuilder = new UrlBuilder("test-url"); - testBuilder.appendQuery("testKey", false); - testBuilder.appendQuery("testKey2", true); - testBuilder.appendQuery("testKey3", undefined); - expect(testBuilder.url).to.be.equal( - "test-url?testKey=false&testKey2=true" - ); - }); - - it("Method appendQuery should appends parameters key, value to the URL, when parameter value is an array of strings", async function() { - const testUrlBuilder4 = new UrlBuilder("test-url"); - const mockedUrl = "test-url?testkey=value1,value2,value3"; - - testUrlBuilder4.appendQuery("testkey", ["value1", "value2", "value3"]); - - assert.isDefined(testUrlBuilder4); - expect(testUrlBuilder4.url).to.be.equal(mockedUrl); - expect(testUrlBuilder4.hasQuery).to.be.equal(true); - }); - - it("Method appendQuery should appends parameters key, value and operator to the URL", async function() { - const builder = new UrlBuilder("test-url"); - const mockedValue = 33; - const expecteddUrl = "test-url?testKey3!=33"; - - builder.appendQuery("testKey3", mockedValue, "!="); - - assert.isDefined(builder); - - expect(builder.url).to.be.equal(expecteddUrl); - expect(builder.hasQuery).to.be.equal(true); - }); -}); +/* + * Copyright (C) 2020-2026 HERE Europe B.V. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * License-Filename: LICENSE + */ + +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { UrlBuilder } from "../index"; + +describe("UrlBuilderTest", function () { + const testUrlBuilder = new UrlBuilder("test-url"); + + it("UrlBuilder shoud be initialized", async function () { + assert.isDefined(testUrlBuilder); + expect(testUrlBuilder).to.be.instanceOf(UrlBuilder); + }); + + it("Method stringifyQuery should return URL query string from a key, value paris provided as params.", async function () { + const mockedUrlQueryResult = "testKey=testValuetestKey2=testValue2"; + + const urlQueryResult = UrlBuilder.stringifyQuery({ + testKey: "testValue", + testKey2: "testValue2" + }); + expect(urlQueryResult).to.be.equal(mockedUrlQueryResult); + }); + + it("Method appendQuery should appends parameters key, value to the URL.", async function () { + const mockedUrl = "test-url?testKey=testValue"; + + testUrlBuilder.appendQuery("testKey", "testValue"); + + assert.isDefined(testUrlBuilder); + expect(testUrlBuilder.url).to.be.equal(mockedUrl); + expect(testUrlBuilder.hasQuery).to.be.equal(true); + }); + + it("Method appendQuery should not appends parameters to the URL if value is undefined.", async function () { + const testUrlBuilder2 = new UrlBuilder("test-url"); + const mockedUrl = "test-url"; + + testUrlBuilder2.appendQuery("testKey"); + + assert.isDefined(testUrlBuilder2); + + expect(testUrlBuilder2.url).to.be.equal(mockedUrl); + expect(testUrlBuilder2.hasQuery).to.be.equal(false); + }); + + it("Method appendQuery should appends parameters key, value to the URL, when parameter value type is number", async function () { + const testUrlBuilder3 = new UrlBuilder("test-url"); + const mockedValue = 33; + const mockedUrl = "test-url?testKey3=33"; + + testUrlBuilder3.appendQuery("testKey3", mockedValue); + + assert.isDefined(testUrlBuilder3); + + expect(testUrlBuilder3.url).to.be.equal(mockedUrl); + expect(testUrlBuilder3.hasQuery).to.be.equal(true); + }); + + it("Method appendQuery should appends parameters key, value to the URL, when parameter value type is boolean", async function () { + const testBuilder = new UrlBuilder("test-url"); + testBuilder.appendQuery("testKey", false); + testBuilder.appendQuery("testKey2", true); + testBuilder.appendQuery("testKey3", undefined); + expect(testBuilder.url).to.be.equal( + "test-url?testKey=false&testKey2=true" + ); + }); + + it("Method appendQuery should appends parameters key, value to the URL, when parameter value is an array of strings", async function () { + const testUrlBuilder4 = new UrlBuilder("test-url"); + const mockedUrl = "test-url?testkey=value1,value2,value3"; + + testUrlBuilder4.appendQuery("testkey", ["value1", "value2", "value3"]); + + assert.isDefined(testUrlBuilder4); + expect(testUrlBuilder4.url).to.be.equal(mockedUrl); + expect(testUrlBuilder4.hasQuery).to.be.equal(true); + }); + + it("Method appendQuery should appends parameters key, value and operator to the URL", async function () { + const builder = new UrlBuilder("test-url"); + const mockedValue = 33; + const expecteddUrl = "test-url?testKey3!=33"; + + builder.appendQuery("testKey3", mockedValue, "!="); + + assert.isDefined(builder); + + expect(builder.url).to.be.equal(expecteddUrl); + expect(builder.hasQuery).to.be.equal(true); + }); +}); diff --git a/@here/olp-sdk-dataservice-api/test/StreamApi.test.ts b/@here/olp-sdk-dataservice-api/test/StreamApi.test.ts index c2809d1b..d6dea881 100644 --- a/@here/olp-sdk-dataservice-api/test/StreamApi.test.ts +++ b/@here/olp-sdk-dataservice-api/test/StreamApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,22 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { StreamApi } from "@here/olp-sdk-dataservice-api"; import { RequestBuilder, UrlBuilder } from "../lib/RequestBuilder"; -chai.use(sinonChai); - -const expect = chai.expect; - -describe("StreamApi", function() { - it("Should doCommitOffsets works as expected", async function() { +describe("StreamApi", function () { + it("Should doCommitOffsets works as expected", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async (urlBuilder: UrlBuilder, options: any) => { @@ -56,8 +60,8 @@ describe("StreamApi", function() { }); }); - it("Should subscribe works as expected", async function() { - const builder = ({ + it("Should subscribe works as expected", async function () { + const builder = { baseUrl: "http://mocked.url", requestBlob: async (urlBuilder: UrlBuilder, options: any) => { expect(urlBuilder.url).to.be.equal( @@ -66,7 +70,7 @@ describe("StreamApi", function() { expect(options.method).to.be.equal("POST"); return Promise.resolve(); } - } as unknown) as RequestBuilder; + } as unknown as RequestBuilder; await StreamApi.subscribe(builder, { layerId: "mocked-id", @@ -80,8 +84,8 @@ describe("StreamApi", function() { }); }); - it("Should consumeData works as expected", async function() { - const builder = ({ + it("Should consumeData works as expected", async function () { + const builder = { baseUrl: "http://mocked.url", requestBlob: async (urlBuilder: UrlBuilder, options: any) => { expect(urlBuilder.url).to.be.equal( @@ -90,7 +94,7 @@ describe("StreamApi", function() { expect(options.method).to.be.equal("GET"); return Promise.resolve(); } - } as unknown) as RequestBuilder; + } as unknown as RequestBuilder; await StreamApi.consumeData(builder, { layerId: "mocked-id", @@ -100,8 +104,8 @@ describe("StreamApi", function() { }); }); - it("Should seekToOffset works as expected", async function() { - const builder = ({ + it("Should seekToOffset works as expected", async function () { + const builder = { baseUrl: "http://mocked.url", requestBlob: async (urlBuilder: UrlBuilder, options: any) => { expect(urlBuilder.url).to.be.equal( @@ -110,7 +114,7 @@ describe("StreamApi", function() { expect(options.method).to.be.equal("PUT"); return Promise.resolve(); } - } as unknown) as RequestBuilder; + } as unknown as RequestBuilder; await StreamApi.seekToOffset(builder, { layerId: "mocked-id", @@ -128,7 +132,7 @@ describe("StreamApi", function() { }); }); - it("Should deleteSubscription works as expected", async function() { + it("Should deleteSubscription works as expected", async function () { const builder = { baseUrl: "http://mocked.url", requestBlob: async (urlBuilder: UrlBuilder, options: any) => { @@ -148,7 +152,7 @@ describe("StreamApi", function() { }); }); - it("Should endpoint works as expected", async function() { + it("Should endpoint works as expected", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: any) => { @@ -165,7 +169,7 @@ describe("StreamApi", function() { }); }); - it("Should endpointByConsumer works as expected", async function() { + it("Should endpointByConsumer works as expected", async function () { const builder = { baseUrl: "http://mocked.url", request: async (urlBuilder: UrlBuilder, options: any) => { diff --git a/@here/olp-sdk-dataservice-api/test/VolatileBlobApi.test.ts b/@here/olp-sdk-dataservice-api/test/VolatileBlobApi.test.ts index 2a1e2268..e3c42002 100644 --- a/@here/olp-sdk-dataservice-api/test/VolatileBlobApi.test.ts +++ b/@here/olp-sdk-dataservice-api/test/VolatileBlobApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,19 +17,22 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { VolatileBlobApi } from "@here/olp-sdk-dataservice-api"; import { RequestBuilder, UrlBuilder } from "../lib/RequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("VolatileBlobApi", function() { - it("checkHandleExists", async function() { +describe("VolatileBlobApi", function () { + it("checkHandleExists", async function () { const params = { layerId: "mocked-id", dataHandle: "mocked-datahandle", @@ -46,14 +49,14 @@ describe("VolatileBlobApi", function() { } }; const result = await VolatileBlobApi.checkHandleExists( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("deleteVolatileBlob", async function() { + it("deleteVolatileBlob", async function () { const params = { layerId: "mocked-id", dataHandle: "mocked-datahandle", @@ -70,14 +73,14 @@ describe("VolatileBlobApi", function() { } }; const result = await VolatileBlobApi.deleteVolatileBlob( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("getVolatileBlob", async function() { + it("getVolatileBlob", async function () { const params = { layerId: "mocked-id", dataHandle: "mocked-datahandle", @@ -94,14 +97,14 @@ describe("VolatileBlobApi", function() { } }; const result = await VolatileBlobApi.getVolatileBlob( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); expect(result).to.be.equal("success"); }); - it("putVolatileBlob", async function() { + it("putVolatileBlob", async function () { const params = { layerId: "mocked-id", dataHandle: "mocked-datahandle", @@ -120,7 +123,7 @@ describe("VolatileBlobApi", function() { } }; const result = await VolatileBlobApi.putVolatileBlob( - (builder as unknown) as RequestBuilder, + builder as unknown as RequestBuilder, params ); diff --git a/@here/olp-sdk-dataservice-api/test/mocha.opts b/@here/olp-sdk-dataservice-api/test/mocha.opts deleted file mode 100644 index a38909c5..00000000 --- a/@here/olp-sdk-dataservice-api/test/mocha.opts +++ /dev/null @@ -1,8 +0,0 @@ ---require ts-node/register ---require source-map-support/register ---full-trace ---bail ---check-leaks ---reporter xunit ---reporter-option output=xunit.xml -test/**/*.test.ts \ No newline at end of file diff --git a/@here/olp-sdk-dataservice-api/test/tsconfig.json b/@here/olp-sdk-dataservice-api/test/tsconfig.json index 67b930c6..cb5bfb67 100644 --- a/@here/olp-sdk-dataservice-api/test/tsconfig.json +++ b/@here/olp-sdk-dataservice-api/test/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../tsconfig.json", "compilerOptions": { - "importHelpers": true - } + "importHelpers": true, + "noImplicitAny": false + }, + "include": ["../lib/**/*.ts", "../index*.ts", "./**/*.ts"] } diff --git a/@here/olp-sdk-dataservice-api/tsconfig.json b/@here/olp-sdk-dataservice-api/tsconfig.json index 236ceb42..aeae7e55 100644 --- a/@here/olp-sdk-dataservice-api/tsconfig.json +++ b/@here/olp-sdk-dataservice-api/tsconfig.json @@ -2,7 +2,6 @@ "extends": "../../tsconfig.json", "include": [ "./lib", - "./test", "index.ts" ] } \ No newline at end of file diff --git a/@here/olp-sdk-dataservice-api/tslint.json b/@here/olp-sdk-dataservice-api/tslint.json deleted file mode 100644 index 176dede1..00000000 --- a/@here/olp-sdk-dataservice-api/tslint.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "extends": ["tslint:recommended", "tslint-config-prettier"], - "rules": { - "interface-name": [true, "never-prefix"], - "object-literal-sort-keys": false, - "max-classes-per-file": false, - "variable-name": [true, "check-format", "allow-leading-underscore", "allow-snake-case"], - - "arrow-return-shorthand": true, - "await-promise": true, - "ban-comma-operator": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "none" - }, - "eofline": true, - "forin": false, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - { - "limit": 140, - "ignore-pattern": - { - "type": "string" - } - } - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-conditional-assignment": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-imports": true, - "no-duplicate-super": true, - "no-duplicate-switch-case": true, - "no-empty": false, - "no-empty-interface": false, - "no-eval": true, - "no-for-in-array": true, - "no-import-side-effect": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-inferred-empty-object-type": false, - "no-internal-module": true, - "no-invalid-template-strings": true, - "no-invalid-this": true, - "no-magic-numbers": [ - true, - -1, 0, 1, 2 - ], - "no-misused-new": true, - "no-namespace": true, - "no-non-null-assertion": false, - "no-parameter-reassignment": false, - "no-reference": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-sparse-arrays": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": false, - "no-unnecessary-initializer": true, - "no-unsafe-finally": true, - "no-unused-expression": false, - "no-var-keyword": true, - "no-var-requires": true, - "no-void-expression": true, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "only-arrow-functions": [ - false, - "allow-declarations", - "allow-named-functions" - ], - "prefer-const": true, - "promise-function-async": true, - "quotemark": [ - true, - "double" - ], - "radix": true, - "restrict-plus-operands": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] - } -} diff --git a/@here/olp-sdk-dataservice-api/vitest.config.ts b/@here/olp-sdk-dataservice-api/vitest.config.ts new file mode 100644 index 00000000..1d99439b --- /dev/null +++ b/@here/olp-sdk-dataservice-api/vitest.config.ts @@ -0,0 +1,32 @@ +import * as path from "path"; +import { defineConfig } from "vitest/config"; +import { coverageReporters } from "../../vitest.shared"; + +export default defineConfig({ + resolve: { + // Most tests reach the API namespaces through this package's own public + // barrel, so the barrel has to resolve to the TypeScript sources. + // Aliasing here is safe because these tests never spy on the exported + // namespaces - unlike the higher-level packages, which deliberately + // keep `olp-sdk-dataservice-api` compiled for that reason. + alias: [ + { + find: /^@here\/olp-sdk-dataservice-api$/, + replacement: path.join(__dirname, "index.ts") + } + ], + // Prefer TypeScript sources over the compiled `.js` that `npm run build` + // leaves next to them, so `coverage.include` actually matches the files + // the tests exercise. + extensions: [".ts", ".mjs", ".js", ".mts", ".json"] + }, + test: { + include: ["test/**/*.test.ts"], + environment: "node", + coverage: { + provider: "v8", + include: ["lib/**/*.ts", "index*.ts"], + reporter: coverageReporters + } + } +}); diff --git a/@here/olp-sdk-dataservice-api/webpack.config.js b/@here/olp-sdk-dataservice-api/webpack.config.js index 37f6693c..8b94bfe9 100644 --- a/@here/olp-sdk-dataservice-api/webpack.config.js +++ b/@here/olp-sdk-dataservice-api/webpack.config.js @@ -1,5 +1,4 @@ const path = require("path"); -const TerserPlugin = require("terser-webpack-plugin"); module.exports = env => { const isProd = env.NODE_ENV === "production"; @@ -13,14 +12,10 @@ module.exports = env => { }, entry: "./index.js", output: { - filename: `bundle.umd${isProd ? '.min' : '.dev'}.js`, + filename: `bundle.umd${isProd ? ".min" : ".dev"}.js`, path: path.resolve(__dirname), libraryTarget: "umd", - globalObject: 'this' - }, - optimization: { - minimize: true, - minimizer: [new TerserPlugin()], - } + globalObject: "this" + } }; }; diff --git a/@here/olp-sdk-dataservice-read/.prettierrc.json b/@here/olp-sdk-dataservice-read/.prettierrc.json deleted file mode 100644 index ab28f3ed..00000000 --- a/@here/olp-sdk-dataservice-read/.prettierrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "tabWidth": 4 -} \ No newline at end of file diff --git a/@here/olp-sdk-dataservice-read/README.md b/@here/olp-sdk-dataservice-read/README.md index 2dc88c9a..70076061 100644 --- a/@here/olp-sdk-dataservice-read/README.md +++ b/@here/olp-sdk-dataservice-read/README.md @@ -21,8 +21,8 @@ Here is an overview of the top-level files of the repository: The following NPM packages are required to build/test the library: - - node: >= 10.0.0 - - npm: >= 6.0.0 + - node: >= 24.0.0 + - npm: >= 10.0.0 ### Build @@ -123,6 +123,6 @@ Add minified JavaScript files to your `html` and create an object of userAuth an ## LICENSE -Copyright (C) 2019-2023 HERE Europe B.V. +Copyright (C) 2019-2026 HERE Europe B.V. For license details, see the [LICENSE](LICENSE). diff --git a/@here/olp-sdk-dataservice-read/lib/client/ArtifactClient.ts b/@here/olp-sdk-dataservice-read/lib/client/ArtifactClient.ts index a7266837..6d60f4ae 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/ArtifactClient.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/ArtifactClient.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,10 +19,8 @@ import { OlpClientSettings, RequestFactory } from "@here/olp-sdk-core"; import { ArtifactApi } from "@here/olp-sdk-dataservice-api"; -import { - SchemaDetailsRequest, - SchemaRequest -} from "@here/olp-sdk-dataservice-read"; +import { SchemaDetailsRequest } from "./SchemaDetailsRequest"; +import { SchemaRequest } from "./SchemaRequest"; /** * Gets schema metadata and data from the platform Artifact Service. @@ -62,11 +60,11 @@ export class ArtifactClient { "artifact", this.apiVersion, this.settings - ).catch(error => Promise.reject(error)); + ); return ArtifactApi.getSchemaUsingGET(request, { schemaHrn: hrnStr - }).catch(err => Promise.reject(err)); + }); } /** @@ -88,10 +86,10 @@ export class ArtifactClient { "artifact", this.apiVersion, this.settings - ).catch(error => Promise.reject(error)); + ); const response = await ArtifactApi.getArtifactUsingGET(request, { artifactHrn: variant.url - }).catch(async error => { + }).catch(async (error) => { const messages: { [key: number]: string } = { 400: "Bad request", 401: "You are not authorized to view the schema", diff --git a/@here/olp-sdk-dataservice-read/lib/client/CatalogClient.ts b/@here/olp-sdk-dataservice-read/lib/client/CatalogClient.ts index c2b5ddf3..0a492b9a 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/CatalogClient.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/CatalogClient.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,11 +25,9 @@ import { RequestFactory } from "@here/olp-sdk-core"; import { ConfigApi, MetadataApi } from "@here/olp-sdk-dataservice-api"; -import { - CatalogRequest, - CatalogVersionRequest, - LayerVersionsRequest -} from "@here/olp-sdk-dataservice-read"; +import { CatalogRequest } from "./CatalogRequest"; +import { CatalogVersionRequest } from "./CatalogVersionRequest"; +import { LayerVersionsRequest } from "./LayerVersionsRequest"; /** * Interacts with the `DataStore` catalog. @@ -45,7 +43,10 @@ export class CatalogClient { * @param settings The [[OlpClientSettings]] instance. * @return The [[CatalogClient]] instance. */ - constructor(catalogHrn: HRN, readonly settings: OlpClientSettings) { + constructor( + catalogHrn: HRN, + readonly settings: OlpClientSettings + ) { this.hrn = catalogHrn.toString(); } @@ -77,7 +78,7 @@ export class CatalogClient { return ConfigApi.getCatalog(builder, { catalogHrn: this.hrn, billingTag: request.getBillingTag() - }).catch(err => Promise.reject(err)); + }); } /** @@ -96,11 +97,11 @@ export class CatalogClient { "metadata", HRN.fromString(this.hrn), abortSignal - ).catch(error => Promise.reject(error)); + ); const earliestVersion = await MetadataApi.minimumVersion(builder, { billingTag: request.getBillingTag() - }).catch(err => Promise.reject(err)); + }); return Promise.resolve(earliestVersion.version); } @@ -125,7 +126,7 @@ export class CatalogClient { "metadata", HRN.fromString(this.hrn), abortSignal - ).catch(error => Promise.reject(error)); + ); let requestedCatalogVersion = request.getVersion(); if (requestedCatalogVersion === undefined) { @@ -136,7 +137,7 @@ export class CatalogClient { } requestedCatalogVersion = await this.getLatestVersion( catalogVersionRequest - ).catch(error => Promise.reject(error)); + ); } if (requestedCatalogVersion === undefined) { @@ -150,7 +151,7 @@ export class CatalogClient { const layerVersions = await MetadataApi.getLayerVersions(builder, { version: requestedCatalogVersion, billingTag: request.getBillingTag() - }).catch(async error => Promise.reject(new Error(error))); + }).catch(async (error) => Promise.reject(new Error(error))); return Promise.resolve(layerVersions.layerVersions); } @@ -184,12 +185,12 @@ export class CatalogClient { "metadata", HRN.fromString(this.hrn), abortSignal - ).catch(error => Promise.reject(error)); + ); const latestVersion = await MetadataApi.latestVersion(builder, { startVersion, billingTag: request.getBillingTag() - }).catch(err => Promise.reject(err)); + }); return Promise.resolve(latestVersion.version); } @@ -229,7 +230,7 @@ export class CatalogClient { "metadata", HRN.fromString(this.hrn), abortSignal - ).catch(error => Promise.reject(error)); + ); return MetadataApi.listVersions(builder, { startVersion, endVersion, diff --git a/@here/olp-sdk-dataservice-read/lib/client/CatalogRequest.ts b/@here/olp-sdk-dataservice-read/lib/client/CatalogRequest.ts index b103c564..f9b877dd 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/CatalogRequest.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/CatalogRequest.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -import { validateBillingTag } from "@here/olp-sdk-dataservice-read"; +import { validateBillingTag } from "../utils/validateBillingTag"; /** * Prepares information for calls to get catalog metadata from the platform Config Service. diff --git a/@here/olp-sdk-dataservice-read/lib/client/CatalogVersionRequest.ts b/@here/olp-sdk-dataservice-read/lib/client/CatalogVersionRequest.ts index c4fb2a67..c9889a80 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/CatalogVersionRequest.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/CatalogVersionRequest.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -import { validateBillingTag } from "@here/olp-sdk-dataservice-read"; +import { validateBillingTag } from "../utils/validateBillingTag"; /** * Prepares information for calls to the platform Artifact Service. diff --git a/@here/olp-sdk-dataservice-read/lib/client/CatalogsRequest.ts b/@here/olp-sdk-dataservice-read/lib/client/CatalogsRequest.ts index 7d531a0b..053313f9 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/CatalogsRequest.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/CatalogsRequest.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -import { validateBillingTag } from "@here/olp-sdk-dataservice-read"; +import { validateBillingTag } from "../utils/validateBillingTag"; /** * Prepares information for calls to get catalogs from the platform Config Service. diff --git a/@here/olp-sdk-dataservice-read/lib/client/ConfigClient.ts b/@here/olp-sdk-dataservice-read/lib/client/ConfigClient.ts index a6644019..b2581cb1 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/ConfigClient.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/ConfigClient.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import { OlpClientSettings, RequestFactory } from "@here/olp-sdk-core"; import { ConfigApi } from "@here/olp-sdk-dataservice-api"; -import { CatalogsRequest } from "@here/olp-sdk-dataservice-read"; +import { CatalogsRequest } from "./CatalogsRequest"; /** * A client for the platform Config Service. @@ -51,7 +51,7 @@ export class ConfigClient { "config", this.apiVersion, this.settings - ).catch(error => Promise.reject(error)); + ); const params: { verbose?: string; diff --git a/@here/olp-sdk-dataservice-read/lib/client/DataRequest.ts b/@here/olp-sdk-dataservice-read/lib/client/DataRequest.ts index df9929ba..82bb635e 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/DataRequest.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/DataRequest.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ import { FetchOptions } from "@here/olp-sdk-core"; -import { validateBillingTag } from "@here/olp-sdk-dataservice-read"; +import { validateBillingTag } from "../utils/validateBillingTag"; /** * Prepares information for calls to get data from the HERE Blob Service. diff --git a/@here/olp-sdk-dataservice-read/lib/client/IndexLayerClient.ts b/@here/olp-sdk-dataservice-read/lib/client/IndexLayerClient.ts index 4c2a543b..2fb6fd40 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/IndexLayerClient.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/IndexLayerClient.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import { RequestFactory } from "@here/olp-sdk-core"; import { BlobApi, IndexApi } from "@here/olp-sdk-dataservice-api"; -import { IndexQueryRequest } from "@here/olp-sdk-dataservice-read"; +import { IndexQueryRequest } from "./IndexQueryRequest"; /** * Parameters for use to initialize IndexLayerClient. @@ -95,13 +95,13 @@ export class IndexLayerClient { "index", HRN.fromString(this.hrn), abortSignal - ).catch(err => Promise.reject(err)); + ); const indexMetadata = await IndexApi.performQuery(requestBuilder, { layerID: this.layerId, query, huge: request.getHugeResponse() - }).catch(err => Promise.reject(err)); + }); return indexMetadata.data ? Promise.resolve(indexMetadata.data) @@ -133,7 +133,7 @@ export class IndexLayerClient { "blob", HRN.fromString(this.hrn), abortSignal - ).catch(err => Promise.reject(err)); + ); return BlobApi.getBlob(builder, { dataHandle: model.id, @@ -158,6 +158,6 @@ export class IndexLayerClient { this.settings, hrn, abortSignal - ).catch(err => Promise.reject(err)); + ); } } diff --git a/@here/olp-sdk-dataservice-read/lib/client/LayerVersionsRequest.ts b/@here/olp-sdk-dataservice-read/lib/client/LayerVersionsRequest.ts index 107e49d1..16a1fe8d 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/LayerVersionsRequest.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/LayerVersionsRequest.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -import { validateBillingTag } from "@here/olp-sdk-dataservice-read"; +import { validateBillingTag } from "../utils/validateBillingTag"; /** Prepares information for calls to get layer versions of a specific catalog version. */ export class LayerVersionsRequest { diff --git a/@here/olp-sdk-dataservice-read/lib/client/PartitionsRequest.ts b/@here/olp-sdk-dataservice-read/lib/client/PartitionsRequest.ts index ddf229a3..abd17c5b 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/PartitionsRequest.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/PartitionsRequest.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,10 +19,8 @@ import { FetchOptions } from "@here/olp-sdk-core"; import { AdditionalFields } from "@here/olp-sdk-dataservice-api"; -import { - validateBillingTag, - validatePartitionsIdsList -} from "@here/olp-sdk-dataservice-read"; +import { validateBillingTag } from "../utils/validateBillingTag"; +import { validatePartitionsIdsList } from "../utils/validatePartitionsIdsList"; /** * Prepares information for calls to get partitions metadata from the Metadata Service API. diff --git a/@here/olp-sdk-dataservice-read/lib/client/QuadKeyPartitionsRequest.ts b/@here/olp-sdk-dataservice-read/lib/client/QuadKeyPartitionsRequest.ts index 4f6d99c1..caa190a1 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/QuadKeyPartitionsRequest.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/QuadKeyPartitionsRequest.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,10 +19,8 @@ import { AdditionalFields } from "@here/olp-sdk-dataservice-api"; import { QuadKey } from "@here/olp-sdk-core"; -import { - QuadTreeIndexDepth, - validateBillingTag -} from "@here/olp-sdk-dataservice-read"; +import { validateBillingTag } from "../utils/validateBillingTag"; +import { QuadTreeIndexDepth } from "./QuadTreeIndexRequest"; /** * Prepares information for calls to get quadtree metadata from the Query Service API. diff --git a/@here/olp-sdk-dataservice-read/lib/client/QuadTreeIndexRequest.ts b/@here/olp-sdk-dataservice-read/lib/client/QuadTreeIndexRequest.ts index 1d094779..a7827361 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/QuadTreeIndexRequest.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/QuadTreeIndexRequest.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import { HRN, QuadKey } from "@here/olp-sdk-core"; import { AdditionalFields } from "@here/olp-sdk-dataservice-api"; -import { validateBillingTag } from "@here/olp-sdk-dataservice-read"; +import { validateBillingTag } from "../utils/validateBillingTag"; /** * The recursion depth of the quadtree. diff --git a/@here/olp-sdk-dataservice-read/lib/client/QueryClient.ts b/@here/olp-sdk-dataservice-read/lib/client/QueryClient.ts index 36ff73b0..e530b9ba 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/QueryClient.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/QueryClient.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,11 +29,9 @@ import { MetadataApi, QueryApi } from "@here/olp-sdk-dataservice-api"; -import { - MetadataCacheRepository, - PartitionsRequest, - QuadTreeIndexRequest -} from "@here/olp-sdk-dataservice-read"; +import { MetadataCacheRepository } from "../cache/MetadataCacheRepository"; +import { PartitionsRequest } from "./PartitionsRequest"; +import { QuadTreeIndexRequest } from "./QuadTreeIndexRequest"; /** * A client for the Query Service API that provides a way to get information (metadata) @@ -87,7 +85,7 @@ export class QueryClient { request.getCatalogHrn(), abortSignal, request.getBillingTag() - ).catch(error => + ).catch((error) => Promise.reject( `Error getting the last catalog version: ${error}` ) @@ -107,7 +105,7 @@ export class QueryClient { this.settings, request.getCatalogHrn(), abortSignal - ).catch(error => + ).catch((error) => Promise.reject( `Erorr creating request object for query service: ${error}` ) @@ -205,7 +203,7 @@ export class QueryClient { this.settings, hrn, abortSignal - ).catch(error => + ).catch((error) => Promise.reject( `Erorr creating request object for query service: ${error}` ) @@ -218,7 +216,7 @@ export class QueryClient { additionalFields: request.getAdditionalFields(), version: catalogVersion !== undefined ? `${catalogVersion}` : undefined - }).catch(err => Promise.reject(err)); + }); if ( request.getFetchOption() !== FetchOptions.OnlineOnly && @@ -227,7 +225,7 @@ export class QueryClient { medatada.partitions.length ) { const partitions: MetadataApi.Partition[] = medatada.partitions.map( - partition => ({ + (partition) => ({ checksum: partition.checksum, compressedDataSize: partition.compressedDataSize, dataHandle: partition.dataHandle || "", @@ -262,7 +260,7 @@ export class QueryClient { this.settings, catalogHrn, abortSignal - ).catch(error => + ).catch((error) => Promise.reject( `Erorr creating request object for metadata service: ${error}` ) @@ -271,7 +269,7 @@ export class QueryClient { const latestVersion = await MetadataApi.latestVersion(request, { startVersion: -1, billingTag - }).catch(error => Promise.reject(error)); + }); return Promise.resolve(latestVersion.version); } diff --git a/@here/olp-sdk-dataservice-read/lib/client/SchemaDetailsRequest.ts b/@here/olp-sdk-dataservice-read/lib/client/SchemaDetailsRequest.ts index 6c215bc6..8ae96cdc 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/SchemaDetailsRequest.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/SchemaDetailsRequest.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ import { HRN } from "@here/olp-sdk-core"; -import { validateBillingTag } from "@here/olp-sdk-dataservice-read"; +import { validateBillingTag } from "../utils/validateBillingTag"; /** * Prepares information for calls to the platform Artifact Service. diff --git a/@here/olp-sdk-dataservice-read/lib/client/SchemaRequest.ts b/@here/olp-sdk-dataservice-read/lib/client/SchemaRequest.ts index 8df44897..cb0097c2 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/SchemaRequest.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/SchemaRequest.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ import { ArtifactApi } from "@here/olp-sdk-dataservice-api"; -import { validateBillingTag } from "@here/olp-sdk-dataservice-read"; +import { validateBillingTag } from "../utils/validateBillingTag"; /** * Prepares information for calls to the platform Artifact Service. diff --git a/@here/olp-sdk-dataservice-read/lib/client/StatisticsClient.ts b/@here/olp-sdk-dataservice-read/lib/client/StatisticsClient.ts index 19d9b933..33b6120d 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/StatisticsClient.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/StatisticsClient.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,11 +24,8 @@ import { RequestFactory } from "@here/olp-sdk-core"; import { CoverageApi } from "@here/olp-sdk-dataservice-api"; -import { - CoverageDataType, - StatisticsRequest, - SummaryRequest -} from "@here/olp-sdk-dataservice-read"; +import { CoverageDataType, StatisticsRequest } from "./StatisticsRequest"; +import { SummaryRequest } from "./SummaryRequest"; /** * A client for the platform Statistics Service. @@ -65,9 +62,7 @@ export class StatisticsClient { if (layerId === undefined) { return Promise.reject(new Error(`No layerId provided`)); } - const coverageRequestBuilder = await this.getRequestBuilder( - catalogHrn - ).catch(error => Promise.reject(error)); + const coverageRequestBuilder = await this.getRequestBuilder(catalogHrn); return CoverageApi.getDataCoverageSummary(coverageRequestBuilder, { layerId }); @@ -101,9 +96,7 @@ export class StatisticsClient { if (typemap === undefined) { return Promise.reject(new Error(`No typemap provided`)); } - const coverageRequestBuilder = await this.getRequestBuilder( - catalogHRN - ).catch(error => Promise.reject(error)); + const coverageRequestBuilder = await this.getRequestBuilder(catalogHRN); let request; switch (typemap) { diff --git a/@here/olp-sdk-dataservice-read/lib/client/StatisticsRequest.ts b/@here/olp-sdk-dataservice-read/lib/client/StatisticsRequest.ts index cc20b0a7..5de2771b 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/StatisticsRequest.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/StatisticsRequest.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ import { HRN } from "@here/olp-sdk-core"; -import { validateBillingTag } from "@here/olp-sdk-dataservice-read"; +import { validateBillingTag } from "../utils/validateBillingTag"; /** * A map type that is supported by the platform Statistics Service. diff --git a/@here/olp-sdk-dataservice-read/lib/client/StreamLayerClient.ts b/@here/olp-sdk-dataservice-read/lib/client/StreamLayerClient.ts index b9cb8037..2fa82e7c 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/StreamLayerClient.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/StreamLayerClient.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,12 +24,10 @@ import { RequestFactory } from "@here/olp-sdk-core"; import { BlobApi, StreamApi } from "@here/olp-sdk-dataservice-api"; -import { - PollRequest, - SeekRequest, - SubscribeRequest, - UnsubscribeRequest -} from "@here/olp-sdk-dataservice-read"; +import { PollRequest } from "./PollRequest"; +import { SeekRequest } from "./SeekRequest"; +import { SubscribeRequest } from "./SubscribeRequest"; +import { UnsubscribeRequest } from "./UnsubscribeRequest"; export interface StreamLayerClientParams { // The HERE Resource Name (HRN) of the catalog from which you want to get partitions metadata and data. @@ -91,7 +89,7 @@ export class StreamLayerClient { this.settings, this.catalogHrn, abortSignal - ).catch(error => Promise.reject(error)); + ); const subscribtionRequestParams = { layerId: this.layerId, @@ -104,22 +102,20 @@ export class StreamLayerClient { const subscriptionResult = await StreamApi.subscribe( requestBuilder, subscribtionRequestParams - ) - .then( - async ( - res: Response - ): Promise<{ - nodeBaseURL: string; - subscriptionId: string; - xCorrelationId?: string; - }> => { - const xCorrelationId = - res.headers.get("X-Correlation-Id") || undefined; - const responseData = await res.json(); - return Promise.resolve({ xCorrelationId, ...responseData }); - } - ) - .catch(err => Promise.reject(err)); + ).then( + async ( + res: Response + ): Promise<{ + nodeBaseURL: string; + subscriptionId: string; + xCorrelationId?: string; + }> => { + const xCorrelationId = + res.headers.get("X-Correlation-Id") || undefined; + const responseData = await res.json(); + return Promise.resolve({ xCorrelationId, ...responseData }); + } + ); // Update xCorrelationId this.xCorrelationId = subscriptionResult.xCorrelationId; @@ -178,24 +174,21 @@ export class StreamLayerClient { const consumeResponse = await StreamApi.consumeData( requestBuilder, consumeDataParams - ) - .then( - async ( - response: Response - ): Promise<{ - data: StreamApi.Message[]; - xCorrelationId?: string; - }> => { - const data = await response.json(); - return Promise.resolve({ - xCorrelationId: - response.headers.get("X-Correlation-Id") || - undefined, - data: data && data.messages ? data.messages : [] - }); - } - ) - .catch(error => Promise.reject(error)); + ).then( + async ( + response: Response + ): Promise<{ + data: StreamApi.Message[]; + xCorrelationId?: string; + }> => { + const data = await response.json(); + return Promise.resolve({ + xCorrelationId: + response.headers.get("X-Correlation-Id") || undefined, + data: data && data.messages ? data.messages : [] + }); + } + ); // Update xCorrelationId this.xCorrelationId = consumeResponse.xCorrelationId; @@ -205,7 +198,7 @@ export class StreamLayerClient { const latestOffsets: { [key: string]: number; } = consumeResponse.data - .map(msg => msg.offset) + .map((msg) => msg.offset) .reduce( ( acc: { [key: string]: number }, @@ -222,7 +215,7 @@ export class StreamLayerClient { await StreamApi.doCommitOffsets(requestBuilder, { commitOffsets: { - offsets: Object.keys(latestOffsets).map(key => ({ + offsets: Object.keys(latestOffsets).map((key) => ({ partition: +key, offset: latestOffsets[key] })) @@ -231,7 +224,7 @@ export class StreamLayerClient { mode: request.getMode(), layerId: this.layerId, xCorrelationId: this.xCorrelationId - }).catch(async error => { + }).catch(async (error) => { console.log( `Commit offsets unsuccessful, error=${error.message}` ); @@ -312,7 +305,7 @@ export class StreamLayerClient { this.settings, this.catalogHrn, abortSignal - ).catch(error => Promise.reject(error)); + ); return BlobApi.getBlob(requestBuilder, { dataHandle: message.metaData.dataHandle, @@ -376,13 +369,10 @@ export class StreamLayerClient { mode: request.getMode(), subscriptionId: request.getSubscriptionId(), xCorrelationId: this.xCorrelationId - }) - .then(async response => { - this.xCorrelationId = - response.headers.get("X-Correlation-Id") || - this.xCorrelationId; - return response; - }) - .catch(err => Promise.reject(err)); + }).then(async (response) => { + this.xCorrelationId = + response.headers.get("X-Correlation-Id") || this.xCorrelationId; + return response; + }); } } diff --git a/@here/olp-sdk-dataservice-read/lib/client/SummaryRequest.ts b/@here/olp-sdk-dataservice-read/lib/client/SummaryRequest.ts index 31ec9e1b..c95b7bb6 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/SummaryRequest.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/SummaryRequest.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ import { HRN } from "@here/olp-sdk-core"; -import { validateBillingTag } from "@here/olp-sdk-dataservice-read"; +import { validateBillingTag } from "../utils/validateBillingTag"; /** * Prepares information for calls to get a summary from the platform Statistics Service. diff --git a/@here/olp-sdk-dataservice-read/lib/client/TileRequest.ts b/@here/olp-sdk-dataservice-read/lib/client/TileRequest.ts index cccc4fe1..82fb3324 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/TileRequest.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/TileRequest.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ import { QuadKey } from "@here/olp-sdk-core"; import { MetadataApi } from "@here/olp-sdk-dataservice-api"; -import { validateBillingTag } from "@here/olp-sdk-dataservice-read"; +import { validateBillingTag } from "../utils/validateBillingTag"; /** * Parameters used to get a tile. diff --git a/@here/olp-sdk-dataservice-read/lib/client/VersionedLayerClient.ts b/@here/olp-sdk-dataservice-read/lib/client/VersionedLayerClient.ts index da0e18a3..433973ba 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/VersionedLayerClient.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/VersionedLayerClient.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,17 +28,14 @@ import { STATUS_CODES } from "@here/olp-sdk-core"; import { BlobApi, MetadataApi, QueryApi } from "@here/olp-sdk-dataservice-api"; -import { - DataRequest, - getTile, - MetadataCacheRepository, - PartitionsRequest, - QuadKeyPartitionsRequest, - QuadTreeIndexRequest, - QueryClient, - TileRequest, - TileRequestParams -} from "@here/olp-sdk-dataservice-read"; +import { MetadataCacheRepository } from "../cache/MetadataCacheRepository"; +import { getTile } from "../utils/getTile"; +import { DataRequest } from "./DataRequest"; +import { PartitionsRequest } from "./PartitionsRequest"; +import { QuadKeyPartitionsRequest } from "./QuadKeyPartitionsRequest"; +import { QuadTreeIndexRequest } from "./QuadTreeIndexRequest"; +import { QueryClient } from "./QueryClient"; +import { TileRequest, TileRequestParams } from "./TileRequest"; /** * Parameters for use to initialize VersionLayerClient. */ @@ -156,7 +153,7 @@ export class VersionedLayerClient { // fetch the latest version and lock it to the instance. this.version = await this.getLatestVersion( dataRequest.getBillingTag() - ).catch(error => Promise.reject(error)); + ); } if (this.version === undefined) { @@ -172,7 +169,7 @@ export class VersionedLayerClient { partitionId, dataRequest.getFetchOption(), dataRequest.getBillingTag() - ).catch(error => Promise.reject(error)); + ); return this.downloadPartition( partitionIdDataHandle, abortSignal, @@ -229,9 +226,7 @@ export class VersionedLayerClient { ): Promise { if (this.version === undefined) { // fetch the latest version and lock it to the instance. - this.version = await this.getLatestVersion( - request.getBillingTag() - ).catch(error => Promise.reject(error)); + this.version = await this.getLatestVersion(request.getBillingTag()); } if (this.version === undefined) { @@ -300,7 +295,7 @@ export class VersionedLayerClient { | "crc" ) => { return partitions.every( - partition => partition[field] !== undefined + (partition) => partition[field] !== undefined ); } ); @@ -319,14 +314,14 @@ export class VersionedLayerClient { "metadata", HRN.fromString(this.hrn), abortSignal - ).catch(error => Promise.reject(error)); + ); const metadata = await MetadataApi.getPartitions(metaRequestBilder, { version: this.version, layerId: this.layerId, additionalFields: request.getAdditionalFields(), billingTag: request.getBillingTag() - }).catch(error => Promise.reject(error)); + }); if ( request.getFetchOption() !== FetchOptions.OnlineOnly && @@ -391,11 +386,11 @@ export class VersionedLayerClient { const builder = await this.getRequestBuilder( "metadata", HRN.fromString(this.hrn) - ).catch(error => Promise.reject(error)); + ); const latestVersion = await MetadataApi.latestVersion(builder, { startVersion: -1, billingTag - }).catch(error => Promise.reject(error)); + }); return Promise.resolve(latestVersion.version); } @@ -408,7 +403,7 @@ export class VersionedLayerClient { "blob", HRN.fromString(this.hrn), abortSignal - ).catch(error => Promise.reject(error)); + ); return BlobApi.getBlob(builder, { dataHandle, layerId: this.layerId, diff --git a/@here/olp-sdk-dataservice-read/lib/client/VolatileLayerClient.ts b/@here/olp-sdk-dataservice-read/lib/client/VolatileLayerClient.ts index 7653cb95..79bbad2e 100644 --- a/@here/olp-sdk-dataservice-read/lib/client/VolatileLayerClient.ts +++ b/@here/olp-sdk-dataservice-read/lib/client/VolatileLayerClient.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,17 +32,14 @@ import { QueryApi, VolatileBlobApi } from "@here/olp-sdk-dataservice-api"; -import { - DataRequest, - getTile, - MetadataCacheRepository, - PartitionsRequest, - QuadKeyPartitionsRequest, - QuadTreeIndexRequest, - QueryClient, - TileRequest, - TileRequestParams -} from "@here/olp-sdk-dataservice-read"; +import { MetadataCacheRepository } from "../cache/MetadataCacheRepository"; +import { getTile } from "../utils/getTile"; +import { DataRequest } from "./DataRequest"; +import { PartitionsRequest } from "./PartitionsRequest"; +import { QuadKeyPartitionsRequest } from "./QuadKeyPartitionsRequest"; +import { QuadTreeIndexRequest } from "./QuadTreeIndexRequest"; +import { QueryClient } from "./QueryClient"; +import { TileRequest, TileRequestParams } from "./TileRequest"; /** * Parameters for use to initialize VolatileLayerClient. @@ -140,11 +137,12 @@ export class VolatileLayerClient { } if (partitionId) { - const partitionIdDataHandle = await this.getDataHandleByPartitionId( - partitionId, - dataRequest.getFetchOption(), - dataRequest.getBillingTag() - ).catch(error => Promise.reject(error)); + const partitionIdDataHandle = + await this.getDataHandleByPartitionId( + partitionId, + dataRequest.getFetchOption(), + dataRequest.getBillingTag() + ); return this.downloadPartition( partitionIdDataHandle, @@ -257,7 +255,7 @@ export class VolatileLayerClient { | "crc" ) => { return partitions.every( - partition => partition[field] !== undefined + (partition) => partition[field] !== undefined ); } ); @@ -275,13 +273,13 @@ export class VolatileLayerClient { const metaRequestBilder = await this.getRequestBuilder( "metadata", HRN.fromString(this.hrn) - ).catch(error => Promise.reject(error)); + ); const metadata = await MetadataApi.getPartitions(metaRequestBilder, { layerId: this.layerId, additionalFields: request.getAdditionalFields(), billingTag: request.getBillingTag() - }).catch(error => Promise.reject(error)); + }); if ( request.getFetchOption() !== FetchOptions.OnlineOnly && @@ -306,7 +304,7 @@ export class VolatileLayerClient { "volatile-blob", HRN.fromString(this.hrn), abortSignal - ).catch(error => Promise.reject(error)); + ); return VolatileBlobApi.getVolatileBlob(builder, { dataHandle, layerId: this.layerId, diff --git a/@here/olp-sdk-dataservice-read/lib/utils/getTile.ts b/@here/olp-sdk-dataservice-read/lib/utils/getTile.ts index bb8fd1ce..4a2ec48c 100644 --- a/@here/olp-sdk-dataservice-read/lib/utils/getTile.ts +++ b/@here/olp-sdk-dataservice-read/lib/utils/getTile.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,14 +27,13 @@ import { } from "@here/olp-sdk-core"; import { BlobApi } from "@here/olp-sdk-dataservice-api"; import { Index as QuadTreeIndex } from "@here/olp-sdk-dataservice-api/lib/query-api"; +import { QuadTreeIndexCacheRepository } from "../cache/QuadTreeIndexCacheRepository"; import { - QuadTreeIndexCacheRepository, QuadTreeIndexDepth, - QuadTreeIndexRequest, - QueryClient, - TileRequest, - TileRequestParams -} from "@here/olp-sdk-dataservice-read"; + QuadTreeIndexRequest +} from "../client/QuadTreeIndexRequest"; +import { QueryClient } from "../client/QueryClient"; +import { TileRequest, TileRequestParams } from "../client/TileRequest"; /** * Parameters used to get a tile. */ @@ -104,7 +103,7 @@ export async function getTile( params.settings, params.catalogHrn, abortSignal - ).catch(error => Promise.reject(error)); + ); const delta = 4; const requestedTileKey = TileKey.fromRowColumnLevel( @@ -145,7 +144,7 @@ export async function getTile( tileKey: parentTileKey, abortSignal, billingTag: request.getBillingTag() - }).catch(e => Promise.reject(e)); + }); } if (!quadTreeIndex.subQuads || !quadTreeIndex.subQuads.length) { @@ -168,7 +167,7 @@ export async function getTile( --level ) { const metadata = subQuads.find( - item => + (item) => item.subQuadKey === currentTileKey.getSubHereTile(currentDelta) ); @@ -223,9 +222,10 @@ export async function fetchQuadTreeIndex( quadTreeIndexRequest.withVersion(params.catalogVersion); } - const quadTreeIndex = await queryClient - .fetchQuadTreeIndex(quadTreeIndexRequest, params.abortSignal) - .catch(err => Promise.reject(err)); + const quadTreeIndex = await queryClient.fetchQuadTreeIndex( + quadTreeIndexRequest, + params.abortSignal + ); if ( params.fetchOptions !== FetchOptions.OnlineOnly && diff --git a/@here/olp-sdk-dataservice-read/package.json b/@here/olp-sdk-dataservice-read/package.json index c203e031..b1849373 100644 --- a/@here/olp-sdk-dataservice-read/package.json +++ b/@here/olp-sdk-dataservice-read/package.json @@ -1,6 +1,6 @@ { "name": "@here/olp-sdk-dataservice-read", - "version": "2.0.0", + "version": "3.0.0", "description": "Wrapper around a subset of the HERE Open Location Platform Data REST API related to reading data from OLP catalogs", "main": "index.js", "browser": "index.web.js", @@ -11,32 +11,13 @@ }, "scripts": { "build": "tsc", - "lint": "tslint -c tslint.json -p tsconfig.json", - "test": "tsc -p ./test/tsconfig.json && mocha", - "coverage": "nyc npm run test", - "codecov": "npm run coverage && nyc report --reporter=lcov", - "prepare": "tsc --sourceMap false && npm run bundle", + "lint": "eslint .", + "test": "vitest run", + "coverage": "vitest run --coverage", + "prepack": "tsc --sourceMap false && npm run bundle", "bundle": "npm run bundle:dev && npm run bundle:prod", - "bundle:prod": "webpack --env.NODE_ENV=production", - "bundle:dev": "webpack --env.NODE_ENV=development" - }, - "nyc": { - "include": [ - "lib/**/*.ts", - "lib/**/*.js" - ], - "extension": [ - ".ts" - ], - "require": [ - "ts-node/register" - ], - "reporter": [ - "text", - "html" - ], - "sourceMap": true, - "instrument": true + "bundle:prod": "webpack --env NODE_ENV=production", + "bundle:dev": "webpack --env NODE_ENV=development" }, "repository": { "type": "git", @@ -49,36 +30,11 @@ }, "license": "Apache-2.0", "dependencies": { - "@here/olp-sdk-core": "^2.0.0", - "@here/olp-sdk-dataservice-api": "^2.0.0", - "@here/olp-sdk-fetch": "^2.0.0" - }, - "devDependencies": { - "@types/chai": "^4.2.7", - "@types/mocha": "^5.2.7", - "@types/node": "18.7.14", - "@types/sinon": "7.0.3", - "@types/sinon-chai": "^3.2.3", - "chai": "^4.2.0", - "glob": "^7.1.6", - "husky": "^3.1.0", - "lint-staged": "^9.5.0", - "mocha": "^6.2.2", - "nyc": "^15.0.0", - "prettier": "^1.19.1", - "sinon": "7.4.2", - "sinon-chai": "^3.4.0", - "source-map-support": "^0.5.16", - "ts-node": "10.9.2", - "tslint": "^6.1.3", - "tslint-config-prettier": "^1.18.0", - "typedoc": "^0.22.13", - "typescript": "4.0.3", - "webpack": "^4.46.0", - "webpack-cli": "^3.3.10", - "terser-webpack-plugin": "^1.4.5" + "@here/olp-sdk-core": "^3.0.0", + "@here/olp-sdk-dataservice-api": "^3.0.0", + "@here/olp-sdk-fetch": "^3.0.0" }, "engines": { - "node": ">= 18.0.0" + "node": ">= 24.0.0" } } diff --git a/@here/olp-sdk-dataservice-read/test/mocha.opts b/@here/olp-sdk-dataservice-read/test/mocha.opts deleted file mode 100644 index a38909c5..00000000 --- a/@here/olp-sdk-dataservice-read/test/mocha.opts +++ /dev/null @@ -1,8 +0,0 @@ ---require ts-node/register ---require source-map-support/register ---full-trace ---bail ---check-leaks ---reporter xunit ---reporter-option output=xunit.xml -test/**/*.test.ts \ No newline at end of file diff --git a/@here/olp-sdk-dataservice-read/test/tsconfig.json b/@here/olp-sdk-dataservice-read/test/tsconfig.json index 67b930c6..cb5bfb67 100644 --- a/@here/olp-sdk-dataservice-read/test/tsconfig.json +++ b/@here/olp-sdk-dataservice-read/test/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../tsconfig.json", "compilerOptions": { - "importHelpers": true - } + "importHelpers": true, + "noImplicitAny": false + }, + "include": ["../lib/**/*.ts", "../index*.ts", "./**/*.ts"] } diff --git a/@here/olp-sdk-dataservice-read/test/unit/ArtifactClient.test.ts b/@here/olp-sdk-dataservice-read/test/unit/ArtifactClient.test.ts index d4ab6eda..ee03f004 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/ArtifactClient.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/ArtifactClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,64 +17,66 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { createStubInstance } from "./stub-instance"; import * as dataServiceRead from "@here/olp-sdk-dataservice-read"; import { ArtifactApi } from "@here/olp-sdk-dataservice-api"; import * as dataserviceCore from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("ArtifactClient", function() { - let sandbox: sinon.SinonSandbox; - let olpClientSettingsStub: sinon.SinonStubbedInstance; - let getArtifactUsingGETStub: sinon.SinonStub; - let getSchemaUsingGETStub: sinon.SinonStub; - let getBaseUrlRequestStub: sinon.SinonStub; +describe("ArtifactClient", function () { + let olpClientSettingsStub: any; + let getArtifactUsingGETStub: any; + let getSchemaUsingGETStub: any; + let getBaseUrlRequestStub: any; const mockedHRN = dataserviceCore.HRN.fromString( "hrn:here:data:::mocked-hrn" ); const mockedLayerId = "mocked-layed-id"; const fakeURL = "http://fake-base.url"; - before(function() { - sandbox = sinon.createSandbox(); - }); + beforeAll(function () {}); - beforeEach(function() { - olpClientSettingsStub = sandbox.createStubInstance( + beforeEach(function () { + olpClientSettingsStub = createStubInstance( dataserviceCore.OlpClientSettings ); - getBaseUrlRequestStub = sandbox.stub( - dataserviceCore.RequestFactory, - "getBaseUrl" - ); - getArtifactUsingGETStub = sandbox.stub( - ArtifactApi, - "getArtifactUsingGET" - ); - getSchemaUsingGETStub = sandbox.stub(ArtifactApi, "getSchemaUsingGET"); + getBaseUrlRequestStub = vi + .spyOn(dataserviceCore.RequestFactory, "getBaseUrl") + .mockReturnValue(undefined as any); + getArtifactUsingGETStub = vi + .spyOn(ArtifactApi, "getArtifactUsingGET") + .mockReturnValue(undefined as any); + getSchemaUsingGETStub = vi + .spyOn(ArtifactApi, "getSchemaUsingGET") + .mockReturnValue(undefined as any); - getBaseUrlRequestStub.callsFake(() => Promise.resolve(fakeURL)); + getBaseUrlRequestStub.mockImplementation(() => + Promise.resolve(fakeURL) + ); }); - afterEach(function() { - sandbox.restore(); + afterEach(function () { + vi.restoreAllMocks(); }); - it("Shoud be initialised with settings", async function() { + it("Shoud be initialised with settings", async function () { const artifactClient = new dataServiceRead.ArtifactClient( olpClientSettingsStub as any ); assert.isDefined(artifactClient); }); - it("Should method getSchema provide data", async function() { + it("Should method getSchema provide data", async function () { const mockedSchema: Response = new Response(null, { statusText: "mocked response" }); @@ -86,7 +88,7 @@ describe("ArtifactClient", function() { olpClientSettingsStub as any ); assert.isDefined(artifactClient); - getArtifactUsingGETStub.callsFake( + getArtifactUsingGETStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedSchema); } @@ -100,7 +102,7 @@ describe("ArtifactClient", function() { assert.isDefined(response); }); - it("Should method getSchema return HttpError when ArtifactClient API crashes", async function() { + it("Should method getSchema return HttpError when ArtifactClient API crashes", async function () { const NOT_FOUND_ERROR_CODE = 404; const mockedError = new dataserviceCore.HttpError( NOT_FOUND_ERROR_CODE, @@ -118,7 +120,7 @@ describe("ArtifactClient", function() { olpClientSettingsStub as any ); assert.isDefined(artifactClient); - getArtifactUsingGETStub.callsFake( + getArtifactUsingGETStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.reject(mockedError); } @@ -137,7 +139,7 @@ describe("ArtifactClient", function() { }); }); - it("Should method getSchema return error without variant data provided", async function() { + it("Should method getSchema return error without variant data provided", async function () { const mockedError: string = "Please provide the schema variant by schemaRequest.withVariant()"; @@ -150,13 +152,13 @@ describe("ArtifactClient", function() { const schema = await artifactClient .getSchema(schemaRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedError, error.message); }); }); - it("Should method getSchemaDetails provide data", async function() { + it("Should method getSchemaDetails provide data", async function () { const mockedSchema: ArtifactApi.GetSchemaResponseObj = { variants: [ { @@ -169,7 +171,7 @@ describe("ArtifactClient", function() { olpClientSettingsStub as any ); assert.isDefined(artifactClient); - getSchemaUsingGETStub.callsFake( + getSchemaUsingGETStub.mockImplementation( ( builder: any, params: any @@ -178,18 +180,16 @@ describe("ArtifactClient", function() { } ); - const schemaDetailsRequest = new dataServiceRead.SchemaDetailsRequest().withSchema( - mockedHRN - ); + const schemaDetailsRequest = + new dataServiceRead.SchemaDetailsRequest().withSchema(mockedHRN); - const response = await artifactClient.getSchemaDetails( - schemaDetailsRequest - ); + const response = + await artifactClient.getSchemaDetails(schemaDetailsRequest); assert.isDefined(!response); expect(mockedSchema).be.equal(response); }); - it("Should method getSchemaDetails return HttpError when ArtifactClient crashes", async function() { + it("Should method getSchemaDetails return HttpError when ArtifactClient crashes", async function () { const NOT_FOUND_ERROR_CODE = 404; const mockedError = new dataserviceCore.HttpError( NOT_FOUND_ERROR_CODE, @@ -209,7 +209,7 @@ describe("ArtifactClient", function() { ); assert.isDefined(artifactClient); - getSchemaUsingGETStub.callsFake( + getSchemaUsingGETStub.mockImplementation( ( builder: any, params: any @@ -218,9 +218,8 @@ describe("ArtifactClient", function() { } ); - const schemaDetailsRequest = new dataServiceRead.SchemaDetailsRequest().withSchema( - mockedHRN - ); + const schemaDetailsRequest = + new dataServiceRead.SchemaDetailsRequest().withSchema(mockedHRN); const responseSchema = await artifactClient .getSchemaDetails(schemaDetailsRequest) @@ -232,7 +231,7 @@ describe("ArtifactClient", function() { }); }); - it("Should method getSchemaDetails return error without hrn provided", async function() { + it("Should method getSchemaDetails return error without hrn provided", async function () { const mockedError: string = "Please provide the schema HRN by schemaDetailsRequest.withSchema()"; diff --git a/@here/olp-sdk-dataservice-read/test/unit/CatalogClient.test.ts b/@here/olp-sdk-dataservice-read/test/unit/CatalogClient.test.ts index b3b494ea..73629a59 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/CatalogClient.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/CatalogClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,71 +17,86 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { createStubInstance } from "./stub-instance"; import * as dataServiceRead from "../../lib"; import { ConfigApi, MetadataApi } from "@here/olp-sdk-dataservice-api"; import * as core from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - class MockCatalogVersionRequest { public getBillingTag(): string | undefined { return "testBillingTag"; } } -describe("CatalogClient", function() { - let sandbox: sinon.SinonSandbox; - let getVersionStub: sinon.SinonStub; - let getLayerVersionsStub: sinon.SinonStub; - let getCatalogStub: sinon.SinonStub; - let getListVersionsStub: sinon.SinonStub; - let getEarliestVersionsStub: sinon.SinonStub; +describe("CatalogClient", function () { + let getVersionStub: any; + let getLayerVersionsStub: any; + let getCatalogStub: any; + let getListVersionsStub: any; + let getEarliestVersionsStub: any; let catalogClient: dataServiceRead.CatalogClient; - let getBaseUrlRequestStub: sinon.SinonStub; + let getBaseUrlRequestStub: any; const fakeURL = "http://fake-base.url"; const mockedHRN = core.HRN.fromString("hrn:here:data:::live-weather-na"); - before(function() { - sandbox = sinon.createSandbox(); - let settings = sandbox.createStubInstance(core.OlpClientSettings); + beforeAll(function () { + let settings = createStubInstance(core.OlpClientSettings); catalogClient = new dataServiceRead.CatalogClient( mockedHRN, - (settings as unknown) as core.OlpClientSettings + settings as unknown as core.OlpClientSettings ); }); - beforeEach(function() { - getVersionStub = sandbox.stub(MetadataApi, "latestVersion"); - getLayerVersionsStub = sandbox.stub(MetadataApi, "getLayerVersions"); - getCatalogStub = sandbox.stub(ConfigApi, "getCatalog"); - getListVersionsStub = sandbox.stub(MetadataApi, "listVersions"); - getEarliestVersionsStub = sandbox.stub(MetadataApi, "minimumVersion"); - getBaseUrlRequestStub = sandbox.stub(core.RequestFactory, "getBaseUrl"); - getBaseUrlRequestStub.callsFake(() => Promise.resolve(fakeURL)); + beforeEach(function () { + getVersionStub = vi + .spyOn(MetadataApi, "latestVersion") + .mockReturnValue(undefined as any); + getLayerVersionsStub = vi + .spyOn(MetadataApi, "getLayerVersions") + .mockReturnValue(undefined as any); + getCatalogStub = vi + .spyOn(ConfigApi, "getCatalog") + .mockReturnValue(undefined as any); + getListVersionsStub = vi + .spyOn(MetadataApi, "listVersions") + .mockReturnValue(undefined as any); + getEarliestVersionsStub = vi + .spyOn(MetadataApi, "minimumVersion") + .mockReturnValue(undefined as any); + getBaseUrlRequestStub = vi + .spyOn(core.RequestFactory, "getBaseUrl") + .mockReturnValue(undefined as any); + getBaseUrlRequestStub.mockImplementation(() => + Promise.resolve(fakeURL) + ); }); - afterEach(function() { - sandbox.restore(); + afterEach(function () { + vi.restoreAllMocks(); }); - it("Shoud be initialised", async function() { + it("Shoud be initialised", async function () { assert.isDefined(catalogClient); }); - it("Should method getLatestVersion provide data with startVersion parameter", async function() { + it("Should method getLatestVersion provide data with startVersion parameter", async function () { const mockedVersion = { version: 42 }; - getVersionStub.callsFake( + getVersionStub.mockImplementation( ( builder: any, params: any @@ -90,19 +105,18 @@ describe("CatalogClient", function() { } ); - const catalogRequest = new dataServiceRead.CatalogVersionRequest().withStartVersion( - 42 - ); + const catalogRequest = + new dataServiceRead.CatalogVersionRequest().withStartVersion(42); const response = await catalogClient.getLatestVersion( - (catalogRequest as unknown) as dataServiceRead.CatalogVersionRequest + catalogRequest as unknown as dataServiceRead.CatalogVersionRequest ); assert.isDefined(response); expect(response).to.be.equal(mockedVersion.version); }); - it("Should method getLatestVersion return HttpError when API crashes", async function() { + it("Should method getLatestVersion return HttpError when API crashes", async function () { const TEST_ERROR_CODE = 404; const mockedError = new core.HttpError( TEST_ERROR_CODE, @@ -113,7 +127,7 @@ describe("CatalogClient", function() { version: 42 }; - getVersionStub.callsFake( + getVersionStub.mockImplementation( ( builder: any, params: any @@ -122,13 +136,12 @@ describe("CatalogClient", function() { } ); - const catalogRequest = new dataServiceRead.CatalogVersionRequest().withStartVersion( - 42 - ); + const catalogRequest = + new dataServiceRead.CatalogVersionRequest().withStartVersion(42); const response = await catalogClient .getLatestVersion( - (catalogRequest as unknown) as dataServiceRead.CatalogVersionRequest + catalogRequest as unknown as dataServiceRead.CatalogVersionRequest ) .catch((err: any) => { assert.isDefined(err); @@ -140,21 +153,20 @@ describe("CatalogClient", function() { }); }); - it("Should method getLayerVersions return HttpError when MetadataApi.getLayerVersions crashes", async function() { + it("Should method getLayerVersions return HttpError when MetadataApi.getLayerVersions crashes", async function () { const testError = "Can not get catalog layer version"; - getLayerVersionsStub.callsFake( + getLayerVersionsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.reject("Can not get catalog layer version"); } ); - const catalogRequest = new dataServiceRead.LayerVersionsRequest().withVersion( - 3 - ); + const catalogRequest = + new dataServiceRead.LayerVersionsRequest().withVersion(3); const response = await catalogClient .getLayerVersions( - (catalogRequest as unknown) as dataServiceRead.LayerVersionsRequest + catalogRequest as unknown as dataServiceRead.LayerVersionsRequest ) .catch((err: any) => { assert.isDefined(err); @@ -162,7 +174,7 @@ describe("CatalogClient", function() { }); }); - it("Should method getLayerVersions provide data with version parameter", async function() { + it("Should method getLayerVersions provide data with version parameter", async function () { const mockedVersion = { layerVersions: [ { layer: "testLayer1", version: 1, timestamp: 11 }, @@ -172,24 +184,23 @@ describe("CatalogClient", function() { version: 3 }; - getLayerVersionsStub.callsFake( + getLayerVersionsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedVersion); } ); - const catalogRequest = new dataServiceRead.LayerVersionsRequest().withVersion( - 3 - ); + const catalogRequest = + new dataServiceRead.LayerVersionsRequest().withVersion(3); const response = await catalogClient.getLayerVersions( - (catalogRequest as unknown) as dataServiceRead.LayerVersionsRequest + catalogRequest as unknown as dataServiceRead.LayerVersionsRequest ); assert.isDefined(response); expect(response).to.be.equal(mockedVersion.layerVersions); }); - it("Should method getLayerVersions provide data for latests version when version parameter is not setted", async function() { + it("Should method getLayerVersions provide data for latests version when version parameter is not setted", async function () { const mockedLayerVersions = { layerVersions: [ { layer: "testLayer1", version: 1, timestamp: 11 }, @@ -199,7 +210,7 @@ describe("CatalogClient", function() { ], version: 4 }; - getLayerVersionsStub.callsFake( + getLayerVersionsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedLayerVersions); } @@ -208,7 +219,7 @@ describe("CatalogClient", function() { const mockedLatestVersion = { version: 4 }; - getVersionStub.callsFake( + getVersionStub.mockImplementation( ( builder: any, params: any @@ -219,19 +230,19 @@ describe("CatalogClient", function() { const catalogRequest = new dataServiceRead.LayerVersionsRequest(); const response = await catalogClient.getLayerVersions( - (catalogRequest as unknown) as dataServiceRead.LayerVersionsRequest + catalogRequest as unknown as dataServiceRead.LayerVersionsRequest ); assert.isDefined(response); expect(response).to.be.equal(mockedLayerVersions.layerVersions); }); - it("Should method getEarliestVersion provide the minimun version availiable for the given catalogRequest", async function() { + it("Should method getEarliestVersion provide the minimun version availiable for the given catalogRequest", async function () { const mockedEarliestVersion: MetadataApi.VersionResponse = { version: 5 }; - getEarliestVersionsStub.callsFake( + getEarliestVersionsStub.mockImplementation( ( builder: any, params: any @@ -242,21 +253,21 @@ describe("CatalogClient", function() { const catalogRequest = new MockCatalogVersionRequest(); const response = await catalogClient.getEarliestVersion( - (catalogRequest as unknown) as dataServiceRead.CatalogVersionRequest + catalogRequest as unknown as dataServiceRead.CatalogVersionRequest ); assert.isDefined(response); expect(response).to.be.equal(mockedEarliestVersion.version); }); - it("Should method getEarliestVersion return HttpError getting earliest catalog version", async function() { + it("Should method getEarliestVersion return HttpError getting earliest catalog version", async function () { const TEST_ERROR_CODE = 404; const mockedError = new core.HttpError( TEST_ERROR_CODE, "Error getting earliest catalog version" ); - getEarliestVersionsStub.callsFake( + getEarliestVersionsStub.mockImplementation( ( builder: any, params: any @@ -269,9 +280,9 @@ describe("CatalogClient", function() { const response = await catalogClient .getEarliestVersion( - (catalogRequest as unknown) as dataServiceRead.CatalogVersionRequest + catalogRequest as unknown as dataServiceRead.CatalogVersionRequest ) - .catch(err => { + .catch((err) => { assert.isDefined(err); expect(err.status).to.be.equal(TEST_ERROR_CODE); expect(err.message).to.be.equal( @@ -281,7 +292,7 @@ describe("CatalogClient", function() { }); }); - it("Should method getCatalog provide data", async function() { + it("Should method getCatalog provide data", async function () { const mockedCatalogResponse: ConfigApi.Catalog = { id: "here-internal-test", hrn: "hrn:here-dev:data:::here-internal-test", @@ -294,8 +305,7 @@ describe("CatalogClient", function() { layers: [ { id: "hype-test-prefetch", - hrn: - "hrn:here-dev:data:::here-internal-test:hype-test-prefetch", + hrn: "hrn:here-dev:data:::here-internal-test:hype-test-prefetch", partitioning: { tileLevels: [], scheme: "heretile" @@ -307,7 +317,7 @@ describe("CatalogClient", function() { version: 3 }; - getCatalogStub.callsFake( + getCatalogStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedCatalogResponse); } @@ -321,7 +331,7 @@ describe("CatalogClient", function() { expect(response).to.be.equal(mockedCatalogResponse); }); - it("Should method getCatalog return HttpError when Can not load catalog configuration", async function() { + it("Should method getCatalog return HttpError when Can not load catalog configuration", async function () { const TEST_ERROR_CODE = 404; const mockedError = new core.HttpError( TEST_ERROR_CODE, @@ -340,8 +350,7 @@ describe("CatalogClient", function() { layers: [ { id: "hype-test-prefetch", - hrn: - "hrn:here-dev:data:::here-internal-test:hype-test-prefetch", + hrn: "hrn:here-dev:data:::here-internal-test:hype-test-prefetch", partitioning: { tileLevels: [], scheme: "heretile" @@ -353,7 +362,7 @@ describe("CatalogClient", function() { version: 3 }; - getCatalogStub.callsFake( + getCatalogStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.reject(mockedError); } @@ -371,7 +380,7 @@ describe("CatalogClient", function() { }); }); - it("Should method getVersions provide data with startVersion and EndVersion parameters", async function() { + it("Should method getVersions provide data with startVersion and EndVersion parameters", async function () { const mockedVersions: MetadataApi.VersionInfos = { versions: [ { @@ -388,7 +397,7 @@ describe("CatalogClient", function() { ] }; - getListVersionsStub.callsFake( + getListVersionsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedVersions); } @@ -399,14 +408,14 @@ describe("CatalogClient", function() { .withEndVersion(42); const response = await catalogClient.getVersions( - (catalogRequest as unknown) as dataServiceRead.CatalogVersionRequest + catalogRequest as unknown as dataServiceRead.CatalogVersionRequest ); assert.isDefined(response); assert.isTrue(response.versions.length > 0); }); - it("Should method getVersions provide data with startVersion parameters", async function() { + it("Should method getVersions provide data with startVersion parameters", async function () { const mockedVersions = { versions: [ { @@ -422,44 +431,42 @@ describe("CatalogClient", function() { } ] }; - getListVersionsStub.callsFake((builder, params) => { + getListVersionsStub.mockImplementation((builder, params) => { return Promise.resolve(mockedVersions); }); - getVersionStub.callsFake((builder, params) => { + getVersionStub.mockImplementation((builder, params) => { return Promise.resolve({ version: 42 }); }); - const catalogRequest = new dataServiceRead.CatalogVersionRequest().withStartVersion( - 13 - ); + const catalogRequest = + new dataServiceRead.CatalogVersionRequest().withStartVersion(13); const response = await catalogClient.getVersions(catalogRequest); assert.isDefined(response); assert.isTrue(response.versions.length > 0); }); - it("Should method getVersions return HttpError when API crashes", async function() { + it("Should method getVersions return HttpError when API crashes", async function () { const TEST_ERROR_CODE = 404; const mockedError = new core.HttpError( TEST_ERROR_CODE, "Can't get versions" ); - getVersionStub.callsFake((builder, params) => { + getVersionStub.mockImplementation((builder, params) => { return Promise.resolve({ version: 42 }); }); - getListVersionsStub.callsFake((builder, params) => { + getListVersionsStub.mockImplementation((builder, params) => { return Promise.reject(mockedError); }); - const catalogRequest = new dataServiceRead.CatalogVersionRequest().withStartVersion( - 13 - ); + const catalogRequest = + new dataServiceRead.CatalogVersionRequest().withStartVersion(13); const response = await catalogClient .getVersions(catalogRequest) - .catch(err => { + .catch((err) => { assert.isDefined(err); expect(err.status).to.be.equal(TEST_ERROR_CODE); expect(err.message).to.be.equal("Can't get versions"); diff --git a/@here/olp-sdk-dataservice-read/test/unit/CatalogRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/CatalogRequest.test.ts index c629111c..ae59a5f4 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/CatalogRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/CatalogRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,32 +17,33 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { CatalogRequest } from "../../lib"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("CatalogRequest", function() { +describe("CatalogRequest", function () { const billingTag = "billingTag"; - it("Should initialize", function() { + it("Should initialize", function () { const catalogRequest = new CatalogRequest(); assert.isDefined(CatalogRequest); expect(catalogRequest).be.instanceOf(CatalogRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const catalogRequest = new CatalogRequest(); - const catalogRequestWithBillTag = catalogRequest.withBillingTag( - billingTag - ); + const catalogRequestWithBillTag = + catalogRequest.withBillingTag(billingTag); expect(catalogRequestWithBillTag.getBillingTag()).to.be.equal( billingTag diff --git a/@here/olp-sdk-dataservice-read/test/unit/CatalogVersionRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/CatalogVersionRequest.test.ts index 6a5cb604..70b6af9b 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/CatalogVersionRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/CatalogVersionRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,38 +17,38 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { CatalogVersionRequest } from "../../lib"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("CatalogVersionRequest", function() { +describe("CatalogVersionRequest", function () { const billingTag = "billingTag"; const mockedStartVersion = 13; const mockedEndVersion = 42; - it("Should initialize", function() { + it("Should initialize", function () { const catalogVersionRequest = new CatalogVersionRequest(); assert.isDefined(catalogVersionRequest); expect(catalogVersionRequest).be.instanceOf(CatalogVersionRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const catalogVersionRequest = new CatalogVersionRequest(); - const catalogStartVersion = catalogVersionRequest.withStartVersion( - mockedStartVersion - ); - const catalogEndVersion = catalogVersionRequest.withEndVersion( - mockedEndVersion - ); + const catalogStartVersion = + catalogVersionRequest.withStartVersion(mockedStartVersion); + const catalogEndVersion = + catalogVersionRequest.withEndVersion(mockedEndVersion); const catalogBillTag = catalogVersionRequest.withBillingTag(billingTag); expect(catalogStartVersion.getStartVersion()).to.be.equal( @@ -58,7 +58,7 @@ describe("CatalogVersionRequest", function() { expect(catalogBillTag.getBillingTag()).to.be.equal(billingTag); }); - it("Should get parameters with chain", function() { + it("Should get parameters with chain", function () { const catalogVersionRequest = new CatalogVersionRequest() .withStartVersion(mockedStartVersion) .withEndVersion(mockedEndVersion) diff --git a/@here/olp-sdk-dataservice-read/test/unit/CatalogsRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/CatalogsRequest.test.ts index 59098108..080b0435 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/CatalogsRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/CatalogsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,37 +17,37 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { CatalogsRequest } from "../../lib"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("CatalogsRequest", function() { +describe("CatalogsRequest", function () { const billingTag = "billingTag"; const mockedSchemaHRN1 = "hrn:::test-hrn1"; const mockedSchemaHRN2 = "hrn:::test-hrn2"; - it("Should initialize", function() { + it("Should initialize", function () { const catalogsRequest = new CatalogsRequest(); assert.isDefined(catalogsRequest); expect(catalogsRequest).be.instanceOf(CatalogsRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const catalogsRequest = new CatalogsRequest(); - const catalogsRequestWithSchemaHrn = catalogsRequest.withSchema( - mockedSchemaHRN1 - ); - const catalogsRequestWithBillTag = catalogsRequest.withBillingTag( - billingTag - ); + const catalogsRequestWithSchemaHrn = + catalogsRequest.withSchema(mockedSchemaHRN1); + const catalogsRequestWithBillTag = + catalogsRequest.withBillingTag(billingTag); expect(catalogsRequestWithSchemaHrn.getSchema()).to.be.equal( mockedSchemaHRN1 @@ -57,7 +57,7 @@ describe("CatalogsRequest", function() { ); }); - it("Should set parameters with chain", function() { + it("Should set parameters with chain", function () { const catalogsRequest = new CatalogsRequest() .withSchema(mockedSchemaHRN1) .withSchema(mockedSchemaHRN2) diff --git a/@here/olp-sdk-dataservice-read/test/unit/ConfigClient.test.ts b/@here/olp-sdk-dataservice-read/test/unit/ConfigClient.test.ts index 95e21cc7..2ce47148 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/ConfigClient.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/ConfigClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,36 +17,38 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import * as dataServiceRead from "../../lib"; import { RequestFactory } from "@here/olp-sdk-core"; import { ConfigApi } from "@here/olp-sdk-dataservice-api"; -chai.use(sinonChai); -const expect = chai.expect; - -let sandbox: sinon.SinonSandbox; const settings = {} as any; const configClient = new dataServiceRead.ConfigClient(settings); -describe("ConfigClient", function() { - before(function() { - sandbox = sinon.createSandbox(); - }); +describe("ConfigClient", function () { + beforeAll(function () {}); - beforeEach(function() { - sandbox - .stub(RequestFactory, "create") - .callsFake(() => Promise.resolve({} as any)); + beforeEach(function () { + vi.spyOn(RequestFactory, "create").mockImplementation(() => + Promise.resolve({} as any) + ); }); - afterEach(function() { - sandbox.restore(); + afterEach(function () { + vi.restoreAllMocks(); }); - it("Should works as expected with empty request.", async function() { + it("Should works as expected with empty request.", async function () { class MockedCatalogsRequest { public getSchema() { return undefined; @@ -56,16 +58,18 @@ describe("ConfigClient", function() { } } - sandbox.stub(ConfigApi, "getCatalogs").callsFake((_, params): any => { - expect(params.billingTag === undefined).to.be.true; - return Promise.resolve(); - }); + vi.spyOn(ConfigApi, "getCatalogs").mockImplementation( + (_, params): any => { + expect(params.billingTag === undefined).to.be.true; + return Promise.resolve(); + } + ); const catalogsConfigRequest = new MockedCatalogsRequest(); await configClient.getCatalogs(catalogsConfigRequest as any); }); - it("Should works as expected with request with schema and empty billing tag", async function() { + it("Should works as expected with request with schema and empty billing tag", async function () { class MockedCatalogsRequest { public getSchema() { return "test-schema-string"; @@ -75,18 +79,20 @@ describe("ConfigClient", function() { } } - sandbox.stub(ConfigApi, "getCatalogs").callsFake((_, params): any => { - expect(params.billingTag === undefined).to.be.true; - expect(params.schemaHrn === "test-schema-string").to.be.true; - expect(params.verbose === "true").to.be.true; - return Promise.resolve(); - }); + vi.spyOn(ConfigApi, "getCatalogs").mockImplementation( + (_, params): any => { + expect(params.billingTag === undefined).to.be.true; + expect(params.schemaHrn === "test-schema-string").to.be.true; + expect(params.verbose === "true").to.be.true; + return Promise.resolve(); + } + ); const catalogsConfigRequest = new MockedCatalogsRequest(); await configClient.getCatalogs(catalogsConfigRequest as any); }); - it("Should works as expected with request with schema and with billing tag", async function() { + it("Should works as expected with request with schema and with billing tag", async function () { class MockedCatalogsRequest { public getSchema() { return "test-schema-string"; @@ -96,12 +102,14 @@ describe("ConfigClient", function() { } } - sandbox.stub(ConfigApi, "getCatalogs").callsFake((_, params): any => { - expect(params.verbose === "true").to.be.true; - expect(params.schemaHrn === "test-schema-string").to.be.true; - expect(params.billingTag === "test-billing-tag").to.be.true; - return Promise.resolve(); - }); + vi.spyOn(ConfigApi, "getCatalogs").mockImplementation( + (_, params): any => { + expect(params.verbose === "true").to.be.true; + expect(params.schemaHrn === "test-schema-string").to.be.true; + expect(params.billingTag === "test-billing-tag").to.be.true; + return Promise.resolve(); + } + ); const catalogsConfigRequest = new MockedCatalogsRequest(); await configClient.getCatalogs(catalogsConfigRequest as any); diff --git a/@here/olp-sdk-dataservice-read/test/unit/DataRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/DataRequest.test.ts index 093ab01f..88ffd4f3 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/DataRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/DataRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,17 +17,20 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { DataRequest } from "../../lib"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("DataRequest", function() { +describe("DataRequest", function () { const billingTag = "billingTag"; const mockedDataHandle = "43d76b9f-e934-40e5-9ce4-91d88a30f1c6"; const mockedPartitionId = "123123123"; @@ -37,21 +40,19 @@ describe("DataRequest", function() { level: 42 }; - it("Should initialize", function() { + it("Should initialize", function () { const dataRequest = new DataRequest(); assert.isDefined(dataRequest); expect(dataRequest).be.instanceOf(DataRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const dataRequest = new DataRequest(); - const dataRequestWithCatalogHrn = dataRequest.withDataHandle( - mockedDataHandle - ); - const dataRequestWithLayerId = dataRequest.withPartitionId( - mockedPartitionId - ); + const dataRequestWithCatalogHrn = + dataRequest.withDataHandle(mockedDataHandle); + const dataRequestWithLayerId = + dataRequest.withPartitionId(mockedPartitionId); const dataRequestWithBillTag = dataRequest.withBillingTag(billingTag); expect(dataRequestWithCatalogHrn.getDataHandle()).to.be.equal( @@ -63,7 +64,7 @@ describe("DataRequest", function() { expect(dataRequestWithBillTag.getBillingTag()).to.be.equal(billingTag); }); - it("Should get parameters with chain", function() { + it("Should get parameters with chain", function () { const dataRequest = new DataRequest() .withDataHandle(mockedDataHandle) .withPartitionId(mockedPartitionId) diff --git a/@here/olp-sdk-dataservice-read/test/unit/IndexLayerClient.test.ts b/@here/olp-sdk-dataservice-read/test/unit/IndexLayerClient.test.ts index 78854625..8187fa1f 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/IndexLayerClient.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/IndexLayerClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,62 +17,71 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { createStubInstance } from "./stub-instance"; import * as dataServiceRead from "../../lib"; import * as core from "@here/olp-sdk-core"; import { IndexApi, BlobApi } from "@here/olp-sdk-dataservice-api"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("IndexLayerClient", function() { - let sandbox: sinon.SinonSandbox; - let getBlobStub: sinon.SinonStub; - let getIndexStub: sinon.SinonStub; - let getBaseUrlRequestStub: sinon.SinonStub; +describe("IndexLayerClient", function () { + let getBlobStub: any; + let getIndexStub: any; + let getBaseUrlRequestStub: any; let indexLayerClient: dataServiceRead.IndexLayerClient; const mockedHRN = core.HRN.fromString("hrn:here:data:::mocked-hrn"); const mockedLayerId = "mocked-layed-id"; const fakeURL = "http://fake-base.url"; - before(function() { - sandbox = sinon.createSandbox(); - let settings = sandbox.createStubInstance(core.OlpClientSettings); + beforeAll(function () { + let settings = createStubInstance(core.OlpClientSettings); const indexLayerClientParams = { catalogHrn: mockedHRN, layerId: mockedLayerId, - settings: (settings as unknown) as core.OlpClientSettings + settings: settings as unknown as core.OlpClientSettings }; indexLayerClient = new dataServiceRead.IndexLayerClient( indexLayerClientParams ); }); - beforeEach(function() { - getBlobStub = sandbox.stub(BlobApi, "getBlob"); - getIndexStub = sandbox.stub(IndexApi, "performQuery"); - getBaseUrlRequestStub = sandbox.stub(core.RequestFactory, "getBaseUrl"); - getBaseUrlRequestStub.callsFake(() => Promise.resolve(fakeURL)); + beforeEach(function () { + getBlobStub = vi + .spyOn(BlobApi, "getBlob") + .mockReturnValue(undefined as any); + getIndexStub = vi + .spyOn(IndexApi, "performQuery") + .mockReturnValue(undefined as any); + getBaseUrlRequestStub = vi + .spyOn(core.RequestFactory, "getBaseUrl") + .mockReturnValue(undefined as any); + getBaseUrlRequestStub.mockImplementation(() => + Promise.resolve(fakeURL) + ); }); - afterEach(function() { - sandbox.restore(); + afterEach(function () { + vi.restoreAllMocks(); }); - it("Shoud be initialized", async function() { + it("Shoud be initialized", async function () { assert.isDefined(indexLayerClient); expect(indexLayerClient).be.instanceOf( dataServiceRead.IndexLayerClient ); }); - it("Should method getPartitions provide data with IndexQueryRequest", async function() { + it("Should method getPartitions provide data with IndexQueryRequest", async function () { const mockedIndexResponse = { data: [ { @@ -105,7 +114,7 @@ describe("IndexLayerClient", function() { ] }; - getIndexStub.callsFake( + getIndexStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedIndexResponse); } @@ -120,14 +129,14 @@ describe("IndexLayerClient", function() { expect(partitions).to.be.equal(mockedIndexResponse.data); }); - it("Should method getPartitions with IndexQueryRequest return HttpError when IndexApi crashes", async function() { + it("Should method getPartitions with IndexQueryRequest return HttpError when IndexApi crashes", async function () { const TEST_ERROR_CODE = 404; const mockedHttpError = new core.HttpError( TEST_ERROR_CODE, "Test Error" ); - getIndexStub.callsFake( + getIndexStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.reject(mockedHttpError); } @@ -146,7 +155,7 @@ describe("IndexLayerClient", function() { }); }); - it("Should method getPartitions return error without IndexQueryRequest", async function() { + it("Should method getPartitions return error without IndexQueryRequest", async function () { const mockedErrorResponse = { message: "Please provide correct query" }; @@ -154,13 +163,13 @@ describe("IndexLayerClient", function() { const request = new dataServiceRead.IndexQueryRequest(); const partitions = await indexLayerClient .getPartitions(request) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse.message, error.message); }); }); - it("Should method getPartitions be aborted fetching by abort signal", async function() { + it("Should method getPartitions be aborted fetching by abort signal", async function () { const mockedBlobData = new Response("mocked-blob-response"); const mockedIndexResponse = { data: [ @@ -193,7 +202,7 @@ describe("IndexLayerClient", function() { } ] }; - getIndexStub.callsFake( + getIndexStub.mockImplementation( (builder: any, params: any): Promise => { return builder.abortSignal.aborted ? Promise.reject("AbortError") @@ -206,22 +215,21 @@ describe("IndexLayerClient", function() { ); const abortController = new AbortController(); + abortController.abort(); - indexLayerClient - .getPartitions( - (request as unknown) as dataServiceRead.IndexQueryRequest, + try { + await indexLayerClient.getPartitions( + request as unknown as dataServiceRead.IndexQueryRequest, abortController.signal - ) - .then() - .catch((err: any) => { - assert.strictEqual(err, "AbortError"); - assert.isTrue(abortController.signal.aborted); - }); - - abortController.abort(); + ); + assert.fail("getPartitions should have been aborted"); + } catch (err) { + assert.strictEqual(err, "AbortError"); + assert.isTrue(abortController.signal.aborted); + } }); - it("Should method getData provide data", async function() { + it("Should method getData provide data", async function () { const mockedBlobData: Response = new Response("mocked-blob-response"); const mockedModel = { id: "8c0e5ac9-b036-4365-8820-dfcba64588fc", @@ -232,7 +240,7 @@ describe("IndexLayerClient", function() { tile_id: 377894442, crc: null }; - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedBlobData); } @@ -240,23 +248,23 @@ describe("IndexLayerClient", function() { const response = await indexLayerClient.getData(mockedModel); assert.isDefined(response); - expect(getBlobStub.getCalls()[0].args[1].dataHandle).to.be.equal( + expect(getBlobStub.mock.calls[0][1].dataHandle).to.be.equal( mockedModel.id ); }); - it("Should method getData return Error without parameters", async function() { + it("Should method getData return Error without parameters", async function () { const mockedErrorResponse = { message: "No data handle for this partition" }; - const response = await indexLayerClient.getData({}).catch(error => { + const response = await indexLayerClient.getData({}).catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse.message, error.message); }); }); - it("Should error be handled", async function() { + it("Should error be handled", async function () { const mockedModel = { id: "8c0e5ac9-b036-4365-8820-dfcba64588fc", size: 111928, @@ -268,7 +276,7 @@ describe("IndexLayerClient", function() { }; const mockedErrorResponse = "mocked-error"; - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.reject("mocked-error"); } @@ -276,13 +284,13 @@ describe("IndexLayerClient", function() { const response = await indexLayerClient .getData(mockedModel) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error); }); }); - it("Should base url error be handled", async function() { + it("Should base url error be handled", async function () { const mockedModel = { id: "8c0e5ac9-b036-4365-8820-dfcba64588fc", size: 111928, @@ -294,7 +302,7 @@ describe("IndexLayerClient", function() { }; const mockedErrorResponse = "Bad response"; - getBaseUrlRequestStub.callsFake(() => + getBaseUrlRequestStub.mockImplementation(() => Promise.reject({ status: 400, statusText: "Bad response" @@ -303,13 +311,13 @@ describe("IndexLayerClient", function() { const response = await indexLayerClient .getData(mockedModel) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.statusText); }); }); - it("Should HttpError be handled", async function() { + it("Should HttpError be handled", async function () { const TEST_ERROR_CODE = 404; const mockedError = new core.HttpError(TEST_ERROR_CODE, "Test Error"); @@ -323,7 +331,7 @@ describe("IndexLayerClient", function() { crc: null }; - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.reject(mockedError); } @@ -331,7 +339,7 @@ describe("IndexLayerClient", function() { const response = await indexLayerClient .getData(mockedModel) - .catch(err => { + .catch((err) => { assert.isDefined(err); expect(err.status).to.be.equal(TEST_ERROR_CODE); expect(err.message).to.be.equal("Test Error"); @@ -339,7 +347,7 @@ describe("IndexLayerClient", function() { }); }); - it("IndexLayerClient instance should be initialized with IndexLayerClientParams", async function() { + it("IndexLayerClient instance should be initialized with IndexLayerClientParams", async function () { assert.isDefined(indexLayerClient); assert.equal(indexLayerClient["hrn"], "hrn:here:data:::mocked-hrn"); }); diff --git a/@here/olp-sdk-dataservice-read/test/unit/IndexQueryRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/IndexQueryRequest.test.ts index 67dda198..71bddbdd 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/IndexQueryRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/IndexQueryRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,35 +17,35 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { IndexQueryRequest } from "../../lib"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("IndexQueryRequest", function() { +describe("IndexQueryRequest", function () { const mockedQuery = "ingestionTime>1552341200000;"; - it("Should initialize", function() { + it("Should initialize", function () { const indexQueryRequest = new IndexQueryRequest(); assert.isDefined(indexQueryRequest); expect(indexQueryRequest).be.instanceOf(IndexQueryRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const indexQueryRequest = new IndexQueryRequest(); - const indexQueryRequestWithHuge = indexQueryRequest.withHugeResponse( - true - ); - const indexQueryRequestWithQuery = indexQueryRequest.withQueryString( - mockedQuery - ); + const indexQueryRequestWithHuge = + indexQueryRequest.withHugeResponse(true); + const indexQueryRequestWithQuery = + indexQueryRequest.withQueryString(mockedQuery); expect(indexQueryRequestWithHuge.getHugeResponse()).to.be.equal(true); expect(indexQueryRequestWithQuery.getQueryString()).to.be.equal( @@ -53,7 +53,7 @@ describe("IndexQueryRequest", function() { ); }); - it("Should set parameters with chain", function() { + it("Should set parameters with chain", function () { const indexQueryRequest = new IndexQueryRequest() .withHugeResponse(false) .withQueryString(mockedQuery); diff --git a/@here/olp-sdk-dataservice-read/test/unit/LayerVersionsRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/LayerVersionsRequest.test.ts index 481fdc01..3bd38f2b 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/LayerVersionsRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/LayerVersionsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,35 +17,37 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { LayerVersionsRequest } from "../../lib"; -chai.use(sinonChai); -const assert = chai.assert; -const expect = chai.expect; - -describe("LayerVersionsRequest", function() { +describe("LayerVersionsRequest", function () { const billingTag = "billingTag"; const mockedVersion1 = 5; const mockedVersion2 = 6; - it("Should initialize", function() { + it("Should initialize", function () { const layerVersionsRequest = new LayerVersionsRequest(); assert.isDefined(layerVersionsRequest); expect(layerVersionsRequest).be.instanceOf(LayerVersionsRequest); }); - it("Should set version", function() { + it("Should set version", function () { const layerVersionsRequest = new LayerVersionsRequest(); - const layerVersionsRequestWithVersion = layerVersionsRequest.withVersion( - mockedVersion1 - ); - const layerVersionsRequestWithBillTag = layerVersionsRequest.withBillingTag( - billingTag - ); + const layerVersionsRequestWithVersion = + layerVersionsRequest.withVersion(mockedVersion1); + const layerVersionsRequestWithBillTag = + layerVersionsRequest.withBillingTag(billingTag); expect(layerVersionsRequestWithVersion.getVersion()).to.be.equal( mockedVersion1 @@ -55,7 +57,7 @@ describe("LayerVersionsRequest", function() { ); }); - it("Should set version with chain", function() { + it("Should set version with chain", function () { const layerVersionsRequest = new LayerVersionsRequest() .withVersion(mockedVersion1) .withVersion(mockedVersion2) diff --git a/@here/olp-sdk-dataservice-read/test/unit/PartitionsRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/PartitionsRequest.test.ts index 9f12c6ed..81f1bb52 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/PartitionsRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/PartitionsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,20 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { PartitionsRequest } from "../../"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("PartitionsRequest", function() { +describe("PartitionsRequest", function () { const billingTag = "billingTag"; const mockedVersion = 42; const mockedIds = ["1", "2", "13", "42"]; @@ -39,24 +41,26 @@ describe("PartitionsRequest", function() { "crc" ]; - it("Should initialize", function() { + it("Should initialize", function () { const partitionsRequest = new PartitionsRequest(); assert.isDefined(partitionsRequest); expect(partitionsRequest).be.instanceOf(PartitionsRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const partitionsRequest = new PartitionsRequest(); - const partitionsRequestWithBillTag = partitionsRequest.withBillingTag( - billingTag - ); - const partitionsRequestWithIds = partitionsRequest.withPartitionIds( - mockedIds - ); - const partitionsAdditionalFields = partitionsRequest.withAdditionalFields( - ["dataSize", "checksum", "compressedDataSize", "crc"] - ); + const partitionsRequestWithBillTag = + partitionsRequest.withBillingTag(billingTag); + const partitionsRequestWithIds = + partitionsRequest.withPartitionIds(mockedIds); + const partitionsAdditionalFields = + partitionsRequest.withAdditionalFields([ + "dataSize", + "checksum", + "compressedDataSize", + "crc" + ]); expect(partitionsRequestWithBillTag.getBillingTag()).to.be.equal( billingTag @@ -67,7 +71,7 @@ describe("PartitionsRequest", function() { assert.isDefined(partitionsAdditionalFields.getAdditionalFields()); }); - it("Should get parameters with chain", function() { + it("Should get parameters with chain", function () { const partitionsRequest = new PartitionsRequest() .withBillingTag(billingTag) .withPartitionIds(mockedIds) @@ -83,11 +87,10 @@ describe("PartitionsRequest", function() { assert.isDefined(partitionsRequest.getAdditionalFields()); }); - it("Should be thrown error if additional fields are empty", function() { + it("Should be thrown error if additional fields are empty", function () { try { - const partitionsRequest = new PartitionsRequest().withAdditionalFields( - [] - ); + const partitionsRequest = + new PartitionsRequest().withAdditionalFields([]); } catch (error) { assert.equal( error.message, diff --git a/@here/olp-sdk-dataservice-read/test/unit/PollRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/PollRequest.test.ts index 7037967c..75611de7 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/PollRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/PollRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,25 +17,28 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { PollRequest } from "../../lib"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("PollRequest", function() { - it("Should initialize", function() { +describe("PollRequest", function () { + it("Should initialize", function () { const pollRequest = new PollRequest(); assert.isDefined(pollRequest); expect(pollRequest).be.instanceOf(PollRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const mockMode = "parallel"; const mockSubId = "1111111111"; @@ -47,7 +50,7 @@ describe("PollRequest", function() { expect(pollRequestWithSub.getSubscriptionId()).to.be.equal(mockSubId); }); - it("Should get parameters with chain", function() { + it("Should get parameters with chain", function () { const mockMode = "parallel"; const mockSubId = "1111111111"; const pollRequest = new PollRequest() diff --git a/@here/olp-sdk-dataservice-read/test/unit/QuadKeyPartitionsRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/QuadKeyPartitionsRequest.test.ts index 18232017..00555e3e 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/QuadKeyPartitionsRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/QuadKeyPartitionsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,20 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { QuadKeyPartitionsRequest } from "../../"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("QuadKeyPartitionsRequest", function() { +describe("QuadKeyPartitionsRequest", function () { const billingTag = "billingTag"; const mockedVersion = 42; const mockedDepth = 3; @@ -38,7 +40,7 @@ describe("QuadKeyPartitionsRequest", function() { level: 3 }; - it("Should initialize", function() { + it("Should initialize", function () { const quadKeyPartitionsRequest = new QuadKeyPartitionsRequest(); assert.isDefined(quadKeyPartitionsRequest); @@ -47,20 +49,21 @@ describe("QuadKeyPartitionsRequest", function() { ); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const quadKeyPartitionsRequest = new QuadKeyPartitionsRequest(); - const quadKeyPartitionsRequestWithDepth = quadKeyPartitionsRequest.withDepth( - mockedDepth - ); - const quadKeyPartitionsRequestWithQuadKey = quadKeyPartitionsRequest.withQuadKey( - mockedQuadKey - ); - const quadKeyPartitionsRequestWithBillTag = quadKeyPartitionsRequest.withBillingTag( - billingTag - ); - const quadKeyPartitionsRequestWithAddFields = quadKeyPartitionsRequest.withAdditionalFields( - ["dataSize", "checksum", "compressedDataSize", "crc"] - ); + const quadKeyPartitionsRequestWithDepth = + quadKeyPartitionsRequest.withDepth(mockedDepth); + const quadKeyPartitionsRequestWithQuadKey = + quadKeyPartitionsRequest.withQuadKey(mockedQuadKey); + const quadKeyPartitionsRequestWithBillTag = + quadKeyPartitionsRequest.withBillingTag(billingTag); + const quadKeyPartitionsRequestWithAddFields = + quadKeyPartitionsRequest.withAdditionalFields([ + "dataSize", + "checksum", + "compressedDataSize", + "crc" + ]); expect(quadKeyPartitionsRequestWithDepth.getDepth()).to.be.equal( mockedDepth ); @@ -75,7 +78,7 @@ describe("QuadKeyPartitionsRequest", function() { ); }); - it("Should get parameters with chain", function() { + it("Should get parameters with chain", function () { const quadKeyPartitionsRequest = new QuadKeyPartitionsRequest() .withDepth(mockedDepth) .withQuadKey(mockedQuadKey) diff --git a/@here/olp-sdk-dataservice-read/test/unit/QuadTreeIndexRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/QuadTreeIndexRequest.test.ts index cbcd2954..440d24a0 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/QuadTreeIndexRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/QuadTreeIndexRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,19 +17,21 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import * as dataServiceRead from "../../lib"; import { HRN } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("QuadTreeIndexRequest", function() { +describe("QuadTreeIndexRequest", function () { const billingTag = "billingTag"; const mockedHRN = HRN.fromString("hrn:here:data:::mocked-hrn"); const mockedLayerId = "mocked-layed-id"; @@ -41,7 +43,7 @@ describe("QuadTreeIndexRequest", function() { level: 1 }; - it("Should initialize", function() { + it("Should initialize", function () { const quadTreeRequest = new dataServiceRead.QuadTreeIndexRequest( mockedHRN, mockedLayerId, @@ -57,21 +59,18 @@ describe("QuadTreeIndexRequest", function() { expect(quadTreeRequest.getLayerType()).to.be.equal(mockedLayerType); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const quadTreeRequest = new dataServiceRead.QuadTreeIndexRequest( mockedHRN, mockedLayerId, mockedLayerType ); - const quadTreeRequestWithVersion = quadTreeRequest.withVersion( - mockedVersion - ); - const quadTreeRequestWithQuadKey = quadTreeRequest.withQuadKey( - mockedQuadKey - ); - const quadTreeRequestWithBillTag = quadTreeRequest.withBillingTag( - billingTag - ); + const quadTreeRequestWithVersion = + quadTreeRequest.withVersion(mockedVersion); + const quadTreeRequestWithQuadKey = + quadTreeRequest.withQuadKey(mockedQuadKey); + const quadTreeRequestWithBillTag = + quadTreeRequest.withBillingTag(billingTag); quadTreeRequest.withAdditionalFields([ "dataSize", @@ -92,7 +91,7 @@ describe("QuadTreeIndexRequest", function() { assert.isDefined(quadTreeRequest.getAdditionalFields()); }); - it("Should get parameters with chain", function() { + it("Should get parameters with chain", function () { const quadTreeRequest = new dataServiceRead.QuadTreeIndexRequest( mockedHRN, mockedLayerId, diff --git a/@here/olp-sdk-dataservice-read/test/unit/QueryClient.test.ts b/@here/olp-sdk-dataservice-read/test/unit/QueryClient.test.ts index cd841538..2fdbc12b 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/QueryClient.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/QueryClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,27 +17,29 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { createStubInstance } from "./stub-instance"; import * as dataServiceRead from "../../lib"; import { MetadataApi, QueryApi } from "@here/olp-sdk-dataservice-api"; import * as core from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("QueryClient", function() { - let sandbox: sinon.SinonSandbox; - let getVersionStub: sinon.SinonStub; - let getPartitionsByIdStub: sinon.SinonStub; - let quadTreeIndexVolatileStub: sinon.SinonStub; - let olpClientSettingsStub: sinon.SinonStubbedInstance; +describe("QueryClient", function () { + let getVersionStub: any; + let getPartitionsByIdStub: any; + let quadTreeIndexVolatileStub: any; + let olpClientSettingsStub: any; - let getBaseUrlRequestStub: sinon.SinonStub; + let getBaseUrlRequestStub: any; const mockedHRN = core.HRN.fromString("hrn:here:data:::mocked-hrn"); const mockedLayerId = "mocked-layed-id"; const mockedLayerType = "volatile"; @@ -48,37 +50,40 @@ describe("QueryClient", function() { level: 3 }; - before(function() { - sandbox = sinon.createSandbox(); - }); - - beforeEach(function() { - olpClientSettingsStub = sandbox.createStubInstance( - core.OlpClientSettings + beforeAll(function () {}); + + beforeEach(function () { + olpClientSettingsStub = createStubInstance(core.OlpClientSettings); + quadTreeIndexVolatileStub = vi + .spyOn(QueryApi, "quadTreeIndexVolatile") + .mockReturnValue(undefined as any); + getVersionStub = vi + .spyOn(MetadataApi, "latestVersion") + .mockReturnValue(undefined as any); + getPartitionsByIdStub = vi + .spyOn(QueryApi, "getPartitionsById") + .mockReturnValue(undefined as any); + getBaseUrlRequestStub = vi + .spyOn(core.RequestFactory, "getBaseUrl") + .mockReturnValue(undefined as any); + + getBaseUrlRequestStub.mockImplementation(() => + Promise.resolve(fakeURL) ); - quadTreeIndexVolatileStub = sandbox.stub( - QueryApi, - "quadTreeIndexVolatile" - ); - getVersionStub = sandbox.stub(MetadataApi, "latestVersion"); - getPartitionsByIdStub = sandbox.stub(QueryApi, "getPartitionsById"); - getBaseUrlRequestStub = sandbox.stub(core.RequestFactory, "getBaseUrl"); - - getBaseUrlRequestStub.callsFake(() => Promise.resolve(fakeURL)); }); - afterEach(function() { - sandbox.restore(); + afterEach(function () { + vi.restoreAllMocks(); }); - it("Shoud be initialised with settings", async function() { + it("Shoud be initialised with settings", async function () { const queryClient = new dataServiceRead.QueryClient( olpClientSettingsStub as any ); assert.isDefined(queryClient); }); - it("Should method fetchQuadTreeIndex provide data with all parameters", async function() { + it("Should method fetchQuadTreeIndex provide data with all parameters", async function () { const mockedQuadKeyTreeData = { subQuads: [ { @@ -100,7 +105,7 @@ describe("QueryClient", function() { ); assert.isDefined(queryClient); - quadTreeIndexVolatileStub.callsFake( + quadTreeIndexVolatileStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedQuadKeyTreeData); } @@ -114,15 +119,14 @@ describe("QueryClient", function() { .withQuadKey(mockedQuadKey) .withVersion(42); - const response = await queryClient.fetchQuadTreeIndex( - quadTreeIndexRequest - ); + const response = + await queryClient.fetchQuadTreeIndex(quadTreeIndexRequest); assert.isDefined(response); expect(response).to.be.equal(mockedQuadKeyTreeData); }); - it("Should method fetchQuadTreeIndex return error if quadKey is not provided", async function() { + it("Should method fetchQuadTreeIndex return error if quadKey is not provided", async function () { const mockedErrorResponse = "Please provide correct QuadKey"; const queryClient = new dataServiceRead.QueryClient( olpClientSettingsStub as any @@ -137,13 +141,13 @@ describe("QueryClient", function() { const result = await queryClient .fetchQuadTreeIndex(quadTreeIndexRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error); }); }); - it("Should method fetchQuadTreeIndex return error if layerId is not provided", async function() { + it("Should method fetchQuadTreeIndex return error if layerId is not provided", async function () { const mockedErrorResponse = "Please provide correct Id of the Layer"; const queryClient = new dataServiceRead.QueryClient( olpClientSettingsStub as any @@ -158,20 +162,20 @@ describe("QueryClient", function() { const result = await queryClient .fetchQuadTreeIndex(quadTreeIndexRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error); }); }); - it("Should method fetchQuadTreeIndex return error if catalog version is not provided", async function() { + it("Should method fetchQuadTreeIndex return error if catalog version is not provided", async function () { const mockedErrorResponse = `Please provide correct catalog version`; const queryClient = new dataServiceRead.QueryClient( olpClientSettingsStub as any ); assert.isDefined(queryClient); - getVersionStub.callsFake( + getVersionStub.mockImplementation( ( builder: any, params: any @@ -188,13 +192,13 @@ describe("QueryClient", function() { const result = await queryClient .fetchQuadTreeIndex(quadTreeIndexRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error); }); }); - it("Should method fetchQuadTreeIndex return error if catalog version is not provided", async function() { + it("Should method fetchQuadTreeIndex return error if catalog version is not provided", async function () { const mockedError = "Unknown error"; const mockedErrorResponse = `Error getting the last catalog version: ${mockedError}`; const queryClient = new dataServiceRead.QueryClient( @@ -202,7 +206,7 @@ describe("QueryClient", function() { ); assert.isDefined(queryClient); - getVersionStub.callsFake( + getVersionStub.mockImplementation( ( builder: any, params: any @@ -219,13 +223,13 @@ describe("QueryClient", function() { const result = await queryClient .fetchQuadTreeIndex(quadTreeIndexRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error); }); }); - it("Should method getPartitionsById provide data with all parameters", async function() { + it("Should method getPartitionsById provide data with all parameters", async function () { const mockedIds = ["1", "2", "13", "42"]; const mockedLayerId = "fake-layer-id"; const mockedHRN = core.HRN.fromString("hrn:here:data:::mocked-hrn"); @@ -251,15 +255,14 @@ describe("QueryClient", function() { ); assert.isDefined(queryClient); - getPartitionsByIdStub.callsFake( + getPartitionsByIdStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitionsResponse); } ); - const partitionsRequest = new dataServiceRead.PartitionsRequest().withPartitionIds( - mockedIds - ); + const partitionsRequest = + new dataServiceRead.PartitionsRequest().withPartitionIds(mockedIds); const response = await queryClient.getPartitionsById( partitionsRequest, @@ -271,7 +274,7 @@ describe("QueryClient", function() { expect(response).to.be.equal(mockedPartitionsResponse); }); - it("Should method getPartitionsById return error if partitionIds list is not provided", async function() { + it("Should method getPartitionsById return error if partitionIds list is not provided", async function () { const mockedErrorResponse = "Please provide correct partitionIds list"; const mockedLayerId = "fake-layer-id"; const mockedHRN = core.HRN.fromString("hrn:here:data:::mocked-hrn"); @@ -284,7 +287,7 @@ describe("QueryClient", function() { const response = await queryClient .getPartitionsById(partitionsRequest, mockedLayerId, mockedHRN) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error); }); diff --git a/@here/olp-sdk-dataservice-read/test/unit/SchemaDetailsRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/SchemaDetailsRequest.test.ts index 295d3b55..06514992 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/SchemaDetailsRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/SchemaDetailsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,38 +17,38 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { SchemaDetailsRequest } from "../../lib"; import { HRN } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("SchemaDetailsRequest", function() { +describe("SchemaDetailsRequest", function () { const billingTag = "billingTag"; const mockedHRN = HRN.fromString("hrn:here:data:::mocked-hrn"); - it("Should initialize", function() { + it("Should initialize", function () { const schemaDetailsRequest = new SchemaDetailsRequest(); assert.isDefined(SchemaDetailsRequest); expect(schemaDetailsRequest).be.instanceOf(SchemaDetailsRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const schemaDetailsRequest = new SchemaDetailsRequest(); - const schemaDetailsRequestWithSchema = schemaDetailsRequest.withSchema( - mockedHRN - ); - const schemaRequestWithBilTag = schemaDetailsRequest.withBillingTag( - billingTag - ); + const schemaDetailsRequestWithSchema = + schemaDetailsRequest.withSchema(mockedHRN); + const schemaRequestWithBilTag = + schemaDetailsRequest.withBillingTag(billingTag); assert.isDefined(schemaDetailsRequestWithSchema); assert.isDefined(schemaRequestWithBilTag); @@ -58,7 +58,7 @@ describe("SchemaDetailsRequest", function() { expect(schemaRequestWithBilTag.getBillingTag()).to.be.equal(billingTag); }); - it("Should set parameters with chain", function() { + it("Should set parameters with chain", function () { const schemaDetailsRequest = new SchemaDetailsRequest() .withSchema(mockedHRN) .withBillingTag(billingTag); diff --git a/@here/olp-sdk-dataservice-read/test/unit/SchemaRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/SchemaRequest.test.ts index 05f099ff..245d5245 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/SchemaRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/SchemaRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,40 +17,40 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { SchemaRequest } from "../../lib"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("SchemaRequest", function() { +describe("SchemaRequest", function () { const billingTag = "billingTag"; const mockedVersion = { id: "42", url: "http://fake.url" }; - it("Should initialize", function() { + it("Should initialize", function () { const schemaRequest = new SchemaRequest(); assert.isDefined(schemaRequest); expect(schemaRequest).be.instanceOf(SchemaRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const schemaRequest = new SchemaRequest(); - const schemaRequestWithVariant = schemaRequest.withVariant( - mockedVersion - ); - const schemaRequestWithBilTag = schemaRequest.withBillingTag( - billingTag - ); + const schemaRequestWithVariant = + schemaRequest.withVariant(mockedVersion); + const schemaRequestWithBilTag = + schemaRequest.withBillingTag(billingTag); assert.isDefined(schemaRequestWithVariant); assert.isDefined(schemaRequestWithBilTag); @@ -60,7 +60,7 @@ describe("SchemaRequest", function() { expect(schemaRequestWithBilTag.getBillingTag()).to.be.equal(billingTag); }); - it("Should set parameters with chain", function() { + it("Should set parameters with chain", function () { const schemaRequest = new SchemaRequest() .withVariant(mockedVersion) .withBillingTag(billingTag); diff --git a/@here/olp-sdk-dataservice-read/test/unit/SeekRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/SeekRequest.test.ts index 7766e1f7..04c9706e 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/SeekRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/SeekRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,25 +17,28 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { SeekRequest } from "../../lib"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("SubscribeRequest", function() { - it("Should initialize", function() { +describe("SubscribeRequest", function () { + it("Should initialize", function () { const seekRequest = new SeekRequest(); assert.isDefined(seekRequest); expect(seekRequest).be.instanceOf(SeekRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const mockMode = "parallel"; const mockSubId = "1111111111"; const mockOffsets = { @@ -63,7 +66,7 @@ describe("SubscribeRequest", function() { ); }); - it("Should get parameters with chain", function() { + it("Should get parameters with chain", function () { const mockMode = "parallel"; const mockSubId = "1111111111"; const mockOffsets = { diff --git a/@here/olp-sdk-dataservice-read/test/unit/StatisticsClient.test.ts b/@here/olp-sdk-dataservice-read/test/unit/StatisticsClient.test.ts index 78ad28ef..911b4165 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/StatisticsClient.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/StatisticsClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,71 +17,70 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { createStubInstance } from "./stub-instance"; import * as dataServiceRead from "../../lib"; import { CoverageApi } from "@here/olp-sdk-dataservice-api"; import * as core from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; - -describe("StatistiscClient", function() { - let sandbox: sinon.SinonSandbox; - let olpClientSettingsStub: sinon.SinonStubbedInstance; - let getDataCoverageSummaryStub: sinon.SinonStub; - let getStatisticsBitMapStub: sinon.SinonStub; - let getStatisticsSizeMapStub: sinon.SinonStub; - let getStatisticsTimeMapStub: sinon.SinonStub; - let getBaseUrlRequestStub: sinon.SinonStub; +describe("StatistiscClient", function () { + let olpClientSettingsStub: any; + let getDataCoverageSummaryStub: any; + let getStatisticsBitMapStub: any; + let getStatisticsSizeMapStub: any; + let getStatisticsTimeMapStub: any; + let getBaseUrlRequestStub: any; const mockedHRN = core.HRN.fromString("hrn:here:data:::mocked-hrn"); const mockedLayerId = "mocked-layed-id"; const fakeURL = "http://fake-base.url"; - before(function() { - sandbox = sinon.createSandbox(); - }); - - beforeEach(function() { - olpClientSettingsStub = sandbox.createStubInstance( - core.OlpClientSettings - ); - getBaseUrlRequestStub = sandbox.stub(core.RequestFactory, "getBaseUrl"); - getDataCoverageSummaryStub = sandbox.stub( - CoverageApi, - "getDataCoverageSummary" + beforeAll(function () {}); + + beforeEach(function () { + olpClientSettingsStub = createStubInstance(core.OlpClientSettings); + getBaseUrlRequestStub = vi + .spyOn(core.RequestFactory, "getBaseUrl") + .mockReturnValue(undefined as any); + getDataCoverageSummaryStub = vi + .spyOn(CoverageApi, "getDataCoverageSummary") + .mockReturnValue(undefined as any); + getStatisticsBitMapStub = vi + .spyOn(CoverageApi, "getDataCoverageTile") + .mockReturnValue(undefined as any); + getStatisticsSizeMapStub = vi + .spyOn(CoverageApi, "getDataCoverageSizeMap") + .mockReturnValue(undefined as any); + getStatisticsTimeMapStub = vi + .spyOn(CoverageApi, "getDataCoverageTimeMap") + .mockReturnValue(undefined as any); + + getBaseUrlRequestStub.mockImplementation(() => + Promise.resolve(fakeURL) ); - getStatisticsBitMapStub = sandbox.stub( - CoverageApi, - "getDataCoverageTile" - ); - getStatisticsSizeMapStub = sandbox.stub( - CoverageApi, - "getDataCoverageSizeMap" - ); - getStatisticsTimeMapStub = sandbox.stub( - CoverageApi, - "getDataCoverageTimeMap" - ); - - getBaseUrlRequestStub.callsFake(() => Promise.resolve(fakeURL)); }); - afterEach(function() { - sandbox.restore(); + afterEach(function () { + vi.restoreAllMocks(); }); - it("Shoud be initialised with context", async function() { + it("Shoud be initialised with context", async function () { const statisticsClient = new dataServiceRead.StatisticsClient( olpClientSettingsStub as any ); assert.isDefined(statisticsClient); }); - it("Should method getSummary provide data", async function() { + it("Should method getSummary provide data", async function () { const mockedSummary: CoverageApi.LayerSummary = { catalogHRN: "hrn:here:data:::mocked-hrn", layer: mockedLayerId, @@ -107,7 +106,7 @@ describe("StatistiscClient", function() { olpClientSettingsStub as any ); assert.isDefined(statisticsClient); - getDataCoverageSummaryStub.callsFake( + getDataCoverageSummaryStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedSummary); } @@ -121,7 +120,7 @@ describe("StatistiscClient", function() { assert.isDefined(summary); }); - it("Should method getSummary return error if catalogHRN is not provided", async function() { + it("Should method getSummary return error if catalogHRN is not provided", async function () { const mockedErrorResponse = "No catalogHrn provided"; const statisticsClient = new dataServiceRead.StatisticsClient( olpClientSettingsStub as any @@ -134,48 +133,47 @@ describe("StatistiscClient", function() { const summary = await statisticsClient .getSummary(summaryRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.message); }); }); - it("Should method getSummary return error if layerId is not provided", async function() { + it("Should method getSummary return error if layerId is not provided", async function () { const mockedErrorResponse = "No layerId provided"; const statisticsClient = new dataServiceRead.StatisticsClient( olpClientSettingsStub as any ); assert.isDefined(statisticsClient); - const summaryRequest = new dataServiceRead.SummaryRequest().withCatalogHrn( - mockedHRN - ); + const summaryRequest = + new dataServiceRead.SummaryRequest().withCatalogHrn(mockedHRN); const summary = await statisticsClient .getSummary(summaryRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.message); }); }); - it("Should method getStatistics provide data", async function() { + it("Should method getStatistics provide data", async function () { const mockedStatistics: Response = new Response("mocked-response"); const statisticsClient = new dataServiceRead.StatisticsClient( olpClientSettingsStub as any ); assert.isDefined(statisticsClient); - getStatisticsBitMapStub.callsFake( + getStatisticsBitMapStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedStatistics); } ); - getStatisticsSizeMapStub.callsFake( + getStatisticsSizeMapStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedStatistics); } ); - getStatisticsTimeMapStub.callsFake( + getStatisticsTimeMapStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedStatistics); } @@ -215,7 +213,7 @@ describe("StatistiscClient", function() { assert.isDefined(statisticTimeMap); }); - it("Should method getStatistics return error if catalogHRN is not provided", async function() { + it("Should method getStatistics return error if catalogHRN is not provided", async function () { const mockedErrorResponse = "No catalogHrn provided"; const statisticsClient = new dataServiceRead.StatisticsClient( olpClientSettingsStub as any @@ -229,13 +227,13 @@ describe("StatistiscClient", function() { const statistic = await statisticsClient .getStatistics(statisticRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.message); }); }); - it("Should method getStatistics return error if layerId is not provided", async function() { + it("Should method getStatistics return error if layerId is not provided", async function () { const mockedErrorResponse = "No layerId provided"; const statisticsClient = new dataServiceRead.StatisticsClient( olpClientSettingsStub as any @@ -249,13 +247,13 @@ describe("StatistiscClient", function() { const statistic = await statisticsClient .getStatistics(statisticRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.message); }); }); - it("Should method getStatistics return error if typemap is not provided", async function() { + it("Should method getStatistics return error if typemap is not provided", async function () { const mockedErrorResponse = "No typemap provided"; const statisticsClient = new dataServiceRead.StatisticsClient( olpClientSettingsStub as any @@ -269,29 +267,29 @@ describe("StatistiscClient", function() { const statistic = await statisticsClient .getStatistics(statisticRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.message); }); }); - it("Should method getStatistics provide data if dataLevel not set", async function() { + it("Should method getStatistics provide data if dataLevel not set", async function () { const mockedStatistics: Response = new Response("mocked-response"); const statisticsClient = new dataServiceRead.StatisticsClient( olpClientSettingsStub as any ); assert.isDefined(statisticsClient); - getStatisticsBitMapStub.callsFake( + getStatisticsBitMapStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedStatistics); } ); - getStatisticsSizeMapStub.callsFake( + getStatisticsSizeMapStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedStatistics); } ); - getStatisticsTimeMapStub.callsFake( + getStatisticsTimeMapStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedStatistics); } diff --git a/@here/olp-sdk-dataservice-read/test/unit/StatisticsRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/StatisticsRequest.test.ts index 62af6b10..bf32e78d 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/StatisticsRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/StatisticsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,49 +17,46 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { CoverageDataType, StatisticsRequest } from "../../lib"; import { HRN } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("SummaryRequest", function() { +describe("SummaryRequest", function () { const billingTag = "billingTag"; const mockedHRN = HRN.fromString("hrn:here:data:::mocked-hrn"); const mockedLayerId = "mocked-layed-id"; const mockedDataLevel = 9; const mockedTimemap = CoverageDataType.TIMEMAP; - it("Should initialize", function() { + it("Should initialize", function () { const statisticsRequest = new StatisticsRequest(); assert.isDefined(statisticsRequest); expect(statisticsRequest).be.instanceOf(StatisticsRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const statisticsRequest = new StatisticsRequest(); - const statisticsRequestWithCatalogHrn = statisticsRequest.withCatalogHrn( - mockedHRN - ); - const statisticsRequestWithLayerId = statisticsRequest.withLayerId( - mockedLayerId - ); - const statisticsRequestWithDataLevel = statisticsRequest.withDataLevel( - mockedDataLevel - ); - const statisticsRequestWithTimemap = statisticsRequest.withTypemap( - mockedTimemap - ); - const statisticsRequestWithBillTag = statisticsRequest.withBillingTag( - billingTag - ); + const statisticsRequestWithCatalogHrn = + statisticsRequest.withCatalogHrn(mockedHRN); + const statisticsRequestWithLayerId = + statisticsRequest.withLayerId(mockedLayerId); + const statisticsRequestWithDataLevel = + statisticsRequest.withDataLevel(mockedDataLevel); + const statisticsRequestWithTimemap = + statisticsRequest.withTypemap(mockedTimemap); + const statisticsRequestWithBillTag = + statisticsRequest.withBillingTag(billingTag); expect(statisticsRequestWithCatalogHrn.getCatalogHrn()).to.be.equal( mockedHRN.toString() @@ -78,7 +75,7 @@ describe("SummaryRequest", function() { ); }); - it("Should get parameters with chain", function() { + it("Should get parameters with chain", function () { const statisticsRequest = new StatisticsRequest() .withCatalogHrn(mockedHRN) .withLayerId(mockedLayerId) diff --git a/@here/olp-sdk-dataservice-read/test/unit/StreamLayerClient.test.ts b/@here/olp-sdk-dataservice-read/test/unit/StreamLayerClient.test.ts index 58c6318c..5848f03e 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/StreamLayerClient.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/StreamLayerClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,20 +17,23 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { createStubInstance } from "./stub-instance"; import * as dataServiceRead from "../../lib"; import * as core from "@here/olp-sdk-core"; import { BlobApi, StreamApi } from "@here/olp-sdk-dataservice-api"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - /** * Extending StreamLayerClient to test protected properties and mock methods */ @@ -60,16 +63,15 @@ class StreamLayerClientTest extends dataServiceRead.StreamLayerClient { } } -describe("StreamLayerClient", function() { - let sandbox: sinon.SinonSandbox; - let getBaseUrlRequestStub: sinon.SinonStub; - let getFactoryRequestStub: sinon.SinonStub; - let subscribeStub: sinon.SinonStub; - let pollStub: sinon.SinonStub; - let unsubscribeStub: sinon.SinonStub; - let commitOffsetsStub: sinon.SinonStub; - let getBlobStub: sinon.SinonStub; - let seekOffsetsStub: sinon.SinonStub; +describe("StreamLayerClient", function () { + let getBaseUrlRequestStub: any; + let getFactoryRequestStub: any; + let subscribeStub: any; + let pollStub: any; + let unsubscribeStub: any; + let commitOffsetsStub: any; + let getBlobStub: any; + let seekOffsetsStub: any; let streamLayerClient: StreamLayerClientTest; const mockedHRN = core.HRN.fromString("hrn:here:data:::mocked-hrn"); const mockedLayerId = "mocked-layed-id"; @@ -82,11 +84,10 @@ describe("StreamLayerClient", function() { settings: core.OlpClientSettings; }; - before(function() { - sandbox = sinon.createSandbox(); - settings = (sandbox.createStubInstance( + beforeAll(function () { + settings = createStubInstance( core.OlpClientSettings - ) as unknown) as core.OlpClientSettings; + ) as unknown as core.OlpClientSettings; params = { catalogHrn: mockedHRN, layerId: mockedLayerId, @@ -95,22 +96,38 @@ describe("StreamLayerClient", function() { streamLayerClient = new StreamLayerClientTest(params); }); - beforeEach(function() { - getBlobStub = sandbox.stub(BlobApi, "getBlob"); - subscribeStub = sandbox.stub(StreamApi, "subscribe"); - pollStub = sandbox.stub(StreamApi, "consumeData"); - commitOffsetsStub = sandbox.stub(StreamApi, "doCommitOffsets"); - unsubscribeStub = sandbox.stub(StreamApi, "deleteSubscription"); - seekOffsetsStub = sandbox.stub(StreamApi, "seekToOffset"); - getBaseUrlRequestStub = sandbox.stub(core.RequestFactory, "getBaseUrl"); - getBaseUrlRequestStub.callsFake(() => Promise.resolve(fakeURL)); + beforeEach(function () { + getBlobStub = vi + .spyOn(BlobApi, "getBlob") + .mockReturnValue(undefined as any); + subscribeStub = vi + .spyOn(StreamApi, "subscribe") + .mockReturnValue(undefined as any); + pollStub = vi + .spyOn(StreamApi, "consumeData") + .mockReturnValue(undefined as any); + commitOffsetsStub = vi + .spyOn(StreamApi, "doCommitOffsets") + .mockReturnValue(undefined as any); + unsubscribeStub = vi + .spyOn(StreamApi, "deleteSubscription") + .mockReturnValue(undefined as any); + seekOffsetsStub = vi + .spyOn(StreamApi, "seekToOffset") + .mockReturnValue(undefined as any); + getBaseUrlRequestStub = vi + .spyOn(core.RequestFactory, "getBaseUrl") + .mockReturnValue(undefined as any); + getBaseUrlRequestStub.mockImplementation(() => + Promise.resolve(fakeURL) + ); }); - afterEach(function() { - sandbox.restore(); + afterEach(function () { + vi.restoreAllMocks(); }); - it("Shoud be initialized", async function() { + it("Shoud be initialized", async function () { assert.isDefined(streamLayerClient); expect(streamLayerClient).be.instanceOf( dataServiceRead.StreamLayerClient @@ -122,17 +139,17 @@ describe("StreamLayerClient", function() { ); }); - it("Should subscribe method post data and return subscription id", async function() { + it("Should subscribe method post data and return subscription id", async function () { const headers = new Headers(); headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-b5ff"); const mockResponse = { headers, subscriptionId: "-9141392.f96875c-9422-4df4-b5ff-41a4f459", - json: function() { + json: function () { return this; } }; - subscribeStub.callsFake( + subscribeStub.mockImplementation( ( builder: any, params: any @@ -149,13 +166,13 @@ describe("StreamLayerClient", function() { expect(subscription).to.be.equal(mockResponse.subscriptionId); }); - it("Should subscribe be aborted fetching by abort signal", async function() { + it("Should subscribe be aborted fetching by abort signal", async function () { const mockResponse = { nodeBaseURL: "https://mock-url/hrn/id", subscriptionId: "-9141392.f96875c-9422-4df4-b5ff-41a4f459" }; - subscribeStub.callsFake( + subscribeStub.mockImplementation( ( builder: any, params: any @@ -169,28 +186,27 @@ describe("StreamLayerClient", function() { const streamLayerClient = new dataServiceRead.StreamLayerClient(params); const request = new dataServiceRead.SubscribeRequest(); const abortController = new AbortController(); + abortController.abort(); - streamLayerClient - .subscribe( - (request as unknown) as dataServiceRead.SubscribeRequest, + try { + await streamLayerClient.subscribe( + request as unknown as dataServiceRead.SubscribeRequest, abortController.signal - ) - .then() - .catch((err: any) => { - assert.strictEqual(err, "AbortError"); - assert.isTrue(abortController.signal.aborted); - }); - - abortController.abort(); + ); + assert.fail("subscribe should have been aborted"); + } catch (err) { + assert.strictEqual(err, "AbortError"); + assert.isTrue(abortController.signal.aborted); + } }); - it("Should poll method get data, post offsets and return messages", async function() { + it("Should poll method get data, post offsets and return messages", async function () { const headers = new Headers(); const commitOffsetsResponse = new Response("Ok"); headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-bdfj"); - const mockResponse = ({ + const mockResponse = { headers, - json: function() { + json: function () { return { messages: [ { @@ -214,8 +230,7 @@ describe("StreamLayerClient", function() { partition: "314010584", checksum: "ff7494d6f17da702862e550c907c0a91", dataSize: 100500, - data: - "7n348c7y49nry394y39yv39y384tvn3984tvn34ty034ynt3yvt983ny", + data: "7n348c7y49nry394y39yv39y384tvn3984tvn34ty034ynt3yvt983ny", dataHandle: "", timestamp: 1517916707 }, @@ -227,24 +242,24 @@ describe("StreamLayerClient", function() { ] }; } - } as unknown) as Response; - pollStub.callsFake( + } as unknown as Response; + pollStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockResponse); } ); - commitOffsetsStub.callsFake( + commitOffsetsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(commitOffsetsResponse); } ); - let settings = sandbox.createStubInstance(core.OlpClientSettings); + let settings = createStubInstance(core.OlpClientSettings); const params = { catalogHrn: mockedHRN, layerId: mockedLayerId, - settings: (settings as unknown) as core.OlpClientSettings + settings: settings as unknown as core.OlpClientSettings }; const subscribtionId = await streamLayerClient.subscribe( new dataServiceRead.SubscribeRequest().withMode("serial") @@ -259,7 +274,7 @@ describe("StreamLayerClient", function() { expect(messages[0].metaData.dataSize).to.be.equal(100500); }); - it("Should method getData call API with correct arguments", async function() { + it("Should method getData call API with correct arguments", async function () { const mockedBlobData: Response = new Response("mocked-blob-response"); const mockedMessage = { metaData: { @@ -277,19 +292,19 @@ describe("StreamLayerClient", function() { offset: 38562 } }; - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedBlobData); } ); await streamLayerClient.getData(mockedMessage); - expect(getBlobStub.getCalls()[0].args[1].dataHandle).to.be.equal( + expect(getBlobStub.mock.calls[0][1].dataHandle).to.be.equal( mockedMessage.metaData.dataHandle ); }); - it("Should base url error be handled", async function() { + it("Should base url error be handled", async function () { const mockedMessage = { metaData: { partition: "314010583", @@ -308,20 +323,20 @@ describe("StreamLayerClient", function() { }; const mockedErrorResponse = "Bad response"; - getBaseUrlRequestStub.callsFake(() => + getBaseUrlRequestStub.mockImplementation(() => Promise.reject({ status: 400, statusText: "Bad response" }) ); - await streamLayerClient.getData(mockedMessage).catch(error => { + await streamLayerClient.getData(mockedMessage).catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.statusText); }); }); - it("Should method getData return Error without parameters", async function() { + it("Should method getData return Error without parameters", async function () { const mockedMessage = { metaData: { partition: "314010583" @@ -336,13 +351,13 @@ describe("StreamLayerClient", function() { message: "No data handle for this partition" }; - await streamLayerClient.getData(mockedMessage).catch(error => { + await streamLayerClient.getData(mockedMessage).catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse.message, error.message); }); }); - it("Should error be handled", async function() { + it("Should error be handled", async function () { const mockedMessage = { metaData: { partition: "314010583", @@ -362,7 +377,7 @@ describe("StreamLayerClient", function() { const mockedErrorResponse = "mocked-error"; - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.reject("mocked-error"); } @@ -370,13 +385,13 @@ describe("StreamLayerClient", function() { const response = await streamLayerClient .getData(mockedMessage) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error); }); }); - it("Should HttpError be handled", async function() { + it("Should HttpError be handled", async function () { const TEST_ERROR_CODE = 404; const mockedError = new core.HttpError(TEST_ERROR_CODE, "Test Error"); @@ -397,7 +412,7 @@ describe("StreamLayerClient", function() { } }; - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.reject(mockedError); } @@ -405,7 +420,7 @@ describe("StreamLayerClient", function() { const response = await streamLayerClient .getData(mockedMessage) - .catch(err => { + .catch((err) => { assert.isDefined(err); expect(err.status).to.be.equal(TEST_ERROR_CODE); expect(err.message).to.be.equal("Test Error"); @@ -413,12 +428,12 @@ describe("StreamLayerClient", function() { }); }); - it("Should unsubscribe be aborted fetching by abort signal", async function() { - const mockResponse = ({ + it("Should unsubscribe be aborted fetching by abort signal", async function () { + const mockResponse = { status: 200 - } as unknown) as Response; + } as unknown as Response; - unsubscribeStub.callsFake( + unsubscribeStub.mockImplementation( (builder: any, params: any): Promise => { return builder.abortSignal.aborted ? Promise.reject("AbortError") @@ -428,26 +443,25 @@ describe("StreamLayerClient", function() { const request = new dataServiceRead.UnsubscribeRequest(); const abortController = new AbortController(); + abortController.abort(); - streamLayerClient - .unsubscribe( - (request as unknown) as dataServiceRead.UnsubscribeRequest, + try { + await streamLayerClient.unsubscribe( + request as unknown as dataServiceRead.UnsubscribeRequest, abortController.signal - ) - .then() - .catch((err: any) => { - assert.strictEqual(err, "AbortError"); - assert.isTrue(abortController.signal.aborted); - }); - - abortController.abort(); + ); + assert.fail("unsubscribe should have been aborted"); + } catch (err) { + assert.strictEqual(err, "AbortError"); + assert.isTrue(abortController.signal.aborted); + } }); - it("Should unsubscribe delete subscription and return OK", async function() { - const mockResponse = ({ + it("Should unsubscribe delete subscription and return OK", async function () { + const mockResponse = { status: 200 - } as unknown) as Response; - unsubscribeStub.callsFake( + } as unknown as Response; + unsubscribeStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockResponse); } @@ -456,16 +470,17 @@ describe("StreamLayerClient", function() { const subscribtionId = await streamLayerClient.subscribe( new dataServiceRead.SubscribeRequest().withMode("serial") ); - const request = new dataServiceRead.UnsubscribeRequest().withSubscriptionId( - subscribtionId - ); + const request = + new dataServiceRead.UnsubscribeRequest().withSubscriptionId( + subscribtionId + ); const unsubscription = await streamLayerClient.unsubscribe(request); assert.isDefined(unsubscription); expect(unsubscription.status).to.be.equal(mockResponse.status); }); - it("Should unsubscribe return error if mode is parallel and subscriptionId is missed", async function() { + it("Should unsubscribe return error if mode is parallel and subscriptionId is missed", async function () { const mockError = "Error: for 'parallel' mode 'subscriptionId' is required."; @@ -474,13 +489,13 @@ describe("StreamLayerClient", function() { ); const unsubscription = await streamLayerClient .unsubscribe(request) - .catch(err => { + .catch((err) => { assert.isDefined(err); expect(err.message).to.be.equal(mockError); }); }); - it("Should seek return error if mode is parallel and subscriptionId is missed", async function() { + it("Should seek return error if mode is parallel and subscriptionId is missed", async function () { const mockOffsets = { offsets: [ { @@ -499,32 +514,32 @@ describe("StreamLayerClient", function() { const request = new dataServiceRead.SeekRequest() .withMode("parallel") .withSeekOffsets(mockOffsets); - const seek = await streamLayerClient.seek(request).catch(err => { + const seek = await streamLayerClient.seek(request).catch((err) => { assert.isDefined(err); expect(err.message).to.be.equal(mockError); }); }); - it("Should seek return error if offsets are missed", async function() { + it("Should seek return error if offsets are missed", async function () { const mockError = "Error: offsets are required."; const request = new dataServiceRead.SeekRequest(); - const seek = await streamLayerClient.seek(request).catch(err => { + const seek = await streamLayerClient.seek(request).catch((err) => { assert.isDefined(err); expect(err.message).to.be.equal(mockError); }); }); - it("Should seek set offsets and return OK", async function() { + it("Should seek set offsets and return OK", async function () { const headers = new Headers(); headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-bdfj"); - const mockResponse = ({ + const mockResponse = { headers, - json: function() { + json: function () { return this; }, status: 200 - } as unknown) as Response; + } as unknown as Response; const mockOffsets = { offsets: [ { @@ -537,7 +552,7 @@ describe("StreamLayerClient", function() { } ] }; - seekOffsetsStub.callsFake( + seekOffsetsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockResponse); } @@ -555,17 +570,17 @@ describe("StreamLayerClient", function() { expect(seek.status).to.be.equal(mockResponse.status); }); - it("Should seek update xCorrelationId", async function() { + it("Should seek update xCorrelationId", async function () { const xCorrelationId = "9141392.f96875c-9422-4df4-bdfj"; const headers = new Headers(); headers.append("X-Correlation-Id", xCorrelationId); - const mockResponse = ({ + const mockResponse = { headers, - json: function() { + json: function () { return this; }, status: 200 - } as unknown) as Response; + } as unknown as Response; const mockOffsets = { offsets: [ { @@ -578,7 +593,7 @@ describe("StreamLayerClient", function() { } ] }; - seekOffsetsStub.callsFake( + seekOffsetsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockResponse); } @@ -595,17 +610,17 @@ describe("StreamLayerClient", function() { expect(streamLayerClient["xCorrelationId"]).equals(xCorrelationId); }); - it("Should pull return error if mode is parallel and subscriptionId is missed", async function() { + it("Should pull return error if mode is parallel and subscriptionId is missed", async function () { await streamLayerClient .poll(new dataServiceRead.PollRequest().withMode("parallel")) - .catch(error => { + .catch((error) => { expect(error.message).equals( "Error: for 'parallel' mode 'subscriptionId' is required." ); }); }); - it("Should pull return error if subscribtionNodeBaseUrl is missed", async function() { + it("Should pull return error if subscribtionNodeBaseUrl is missed", async function () { streamLayerClient["subscribtionNodeBaseUrl"] = undefined; await streamLayerClient .poll( @@ -613,31 +628,31 @@ describe("StreamLayerClient", function() { .withMode("parallel") .withSubscriptionId("mocked-id") ) - .catch(error => { + .catch((error) => { expect(error.message).equals( `No valid nodeBaseurl provided for the subscribtion id=mocked-id, please check your subscribtion` ); }); }); - it("Should not post offsets if no data", async function() { + it("Should not post offsets if no data", async function () { const headers = new Headers(); headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-bdfj"); - const mockResponse = ({ + const mockResponse = { headers, - json: function() { + json: function () { return { messages: [] }; } - } as unknown) as Response; - pollStub.callsFake( + } as unknown as Response; + pollStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockResponse); } ); - let settings = sandbox.createStubInstance(core.OlpClientSettings); + let settings = createStubInstance(core.OlpClientSettings); const subscribtionId = await streamLayerClient.subscribe( new dataServiceRead.SubscribeRequest().withMode("serial") ); @@ -648,15 +663,15 @@ describe("StreamLayerClient", function() { assert.isDefined(messages); expect(messages.length).to.be.equal(0); - expect(commitOffsetsStub.notCalled); + expect(commitOffsetsStub.mock.calls.length === 0); }); - it("Should not throw if commiting offsets failed", async function() { + it("Should not throw if commiting offsets failed", async function () { const headers = new Headers(); headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-bdfj"); - const mockResponse = ({ + const mockResponse = { headers, - json: function() { + json: function () { return { messages: [ { @@ -680,8 +695,7 @@ describe("StreamLayerClient", function() { partition: "314010584", checksum: "ff7494d6f17da702862e550c907c0a91", dataSize: 100500, - data: - "7n348c7y49nry394y39yv39y384tvn3984tvn34ty034ynt3yvt983ny", + data: "7n348c7y49nry394y39yv39y384tvn3984tvn34ty034ynt3yvt983ny", dataHandle: "", timestamp: 1517916707 }, @@ -693,24 +707,24 @@ describe("StreamLayerClient", function() { ] }; } - } as unknown) as Response; - pollStub.callsFake( + } as unknown as Response; + pollStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockResponse); } ); - commitOffsetsStub.callsFake( + commitOffsetsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.reject(new Error("fake error")); } ); - let settings = sandbox.createStubInstance(core.OlpClientSettings); + let settings = createStubInstance(core.OlpClientSettings); const params = { catalogHrn: mockedHRN, layerId: mockedLayerId, - settings: (settings as unknown) as core.OlpClientSettings + settings: settings as unknown as core.OlpClientSettings }; const subscribtionId = await streamLayerClient.subscribe( new dataServiceRead.SubscribeRequest().withMode("serial") @@ -724,4 +738,160 @@ describe("StreamLayerClient", function() { expect(messages.length).to.be.equal(2); expect(messages[0].metaData.dataSize).to.be.equal(100500); }); + + it("Should subscribe leave the correlation id unset if the response carries none", async function () { + const mockResponse = { + headers: new Headers(), + nodeBaseURL: "https://mock-url/hrn/id", + subscriptionId: "-9141392.f96875c-9422-4df4-b5ff-41a4f459", + json: function () { + return this; + } + }; + subscribeStub.mockImplementation( + (): Promise => + Promise.resolve(mockResponse) + ); + + const client = new dataServiceRead.StreamLayerClient(params); + const subscription = await client.subscribe( + new dataServiceRead.SubscribeRequest() + ); + + expect(subscription).to.be.equal(mockResponse.subscriptionId); + assert.isUndefined(client["xCorrelationId"]); + }); + + it("Should poll return no messages if the response carries no data", async function () { + const mockResponse = { + headers: new Headers(), + json: function () { + return null; + } + } as unknown as Response; + pollStub.mockImplementation((): Promise => + Promise.resolve(mockResponse) + ); + + const subscribtionId = await streamLayerClient.subscribe( + new dataServiceRead.SubscribeRequest().withMode("serial") + ); + const messages = await streamLayerClient.poll( + new dataServiceRead.PollRequest().withSubscriptionId(subscribtionId) + ); + + expect(messages.length).to.be.equal(0); + expect(commitOffsetsStub.mock.calls.length).to.be.equal(0); + assert.isUndefined(streamLayerClient["xCorrelationId"]); + }); + + it("Should poll commit the highest offset of a partition", async function () { + const headers = new Headers(); + headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-bdfj"); + const mockResponse = { + headers, + json: function () { + return { + messages: [ + { + metaData: { + partition: "314010583", + dataHandle: "iVBORw0-Lf9HdIZBfNEiKAA" + }, + offset: { + partition: 7, + offset: 38562 + } + }, + { + metaData: { + partition: "314010584", + dataHandle: "iVBORw0-Lf9HdIZBfNEiKAB" + }, + offset: { + partition: 7, + offset: 100 + } + } + ] + }; + } + } as unknown as Response; + pollStub.mockImplementation((): Promise => + Promise.resolve(mockResponse) + ); + commitOffsetsStub.mockImplementation((): Promise => + Promise.resolve(new Response("Ok")) + ); + + const subscribtionId = await streamLayerClient.subscribe( + new dataServiceRead.SubscribeRequest().withMode("serial") + ); + await streamLayerClient.poll( + new dataServiceRead.PollRequest().withSubscriptionId(subscribtionId) + ); + + expect( + commitOffsetsStub.mock.calls[0][1].commitOffsets.offsets + ).to.be.deep.equal([{ partition: 7, offset: 38562 }]); + }); + + it("Should unsubscribe return error if subscribtionNodeBaseUrl is missed", async function () { + const client = new dataServiceRead.StreamLayerClient(params); + const request = + new dataServiceRead.UnsubscribeRequest().withSubscriptionId( + "mocked-id" + ); + + await expect(client.unsubscribe(request)).rejects.toThrow( + "Subscribtion error. No valid nodeBaseurl provided for the subscribtion id=mocked-id, please check your subscribtion" + ); + }); + + it("Should seek return error if subscribtionNodeBaseUrl is missed", async function () { + const client = new dataServiceRead.StreamLayerClient(params); + const request = new dataServiceRead.SeekRequest() + .withSubscriptionId("mocked-id") + .withSeekOffsets({ offsets: [{ partition: 1, offset: 1 }] }); + + await expect(client.seek(request)).rejects.toThrow( + "Subscribtion error. No valid nodeBaseurl provided for the subscribtion id=mocked-id, please check your subscribtion" + ); + }); + + it("Should seek keep the correlation id if the response carries none", async function () { + const xCorrelationId = "9141392.f96875c-9422-4df4-bdfj"; + const subscribeHeaders = new Headers(); + subscribeHeaders.append("X-Correlation-Id", xCorrelationId); + subscribeStub.mockImplementation( + (): Promise => + Promise.resolve({ + headers: subscribeHeaders, + nodeBaseURL: "https://mock-url/hrn/id", + subscriptionId: "mocked-subscribtionId", + json: function () { + return this; + } + }) + ); + seekOffsetsStub.mockImplementation((): Promise => + Promise.resolve({ + headers: new Headers(), + status: 200 + } as unknown as Response) + ); + + const client = new dataServiceRead.StreamLayerClient(params); + const subscribtionId = await client.subscribe( + new dataServiceRead.SubscribeRequest().withMode("serial") + ); + const seek = await client.seek( + new dataServiceRead.SeekRequest() + .withSubscriptionId(subscribtionId) + .withSeekOffsets({ offsets: [{ partition: 1, offset: 1 }] }) + ); + + expect(seek.status).to.be.equal(200); + expect(client["xCorrelationId"]).to.be.equal(xCorrelationId); + }); }); diff --git a/@here/olp-sdk-dataservice-read/test/unit/SubscribeRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/SubscribeRequest.test.ts index 1c310c0c..68eb859c 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/SubscribeRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/SubscribeRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,25 +17,28 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { SubscribeRequest } from "../../lib"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("SubscribeRequest", function() { - it("Should initialize", function() { +describe("SubscribeRequest", function () { + it("Should initialize", function () { const subscriptionRequest = new SubscribeRequest(); assert.isDefined(subscriptionRequest); expect(subscriptionRequest).be.instanceOf(SubscribeRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const mockMode = "parallel"; const mockSubId = "1111111111"; const mockConsumerId = "123e4567-e89b-12d3-a456-556642440000"; @@ -46,18 +49,16 @@ describe("SubscribeRequest", function() { }; const subscriptionRequest = new SubscribeRequest(); - const subscriptionRequestWithMode = subscriptionRequest.withMode( - mockMode - ); - const subscriptionRequestWithSub = subscriptionRequest.withSubscriptionId( - mockSubId - ); - const subscriptionRequestWithConsumerId = subscriptionRequest.withConsumerId( - mockConsumerId - ); - const subscriptionRequestWithSubscriptionProperties = subscriptionRequest.withSubscriptionProperties( - mockSubscriptionProperties - ); + const subscriptionRequestWithMode = + subscriptionRequest.withMode(mockMode); + const subscriptionRequestWithSub = + subscriptionRequest.withSubscriptionId(mockSubId); + const subscriptionRequestWithConsumerId = + subscriptionRequest.withConsumerId(mockConsumerId); + const subscriptionRequestWithSubscriptionProperties = + subscriptionRequest.withSubscriptionProperties( + mockSubscriptionProperties + ); expect(subscriptionRequestWithMode.getMode()).to.be.equal(mockMode); expect(subscriptionRequestWithSub.getSubscriptionId()).to.be.equal( @@ -71,7 +72,7 @@ describe("SubscribeRequest", function() { ).to.be.equal(mockSubscriptionProperties); }); - it("Should get parameters with chain", function() { + it("Should get parameters with chain", function () { const mockMode = "parallel"; const mockSubId = "1111111111"; const mockConsumerId = "123e4567-e89b-12d3-a456-556642440000"; diff --git a/@here/olp-sdk-dataservice-read/test/unit/SummaryRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/SummaryRequest.test.ts index 933011a5..39616b72 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/SummaryRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/SummaryRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,41 +17,40 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { SummaryRequest } from "../../lib"; import { HRN } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("SummaryRequest", function() { +describe("SummaryRequest", function () { const billingTag = "billingTag"; const mockedHRN = HRN.fromString("hrn:here:data:::mocked-hrn"); const mockedLayerId = "mocked-layed-id"; - it("Should initialize", function() { + it("Should initialize", function () { const summaryRequest = new SummaryRequest(); assert.isDefined(summaryRequest); expect(summaryRequest).be.instanceOf(SummaryRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const summaryRequest = new SummaryRequest(); - const summaryRequestWithCatalogHrn = summaryRequest.withCatalogHrn( - mockedHRN - ); - const summaryRequestWithLAyerId = summaryRequest.withLayerId( - mockedLayerId - ); - const summaryRequestWithBillTag = summaryRequest.withBillingTag( - billingTag - ); + const summaryRequestWithCatalogHrn = + summaryRequest.withCatalogHrn(mockedHRN); + const summaryRequestWithLAyerId = + summaryRequest.withLayerId(mockedLayerId); + const summaryRequestWithBillTag = + summaryRequest.withBillingTag(billingTag); expect(summaryRequestWithCatalogHrn.getCatalogHrn()).to.be.equal( mockedHRN.toString() @@ -64,7 +63,7 @@ describe("SummaryRequest", function() { ); }); - it("Should get parameters with chain", function() { + it("Should get parameters with chain", function () { const summaryRequest = new SummaryRequest() .withCatalogHrn(mockedHRN) .withLayerId(mockedLayerId) diff --git a/@here/olp-sdk-dataservice-read/test/unit/TileRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/TileRequest.test.ts index 30750813..c85e7695 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/TileRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/TileRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,19 +17,21 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import * as dataServiceRead from "../../lib"; import { FetchOptions } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("TileRequest", function() { +describe("TileRequest", function () { const mockedQuadKey = { row: 1, column: 2, @@ -40,12 +42,12 @@ describe("TileRequest", function() { const request = new dataServiceRead.TileRequest(); - it("Should initialize", function() { + it("Should initialize", function () { assert.isDefined(request); expect(request).be.instanceOf(dataServiceRead.TileRequest); }); - it("Should get parameters with chain", async function() { + it("Should get parameters with chain", async function () { request .withTileKey(mockedQuadKey) .withBillingTag(mockedBillingTag) diff --git a/@here/olp-sdk-dataservice-read/test/unit/UnsubscribeRequest.test.ts b/@here/olp-sdk-dataservice-read/test/unit/UnsubscribeRequest.test.ts index 81bdf486..bce1cbd5 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/UnsubscribeRequest.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/UnsubscribeRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,25 +17,28 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { UnsubscribeRequest } from "../../lib"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("SubscribeRequest", function() { - it("Should initialize", function() { +describe("SubscribeRequest", function () { + it("Should initialize", function () { const request = new UnsubscribeRequest(); assert.isDefined(request); expect(request).be.instanceOf(UnsubscribeRequest); }); - it("Should set parameters", function() { + it("Should set parameters", function () { const mockMode = "parallel"; const mockSubId = "1111111111"; const request = new UnsubscribeRequest(); @@ -46,7 +49,7 @@ describe("SubscribeRequest", function() { expect(requestWithSub.getSubscriptionId()).to.be.equal(mockSubId); }); - it("Should get parameters with chain", function() { + it("Should get parameters with chain", function () { const mockMode = "parallel"; const mockSubId = "1111111111"; diff --git a/@here/olp-sdk-dataservice-read/test/unit/VersionedLayerClient.test.ts b/@here/olp-sdk-dataservice-read/test/unit/VersionedLayerClient.test.ts index a1c71340..8f6dcea5 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/VersionedLayerClient.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/VersionedLayerClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,28 +17,30 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import * as dataServiceRead from "@here/olp-sdk-dataservice-read"; +import * as QueryClientModule from "../../lib/client/QueryClient"; import { BlobApi, MetadataApi, QueryApi } from "@here/olp-sdk-dataservice-api"; import { Index } from "@here/olp-sdk-dataservice-api/lib/query-api"; import * as core from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("VersionedLayerClient", function() { - let sandbox: sinon.SinonSandbox; - let getBlobStub: sinon.SinonStub; - let getPartitionsStub: sinon.SinonStub; - let getPartitionsByIdStub: sinon.SinonStub; - let getQuadTreeIndexStub: sinon.SinonStub; - let getVersionStub: sinon.SinonStub; - let getBaseUrlRequestStub: sinon.SinonStub; +describe("VersionedLayerClient", function () { + let getBlobStub: any; + let getPartitionsStub: any; + let getPartitionsByIdStub: any; + let getQuadTreeIndexStub: any; + let getVersionStub: any; + let getBaseUrlRequestStub: any; let versionedLayerClient: dataServiceRead.VersionedLayerClient; const mockedHRN = core.HRN.fromString("hrn:here:data:::mocked-hrn"); const mockedLayerId = "mocked-layed-id"; @@ -63,8 +65,7 @@ describe("VersionedLayerClient", function() { ] }; - before(function() { - sandbox = sinon.createSandbox(); + beforeAll(function () { let settings = new core.OlpClientSettings({ environment: "here", getToken: () => Promise.resolve("token") @@ -88,36 +89,50 @@ describe("VersionedLayerClient", function() { }; }); - beforeEach(function() { - getBlobStub = sandbox.stub(BlobApi, "getBlob"); - getPartitionsStub = sandbox.stub(MetadataApi, "getPartitions"); - getPartitionsByIdStub = sandbox.stub(QueryApi, "getPartitionsById"); - getQuadTreeIndexStub = sandbox.stub(QueryApi, "quadTreeIndex"); - getVersionStub = sandbox.stub(MetadataApi, "latestVersion"); - getBaseUrlRequestStub = sandbox.stub(core.RequestFactory, "getBaseUrl"); + beforeEach(function () { + getBlobStub = vi + .spyOn(BlobApi, "getBlob") + .mockReturnValue(undefined as any); + getPartitionsStub = vi + .spyOn(MetadataApi, "getPartitions") + .mockReturnValue(undefined as any); + getPartitionsByIdStub = vi + .spyOn(QueryApi, "getPartitionsById") + .mockReturnValue(undefined as any); + getQuadTreeIndexStub = vi + .spyOn(QueryApi, "quadTreeIndex") + .mockReturnValue(undefined as any); + getVersionStub = vi + .spyOn(MetadataApi, "latestVersion") + .mockReturnValue(undefined as any); + getBaseUrlRequestStub = vi + .spyOn(core.RequestFactory, "getBaseUrl") + .mockReturnValue(undefined as any); - getBaseUrlRequestStub.callsFake(() => Promise.resolve(fakeURL)); + getBaseUrlRequestStub.mockImplementation(() => + Promise.resolve(fakeURL) + ); }); - afterEach(function() { - sandbox.restore(); + afterEach(function () { + vi.restoreAllMocks(); }); - it("Shoud be initialized", async function() { + it("Shoud be initialized", async function () { assert.isDefined(versionedLayerClient); }); - it("VersionedLayerClient instance should be initialized with VersionedLayerClientParams", async function() { + it("VersionedLayerClient instance should be initialized with VersionedLayerClientParams", async function () { assert.isDefined(versionedLayerClient); assert.equal(versionedLayerClient["version"], 5); assert.equal(versionedLayerClient["hrn"], "hrn:here:data:::mocked-hrn"); }); - it("Should method getData provide data with dataHandle parameter", async function() { + it("Should method getData provide data with dataHandle parameter", async function () { const mockedVersion = { version: 42 }; - getVersionStub.callsFake( + getVersionStub.mockImplementation( ( builder: any, params: any @@ -127,7 +142,7 @@ describe("VersionedLayerClient", function() { ); const mockedBlobData: Response = new Response("mocked-blob-response"); - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedBlobData); } @@ -138,13 +153,13 @@ describe("VersionedLayerClient", function() { ); const response = await versionedLayerClient.getData( - (dataRequest as unknown) as dataServiceRead.DataRequest + dataRequest as unknown as dataServiceRead.DataRequest ); assert.isDefined(response); assert.isTrue(response.ok); }); - it("Should method getData provide data with partitionId parameter", async function() { + it("Should method getData provide data with partitionId parameter", async function () { const mockedBlobData = new Response("mocked-blob-response"); const mockedVersion = { version: 42 @@ -159,17 +174,17 @@ describe("VersionedLayerClient", function() { ] }; - getPartitionsByIdStub.callsFake( + getPartitionsByIdStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitionsIdData); } ); - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedBlobData); } ); - getVersionStub.callsFake( + getVersionStub.mockImplementation( ( builder: any, params: any @@ -183,13 +198,13 @@ describe("VersionedLayerClient", function() { ); const response = await versionedLayerClient.getData( - (dataRequest as unknown) as dataServiceRead.DataRequest + dataRequest as unknown as dataServiceRead.DataRequest ); assert.isDefined(response); assert.isTrue(response.ok); }); - it("Should method getData provide data with partitionId parameter and version", async function() { + it("Should method getData provide data with partitionId parameter and version", async function () { const mockedBlobData = new Response("mocked-blob-response"); const mockedPartitionsIdData = { partitions: [ @@ -201,12 +216,12 @@ describe("VersionedLayerClient", function() { ] }; - getPartitionsByIdStub.callsFake( + getPartitionsByIdStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitionsIdData); } ); - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedBlobData); } @@ -217,26 +232,26 @@ describe("VersionedLayerClient", function() { ); const response = await versionedLayerClient.getData( - (dataRequest as unknown) as dataServiceRead.DataRequest + dataRequest as unknown as dataServiceRead.DataRequest ); assert.isDefined(response); assert.isTrue(response.ok); }); - it("Should method getData return Error without dataRequest parameters", async function() { + it("Should method getData return Error without dataRequest parameters", async function () { const mockedErrorResponse = "No data provided. Add dataHandle, partitionId or quadKey to the DataRequest object"; const dataRequest = new dataServiceRead.DataRequest(); const response = await versionedLayerClient - .getData((dataRequest as unknown) as dataServiceRead.DataRequest) - .catch(error => { + .getData(dataRequest as unknown as dataServiceRead.DataRequest) + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.message); }); }); - it("Should method getData return Error with correct partitionId and wrong version parameter", async function() { + it("Should method getData return Error with correct partitionId and wrong version parameter", async function () { const dataRequest = new dataServiceRead.DataRequest().withPartitionId( "42" ); @@ -252,19 +267,21 @@ describe("VersionedLayerClient", function() { ] }; - getPartitionsByIdStub.callsFake((builder: any, params: any): any => { - return Promise.reject(mockedPartitionsIdData); - }); + getPartitionsByIdStub.mockImplementation( + (builder: any, params: any): any => { + return Promise.reject(mockedPartitionsIdData); + } + ); const response = await versionedLayerClient - .getData((dataRequest as unknown) as dataServiceRead.DataRequest) - .catch(error => { + .getData(dataRequest as unknown as dataServiceRead.DataRequest) + .catch((error) => { assert.isDefined(error); assert.equal(error, mockedPartitionsIdData); }); }); - it("Should method getData with wrong partitionId parameter and version return error", async function() { + it("Should method getData with wrong partitionId parameter and version return error", async function () { const mockedBlobData = new Response("mocked-blob-response"); const mockedErrorResponse = "No partition dataHandle for partition 42. HRN: hrn:here:data:::mocked-hrn"; @@ -278,12 +295,12 @@ describe("VersionedLayerClient", function() { ] }; - getPartitionsByIdStub.callsFake( + getPartitionsByIdStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitionsIdData); } ); - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedBlobData); } @@ -294,14 +311,14 @@ describe("VersionedLayerClient", function() { ); const response = await versionedLayerClient - .getData((dataRequest as unknown) as dataServiceRead.DataRequest) - .catch(error => { + .getData(dataRequest as unknown as dataServiceRead.DataRequest) + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.message); }); }); - it("Should be aborted fetching by abort signal", async function() { + it("Should be aborted fetching by abort signal", async function () { const mockedBlobData = new Response("mocked-blob-response"); const mockedPartitionsIdData = { partitions: [ @@ -313,12 +330,12 @@ describe("VersionedLayerClient", function() { ] }; - getPartitionsByIdStub.callsFake( + getPartitionsByIdStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitionsIdData); } ); - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return builder.abortSignal.aborted ? Promise.reject("AbortError") @@ -331,22 +348,21 @@ describe("VersionedLayerClient", function() { ); const abortController = new AbortController(); + abortController.abort(); - versionedLayerClient - .getData( - (dataRequest as unknown) as dataServiceRead.DataRequest, + try { + await versionedLayerClient.getData( + dataRequest as unknown as dataServiceRead.DataRequest, abortController.signal - ) - .then() - .catch((err: any) => { - assert.strictEqual(err, "AbortError"); - assert.isTrue(abortController.signal.aborted); - }); - - abortController.abort(); + ); + assert.fail("getData should have been aborted"); + } catch (err) { + assert.strictEqual(err, "AbortError"); + assert.isTrue(abortController.signal.aborted); + } }); - it("Should method getPartitions provide data with PartitionsRequest", async function() { + it("Should method getPartitions provide data with PartitionsRequest", async function () { const mockedVersion = { version: 42 }; @@ -364,13 +380,13 @@ describe("VersionedLayerClient", function() { } ] }; - getPartitionsStub.callsFake( + getPartitionsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitions); } ); - getVersionStub.callsFake( + getVersionStub.mockImplementation( ( builder: any, params: any @@ -380,15 +396,14 @@ describe("VersionedLayerClient", function() { ); const partitionsRequest = new dataServiceRead.PartitionsRequest(); - const partitions = await versionedLayerClient.getPartitions( - partitionsRequest - ); + const partitions = + await versionedLayerClient.getPartitions(partitionsRequest); assert.isDefined(partitions); expect(partitions).to.be.equal(mockedPartitions); }); - it("Should method getPartitions provide data with PartitionIds list", async function() { + it("Should method getPartitions provide data with PartitionIds list", async function () { const mockedIds = ["1", "2", "13", "42"]; const mockedVersion = { version: 42 @@ -407,13 +422,13 @@ describe("VersionedLayerClient", function() { } ] }; - getPartitionsByIdStub.callsFake( + getPartitionsByIdStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitions); } ); - getVersionStub.callsFake( + getVersionStub.mockImplementation( ( builder: any, params: any @@ -422,29 +437,27 @@ describe("VersionedLayerClient", function() { } ); - const partitionsRequest = new dataServiceRead.PartitionsRequest().withPartitionIds( - mockedIds - ); - const partitions = await versionedLayerClient.getPartitions( - partitionsRequest - ); + const partitionsRequest = + new dataServiceRead.PartitionsRequest().withPartitionIds(mockedIds); + const partitions = + await versionedLayerClient.getPartitions(partitionsRequest); assert.isDefined(partitions); expect(partitions).to.be.equal(mockedPartitions); }); - it("Should layerClient sends a PartitionsRequest for getPartitions with additionalFields params", async function() { + it("Should layerClient sends a PartitionsRequest for getPartitions with additionalFields params", async function () { const mockedVersion = { version: 42 }; - getPartitionsStub.callsFake( + getPartitionsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitionsAddFields); } ); - getVersionStub.callsFake( + getVersionStub.mockImplementation( ( builder: any, params: any @@ -453,12 +466,13 @@ describe("VersionedLayerClient", function() { } ); - const partitionsRequest = new dataServiceRead.PartitionsRequest().withAdditionalFields( - ["dataSize", "checksum"] - ); - const partitionsResponse = await versionedLayerClient.getPartitions( - partitionsRequest - ); + const partitionsRequest = + new dataServiceRead.PartitionsRequest().withAdditionalFields([ + "dataSize", + "checksum" + ]); + const partitionsResponse = + await versionedLayerClient.getPartitions(partitionsRequest); assert.isDefined(partitionsResponse); expect(partitionsResponse).to.be.equal(mockedPartitionsAddFields); @@ -469,22 +483,23 @@ describe("VersionedLayerClient", function() { mockedPartitionsAddFields.partitions[1] ); - assert.isDefined(getPartitionsStub.getCalls()[0].args); + assert.isDefined(getPartitionsStub.mock.calls[0]); expect( - getPartitionsStub.getCalls()[0].args[1].additionalFields[0] + getPartitionsStub.mock.calls[0][1].additionalFields[0] ).to.be.equal("dataSize"); expect( - getPartitionsStub.getCalls()[0].args[1].additionalFields[1] + getPartitionsStub.mock.calls[0][1].additionalFields[1] ).to.be.equal("checksum"); }); - it("Should layerClient sends a PartitionsRequest for getPartitions with additionalFields params and get cached data", async function() { - const partitionsRequest = new dataServiceRead.PartitionsRequest().withAdditionalFields( - ["dataSize", "checksum"] - ); - const partitionsResponse = await versionedLayerClient.getPartitions( - partitionsRequest - ); + it("Should layerClient sends a PartitionsRequest for getPartitions with additionalFields params and get cached data", async function () { + const partitionsRequest = + new dataServiceRead.PartitionsRequest().withAdditionalFields([ + "dataSize", + "checksum" + ]); + const partitionsResponse = + await versionedLayerClient.getPartitions(partitionsRequest); assert.isDefined(partitionsResponse); expect(partitionsResponse.partitions[0].dataHandle).to.be.equal( @@ -495,18 +510,18 @@ describe("VersionedLayerClient", function() { ); }); - it("Should layerClient sends a PartitionsRequest for getPartitions with extra additionalFields params, check cached data and get new metadata", async function() { + it("Should layerClient sends a PartitionsRequest for getPartitions with extra additionalFields params, check cached data and get new metadata", async function () { const mockedVersion = { version: 42 }; - getPartitionsStub.callsFake( + getPartitionsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitionsAddFields); } ); - getVersionStub.callsFake( + getVersionStub.mockImplementation( ( builder: any, params: any @@ -515,12 +530,14 @@ describe("VersionedLayerClient", function() { } ); - const partitionsRequest = new dataServiceRead.PartitionsRequest().withAdditionalFields( - ["dataSize", "checksum", "compressedDataSize"] - ); - const partitionsResponse = await versionedLayerClient.getPartitions( - partitionsRequest - ); + const partitionsRequest = + new dataServiceRead.PartitionsRequest().withAdditionalFields([ + "dataSize", + "checksum", + "compressedDataSize" + ]); + const partitionsResponse = + await versionedLayerClient.getPartitions(partitionsRequest); assert.isDefined(partitionsResponse); expect(partitionsResponse.partitions[0].dataHandle).to.be.equal( @@ -531,7 +548,7 @@ describe("VersionedLayerClient", function() { ); }); - it("Should method getPartitions return error without QuadKeyPartitionsRequest", async function() { + it("Should method getPartitions return error without QuadKeyPartitionsRequest", async function () { const mockedErrorResponse = { message: "Please provide correct QuadKey" }; @@ -539,13 +556,13 @@ describe("VersionedLayerClient", function() { const quadKeyRequest = new dataServiceRead.QuadKeyPartitionsRequest(); const partitions = await versionedLayerClient .getPartitions(quadKeyRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse.message, error.message); }); }); - it("Should layerClient sends a QuadKeyPartitionsRequest for getPartitions with additionalFields params", async function() { + it("Should layerClient sends a QuadKeyPartitionsRequest for getPartitions with additionalFields params", async function () { const mockedBlobData = new Response("mocked-blob-response"); const mockedVersion = { version: 42 @@ -567,17 +584,17 @@ describe("VersionedLayerClient", function() { ] }; - getQuadTreeIndexStub.callsFake( + getQuadTreeIndexStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedQuadKeyTreeData); } ); - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedBlobData); } ); - getVersionStub.callsFake( + getVersionStub.mockImplementation( ( builder: any, params: any @@ -586,13 +603,14 @@ describe("VersionedLayerClient", function() { } ); - const quadKeyPartitionsRequest = new dataServiceRead.QuadKeyPartitionsRequest() - .withQuadKey(core.TileKey.fromMortonCode(23618403)) - .withAdditionalFields([ - "dataSize", - "checksum", - "compressedDataSize" - ]); + const quadKeyPartitionsRequest = + new dataServiceRead.QuadKeyPartitionsRequest() + .withQuadKey(core.TileKey.fromMortonCode(23618403)) + .withAdditionalFields([ + "dataSize", + "checksum", + "compressedDataSize" + ]); const partitionsResponse = await versionedLayerClient.getPartitions( quadKeyPartitionsRequest @@ -601,33 +619,33 @@ describe("VersionedLayerClient", function() { // check if layer client sends a request for getPartitions with correct params expect( - getQuadTreeIndexStub.getCalls()[0].args[1].additionalFields[0] + getQuadTreeIndexStub.mock.calls[0][1].additionalFields[0] ).to.be.equal("dataSize"); expect( - getQuadTreeIndexStub.getCalls()[0].args[1].additionalFields[1] + getQuadTreeIndexStub.mock.calls[0][1].additionalFields[1] ).to.be.equal("checksum"); expect( - getQuadTreeIndexStub.getCalls()[0].args[1].additionalFields[2] + getQuadTreeIndexStub.mock.calls[0][1].additionalFields[2] ).to.be.equal("compressedDataSize"); }); - it("Should baseUrl error be handled", async function() { + it("Should baseUrl error be handled", async function () { const mockedErrorResponse = "Bad response"; - const dataHandleRequest = new dataServiceRead.DataRequest().withDataHandle( - "moсked-data-handle" - ); - const dataPartitionRequest = new dataServiceRead.DataRequest().withPartitionId( - "mocked-id" - ); + const dataHandleRequest = + new dataServiceRead.DataRequest().withDataHandle( + "moсked-data-handle" + ); + const dataPartitionRequest = + new dataServiceRead.DataRequest().withPartitionId("mocked-id"); const partitionsRequest = new dataServiceRead.PartitionsRequest(); - getPartitionsByIdStub.callsFake( + getPartitionsByIdStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.reject("base url not found"); } ); - getBaseUrlRequestStub.callsFake(() => + getBaseUrlRequestStub.mockImplementation(() => Promise.reject({ status: 400, statusText: "Bad response" @@ -636,46 +654,45 @@ describe("VersionedLayerClient", function() { const dataH = await versionedLayerClient .getData(dataHandleRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.statusText); }); const dataP = await versionedLayerClient .getData(dataPartitionRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); }); const partitions = await versionedLayerClient .getPartitions(partitionsRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.statusText); }); }); - it("Should latestVersion error be handled", async function() { + it("Should latestVersion error be handled", async function () { const mockedErrorResponse = "Bad response"; - const dataPartitionRequest = new dataServiceRead.DataRequest().withPartitionId( - "mocked-id" - ); + const dataPartitionRequest = + new dataServiceRead.DataRequest().withPartitionId("mocked-id"); const partitionsRequest = new dataServiceRead.PartitionsRequest(); - getVersionStub.callsFake(() => + getVersionStub.mockImplementation(() => Promise.reject({ status: 400, statusText: "Bad response" }) ); - getPartitionsByIdStub.callsFake( + getPartitionsByIdStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.reject("base url not found"); } ); - getBaseUrlRequestStub.callsFake(() => + getBaseUrlRequestStub.mockImplementation(() => Promise.reject({ status: 400, statusText: "Bad response" @@ -684,27 +701,27 @@ describe("VersionedLayerClient", function() { const dataP = await versionedLayerClient .getData(dataPartitionRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); }); const partitions = await versionedLayerClient .getPartitions(partitionsRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.statusText); }); const partitions1 = await versionedLayerClient .getPartitions(partitionsRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.statusText); }); }); - it("Should getPartitions error be handled if error getting latest layer version", async function() { - getVersionStub.callsFake(() => + it("Should getPartitions error be handled if error getting latest layer version", async function () { + getVersionStub.mockImplementation(() => Promise.reject({ status: 400, statusText: "Bad response" @@ -733,8 +750,8 @@ describe("VersionedLayerClient", function() { } }); - it("Should getData error be handled if error getting latest layer version", async function() { - getVersionStub.callsFake(() => + it("Should getData error be handled if error getting latest layer version", async function () { + getVersionStub.mockImplementation(() => Promise.reject({ status: 400, statusText: "Bad response" @@ -766,10 +783,12 @@ describe("VersionedLayerClient", function() { } }); - it("Should getPartitions fetch menadata with latest layer version if not defined", async function() { - getVersionStub.callsFake(() => Promise.resolve({ version: 5 })); + it("Should getPartitions fetch menadata with latest layer version if not defined", async function () { + getVersionStub.mockImplementation(() => + Promise.resolve({ version: 5 }) + ); - getPartitionsStub.callsFake((builder, params) => { + getPartitionsStub.mockImplementation((builder, params) => { assert.equal(params.version, 5); return Promise.resolve(); }); @@ -789,8 +808,8 @@ describe("VersionedLayerClient", function() { } as any); }); - it("Should getPartitions fetch menadata with set layer version in constructor", async function() { - getPartitionsStub.callsFake((builder, params) => { + it("Should getPartitions fetch menadata with set layer version in constructor", async function () { + getPartitionsStub.mockImplementation((builder, params) => { assert.equal(params.version, 6); return Promise.resolve(); }); @@ -811,8 +830,10 @@ describe("VersionedLayerClient", function() { } as any); }); - it("Method QueryApi.getPartitionsById should be called with param additionalFields and run getPartitions method with additionalFields", async function() { - const QueryClientStub = sandbox.stub(dataServiceRead, "QueryClient"); + it("Method QueryApi.getPartitionsById should be called with param additionalFields and run getPartitions method with additionalFields", async function () { + const QueryClientStub = vi + .spyOn(QueryClientModule, "QueryClient") + .mockReturnValue(undefined as any); const mockedPartitions = { partitions: [ @@ -842,7 +863,7 @@ describe("VersionedLayerClient", function() { } } - QueryClientStub.callsFake((settings: core.OlpClientSettings) => { + QueryClientStub.mockImplementation(function () { return new MockedQueryClient(); }); @@ -850,15 +871,13 @@ describe("VersionedLayerClient", function() { .withPartitionIds(["23605706"]) .withAdditionalFields(["dataSize"]); - const partitions = await versionedLayerClient.getPartitions( - partitionsRequest - ); + const partitions = + await versionedLayerClient.getPartitions(partitionsRequest); expect(partitions).equals(mockedPartitions); }); }); -describe("VersionedLayerClient with locked version 0 in constructor", function() { - let sandbox: sinon.SinonSandbox; +describe("VersionedLayerClient with locked version 0 in constructor", function () { let client: dataServiceRead.VersionedLayerClient; const mockedCatalogHRH = core.HRN.fromString( @@ -869,11 +888,9 @@ describe("VersionedLayerClient with locked version 0 in constructor", function() getToken: () => Promise.resolve("mocked-token") }); - before(function() { - sandbox = sinon.createSandbox(); - }); + beforeAll(function () {}); - beforeEach(function() { + beforeEach(function () { client = new dataServiceRead.VersionedLayerClient({ settings: mockedSettings, catalogHrn: mockedCatalogHRH, @@ -882,16 +899,16 @@ describe("VersionedLayerClient with locked version 0 in constructor", function() }); }); - afterEach(function() { - sandbox.restore(); + afterEach(function () { + vi.restoreAllMocks(); }); - it("Versioned layer should be initialized with 0 version", function() { + it("Versioned layer should be initialized with 0 version", function () { expect(client !== undefined).to.be.true; expect(client["version"]).to.be.equal(0); }); - it("Versioned layer should be initialized with undefined version if user set some version less then 0 ", function() { + it("Versioned layer should be initialized with undefined version if user set some version less then 0 ", function () { const client = new dataServiceRead.VersionedLayerClient({ settings: mockedSettings, catalogHrn: mockedCatalogHRH, @@ -902,8 +919,10 @@ describe("VersionedLayerClient with locked version 0 in constructor", function() expect(client["version"]).to.be.equal(undefined); }); - it("Method getPartitions should call queryClient.fetchQuadTreeIndex with QuadTreeIndexRequest.getVersion() is 0", async function() { - const QueryClientStub = sandbox.stub(dataServiceRead, "QueryClient"); + it("Method getPartitions should call queryClient.fetchQuadTreeIndex with QuadTreeIndexRequest.getVersion() is 0", async function () { + const QueryClientStub = vi + .spyOn(QueryClientModule, "QueryClient") + .mockReturnValue(undefined as any); class MockedQueryClient { fetchQuadTreeIndex( @@ -914,7 +933,7 @@ describe("VersionedLayerClient with locked version 0 in constructor", function() } } - QueryClientStub.callsFake((settings: core.OlpClientSettings) => { + QueryClientStub.mockImplementation(function () { return new MockedQueryClient(); }); @@ -925,9 +944,11 @@ describe("VersionedLayerClient with locked version 0 in constructor", function() ); }); - it("Method getData should not change the version of the layer", async function() { + it("Method getData should not change the version of the layer", async function () { // @ts-ignore - class VersionedLayerClientTest extends dataServiceRead.VersionedLayerClient { + class VersionedLayerClientTest + extends dataServiceRead.VersionedLayerClient + { constructor(params: dataServiceRead.VersionedLayerClientParams) { super(params); } @@ -956,9 +977,11 @@ describe("VersionedLayerClient with locked version 0 in constructor", function() expect(client["version"]).to.be.equal(0); }); - it("Method getPartitions should call MetadataApi.getPartitions with param version equal 0", async function() { + it("Method getPartitions should call MetadataApi.getPartitions with param version equal 0", async function () { // @ts-ignore - class VersionedLayerClientTest extends dataServiceRead.VersionedLayerClient { + class VersionedLayerClientTest + extends dataServiceRead.VersionedLayerClient + { constructor(params: dataServiceRead.VersionedLayerClientParams) { super(params); } @@ -982,9 +1005,11 @@ describe("VersionedLayerClient with locked version 0 in constructor", function() version: 0 }); - const getPartitionsStub = sandbox.stub(MetadataApi, "getPartitions"); + const getPartitionsStub = vi + .spyOn(MetadataApi, "getPartitions") + .mockReturnValue(undefined as any); - getPartitionsStub.callsFake((builder, params: any) => { + getPartitionsStub.mockImplementation((builder, params: any) => { expect(params.version).eqls(0); return Promise.resolve({ partitions: [] }) as any; }); diff --git a/@here/olp-sdk-dataservice-read/test/unit/VolatileLayerClient.test.ts b/@here/olp-sdk-dataservice-read/test/unit/VolatileLayerClient.test.ts index 639c3261..ae99f202 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/VolatileLayerClient.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/VolatileLayerClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,11 +17,20 @@ * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { createStubInstance } from "./stub-instance"; import * as dataServiceRead from "@here/olp-sdk-dataservice-read"; +import * as QueryClientModule from "../../lib/client/QueryClient"; import { MetadataApi, QueryApi, @@ -29,19 +38,13 @@ import { } from "@here/olp-sdk-dataservice-api"; import * as core from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("VolatileLayerClient", function() { - let sandbox: sinon.SinonSandbox; - let getPartitionsStub: sinon.SinonStub; - let getBlobStub: sinon.SinonStub; - let getVersionStub: sinon.SinonStub; - let getPartitionsByIdStub: sinon.SinonStub; - let getQuadTreeIndexStub: sinon.SinonStub; - let getBaseUrlRequestStub: sinon.SinonStub; +describe("VolatileLayerClient", function () { + let getPartitionsStub: any; + let getBlobStub: any; + let getVersionStub: any; + let getPartitionsByIdStub: any; + let getQuadTreeIndexStub: any; + let getBaseUrlRequestStub: any; let volatileLayerClient: dataServiceRead.VolatileLayerClient; const mockedHRN = core.HRN.fromString("hrn:here:data:::mocked-hrn"); const mockedLayerId = "mocked-layed-id"; @@ -67,8 +70,7 @@ describe("VolatileLayerClient", function() { ] }; - before(function() { - sandbox = sinon.createSandbox(); + beforeAll(function () { let settings = new core.OlpClientSettings({ environment: "here", getToken: () => Promise.resolve("token") @@ -84,25 +86,39 @@ describe("VolatileLayerClient", function() { ); }); - beforeEach(function() { - getBlobStub = sandbox.stub(VolatileBlobApi, "getVolatileBlob"); - getPartitionsStub = sandbox.stub(MetadataApi, "getPartitions"); - getVersionStub = sandbox.stub(MetadataApi, "latestVersion"); - getPartitionsByIdStub = sandbox.stub(QueryApi, "getPartitionsById"); - getQuadTreeIndexStub = sandbox.stub(QueryApi, "quadTreeIndexVolatile"); - getBaseUrlRequestStub = sandbox.stub(core.RequestFactory, "getBaseUrl"); - getBaseUrlRequestStub.callsFake(() => Promise.resolve(fakeURL)); + beforeEach(function () { + getBlobStub = vi + .spyOn(VolatileBlobApi, "getVolatileBlob") + .mockReturnValue(undefined as any); + getPartitionsStub = vi + .spyOn(MetadataApi, "getPartitions") + .mockReturnValue(undefined as any); + getVersionStub = vi + .spyOn(MetadataApi, "latestVersion") + .mockReturnValue(undefined as any); + getPartitionsByIdStub = vi + .spyOn(QueryApi, "getPartitionsById") + .mockReturnValue(undefined as any); + getQuadTreeIndexStub = vi + .spyOn(QueryApi, "quadTreeIndexVolatile") + .mockReturnValue(undefined as any); + getBaseUrlRequestStub = vi + .spyOn(core.RequestFactory, "getBaseUrl") + .mockReturnValue(undefined as any); + getBaseUrlRequestStub.mockImplementation(() => + Promise.resolve(fakeURL) + ); }); - afterEach(function() { - sandbox.restore(); + afterEach(function () { + vi.restoreAllMocks(); }); - it("Shoud be initialized", async function() { + it("Shoud be initialized", async function () { assert.isDefined(volatileLayerClient); }); - it("Should method getPartitions provide data with PartitionsRequest", async function() { + it("Should method getPartitions provide data with PartitionsRequest", async function () { const mockedPartitions = { partitions: [ { @@ -117,22 +133,21 @@ describe("VolatileLayerClient", function() { } ] }; - getPartitionsStub.callsFake( + getPartitionsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitions); } ); const partitionsRequest = new dataServiceRead.PartitionsRequest(); - const partitions = await volatileLayerClient.getPartitions( - partitionsRequest - ); + const partitions = + await volatileLayerClient.getPartitions(partitionsRequest); assert.isDefined(partitions); expect(partitions).to.be.equal(mockedPartitions); }); - it("Should method getPartitions provide data with PartitionIds list", async function() { + it("Should method getPartitions provide data with PartitionIds list", async function () { const mockedIds = ["1", "2", "13", "42"]; const mockedPartitions = { partitions: [ @@ -148,54 +163,54 @@ describe("VolatileLayerClient", function() { } ] }; - getPartitionsByIdStub.callsFake( + getPartitionsByIdStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitions); } ); - const partitionsRequest = new dataServiceRead.PartitionsRequest().withPartitionIds( - mockedIds - ); - const partitions = await volatileLayerClient.getPartitions( - partitionsRequest - ); + const partitionsRequest = + new dataServiceRead.PartitionsRequest().withPartitionIds(mockedIds); + const partitions = + await volatileLayerClient.getPartitions(partitionsRequest); assert.isDefined(partitions); expect(partitions).to.be.equal(mockedPartitions); }); - it("Should layerClient sends a PartitionsRequest for getPartitions with additionalFields params", async function() { - getPartitionsStub.callsFake( + it("Should layerClient sends a PartitionsRequest for getPartitions with additionalFields params", async function () { + getPartitionsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitionsAddFields); } ); - const partitionsRequest = new dataServiceRead.PartitionsRequest().withAdditionalFields( - ["dataSize", "checksum"] - ); - const partitionsResponse = await volatileLayerClient.getPartitions( - partitionsRequest - ); + const partitionsRequest = + new dataServiceRead.PartitionsRequest().withAdditionalFields([ + "dataSize", + "checksum" + ]); + const partitionsResponse = + await volatileLayerClient.getPartitions(partitionsRequest); assert.isDefined(partitionsResponse); // check if layer client sends a request for getPartitions with correct params expect( - getPartitionsStub.getCalls()[0].args[1].additionalFields[0] + getPartitionsStub.mock.calls[0][1].additionalFields[0] ).to.be.equal("dataSize"); expect( - getPartitionsStub.getCalls()[0].args[1].additionalFields[1] + getPartitionsStub.mock.calls[0][1].additionalFields[1] ).to.be.equal("checksum"); }); - it("Should layerClient sends a PartitionsRequest for getPartitions with additionalFields params and get cached data", async function() { - const partitionsRequest = new dataServiceRead.PartitionsRequest().withAdditionalFields( - ["dataSize", "checksum"] - ); - const partitionsResponse = await volatileLayerClient.getPartitions( - partitionsRequest - ); + it("Should layerClient sends a PartitionsRequest for getPartitions with additionalFields params and get cached data", async function () { + const partitionsRequest = + new dataServiceRead.PartitionsRequest().withAdditionalFields([ + "dataSize", + "checksum" + ]); + const partitionsResponse = + await volatileLayerClient.getPartitions(partitionsRequest); assert.isDefined(partitionsResponse); expect(partitionsResponse.partitions[0].dataHandle).to.be.equal( @@ -206,19 +221,21 @@ describe("VolatileLayerClient", function() { ); }); - it("Should layerClient sends a PartitionsRequest for getPartitions with extra additionalFields params, check cached data and get new metadata", async function() { - getPartitionsStub.callsFake( + it("Should layerClient sends a PartitionsRequest for getPartitions with extra additionalFields params, check cached data and get new metadata", async function () { + getPartitionsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitionsAddFields); } ); - const partitionsRequest = new dataServiceRead.PartitionsRequest().withAdditionalFields( - ["dataSize", "checksum", "compressedDataSize"] - ); - const partitionsResponse = await volatileLayerClient.getPartitions( - partitionsRequest - ); + const partitionsRequest = + new dataServiceRead.PartitionsRequest().withAdditionalFields([ + "dataSize", + "checksum", + "compressedDataSize" + ]); + const partitionsResponse = + await volatileLayerClient.getPartitions(partitionsRequest); assert.isDefined(partitionsResponse); expect(partitionsResponse.partitions[0].dataHandle).to.be.equal( @@ -229,7 +246,7 @@ describe("VolatileLayerClient", function() { ); }); - it("Should layerClient sends a QuadKeyPartitionsRequest for getPartitions with additionalFields params", async function() { + it("Should layerClient sends a QuadKeyPartitionsRequest for getPartitions with additionalFields params", async function () { const mockedBlobData = new Response("mocked-blob-response"); const mockedVersion = { version: 42 @@ -252,12 +269,12 @@ describe("VolatileLayerClient", function() { ] }; - getQuadTreeIndexStub.callsFake( + getQuadTreeIndexStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedQuadKeyTreeData); } ); - getVersionStub.callsFake( + getVersionStub.mockImplementation( ( builder: any, params: any @@ -279,24 +296,25 @@ describe("VolatileLayerClient", function() { } ] }; - getPartitionsStub.callsFake( + getPartitionsStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitions); } ); - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedBlobData); } ); - const quadKeyPartitionsRequest = new dataServiceRead.QuadKeyPartitionsRequest() - .withQuadKey(core.TileKey.fromMortonCode(23618403)) - .withAdditionalFields([ - "dataSize", - "checksum", - "compressedDataSize" - ]); + const quadKeyPartitionsRequest = + new dataServiceRead.QuadKeyPartitionsRequest() + .withQuadKey(core.TileKey.fromMortonCode(23618403)) + .withAdditionalFields([ + "dataSize", + "checksum", + "compressedDataSize" + ]); const partitionsResponse = await volatileLayerClient.getPartitions( quadKeyPartitionsRequest @@ -305,17 +323,17 @@ describe("VolatileLayerClient", function() { // check if layer client sends a request for getPartitions with correct params expect( - getQuadTreeIndexStub.getCalls()[0].args[1].additionalFields[0] + getQuadTreeIndexStub.mock.calls[0][1].additionalFields[0] ).to.be.equal("dataSize"); expect( - getQuadTreeIndexStub.getCalls()[0].args[1].additionalFields[1] + getQuadTreeIndexStub.mock.calls[0][1].additionalFields[1] ).to.be.equal("checksum"); expect( - getQuadTreeIndexStub.getCalls()[0].args[1].additionalFields[2] + getQuadTreeIndexStub.mock.calls[0][1].additionalFields[2] ).to.be.equal("compressedDataSize"); }); - it("Should method getPartitions return error without QuadKeyPartitionsRequest", async function() { + it("Should method getPartitions return error without QuadKeyPartitionsRequest", async function () { const mockedErrorResponse = { message: "Please provide correct QuadKey" }; @@ -323,15 +341,15 @@ describe("VolatileLayerClient", function() { const quadKeyRequest = new dataServiceRead.QuadKeyPartitionsRequest(); const partitions = await volatileLayerClient .getPartitions(quadKeyRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse.message, error.message); }); }); - it("Should method getData provide data with dataHandle parameter", async function() { + it("Should method getData provide data with dataHandle parameter", async function () { const mockedBlobData: Response = new Response("mocked-blob-response"); - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedBlobData); } @@ -342,13 +360,13 @@ describe("VolatileLayerClient", function() { ); const response = await volatileLayerClient.getData( - (dataRequest as unknown) as dataServiceRead.DataRequest + dataRequest as unknown as dataServiceRead.DataRequest ); assert.isDefined(response); assert.isTrue(response.ok); }); - it("Should method getData provide data with partitionId parameter", async function() { + it("Should method getData provide data with partitionId parameter", async function () { const mockedBlobData = new Response("mocked-blob-response"); const mockedPartitionsIdData = { partitions: [ @@ -360,12 +378,12 @@ describe("VolatileLayerClient", function() { ] }; - getPartitionsByIdStub.callsFake( + getPartitionsByIdStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedPartitionsIdData); } ); - getBlobStub.callsFake( + getBlobStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedBlobData); } @@ -376,13 +394,13 @@ describe("VolatileLayerClient", function() { ); const response = await volatileLayerClient.getData( - (dataRequest as unknown) as dataServiceRead.DataRequest + dataRequest as unknown as dataServiceRead.DataRequest ); assert.isDefined(response); assert.isTrue(response.ok); }); - it("Should method getData return Error without dataRequest parameters", async function() { + it("Should method getData return Error without dataRequest parameters", async function () { const mockedErrorResponse = { message: "No data provided. Add dataHandle, partitionId or quadKey to the DataRequest object" @@ -391,14 +409,14 @@ describe("VolatileLayerClient", function() { const response = await volatileLayerClient .getData(dataRequest as any) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse.message, error.message); }); }); - it("Should method getData return Error with correct partitionId and wrong layerId", async function() { - let settings = sandbox.createStubInstance(core.OlpClientSettings); + it("Should method getData return Error with correct partitionId and wrong layerId", async function () { + let settings = createStubInstance(core.OlpClientSettings); const volatileClient = new dataServiceRead.VolatileLayerClient({ catalogHrn: mockedHRN, layerId: mockedLayerId, @@ -415,41 +433,41 @@ describe("VolatileLayerClient", function() { detail: [ { name: "layer", - error: - "Layer 'mockedLayerId' is missing in the catalog configuration." + error: "Layer 'mockedLayerId' is missing in the catalog configuration." } ] }; - getPartitionsByIdStub.callsFake((builder: any, params: any): any => { - return Promise.reject(mockedPartitionsIdData); - }); + getPartitionsByIdStub.mockImplementation( + (builder: any, params: any): any => { + return Promise.reject(mockedPartitionsIdData); + } + ); const response = await volatileClient - .getData((dataRequest as unknown) as dataServiceRead.DataRequest) - .catch(error => { + .getData(dataRequest as unknown as dataServiceRead.DataRequest) + .catch((error) => { assert.isDefined(error); }); }); - it("Should baseUrl error be handled", async function() { + it("Should baseUrl error be handled", async function () { const mockedErrorResponse = "Bad response"; const dataRequest = new dataServiceRead.DataRequest().withDataHandle( "moсked-data-handle" ); - const dataPartitionRequest = new dataServiceRead.DataRequest().withPartitionId( - "mocked-id" - ); + const dataPartitionRequest = + new dataServiceRead.DataRequest().withPartitionId("mocked-id"); const partitionsRrequest = new dataServiceRead.PartitionsRequest(); - getBaseUrlRequestStub.callsFake(() => + getBaseUrlRequestStub.mockImplementation(() => Promise.reject({ status: 400, statusText: "Bad response" }) ); - getPartitionsByIdStub.callsFake( + getPartitionsByIdStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.reject("base url not found"); } @@ -457,32 +475,34 @@ describe("VolatileLayerClient", function() { const dataH = await volatileLayerClient .getData(dataRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.statusText); }); const dataP = await volatileLayerClient .getData(dataPartitionRequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); }); const partitions = await volatileLayerClient .getPartitions(partitionsRrequest) - .catch(error => { + .catch((error) => { assert.isDefined(error); assert.equal(mockedErrorResponse, error.statusText); }); }); - it("VolatileLayerClient instance should be initialized with VolatileLayerClientParams", async function() { + it("VolatileLayerClient instance should be initialized with VolatileLayerClientParams", async function () { assert.isDefined(volatileLayerClient); assert.equal(volatileLayerClient["hrn"], "hrn:here:data:::mocked-hrn"); }); - it("Method QueryApi.getPartitionsById should be called with param additionalFields and run getPartitions method with additionalFields", async function() { - const QueryClientStub = sandbox.stub(dataServiceRead, "QueryClient"); + it("Method QueryApi.getPartitionsById should be called with param additionalFields and run getPartitions method with additionalFields", async function () { + const QueryClientStub = vi + .spyOn(QueryClientModule, "QueryClient") + .mockReturnValue(undefined as any); const mockedPartitions = { partitions: [ @@ -506,7 +526,7 @@ describe("VolatileLayerClient", function() { } } - QueryClientStub.callsFake((settings: core.OlpClientSettings) => { + QueryClientStub.mockImplementation(function () { return new MockedQueryClient(); }); @@ -514,9 +534,8 @@ describe("VolatileLayerClient", function() { .withPartitionIds(["23605706"]) .withAdditionalFields(["dataSize"]); - const partitions = await volatileLayerClient.getPartitions( - partitionsRequest - ); + const partitions = + await volatileLayerClient.getPartitions(partitionsRequest); expect(partitions).equals(mockedPartitions); }); }); diff --git a/@here/olp-sdk-dataservice-read/test/unit/getTile.test.ts b/@here/olp-sdk-dataservice-read/test/unit/getTile.test.ts index f742f939..c1582c24 100644 --- a/@here/olp-sdk-dataservice-read/test/unit/getTile.test.ts +++ b/@here/olp-sdk-dataservice-read/test/unit/getTile.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,49 +17,60 @@ * License-Filename: LICENSE */ -import { assert, expect } from "chai"; +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { createStubInstance } from "./stub-instance"; import { TileRequest, getTile } from "@here/olp-sdk-dataservice-read/lib"; import * as core from "@here/olp-sdk-core"; -import { QueryApi } from "@here/olp-sdk-dataservice-api"; -import sinon = require("sinon"); +import { BlobApi, QueryApi } from "@here/olp-sdk-dataservice-api"; import { FetchOptions } from "@here/olp-sdk-core"; -describe("getTile", function() { +describe("getTile", function () { const request = new TileRequest(); - let sandbox: sinon.SinonSandbox; - let quadTreeIndexStub: sinon.SinonStub; - let olpClientSettingsStub: sinon.SinonStubbedInstance; + let quadTreeIndexStub: any; + let olpClientSettingsStub: any; - let getBaseUrlRequestStub: sinon.SinonStub; + let getBaseUrlRequestStub: any; const fakeURL = "http://fake-base.url"; - before(function() { - sandbox = sinon.createSandbox(); - }); + beforeAll(function () {}); - beforeEach(function() { - olpClientSettingsStub = sandbox.createStubInstance( - core.OlpClientSettings - ); + beforeEach(function () { + olpClientSettingsStub = createStubInstance(core.OlpClientSettings); - quadTreeIndexStub = sandbox.stub(QueryApi, "quadTreeIndex"); + quadTreeIndexStub = vi + .spyOn(QueryApi, "quadTreeIndex") + .mockReturnValue(undefined as any); - getBaseUrlRequestStub = sandbox.stub(core.RequestFactory, "getBaseUrl"); - getBaseUrlRequestStub.callsFake(() => Promise.resolve(fakeURL)); + getBaseUrlRequestStub = vi + .spyOn(core.RequestFactory, "getBaseUrl") + .mockReturnValue(undefined as any); + getBaseUrlRequestStub.mockImplementation(() => + Promise.resolve(fakeURL) + ); }); - afterEach(function() { - sandbox.restore(); + afterEach(function () { + vi.restoreAllMocks(); }); - it("Should return 204 response if no quadTreeIndex data", async function() { + it("Should return 204 response if no quadTreeIndex data", async function () { const mockedQuadKeyTreeData = { subQuads: [], parentQuads: [] }; - quadTreeIndexStub.callsFake( + quadTreeIndexStub.mockImplementation( (builder: any, params: any): Promise => { return Promise.resolve(mockedQuadKeyTreeData); } @@ -82,13 +93,97 @@ describe("getTile", function() { expect(response.statusText).eqls("No Content"); }); - it("Should throw an error if not tile key", async function() { + it("Should return the blob of the requested tile", async function () { + // The sub quad key of row 818, column 2021, level 11 within the quad + // tree that is rooted four levels above it. + const requestedSubQuadKey = "281"; + const mockedQuadKeyTreeData = { + subQuads: [ + { + subQuadKey: requestedSubQuadKey, + version: 309, + dataHandle: "mocked-data-handle" + } + ], + parentQuads: [] + }; + const mockedBlob = new Response("mocked-blob"); + + quadTreeIndexStub.mockImplementation((): Promise => + Promise.resolve(mockedQuadKeyTreeData) + ); + const getBlobStub = vi + .spyOn(BlobApi, "getBlob") + .mockReturnValue(Promise.resolve(mockedBlob)); + + const response = await getTile( + new TileRequest() + .withTileKey({ row: 818, column: 2021, level: 11 }) + .withFetchOption(FetchOptions.OnlineOnly), + { + settings: olpClientSettingsStub as any, + catalogHrn: core.HRN.fromString("hrn:here:data:::mocked-hrn"), + layerId: "mocked-layer-id", + layerType: "versioned", + catalogVersion: 123 + } + ); + + expect(response).eqls(mockedBlob); + expect(getBlobStub.mock.calls[0][1].dataHandle).eqls( + "mocked-data-handle" + ); + }); + + it("Should reject if no quad of the tree covers the tile", async function () { + const mockedQuadKeyTreeData = { + subQuads: [ + { + subQuadKey: "unrelated-sub-quad-key", + version: 309, + dataHandle: "mocked-data-handle" + } + ], + parentQuads: [] + }; + + quadTreeIndexStub.mockImplementation((): Promise => + Promise.resolve(mockedQuadKeyTreeData) + ); + + // Every level from the requested tile up to the root of the tree is + // tried before the lookup is given up on. + await expect( + getTile( + new TileRequest() + .withTileKey({ row: 818, column: 2021, level: 11 }) + .withFetchOption(FetchOptions.OnlineOnly), + { + settings: olpClientSettingsStub as any, + catalogHrn: core.HRN.fromString( + "hrn:here:data:::mocked-hrn" + ), + layerId: "mocked-layer-id", + layerType: "versioned", + catalogVersion: 123 + } + ) + ).rejects.toThrow( + `Error getting blob for Tile: ${JSON.stringify({ + row: 818, + column: 2021, + level: 11 + })}` + ); + }); + + it("Should throw an error if not tile key", async function () { const tile = await getTile(request, { settings: olpClientSettingsStub as any, catalogHrn: core.HRN.fromString("hrn:here:data:::mocked-hrn"), layerId: "mocked-layer-id", layerType: "versioned" - }).catch(err => err.message); + }).catch((err) => err.message); assert.isTrue(tile === "Please provide correct QuadKey"); }); }); diff --git a/@here/olp-sdk-dataservice-read/test/unit/stub-instance.ts b/@here/olp-sdk-dataservice-read/test/unit/stub-instance.ts new file mode 100644 index 00000000..77972f51 --- /dev/null +++ b/@here/olp-sdk-dataservice-read/test/unit/stub-instance.ts @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019-2026 HERE Europe B.V. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * License-Filename: LICENSE + */ + +import { vi } from "vitest"; + +/** + * Creates a stubbed instance of a class, mirroring sinon's `createStubInstance`: + * every prototype method is replaced with a vitest mock function so tests can + * override individual methods (e.g. `.mockResolvedValue(...)`). + */ +export function createStubInstance(ctor: new (...args: any[]) => T): any { + // Use Object.create so the result passes `instanceof` checks, mirroring + // sinon's createStubInstance. + const stub: any = Object.create(ctor.prototype); + let proto = ctor.prototype; + while (proto && proto !== Object.prototype) { + for (const key of Object.getOwnPropertyNames(proto)) { + if (key === "constructor") { + continue; + } + const desc = Object.getOwnPropertyDescriptor(proto, key); + if (desc && typeof desc.value === "function") { + stub[key] = vi.fn(); + } + } + proto = Object.getPrototypeOf(proto); + } + return stub; +} diff --git a/@here/olp-sdk-dataservice-read/tsconfig.json b/@here/olp-sdk-dataservice-read/tsconfig.json index 18ddde74..a43bc5c6 100644 --- a/@here/olp-sdk-dataservice-read/tsconfig.json +++ b/@here/olp-sdk-dataservice-read/tsconfig.json @@ -2,7 +2,6 @@ "extends": "../../tsconfig.json", "include": [ "./lib", - "./test", "index.ts", "index.web.ts" ] diff --git a/@here/olp-sdk-dataservice-read/tslint.json b/@here/olp-sdk-dataservice-read/tslint.json deleted file mode 100644 index 32baeba5..00000000 --- a/@here/olp-sdk-dataservice-read/tslint.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "extends": ["tslint:recommended", "tslint-config-prettier"], - "rules": { - "interface-name": [true, "never-prefix"], - "object-literal-sort-keys": false, - "max-classes-per-file": false, - "variable-name": [true, "check-format", "allow-leading-underscore", "allow-snake-case"], - - "arrow-return-shorthand": true, - "await-promise": true, - "ban-comma-operator": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "none" - }, - "eofline": true, - "forin": false, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - { - "limit": 140, - "ignore-pattern": - { - "type": "string" - } - } - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-conditional-assignment": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-imports": true, - "no-duplicate-super": true, - "no-duplicate-switch-case": true, - "no-empty": false, - "no-empty-interface": false, - "no-eval": true, - "no-for-in-array": true, - "no-import-side-effect": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-inferred-empty-object-type": false, - "no-internal-module": true, - "no-invalid-template-strings": true, - "no-invalid-this": true, - "no-magic-numbers": [ - true, - -1, 0, 1, 2, - 200, 204, 400, 404, 500 - ], - "no-misused-new": true, - "no-namespace": true, - "no-non-null-assertion": false, - "no-parameter-reassignment": false, - "no-reference": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-sparse-arrays": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": false, - "no-unnecessary-initializer": true, - "no-unsafe-finally": true, - "no-unused-expression": false, - "no-var-keyword": true, - "no-var-requires": true, - "no-void-expression": true, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "only-arrow-functions": [ - false, - "allow-declarations", - "allow-named-functions" - ], - "prefer-const": true, - "promise-function-async": true, - "quotemark": [ - true, - "double" - ], - "radix": true, - "restrict-plus-operands": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] - }, - "linterOptions": { - "exclude": [ - "test/**/*.ts", - "test/integration/**/*.ts", - "@here/**/**/*.d.ts" - ] - } -} diff --git a/@here/olp-sdk-dataservice-read/vitest.config.ts b/@here/olp-sdk-dataservice-read/vitest.config.ts new file mode 100644 index 00000000..348c152d --- /dev/null +++ b/@here/olp-sdk-dataservice-read/vitest.config.ts @@ -0,0 +1,20 @@ +import { defineConfig } from "vitest/config"; +import { coverageReporters, hereAliases } from "../../vitest.shared"; + +export default defineConfig({ + resolve: { + alias: hereAliases, + // Prefer TypeScript sources over the compiled `.js` that sit next to them + // so the aliased packages resolve to a single, consistent source graph. + extensions: [".ts", ".mjs", ".js", ".mts", ".json"] + }, + test: { + include: ["test/**/*.test.ts"], + environment: "node", + coverage: { + provider: "v8", + include: ["lib/**/*.ts", "index*.ts"], + reporter: coverageReporters + } + } +}); diff --git a/@here/olp-sdk-dataservice-read/webpack.config.js b/@here/olp-sdk-dataservice-read/webpack.config.js index 91f98712..80308a2b 100644 --- a/@here/olp-sdk-dataservice-read/webpack.config.js +++ b/@here/olp-sdk-dataservice-read/webpack.config.js @@ -1,5 +1,4 @@ const path = require("path"); -const TerserPlugin = require("terser-webpack-plugin"); module.exports = env => { const isProd = env.NODE_ENV === "production"; @@ -13,14 +12,10 @@ module.exports = env => { }, entry: "./index.web.js", output: { - filename: `bundle.umd${isProd ? '.min' : '.dev'}.js`, + filename: `bundle.umd${isProd ? ".min" : ".dev"}.js`, path: path.resolve(__dirname), libraryTarget: "umd", - globalObject: 'this' - }, - optimization: { - minimize: true, - minimizer: [new TerserPlugin()], + globalObject: "this" } }; }; diff --git a/@here/olp-sdk-dataservice-write/.prettierrc.json b/@here/olp-sdk-dataservice-write/.prettierrc.json deleted file mode 100644 index ab28f3ed..00000000 --- a/@here/olp-sdk-dataservice-write/.prettierrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "tabWidth": 4 -} \ No newline at end of file diff --git a/@here/olp-sdk-dataservice-write/README.md b/@here/olp-sdk-dataservice-write/README.md index 7a7b75f5..06788695 100644 --- a/@here/olp-sdk-dataservice-write/README.md +++ b/@here/olp-sdk-dataservice-write/README.md @@ -21,8 +21,8 @@ Here is an overview of the top-level files of the repository: The following NPM packages are required to build/test the library: - - node: >= 10.0.0 - - npm: >= 6.0.0 + - node: >= 24.0.0 + - npm: >= 10.0.0 ### Build @@ -248,6 +248,6 @@ const publicationDetails = await clientWrite.getBatch( ## LICENSE -Copyright (C) 2020-2023 HERE Europe B.V. +Copyright (C) 2020-2026 HERE Europe B.V. For license details, see the [LICENSE](LICENSE). diff --git a/@here/olp-sdk-dataservice-write/lib/client/VersionedLayerClient.ts b/@here/olp-sdk-dataservice-write/lib/client/VersionedLayerClient.ts index 524bec97..a28d4c03 100644 --- a/@here/olp-sdk-dataservice-write/lib/client/VersionedLayerClient.ts +++ b/@here/olp-sdk-dataservice-write/lib/client/VersionedLayerClient.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,18 +29,16 @@ import { MetadataApi, PublishApi } from "@here/olp-sdk-dataservice-api"; -import { - CancelBatchRequest, - CheckDataExistsRequest, - CompleteBatchRequest, - GetBatchRequest, - MultiPartUploadWrapper, - PublishSinglePartitionRequest, - StartBatchRequest, - UploadBlobRequest, - UploadBlobResult, - UploadPartitionsRequest -} from "@here/olp-sdk-dataservice-write"; +import { MultiPartUploadWrapper } from "../utils/MultiPartUploadWrapper"; +import { CancelBatchRequest } from "./CancelBatchRequest"; +import { CheckDataExistsRequest } from "./CheckDataExistsRequest"; +import { CompleteBatchRequest } from "./CompleteBatchRequest"; +import { GetBatchRequest } from "./GetBatchRequest"; +import { PublishSinglePartitionRequest } from "./PublishSinglePartitionRequest"; +import { StartBatchRequest } from "./StartBatchRequest"; +import { UploadBlobRequest } from "./UploadBlobRequest"; +import { UploadBlobResult } from "./UploadBlobResult"; +import { UploadPartitionsRequest } from "./UploadPartitionsRequest"; /** * Parameters used to initialize `VersionedLayerClient`. @@ -109,7 +107,7 @@ export class VersionedLayerClient { this.params.settings, this.params.catalogHrn, abortSignal - ).catch(error => + ).catch((error) => Promise.reject( new Error( `Error retrieving from cache requestBuilder for resource "${this.params.catalogHrn}" and api: blob. ${error}` @@ -160,7 +158,7 @@ export class VersionedLayerClient { const latestVersion = await MetadataApi.latestVersion(builder, { startVersion, billingTag - }).catch(err => Promise.reject(err)); + }); return Promise.resolve(latestVersion.version); } @@ -667,7 +665,7 @@ export class VersionedLayerClient { const generatedDatahandle = Uuid.create(); const dataExist = await this.checkDataExists( checkDataExistsRequest.withDataHandle(generatedDatahandle) - ).catch(response => response.status !== STATUS_CODES.NOT_FOUND); + ).catch((response) => response.status !== STATUS_CODES.NOT_FOUND); if (!dataExist) { return generatedDatahandle; diff --git a/@here/olp-sdk-dataservice-write/lib/utils/MultiPartUploadWrapper.ts b/@here/olp-sdk-dataservice-write/lib/utils/MultiPartUploadWrapper.ts index 04c8f89a..a9cc7861 100644 --- a/@here/olp-sdk-dataservice-write/lib/utils/MultiPartUploadWrapper.ts +++ b/@here/olp-sdk-dataservice-write/lib/utils/MultiPartUploadWrapper.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 HERE Europe B.V. + * Copyright (C) 2021-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ import { RequestFactory, STATUS_CODES } from "@here/olp-sdk-core"; -import { BlobData } from "@here/olp-sdk-dataservice-write"; +import { BlobData } from "./BlobData"; import { BlobV1UploadRequest } from "./multipartupload-internal/BlobV1UploadRequest"; import { BlobV2UploadRequest } from "./multipartupload-internal/BlobV2UploadRequest"; import { BufferData } from "./multipartupload-internal/BufferData"; @@ -269,7 +269,7 @@ export class MultiPartUploadWrapper { ) { throw new Error( `Missing ${["uploadPartUrl", "completeUrl"].filter( - p => !(p in startMultipartResponse) + (p) => !(p in startMultipartResponse) )}. Aborting upload.` ); } @@ -317,7 +317,7 @@ export class MultiPartUploadWrapper { partNumber: chunkNumber, url: startMultipartResponse.uploadPartUrl }) - .then(uploadPartResponse => { + .then((uploadPartResponse) => { parts.push({ id: uploadPartResponse.partId, number: uploadPartResponse.partNumber diff --git a/@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/BufferData.ts b/@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/BufferData.ts index fbbdf570..00277e11 100644 --- a/@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/BufferData.ts +++ b/@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/BufferData.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 HERE Europe B.V. + * Copyright (C) 2021-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -import { BlobData } from "@here/olp-sdk-dataservice-write"; +import { BlobData } from "../BlobData"; /** * @internal diff --git a/@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/NodeFileData.ts b/@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/NodeFileData.ts index 973a1811..2997e4ff 100644 --- a/@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/NodeFileData.ts +++ b/@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/NodeFileData.ts @@ -1,71 +1,71 @@ -/* - * Copyright (C) 2021 HERE Europe B.V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * License-Filename: LICENSE - */ - -import { BlobData } from "@here/olp-sdk-dataservice-write"; - -// @ts-ignore disable typechecking for this line -import { fs } from "@here/olp-sdk-core"; - -/** - * @internal - * Implementation of reading bytes from file by filepath - * in Node.js. - */ -export class NodeFileData implements BlobData { - private readonly fileHandle: fs.promises.FileHandle; - private readonly fileStats: fs.Stats; - - constructor(opts: { - fileHandle: fs.promises.FileHandle; - fileStats: fs.Stats; - }) { - this.fileHandle = opts.fileHandle; - this.fileStats = opts.fileStats; - } - - static async fromPath(filePath: string): Promise { - const fileHandle = await fs.promises.open(filePath, "r"); - const fileStats = await fileHandle.stat(); - return new NodeFileData({ fileStats, fileHandle }); - } - - async readBytes(offset: number, count: number): Promise { - const fileSize = this.size(); - - const bufferLength = - offset + count > fileSize ? fileSize - offset : count; - - const buffer = Buffer.alloc(bufferLength); - const chunk = await this.fileHandle.read( - buffer, - 0, - bufferLength, - offset - ); - return chunk.buffer; - } - - size(): number { - return this.fileStats.size; - } - - async finally() { - await this.fileHandle.close(); - } -} +/* + * Copyright (C) 2021-2026 HERE Europe B.V. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * License-Filename: LICENSE + */ + +import { BlobData } from "../BlobData"; + +// @ts-ignore disable typechecking for this line +import { fs } from "@here/olp-sdk-core"; + +/** + * @internal + * Implementation of reading bytes from file by filepath + * in Node.js. + */ +export class NodeFileData implements BlobData { + private readonly fileHandle: fs.promises.FileHandle; + private readonly fileStats: fs.Stats; + + constructor(opts: { + fileHandle: fs.promises.FileHandle; + fileStats: fs.Stats; + }) { + this.fileHandle = opts.fileHandle; + this.fileStats = opts.fileStats; + } + + static async fromPath(filePath: string): Promise { + const fileHandle = await fs.promises.open(filePath, "r"); + const fileStats = await fileHandle.stat(); + return new NodeFileData({ fileStats, fileHandle }); + } + + async readBytes(offset: number, count: number): Promise { + const fileSize = this.size(); + + const bufferLength = + offset + count > fileSize ? fileSize - offset : count; + + const buffer = Buffer.alloc(bufferLength); + const chunk = await this.fileHandle.read( + buffer, + 0, + bufferLength, + offset + ); + return chunk.buffer; + } + + size(): number { + return this.fileStats.size; + } + + async finally() { + await this.fileHandle.close(); + } +} diff --git a/@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/WebData.ts b/@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/WebData.ts index 44552ea1..4439bf6d 100644 --- a/@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/WebData.ts +++ b/@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/WebData.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 HERE Europe B.V. + * Copyright (C) 2021-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -import { BlobData } from "@here/olp-sdk-dataservice-write"; +import { BlobData } from "../BlobData"; /** * @internal diff --git a/@here/olp-sdk-dataservice-write/package.json b/@here/olp-sdk-dataservice-write/package.json index f6f55457..55ef56f1 100644 --- a/@here/olp-sdk-dataservice-write/package.json +++ b/@here/olp-sdk-dataservice-write/package.json @@ -1,6 +1,6 @@ { "name": "@here/olp-sdk-dataservice-write", - "version": "2.0.0", + "version": "3.0.0", "description": "Wrapper around a subset of the HERE Open Location Platform Data REST API related to writing data to OLP catalogs", "main": "index.js", "browser": "index.web.js", @@ -11,33 +11,14 @@ }, "scripts": { "build": "tsc", - "lint": "tslint -c tslint.json -p tsconfig.json", - "test": "tsc -p ./test/tsconfig.json && mocha", - "coverage": "nyc npm run test", - "codecov": "npm run coverage && nyc report --reporter=lcov", - "prepare": "tsc --sourceMap false && npm run bundle", + "lint": "eslint .", + "test": "vitest run", + "coverage": "vitest run --coverage", + "prepack": "tsc --sourceMap false && npm run bundle", "webpack": "webpack", "bundle": "npm run bundle:dev && npm run bundle:prod", - "bundle:prod": "webpack --env.NODE_ENV=production", - "bundle:dev": "webpack --env.NODE_ENV=development" - }, - "nyc": { - "include": [ - "lib/**/*.ts", - "lib/**/*.js" - ], - "extension": [ - ".ts" - ], - "require": [ - "ts-node/register" - ], - "reporter": [ - "text", - "html" - ], - "sourceMap": true, - "instrument": true + "bundle:prod": "webpack --env NODE_ENV=production", + "bundle:dev": "webpack --env NODE_ENV=development" }, "repository": { "type": "git", @@ -50,36 +31,11 @@ }, "license": "Apache-2.0", "dependencies": { - "@here/olp-sdk-core": "^2.0.0", - "@here/olp-sdk-dataservice-api": "^2.0.0", - "@here/olp-sdk-fetch": "^2.0.0" - }, - "devDependencies": { - "@types/chai": "^4.2.7", - "@types/mocha": "^5.2.7", - "@types/node": "18.7.14", - "@types/sinon": "7.0.3", - "@types/sinon-chai": "^3.2.3", - "chai": "^4.2.0", - "glob": "^7.1.6", - "husky": "^3.1.0", - "lint-staged": "^9.5.0", - "mocha": "^6.2.2", - "nyc": "^15.0.0", - "prettier": "^1.19.1", - "sinon": "7.4.2", - "sinon-chai": "^3.4.0", - "source-map-support": "^0.5.16", - "ts-node": "10.9.2", - "tslint": "^6.1.3", - "tslint-config-prettier": "^1.18.0", - "typedoc": "^0.22.13", - "typescript": "4.0.3", - "webpack": "^4.46.0", - "webpack-cli": "^3.3.10", - "terser-webpack-plugin": "^1.4.5" + "@here/olp-sdk-core": "^3.0.0", + "@here/olp-sdk-dataservice-api": "^3.0.0", + "@here/olp-sdk-fetch": "^3.0.0" }, "engines": { - "node": ">= 18.0.0" + "node": ">= 24.0.0" } } diff --git a/@here/olp-sdk-dataservice-write/test/mocha.opts b/@here/olp-sdk-dataservice-write/test/mocha.opts deleted file mode 100644 index a38909c5..00000000 --- a/@here/olp-sdk-dataservice-write/test/mocha.opts +++ /dev/null @@ -1,8 +0,0 @@ ---require ts-node/register ---require source-map-support/register ---full-trace ---bail ---check-leaks ---reporter xunit ---reporter-option output=xunit.xml -test/**/*.test.ts \ No newline at end of file diff --git a/@here/olp-sdk-dataservice-write/test/tsconfig.json b/@here/olp-sdk-dataservice-write/test/tsconfig.json index 67b930c6..cb5bfb67 100644 --- a/@here/olp-sdk-dataservice-write/test/tsconfig.json +++ b/@here/olp-sdk-dataservice-write/test/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../tsconfig.json", "compilerOptions": { - "importHelpers": true - } + "importHelpers": true, + "noImplicitAny": false + }, + "include": ["../lib/**/*.ts", "../index*.ts", "./**/*.ts"] } diff --git a/@here/olp-sdk-dataservice-write/test/unit/BlobV1UploadRequest.test.ts b/@here/olp-sdk-dataservice-write/test/unit/BlobV1UploadRequest.test.ts index 0a5bc4e6..40155c66 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/BlobV1UploadRequest.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/BlobV1UploadRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 HERE Europe B.V. + * Copyright (C) 2021-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,28 +17,32 @@ * License-Filename: LICENSE */ -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { BlobV1UploadRequest } from "../../lib/utils/multipartupload-internal/BlobV1UploadRequest"; import { BlobApi } from "@here/olp-sdk-dataservice-api"; -chai.use(sinonChai); -const expect = chai.expect; - -describe("BlobV1UploadRequest", function() { +describe("BlobV1UploadRequest", function () { const mockedRequestBuilder: any = { id: "mocked-request-builder" }; - let blobApiStub: sinon.SinonStub; + let blobApiStub: any; afterEach(() => { - blobApiStub.restore(); + blobApiStub.mockRestore(); }); - it("startMultipartUpload", async function() { + it("startMultipartUpload", async function () { const contentType = "mocked-content-type"; const handle = "mocked-datahandle"; const layerId = "mocked-layer-id"; @@ -57,9 +61,9 @@ describe("BlobV1UploadRequest", function() { } }; - blobApiStub = sinon - .stub(BlobApi, "startMultipartUpload") - .resolves(mockedApiResponse); + blobApiStub = vi + .spyOn(BlobApi, "startMultipartUpload") + .mockResolvedValue(mockedApiResponse); const request = new BlobV1UploadRequest(mockedRequestBuilder); const result = await request.startMultipartUpload({ @@ -74,7 +78,7 @@ describe("BlobV1UploadRequest", function() { mockedApiResponse.links.uploadPart.href ); - expect(blobApiStub).calledWith(mockedRequestBuilder, { + expect(blobApiStub).toHaveBeenCalledWith(mockedRequestBuilder, { dataHandle: handle, layerId, billingTag, @@ -88,10 +92,10 @@ describe("BlobV1UploadRequest", function() { links: undefined }; - blobApiStub.restore(); - blobApiStub = sinon - .stub(BlobApi, "startMultipartUpload") - .resolves(mockedApiBadResponse); + blobApiStub.mockRestore(); + blobApiStub = vi + .spyOn(BlobApi, "startMultipartUpload") + .mockResolvedValue(mockedApiBadResponse); await request .startMultipartUpload({ @@ -101,14 +105,14 @@ describe("BlobV1UploadRequest", function() { billingTag, contentEncoding }) - .catch(e => { + .catch((e) => { expect(e.message).eqls( "Failed to start the multipart upload to Blob V1. Bad response." ); }); }); - it("uploadPart", async function() { + it("uploadPart", async function () { const contentType = "mocked-content-type"; const url = "mocked-url"; const data = Buffer.from("mocked-data", "utf8"); @@ -120,9 +124,9 @@ describe("BlobV1UploadRequest", function() { headers: new Map().set("ETag", "mocked-id") }; - blobApiStub = sinon - .stub(BlobApi, "doUploadPart") - .resolves((mockedApiResponse as unknown) as Response); + blobApiStub = vi + .spyOn(BlobApi, "doUploadPart") + .mockResolvedValue(mockedApiResponse as unknown as Response); const request = new BlobV1UploadRequest(mockedRequestBuilder); const result = await request.uploadPart({ @@ -137,7 +141,7 @@ describe("BlobV1UploadRequest", function() { expect(result.partId).equals("mocked-id"); expect(result.partNumber).equals(23); - expect(blobApiStub).calledWith(mockedRequestBuilder, { + expect(blobApiStub).toHaveBeenCalledWith(mockedRequestBuilder, { url, body: data, contentType, @@ -149,10 +153,10 @@ describe("BlobV1UploadRequest", function() { const mockedApiBadResponse = { headers: new Map() }; - blobApiStub.restore(); - blobApiStub = sinon - .stub(BlobApi, "doUploadPart") - .resolves((mockedApiBadResponse as unknown) as Response); + blobApiStub.mockRestore(); + blobApiStub = vi + .spyOn(BlobApi, "doUploadPart") + .mockResolvedValue(mockedApiBadResponse as unknown as Response); await request .uploadPart({ @@ -163,14 +167,14 @@ describe("BlobV1UploadRequest", function() { partNumber, billingTag }) - .catch(e => { + .catch((e) => { expect(e.message).eqls( "Error uploading chunk 23, can not read ETag from the response headers." ); }); }); - it("completeMultipartUpload", async function() { + it("completeMultipartUpload", async function () { const url = "mocked-url"; const billingTag = "mocked-billingTag"; const parts = [ @@ -184,7 +188,9 @@ describe("BlobV1UploadRequest", function() { } ]; - blobApiStub = sinon.stub(BlobApi, "doCompleteMultipartUpload"); + blobApiStub = vi + .spyOn(BlobApi, "doCompleteMultipartUpload") + .mockReturnValue(undefined as any); const request = new BlobV1UploadRequest(mockedRequestBuilder); await request.completeMultipartUpload({ @@ -193,7 +199,7 @@ describe("BlobV1UploadRequest", function() { billingTag }); - expect(blobApiStub).calledWith(mockedRequestBuilder, { + expect(blobApiStub).toHaveBeenCalledWith(mockedRequestBuilder, { url, parts: { parts: [ diff --git a/@here/olp-sdk-dataservice-write/test/unit/BlobV2UploadRequest.test.ts b/@here/olp-sdk-dataservice-write/test/unit/BlobV2UploadRequest.test.ts index 535b44fa..bf38924b 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/BlobV2UploadRequest.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/BlobV2UploadRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 HERE Europe B.V. + * Copyright (C) 2021-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,28 +17,32 @@ * License-Filename: LICENSE */ -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { BlobV2UploadRequest } from "../../lib/utils/multipartupload-internal/BlobV2UploadRequest"; import { ObjectStoreApi } from "@here/olp-sdk-dataservice-api"; -chai.use(sinonChai); -const expect = chai.expect; - -describe("BlobV2UploadRequest", function() { +describe("BlobV2UploadRequest", function () { const mockedRequestBuilder: any = { id: "mocked-request-builder" }; - let blobApiStub: sinon.SinonStub; + let blobApiStub: any; afterEach(() => { - blobApiStub.restore(); + blobApiStub.mockRestore(); }); - it("startMultipartUpload", async function() { + it("startMultipartUpload", async function () { const contentType = "mocked-content-type"; const handle = "mocked-key"; const layerId = "mocked-layer-id"; @@ -48,9 +52,9 @@ describe("BlobV2UploadRequest", function() { multipartToken: "mocked-multipartToken" }; - blobApiStub = sinon - .stub(ObjectStoreApi, "startMultipartUploadByKey") - .resolves(mockedApiResponse); + blobApiStub = vi + .spyOn(ObjectStoreApi, "startMultipartUploadByKey") + .mockResolvedValue(mockedApiResponse); const request = new BlobV2UploadRequest(mockedRequestBuilder); const result = await request.startMultipartUpload({ @@ -62,7 +66,7 @@ describe("BlobV2UploadRequest", function() { expect(result.multipartToken).equals(mockedApiResponse.multipartToken); - expect(blobApiStub).calledWith(mockedRequestBuilder, { + expect(blobApiStub).toHaveBeenCalledWith(mockedRequestBuilder, { key: handle, layerId, body: { @@ -74,10 +78,10 @@ describe("BlobV2UploadRequest", function() { const mockedApiBadResponse = { multipartToken: undefined as any }; - blobApiStub.restore(); - blobApiStub = sinon - .stub(ObjectStoreApi, "startMultipartUploadByKey") - .resolves(mockedApiBadResponse); + blobApiStub.mockRestore(); + blobApiStub = vi + .spyOn(ObjectStoreApi, "startMultipartUploadByKey") + .mockResolvedValue(mockedApiBadResponse); await request .startMultipartUpload({ @@ -86,14 +90,14 @@ describe("BlobV2UploadRequest", function() { layerId, contentEncoding }) - .catch(e => { + .catch((e) => { expect(e.message).eqls( "Failed to start the multipart upload to Blob V2. Bad response." ); }); }); - it("uploadPart", async function() { + it("uploadPart", async function () { const contentType = "mocked-content-type"; const multipartToken = "mocked-multipartToken"; const data = Buffer.from("mocked-data", "utf8"); @@ -105,9 +109,9 @@ describe("BlobV2UploadRequest", function() { id: "mocked-part-id" }; - blobApiStub = sinon - .stub(ObjectStoreApi, "uploadPartByKey") - .resolves(mockedApiResponse); + blobApiStub = vi + .spyOn(ObjectStoreApi, "uploadPartByKey") + .mockResolvedValue(mockedApiResponse); const request = new BlobV2UploadRequest(mockedRequestBuilder); const result = await request.uploadPart({ @@ -122,7 +126,7 @@ describe("BlobV2UploadRequest", function() { expect(result.partId).equals("mocked-part-id"); expect(result.partNumber).equals(23); - expect(blobApiStub).calledWith(mockedRequestBuilder, { + expect(blobApiStub).toHaveBeenCalledWith(mockedRequestBuilder, { layerId, body: data, multipartToken, @@ -135,10 +139,10 @@ describe("BlobV2UploadRequest", function() { id: undefined as any }; - blobApiStub.restore(); - blobApiStub = sinon - .stub(ObjectStoreApi, "uploadPartByKey") - .resolves(mockedApiBadResponse); + blobApiStub.mockRestore(); + blobApiStub = vi + .spyOn(ObjectStoreApi, "uploadPartByKey") + .mockResolvedValue(mockedApiBadResponse); await request .uploadPart({ @@ -149,14 +153,14 @@ describe("BlobV2UploadRequest", function() { contentLength, partNumber }) - .catch(e => { + .catch((e) => { expect(e.message).eqls( "Error uploading chunk 23, can not get the part ID from the response" ); }); }); - it("completeMultipartUpload", async function() { + it("completeMultipartUpload", async function () { const multipartToken = "mocked-multipartToken"; const layerId = "mocked-layerId"; const parts = [ @@ -170,10 +174,9 @@ describe("BlobV2UploadRequest", function() { } ]; - blobApiStub = sinon.stub( - ObjectStoreApi, - "completeMultipartUploadByKey" - ); + blobApiStub = vi + .spyOn(ObjectStoreApi, "completeMultipartUploadByKey") + .mockReturnValue(undefined as any); const request = new BlobV2UploadRequest(mockedRequestBuilder); await request.completeMultipartUpload({ @@ -182,7 +185,7 @@ describe("BlobV2UploadRequest", function() { layerId }); - expect(blobApiStub).calledWith(mockedRequestBuilder, { + expect(blobApiStub).toHaveBeenCalledWith(mockedRequestBuilder, { layerId, body: { parts diff --git a/@here/olp-sdk-dataservice-write/test/unit/BufferData.test.ts b/@here/olp-sdk-dataservice-write/test/unit/BufferData.test.ts index 8062d075..89d5d7e7 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/BufferData.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/BufferData.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 HERE Europe B.V. + * Copyright (C) 2021-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,27 +17,33 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { BufferData } from "../../lib/utils/multipartupload-internal/BufferData"; -chai.use(sinonChai); -const expect = chai.expect; - -describe("BufferData", function() { +describe("BufferData", function () { let mockedData: Buffer; beforeEach(() => { mockedData = Buffer.from("test-data", "utf-8"); }); - it("readBytes", async function() { + it("readBytes", async function () { const data = new BufferData(mockedData); const bytes = await data.readBytes(2, 3); expect(bytes.byteLength).eqls(3); expect(bytes.toString()).eqls("st-"); }); - it("size", function() { + it("size", function () { const data = new BufferData(mockedData); expect(data.size()).eqls(9); }); diff --git a/@here/olp-sdk-dataservice-write/test/unit/CancelBatchRequest.test.ts b/@here/olp-sdk-dataservice-write/test/unit/CancelBatchRequest.test.ts index 9a6d061d..b92f84eb 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/CancelBatchRequest.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/CancelBatchRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,24 +17,28 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { CancelBatchRequest } from "@here/olp-sdk-dataservice-write"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("CancelBatchRequest", function() { - it("Should initialize", function() { +describe("CancelBatchRequest", function () { + it("Should initialize", function () { const request = new CancelBatchRequest(); assert.isDefined(request); expect(request).be.instanceOf(CancelBatchRequest); }); - it("Should set and get parameters", function() { + it("Should set and get parameters", function () { const mockedPublicationId = "publication-id"; const mockedBillingTag = "mocked-billing-tag"; diff --git a/@here/olp-sdk-dataservice-write/test/unit/CheckDataExistsRequest.test.ts b/@here/olp-sdk-dataservice-write/test/unit/CheckDataExistsRequest.test.ts index 1a82a6a8..01b86a70 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/CheckDataExistsRequest.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/CheckDataExistsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,24 +17,28 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { CheckDataExistsRequest } from "@here/olp-sdk-dataservice-write"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("CheckDataExistsRequest", function() { - it("Should initialize", function() { +describe("CheckDataExistsRequest", function () { + it("Should initialize", function () { const request = new CheckDataExistsRequest(); assert.isDefined(request); expect(request).be.instanceOf(CheckDataExistsRequest); }); - it("Should set and get parameters", function() { + it("Should set and get parameters", function () { const mockedLayer = "layer-0"; const mockedBillingTag = "mocked-billing-tag"; const mockedDataHandle = "datahandle123"; diff --git a/@here/olp-sdk-dataservice-write/test/unit/CompleteBatchRequest.test.ts b/@here/olp-sdk-dataservice-write/test/unit/CompleteBatchRequest.test.ts index 09d816bc..f9d92ed3 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/CompleteBatchRequest.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/CompleteBatchRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,24 +17,28 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { CompleteBatchRequest } from "@here/olp-sdk-dataservice-write"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("CompleteBatchRequest", function() { - it("Should initialize", function() { +describe("CompleteBatchRequest", function () { + it("Should initialize", function () { const request = new CompleteBatchRequest(); assert.isDefined(request); expect(request).be.instanceOf(CompleteBatchRequest); }); - it("Should set and get parameters", function() { + it("Should set and get parameters", function () { const mockedPublicationId = "publication-id"; const mockedBillingTag = "mocked-billing-tag"; diff --git a/@here/olp-sdk-dataservice-write/test/unit/GetBatchRequest.test.ts b/@here/olp-sdk-dataservice-write/test/unit/GetBatchRequest.test.ts index b8951ffe..8fa598e5 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/GetBatchRequest.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/GetBatchRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,24 +17,28 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { GetBatchRequest } from "@here/olp-sdk-dataservice-write"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("GetBatchRequest", function() { - it("Should initialize", function() { +describe("GetBatchRequest", function () { + it("Should initialize", function () { const request = new GetBatchRequest(); assert.isDefined(request); expect(request).be.instanceOf(GetBatchRequest); }); - it("Should set and get parameters", function() { + it("Should set and get parameters", function () { const mockedPublicationId = "publication-id"; const mockedBillingTag = "mocked-billing-tag"; diff --git a/@here/olp-sdk-dataservice-write/test/unit/MultiPartUploadWrapper.test.ts b/@here/olp-sdk-dataservice-write/test/unit/MultiPartUploadWrapper.test.ts index 401cb7a1..3b83fa49 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/MultiPartUploadWrapper.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/MultiPartUploadWrapper.test.ts @@ -1,711 +1,753 @@ -/* - * Copyright (C) 2021 HERE Europe B.V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * License-Filename: LICENSE - */ - -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); -import * as core from "@here/olp-sdk-core"; -import * as BlobV1UploadRequest from "@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/BlobV1UploadRequest"; -import * as BlobV2UploadRequest from "@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/BlobV2UploadRequest"; -import { NodeFileData } from "@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/NodeFileData"; -import { BufferData } from "@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/BufferData"; -import { MultiPartUploadWrapper } from "@here/olp-sdk-dataservice-write"; - -chai.use(sinonChai); - -const expect = chai.expect; - -const OlpClientSettingsStub = {} as core.OlpClientSettings; -let wrapper: MultiPartUploadWrapper; - -describe("MultiPartUploadWrapper", async function() { - let HrnFromStringStub: sinon.SinonStub; - let requestFactoryCreateStub: sinon.SinonStub; - - beforeEach(() => { - HrnFromStringStub = sinon.stub(core.HRN, "fromString"); - requestFactoryCreateStub = sinon.stub(core.RequestFactory, "create"); - }); - - afterEach(() => { - HrnFromStringStub.restore(); - requestFactoryCreateStub.restore(); - }); - - describe("Success cases", () => { - it("Upload to Blob V1", async () => { - // ======= Prepare ====== // - - const MockedBlobV1UploadRequest = { - startMultipartUpload: sinon.stub().resolves({ - uploadPartUrl: "mocked-upload-part-url", - completeUrl: "mocked-complete-url" - }), - uploadPart: sinon.stub().resolves({ - partId: "mocked-uploaded-part-id", - partNumber: 1 - }), - completeMultipartUpload: sinon.stub() - }; - - const BlobV1UploadRequestStub = sinon - .stub(BlobV1UploadRequest, "BlobV1UploadRequest") - .returns(MockedBlobV1UploadRequest); - - // ======= Initialize ====== // - wrapper = new MultiPartUploadWrapper( - { - blobVersion: "v1", - catalogHrn: "mocked-catalog", - contentType: "text/plain", - handle: "mocked-datahandle", - layerId: "mocked-layer-id", - billingTag: "mocked-billingTag", - contentEncoding: "gzip" - }, - OlpClientSettingsStub - ); - - // ======== Call method. ======== // - - const status = await wrapper.upload( - Buffer.from("test-data", "utf-8") - ); - - expect(status).eqls(204); - - // =========== Should be called once startMultipartUpload method with correct params. ======= // - - const startMultipartUploadCalls = MockedBlobV1UploadRequest.startMultipartUpload.getCalls(); - expect(startMultipartUploadCalls.length).eqls(1); - - const startMultipartUploadCallParams = - startMultipartUploadCalls[0].args[0]; - expect(startMultipartUploadCallParams.contentType).eqls( - "text/plain" - ); - expect(startMultipartUploadCallParams.handle).eqls( - "mocked-datahandle" - ); - expect(startMultipartUploadCallParams.layerId).eqls( - "mocked-layer-id" - ); - expect(startMultipartUploadCallParams.billingTag).eqls( - "mocked-billingTag" - ); - expect(startMultipartUploadCallParams.contentEncoding).eqls("gzip"); - - // =========== Should be called once uploadPart method with correct params. ======= // - - const uploadPartCalls = MockedBlobV1UploadRequest.uploadPart.getCalls(); - expect(uploadPartCalls.length).eqls(1); - - const uploadPartCallParams = uploadPartCalls[0].args[0]; - expect(uploadPartCallParams.layerId).eqls("mocked-layer-id"); - expect(uploadPartCallParams.data.byteLength).eqls(9); - expect(uploadPartCallParams.multipartToken).eqls(undefined); - expect(uploadPartCallParams.billingTag).eqls("mocked-billingTag"); - expect(uploadPartCallParams.contentLength).eqls(9); - expect(uploadPartCallParams.contentType).eqls("text/plain"); - expect(uploadPartCallParams.partNumber).eqls(1); - expect(uploadPartCallParams.url).eqls("mocked-upload-part-url"); - - // =========== Should be called once completeMultipartUpload method with correct params. ======= // - - const completeMultipartUploadCalls = MockedBlobV1UploadRequest.completeMultipartUpload.getCalls(); - expect(completeMultipartUploadCalls.length).eqls(1); - - const completeMultipartUploadCallParams = - completeMultipartUploadCalls[0].args[0]; - - expect(completeMultipartUploadCallParams.parts).eqls([ - { id: "mocked-uploaded-part-id", number: 1 } - ]); - expect(completeMultipartUploadCallParams.layerId).eqls( - "mocked-layer-id" - ); - expect(completeMultipartUploadCallParams.multipartToken).eqls( - undefined - ); - expect(completeMultipartUploadCallParams.billingTag).eqls( - "mocked-billingTag" - ); - expect(completeMultipartUploadCallParams.url).eqls( - "mocked-complete-url" - ); - - BlobV1UploadRequestStub.restore(); - }); - - it("Upload to Blob V2", async () => { - // ======= Prepare ====== // - - const MockedBlobV2UploadRequest = { - startMultipartUpload: sinon.stub().resolves({ - multipartToken: "mocked-multipartToken" - }), - uploadPart: sinon.stub().resolves({ - partNumber: 1, - partId: "mocked-uploaded-part-id" - }), - completeMultipartUpload: sinon.stub() - }; - - const BlobV2UploadRequestStub = sinon - .stub(BlobV2UploadRequest, "BlobV2UploadRequest") - .returns(MockedBlobV2UploadRequest); - - // ======= Initialize ====== // - wrapper = new MultiPartUploadWrapper( - { - blobVersion: "v2", - catalogHrn: "mocked-catalog", - contentType: "text/plain", - handle: "mocked-key", - layerId: "mocked-layer-id", - contentEncoding: "gzip" - }, - OlpClientSettingsStub - ); - - // ======== Call method. ======== // - - const status = await wrapper.upload( - Buffer.from("test-data", "utf-8") - ); - - expect(status).eqls(204); - - // =========== Should be called once startMultipartUpload method with correct params. ======= // - - const startMultipartUploadCalls = MockedBlobV2UploadRequest.startMultipartUpload.getCalls(); - expect(startMultipartUploadCalls.length).eqls(1); - - const startMultipartUploadCallParams = - startMultipartUploadCalls[0].args[0]; - expect(startMultipartUploadCallParams.contentType).eqls( - "text/plain" - ); - expect(startMultipartUploadCallParams.handle).eqls("mocked-key"); - expect(startMultipartUploadCallParams.layerId).eqls( - "mocked-layer-id" - ); - expect(startMultipartUploadCallParams.billingTag).eqls(undefined); - expect(startMultipartUploadCallParams.contentEncoding).eqls("gzip"); - - // =========== Should be called once uploadPart method with correct params. ======= // - - const uploadPartCalls = MockedBlobV2UploadRequest.uploadPart.getCalls(); - expect(uploadPartCalls.length).eqls(1); - - const uploadPartCallParams = uploadPartCalls[0].args[0]; - expect(uploadPartCallParams.layerId).eqls("mocked-layer-id"); - expect(uploadPartCallParams.data.byteLength).eqls(9); - expect(uploadPartCallParams.multipartToken).eqls( - "mocked-multipartToken" - ); - expect(uploadPartCallParams.billingTag).eqls(undefined); - expect(uploadPartCallParams.contentLength).eqls(9); - expect(uploadPartCallParams.contentType).eqls("text/plain"); - expect(uploadPartCallParams.partNumber).eqls(1); - expect(uploadPartCallParams.url).eqls(undefined); - - // =========== Should be called once completeMultipartUpload method with correct params. ======= // - - const completeMultipartUploadCalls = MockedBlobV2UploadRequest.completeMultipartUpload.getCalls(); - expect(completeMultipartUploadCalls.length).eqls(1); - - const completeMultipartUploadCallParams = - completeMultipartUploadCalls[0].args[0]; - - expect(completeMultipartUploadCallParams.parts).eqls([ - { id: "mocked-uploaded-part-id", number: 1 } - ]); - expect(completeMultipartUploadCallParams.layerId).eqls( - "mocked-layer-id" - ); - expect(completeMultipartUploadCallParams.multipartToken).eqls( - "mocked-multipartToken" - ); - expect(completeMultipartUploadCallParams.billingTag).eqls( - undefined - ); - expect(completeMultipartUploadCallParams.url).eqls(undefined); - - BlobV2UploadRequestStub.restore(); - }); - - it("Should call callbacks if exists", async () => { - // ======= Prepare ====== // - - const MockedBlobV2UploadRequest = { - startMultipartUpload: sinon.stub().resolves({ - multipartToken: "mocked-multipartToken" - }), - uploadPart: sinon.stub().resolves({ - partNumber: 1, - partId: "mocked-uploaded-part-id" - }), - completeMultipartUpload: sinon.stub() - }; - - const BlobV2UploadRequestStub = sinon - .stub(BlobV2UploadRequest, "BlobV2UploadRequest") - .returns(MockedBlobV2UploadRequest); - - const onStart = sinon.stub(); - const onStatus = sinon.stub(); - const blobFinally = sinon.stub(); - - class TestBlobData extends BufferData { - constructor(data: ArrayBufferLike) { - super(data); - } - - async finally() { - blobFinally(); - } - } - - // ======= Initialize ====== // - wrapper = new MultiPartUploadWrapper( - { - blobVersion: "v2", - catalogHrn: "mocked-catalog", - contentType: "text/plain", - handle: "mocked-key", - layerId: "mocked-layer-id", - contentEncoding: "gzip", - onStart, - onStatus - }, - OlpClientSettingsStub - ); - - // ======== Call method. ======== // - - const status = await wrapper.upload( - new TestBlobData(Buffer.from("test-data", "utf-8")) - ); - - expect(status).eqls(204); - - // =========== Should be called once onStart callback with correct params. ======= // - - const onStartCalls = onStart.getCalls(); - expect(onStartCalls.length).eqls(1); - - const onStartCallParams = onStartCalls[0].args[0]; - expect(onStartCallParams.dataSize).equals(9); - expect(onStartCallParams.multipartToken).equals( - "mocked-multipartToken" - ); - expect(onStartCallParams.multipartUrl).equals(undefined); - expect(onStartCallParams.multipartStatusUrl).equals(undefined); - - // =========== Should be called once onStatus callback with correct params. ======= // - - const onStatusCalls = onStatus.getCalls(); - expect(onStatusCalls.length).eqls(1); - - const onStatusCallsParams = onStatusCalls[0].args[0]; - expect(onStatusCallsParams.chunkId).equals( - "mocked-uploaded-part-id" - ); - expect(onStatusCallsParams.chunkNumber).equals(1); - expect(onStatusCallsParams.chunkSize).equals(9); - expect(onStatusCallsParams.totalChunks).equals(1); - expect(onStatusCallsParams.uploadedChunks).equals(1); - - BlobV2UploadRequestStub.restore(); - }); - }); - - describe("Uploading by chunks", () => { - it("The uploaded data should be splitted by default 5MB chunks", async () => { - // ======= Prepare ====== // - - const MockedBlobV2UploadRequest = { - startMultipartUpload: sinon.stub().resolves({ - multipartToken: "mocked-multipartToken" - }), - uploadPart: sinon.stub().resolves({ - partNumber: 1, - partId: "mocked-uploaded-part-id" - }), - completeMultipartUpload: sinon.stub() - }; - - const BlobV2UploadRequestStub = sinon - .stub(BlobV2UploadRequest, "BlobV2UploadRequest") - .returns(MockedBlobV2UploadRequest); - - // ======= Initialize ====== // - wrapper = new MultiPartUploadWrapper( - { - blobVersion: "v2", - catalogHrn: "mocked-catalog", - contentType: "text/plain", - handle: "mocked-key", - layerId: "mocked-layer-id" - }, - OlpClientSettingsStub - ); - - // ======== Call method. ======== // - - const data = Buffer.alloc(33554432); // ~ 33 MB - - const status = await wrapper.upload(data); - - expect(status).eqls(204); - - // =========== Should be called once startMultipartUpload method. ======= // - - const startMultipartUploadCalls = MockedBlobV2UploadRequest.startMultipartUpload.getCalls(); - expect(startMultipartUploadCalls.length).eqls(1); - - // =========== Should be called 7 times the uploadPart method. ======= // - - const uploadPartCalls = MockedBlobV2UploadRequest.uploadPart.getCalls(); - expect(uploadPartCalls.length).eqls(7); - - // =========== Should be called once completeMultipartUpload method with correct params. ======= // - - const completeMultipartUploadCalls = MockedBlobV2UploadRequest.completeMultipartUpload.getCalls(); - expect(completeMultipartUploadCalls.length).eqls(1); - - const completeMultipartUploadCallParams = - completeMultipartUploadCalls[0].args[0]; - - expect(completeMultipartUploadCallParams.parts).eqls([ - { id: "mocked-uploaded-part-id", number: 1 }, - { id: "mocked-uploaded-part-id", number: 1 }, - { id: "mocked-uploaded-part-id", number: 1 }, - { id: "mocked-uploaded-part-id", number: 1 }, - { id: "mocked-uploaded-part-id", number: 1 }, - { id: "mocked-uploaded-part-id", number: 1 }, - { id: "mocked-uploaded-part-id", number: 1 } - ]); - expect(completeMultipartUploadCallParams.layerId).eqls( - "mocked-layer-id" - ); - expect(completeMultipartUploadCallParams.multipartToken).eqls( - "mocked-multipartToken" - ); - expect(completeMultipartUploadCallParams.billingTag).eqls( - undefined - ); - expect(completeMultipartUploadCallParams.url).eqls(undefined); - - BlobV2UploadRequestStub.restore(); - }); - - it("The uploaded data should be splitted by not default 17MB chunks", async () => { - // ======= Prepare ====== // - - const MockedBlobV2UploadRequest = { - startMultipartUpload: sinon.stub().resolves({ - multipartToken: "mocked-multipartToken" - }), - uploadPart: sinon.stub().resolves({ - partNumber: 1, - partId: "mocked-uploaded-part-id" - }), - completeMultipartUpload: sinon.stub() - }; - - const BlobV2UploadRequestStub = sinon - .stub(BlobV2UploadRequest, "BlobV2UploadRequest") - .returns(MockedBlobV2UploadRequest); - - // ======= Initialize ====== // - wrapper = new MultiPartUploadWrapper( - { - blobVersion: "v2", - chunkSizeMB: 17, - catalogHrn: "mocked-catalog", - contentType: "text/plain", - handle: "mocked-key", - layerId: "mocked-layer-id" - }, - OlpClientSettingsStub - ); - - // ======== Call method. ======== // - - const data = Buffer.alloc(33554432); // ~ 33 MB - - const status = await wrapper.upload(data); - - expect(status).eqls(204); - - // =========== Should be called once startMultipartUpload method. ======= // - - const startMultipartUploadCalls = MockedBlobV2UploadRequest.startMultipartUpload.getCalls(); - expect(startMultipartUploadCalls.length).eqls(1); - - // =========== Should be called 2 times the uploadPart method. ======= // - - const uploadPartCalls = MockedBlobV2UploadRequest.uploadPart.getCalls(); - expect(uploadPartCalls.length).eqls(2); - - // =========== Should be called once completeMultipartUpload method with correct params. ======= // - - const completeMultipartUploadCalls = MockedBlobV2UploadRequest.completeMultipartUpload.getCalls(); - expect(completeMultipartUploadCalls.length).eqls(1); - - const completeMultipartUploadCallParams = - completeMultipartUploadCalls[0].args[0]; - - expect(completeMultipartUploadCallParams.parts).eqls([ - { id: "mocked-uploaded-part-id", number: 1 }, - { id: "mocked-uploaded-part-id", number: 1 } - ]); - expect(completeMultipartUploadCallParams.layerId).eqls( - "mocked-layer-id" - ); - expect(completeMultipartUploadCallParams.multipartToken).eqls( - "mocked-multipartToken" - ); - expect(completeMultipartUploadCallParams.billingTag).eqls( - undefined - ); - expect(completeMultipartUploadCallParams.url).eqls(undefined); - - BlobV2UploadRequestStub.restore(); - }); - }); - - describe("Different inputs test", () => { - it("Upload to Blob", async () => { - // ======= Prepare ====== // - - const NodeFileDataStub = sinon - .stub(NodeFileData, "fromPath") - .resolves(new BufferData(Buffer.from("test-data", "utf-8"))); - - const MockedBlobV2UploadRequest = { - startMultipartUpload: sinon.stub().resolves({ - multipartToken: "mocked-multipartToken" - }), - uploadPart: sinon - .stub() - .resolves({ id: "mocked-uploaded-part-id" }), - completeMultipartUpload: sinon.stub() - }; - - const BlobV2UploadRequestStub = sinon - .stub(BlobV2UploadRequest, "BlobV2UploadRequest") - .returns(MockedBlobV2UploadRequest); - - // ======= Initialize ====== // - wrapper = new MultiPartUploadWrapper( - { - blobVersion: "v2", - catalogHrn: "mocked-catalog", - contentType: "text/plain", - handle: "mocked-key", - layerId: "mocked-layer-id", - contentEncoding: "gzip" - }, - OlpClientSettingsStub - ); - - // ======== Call method. ======== // - - const status = await wrapper.upload("fake path to file"); - - expect(status).eqls(204); - - NodeFileDataStub.restore(); - BlobV2UploadRequestStub.restore(); - }); - }); - - describe("Unsuccessful cases", () => { - it("Not valid startMultipartResponse", async () => { - // ======= Prepare ====== // - - let MockedBlobV1UploadRequest = { - startMultipartUpload: sinon.stub().resolves({ - uploadPartUrl: "mocked-upload-part-url" - }) - }; - - let BlobV1UploadRequestStub = sinon - .stub(BlobV1UploadRequest, "BlobV1UploadRequest") - .returns(MockedBlobV1UploadRequest); - - // ======= Initialize ====== // - wrapper = new MultiPartUploadWrapper( - { - blobVersion: "v1", - catalogHrn: "mocked-catalog", - contentType: "text/plain", - handle: "mocked-datahandle", - layerId: "mocked-layer-id", - billingTag: "mocked-billingTag", - contentEncoding: "gzip" - }, - OlpClientSettingsStub - ); - - // ======== Call method. ======== // - - try { - await wrapper.upload(Buffer.from("test-data", "utf-8")); - } catch (error) { - expect(error.message).equals( - `Missing completeUrl. Aborting upload.` - ); - } - - BlobV1UploadRequestStub.restore(); - - MockedBlobV1UploadRequest = { - startMultipartUpload: sinon.stub().resolves({ - completeUrl: "mocked-complete-url" - }) - }; - - BlobV1UploadRequestStub = sinon - .stub(BlobV1UploadRequest, "BlobV1UploadRequest") - .returns(MockedBlobV1UploadRequest); - - // ======= Initialize ====== // - wrapper = new MultiPartUploadWrapper( - { - blobVersion: "v1", - catalogHrn: "mocked-catalog", - contentType: "text/plain", - handle: "mocked-datahandle", - layerId: "mocked-layer-id", - billingTag: "mocked-billingTag", - contentEncoding: "gzip" - }, - OlpClientSettingsStub - ); - - // ======== Call method. ======== // - - try { - await wrapper.upload(Buffer.from("test-data", "utf-8")); - } catch (error) { - expect(error.message).equals( - "Missing uploadPartUrl. Aborting upload." - ); - } - - BlobV1UploadRequestStub.restore(); - - MockedBlobV1UploadRequest = { - startMultipartUpload: sinon.stub().resolves({}) - }; - - BlobV1UploadRequestStub = sinon - .stub(BlobV1UploadRequest, "BlobV1UploadRequest") - .returns(MockedBlobV1UploadRequest); - - // ======= Initialize ====== // - wrapper = new MultiPartUploadWrapper( - { - blobVersion: "v1", - catalogHrn: "mocked-catalog", - contentType: "text/plain", - handle: "mocked-datahandle", - layerId: "mocked-layer-id", - billingTag: "mocked-billingTag", - contentEncoding: "gzip" - }, - OlpClientSettingsStub - ); - - // ======== Call method. ======== // - - try { - await wrapper.upload(Buffer.from("test-data", "utf-8")); - } catch (error) { - expect(error.message).equals( - "Missing uploadPartUrl,completeUrl. Aborting upload." - ); - } - - BlobV1UploadRequestStub.restore(); - - const MockedBlobV2UploadRequest = { - startMultipartUpload: sinon.stub().resolves({ - completeUrl: "mocked-complete-url" - }) - }; - - const BlobV2UploadRequestStub = sinon - .stub(BlobV2UploadRequest, "BlobV2UploadRequest") - .returns(MockedBlobV2UploadRequest); - - // ======= Initialize ====== // - wrapper = new MultiPartUploadWrapper( - { - blobVersion: "v2", - catalogHrn: "mocked-catalog", - contentType: "text/plain", - handle: "mocked-datahandle", - layerId: "mocked-layer-id", - billingTag: "mocked-billingTag", - contentEncoding: "gzip" - }, - OlpClientSettingsStub - ); - - // ======== Call method. ======== // - - try { - await wrapper.upload(Buffer.from("test-data", "utf-8")); - } catch (error) { - expect(error.message).equals( - "Multipart upload v2 failed, multipartToken missing" - ); - } - - BlobV2UploadRequestStub.restore(); - - // ======= Initialize ====== // - wrapper = new MultiPartUploadWrapper( - { - blobVersion: "v3" as any, - catalogHrn: "mocked-catalog", - contentType: "text/plain", - handle: "mocked-datahandle", - layerId: "mocked-layer-id", - billingTag: "mocked-billingTag", - contentEncoding: "gzip" - }, - OlpClientSettingsStub - ); - - // ======== Call method. ======== // - - try { - await wrapper.upload(Buffer.from("test-data", "utf-8")); - } catch (error) { - expect(error.message).equals("Unsupported Blob version: v3"); - } - }); - }); -}); +/* + * Copyright (C) 2021-2026 HERE Europe B.V. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * License-Filename: LICENSE + */ + +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import * as core from "@here/olp-sdk-core"; +import * as BlobV1UploadRequest from "@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/BlobV1UploadRequest"; +import * as BlobV2UploadRequest from "@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/BlobV2UploadRequest"; +import { NodeFileData } from "@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/NodeFileData"; +import { BufferData } from "@here/olp-sdk-dataservice-write/lib/utils/multipartupload-internal/BufferData"; +import { MultiPartUploadWrapper } from "@here/olp-sdk-dataservice-write"; + +const OlpClientSettingsStub = {} as core.OlpClientSettings; +let wrapper: MultiPartUploadWrapper; + +describe("MultiPartUploadWrapper", async function () { + let HrnFromStringStub: any; + let requestFactoryCreateStub: any; + + beforeEach(() => { + HrnFromStringStub = vi + .spyOn(core.HRN, "fromString") + .mockReturnValue(undefined as any); + requestFactoryCreateStub = vi + .spyOn(core.RequestFactory, "create") + .mockReturnValue(undefined as any); + }); + + afterEach(() => { + HrnFromStringStub.mockRestore(); + requestFactoryCreateStub.mockRestore(); + }); + + describe("Success cases", () => { + it("Upload to Blob V1", async () => { + // ======= Prepare ====== // + + const MockedBlobV1UploadRequest = { + startMultipartUpload: vi.fn().mockResolvedValue({ + uploadPartUrl: "mocked-upload-part-url", + completeUrl: "mocked-complete-url" + }), + uploadPart: vi.fn().mockResolvedValue({ + partId: "mocked-uploaded-part-id", + partNumber: 1 + }), + completeMultipartUpload: vi.fn() + }; + + const BlobV1UploadRequestStub = vi + .spyOn(BlobV1UploadRequest, "BlobV1UploadRequest") + .mockImplementation(function () { + return MockedBlobV1UploadRequest; + }); + + // ======= Initialize ====== // + wrapper = new MultiPartUploadWrapper( + { + blobVersion: "v1", + catalogHrn: "mocked-catalog", + contentType: "text/plain", + handle: "mocked-datahandle", + layerId: "mocked-layer-id", + billingTag: "mocked-billingTag", + contentEncoding: "gzip" + }, + OlpClientSettingsStub + ); + + // ======== Call method. ======== // + + const status = await wrapper.upload( + Buffer.from("test-data", "utf-8") + ); + + expect(status).eqls(204); + + // =========== Should be called once startMultipartUpload method with correct params. ======= // + + const startMultipartUploadCalls = + MockedBlobV1UploadRequest.startMultipartUpload.mock.calls; + expect(startMultipartUploadCalls.length).eqls(1); + + const startMultipartUploadCallParams = + startMultipartUploadCalls[0][0]; + expect(startMultipartUploadCallParams.contentType).eqls( + "text/plain" + ); + expect(startMultipartUploadCallParams.handle).eqls( + "mocked-datahandle" + ); + expect(startMultipartUploadCallParams.layerId).eqls( + "mocked-layer-id" + ); + expect(startMultipartUploadCallParams.billingTag).eqls( + "mocked-billingTag" + ); + expect(startMultipartUploadCallParams.contentEncoding).eqls("gzip"); + + // =========== Should be called once uploadPart method with correct params. ======= // + + const uploadPartCalls = + MockedBlobV1UploadRequest.uploadPart.mock.calls; + expect(uploadPartCalls.length).eqls(1); + + const uploadPartCallParams = uploadPartCalls[0][0]; + expect(uploadPartCallParams.layerId).eqls("mocked-layer-id"); + expect(uploadPartCallParams.data.byteLength).eqls(9); + expect(uploadPartCallParams.multipartToken).eqls(undefined); + expect(uploadPartCallParams.billingTag).eqls("mocked-billingTag"); + expect(uploadPartCallParams.contentLength).eqls(9); + expect(uploadPartCallParams.contentType).eqls("text/plain"); + expect(uploadPartCallParams.partNumber).eqls(1); + expect(uploadPartCallParams.url).eqls("mocked-upload-part-url"); + + // =========== Should be called once completeMultipartUpload method with correct params. ======= // + + const completeMultipartUploadCalls = + MockedBlobV1UploadRequest.completeMultipartUpload.mock.calls; + expect(completeMultipartUploadCalls.length).eqls(1); + + const completeMultipartUploadCallParams = + completeMultipartUploadCalls[0][0]; + + expect(completeMultipartUploadCallParams.parts).eqls([ + { id: "mocked-uploaded-part-id", number: 1 } + ]); + expect(completeMultipartUploadCallParams.layerId).eqls( + "mocked-layer-id" + ); + expect(completeMultipartUploadCallParams.multipartToken).eqls( + undefined + ); + expect(completeMultipartUploadCallParams.billingTag).eqls( + "mocked-billingTag" + ); + expect(completeMultipartUploadCallParams.url).eqls( + "mocked-complete-url" + ); + + BlobV1UploadRequestStub.mockRestore(); + }); + + it("Upload to Blob V2", async () => { + // ======= Prepare ====== // + + const MockedBlobV2UploadRequest = { + startMultipartUpload: vi.fn().mockResolvedValue({ + multipartToken: "mocked-multipartToken" + }), + uploadPart: vi.fn().mockResolvedValue({ + partNumber: 1, + partId: "mocked-uploaded-part-id" + }), + completeMultipartUpload: vi.fn() + }; + + const BlobV2UploadRequestStub = vi + .spyOn(BlobV2UploadRequest, "BlobV2UploadRequest") + .mockImplementation(function () { + return MockedBlobV2UploadRequest; + }); + + // ======= Initialize ====== // + wrapper = new MultiPartUploadWrapper( + { + blobVersion: "v2", + catalogHrn: "mocked-catalog", + contentType: "text/plain", + handle: "mocked-key", + layerId: "mocked-layer-id", + contentEncoding: "gzip" + }, + OlpClientSettingsStub + ); + + // ======== Call method. ======== // + + const status = await wrapper.upload( + Buffer.from("test-data", "utf-8") + ); + + expect(status).eqls(204); + + // =========== Should be called once startMultipartUpload method with correct params. ======= // + + const startMultipartUploadCalls = + MockedBlobV2UploadRequest.startMultipartUpload.mock.calls; + expect(startMultipartUploadCalls.length).eqls(1); + + const startMultipartUploadCallParams = + startMultipartUploadCalls[0][0]; + expect(startMultipartUploadCallParams.contentType).eqls( + "text/plain" + ); + expect(startMultipartUploadCallParams.handle).eqls("mocked-key"); + expect(startMultipartUploadCallParams.layerId).eqls( + "mocked-layer-id" + ); + expect(startMultipartUploadCallParams.billingTag).eqls(undefined); + expect(startMultipartUploadCallParams.contentEncoding).eqls("gzip"); + + // =========== Should be called once uploadPart method with correct params. ======= // + + const uploadPartCalls = + MockedBlobV2UploadRequest.uploadPart.mock.calls; + expect(uploadPartCalls.length).eqls(1); + + const uploadPartCallParams = uploadPartCalls[0][0]; + expect(uploadPartCallParams.layerId).eqls("mocked-layer-id"); + expect(uploadPartCallParams.data.byteLength).eqls(9); + expect(uploadPartCallParams.multipartToken).eqls( + "mocked-multipartToken" + ); + expect(uploadPartCallParams.billingTag).eqls(undefined); + expect(uploadPartCallParams.contentLength).eqls(9); + expect(uploadPartCallParams.contentType).eqls("text/plain"); + expect(uploadPartCallParams.partNumber).eqls(1); + expect(uploadPartCallParams.url).eqls(undefined); + + // =========== Should be called once completeMultipartUpload method with correct params. ======= // + + const completeMultipartUploadCalls = + MockedBlobV2UploadRequest.completeMultipartUpload.mock.calls; + expect(completeMultipartUploadCalls.length).eqls(1); + + const completeMultipartUploadCallParams = + completeMultipartUploadCalls[0][0]; + + expect(completeMultipartUploadCallParams.parts).eqls([ + { id: "mocked-uploaded-part-id", number: 1 } + ]); + expect(completeMultipartUploadCallParams.layerId).eqls( + "mocked-layer-id" + ); + expect(completeMultipartUploadCallParams.multipartToken).eqls( + "mocked-multipartToken" + ); + expect(completeMultipartUploadCallParams.billingTag).eqls( + undefined + ); + expect(completeMultipartUploadCallParams.url).eqls(undefined); + + BlobV2UploadRequestStub.mockRestore(); + }); + + it("Should call callbacks if exists", async () => { + // ======= Prepare ====== // + + const MockedBlobV2UploadRequest = { + startMultipartUpload: vi.fn().mockResolvedValue({ + multipartToken: "mocked-multipartToken" + }), + uploadPart: vi.fn().mockResolvedValue({ + partNumber: 1, + partId: "mocked-uploaded-part-id" + }), + completeMultipartUpload: vi.fn() + }; + + const BlobV2UploadRequestStub = vi + .spyOn(BlobV2UploadRequest, "BlobV2UploadRequest") + .mockImplementation(function () { + return MockedBlobV2UploadRequest; + }); + + const onStart = vi.fn(); + const onStatus = vi.fn(); + const blobFinally = vi.fn(); + + class TestBlobData extends BufferData { + constructor(data: ArrayBufferLike) { + super(data); + } + + async finally() { + blobFinally(); + } + } + + // ======= Initialize ====== // + wrapper = new MultiPartUploadWrapper( + { + blobVersion: "v2", + catalogHrn: "mocked-catalog", + contentType: "text/plain", + handle: "mocked-key", + layerId: "mocked-layer-id", + contentEncoding: "gzip", + onStart, + onStatus + }, + OlpClientSettingsStub + ); + + // ======== Call method. ======== // + + const status = await wrapper.upload( + new TestBlobData(Buffer.from("test-data", "utf-8")) + ); + + expect(status).eqls(204); + + // =========== Should be called once onStart callback with correct params. ======= // + + const onStartCalls = onStart.mock.calls; + expect(onStartCalls.length).eqls(1); + + const onStartCallParams = onStartCalls[0][0]; + expect(onStartCallParams.dataSize).equals(9); + expect(onStartCallParams.multipartToken).equals( + "mocked-multipartToken" + ); + expect(onStartCallParams.multipartUrl).equals(undefined); + expect(onStartCallParams.multipartStatusUrl).equals(undefined); + + // =========== Should be called once onStatus callback with correct params. ======= // + + const onStatusCalls = onStatus.mock.calls; + expect(onStatusCalls.length).eqls(1); + + const onStatusCallsParams = onStatusCalls[0][0]; + expect(onStatusCallsParams.chunkId).equals( + "mocked-uploaded-part-id" + ); + expect(onStatusCallsParams.chunkNumber).equals(1); + expect(onStatusCallsParams.chunkSize).equals(9); + expect(onStatusCallsParams.totalChunks).equals(1); + expect(onStatusCallsParams.uploadedChunks).equals(1); + + BlobV2UploadRequestStub.mockRestore(); + }); + }); + + describe("Uploading by chunks", () => { + it("The uploaded data should be splitted by default 5MB chunks", async () => { + // ======= Prepare ====== // + + const MockedBlobV2UploadRequest = { + startMultipartUpload: vi.fn().mockResolvedValue({ + multipartToken: "mocked-multipartToken" + }), + uploadPart: vi.fn().mockResolvedValue({ + partNumber: 1, + partId: "mocked-uploaded-part-id" + }), + completeMultipartUpload: vi.fn() + }; + + const BlobV2UploadRequestStub = vi + .spyOn(BlobV2UploadRequest, "BlobV2UploadRequest") + .mockImplementation(function () { + return MockedBlobV2UploadRequest; + }); + + // ======= Initialize ====== // + wrapper = new MultiPartUploadWrapper( + { + blobVersion: "v2", + catalogHrn: "mocked-catalog", + contentType: "text/plain", + handle: "mocked-key", + layerId: "mocked-layer-id" + }, + OlpClientSettingsStub + ); + + // ======== Call method. ======== // + + const data = Buffer.alloc(33554432); // ~ 33 MB + + const status = await wrapper.upload(data); + + expect(status).eqls(204); + + // =========== Should be called once startMultipartUpload method. ======= // + + const startMultipartUploadCalls = + MockedBlobV2UploadRequest.startMultipartUpload.mock.calls; + expect(startMultipartUploadCalls.length).eqls(1); + + // =========== Should be called 7 times the uploadPart method. ======= // + + const uploadPartCalls = + MockedBlobV2UploadRequest.uploadPart.mock.calls; + expect(uploadPartCalls.length).eqls(7); + + // =========== Should be called once completeMultipartUpload method with correct params. ======= // + + const completeMultipartUploadCalls = + MockedBlobV2UploadRequest.completeMultipartUpload.mock.calls; + expect(completeMultipartUploadCalls.length).eqls(1); + + const completeMultipartUploadCallParams = + completeMultipartUploadCalls[0][0]; + + expect(completeMultipartUploadCallParams.parts).eqls([ + { id: "mocked-uploaded-part-id", number: 1 }, + { id: "mocked-uploaded-part-id", number: 1 }, + { id: "mocked-uploaded-part-id", number: 1 }, + { id: "mocked-uploaded-part-id", number: 1 }, + { id: "mocked-uploaded-part-id", number: 1 }, + { id: "mocked-uploaded-part-id", number: 1 }, + { id: "mocked-uploaded-part-id", number: 1 } + ]); + expect(completeMultipartUploadCallParams.layerId).eqls( + "mocked-layer-id" + ); + expect(completeMultipartUploadCallParams.multipartToken).eqls( + "mocked-multipartToken" + ); + expect(completeMultipartUploadCallParams.billingTag).eqls( + undefined + ); + expect(completeMultipartUploadCallParams.url).eqls(undefined); + + BlobV2UploadRequestStub.mockRestore(); + }); + + it("The uploaded data should be splitted by not default 17MB chunks", async () => { + // ======= Prepare ====== // + + const MockedBlobV2UploadRequest = { + startMultipartUpload: vi.fn().mockResolvedValue({ + multipartToken: "mocked-multipartToken" + }), + uploadPart: vi.fn().mockResolvedValue({ + partNumber: 1, + partId: "mocked-uploaded-part-id" + }), + completeMultipartUpload: vi.fn() + }; + + const BlobV2UploadRequestStub = vi + .spyOn(BlobV2UploadRequest, "BlobV2UploadRequest") + .mockImplementation(function () { + return MockedBlobV2UploadRequest; + }); + + // ======= Initialize ====== // + wrapper = new MultiPartUploadWrapper( + { + blobVersion: "v2", + chunkSizeMB: 17, + catalogHrn: "mocked-catalog", + contentType: "text/plain", + handle: "mocked-key", + layerId: "mocked-layer-id" + }, + OlpClientSettingsStub + ); + + // ======== Call method. ======== // + + const data = Buffer.alloc(33554432); // ~ 33 MB + + const status = await wrapper.upload(data); + + expect(status).eqls(204); + + // =========== Should be called once startMultipartUpload method. ======= // + + const startMultipartUploadCalls = + MockedBlobV2UploadRequest.startMultipartUpload.mock.calls; + expect(startMultipartUploadCalls.length).eqls(1); + + // =========== Should be called 2 times the uploadPart method. ======= // + + const uploadPartCalls = + MockedBlobV2UploadRequest.uploadPart.mock.calls; + expect(uploadPartCalls.length).eqls(2); + + // =========== Should be called once completeMultipartUpload method with correct params. ======= // + + const completeMultipartUploadCalls = + MockedBlobV2UploadRequest.completeMultipartUpload.mock.calls; + expect(completeMultipartUploadCalls.length).eqls(1); + + const completeMultipartUploadCallParams = + completeMultipartUploadCalls[0][0]; + + expect(completeMultipartUploadCallParams.parts).eqls([ + { id: "mocked-uploaded-part-id", number: 1 }, + { id: "mocked-uploaded-part-id", number: 1 } + ]); + expect(completeMultipartUploadCallParams.layerId).eqls( + "mocked-layer-id" + ); + expect(completeMultipartUploadCallParams.multipartToken).eqls( + "mocked-multipartToken" + ); + expect(completeMultipartUploadCallParams.billingTag).eqls( + undefined + ); + expect(completeMultipartUploadCallParams.url).eqls(undefined); + + BlobV2UploadRequestStub.mockRestore(); + }); + }); + + describe("Different inputs test", () => { + it("Upload to Blob", async () => { + // ======= Prepare ====== // + + const NodeFileDataStub = vi + .spyOn(NodeFileData, "fromPath") + .mockResolvedValue( + new BufferData(Buffer.from("test-data", "utf-8")) + ); + + const MockedBlobV2UploadRequest = { + startMultipartUpload: vi.fn().mockResolvedValue({ + multipartToken: "mocked-multipartToken" + }), + uploadPart: vi + .fn() + .mockResolvedValue({ id: "mocked-uploaded-part-id" }), + completeMultipartUpload: vi.fn() + }; + + const BlobV2UploadRequestStub = vi + .spyOn(BlobV2UploadRequest, "BlobV2UploadRequest") + .mockImplementation(function () { + return MockedBlobV2UploadRequest; + }); + + // ======= Initialize ====== // + wrapper = new MultiPartUploadWrapper( + { + blobVersion: "v2", + catalogHrn: "mocked-catalog", + contentType: "text/plain", + handle: "mocked-key", + layerId: "mocked-layer-id", + contentEncoding: "gzip" + }, + OlpClientSettingsStub + ); + + // ======== Call method. ======== // + + const status = await wrapper.upload("fake path to file"); + + expect(status).eqls(204); + + NodeFileDataStub.mockRestore(); + BlobV2UploadRequestStub.mockRestore(); + }); + }); + + describe("Unsuccessful cases", () => { + it("Not valid startMultipartResponse", async () => { + // ======= Prepare ====== // + + let MockedBlobV1UploadRequest = { + startMultipartUpload: vi.fn().mockResolvedValue({ + uploadPartUrl: "mocked-upload-part-url" + }) + }; + + let BlobV1UploadRequestStub = vi + .spyOn(BlobV1UploadRequest, "BlobV1UploadRequest") + .mockImplementation(function () { + return MockedBlobV1UploadRequest; + }); + + // ======= Initialize ====== // + wrapper = new MultiPartUploadWrapper( + { + blobVersion: "v1", + catalogHrn: "mocked-catalog", + contentType: "text/plain", + handle: "mocked-datahandle", + layerId: "mocked-layer-id", + billingTag: "mocked-billingTag", + contentEncoding: "gzip" + }, + OlpClientSettingsStub + ); + + // ======== Call method. ======== // + + try { + await wrapper.upload(Buffer.from("test-data", "utf-8")); + } catch (error) { + expect(error.message).equals( + `Missing completeUrl. Aborting upload.` + ); + } + + BlobV1UploadRequestStub.mockRestore(); + + MockedBlobV1UploadRequest = { + startMultipartUpload: vi.fn().mockResolvedValue({ + completeUrl: "mocked-complete-url" + }) + }; + + BlobV1UploadRequestStub = vi + .spyOn(BlobV1UploadRequest, "BlobV1UploadRequest") + .mockImplementation(function () { + return MockedBlobV1UploadRequest; + }); + + // ======= Initialize ====== // + wrapper = new MultiPartUploadWrapper( + { + blobVersion: "v1", + catalogHrn: "mocked-catalog", + contentType: "text/plain", + handle: "mocked-datahandle", + layerId: "mocked-layer-id", + billingTag: "mocked-billingTag", + contentEncoding: "gzip" + }, + OlpClientSettingsStub + ); + + // ======== Call method. ======== // + + try { + await wrapper.upload(Buffer.from("test-data", "utf-8")); + } catch (error) { + expect(error.message).equals( + "Missing uploadPartUrl. Aborting upload." + ); + } + + BlobV1UploadRequestStub.mockRestore(); + + MockedBlobV1UploadRequest = { + startMultipartUpload: vi.fn().mockResolvedValue({}) + }; + + BlobV1UploadRequestStub = vi + .spyOn(BlobV1UploadRequest, "BlobV1UploadRequest") + .mockImplementation(function () { + return MockedBlobV1UploadRequest; + }); + + // ======= Initialize ====== // + wrapper = new MultiPartUploadWrapper( + { + blobVersion: "v1", + catalogHrn: "mocked-catalog", + contentType: "text/plain", + handle: "mocked-datahandle", + layerId: "mocked-layer-id", + billingTag: "mocked-billingTag", + contentEncoding: "gzip" + }, + OlpClientSettingsStub + ); + + // ======== Call method. ======== // + + try { + await wrapper.upload(Buffer.from("test-data", "utf-8")); + } catch (error) { + expect(error.message).equals( + "Missing uploadPartUrl,completeUrl. Aborting upload." + ); + } + + BlobV1UploadRequestStub.mockRestore(); + + const MockedBlobV2UploadRequest = { + startMultipartUpload: vi.fn().mockResolvedValue({ + completeUrl: "mocked-complete-url" + }) + }; + + const BlobV2UploadRequestStub = vi + .spyOn(BlobV2UploadRequest, "BlobV2UploadRequest") + .mockImplementation(function () { + return MockedBlobV2UploadRequest; + }); + + // ======= Initialize ====== // + wrapper = new MultiPartUploadWrapper( + { + blobVersion: "v2", + catalogHrn: "mocked-catalog", + contentType: "text/plain", + handle: "mocked-datahandle", + layerId: "mocked-layer-id", + billingTag: "mocked-billingTag", + contentEncoding: "gzip" + }, + OlpClientSettingsStub + ); + + // ======== Call method. ======== // + + try { + await wrapper.upload(Buffer.from("test-data", "utf-8")); + } catch (error) { + expect(error.message).equals( + "Multipart upload v2 failed, multipartToken missing" + ); + } + + BlobV2UploadRequestStub.mockRestore(); + + // ======= Initialize ====== // + wrapper = new MultiPartUploadWrapper( + { + blobVersion: "v3" as any, + catalogHrn: "mocked-catalog", + contentType: "text/plain", + handle: "mocked-datahandle", + layerId: "mocked-layer-id", + billingTag: "mocked-billingTag", + contentEncoding: "gzip" + }, + OlpClientSettingsStub + ); + + // ======== Call method. ======== // + + try { + await wrapper.upload(Buffer.from("test-data", "utf-8")); + } catch (error) { + expect(error.message).equals("Unsupported Blob version: v3"); + } + }); + }); +}); diff --git a/@here/olp-sdk-dataservice-write/test/unit/NodeFileData.test.ts b/@here/olp-sdk-dataservice-write/test/unit/NodeFileData.test.ts index 1109e575..f1c44c5a 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/NodeFileData.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/NodeFileData.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 HERE Europe B.V. + * Copyright (C) 2021-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,24 +17,29 @@ * License-Filename: LICENSE */ -import * as sinon from "sinon"; -import * as chai from "chai"; +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import * as fs from "fs"; -import sinonChai = require("sinon-chai"); import { NodeFileData } from "../../lib/utils/multipartupload-internal/NodeFileData"; -chai.use(sinonChai); -const expect = chai.expect; - -describe("NodeFileData", function() { - let fsOpen: sinon.SinonStub; +describe("NodeFileData", function () { + let fsOpen: any; afterEach(() => { - fsOpen.restore(); + fsOpen.mockRestore(); }); - it("readBytes", async function() { - fsOpen = sinon.stub(fs.promises, "open").returns({ + it("readBytes", async function () { + fsOpen = vi.spyOn(fs.promises, "open").mockReturnValue({ stat: () => Promise.resolve({ size: 9 }), read: ( buffer: Buffer, @@ -56,8 +61,8 @@ describe("NodeFileData", function() { const bytes = await data.readBytes(2, 5); expect(bytes.toString()).eqls("12345"); - fsOpen.restore(); - fsOpen = sinon.stub(fs.promises, "open").returns({ + fsOpen.mockRestore(); + fsOpen = vi.spyOn(fs.promises, "open").mockReturnValue({ stat: () => Promise.resolve({ size: 9 }), read: ( buffer: Buffer, @@ -78,17 +83,17 @@ describe("NodeFileData", function() { await data2.readBytes(5, 6); }); - it("size", async function() { - fsOpen = sinon.stub(fs.promises, "open").returns({ + it("size", async function () { + fsOpen = vi.spyOn(fs.promises, "open").mockReturnValue({ stat: () => Promise.resolve({ size: 9 }) } as any); const data = await NodeFileData.fromPath("fake-filepath"); expect(data.size()).eqls(9); }); - it("closing file handle", async function() { + it("closing file handle", async function () { let closeCalls = 0; - fsOpen = sinon.stub(fs.promises, "open").returns({ + fsOpen = vi.spyOn(fs.promises, "open").mockReturnValue({ close: () => { closeCalls++; return Promise.resolve(); @@ -103,7 +108,7 @@ describe("NodeFileData", function() { expect(closeCalls).eqls(1); }); - it("negative test, catch wrong file path", async function() { + it("negative test, catch wrong file path", async function () { try { await NodeFileData.fromPath("fake-filepath"); } catch (error) { diff --git a/@here/olp-sdk-dataservice-write/test/unit/PublishSinglePartitionRequest.test.ts b/@here/olp-sdk-dataservice-write/test/unit/PublishSinglePartitionRequest.test.ts index 9de0cdaf..3dfa6c15 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/PublishSinglePartitionRequest.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/PublishSinglePartitionRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,24 +17,28 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { PublishSinglePartitionRequest } from "@here/olp-sdk-dataservice-write"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("PublishSinglePartitionRequest", function() { - it("Should initialize", function() { +describe("PublishSinglePartitionRequest", function () { + it("Should initialize", function () { const request = new PublishSinglePartitionRequest(); assert.isDefined(request); expect(request).be.instanceOf(PublishSinglePartitionRequest); }); - it("Should set and get parameters", function() { + it("Should set and get parameters", function () { const mockedPublicationId = "publication-id"; const mockedLayerId = "mocked-layer-id"; const mockedData = Buffer.from("mocked-data", "utf-8"); diff --git a/@here/olp-sdk-dataservice-write/test/unit/StartBatchRequest.test.ts b/@here/olp-sdk-dataservice-write/test/unit/StartBatchRequest.test.ts index 9f547835..9a32aba3 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/StartBatchRequest.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/StartBatchRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,24 +17,28 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { StartBatchRequest } from "@here/olp-sdk-dataservice-write"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("StartBatchRequest", function() { - it("Should initialize", function() { +describe("StartBatchRequest", function () { + it("Should initialize", function () { const request = new StartBatchRequest(); assert.isDefined(request); expect(request).be.instanceOf(StartBatchRequest); }); - it("Should set and get parameters", function() { + it("Should set and get parameters", function () { const mockedLayers = ["layer-0", "layer-1", "layer-2"]; const mockedBillingTag = "mocked-billing-tag"; const mockedVersionDependencies = [ diff --git a/@here/olp-sdk-dataservice-write/test/unit/UploadBlobRequest.test.ts b/@here/olp-sdk-dataservice-write/test/unit/UploadBlobRequest.test.ts index e230687a..5637c947 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/UploadBlobRequest.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/UploadBlobRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,24 +17,28 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { UploadBlobRequest } from "@here/olp-sdk-dataservice-write"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("UploadBlobRequest", function() { - it("Should initialize", function() { +describe("UploadBlobRequest", function () { + it("Should initialize", function () { const request = new UploadBlobRequest(); assert.isDefined(request); expect(request).be.instanceOf(UploadBlobRequest); }); - it("Should set and get parameters", function() { + it("Should set and get parameters", function () { const mockedLayerId = "mocked-layer-id"; const mockedBillingTag = "mocked-billing-tag"; const mockedContentType = "plain/text"; diff --git a/@here/olp-sdk-dataservice-write/test/unit/UploadBlobResult.test.ts b/@here/olp-sdk-dataservice-write/test/unit/UploadBlobResult.test.ts index 9f65258f..53366634 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/UploadBlobResult.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/UploadBlobResult.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,24 +17,28 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { UploadBlobResult } from "@here/olp-sdk-dataservice-write"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("UploadBlobResult", function() { - it("Should initialize", function() { +describe("UploadBlobResult", function () { + it("Should initialize", function () { const request = new UploadBlobResult(); assert.isDefined(request); expect(request).be.instanceOf(UploadBlobResult); }); - it("Should set and get parameters", function() { + it("Should set and get parameters", function () { const mockedDataHandle = "mocked-datahandle"; const request = new UploadBlobResult().withDataHandle(mockedDataHandle); expect(request.getDataHandle()).to.be.equal(mockedDataHandle); diff --git a/@here/olp-sdk-dataservice-write/test/unit/UploadPartitionsRequest.test.ts b/@here/olp-sdk-dataservice-write/test/unit/UploadPartitionsRequest.test.ts index 009e018d..37b8dcc4 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/UploadPartitionsRequest.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/UploadPartitionsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,24 +17,28 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { UploadPartitionsRequest } from "@here/olp-sdk-dataservice-write"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("UploadPartitionsRequest", function() { - it("Should initialize", function() { +describe("UploadPartitionsRequest", function () { + it("Should initialize", function () { const request = new UploadPartitionsRequest(); assert.isDefined(request); expect(request).be.instanceOf(UploadPartitionsRequest); }); - it("Should set and get parameters", function() { + it("Should set and get parameters", function () { const mockedPublicationId = "publication-id"; const mockedLayerId = "mocked-layer-id"; const mockedMetadata = { diff --git a/@here/olp-sdk-dataservice-write/test/unit/VersionedLayerClient.test.ts b/@here/olp-sdk-dataservice-write/test/unit/VersionedLayerClient.test.ts index 0268db03..881a3c97 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/VersionedLayerClient.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/VersionedLayerClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,18 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { createStubInstance } from "./stub-instance"; import { VersionedLayerClient, StartBatchRequest, @@ -31,7 +40,6 @@ import { UploadPartitionsRequest, PublishSinglePartitionRequest } from "@here/olp-sdk-dataservice-write"; -import sinon = require("sinon"); import { MetadataApi, PublishApi, @@ -39,10 +47,6 @@ import { } from "@here/olp-sdk-dataservice-api"; import { OlpClientSettings, RequestFactory, Uuid } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; class MockedHrn { constructor(private readonly hrn: string) {} toString(): string { @@ -50,63 +54,82 @@ class MockedHrn { } } -describe("VersionedLayerClient write", function() { - let sandbox: sinon.SinonSandbox; - let getVersionStub: sinon.SinonStub; - let initPublicationStub: sinon.SinonStub; - let cancelPublicationStub: sinon.SinonStub; - let getPublicationStub: sinon.SinonStub; - let submitPublicationStub: sinon.SinonStub; - let getBaseUrlRequestStub: sinon.SinonStub; - let checkBlobExistsStub: sinon.SinonStub; - let startMultipartUploadStub: sinon.SinonStub; - let doUploadPartStub: sinon.SinonStub; - let doCompleteMultipartUploadStub: sinon.SinonStub; - let uploadPartitionsStub: sinon.SinonStub; +describe("VersionedLayerClient write", function () { + let getVersionStub: any; + let initPublicationStub: any; + let cancelPublicationStub: any; + let getPublicationStub: any; + let submitPublicationStub: any; + let getBaseUrlRequestStub: any; + let checkBlobExistsStub: any; + let startMultipartUploadStub: any; + let doUploadPartStub: any; + let doCompleteMultipartUploadStub: any; + let uploadPartitionsStub: any; let settings: OlpClientSettings; - let uuidCreateStub: sinon.SinonStub; - let putDataStub: sinon.SinonStub; + let uuidCreateStub: any; + let putDataStub: any; const fakeURL = "http://fake-base.url"; const catalogHrn = new MockedHrn("hrn:here:data:::mocked-hrn") as any; - before(function() { - sandbox = sinon.createSandbox(); - }); - - beforeEach(function() { - settings = sandbox.createStubInstance(OlpClientSettings) as any; - - getVersionStub = sandbox.stub(MetadataApi, "latestVersion"); - initPublicationStub = sandbox.stub(PublishApi, "initPublication"); - cancelPublicationStub = sandbox.stub(PublishApi, "cancelPublication"); - getPublicationStub = sandbox.stub(PublishApi, "getPublication"); - submitPublicationStub = sandbox.stub(PublishApi, "submitPublication"); - checkBlobExistsStub = sandbox.stub(BlobApi, "checkBlobExistsStatus"); - uploadPartitionsStub = sandbox.stub(PublishApi, "uploadPartitions"); - uuidCreateStub = sandbox.stub(Uuid, "create"); - - startMultipartUploadStub = sandbox.stub( - BlobApi, - "startMultipartUpload" + beforeAll(function () {}); + + beforeEach(function () { + settings = createStubInstance(OlpClientSettings) as any; + + getVersionStub = vi + .spyOn(MetadataApi, "latestVersion") + .mockReturnValue(undefined as any); + initPublicationStub = vi + .spyOn(PublishApi, "initPublication") + .mockReturnValue(undefined as any); + cancelPublicationStub = vi + .spyOn(PublishApi, "cancelPublication") + .mockReturnValue(undefined as any); + getPublicationStub = vi + .spyOn(PublishApi, "getPublication") + .mockReturnValue(undefined as any); + submitPublicationStub = vi + .spyOn(PublishApi, "submitPublication") + .mockReturnValue(undefined as any); + checkBlobExistsStub = vi + .spyOn(BlobApi, "checkBlobExistsStatus") + .mockReturnValue(undefined as any); + uploadPartitionsStub = vi + .spyOn(PublishApi, "uploadPartitions") + .mockReturnValue(undefined as any); + uuidCreateStub = vi + .spyOn(Uuid, "create") + .mockReturnValue(undefined as any); + + startMultipartUploadStub = vi + .spyOn(BlobApi, "startMultipartUpload") + .mockReturnValue(undefined as any); + doUploadPartStub = vi + .spyOn(BlobApi, "doUploadPart") + .mockReturnValue(undefined as any); + doCompleteMultipartUploadStub = vi + .spyOn(BlobApi, "doCompleteMultipartUpload") + .mockReturnValue(undefined as any); + + getBaseUrlRequestStub = vi + .spyOn(RequestFactory, "getBaseUrl") + .mockReturnValue(undefined as any); + getBaseUrlRequestStub.mockImplementation(() => + Promise.resolve(fakeURL) ); - doUploadPartStub = sandbox.stub(BlobApi, "doUploadPart"); - doCompleteMultipartUploadStub = sandbox.stub( - BlobApi, - "doCompleteMultipartUpload" - ); - - getBaseUrlRequestStub = sandbox.stub(RequestFactory, "getBaseUrl"); - getBaseUrlRequestStub.callsFake(() => Promise.resolve(fakeURL)); - putDataStub = sandbox.stub(BlobApi, "putData"); + putDataStub = vi + .spyOn(BlobApi, "putData") + .mockReturnValue(undefined as any); }); - afterEach(function() { - sandbox.restore(); + afterEach(function () { + vi.restoreAllMocks(); }); - it("Should initialize", function() { + it("Should initialize", function () { const client = new VersionedLayerClient({ catalogHrn, settings @@ -116,13 +139,15 @@ describe("VersionedLayerClient write", function() { expect(client).be.instanceOf(VersionedLayerClient); }); - it("checkDataExists returns 200", async function() { + it("checkDataExists returns 200", async function () { const client = new VersionedLayerClient({ catalogHrn, settings }); - checkBlobExistsStub.callsFake(() => Promise.resolve({ status: 200 })); + checkBlobExistsStub.mockImplementation(() => + Promise.resolve({ status: 200 }) + ); const isDadaExists = await client.checkDataExists( new CheckDataExistsRequest() .withDataHandle("test-data-handle") @@ -131,13 +156,13 @@ describe("VersionedLayerClient write", function() { expect(isDadaExists.status).to.be.equal(200); }); - it("checkDataExists rejects with HttpError", async function() { + it("checkDataExists rejects with HttpError", async function () { const client = new VersionedLayerClient({ catalogHrn, settings }); - checkBlobExistsStub.callsFake(() => + checkBlobExistsStub.mockImplementation(() => Promise.reject({ status: 404, message: "Not found" }) ); const isDadaExists = await client @@ -146,12 +171,12 @@ describe("VersionedLayerClient write", function() { .withDataHandle("test-data-handle") .withLayerId("test-layer") ) - .catch(e => e); + .catch((e) => e); expect(isDadaExists.status).to.be.equal(404); expect(isDadaExists.message).to.be.equal("Not found"); }); - it("checkDataExists rejects with errors if empty params", async function() { + it("checkDataExists rejects with errors if empty params", async function () { const client = new VersionedLayerClient({ catalogHrn, settings @@ -161,7 +186,7 @@ describe("VersionedLayerClient write", function() { .checkDataExists( new CheckDataExistsRequest().withDataHandle("test-data-handle") ) - .catch(e => e); + .catch((e) => e); expect(isDadaExists.message).to.be.equal( "Please provide layer id for the CheckDataExistsRequest" @@ -171,19 +196,19 @@ describe("VersionedLayerClient write", function() { .checkDataExists( new CheckDataExistsRequest().withLayerId("test-layer") ) - .catch(e => e); + .catch((e) => e); expect(isDadaExists2.message).to.be.equal( "Please provide data handle for the CheckDataExistsRequest" ); }); - it("Should method getBaseVersion provide latest version", async function() { + it("Should method getBaseVersion provide latest version", async function () { const mockedVersion = { version: 123 }; - getVersionStub.callsFake( + getVersionStub.mockImplementation( (): Promise => { return Promise.resolve(mockedVersion); } @@ -200,8 +225,8 @@ describe("VersionedLayerClient write", function() { expect(version).to.be.equal(mockedVersion.version); }); - it("Should init the publication", async function() { - initPublicationStub.callsFake( + it("Should init the publication", async function () { + initPublicationStub.mockImplementation( (): Promise => { return Promise.resolve({ catalogId: "hrn:here:data:::mocked-hrn", @@ -233,7 +258,7 @@ describe("VersionedLayerClient write", function() { ); }); - it("Should init the publication throw an error", async function() { + it("Should init the publication throw an error", async function () { const client = new VersionedLayerClient({ catalogHrn, settings @@ -241,22 +266,24 @@ describe("VersionedLayerClient write", function() { const response = await client .startBatch(new StartBatchRequest()) - .catch(error => error.message); + .catch((error) => error.message); expect(response).to.be.equal( "Please provide layer id or ids for the StartBatchRequest" ); - getBaseUrlRequestStub.callsFake(() => Promise.reject("Server Error")); + getBaseUrlRequestStub.mockImplementation(() => + Promise.reject("Server Error") + ); const response2 = await client .startBatch(new StartBatchRequest()) - .catch(error => error.message); + .catch((error) => error.message); expect(response2).to.be.equal( 'Error retrieving from cache builder for resource "hrn:here:data:::mocked-hrn" and api: publish. Server Error' ); }); - it("Should cancel the publication", async function() { - cancelPublicationStub.callsFake(function() { + it("Should cancel the publication", async function () { + cancelPublicationStub.mockImplementation(function () { return Promise.resolve({ status: 204 }); @@ -273,8 +300,8 @@ describe("VersionedLayerClient write", function() { expect(response.status === 204).equals(true); }); - it("Should rejects with error a cancel the publication operation", async function() { - cancelPublicationStub.callsFake(function() { + it("Should rejects with error a cancel the publication operation", async function () { + cancelPublicationStub.mockImplementation(function () { return Promise.reject({ message: "Internal Server Error", status: 500 @@ -290,29 +317,31 @@ describe("VersionedLayerClient write", function() { .cancelBatch( new CancelBatchRequest().withPublicationId("mocked-pub-id") ) - .catch(error => error.message); + .catch((error) => error.message); expect(response).to.be.equals("Internal Server Error"); const response1 = await client .cancelBatch(new CancelBatchRequest()) - .catch(error => error.message); + .catch((error) => error.message); expect(response1).to.be.equals( "Please provide publication id for the CancelBatchRequest" ); - getBaseUrlRequestStub.callsFake(() => Promise.reject("Server Error")); + getBaseUrlRequestStub.mockImplementation(() => + Promise.reject("Server Error") + ); const response2 = await client .cancelBatch( new CancelBatchRequest().withPublicationId("mocked-pub-id") ) - .catch(error => error.message); + .catch((error) => error.message); expect(response2).to.be.equal( 'Error retrieving from cache builder for resource "hrn:here:data:::mocked-hrn" and api: publish. Server Error' ); }); - it("Should submit the publication", async function() { - submitPublicationStub.callsFake(function() { + it("Should submit the publication", async function () { + submitPublicationStub.mockImplementation(function () { return Promise.resolve({ status: 204 }); @@ -329,8 +358,8 @@ describe("VersionedLayerClient write", function() { expect(response.status).equals(204); }); - it("Should rejects with error a submit the publication operation", async function() { - submitPublicationStub.callsFake(function() { + it("Should rejects with error a submit the publication operation", async function () { + submitPublicationStub.mockImplementation(function () { return Promise.reject({ message: "Internal Server Error", status: 500 @@ -346,29 +375,31 @@ describe("VersionedLayerClient write", function() { .completeBatch( new CompleteBatchRequest().withPublicationId("mocked-pub-id") ) - .catch(error => error.message); + .catch((error) => error.message); expect(response).to.be.equals("Internal Server Error"); const response1 = await client .completeBatch(new CompleteBatchRequest()) - .catch(error => error.message); + .catch((error) => error.message); expect(response1).to.be.equals( "Please provide publication id for the CompleteBatchRequest" ); - getBaseUrlRequestStub.callsFake(() => Promise.reject("Server Error")); + getBaseUrlRequestStub.mockImplementation(() => + Promise.reject("Server Error") + ); const response2 = await client .cancelBatch( new CancelBatchRequest().withPublicationId("mocked-pub-id") ) - .catch(error => error.message); + .catch((error) => error.message); expect(response2).to.be.equal( 'Error retrieving from cache builder for resource "hrn:here:data:::mocked-hrn" and api: publish. Server Error' ); }); - it("Should return the publication details", async function() { - getPublicationStub.callsFake(function() { + it("Should return the publication details", async function () { + getPublicationStub.mockImplementation(function () { return Promise.resolve({ catalogId: "sdk-writing-test", catalogVersion: 37, @@ -402,8 +433,8 @@ describe("VersionedLayerClient write", function() { ); }); - it("Should rejects with error when getting the publication details", async function() { - getPublicationStub.callsFake(function() { + it("Should rejects with error when getting the publication details", async function () { + getPublicationStub.mockImplementation(function () { return Promise.reject({ message: "Internal Server Error", status: 500 @@ -417,26 +448,28 @@ describe("VersionedLayerClient write", function() { const response = await client .getBatch(new GetBatchRequest().withPublicationId("mocked-pub-id")) - .catch(error => error.message); + .catch((error) => error.message); expect(response).to.be.equals("Internal Server Error"); const response1 = await client .getBatch(new GetBatchRequest()) - .catch(error => error.message); + .catch((error) => error.message); expect(response1).to.be.equals( "Please provide publication id for the GetBatchRequest" ); - getBaseUrlRequestStub.callsFake(() => Promise.reject("Server Error")); + getBaseUrlRequestStub.mockImplementation(() => + Promise.reject("Server Error") + ); const response2 = await client .getBatch(new GetBatchRequest().withPublicationId("mocked-pub-id")) - .catch(error => error.message); + .catch((error) => error.message); expect(response2).to.be.equal( 'Error retrieving builder for resource "hrn:here:data:::mocked-hrn" and api: publish. Server Error' ); }); - it("UploadBlob", async function() { + it("UploadBlob", async function () { const data = Buffer.alloc(25000); const mockedDatahandle = "mocked-datahandle"; const mockedContentType = "text/plain"; @@ -449,7 +482,7 @@ describe("VersionedLayerClient write", function() { const layerId = "mocked-layer"; - startMultipartUploadStub.callsFake(() => + startMultipartUploadStub.mockImplementation(() => Promise.resolve({ links: { complete: { href: "http://mocked.url", method: "PUT" }, @@ -462,17 +495,17 @@ describe("VersionedLayerClient write", function() { const mockedHeaders = new Headers(); mockedHeaders.set("ETag", "mocked-etag"); - doUploadPartStub.callsFake(() => + doUploadPartStub.mockImplementation(() => Promise.resolve({ headers: mockedHeaders, status: 204 }) ); - doCompleteMultipartUploadStub.callsFake(() => + doCompleteMultipartUploadStub.mockImplementation(() => Promise.resolve({ status: 204 }) ); - putDataStub.callsFake(() => + putDataStub.mockImplementation(() => Promise.resolve({ status: 204 }) @@ -494,7 +527,7 @@ describe("VersionedLayerClient write", function() { expect(response2.getDataHandle()).equals(mockedDatahandle); }); - it("UploadBlob with content encoding gzip", async function() { + it("UploadBlob with content encoding gzip", async function () { const data = Buffer.alloc(25); const mockedDatahandle = "mocked-datahandle"; const mockedContentType = "text/plain"; @@ -508,7 +541,7 @@ describe("VersionedLayerClient write", function() { const layerId = "mocked-layer"; - putDataStub.callsFake(() => + putDataStub.mockImplementation(() => Promise.resolve({ status: 204 }) @@ -524,12 +557,12 @@ describe("VersionedLayerClient write", function() { const response = await client.uploadBlob(request); expect(response.getDataHandle()).equals(mockedDatahandle); - expect(putDataStub.args[0][1].contentEncoding).equals( + expect(putDataStub.mock.calls[0][1].contentEncoding).equals( mockedContentEncoding ); }); - it("UploadBlob should generate and return the datahandle", async function() { + it("UploadBlob should generate and return the datahandle", async function () { const data = Buffer.alloc(25000); const mockedDatahandle = "mocked-datahandle"; const mockedContentType = "text/plain"; @@ -542,7 +575,7 @@ describe("VersionedLayerClient write", function() { const layerId = "mocked-layer"; - startMultipartUploadStub.callsFake(() => + startMultipartUploadStub.mockImplementation(() => Promise.resolve({ links: { complete: { href: "http://mocked.url", method: "PUT" }, @@ -553,22 +586,24 @@ describe("VersionedLayerClient write", function() { }) ); - uuidCreateStub.callsFake(() => mockedDatahandle); - checkBlobExistsStub.callsFake(() => Promise.reject({ status: 404 })); + uuidCreateStub.mockImplementation(() => mockedDatahandle); + checkBlobExistsStub.mockImplementation(() => + Promise.reject({ status: 404 }) + ); const mockedHeaders = new Headers(); mockedHeaders.set("ETag", "mocked-etag"); - doUploadPartStub.callsFake(() => + doUploadPartStub.mockImplementation(() => Promise.resolve({ headers: mockedHeaders, status: 204 }) ); - doCompleteMultipartUploadStub.callsFake(() => + doCompleteMultipartUploadStub.mockImplementation(() => Promise.resolve({ status: 204 }) ); - putDataStub.callsFake(() => + putDataStub.mockImplementation(() => Promise.resolve({ status: 204 }) @@ -584,7 +619,7 @@ describe("VersionedLayerClient write", function() { expect(response.getDataHandle()).equals(mockedDatahandle); }); - it("UploadBlob should try to generate datahandle and return the error", async function() { + it("UploadBlob should try to generate datahandle and return the error", async function () { const data = Buffer.alloc(25000); const mockedDatahandle = "mocked-datahandle"; const mockedContentType = "text/plain"; @@ -597,7 +632,7 @@ describe("VersionedLayerClient write", function() { const layerId = "mocked-layer"; - startMultipartUploadStub.callsFake(() => + startMultipartUploadStub.mockImplementation(() => Promise.resolve({ links: { complete: { href: "http://mocked.url", method: "PUT" }, @@ -608,18 +643,20 @@ describe("VersionedLayerClient write", function() { }) ); - uuidCreateStub.callsFake(() => mockedDatahandle); - checkBlobExistsStub.callsFake(() => Promise.resolve({ status: 200 })); + uuidCreateStub.mockImplementation(() => mockedDatahandle); + checkBlobExistsStub.mockImplementation(() => + Promise.resolve({ status: 200 }) + ); const mockedHeaders = new Headers(); mockedHeaders.set("ETag", "mocked-etag"); - doUploadPartStub.callsFake(() => + doUploadPartStub.mockImplementation(() => Promise.resolve({ headers: mockedHeaders, status: 204 }) ); - doCompleteMultipartUploadStub.callsFake(() => + doCompleteMultipartUploadStub.mockImplementation(() => Promise.resolve({ status: 204 }) ); @@ -629,11 +666,11 @@ describe("VersionedLayerClient write", function() { .withContentType(mockedContentType) .withBillingTag(mockedBillingTag); - const response = await client.uploadBlob(request).catch(e => e); + const response = await client.uploadBlob(request).catch((e) => e); expect(response.message).equals("Please set DataHandle to the request"); }); - it("UploadBlob wrong parameters test", async function() { + it("UploadBlob wrong parameters test", async function () { const data = Buffer.alloc(52428800); const mockedDatahandle = "mocked-datahandle"; const mockedContentType = "text/plain"; @@ -652,7 +689,7 @@ describe("VersionedLayerClient write", function() { .withContentType(mockedContentType) .withBillingTag(mockedBillingTag); - const response = await client.uploadBlob(request).catch(e => e); + const response = await client.uploadBlob(request).catch((e) => e); expect(response.message).equals( "Please set layerId to the UploadBlobRequest" ); @@ -663,7 +700,7 @@ describe("VersionedLayerClient write", function() { .withDataHandle(mockedDatahandle) .withBillingTag(mockedBillingTag); - const response2 = await client.uploadBlob(request2).catch(e => e); + const response2 = await client.uploadBlob(request2).catch((e) => e); expect(response2.message).equals( "Please set contentType to the UploadBlobRequest" ); @@ -674,12 +711,12 @@ describe("VersionedLayerClient write", function() { .withDataHandle(mockedDatahandle) .withBillingTag(mockedBillingTag); - const response3 = await client.uploadBlob(request3).catch(e => e); + const response3 = await client.uploadBlob(request3).catch((e) => e); expect(response3.message).equals( "Please set data to the UploadBlobRequest" ); - startMultipartUploadStub.callsFake(() => + startMultipartUploadStub.mockImplementation(() => Promise.resolve({ links: { complete: { href: "http://mocked.url", method: "PUT" }, @@ -689,7 +726,9 @@ describe("VersionedLayerClient write", function() { } }) ); - doUploadPartStub.callsFake(() => Promise.reject("A some server error")); + doUploadPartStub.mockImplementation(() => + Promise.reject("A some server error") + ); const request4 = new UploadBlobRequest() .withLayerId(layerId) .withData(data) @@ -697,11 +736,11 @@ describe("VersionedLayerClient write", function() { .withContentType(mockedContentType) .withBillingTag(mockedBillingTag); - const response4 = await client.uploadBlob(request4).catch(e => e); + const response4 = await client.uploadBlob(request4).catch((e) => e); expect(response4).equals("A some server error"); }); - it("UploadBlob rejects if no ETag in header", async function() { + it("UploadBlob rejects if no ETag in header", async function () { const data = Buffer.alloc(52428800); const mockedDatahandle = "mocked-datahandle"; const mockedContentType = "text/plain"; @@ -714,7 +753,7 @@ describe("VersionedLayerClient write", function() { const layerId = "mocked-layer"; - startMultipartUploadStub.callsFake(() => + startMultipartUploadStub.mockImplementation(() => Promise.resolve({ links: { complete: { href: "http://mocked.url", method: "PUT" }, @@ -726,13 +765,13 @@ describe("VersionedLayerClient write", function() { ); const mockedHeaders = new Headers(); - doUploadPartStub.callsFake(() => + doUploadPartStub.mockImplementation(() => Promise.resolve({ headers: mockedHeaders, status: 204 }) ); - doCompleteMultipartUploadStub.callsFake(() => + doCompleteMultipartUploadStub.mockImplementation(() => Promise.resolve({ status: 204 }) ); @@ -743,13 +782,13 @@ describe("VersionedLayerClient write", function() { .withContentType(mockedContentType) .withBillingTag(mockedBillingTag); - const response = await client.uploadBlob(request).catch(e => e); + const response = await client.uploadBlob(request).catch((e) => e); expect(response.message).equals( "Error uploading chunk 1, can not read ETag from the response headers." ); }); - it("UploadBlob rejects if multipart upload not started", async function() { + it("UploadBlob rejects if multipart upload not started", async function () { const data = Buffer.alloc(52428800); const mockedDatahandle = "mocked-datahandle"; const mockedContentType = "text/plain"; @@ -762,7 +801,7 @@ describe("VersionedLayerClient write", function() { const layerId = "mocked-layer"; - startMultipartUploadStub.callsFake(() => + startMultipartUploadStub.mockImplementation(() => Promise.reject("Error starting multipart upload") ); @@ -773,11 +812,11 @@ describe("VersionedLayerClient write", function() { .withContentType(mockedContentType) .withBillingTag(mockedBillingTag); - const response = await client.uploadBlob(request).catch(e => e); + const response = await client.uploadBlob(request).catch((e) => e); expect(response).equals("Error starting multipart upload"); }); - it("UploadBlob rejects if complete multipart upload was not OK", async function() { + it("UploadBlob rejects if complete multipart upload was not OK", async function () { const data = Buffer.alloc(52428800); const mockedDatahandle = "mocked-datahandle"; const mockedContentType = "text/plain"; @@ -790,7 +829,7 @@ describe("VersionedLayerClient write", function() { const layerId = "mocked-layer"; - startMultipartUploadStub.callsFake(() => + startMultipartUploadStub.mockImplementation(() => Promise.resolve({ links: { complete: { href: "http://mocked.url", method: "PUT" }, @@ -803,13 +842,13 @@ describe("VersionedLayerClient write", function() { const mockedHeaders = new Headers(); mockedHeaders.set("ETag", "mocked-etag"); - doUploadPartStub.callsFake(() => + doUploadPartStub.mockImplementation(() => Promise.resolve({ headers: mockedHeaders, status: 204 }) ); - doCompleteMultipartUploadStub.callsFake(() => + doCompleteMultipartUploadStub.mockImplementation(() => Promise.reject("Error completing upload") ); @@ -820,11 +859,11 @@ describe("VersionedLayerClient write", function() { .withContentType(mockedContentType) .withBillingTag(mockedBillingTag); - const response = await client.uploadBlob(request).catch(e => e); + const response = await client.uploadBlob(request).catch((e) => e); expect(response).equals("Error completing upload"); }); - it("UploadPartitions", async function() { + it("UploadPartitions", async function () { const mockedPublicationId = "mocked-publication-id"; const layerId = "mocked-layer"; const mockedPartitions = { @@ -845,7 +884,9 @@ describe("VersionedLayerClient write", function() { settings }); - uploadPartitionsStub.callsFake(() => Promise.resolve({ status: 204 })); + uploadPartitionsStub.mockImplementation(() => + Promise.resolve({ status: 204 }) + ); const request = new UploadPartitionsRequest() .withLayerId(layerId) @@ -857,7 +898,7 @@ describe("VersionedLayerClient write", function() { expect(response.status).equals(204); }); - it("UploadPartitions negative", async function() { + it("UploadPartitions negative", async function () { const mockedPublicationId = "mocked-publication-id"; const layerId = "mocked-layer"; const mockedPartitions = { @@ -878,13 +919,15 @@ describe("VersionedLayerClient write", function() { settings }); - uploadPartitionsStub.callsFake(() => Promise.resolve({ status: 204 })); + uploadPartitionsStub.mockImplementation(() => + Promise.resolve({ status: 204 }) + ); const request = new UploadPartitionsRequest() .withPublicationId(mockedPublicationId) .withPartitions(mockedPartitions); - const response = await client.uploadPartitions(request).catch(e => e); + const response = await client.uploadPartitions(request).catch((e) => e); expect(response.message).equals( "Please set layerId to the UploadPartitionsRequest" ); @@ -893,7 +936,9 @@ describe("VersionedLayerClient write", function() { .withLayerId(layerId) .withPartitions(mockedPartitions); - const response2 = await client.uploadPartitions(request2).catch(e => e); + const response2 = await client + .uploadPartitions(request2) + .catch((e) => e); expect(response2.message).equals( "Please set publicationId to the UploadPartitionsRequest" ); @@ -902,13 +947,15 @@ describe("VersionedLayerClient write", function() { .withLayerId(layerId) .withPublicationId(mockedPublicationId); - const response3 = await client.uploadPartitions(request3).catch(e => e); + const response3 = await client + .uploadPartitions(request3) + .catch((e) => e); expect(response3.message).equals( "Please set partitions to the UploadPartitionsRequest" ); }); - it("publishToBatch", async function() { + it("publishToBatch", async function () { const data = Buffer.alloc(25000); const mockedDatahandle = "mocked-datahandle"; const mockedContentType = "text/plain"; @@ -921,7 +968,7 @@ describe("VersionedLayerClient write", function() { const layerId = "mocked-layer"; - startMultipartUploadStub.callsFake(() => + startMultipartUploadStub.mockImplementation(() => Promise.resolve({ links: { complete: { href: "http://mocked.url", method: "PUT" }, @@ -934,23 +981,25 @@ describe("VersionedLayerClient write", function() { const mockedHeaders = new Headers(); mockedHeaders.set("ETag", "mocked-etag"); - doUploadPartStub.callsFake(() => + doUploadPartStub.mockImplementation(() => Promise.resolve({ headers: mockedHeaders, status: 204 }) ); - doCompleteMultipartUploadStub.callsFake(() => + doCompleteMultipartUploadStub.mockImplementation(() => Promise.resolve({ status: 204 }) ); - putDataStub.callsFake(() => + putDataStub.mockImplementation(() => Promise.resolve({ status: 204 }) ); - uploadPartitionsStub.callsFake(() => Promise.resolve({ status: 204 })); + uploadPartitionsStub.mockImplementation(() => + Promise.resolve({ status: 204 }) + ); const request = new PublishSinglePartitionRequest() .withLayerId(layerId) @@ -975,7 +1024,7 @@ describe("VersionedLayerClient write", function() { expect(response2.status).equals(204); }); - it("publishToBatch wrong parameters test", async function() { + it("publishToBatch wrong parameters test", async function () { const data = Buffer.alloc(52428800); const mockedContentType = "text/plain"; const mockedBillingTag = "mocked-billing-tag"; @@ -994,7 +1043,7 @@ describe("VersionedLayerClient write", function() { .withContentType(mockedContentType) .withBillingTag(mockedBillingTag); - const response = await client.publishToBatch(request).catch(e => e); + const response = await client.publishToBatch(request).catch((e) => e); expect(response.message).equals( "Please set metadata to the PublishSinglePartitionRequest" ); @@ -1010,7 +1059,7 @@ describe("VersionedLayerClient write", function() { .withContentType(mockedContentType) .withBillingTag(mockedBillingTag); - const response2 = await client.publishToBatch(request2).catch(e => e); + const response2 = await client.publishToBatch(request2).catch((e) => e); expect(response2.message).equals( "Please set data to the PublishSinglePartitionRequest" ); @@ -1026,9 +1075,149 @@ describe("VersionedLayerClient write", function() { .withContentType(mockedContentType) .withBillingTag(mockedBillingTag); - const response3 = await client.publishToBatch(request3).catch(e => e); + const response3 = await client.publishToBatch(request3).catch((e) => e); expect(response3.message).equals( "Please set layerId to the PublishSinglePartitionRequest" ); }); + + it("publishToBatch rejects an incomplete partition description", async function () { + const data = Buffer.alloc(25000); + const layerId = "mocked-layer"; + const mockedContentType = "text/plain"; + + const client = new VersionedLayerClient({ + catalogHrn, + settings + }); + + const withoutPartition = new PublishSinglePartitionRequest() + .withLayerId(layerId) + .withData(data) + .withMetaData({ + dataSize: data.byteLength, + dataHandle: "mocked-datahandle" + } as any) + .withPublicationId("mocked-publication-id") + .withContentType(mockedContentType); + + const response = await client + .publishToBatch(withoutPartition) + .catch((e) => e); + expect(response.message).equals("Partition ID is missing"); + + const withoutPublicationId = new PublishSinglePartitionRequest() + .withLayerId(layerId) + .withData(data) + .withMetaData({ + partition: "mocked-partition", + dataSize: data.byteLength, + dataHandle: "mocked-datahandle" + }) + .withContentType(mockedContentType); + + const response2 = await client + .publishToBatch(withoutPublicationId) + .catch((e) => e); + expect(response2.message).equals( + "Please set publicationId to the PublishSinglePartitionRequest" + ); + + const withoutContentType = new PublishSinglePartitionRequest() + .withLayerId(layerId) + .withData(data) + .withMetaData({ + partition: "mocked-partition", + dataSize: data.byteLength, + dataHandle: "mocked-datahandle" + }) + .withPublicationId("mocked-publication-id"); + + const response3 = await client + .publishToBatch(withoutContentType) + .catch((e) => e); + expect(response3.message).equals( + "Please set contentType to the UploadBlobRequest" + ); + }); + + it("Should report which api the request builder could not be built for", async function () { + const client = new VersionedLayerClient({ + catalogHrn, + settings + }); + + // Every entry point names the api it failed to look up, so that a + // lookup failure can be told apart from a failure of the call itself. + getBaseUrlRequestStub.mockImplementation(() => + Promise.reject(new Error("mocked-lookup-error")) + ); + + const blobError = await client + .checkDataExists( + new CheckDataExistsRequest() + .withLayerId("mocked-layer") + .withDataHandle("mocked-datahandle") + ) + .catch((e) => e); + expect(blobError.message).contains("api: blob"); + + const metadataError = await client.getBaseVersion().catch((e) => e); + expect(metadataError).contains("api: metadata"); + + const completeError = await client + .completeBatch( + new CompleteBatchRequest().withPublicationId( + "mocked-publication-id" + ) + ) + .catch((e) => e); + expect(completeError.message).contains("api: publish"); + + const uploadError = await client + .uploadPartitions( + new UploadPartitionsRequest() + .withLayerId("mocked-layer") + .withPublicationId("mocked-publication-id") + .withPartitions({ partitions: [] }) + ) + .catch((e) => e); + expect(uploadError.message).contains("api: publish"); + }); + + it("publishToBatch fills the data size in and keeps the content encoding", async function () { + const data = Buffer.alloc(25000); + const layerId = "mocked-layer"; + + const client = new VersionedLayerClient({ + catalogHrn, + settings + }); + + putDataStub.mockImplementation(() => Promise.resolve({ status: 204 })); + uploadPartitionsStub.mockImplementation(() => + Promise.resolve({ status: 204 }) + ); + + // The metadata carries no data size, so the client has to take it from + // the data itself before the partition is published. + const request = new PublishSinglePartitionRequest() + .withLayerId(layerId) + .withData(data) + .withMetaData({ + partition: "mocked-partition", + dataHandle: "mocked-datahandle" + } as any) + .withPublicationId("mocked-publication-id") + .withContentType("text/plain") + .withContentEncoding("gzip"); + + const response = await client.publishToBatch(request); + + expect(response.status).equals(204); + expect(putDataStub.mock.calls[0][1].contentEncoding).equals("gzip"); + expect( + uploadPartitionsStub.mock.calls[0][1].body.partitions[0].dataSize + ).equals(data.byteLength); + }); }); diff --git a/@here/olp-sdk-dataservice-write/test/unit/WebData.test.ts b/@here/olp-sdk-dataservice-write/test/unit/WebData.test.ts index d53573d9..07126031 100644 --- a/@here/olp-sdk-dataservice-write/test/unit/WebData.test.ts +++ b/@here/olp-sdk-dataservice-write/test/unit/WebData.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 HERE Europe B.V. + * Copyright (C) 2021-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,14 +17,20 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { WebData } from "../../lib/utils/multipartupload-internal/WebData"; -chai.use(sinonChai); -const expect = chai.expect; - -describe("WebData", function() { +describe("WebData", function () { let mockedBlob: Blob; const mockedDataSize = 9; beforeEach(() => { @@ -41,14 +47,14 @@ describe("WebData", function() { } as any; }); - it("readBytes", async function() { + it("readBytes", async function () { const data = new WebData(mockedBlob); const bytes = await data.readBytes(2, 3); expect(bytes.byteLength).eqls(3); expect(bytes.toString()).eqls("st-"); }); - it("size", function() { + it("size", function () { const data = new WebData(mockedBlob); expect(data.size()).eqls(9); }); diff --git a/@here/olp-sdk-dataservice-write/test/unit/stub-instance.ts b/@here/olp-sdk-dataservice-write/test/unit/stub-instance.ts new file mode 100644 index 00000000..77972f51 --- /dev/null +++ b/@here/olp-sdk-dataservice-write/test/unit/stub-instance.ts @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019-2026 HERE Europe B.V. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * License-Filename: LICENSE + */ + +import { vi } from "vitest"; + +/** + * Creates a stubbed instance of a class, mirroring sinon's `createStubInstance`: + * every prototype method is replaced with a vitest mock function so tests can + * override individual methods (e.g. `.mockResolvedValue(...)`). + */ +export function createStubInstance(ctor: new (...args: any[]) => T): any { + // Use Object.create so the result passes `instanceof` checks, mirroring + // sinon's createStubInstance. + const stub: any = Object.create(ctor.prototype); + let proto = ctor.prototype; + while (proto && proto !== Object.prototype) { + for (const key of Object.getOwnPropertyNames(proto)) { + if (key === "constructor") { + continue; + } + const desc = Object.getOwnPropertyDescriptor(proto, key); + if (desc && typeof desc.value === "function") { + stub[key] = vi.fn(); + } + } + proto = Object.getPrototypeOf(proto); + } + return stub; +} diff --git a/@here/olp-sdk-dataservice-write/tsconfig.json b/@here/olp-sdk-dataservice-write/tsconfig.json index 18ddde74..a43bc5c6 100644 --- a/@here/olp-sdk-dataservice-write/tsconfig.json +++ b/@here/olp-sdk-dataservice-write/tsconfig.json @@ -2,7 +2,6 @@ "extends": "../../tsconfig.json", "include": [ "./lib", - "./test", "index.ts", "index.web.ts" ] diff --git a/@here/olp-sdk-dataservice-write/tslint.json b/@here/olp-sdk-dataservice-write/tslint.json deleted file mode 100644 index 1644f0c0..00000000 --- a/@here/olp-sdk-dataservice-write/tslint.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "extends": ["tslint:recommended", "tslint-config-prettier"], - "rules": { - "interface-name": [true, "never-prefix"], - "object-literal-sort-keys": false, - "max-classes-per-file": false, - "variable-name": [true, "check-format", "allow-leading-underscore", "allow-snake-case"], - - "arrow-return-shorthand": true, - "await-promise": true, - "ban-comma-operator": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "warn" - }, - "eofline": true, - "forin": false, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - { - "limit": 140, - "ignore-pattern": - { - "type": "string" - } - } - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-conditional-assignment": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-imports": true, - "no-duplicate-super": true, - "no-duplicate-switch-case": true, - "no-empty": false, - "no-empty-interface": false, - "no-eval": true, - "no-for-in-array": true, - "no-import-side-effect": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-inferred-empty-object-type": false, - "no-internal-module": true, - "no-invalid-template-strings": true, - "no-invalid-this": true, - "no-magic-numbers": [ - true, - -1, 0, 1, 2, - 200, 204, 400, 404, 500 - ], - "no-misused-new": true, - "no-namespace": true, - "no-non-null-assertion": false, - "no-parameter-reassignment": false, - "no-reference": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-sparse-arrays": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": false, - "no-unnecessary-initializer": true, - "no-unsafe-finally": true, - "no-unused-expression": false, - "no-var-keyword": true, - "no-var-requires": true, - "no-void-expression": true, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "only-arrow-functions": [ - false, - "allow-declarations", - "allow-named-functions" - ], - "prefer-const": true, - "promise-function-async": true, - "quotemark": [ - true, - "double" - ], - "radix": true, - "restrict-plus-operands": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] - }, - "linterOptions": { - "exclude": [ - "test/**/*.ts", - "test/integration/**/*.ts", - "@here/**/**/*.d.ts" - ] - } -} diff --git a/@here/olp-sdk-dataservice-write/vitest.config.ts b/@here/olp-sdk-dataservice-write/vitest.config.ts new file mode 100644 index 00000000..348c152d --- /dev/null +++ b/@here/olp-sdk-dataservice-write/vitest.config.ts @@ -0,0 +1,20 @@ +import { defineConfig } from "vitest/config"; +import { coverageReporters, hereAliases } from "../../vitest.shared"; + +export default defineConfig({ + resolve: { + alias: hereAliases, + // Prefer TypeScript sources over the compiled `.js` that sit next to them + // so the aliased packages resolve to a single, consistent source graph. + extensions: [".ts", ".mjs", ".js", ".mts", ".json"] + }, + test: { + include: ["test/**/*.test.ts"], + environment: "node", + coverage: { + provider: "v8", + include: ["lib/**/*.ts", "index*.ts"], + reporter: coverageReporters + } + } +}); diff --git a/@here/olp-sdk-dataservice-write/webpack.config.js b/@here/olp-sdk-dataservice-write/webpack.config.js index 91f98712..80308a2b 100644 --- a/@here/olp-sdk-dataservice-write/webpack.config.js +++ b/@here/olp-sdk-dataservice-write/webpack.config.js @@ -1,5 +1,4 @@ const path = require("path"); -const TerserPlugin = require("terser-webpack-plugin"); module.exports = env => { const isProd = env.NODE_ENV === "production"; @@ -13,14 +12,10 @@ module.exports = env => { }, entry: "./index.web.js", output: { - filename: `bundle.umd${isProd ? '.min' : '.dev'}.js`, + filename: `bundle.umd${isProd ? ".min" : ".dev"}.js`, path: path.resolve(__dirname), libraryTarget: "umd", - globalObject: 'this' - }, - optimization: { - minimize: true, - minimizer: [new TerserPlugin()], + globalObject: "this" } }; }; diff --git a/@here/olp-sdk-fetch/.prettierrc.json b/@here/olp-sdk-fetch/.prettierrc.json deleted file mode 100644 index ab28f3ed..00000000 --- a/@here/olp-sdk-fetch/.prettierrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "tabWidth": 4 -} \ No newline at end of file diff --git a/@here/olp-sdk-fetch/package.json b/@here/olp-sdk-fetch/package.json index 4a15f3ab..cf3f615d 100644 --- a/@here/olp-sdk-fetch/package.json +++ b/@here/olp-sdk-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@here/olp-sdk-fetch", - "version": "2.0.0", + "version": "3.0.0", "description": "Adds a subset of the fetch API for Node.js", "main": "index.js", "browser": "index.web.js", @@ -10,32 +10,13 @@ }, "scripts": { "build": "tsc", - "lint": "tslint -c tslint.json -p tsconfig.json", - "test": "tsc -p ./test/tsconfig.json && mocha", - "coverage": "nyc npm run test", - "codecov": "npm run coverage && nyc report --reporter=lcov", - "prepare": "tsc --sourceMap false && npm run bundle", + "lint": "eslint .", + "test": "vitest run", + "coverage": "vitest run --coverage", + "prepack": "tsc --sourceMap false && npm run bundle", "bundle": "npm run bundle:dev && npm run bundle:prod", - "bundle:prod": "webpack --env.NODE_ENV=production", - "bundle:dev": "webpack --env.NODE_ENV=development" - }, - "nyc": { - "include": [ - "*.ts", - "*.js" - ], - "extension": [ - ".ts" - ], - "require": [ - "ts-node/register" - ], - "reporter": [ - "text", - "html" - ], - "sourceMap": true, - "instrument": true + "bundle:prod": "webpack --env NODE_ENV=production", + "bundle:dev": "webpack --env NODE_ENV=development" }, "repository": { "type": "git", @@ -47,32 +28,7 @@ "url": "https://here.com" }, "license": "Apache-2.0", - "devDependencies": { - "@types/chai": "^4.2.7", - "@types/mocha": "^5.2.7", - "@types/node": "18.7.14", - "@types/sinon": "7.0.3", - "@types/sinon-chai": "^3.2.3", - "chai": "^4.2.0", - "glob": "^7.1.6", - "husky": "^3.1.0", - "lint-staged": "^9.5.0", - "mocha": "^6.2.2", - "nyc": "^15.0.0", - "prettier": "^1.19.1", - "sinon": "7.4.2", - "sinon-chai": "^3.4.0", - "source-map-support": "^0.5.16", - "ts-node": "10.9.2", - "tslint": "^6.1.3", - "tslint-config-prettier": "^1.18.0", - "typedoc": "^0.22.13", - "typescript": "4.0.3", - "webpack": "^4.46.0", - "webpack-cli": "^3.3.10", - "terser-webpack-plugin": "^1.4.5" - }, "engines": { - "node": ">= 18.0.0" + "node": ">= 24.0.0" } } diff --git a/@here/olp-sdk-fetch/test/Fetch.test.ts b/@here/olp-sdk-fetch/test/Fetch.test.ts index ad9b2db0..ba48f876 100644 --- a/@here/olp-sdk-fetch/test/Fetch.test.ts +++ b/@here/olp-sdk-fetch/test/Fetch.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,32 +17,42 @@ * License-Filename: LICENSE */ -import { assert } from "chai"; +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import * as path from "path"; import "../index"; const isNode = typeof window === "undefined"; -const describeOnlyNode = isNode ? describe : xdescribe; +const describeOnlyNode = isNode ? describe : describe.skip; -describe("@here/olp-sdk-fetch", function() { - it("fetch", function() { +describe("@here/olp-sdk-fetch", function () { + it("fetch", function () { assert.isFunction(fetch); }); - it("headers", function() { + it("headers", function () { const headers = new Headers(); headers.append("testName", "testValue"); assert.strictEqual(headers.get("testName"), "testValue"); }); - it("AbortController", function() { + it("AbortController", function () { const abortController = new AbortController(); const signal = abortController.signal; assert.isFalse(signal.aborted); }); - describeOnlyNode("global.fetch file support (node.js)", function() { + describeOnlyNode("global.fetch file support (node.js)", function () { function getRelativeResourcePath(filePath: string) { return path.relative( process.cwd(), @@ -50,7 +60,7 @@ describe("@here/olp-sdk-fetch", function() { ); } - it("loads binaries", async function() { + it("loads binaries", async function () { const testPath = getRelativeResourcePath("resources/test.bin"); const response = await fetch(testPath); assert(response.ok); @@ -63,7 +73,7 @@ describe("@here/olp-sdk-fetch", function() { assert.equal(resultBytes[2], 3); assert.equal(resultBytes[3], 4); }); - it("loads json", async function() { + it("loads json", async function () { const testPath = getRelativeResourcePath("resources/test.json"); const response = await fetch(testPath); assert(response.ok); @@ -71,5 +81,57 @@ describe("@here/olp-sdk-fetch", function() { assert(jsonFromFile); assert.equal(jsonFromFile.message, "Test message"); }); + + it("loads text", async function () { + const testPath = getRelativeResourcePath("resources/test.json"); + const response = await fetch(testPath); + assert(response.ok); + const textFromFile = await response.text(); + assert.equal(JSON.parse(textFromFile).message, "Test message"); + }); + + it("loads the raw buffer", async function () { + const testPath = getRelativeResourcePath("resources/test.bin"); + const response = await fetch(testPath); + // `buffer()` is the node-fetch accessor, which the wrapper keeps + // for callers written against it and `Response` does not declare. + const bufferResult = await ( + response as unknown as { buffer(): Promise } + ).buffer(); + assert.equal(bufferResult.byteLength, 4); + }); + + it("takes the url of a request object", async function () { + const response = await fetch( + new Request( + `file://${path.resolve(__dirname, "resources/test.json")}` + ) + ); + assert(response.ok); + assert.equal((await response.json()).message, "Test message"); + }); + + it("clones the response", async function () { + const testPath = getRelativeResourcePath("resources/test.json"); + const response = await fetch(testPath); + const clone = response.clone(); + assert.notStrictEqual(clone, response); + assert.equal(clone.url, response.url); + }); + + it("rejects when the file does not exist", async function () { + const testPath = getRelativeResourcePath("resources/no-such-file"); + await expect(fetch(testPath)).rejects.toThrow( + /failed to read file/ + ); + }); + + it("hands anything that is not a file over to fetch", async function () { + // A data URL keeps the assertion offline while still leaving the + // `file:` branch of the wrapper. + const response = await fetch("data:text/plain,Test message"); + assert(response.ok); + assert.equal(await response.text(), "Test message"); + }); }); }); diff --git a/@here/olp-sdk-fetch/test/mocha.opts b/@here/olp-sdk-fetch/test/mocha.opts deleted file mode 100644 index a38909c5..00000000 --- a/@here/olp-sdk-fetch/test/mocha.opts +++ /dev/null @@ -1,8 +0,0 @@ ---require ts-node/register ---require source-map-support/register ---full-trace ---bail ---check-leaks ---reporter xunit ---reporter-option output=xunit.xml -test/**/*.test.ts \ No newline at end of file diff --git a/@here/olp-sdk-fetch/test/tsconfig.json b/@here/olp-sdk-fetch/test/tsconfig.json index 67b930c6..cb5bfb67 100644 --- a/@here/olp-sdk-fetch/test/tsconfig.json +++ b/@here/olp-sdk-fetch/test/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../tsconfig.json", "compilerOptions": { - "importHelpers": true - } + "importHelpers": true, + "noImplicitAny": false + }, + "include": ["../lib/**/*.ts", "../index*.ts", "./**/*.ts"] } diff --git a/@here/olp-sdk-fetch/tsconfig.json b/@here/olp-sdk-fetch/tsconfig.json index f11142ef..41cd64c0 100644 --- a/@here/olp-sdk-fetch/tsconfig.json +++ b/@here/olp-sdk-fetch/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.json", "include": [ - "./test", "index.ts", "index.web.ts" ] diff --git a/@here/olp-sdk-fetch/tslint.json b/@here/olp-sdk-fetch/tslint.json deleted file mode 100644 index 1644f0c0..00000000 --- a/@here/olp-sdk-fetch/tslint.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "extends": ["tslint:recommended", "tslint-config-prettier"], - "rules": { - "interface-name": [true, "never-prefix"], - "object-literal-sort-keys": false, - "max-classes-per-file": false, - "variable-name": [true, "check-format", "allow-leading-underscore", "allow-snake-case"], - - "arrow-return-shorthand": true, - "await-promise": true, - "ban-comma-operator": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "warn" - }, - "eofline": true, - "forin": false, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - { - "limit": 140, - "ignore-pattern": - { - "type": "string" - } - } - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-conditional-assignment": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-imports": true, - "no-duplicate-super": true, - "no-duplicate-switch-case": true, - "no-empty": false, - "no-empty-interface": false, - "no-eval": true, - "no-for-in-array": true, - "no-import-side-effect": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-inferred-empty-object-type": false, - "no-internal-module": true, - "no-invalid-template-strings": true, - "no-invalid-this": true, - "no-magic-numbers": [ - true, - -1, 0, 1, 2, - 200, 204, 400, 404, 500 - ], - "no-misused-new": true, - "no-namespace": true, - "no-non-null-assertion": false, - "no-parameter-reassignment": false, - "no-reference": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-sparse-arrays": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": false, - "no-unnecessary-initializer": true, - "no-unsafe-finally": true, - "no-unused-expression": false, - "no-var-keyword": true, - "no-var-requires": true, - "no-void-expression": true, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "only-arrow-functions": [ - false, - "allow-declarations", - "allow-named-functions" - ], - "prefer-const": true, - "promise-function-async": true, - "quotemark": [ - true, - "double" - ], - "radix": true, - "restrict-plus-operands": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] - }, - "linterOptions": { - "exclude": [ - "test/**/*.ts", - "test/integration/**/*.ts", - "@here/**/**/*.d.ts" - ] - } -} diff --git a/@here/olp-sdk-fetch/vitest.config.ts b/@here/olp-sdk-fetch/vitest.config.ts new file mode 100644 index 00000000..769b27a2 --- /dev/null +++ b/@here/olp-sdk-fetch/vitest.config.ts @@ -0,0 +1,21 @@ +import { defineConfig } from "vitest/config"; +import { coverageReporters } from "../../vitest.shared"; + +export default defineConfig({ + resolve: { + // Prefer TypeScript sources over the compiled `.js` that `npm run build` + // leaves next to them. Without this the tests exercise the compiled + // output while `coverage.include` points at `.ts`, so the package + // reports no coverage at all. + extensions: [".ts", ".mjs", ".js", ".mts", ".json"] + }, + test: { + include: ["test/**/*.test.ts"], + environment: "node", + coverage: { + provider: "v8", + include: ["lib/**/*.ts", "index*.ts"], + reporter: coverageReporters + } + } +}); diff --git a/@here/olp-sdk-fetch/webpack.config.js b/@here/olp-sdk-fetch/webpack.config.js index 91f98712..80308a2b 100644 --- a/@here/olp-sdk-fetch/webpack.config.js +++ b/@here/olp-sdk-fetch/webpack.config.js @@ -1,5 +1,4 @@ const path = require("path"); -const TerserPlugin = require("terser-webpack-plugin"); module.exports = env => { const isProd = env.NODE_ENV === "production"; @@ -13,14 +12,10 @@ module.exports = env => { }, entry: "./index.web.js", output: { - filename: `bundle.umd${isProd ? '.min' : '.dev'}.js`, + filename: `bundle.umd${isProd ? ".min" : ".dev"}.js`, path: path.resolve(__dirname), libraryTarget: "umd", - globalObject: 'this' - }, - optimization: { - minimize: true, - minimizer: [new TerserPlugin()], + globalObject: "this" } }; }; diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b82a9e0..b321b113 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## v3.0.0 (2026) + +- Discontinued support of Node.js versions less than 24.x. +- Migrated the monorepo from Lerna and Yarn workspaces to npm workspaces. +- Replaced the deprecated TSLint with ESLint (`typescript-eslint`). +- Migrated the test suites from Mocha, Chai and Sinon to Vitest. +- Upgraded the build tooling to TypeScript 5, webpack 5, Prettier 3 and Husky 9. +- Removed unused and deprecated development dependencies to reduce the security surface. + ## v2.0.0 (10/05/2024) - Discontinued support of Node.js versions less than 18.x. diff --git a/README.md b/README.md index 5dadfe1b..4fd8893d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ To learn how to install and use the Data SDK, see the Build Status | +| Build/Test/Bundling/Typedoc | Node 24 (LTS) | Build Status | ### Test coverage diff --git a/docs/GettingStartedGuide.md b/docs/GettingStartedGuide.md index a6ca7208..857549ed 100644 --- a/docs/GettingStartedGuide.md +++ b/docs/GettingStartedGuide.md @@ -67,17 +67,14 @@ To learn how to use the Data SDK, see the npm) -- Node.js 18+ (for installation instructions, see Node.js) - -> #### Note -> As an alternative to npm, you can use Yarn. For installation instructions, see [Yarn documentation](https://yarnpkg.com/getting-started/install). +- Node.js 24+ (for installation instructions, see Node.js) #### Download dependencies -To bootstrap the packages in the current Lerna repository, install all interdependent packages, and link any cross-dependencies, run the following command: +The repository uses npm workspaces. To install all interdependent packages and link any cross-dependencies, run the following command in the repository root: ```sh -yarn install && yarn bootstrap +npm install ``` ### Build the SDK diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..cb9782c7 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,51 @@ +// @ts-check +import js from "@eslint/js"; +import tseslint from "typescript-eslint"; +import prettier from "eslint-config-prettier"; + +export default tseslint.config( + { + // Only the published TypeScript sources are linted. Tests, generated + // declaration files, compiled bundles, examples and docs are excluded, + // mirroring the previous TSLint `linterOptions.exclude` configuration. + ignores: [ + "**/node_modules/**", + "**/dist/**", + "**/*.js", + "**/*.mjs", + "**/*.d.ts", + "**/test/**", + "tests/**", + "examples/**", + "docs/**" + ] + }, + js.configs.recommended, + ...tseslint.configs.recommended, + prettier, + { + files: ["@here/**/*.ts"], + rules: { + // The SDK sources predate strict typescript-eslint defaults; relax + // the rules that would otherwise flood the migration with churn + // while keeping the genuinely useful checks as errors. + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-empty-object-type": "off", + "@typescript-eslint/no-this-alias": "off", + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/no-require-imports": "off", + // Rules not enforced by the previous TSLint configuration; keep the + // existing code patterns (e.g. `cb && cb()` short-circuit calls, + // `obj.hasOwnProperty(...)`) working without churn. + "@typescript-eslint/no-unused-expressions": "off", + "no-prototype-builtins": "off", + "no-case-declarations": "off", + "@typescript-eslint/ban-ts-comment": "warn", + "@typescript-eslint/no-unused-vars": [ + "warn", + { argsIgnorePattern: "^_", varsIgnorePattern: "^_" } + ] + } + } +); diff --git a/examples/authorization-example/package.json b/examples/authorization-example/package.json index 2d5f1b09..d662f583 100644 --- a/examples/authorization-example/package.json +++ b/examples/authorization-example/package.json @@ -7,11 +7,11 @@ }, "devDependencies": { "webpack-dev-server": "^3.11.0", - "@here/olp-sdk-authentication": "2.0.0", - "@here/olp-sdk-dataservice-api": "2.0.0", + "@here/olp-sdk-authentication": "3.0.0", + "@here/olp-sdk-dataservice-api": "3.0.0", "copy-webpack-plugin": "^6.3.1", "ts-loader": "^8.0.11", - "typescript": "^4.0.5", + "typescript": "^5.7.3", "webpack": "^5.5.1", "webpack-cli": "^4.2.0" } diff --git a/examples/nodejs-example/package.json b/examples/nodejs-example/package.json index 847dc81a..1d35fb45 100644 --- a/examples/nodejs-example/package.json +++ b/examples/nodejs-example/package.json @@ -19,13 +19,13 @@ "license": "Apache-2.0", "private": true, "devDependencies": { - "@types/node": "^18.7.14", + "@types/node": "^24.0.0", "@types/yargs": "^15.0.9", - "typescript": "^4.0.5" + "typescript": "^5.7.3" }, "dependencies": { - "@here/olp-sdk-authentication": "2.0.0", - "@here/olp-sdk-dataservice-read": "2.0.0", + "@here/olp-sdk-authentication": "3.0.0", + "@here/olp-sdk-dataservice-read": "3.0.0", "yargs": "^16.1.0" } } diff --git a/examples/react-app-example/README.md b/examples/react-app-example/README.md index bea38ecc..10160eef 100644 --- a/examples/react-app-example/README.md +++ b/examples/react-app-example/README.md @@ -8,9 +8,9 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo For more information, see the [related section](https://www.here.com/docs/bundle/data-sdk-for-typescript-developer-guide/page/docs/GettingStartedGuide.html) in our Developer Guide. -2. To fetch dependencies, run `yarn && yarn add react-scripts`. +2. To fetch dependencies, run `npm install && npm install react-scripts`. -3. To run the app in the development mode, run `yarn start`. +3. To run the app in the development mode, run `npm start`. 4. In your favorite browser, open `http://localhost:3000`. @@ -18,13 +18,13 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo In the project directory, you can run the following scripts: -- `yarn start` – runs the app in the development mode.\ +- `npm start` – runs the app in the development mode.\ To view it in the browser, open [http://localhost:3000](http://localhost:3000). The page reloads if you make edits.\ You will also see no lint errors in the console. -- `yarn build` – builds the app for production in the `build` folder.\ +- `npm run build` – builds the app for production in the `build` folder.\ It correctly bundles React in the production mode and optimizes the build for the best performance. The build is minified, and the filenames include hashes.\ diff --git a/examples/react-app-example/package.json b/examples/react-app-example/package.json index ae2a0f5f..c73f99ed 100644 --- a/examples/react-app-example/package.json +++ b/examples/react-app-example/package.json @@ -3,11 +3,11 @@ "version": "0.1.0", "private": true, "devDependencies": { - "@here/olp-sdk-authentication": "2.0.0", - "@here/olp-sdk-core": "2.0.0", - "@here/olp-sdk-dataservice-read": "2.0.0", - "@here/olp-sdk-dataservice-write": "2.0.0", - "@types/node": "^18.7.14", + "@here/olp-sdk-authentication": "3.0.0", + "@here/olp-sdk-core": "3.0.0", + "@here/olp-sdk-dataservice-read": "3.0.0", + "@here/olp-sdk-dataservice-write": "3.0.0", + "@types/node": "^24.0.0", "@types/react": "^16.9.53", "@types/react-dom": "^16.9.8", "@types/react-router-dom": "^5.1.6", diff --git a/lerna.json b/lerna.json deleted file mode 100644 index 631c7197..00000000 --- a/lerna.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "packages": [ - "@here/**" - ], - "npmClient": "yarn", - "useWorkspaces": true, - "version": "independent" -} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..f6607ef9 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,5093 @@ +{ + "name": "@here/olp-sdk-ts", + "version": "3.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@here/olp-sdk-ts", + "version": "3.0.0", + "license": "Apache-2.0", + "workspaces": [ + "@here/*" + ], + "devDependencies": { + "@eslint/js": "^10.0.1", + "@types/node": "^24.0.0", + "@vitest/coverage-v8": "^4.1.10", + "eslint": "^10.8.0", + "eslint-config-prettier": "^10.1.8", + "fetch-mock": "^12.6.0", + "husky": "^9.1.7", + "lint-staged": "^17.2.0", + "mockserver-client": "^7.4.0", + "mockserver-node": "^7.4.0", + "prettier": "^3.4.2", + "puppeteer": "^25.4.0", + "typedoc": "^0.28.20", + "typescript": "~5.8.3", + "typescript-eslint": "^8.65.0", + "vitest": "^4.1.10", + "webpack": "^5.109.1", + "webpack-cli": "^7.2.1" + }, + "engines": { + "node": ">= 24.0.0" + } + }, + "@here/olp-sdk-authentication": { + "version": "3.0.0", + "license": "Apache-2.0", + "dependencies": { + "@here/olp-sdk-core": "^3.0.0", + "@here/olp-sdk-fetch": "^3.0.0" + }, + "bin": { + "olp-sdk-authentication": "oauth-requester" + }, + "engines": { + "node": ">= 24.0.0" + } + }, + "@here/olp-sdk-core": { + "version": "3.0.0", + "license": "Apache-2.0", + "dependencies": { + "@here/olp-sdk-dataservice-api": "^3.0.0", + "@here/olp-sdk-fetch": "^3.0.0" + }, + "engines": { + "node": ">= 24.0.0" + } + }, + "@here/olp-sdk-dataservice-api": { + "version": "3.0.0", + "license": "Apache-2.0", + "engines": { + "node": ">= 24.0.0" + } + }, + "@here/olp-sdk-dataservice-read": { + "version": "3.0.0", + "license": "Apache-2.0", + "dependencies": { + "@here/olp-sdk-core": "^3.0.0", + "@here/olp-sdk-dataservice-api": "^3.0.0", + "@here/olp-sdk-fetch": "^3.0.0" + }, + "engines": { + "node": ">= 24.0.0" + } + }, + "@here/olp-sdk-dataservice-write": { + "version": "3.0.0", + "license": "Apache-2.0", + "dependencies": { + "@here/olp-sdk-core": "^3.0.0", + "@here/olp-sdk-dataservice-api": "^3.0.0", + "@here/olp-sdk-fetch": "^3.0.0" + }, + "engines": { + "node": ">= 24.0.0" + } + }, + "@here/olp-sdk-fetch": { + "version": "3.0.0", + "license": "Apache-2.0", + "engines": { + "node": ">= 24.0.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz", + "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.7" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz", + "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz", + "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-1.1.0.tgz", + "integrity": "sha512-Xc3VhU02wqZ1HvHRJUwL09HkZSTvidqY5Ya0NXBSYOxAp+Ln9dcJr9fySI+CkONzP3PekQo9WdzCv0PGER/mOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.17.0" + } + }, + "node_modules/@emnapi/core": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", + "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.2", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", + "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", + "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^10.2.4" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", + "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.2.tgz", + "integrity": "sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@gerrit0/mini-shiki": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.23.0.tgz", + "integrity": "sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/engine-oniguruma": "^3.23.0", + "@shikijs/langs": "^3.23.0", + "@shikijs/themes": "^3.23.0", + "@shikijs/types": "^3.23.0", + "@shikijs/vscode-textmate": "^10.0.2" + } + }, + "node_modules/@here/olp-sdk-authentication": { + "resolved": "@here/olp-sdk-authentication", + "link": true + }, + "node_modules/@here/olp-sdk-core": { + "resolved": "@here/olp-sdk-core", + "link": true + }, + "node_modules/@here/olp-sdk-dataservice-api": { + "resolved": "@here/olp-sdk-dataservice-api", + "link": true + }, + "node_modules/@here/olp-sdk-dataservice-read": { + "resolved": "@here/olp-sdk-dataservice-read", + "link": true + }, + "node_modules/@here/olp-sdk-dataservice-write": { + "resolved": "@here/olp-sdk-dataservice-write", + "link": true + }, + "node_modules/@here/olp-sdk-fetch": { + "resolved": "@here/olp-sdk-fetch", + "link": true + }, + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz", + "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.139.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.139.0.tgz", + "integrity": "sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@puppeteer/browsers": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-3.0.6.tgz", + "integrity": "sha512-B/gKoqlFkzhvzsI6jo9K1cZz9o5ypviVv/xu8CwA4grZzyVwN+XfkT+tu8T1zrauuEXv6VhS2oGX+6NL95WcKA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "modern-tar": "^0.7.6", + "yargs": "^18.0.0" + }, + "bin": { + "browsers": "lib/main-cli.js" + }, + "engines": { + "node": ">=22.12.0" + }, + "peerDependencies": { + "proxy-agent": ">=8.0.1", + "yauzl": "^2.10.0 || ^3.4.0" + }, + "peerDependenciesMeta": { + "proxy-agent": { + "optional": true + }, + "yauzl": { + "optional": true + } + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.5.tgz", + "integrity": "sha512-lZg8fqIv2v7FF237bwMgzGZEJvGL79/s5knJ/i6FmsGF4XXlzccZ4jb+TrFIxtSSxFtIpdsgrPZeMk1I9AFcyQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.5.tgz", + "integrity": "sha512-51Bnx9pNiMRKSUNtBfySkNJ9vMU9Hh3I1ozDd6gyPPYzaXCfnptUcEZxXGYFn+ul2dtcMUiqGR1Yai2K10uoTw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.5.tgz", + "integrity": "sha512-Tm+gbfC0aHu1tBA/JvKQh32S0K6YgCHkiAF4/W6xX0K0RmNuc94VeK419dJoE65R5aRxmo+noZQSWrAMF6yb6g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.5.tgz", + "integrity": "sha512-JMzDKCCXq93YccG5gz3hvOs1oXRKAf0XYpfOS88e+wZrC8Iugj6j68867vrYZkvpDDpKn/KoKORThmchMpF6TA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.5.tgz", + "integrity": "sha512-uML21j2K5TfPGutKxub+M+nLjZIrWjXQ5Grx4lCe/nimTj9B4L63zHpjXLl4y0L3mcm2htEQIb06oCG/szerNw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.5.tgz", + "integrity": "sha512-navSiuTMogvnQoZoM/v+l3ZWo50/NTwSHSzheABx/RCnmUPaKwq9qSo4Br2OYRs21+Fz8uFqITZM3H4opOB0/Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.5.tgz", + "integrity": "sha512-lAryqH7IteztmCXQXk0etKj4wBQ7Gx5S6LjKhsgp9zb8I5bsuvU/2llH1hDQcjsFeqIsovMVN339/8pUDDBXxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.5.tgz", + "integrity": "sha512-fsK/sNBnxzBlL4O1JNrZakVQxPspqpED5dLtNsZS9oOKmtSpdNIzxH2kkol5HYTWJN47sE20ztMJPxfZ89qGOg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.5.tgz", + "integrity": "sha512-gLYb4BIadlfTOYT5gO503n8zQjXflgzpD0FcyKh0Mzx3rqCZKnHoJWV9xe1KXUJ5lx2JfcSHr/mhzS0PC/McAA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.5.tgz", + "integrity": "sha512-FjcpEKUyJygHgs1o50VYNvkt5+7Le/VEdYt0AkRpkL33MnyQfwr8l5mXwMmfmTbyMPr5vJLC+8/Gd9gXnwU1QQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.5.tgz", + "integrity": "sha512-Me+PfPI2TMeOQk0gYWfLQZtTktrmzbr8cDboqX83XKc7UrgAi55gF+2dUkWdxd19n55Essp2yeca+O9N5rBxHg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.5.tgz", + "integrity": "sha512-yc5WrLzXks6zCQfn9Oxr8pORKyl/pF+QjHmW/Qx3qu0oyrrNC+y2JLTU1E2rcWYAmzlnqngWXHQjy51VzW70Vw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.5.tgz", + "integrity": "sha512-VbQGPX2b4r48TAMIM2cjgluIM1HYutm4pcTEJsle7iEP7sB1dFqtPLBVbdLAZCxy1txCcPxf4QFf4v8uvltPqA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.11.1", + "@emnapi/runtime": "1.11.1", + "@napi-rs/wasm-runtime": "^1.1.6" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.5.tgz", + "integrity": "sha512-gHv82k63z4qpV5+Q1y/12KrK0ltWBukVDI8nZcbT7Tt/ZlOIVwppazneq0F93oDxTo3IgAMEDIoQh3E2n6mVsw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.5.tgz", + "integrity": "sha512-tTZuDBPw85tEN5PQi1pnEBzDy0Z49HtScLAbD5t6hyeU92A95pRWaSMw1GZZi/RwgSgUIl0xrSlXIT/9QzvYSA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.23.0.tgz", + "integrity": "sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.23.0", + "@shikijs/vscode-textmate": "^10.0.2" + } + }, + "node_modules/@shikijs/langs": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.23.0.tgz", + "integrity": "sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.23.0" + } + }, + "node_modules/@shikijs/themes": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.23.0.tgz", + "integrity": "sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.23.0" + } + }, + "node_modules/@shikijs/types": { + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.23.0.tgz", + "integrity": "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.4" + } + }, + "node_modules/@shikijs/vscode-textmate": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", + "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", + "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/glob-to-regexp": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@types/glob-to-regexp/-/glob-to-regexp-0.4.4.tgz", + "integrity": "sha512-nDKoaKJYbnn1MZxUY0cA1bPmmgZbg0cTq7Rh13d0KWYNOiKbqoR+2d89SnRPszGh7ROzSwZ/GOjZ4jPbmmZ6Eg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/hast": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.5.tgz", + "integrity": "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "24.13.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.3.tgz", + "integrity": "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.18.0" + } + }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.65.0.tgz", + "integrity": "sha512-IEgob78X12rHpUmtcwFsXhZdVGJtwTVP8FiCLZkR6GlYVrl2PcuB+KhCE5BlVC/eQpQnu8WXRtkHZuPar+gCRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.65.0", + "@typescript-eslint/type-utils": "8.65.0", + "@typescript-eslint/utils": "8.65.0", + "@typescript-eslint/visitor-keys": "8.65.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.65.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz", + "integrity": "sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.65.0.tgz", + "integrity": "sha512-CZ4nMxWwgu1HEEFNkeaCptra9QCtkmKdgf3sWh1rl1trIhmxLilgTV4cwcbQ4wemnT4sWQN8CaKOmdYx+g2gMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.65.0", + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/typescript-estree": "8.65.0", + "@typescript-eslint/visitor-keys": "8.65.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.65.0.tgz", + "integrity": "sha512-SxnPhbTsGahizDgbu7oqFH/xVtzIqMd/s+WtnSxNxJZJpLbdT5IPdzg8EZxO3+PoKahXmwJLeNQOpKJb3/bi7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.65.0", + "@typescript-eslint/types": "^8.65.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.65.0.tgz", + "integrity": "sha512-Esbl8OSYiVxBokYgWPf7VVWg/BE798wXhimnn9ML9Pt5qoDf8bfQlgjlKXR/k98+AcNzlLKYrpCcrcuZ9DZLgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/visitor-keys": "8.65.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.65.0.tgz", + "integrity": "sha512-j6GzGqCiRdA7Qhur2VVmKZAkBLfnHFQfx4TaJGL9RMveZqCo48jSHHO0DTgizEnGhtWnqmbtCUSrqSkdiY/0Hg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.65.0.tgz", + "integrity": "sha512-YjaZ7PRI5qY7ax2L3PbvX0rRyGtipAReCWs0mhhDBHjH/vl0g0BonaGXrKdKpMbIIsMIwDgbk/xzkBTyAltS5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/typescript-estree": "8.65.0", + "@typescript-eslint/utils": "8.65.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.65.0.tgz", + "integrity": "sha512-JSSwWNy+H0E/01jJEM+hrX6N0OFDzFzeIhHFSAS01tlVaevpG8cFyYRPhS5yjGOvBUx3sqQHVMjCL1CAZZMxBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.65.0.tgz", + "integrity": "sha512-JboAE2swaYt4tb1fHhHTABE2K+OLy09XfcTbhnk4Pw96f9dd2e9iYsJ28gBggHlo5z5x1rkyWvcPoTuNTd4oGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.65.0", + "@typescript-eslint/tsconfig-utils": "8.65.0", + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/visitor-keys": "8.65.0", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.65.0.tgz", + "integrity": "sha512-gXiwIHsYreboxeJucHKPvgwl7dXt50mF8s1/c00cP/WoVTyWKFdtfhRWwZiXYFU5H2O8vVoSLNrexFZjYS/SGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.65.0", + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/typescript-estree": "8.65.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.65.0.tgz", + "integrity": "sha512-8C71BQkGjiMmXtop7pHVJu1l2NNShFdkCyD6a2ezzs5vU/L3LRtb69EtcteFwz0mYMPzIgOw0n6OV4VBUWZd7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.65.0", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@vitest/coverage-v8": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.10.tgz", + "integrity": "sha512-IM49HmthevbgAO4anp1hwtoT9wYe59w0LR00gr+eagHE+ZJ5lK4sLPeO0ubgoJcwLk6dehU3R24N+FbEEKDc8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^1.0.2", + "@vitest/utils": "4.1.10", + "ast-v8-to-istanbul": "^1.0.0", + "istanbul-lib-coverage": "^3.2.2", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.2.0", + "magicast": "^0.5.2", + "obug": "^2.1.1", + "std-env": "^4.0.0-rc.1", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@vitest/browser": "4.1.10", + "vitest": "4.1.10" + }, + "peerDependenciesMeta": { + "@vitest/browser": { + "optional": true + } + } + }, + "node_modules/@vitest/expect": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.10.tgz", + "integrity": "sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.1.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.1.10", + "@vitest/utils": "4.1.10", + "chai": "^6.2.2", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.10.tgz", + "integrity": "sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "4.1.10", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.21" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.10.tgz", + "integrity": "sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.10.tgz", + "integrity": "sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "4.1.10", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.10.tgz", + "integrity": "sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.10", + "@vitest/utils": "4.1.10", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.10.tgz", + "integrity": "sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.10.tgz", + "integrity": "sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.10", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/acorn": { + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.17.0.tgz", + "integrity": "sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true, + "license": "MIT" + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/ast-v8-to-istanbul": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.5.tgz", + "integrity": "sha512-UPAgKJFSEGMWSDr3LX4tqnAb4f7KGT8O40Tyx8wbYmmZ/yn58lNCm8h3svs3eXgiGd5AXxz8NDOvXWvicq+rJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.31", + "estree-walker": "^3.0.3", + "js-tokens": "^10.0.0" + } + }, + "node_modules/ast-v8-to-istanbul/node_modules/js-tokens": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz", + "integrity": "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.1.tgz", + "integrity": "sha512-HYXq73DDpCtNzOmrFsm9eSwCvWCql0RzqjpDzXN9EadiLJ4DNat0nsZ/Bzmy+Ud12mb4/zKDY0cQ805ZzN+i0A==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.8.tgz", + "integrity": "sha512-JZyDyq3D4AUifKTPOB7DELf6XsB3WdPuNxCtob1vFXPsSXhdAiHBWJ/tJ8HAc9aH84BK+5JFZLNkJKx3G9kzQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/brace-expansion/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/browser-or-node": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/browser-or-node/-/browser-or-node-3.0.0.tgz", + "integrity": "sha512-iczIdVJzGEYhP5DqQxYM9Hh7Ztpqqi+CXZpSmX8ALFs9ecXkQIeqRyM6TfxEfMVpwhl3dSuDvxdzzo9sUOIVBQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/browserslist": { + "version": "4.28.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.7.tgz", + "integrity": "sha512-JxV13hNrFxqjOc8alRbq9dK1MM79NEXYpma2B2J4wAtpWS5zIEIKqWPGCl7N4o7Uc7B7itylh7SuDujATRyyTw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.10.44", + "caniuse-lite": "^1.0.30001806", + "electron-to-chromium": "^1.5.393", + "node-releases": "^2.0.51", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/bufferutil": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.1.0.tgz", + "integrity": "sha512-ZMANVnAixE6AWWnPzlW2KpUrxhm9woycYvPOo67jWHyFowASTEd9s+QN1EIMsSDtwhIxN4sWE1jotpuDUIgyIw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001806", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001806.tgz", + "integrity": "sha512-72Cuvd95zbSYPKq6Fhg8eDJRlzgWDf7/mtoZv6Qe/DYNCEBdNxoA3+rZAU2ZhGCpZlns3EssFavaZomckT5Uuw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chai": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/chromium-bidi": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-17.0.2.tgz", + "integrity": "sha512-5v9GQFhTktFvotn/OFNJBmKLKRAb6n9r0bVCwf7sHgWc3/JryK0bj1nn93L3pHFrfgcsu6Be6EWsDi+1XHTGDg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "mitt": "^3.0.1", + "zod": "^3.24.1" + }, + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0" + }, + "peerDependencies": { + "devtools-protocol": "*" + } + }, + "node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/commander": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz", + "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/d": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", + "dev": true, + "license": "ISC", + "dependencies": { + "es5-ext": "^0.10.64", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.1653615", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1653615.tgz", + "integrity": "sha512-pGVkY3T/qXxAp2nFPodwYqOevk6ncNMSmvL8QfRCx5ZWGd6Vor7AFNmyaA8Zs6uJyP1QAfjuLandCgvSix1BNA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.395", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.395.tgz", + "integrity": "sha512-7zt9Aw+SrmxLWLN0zhaTWZQiCdryLVrYTq5R7iZakLvi2UQPYMMsROYV/2qVCzMeCiSXHwKOU+sZ4zOVVlrtKA==", + "dev": true, + "license": "ISC" + }, + "node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/enhanced-resolve": { + "version": "5.24.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.24.3.tgz", + "integrity": "sha512-PwKooW9JUzh5chmYfHM3IQl5OkK2u2Nm011MgeZrss3JmFraUx/fqrf78kk8GUMYoibx/14MdwTl/1WKkG7TpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/envinfo": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.21.0.tgz", + "integrity": "sha512-Lw7I8Zp5YKHFCXL7+Dz95g4CcbMEpgvqZNNq3AmlT5XAV6CgAAk6gyAMqn2zjw08K9BHfcNuKrMiCPLByGafow==", + "dev": true, + "license": "MIT", + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.1.tgz", + "integrity": "sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/es5-ext": { + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", + "dev": true, + "hasInstallScript": true, + "license": "ISC", + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "license": "MIT", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", + "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", + "dev": true, + "license": "ISC", + "dependencies": { + "d": "^1.0.2", + "ext": "^1.7.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.8.0.tgz", + "integrity": "sha512-nuKKvN+oIBO0koN7Tm7dlkmnkc21mtt0QJLwAKzjLq14y6lRTdVG36MZHJ8eQHwdJMwZbQNMlPOYedMq/oVJvQ==", + "dev": true, + "license": "MIT", + "workspaces": [ + "packages/*" + ], + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.7.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.2", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.5", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-config-prettier": { + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", + "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dev": true, + "license": "ISC", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "license": "ISC", + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.4.tgz", + "integrity": "sha512-8JnbkQ4juDyvYs4mgFGQqg4yCYtFDtUtmp2QIQq11ZZe5CFQ5wcqm1rqDgAh/QdMySuBnPzMUiJUNZG5N/AiQw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fetch-mock": { + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/fetch-mock/-/fetch-mock-12.6.0.tgz", + "integrity": "sha512-oAy0OqAvjAvduqCeWveBix7LLuDbARPqZZ8ERYtBcCURA3gy7EALA3XWq0tCNxsSg+RmmJqyaeeZlOCV9abv6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/glob-to-regexp": "^0.4.4", + "dequal": "^2.0.3", + "glob-to-regexp": "^0.4.1", + "regexparam": "^3.0.0" + }, + "engines": { + "node": ">=18.11.0" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.3.tgz", + "integrity": "sha512-/zipXxyO6rGvuNGDiULY9MvEGSkb2gaG4GGH4ygMi0ZZzyMHdUZBmntJmx5x1G2VuPytCwGN4xsJP6cw+sK+vQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz", + "integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/husky": { + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", + "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", + "dev": true, + "license": "MIT", + "bin": { + "husky": "bin.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/is-core-module": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", + "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/istanbul-lib-report/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/linkify-it": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.2.tgz", + "integrity": "sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/markdown-it" + } + ], + "license": "MIT", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, + "node_modules/lint-staged": { + "version": "17.2.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-17.2.0.tgz", + "integrity": "sha512-FchGnFe4i4B1C/a35SPU9bNGPEHSC1+1iV0plLjzBmKVe9klZrlRfSgK6Cw4VeHyqOXbJUXP0vON61uRftNQ0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^4.0.5", + "string-argv": "^0.3.2", + "tinyexec": "^1.2.4" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "engines": { + "node": ">=22.22.1" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + }, + "optionalDependencies": { + "yaml": "^2.9.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lru-cache": { + "version": "11.5.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz", + "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/magicast": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.3.tgz", + "integrity": "sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.3", + "@babel/types": "^7.29.0", + "source-map-js": "^1.2.1" + } + }, + "node_modules/markdown-it": { + "version": "14.3.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.0.tgz", + "integrity": "sha512-RCEsPjR+sr0x+AuYp601tKTkgFG4YEPLCzHST3cQ/fhlJkqAkz1L2/Qbp1j9qw5SBwQHFBoW8+hoN5xssOF0Tw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/markdown-it" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.5.0", + "linkify-it": "^5.0.2", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/mdurl": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.1.0.tgz", + "integrity": "sha512-1+HBaOx0zi/dQWht8rNv9MYf9qqpqL/kxI0hXImU6Y547zM6Sni8BQibt7ifgMcYtQg41ao3Ivd6cnSM86inpg==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimizer-webpack-plugin": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.6.1.tgz", + "integrity": "sha512-DoeAZz8Q1C1znwsUzej1fdoi4jCf7/+Em27ouLqfK/+3m8G+D7yDhUwrc3CNhjSzGUN1kn7Iv4sWmjflQHenpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "jest-worker": "^27.4.5", + "schema-utils": "^4.3.0", + "terser": "^5.31.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@minify-html/node": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "@swc/css": { + "optional": true + }, + "@swc/html": { + "optional": true + }, + "clean-css": { + "optional": true + }, + "cssnano": { + "optional": true + }, + "csso": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "html-minifier-terser": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "postcss": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "dev": true, + "license": "MIT" + }, + "node_modules/mockserver-client": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/mockserver-client/-/mockserver-client-7.4.0.tgz", + "integrity": "sha512-AA3b0n2sqskjAAVLEUVzwDAfHLHPmrgJaUqSLL4L7e1SXKPjt7d6S+N6R8nX+kLBXr3KJ+T69ZP2CzdldEL7kg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "browser-or-node": "~3.0.0", + "q": "~2.0.3", + "websocket": "~1.0.34" + }, + "engines": { + "node": ">= 14.17.0" + } + }, + "node_modules/mockserver-node": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/mockserver-node/-/mockserver-node-7.4.0.tgz", + "integrity": "sha512-49vbXEF/ozJbYsA2kbrSnE6nJzs5rgIizU4NSsOlPwumM0ZOMciNvk/Nv4BF3YVrVK23/kiAonmiKAdErh6Lsw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "follow-redirects": "~1.16.0", + "glob": "~13.0.6", + "q": "~2.0.3" + }, + "bin": { + "mockserver": "bin/mockserver.js" + }, + "engines": { + "node": ">= 14.17.0" + } + }, + "node_modules/modern-tar": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/modern-tar/-/modern-tar-0.7.7.tgz", + "integrity": "sha512-t9VmxaqrmANnEOBhpSDI6HD192Ge48k8vmWqQQL7hSFEqHEYwZbbsu49+aKLWZeRvFs3j1pMhXOqqF4kPlvjkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", + "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "dev": true, + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/node-releases": { + "version": "2.0.51", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.51.tgz", + "integrity": "sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/obug": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", + "integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT", + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pop-iterate": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pop-iterate/-/pop-iterate-1.0.1.tgz", + "integrity": "sha512-HRCx4+KJE30JhX84wBN4+vja9bNfysxg1y28l0DuJmkoaICiv2ZSilKddbS48pq50P8d2erAhqDLbp47yv3MbQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/postcss": { + "version": "8.5.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.23.tgz", + "integrity": "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.16", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", + "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/puppeteer": { + "version": "25.4.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-25.4.0.tgz", + "integrity": "sha512-xfQp8dFBcGaLc1hEMaVr7s+oW4ZkAurr8Y9H81ilKhu6QoLfSTkZjU7IavnyJ/VWpB9ni3KNJUQHUatslLWyGw==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@puppeteer/browsers": "3.0.6", + "chromium-bidi": "17.0.2", + "devtools-protocol": "0.0.1653615", + "lilconfig": "^3.1.3", + "puppeteer-core": "25.4.0", + "typed-query-selector": "^2.12.2" + }, + "bin": { + "puppeteer": "lib/puppeteer/node/cli.js" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/puppeteer-core": { + "version": "25.4.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-25.4.0.tgz", + "integrity": "sha512-K1plkLOdeoUnGeT1OvdqF3qxl33v+Ra/uH5VyPEhXdMcpvGiEskHzxxEU3fgpccJpJLIipB/rPUsvkZRWeKqOA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@puppeteer/browsers": "3.0.6", + "chromium-bidi": "17.0.2", + "devtools-protocol": "0.0.1653615", + "typed-query-selector": "^2.12.2", + "webdriver-bidi-protocol": "0.4.2", + "ws": "^8.21.1" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/q": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/q/-/q-2.0.3.tgz", + "integrity": "sha512-gv6vLGcmAOg96/fgo3d9tvA4dJNZL3fMyBqVRrGxQ+Q/o4k9QzbJ3NQF9cOO/71wRodoXhaPgphvMFU68qVAJQ==", + "deprecated": "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.\n\n(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)", + "dev": true, + "license": "MIT", + "dependencies": { + "asap": "^2.0.0", + "pop-iterate": "^1.0.1", + "weak-map": "^1.0.5" + } + }, + "node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/regexparam": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/regexparam/-/regexparam-3.0.0.tgz", + "integrity": "sha512-RSYAtP31mvYLkAHrOlh25pCNQ5hWnT106VukGaaFfuJrZFkGRX5GhUAdPqpSDXxOhA2c4akmRuplv1mRqnBn6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.12", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", + "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/rolldown": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.5.tgz", + "integrity": "sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.139.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.1.5", + "@rolldown/binding-darwin-arm64": "1.1.5", + "@rolldown/binding-darwin-x64": "1.1.5", + "@rolldown/binding-freebsd-x64": "1.1.5", + "@rolldown/binding-linux-arm-gnueabihf": "1.1.5", + "@rolldown/binding-linux-arm64-gnu": "1.1.5", + "@rolldown/binding-linux-arm64-musl": "1.1.5", + "@rolldown/binding-linux-ppc64-gnu": "1.1.5", + "@rolldown/binding-linux-s390x-gnu": "1.1.5", + "@rolldown/binding-linux-x64-gnu": "1.1.5", + "@rolldown/binding-linux-x64-musl": "1.1.5", + "@rolldown/binding-openharmony-arm64": "1.1.5", + "@rolldown/binding-wasm32-wasi": "1.1.5", + "@rolldown/binding-win32-arm64-msvc": "1.1.5", + "@rolldown/binding-win32-x64-msvc": "1.1.5" + } + }, + "node_modules/schema-utils": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/schema-utils/node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/schema-utils/node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/schema-utils/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz", + "integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/string-width": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.2.2.tgz", + "integrity": "sha512-GaPUh5gfdrYzqeVNZvUfT23vYYxXzKYidUcnMtJg/3rxRV63EFZy3k6xfKlmfeJD0176lnUV/Usr3XcwSvFzpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/terser": { + "version": "5.49.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.49.0.tgz", + "integrity": "sha512-SNiDnXyHSrxVcIOtVbULzcTmniUiwcV7Nwdyj1twVubeTmbjoa8p69KKDpfkdoOavuM4/GRm1+ykI8qqnavHoA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.15.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.4.tgz", + "integrity": "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyrainbow": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz", + "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/type": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", + "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typed-query-selector": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.2.tgz", + "integrity": "sha512-EOPFbyIub4ngnEdqi2yOcNeDLaX/0jcE1JoAXQDDMIthap7FoN795lc/SHfIq2d416VufXpM8z/lD+WRm2gfOQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/typedoc": { + "version": "0.28.20", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.20.tgz", + "integrity": "sha512-uSKqkh8Cr48vllnEy+jdaAgOeR6Y+QCBW7usgUsKj7gJEfR7stw9U/fE49LBnj2tPRKPY0c0EBJSWe9Appmplg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@gerrit0/mini-shiki": "^3.23.0", + "lunr": "^2.3.9", + "markdown-it": "^14.3.0", + "minimatch": "^10.2.5", + "yaml": "^2.9.0" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 18", + "pnpm": ">= 10" + }, + "peerDependencies": { + "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.65.0.tgz", + "integrity": "sha512-/ggrHAwyjENDusvyxbuqxAC2dTnZg/Z8F+fgQtYIz+L6n/9HfSlEZcFGV/NsMNa6CkGk0xUjUAFwC0vHOflvIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.65.0", + "@typescript-eslint/parser": "8.65.0", + "@typescript-eslint/typescript-estree": "8.65.0", + "@typescript-eslint/utils": "8.65.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "dev": true, + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/vite": { + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.5.tgz", + "integrity": "sha512-7ULLwsCdYx/nRyrpiEwvqb5TFHrMVZyBt+rg/OAXT7rgj/z+DtTDyKFeLAdDkubDVDKD8jOsndmy7m55XcfUsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.32.0", + "picomatch": "^4.0.5", + "postcss": "^8.5.17", + "rolldown": "~1.1.5", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.3.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "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" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vitest": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.10.tgz", + "integrity": "sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "4.1.10", + "@vitest/mocker": "4.1.10", + "@vitest/pretty-format": "4.1.10", + "@vitest/runner": "4.1.10", + "@vitest/snapshot": "4.1.10", + "@vitest/spy": "4.1.10", + "@vitest/utils": "4.1.10", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^4.0.0-rc.1", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.1.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.1.10", + "@vitest/browser-preview": "4.1.10", + "@vitest/browser-webdriverio": "4.1.10", + "@vitest/coverage-istanbul": "4.1.10", + "@vitest/coverage-v8": "4.1.10", + "@vitest/ui": "4.1.10", + "happy-dom": "*", + "jsdom": "*", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "vite": { + "optional": false + } + } + }, + "node_modules/watchpack": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.2.tgz", + "integrity": "sha512-6i/00NBjP4yGPs+caKSyRfpTF/8Torsu0MOW3mMzIbhgISFder8i7xbqgHlLMwJrdiN8ndBV3UA1/AfzPSr+jg==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/weak-map": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/weak-map/-/weak-map-1.0.8.tgz", + "integrity": "sha512-lNR9aAefbGPpHO7AEnY0hCFjz1eTkWCXYvkTRrTHs9qv8zJp+SkVYpzfLIFXQQiG3tVvbNFQgVg2bQS8YGgxyw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/webdriver-bidi-protocol": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.4.2.tgz", + "integrity": "sha512-VSV+fzfChirL3e7jay2yUC7B4HQCGtEWEg/MSSQbK+qWbqeGlRLlXTzPpYr3XGUvbpDHumWZBJxgesg4N7dbtA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/webpack": { + "version": "5.109.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.109.1.tgz", + "integrity": "sha512-Q4XQscWSLNQSaMFsIWUZ+IVpvwLqD+MvjIuSQC1hG8m1ZMK78VAsNMhTjD3icJelypp6aM5Hq8BZNEX3sc1PJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.8", + "@types/json-schema": "^7.0.15", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.16.0", + "browserslist": "^4.28.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.24.2", + "es-module-lexer": "^2.1.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "graceful-fs": "^4.2.11", + "mime-db": "^1.54.0", + "minimizer-webpack-plugin": "^5.6.1", + "neo-async": "^2.6.2", + "schema-utils": "^4.3.3", + "tapable": "^2.3.0", + "watchpack": "^2.5.2", + "webpack-sources": "^3.5.1" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-cli": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-7.2.1.tgz", + "integrity": "sha512-YwSGbcZdfz12DM8JIseVPr3oBb09IgVCVc4vY3oDvZnI/mALTGPAP1QiqOi4/bBLSJrRHaqDIXeHcNA0+G38aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@discoveryjs/json-ext": "^1.1.0", + "commander": "^14.0.3", + "cross-spawn": "^7.0.6", + "envinfo": "^7.21.0", + "import-local": "^3.2.0", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^6.0.1" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "js-yaml": "^4.0.0 || ^5.0.0", + "json5": "^2.2.3", + "toml": "^3.0.0 || ^4.0.0", + "webpack": "^5.101.0", + "webpack-bundle-analyzer": "^4.0.0 || ^5.0.0", + "webpack-dev-server": "^5.0.0 || ^6.0.0" + }, + "peerDependenciesMeta": { + "js-yaml": { + "optional": true + }, + "json5": { + "optional": true + }, + "toml": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-merge": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-6.0.1.tgz", + "integrity": "sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.5.1.tgz", + "integrity": "sha512-jyuiGJdtvY434z5bUZrjz67v76/ePNvFZTp9Mdz29IlH4+GPsgyGjiv0fKI+M7BdkU6ADjulUcKAd3tUK3WlEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/webpack/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/websocket": { + "version": "1.0.35", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.35.tgz", + "integrity": "sha512-/REy6amwPZl44DDzvRCkaI1q1bIiQB0mEFQLUrhz3z2EK91cp3n72rAjUlrTP0zV22HJIUOVHQGPxhFRjxjt+Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bufferutil": "^4.0.1", + "debug": "^2.2.0", + "es5-ext": "^0.10.63", + "typedarray-to-buffer": "^3.1.5", + "utf-8-validate": "^5.0.2", + "yaeti": "^0.0.6" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/websocket/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/websocket/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ws": { + "version": "8.21.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.1.tgz", + "integrity": "sha512-+0NTnW77fFN/DjQi6k/Sq/Yvk4Sgajw7urW8V+asjXnRgDs9gyGkdb7EzgfhA4goXsRIZKE28fzIXBHEzhuiWw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.32" + } + }, + "node_modules/yaml": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, + "node_modules/yargs": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.1.0.tgz", + "integrity": "sha512-2rAgRKu54VsHkqI0/tYkmluGXHD4KW7yZoycuqDQ15QOTnc2VVfy0nN/1eMhnQLO00A+dwtK20xuCnc1YGeUyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^8.2.1", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/package.json b/package.json index aa644bc4..fa143e1e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@here/olp-sdk-ts", - "version": "2.0.0", + "version": "3.0.0", "description": "HERE OLP SDK for TypeScript", "author": { "name": "HERE Europe B.V.", @@ -29,47 +29,54 @@ "sourceMap": true, "instrument": true }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, "lint-staged": { - "*.ts": [ - "prettier --write", - "git add" - ] + "*.ts": "prettier --write" }, "scripts": { - "bootstrap": "lerna bootstrap --use-workspaces", - "build": "lerna run build", - "test": "lerna run test", - "http-server-testing-bundles": "serve -l tcp://localhost:8080 tests/integration/bundles/umd/static", - "test-published-bundles": "cd tests/integration/bundles/umd && tsc && cd - && mocha --timeout 5000 tests/integration/bundles/umd/olp-sdk-published.test.js", - "test-generated-bundles": "cd tests/integration/bundles/umd && tsc && cd - && mocha --timeout 5000 tests/integration/bundles/umd/olp-sdk-generated.test.js", - "api-breaks-test": "nyc mocha --opts ./tests/integration/api-breaks/mocha.opts", - "integration-test": "nyc mocha --opts ./tests/integration/mocha.opts", - "functional-test": "nyc mocha --opts ./tests/functional/mocha.opts", - "coverage": "lerna run coverage", - "codecov": "lerna run codecov", - "lint": "lerna run lint", - "bundle": "lerna run bundle", - "bundle:dev": "lerna run bundle:dev", - "bundle:prod": "lerna run bundle:prod", - "typedoc": "npx typedoc --options typedoc.json" + "prepare": "husky", + "build": "npm run build -w @here/olp-sdk-fetch -w @here/olp-sdk-dataservice-api && npm run build -w @here/olp-sdk-core && npm run build -w @here/olp-sdk-authentication -w @here/olp-sdk-dataservice-read -w @here/olp-sdk-dataservice-write", + "test": "npm run test --workspaces --if-present", + "http-server-testing-bundles": "node scripts/static-server.js tests/integration/bundles/umd/static 8080", + "test-published-bundles": "vitest run --config ./vitest.bundles-published.config.ts", + "test-generated-bundles": "vitest run --config ./vitest.bundles-generated.config.ts", + "api-breaks-test": "vitest run --config ./vitest.api-breaks.config.ts", + "integration-test": "vitest run --config ./vitest.integration.config.ts", + "functional-test": "vitest run --config ./vitest.functional.config.ts", + "coverage": "npm run coverage --workspaces --if-present", + "lint": "eslint .", + "bundle": "npm run bundle --workspaces --if-present", + "bundle:dev": "npm run bundle:dev --workspaces --if-present", + "bundle:prod": "npm run bundle:prod --workspaces --if-present", + "typedoc": "typedoc --options typedoc.json" }, "devDependencies": { - "@types/node": "18.7.14", - "lerna": "^4.0.0", - "typescript": "4.0.3", - "codecov": "3.7.2", - "mockserver-node": "^5.12.0", - "mockserver-client": "^5.12.0", - "ts-node": "10.9.2", - "puppeteer": "^13.1.3", - "puppeteer-to-istanbul": "^1.4.0", - "nyc": "^15.0.0", - "mocha": "^7.1.1", - "serve": "^13.0.2" + "@eslint/js": "^10.0.1", + "@types/node": "^24.0.0", + "@vitest/coverage-v8": "^4.1.10", + "eslint": "^10.8.0", + "eslint-config-prettier": "^10.1.8", + "fetch-mock": "^12.6.0", + "husky": "^9.1.7", + "lint-staged": "^17.2.0", + "mockserver-client": "^7.4.0", + "mockserver-node": "^7.4.0", + "prettier": "^3.4.2", + "puppeteer": "^25.4.0", + "typedoc": "^0.28.20", + "typescript": "~5.8.3", + "typescript-eslint": "^8.65.0", + "vitest": "^4.1.10", + "webpack": "^5.109.1", + "webpack-cli": "^7.2.1" + }, + "engines": { + "node": ">= 24.0.0" + }, + "allowScripts": { + "bufferutil": true, + "es5-ext": true, + "fsevents": true, + "puppeteer": true, + "utf-8-validate": true } -} \ No newline at end of file +} diff --git a/scripts/linux/psv/build_test_psv.sh b/scripts/linux/psv/build_test_psv.sh index a7d557b9..e00cea3a 100755 --- a/scripts/linux/psv/build_test_psv.sh +++ b/scripts/linux/psv/build_test_psv.sh @@ -1,6 +1,6 @@ #!/bin/bash -ex # -# Copyright (C) 2019 HERE Europe B.V. +# Copyright (C) 2019-2026 HERE Europe B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,11 +21,8 @@ # Following script is for SDK building verification ################################################### -# Install main dependencies -yarn - -# Initialize lerna monorepo with yarn workspaces -yarn bootstrap +# Install and link all workspace packages +npm ci # Build the project npm run build @@ -49,5 +46,5 @@ npm run functional-test # Test the generated bundles npm run http-server-testing-bundles & npm run test-generated-bundles -# Generate and upload codecov -npm run codecov +# Generate coverage reports (uploaded to Codecov by the GitHub Action) +npm run coverage diff --git a/scripts/publish-packages.sh b/scripts/publish-packages.sh index aa7615f4..466a4164 100755 --- a/scripts/publish-packages.sh +++ b/scripts/publish-packages.sh @@ -1,6 +1,6 @@ #!/bin/bash -e # -# Copyright (C) 2019-2022 HERE Europe B.V. +# Copyright (C) 2019-2026 HERE Europe B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,40 +22,39 @@ echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > ~/.npmrc -yarn +npm ci while [[ $# -gt 0 ]]; do key="$1" case "$key" in -fetch) # olp-sdk-fetch publish - cd @here/olp-sdk-fetch && npm install && npm publish && cd - + npm publish -w @here/olp-sdk-fetch ;; -core) # olp-sdk-core publish - cd @here/olp-sdk-core && npm install && npm publish && cd - + npm publish -w @here/olp-sdk-core ;; -api) # olp-sdk-dataservice-api publish - cd @here/olp-sdk-dataservice-api && npm install && npm publish && cd - + npm publish -w @here/olp-sdk-dataservice-api ;; -auth) # olp-sdk-authentication publish - cd @here/olp-sdk-authentication && npm install && npm publish && cd - + npm publish -w @here/olp-sdk-authentication ;; -read) # olp-sdk-dataservice-read publish - cd @here/olp-sdk-dataservice-read && npm install && npm publish && cd - + npm publish -w @here/olp-sdk-dataservice-read ;; -write) # olp-sdk-dataservice-write publish - cd @here/olp-sdk-dataservice-write && npm install && npm publish && cd - + npm publish -w @here/olp-sdk-dataservice-write ;; -verify) # verify all published echo 'Publish verification...' - yarn - yarn bootstrap + npm ci npm run --silent build npm run --silent http-server-testing-bundles & npm run --silent test-published-bundles echo 'Publish verification done! ' diff --git a/scripts/static-server.js b/scripts/static-server.js new file mode 100644 index 00000000..7a5990fd --- /dev/null +++ b/scripts/static-server.js @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2019-2026 HERE Europe B.V. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * License-Filename: LICENSE + */ + +// Minimal zero-dependency static file server used to serve the bundle-testing +// toolkit page for the puppeteer UMD bundle tests. Replaces the `serve` npm +// package to keep the dev dependency surface small. + +const http = require("node:http"); +const fs = require("node:fs"); +const path = require("node:path"); + +const root = path.resolve(process.argv[2] || "."); +const port = Number(process.argv[3]) || 8080; + +const CONTENT_TYPES = { + ".html": "text/html; charset=utf-8", + ".js": "text/javascript; charset=utf-8", + ".css": "text/css; charset=utf-8", + ".json": "application/json; charset=utf-8", + ".map": "application/json; charset=utf-8" +}; + +const server = http.createServer((req, res) => { + const requestPath = decodeURIComponent(req.url.split("?")[0]); + const relativePath = requestPath === "/" ? "index.html" : requestPath.replace(/^\/+/, ""); + const filePath = path.join(root, relativePath); + + // Prevent path traversal outside of the served root. + if (!filePath.startsWith(root)) { + res.writeHead(403); + res.end("Forbidden"); + return; + } + + fs.readFile(filePath, (err, data) => { + if (err) { + res.writeHead(404); + res.end("Not found"); + return; + } + const type = CONTENT_TYPES[path.extname(filePath)] || "application/octet-stream"; + res.writeHead(200, { "Content-Type": type }); + res.end(data); + }); +}); + +server.listen(port, () => { + // eslint-disable-next-line no-console + console.log(`Static server running at http://localhost:${port} (root: ${root})`); +}); diff --git a/tests/functional/StreamLayerReadData.test.ts b/tests/functional/StreamLayerReadData.test.ts index d3c1c750..efbfa691 100644 --- a/tests/functional/StreamLayerReadData.test.ts +++ b/tests/functional/StreamLayerReadData.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,13 +17,6 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - -chai.use(sinonChai); - -const expect = chai.expect; - const mockserver = require("mockserver-node"); const mockServerClient = require("mockserver-client").mockServerClient; @@ -31,299 +24,315 @@ const SERVER_PORT = 8081; const SERVER_HOST = "localhost"; const MOCKED_STREAM_LAYER_ID = "mocked-stream-layer-id"; const MOCKED_CATALOG_WITH_STREAM_LAYER_HRN = - "hrn:here:data:::mocked-catalog-for-testing-stream-layer"; + "hrn:here:data:::mocked-catalog-for-testing-stream-layer"; const MOCKED_STREAM_BASE_URL = `http://${SERVER_HOST}:${SERVER_PORT}/stream/v2/catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}`; const MOCKED_SUBSCRIBTION_ID = "882990694"; +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import "@here/olp-sdk-fetch"; import { - StreamLayerClient, - SubscribeRequest, - PollRequest, - UnsubscribeRequest, - SeekRequest + StreamLayerClient, + SubscribeRequest, + PollRequest, + UnsubscribeRequest, + SeekRequest } from "@here/olp-sdk-dataservice-read"; import { HRN, OlpClientSettings } from "@here/olp-sdk-core"; -describe("Stream Layer Client Read Data", async function() { - const olpClientSettings = new OlpClientSettings({ - environment: `http://${SERVER_HOST}:${SERVER_PORT}`, - getToken: () => Promise.resolve("mocked-token-string") - }); - - before(async function() { - await mockserver.start_mockserver({ - serverPort: SERVER_PORT, - trace: true +describe("Stream Layer Client Read Data", async function () { + const olpClientSettings = new OlpClientSettings({ + environment: `http://${SERVER_HOST}:${SERVER_PORT}`, + getToken: () => Promise.resolve("mocked-token-string") }); - console.log("Started Mocked Server\n"); - }); - after(async function() { - await mockserver.stop_mockserver({ - serverPort: SERVER_PORT + beforeAll(async function () { + // Tracing prints the whole MockServer log through this process and + // slows the start up noticeably. A fatal JVM error still reaches + // stderr, which mockserver-node always forwards. + await mockserver.start_mockserver({ + serverPort: SERVER_PORT + }); + console.log("Started Mocked Server\n"); }); - console.log("Stoped Mocked Server\n"); - }); + afterAll(async function () { + await mockserver.stop_mockserver({ + serverPort: SERVER_PORT + }); - it("Should Subscribe, Read messages, Read Blob and Unsubscribe from the layer", async function() { - const client = new StreamLayerClient({ - catalogHrn: HRN.fromString(MOCKED_CATALOG_WITH_STREAM_LAYER_HRN), - layerId: MOCKED_STREAM_LAYER_ID, - settings: olpClientSettings + console.log("Stoped Mocked Server\n"); }); - const MOCKED_DATAHANDLE = "iVBORw0KGgoAAAANSUhEU"; - const MOCKED_DATA = - "iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAABhQTFRFvb29AACEAP8AhIKEPb5x2m9E5413aFQirhRuvAMqCw+6kE2BVsa8miQaYSKyshxFvhqdzKx8UsPYk9gDEcY1ghZXcPbENtax8g5T+3zHYufF1Lf9HdIZBfNEiKAAAAAElFTkSuQmCC"; + it("Should Subscribe, Read messages, Read Blob and Unsubscribe from the layer", async function () { + const client = new StreamLayerClient({ + catalogHrn: HRN.fromString(MOCKED_CATALOG_WITH_STREAM_LAYER_HRN), + layerId: MOCKED_STREAM_LAYER_ID, + settings: olpClientSettings + }); - const MOCKED_MESSAGE = { - metaData: { - partition: "314010583", - checksum: "ff7494d6f17da702862e550c907c0a91", - compressedDataSize: 152417, - dataSize: 250110, - data: "", - dataHandle: MOCKED_DATAHANDLE, - timestamp: 1517916706 - }, - offset: { - partition: 7, - offset: 38562 - } - }; + const MOCKED_DATAHANDLE = "iVBORw0KGgoAAAANSUhEU"; + const MOCKED_DATA = + "iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAABhQTFRFvb29AACEAP8AhIKEPb5x2m9E5413aFQirhRuvAMqCw+6kE2BVsa8miQaYSKyshxFvhqdzKx8UsPYk9gDEcY1ghZXcPbENtax8g5T+3zHYufF1Lf9HdIZBfNEiKAAAAAElFTkSuQmCC"; - await mockServerClient(SERVER_HOST, SERVER_PORT) - .mockAnyResponse([ - { - httpRequest: { - path: `/resources/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/apis` - }, - httpResponse: { - statusCode: 200, - body: JSON.stringify([ - { - api: "stream", - version: "v2", - baseURL: MOCKED_STREAM_BASE_URL, - parameters: {} - }, - { - api: "blob", - version: "v1", - baseURL: `http://${SERVER_HOST}:${SERVER_PORT}/blob/v1/catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}`, - parameters: {} - } - ]) - } - }, - { - httpRequest: { - path: `/stream/v2/catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/layers/${MOCKED_STREAM_LAYER_ID}/subscribe`, - method: "POST", - queryStringParameters: { - mode: ["serial"] - } - }, - httpResponse: { - statusCode: 200, - body: JSON.stringify({ - nodeBaseURL: `http://${SERVER_HOST}:${SERVER_PORT}/stream/v2/stream-catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}`, - subscriptionId: MOCKED_SUBSCRIBTION_ID - }) - } - }, - { - httpRequest: { - path: `/stream/v2/stream-catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/layers/${MOCKED_STREAM_LAYER_ID}/subscribe`, - method: "DELETE", - queryStringParameters: { - mode: ["serial"], - subscriptionId: [MOCKED_SUBSCRIBTION_ID] - } - }, - httpResponse: { - statusCode: 200, - body: "{}" - } - }, - { - httpRequest: { - path: `/stream/v2/stream-catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/layers/${MOCKED_STREAM_LAYER_ID}/partitions`, - method: "GET", - queryStringParameters: { - mode: ["serial"], - subscriptionId: [MOCKED_SUBSCRIBTION_ID] + const MOCKED_MESSAGE = { + metaData: { + partition: "314010583", + checksum: "ff7494d6f17da702862e550c907c0a91", + compressedDataSize: 152417, + dataSize: 250110, + data: "", + dataHandle: MOCKED_DATAHANDLE, + timestamp: 1517916706 + }, + offset: { + partition: 7, + offset: 38562 } - }, - httpResponse: { - statusCode: 200, - body: JSON.stringify({ - messages: [ + }; + + await mockServerClient(SERVER_HOST, SERVER_PORT) + .mockAnyResponse([ + { + httpRequest: { + path: `/resources/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/apis` + }, + httpResponse: { + statusCode: 200, + body: JSON.stringify([ + { + api: "stream", + version: "v2", + baseURL: MOCKED_STREAM_BASE_URL, + parameters: {} + }, + { + api: "blob", + version: "v1", + baseURL: `http://${SERVER_HOST}:${SERVER_PORT}/blob/v1/catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}`, + parameters: {} + } + ]) + } + }, + { + httpRequest: { + path: `/stream/v2/catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/layers/${MOCKED_STREAM_LAYER_ID}/subscribe`, + method: "POST", + queryStringParameters: { + mode: ["serial"] + } + }, + httpResponse: { + statusCode: 200, + body: JSON.stringify({ + nodeBaseURL: `http://${SERVER_HOST}:${SERVER_PORT}/stream/v2/stream-catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}`, + subscriptionId: MOCKED_SUBSCRIBTION_ID + }) + } + }, + { + httpRequest: { + path: `/stream/v2/stream-catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/layers/${MOCKED_STREAM_LAYER_ID}/subscribe`, + method: "DELETE", + queryStringParameters: { + mode: ["serial"], + subscriptionId: [MOCKED_SUBSCRIBTION_ID] + } + }, + httpResponse: { + statusCode: 200, + body: "{}" + } + }, { - metaData: { + httpRequest: { + path: `/stream/v2/stream-catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/layers/${MOCKED_STREAM_LAYER_ID}/partitions`, + method: "GET", + queryStringParameters: { + mode: ["serial"], + subscriptionId: [MOCKED_SUBSCRIBTION_ID] + } + }, + httpResponse: { + statusCode: 200, + body: JSON.stringify({ + messages: [ + { + metaData: { + partition: "314010583", + checksum: + "ff7494d6f17da702862e550c907c0a91", + compressedDataSize: 152417, + dataSize: 250110, + data: "iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAABhQTFRFvb29AACEAP8AhIKEPb5x2m9E5413aFQirhRuvAMqCw+6kE2BVsa8miQaYSKyshxFvhqdzKx8UsPYk9gDEcY1ghZXcPbENtax8g5T+3zHYufF1Lf9HdIZBfNEiKAAAAAElFTkSuQmCC", + dataHandle: "", + timestamp: 1517916706 + }, + offset: { + partition: 7, + offset: 38562 + } + } + ] + }) + } + }, + { + httpRequest: { + path: `/stream/v2/stream-catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/layers/${MOCKED_STREAM_LAYER_ID}/offsets`, + method: "PUT", + queryStringParameters: { + mode: ["serial"], + subscriptionId: [MOCKED_SUBSCRIBTION_ID] + }, + body: '{"offsets":[{"partition":7,"offset":38562}]}' + }, + httpResponse: { + statusCode: 200, + body: "{}" + } + }, + { + httpRequest: { + path: `/blob/v1/catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/layers/${MOCKED_STREAM_LAYER_ID}/data/${MOCKED_DATAHANDLE}`, + method: "GET" + }, + httpResponse: { + statusCode: 200, + body: MOCKED_DATA + } + }, + { + httpRequest: { + path: `/stream/v2/stream-catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/layers/${MOCKED_STREAM_LAYER_ID}/seek`, + method: "PUT", + queryStringParameters: { + mode: ["serial"], + subscriptionId: [MOCKED_SUBSCRIBTION_ID] + }, + body: '{"offsets":[{"partition":7,"offset":38562}]}' + }, + httpResponse: { + statusCode: 200, + body: "{}" + } + } + ]) + .then( + function () { + console.log( + "Created expectations.\nMock server training finished.\n" + ); + }, + (error: any) => { + console.log(error); + } + ); + + // Test subscribtion + const subscriptionId = await client.subscribe( + new SubscribeRequest().withMode("serial") + ); + expect(subscriptionId).equal(MOCKED_SUBSCRIBTION_ID); + + // Test pull messages + const messages = await client.poll( + new PollRequest() + .withMode("serial") + .withSubscriptionId(subscriptionId) + ); + expect(messages.length).equals(1); + expect(messages[0].metaData.partition).equals("314010583"); + + // Test unsubscribtion + const unsubscribeResponse = await client.unsubscribe( + new UnsubscribeRequest() + .withMode("serial") + .withSubscriptionId(MOCKED_SUBSCRIBTION_ID) + ); + expect(unsubscribeResponse.status).equals(200); + + // Test reading blob + const data = await client + .getData(MOCKED_MESSAGE) + .then((res) => res.text()); + expect(data).equals(MOCKED_DATA); + + // Test seek method + const seekResponse = await client.seek( + new SeekRequest() + .withSubscriptionId(MOCKED_SUBSCRIBTION_ID) + .withMode("serial") + .withSeekOffsets({ + offsets: [ + { + partition: 7, + offset: 38562 + } + ] + }) + ); + expect(seekResponse.status).equals(200); + + // Test handle "nodatahandle" error + const getDataResponse = await client + .getData({ + metaData: { partition: "314010583", checksum: "ff7494d6f17da702862e550c907c0a91", compressedDataSize: 152417, dataSize: 250110, - data: - "iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAABhQTFRFvb29AACEAP8AhIKEPb5x2m9E5413aFQirhRuvAMqCw+6kE2BVsa8miQaYSKyshxFvhqdzKx8UsPYk9gDEcY1ghZXcPbENtax8g5T+3zHYufF1Lf9HdIZBfNEiKAAAAAElFTkSuQmCC", + data: "iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAABhQTFRFvb29AACEAP8AhIKEPb5x2m9E5413aFQirhRuvAMqCw+6kE2BVsa8miQaYSKyshxFvhqdzKx8UsPYk9gDEcY1ghZXcPbENtax8g5T+3zHYufF1Lf9HdIZBfNEiKAAAAAElFTkSuQmCC", dataHandle: "", timestamp: 1517916706 - }, - offset: { + }, + offset: { partition: 7, offset: 38562 - } } - ] }) - } - }, - { - httpRequest: { - path: `/stream/v2/stream-catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/layers/${MOCKED_STREAM_LAYER_ID}/offsets`, - method: "PUT", - queryStringParameters: { - mode: ["serial"], - subscriptionId: [MOCKED_SUBSCRIBTION_ID] - }, - body: '{"offsets":[{"partition":7,"offset":38562}]}' - }, - httpResponse: { - statusCode: 200, - body: "{}" - } - }, - { - httpRequest: { - path: `/blob/v1/catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/layers/${MOCKED_STREAM_LAYER_ID}/data/${MOCKED_DATAHANDLE}`, - method: "GET" - }, - httpResponse: { - statusCode: 200, - body: MOCKED_DATA - } - }, - { - httpRequest: { - path: `/stream/v2/stream-catalogs/${MOCKED_CATALOG_WITH_STREAM_LAYER_HRN}/layers/${MOCKED_STREAM_LAYER_ID}/seek`, - method: "PUT", - queryStringParameters: { - mode: ["serial"], - subscriptionId: [MOCKED_SUBSCRIBTION_ID] - }, - body: '{"offsets":[{"partition":7,"offset":38562}]}' - }, - httpResponse: { - statusCode: 200, - body: "{}" - } - } - ]) - .then( - function() { - console.log( - "Created expectations.\nMock server training finished.\n" - ); - }, - (error: any) => { - console.log(error); - } - ); - - // Test subscribtion - const subscriptionId = await client.subscribe( - new SubscribeRequest().withMode("serial") - ); - expect(subscriptionId).equal(MOCKED_SUBSCRIBTION_ID); - - // Test pull messages - const messages = await client.poll( - new PollRequest().withMode("serial").withSubscriptionId(subscriptionId) - ); - expect(messages.length).equals(1); - expect(messages[0].metaData.partition).equals("314010583"); + .catch((err) => err.message); + expect(getDataResponse).equals("No data handle for this partition"); - // Test unsubscribtion - const unsubscribeResponse = await client.unsubscribe( - new UnsubscribeRequest() - .withMode("serial") - .withSubscriptionId(MOCKED_SUBSCRIBTION_ID) - ); - expect(unsubscribeResponse.status).equals(200); + // Test subscribtion error handling + const subscribeResponse = await client + .subscribe( + new SubscribeRequest() + .withConsumerId("test-id") + .withSubscriptionProperties({}) + ) + .catch((err) => err.message); + expect(subscribeResponse).equals("Not Found"); - // Test reading blob - const data = await client.getData(MOCKED_MESSAGE).then(res => res.text()); - expect(data).equals(MOCKED_DATA); - - // Test seek method - const seekResponse = await client.seek( - new SeekRequest() - .withSubscriptionId(MOCKED_SUBSCRIBTION_ID) - .withMode("serial") - .withSeekOffsets({ - offsets: [ - { - partition: 7, - offset: 38562 - } - ] - }) - ); - expect(seekResponse.status).equals(200); + // Test Poll error handling + const pollResponse = await client + .poll(new PollRequest()) + .catch((err) => err.message); + expect(pollResponse).equals("Not Found"); - // Test handle "nodatahandle" error - const getDataResponse = await client - .getData({ - metaData: { - partition: "314010583", - checksum: "ff7494d6f17da702862e550c907c0a91", - compressedDataSize: 152417, - dataSize: 250110, - data: - "iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAABhQTFRFvb29AACEAP8AhIKEPb5x2m9E5413aFQirhRuvAMqCw+6kE2BVsa8miQaYSKyshxFvhqdzKx8UsPYk9gDEcY1ghZXcPbENtax8g5T+3zHYufF1Lf9HdIZBfNEiKAAAAAElFTkSuQmCC", - dataHandle: "", - timestamp: 1517916706 - }, - offset: { - partition: 7, - offset: 38562 - } - }) - .catch(err => err.message); - expect(getDataResponse).equals("No data handle for this partition"); + client["subscribtionNodeBaseUrl"] = undefined; + const pollResponse2 = await client + .poll(new PollRequest()) + .catch((err) => err.message); + expect(pollResponse2).equals( + "No valid nodeBaseurl provided for the subscribtion id=undefined, please check your subscribtion" + ); - // Test subscribtion error handling - const subscribeResponse = await client - .subscribe( - new SubscribeRequest() - .withConsumerId("test-id") - .withSubscriptionProperties({}) - ) - .catch(err => err.message); - expect(subscribeResponse).equals("Not Found"); - - // Test Poll error handling - const pollResponse = await client - .poll(new PollRequest()) - .catch(err => err.message); - expect(pollResponse).equals("Not Found"); - - client["subscribtionNodeBaseUrl"] = undefined; - const pollResponse2 = await client - .poll(new PollRequest()) - .catch(err => err.message); - expect(pollResponse2).equals( - "No valid nodeBaseurl provided for the subscribtion id=undefined, please check your subscribtion" - ); - - // Test Seek error handling - const seekResponseErr = await client - .seek(new SeekRequest()) - .catch(err => err.message); - expect(seekResponseErr).equals("Error: offsets are required."); - }); + // Test Seek error handling + const seekResponseErr = await client + .seek(new SeekRequest()) + .catch((err) => err.message); + expect(seekResponseErr).equals("Error: offsets are required."); + }); }); diff --git a/tests/functional/mocha.opts b/tests/functional/mocha.opts deleted file mode 100644 index e366da20..00000000 --- a/tests/functional/mocha.opts +++ /dev/null @@ -1,9 +0,0 @@ ---require ts-node/register ---require source-map-support/register ---full-trace ---bail ---check-leaks ---reporter xunit ---reporter-option output=tests/functional/xunit.xml --timeout 10000 -tests/functional/*.test.ts diff --git a/tests/integration/api-breaks/ArtifactApi.test.ts b/tests/integration/api-breaks/ArtifactApi.test.ts index 001e979e..da67407f 100644 --- a/tests/integration/api-breaks/ArtifactApi.test.ts +++ b/tests/integration/api-breaks/ArtifactApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,614 +17,623 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - import { - ArtifactObj, - ArtifactFile, - DeleteArtifactResponseObj, - DeleteFileResponseObj, - DeleteSchemaResponseObj, - SchemaObj, - GetArtifactResponseObj, - GetSchemaResponseObj, - ListSchemasResponseObj, - PagedQuery, - Principal, - RegisterArtifactRequest, - RegisterArtifactResponse, - SchemaValidationResults, - UpdatePermissionRequest, - UpdatePermissionResponse, - Variant + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + ArtifactObj, + ArtifactFile, + DeleteArtifactResponseObj, + DeleteFileResponseObj, + DeleteSchemaResponseObj, + SchemaObj, + GetArtifactResponseObj, + GetSchemaResponseObj, + ListSchemasResponseObj, + PagedQuery, + Principal, + RegisterArtifactRequest, + RegisterArtifactResponse, + SchemaValidationResults, + UpdatePermissionRequest, + UpdatePermissionResponse, + Variant } from "@here/olp-sdk-dataservice-api/lib/artifact-api"; import { ArtifactApi } from "@here/olp-sdk-dataservice-api"; import { mockedRequestBuilder } from "./MockedRequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("ArtifactApi", function() { - it("Artifact with all required params", function() { - const params: ArtifactObj = { - artifactId: "test", - created: "", - groupId: "test", - hrn: "test", - updated: "", - version: "test" - }; - - assert.isDefined(params); - }); - - it("ArtifactFile with all required params", function() { - const params: ArtifactFile = {}; - - assert.isDefined(params); - }); - - it("ArtifactFile with all required and optional params", function() { - const params: ArtifactFile = { - name: "test" - }; - - assert.isDefined(params); - }); - - it("DeleteArtifactResponse with all required params", function() { - const params: DeleteArtifactResponseObj = {}; - - assert.isDefined(params); - }); - - it("DeleteArtifactResponse with all required and optional params", function() { - const params: DeleteArtifactResponseObj = { - artifact: { - artifactId: "test", - created: "", - groupId: "test", - hrn: "test", - updated: "", - version: "test" - }, - files: ["test"] - }; - - assert.isDefined(params); - }); - - it("DeleteFileResponse with all required params", function() { - const params: DeleteFileResponseObj = {}; - - assert.isDefined(params); - }); - - it("DeleteFileResponse with all required and optional params", function() { - const params: DeleteFileResponseObj = { - artifact: { - artifactId: "test", - created: "", - groupId: "test", - hrn: "test", - updated: "", - version: "test" - }, - file: "test" - }; - - assert.isDefined(params); - }); - - it("DeleteSchemaResponse with all required params", function() { - const params: DeleteSchemaResponseObj = {}; - - assert.isDefined(params); - }); - - it("DeleteSchemaResponse with all required and optional params", function() { - const params: DeleteSchemaResponseObj = { - artifacts: [ - { - artifactId: "test", - created: "", - groupId: "test", - hrn: "test", - updated: "", - version: "test" - } - ], - schema: { - artifactId: "test", - created: "", - groupId: "test", - hrn: "test", - name: "test", - summary: "test", - updated: "", - version: "test" - } - }; - - assert.isDefined(params); - }); - - it("DeleteSchemaResponse with all required params", function() { - const params: DeleteSchemaResponseObj = {}; - - assert.isDefined(params); - }); - - it("DeleteSchemaResponse with all required and optional params", function() { - const params: DeleteSchemaResponseObj = { - artifacts: [ - { - artifactId: "test", - created: "", - groupId: "test", - hrn: "test", - updated: "", - version: "test" - } - ], - schema: { - artifactId: "test", - created: "", - groupId: "test", - hrn: "test", - name: "test", - summary: "test", - updated: "", - version: "test" - } - }; - - assert.isDefined(params); - }); - - it("Schema with all required params", function() { - const params: SchemaObj = { - artifactId: "test", - created: "", - groupId: "test", - hrn: "test", - name: "test", - updated: "", - version: "test" - }; - - assert.isDefined(params); - }); - - it("Schema with all required and optional params", function() { - const params: SchemaObj = { - artifactId: "test", - created: "", - groupId: "test", - hrn: "test", - name: "test", - summary: "test", - updated: "", - version: "test" - }; - - assert.isDefined(params); - }); - - it("GetArtifactResponse with all required params", function() { - const params: GetArtifactResponseObj = {}; - - assert.isDefined(params); - }); - - it("GetArtifactResponse with all required and optional params", function() { - const params: GetArtifactResponseObj = { - artifact: { - artifactId: "test", - created: "", - groupId: "test", - hrn: "test", - updated: "", - version: "test" - }, - files: [ - { - name: "test" - } - ] - }; - - assert.isDefined(params); - }); - - it("GetSchemaResponse with all required params", function() { - const params: GetSchemaResponseObj = {}; - - assert.isDefined(params); - }); - - it("GetSchemaResponse with all required and optional params", function() { - const params: GetSchemaResponseObj = { - artifacts: [ - { - artifactId: "test", - created: "", - groupId: "test", - hrn: "test", - updated: "", - version: "test" - } - ], - schema: { - artifactId: "test", - created: "", - groupId: "test", - hrn: "test", - name: "test", - updated: "", - version: "test" - }, - schemaValidationResults: [], - variants: [ - { - id: "test", - url: "test" - } - ] - }; - - assert.isDefined(params); - }); - - it("ListSchemasResponse with all required params", function() { - const params: ListSchemasResponseObj = {}; - - assert.isDefined(params); - }); - - it("ListSchemasResponse with all required and optional params", function() { - const params: ListSchemasResponseObj = { - items: [ - { - artifactId: "test", - created: "", - groupId: "test", - hrn: "test", - name: "test", - updated: "", - version: "test" - } - ], - next: "test", - page: { - order: "ASC", - sort: "test" - } - }; - - assert.isDefined(params); - }); - - it("PagedQuery with all required params", function() { - const params: PagedQuery = { - order: "ASC", - sort: "test" - }; - - assert.isDefined(params); - }); - - it("PagedQuery with all required and optional params", function() { - const params: PagedQuery = { - from: "test", - limit: 1, - order: "ASC", - sort: "test" - }; - - assert.isDefined(params); - }); - - it("Principal with all required params", function() { - const params: Principal = { - type: "User", - token: "test" - }; - - assert.isDefined(params); - }); - - it("RegisterArtifactRequest with all required params", function() { - const params: RegisterArtifactRequest = {}; - - assert.isDefined(params); - }); - - it("RegisterArtifactRequest with all required and optional params", function() { - const params: RegisterArtifactRequest = { - userId: "test" - }; - - assert.isDefined(params); - }); - - it("RegisterArtifactResponse with all required params", function() { - const params: RegisterArtifactResponse = {}; - - assert.isDefined(params); - }); - - it("RegisterArtifactResponse with all required and optional params", function() { - const params: RegisterArtifactResponse = { - artifactId: "test", - created: true, - groupId: "test", - hrnPrefix: "test" - }; - - assert.isDefined(params); - }); - - it("SchemaValidationResults with all required params", function() { - const params: SchemaValidationResults = { - module: "test" - }; - - assert.isDefined(params); - }); - - it("SchemaValidationResults with all required and optional params", function() { - const params: SchemaValidationResults = { - backwardsCompatibility: true, - fileExtension: true, - googleStyle: true, - majorVersionInPackage: true, - module: "test", - packageConsistency: true - }; - - assert.isDefined(params); - }); - - it("UpdatePermissionRequest with all required params", function() { - const params: UpdatePermissionRequest = { - principal: { - type: "User", - token: "test" - }, - permissions: ["READ"] - }; - - assert.isDefined(params); - }); - - it("UpdatePermissionRequest with all required and optional params", function() { - const params: UpdatePermissionRequest = { - principal: { - type: "User", - token: "test" - }, - permissions: ["READ"], - permitted: true - }; - - assert.isDefined(params); - }); - - it("UpdatePermissionResponse with all required params", function() { - const params: UpdatePermissionResponse = {}; - - assert.isDefined(params); - }); - - it("UpdatePermissionResponse with all required and optional params", function() { - const params: UpdatePermissionResponse = { - principal: { - type: "User", - token: "test" - }, - permissions: ["READ"], - permitted: true - }; - - assert.isDefined(params); - }); - - it("Variant with all required params", function() { - const params: Variant = { - id: "test", - url: "test" - }; - - assert.isDefined(params); - }); - - it("Test deleteArtifactUsingDELETE method with all required params", async function() { - const params = { - artifactHrn: "mocked-artifactHrn" - }; - - const result = await ArtifactApi.deleteArtifactUsingDELETE( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test deleteFileUsingDELETE method with all required params", async function() { - const params = { - artifactHrn: "mocked-artifactHrn", - fileName: "mocked-fileName" - }; - - const result = await ArtifactApi.deleteFileUsingDELETE( - mockedRequestBuilder, - params - ); - }); - - it("Test getArtifactFileUsingGET method with all required params", async function() { - const params = { - artifactHrn: "mocked-artifactHrn", - fileName: "mocked-fileName" - }; - - const result = await ArtifactApi.getArtifactFileUsingGET( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getArtifactUsingGET method with all required params", async function() { - const params = { - artifactHrn: "mocked-artifactHrn", - fileName: "mocked-fileName" - }; - - const result = await ArtifactApi.getArtifactUsingGET( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test putArtifactFileUsingPUT method with all required params", async function() { - const params = { - artifactHrn: "mocked-artifactHrn", - fileName: "mocked-fileName", - file: "mocked-file" - }; - - const result = await ArtifactApi.putArtifactFileUsingPUT( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test registerArtifactUsingPUT method with all required params", async function() { - const params = { - groupId: "mocked-groupId", - artifactId: "mocked-artifactId" - }; - - const result = await ArtifactApi.registerArtifactUsingPUT( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test registerArtifactUsingPUT method with all required and optional params", async function() { - const params = { - groupId: "mocked-groupId", - artifactId: "mocked-artifactId", - registerRequest: "mocked-registerRequest" as any - }; - - const result = await ArtifactApi.registerArtifactUsingPUT( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test deleteSchemaUsingDELETE method with all required params", async function() { - const params = { - schemaHrn: "mocked-schemaHrn" - }; - - const result = await ArtifactApi.deleteSchemaUsingDELETE( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getDocumentUsingGET method with all required params", async function() { - const params = { - schemaHrn: "mocked-schemaHrn", - file: "mocked-file" - }; - - const result = await ArtifactApi.getDocumentUsingGET( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getSchemaUsingGET( method with all required params", async function() { - const params = { - schemaHrn: "mocked-schemaHrn" - }; - - const result = await ArtifactApi.getSchemaUsingGET( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test listUsingGET method with all required params", async function() { - const params = {}; - - const result = await ArtifactApi.listUsingGET(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test listUsingGET method with all required and optional params", async function() { - const params = { - sort: "mocked-sort", - order: "mocked-order" as any, - from: "mocked-from", - limit: "mocked-limit" as any - }; - - const result = await ArtifactApi.listUsingGET(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test updateSchemaPermissionUsingPOST method with all required params", async function() { - const params = { - schemaHrn: "mocked-schemaHrn" - }; - - const result = await ArtifactApi.updateSchemaPermissionUsingPOST( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test updateSchemaPermissionUsingPOST method with all required and optional params", async function() { - const params = { - schemaHrn: "mocked-schemaHrn", - updatePermissionRequest: "mocked-updatePermissionRequest" as any - }; - - const result = await ArtifactApi.updateSchemaPermissionUsingPOST( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); +describe("ArtifactApi", function () { + it("Artifact with all required params", function () { + const params: ArtifactObj = { + artifactId: "test", + created: "", + groupId: "test", + hrn: "test", + updated: "", + version: "test" + }; + + assert.isDefined(params); + }); + + it("ArtifactFile with all required params", function () { + const params: ArtifactFile = {}; + + assert.isDefined(params); + }); + + it("ArtifactFile with all required and optional params", function () { + const params: ArtifactFile = { + name: "test" + }; + + assert.isDefined(params); + }); + + it("DeleteArtifactResponse with all required params", function () { + const params: DeleteArtifactResponseObj = {}; + + assert.isDefined(params); + }); + + it("DeleteArtifactResponse with all required and optional params", function () { + const params: DeleteArtifactResponseObj = { + artifact: { + artifactId: "test", + created: "", + groupId: "test", + hrn: "test", + updated: "", + version: "test" + }, + files: ["test"] + }; + + assert.isDefined(params); + }); + + it("DeleteFileResponse with all required params", function () { + const params: DeleteFileResponseObj = {}; + + assert.isDefined(params); + }); + + it("DeleteFileResponse with all required and optional params", function () { + const params: DeleteFileResponseObj = { + artifact: { + artifactId: "test", + created: "", + groupId: "test", + hrn: "test", + updated: "", + version: "test" + }, + file: "test" + }; + + assert.isDefined(params); + }); + + it("DeleteSchemaResponse with all required params", function () { + const params: DeleteSchemaResponseObj = {}; + + assert.isDefined(params); + }); + + it("DeleteSchemaResponse with all required and optional params", function () { + const params: DeleteSchemaResponseObj = { + artifacts: [ + { + artifactId: "test", + created: "", + groupId: "test", + hrn: "test", + updated: "", + version: "test" + } + ], + schema: { + artifactId: "test", + created: "", + groupId: "test", + hrn: "test", + name: "test", + summary: "test", + updated: "", + version: "test" + } + }; + + assert.isDefined(params); + }); + + it("DeleteSchemaResponse with all required params", function () { + const params: DeleteSchemaResponseObj = {}; + + assert.isDefined(params); + }); + + it("DeleteSchemaResponse with all required and optional params", function () { + const params: DeleteSchemaResponseObj = { + artifacts: [ + { + artifactId: "test", + created: "", + groupId: "test", + hrn: "test", + updated: "", + version: "test" + } + ], + schema: { + artifactId: "test", + created: "", + groupId: "test", + hrn: "test", + name: "test", + summary: "test", + updated: "", + version: "test" + } + }; + + assert.isDefined(params); + }); + + it("Schema with all required params", function () { + const params: SchemaObj = { + artifactId: "test", + created: "", + groupId: "test", + hrn: "test", + name: "test", + updated: "", + version: "test" + }; + + assert.isDefined(params); + }); + + it("Schema with all required and optional params", function () { + const params: SchemaObj = { + artifactId: "test", + created: "", + groupId: "test", + hrn: "test", + name: "test", + summary: "test", + updated: "", + version: "test" + }; + + assert.isDefined(params); + }); + + it("GetArtifactResponse with all required params", function () { + const params: GetArtifactResponseObj = {}; + + assert.isDefined(params); + }); + + it("GetArtifactResponse with all required and optional params", function () { + const params: GetArtifactResponseObj = { + artifact: { + artifactId: "test", + created: "", + groupId: "test", + hrn: "test", + updated: "", + version: "test" + }, + files: [ + { + name: "test" + } + ] + }; + + assert.isDefined(params); + }); + + it("GetSchemaResponse with all required params", function () { + const params: GetSchemaResponseObj = {}; + + assert.isDefined(params); + }); + + it("GetSchemaResponse with all required and optional params", function () { + const params: GetSchemaResponseObj = { + artifacts: [ + { + artifactId: "test", + created: "", + groupId: "test", + hrn: "test", + updated: "", + version: "test" + } + ], + schema: { + artifactId: "test", + created: "", + groupId: "test", + hrn: "test", + name: "test", + updated: "", + version: "test" + }, + schemaValidationResults: [], + variants: [ + { + id: "test", + url: "test" + } + ] + }; + + assert.isDefined(params); + }); + + it("ListSchemasResponse with all required params", function () { + const params: ListSchemasResponseObj = {}; + + assert.isDefined(params); + }); + + it("ListSchemasResponse with all required and optional params", function () { + const params: ListSchemasResponseObj = { + items: [ + { + artifactId: "test", + created: "", + groupId: "test", + hrn: "test", + name: "test", + updated: "", + version: "test" + } + ], + next: "test", + page: { + order: "ASC", + sort: "test" + } + }; + + assert.isDefined(params); + }); + + it("PagedQuery with all required params", function () { + const params: PagedQuery = { + order: "ASC", + sort: "test" + }; + + assert.isDefined(params); + }); + + it("PagedQuery with all required and optional params", function () { + const params: PagedQuery = { + from: "test", + limit: 1, + order: "ASC", + sort: "test" + }; + + assert.isDefined(params); + }); + + it("Principal with all required params", function () { + const params: Principal = { + type: "User", + token: "test" + }; + + assert.isDefined(params); + }); + + it("RegisterArtifactRequest with all required params", function () { + const params: RegisterArtifactRequest = {}; + + assert.isDefined(params); + }); + + it("RegisterArtifactRequest with all required and optional params", function () { + const params: RegisterArtifactRequest = { + userId: "test" + }; + + assert.isDefined(params); + }); + + it("RegisterArtifactResponse with all required params", function () { + const params: RegisterArtifactResponse = {}; + + assert.isDefined(params); + }); + + it("RegisterArtifactResponse with all required and optional params", function () { + const params: RegisterArtifactResponse = { + artifactId: "test", + created: true, + groupId: "test", + hrnPrefix: "test" + }; + + assert.isDefined(params); + }); + + it("SchemaValidationResults with all required params", function () { + const params: SchemaValidationResults = { + module: "test" + }; + + assert.isDefined(params); + }); + + it("SchemaValidationResults with all required and optional params", function () { + const params: SchemaValidationResults = { + backwardsCompatibility: true, + fileExtension: true, + googleStyle: true, + majorVersionInPackage: true, + module: "test", + packageConsistency: true + }; + + assert.isDefined(params); + }); + + it("UpdatePermissionRequest with all required params", function () { + const params: UpdatePermissionRequest = { + principal: { + type: "User", + token: "test" + }, + permissions: ["READ"] + }; + + assert.isDefined(params); + }); + + it("UpdatePermissionRequest with all required and optional params", function () { + const params: UpdatePermissionRequest = { + principal: { + type: "User", + token: "test" + }, + permissions: ["READ"], + permitted: true + }; + + assert.isDefined(params); + }); + + it("UpdatePermissionResponse with all required params", function () { + const params: UpdatePermissionResponse = {}; + + assert.isDefined(params); + }); + + it("UpdatePermissionResponse with all required and optional params", function () { + const params: UpdatePermissionResponse = { + principal: { + type: "User", + token: "test" + }, + permissions: ["READ"], + permitted: true + }; + + assert.isDefined(params); + }); + + it("Variant with all required params", function () { + const params: Variant = { + id: "test", + url: "test" + }; + + assert.isDefined(params); + }); + + it("Test deleteArtifactUsingDELETE method with all required params", async function () { + const params = { + artifactHrn: "mocked-artifactHrn" + }; + + const result = await ArtifactApi.deleteArtifactUsingDELETE( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test deleteFileUsingDELETE method with all required params", async function () { + const params = { + artifactHrn: "mocked-artifactHrn", + fileName: "mocked-fileName" + }; + + const result = await ArtifactApi.deleteFileUsingDELETE( + mockedRequestBuilder, + params + ); + }); + + it("Test getArtifactFileUsingGET method with all required params", async function () { + const params = { + artifactHrn: "mocked-artifactHrn", + fileName: "mocked-fileName" + }; + + const result = await ArtifactApi.getArtifactFileUsingGET( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getArtifactUsingGET method with all required params", async function () { + const params = { + artifactHrn: "mocked-artifactHrn", + fileName: "mocked-fileName" + }; + + const result = await ArtifactApi.getArtifactUsingGET( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test putArtifactFileUsingPUT method with all required params", async function () { + const params = { + artifactHrn: "mocked-artifactHrn", + fileName: "mocked-fileName", + file: "mocked-file" + }; + + const result = await ArtifactApi.putArtifactFileUsingPUT( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test registerArtifactUsingPUT method with all required params", async function () { + const params = { + groupId: "mocked-groupId", + artifactId: "mocked-artifactId" + }; + + const result = await ArtifactApi.registerArtifactUsingPUT( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test registerArtifactUsingPUT method with all required and optional params", async function () { + const params = { + groupId: "mocked-groupId", + artifactId: "mocked-artifactId", + registerRequest: "mocked-registerRequest" as any + }; + + const result = await ArtifactApi.registerArtifactUsingPUT( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test deleteSchemaUsingDELETE method with all required params", async function () { + const params = { + schemaHrn: "mocked-schemaHrn" + }; + + const result = await ArtifactApi.deleteSchemaUsingDELETE( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getDocumentUsingGET method with all required params", async function () { + const params = { + schemaHrn: "mocked-schemaHrn", + file: "mocked-file" + }; + + const result = await ArtifactApi.getDocumentUsingGET( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getSchemaUsingGET( method with all required params", async function () { + const params = { + schemaHrn: "mocked-schemaHrn" + }; + + const result = await ArtifactApi.getSchemaUsingGET( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test listUsingGET method with all required params", async function () { + const params = {}; + + const result = await ArtifactApi.listUsingGET( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test listUsingGET method with all required and optional params", async function () { + const params = { + sort: "mocked-sort", + order: "mocked-order" as any, + from: "mocked-from", + limit: "mocked-limit" as any + }; + + const result = await ArtifactApi.listUsingGET( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test updateSchemaPermissionUsingPOST method with all required params", async function () { + const params = { + schemaHrn: "mocked-schemaHrn" + }; + + const result = await ArtifactApi.updateSchemaPermissionUsingPOST( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test updateSchemaPermissionUsingPOST method with all required and optional params", async function () { + const params = { + schemaHrn: "mocked-schemaHrn", + updatePermissionRequest: "mocked-updatePermissionRequest" as any + }; + + const result = await ArtifactApi.updateSchemaPermissionUsingPOST( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); }); diff --git a/tests/integration/api-breaks/ArtifactClient.test.ts b/tests/integration/api-breaks/ArtifactClient.test.ts index f46d197c..2f014d59 100644 --- a/tests/integration/api-breaks/ArtifactClient.test.ts +++ b/tests/integration/api-breaks/ArtifactClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,75 +16,78 @@ * SPDX-License-Identifier: Apache-2.0 * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { ArtifactClient } from "@here/olp-sdk-dataservice-read"; import * as dataServiceRead from "@here/olp-sdk-dataservice-read"; import * as dataServiceApi from "@here/olp-sdk-dataservice-api"; import * as dataserviceCore from "@here/olp-sdk-core"; -chai.use(sinonChai); +describe("ArtifactClient", function () { + class ArtifactClientTest extends ArtifactClient { + constructor(settings: dataserviceCore.OlpClientSettings) { + super(settings); + } -const assert = chai.assert; -const expect = chai.expect; + public async getSchemaDetails( + schemaDetailsRequest: dataServiceRead.SchemaDetailsRequest + ): Promise { + return { + variants: [ + { + id: "test", + url: "test" + } + ] + }; + } -describe("ArtifactClient", function() { - class ArtifactClientTest extends ArtifactClient { - constructor(settings: dataserviceCore.OlpClientSettings) { - super(settings); + public async getSchema( + schemaRequest: dataServiceRead.SchemaRequest + ): Promise { + return new ArrayBuffer(162); + } } - public async getSchemaDetails( - schemaDetailsRequest: dataServiceRead.SchemaDetailsRequest - ): Promise { - return { - variants: [ - { - id: "test", - url: "test" - } - ] - }; - } - - public async getSchema( - schemaRequest: dataServiceRead.SchemaRequest - ): Promise { - return new ArrayBuffer(162); - } - } - - let settings = new dataserviceCore.OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }); + let settings = new dataserviceCore.OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }); - it("Shoud be initialized with arguments", async function() { - const artifactClient = new ArtifactClient(settings); - assert.isDefined(artifactClient); + it("Shoud be initialized with arguments", async function () { + const artifactClient = new ArtifactClient(settings); + assert.isDefined(artifactClient); - expect(artifactClient).to.be.instanceOf(ArtifactClient); - assert.isDefined(artifactClient.getSchemaDetails); - assert.isDefined(artifactClient.getSchema); - }); + expect(artifactClient).to.be.instanceOf(ArtifactClient); + assert.isDefined(artifactClient.getSchemaDetails); + assert.isDefined(artifactClient.getSchema); + }); - it("Test getSchemaDetails method with schemaDetailsRequest", async function() { - const artifactClient = new ArtifactClientTest(settings); + it("Test getSchemaDetails method with schemaDetailsRequest", async function () { + const artifactClient = new ArtifactClientTest(settings); - const response = await artifactClient.getSchemaDetails( - new dataServiceRead.SchemaDetailsRequest() - ); - assert.isDefined(response); - }); + const response = await artifactClient.getSchemaDetails( + new dataServiceRead.SchemaDetailsRequest() + ); + assert.isDefined(response); + }); - it("Test getSchema method with schemaRequest", async function() { - const artifactClient = new ArtifactClientTest(settings); + it("Test getSchema method with schemaRequest", async function () { + const artifactClient = new ArtifactClientTest(settings); - const response = await artifactClient.getSchema( - new dataServiceRead.SchemaRequest() - ); - assert.isDefined(response); - }); + const response = await artifactClient.getSchema( + new dataServiceRead.SchemaRequest() + ); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/AuthorizationApi.test.ts b/tests/integration/api-breaks/AuthorizationApi.test.ts index 70675a21..3abc004a 100644 --- a/tests/integration/api-breaks/AuthorizationApi.test.ts +++ b/tests/integration/api-breaks/AuthorizationApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,851 +17,867 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { AuthorizationAPI } from "@here/olp-sdk-dataservice-api"; import { mockedRequestBuilder } from "./MockedRequestBuilder"; import { ProjectPolicyListResponse } from "@here/olp-sdk-dataservice-api/lib/authorization-api-v1.1"; -chai.use(sinonChai); - -const assert = chai.assert; - -describe("Authorization API", function() { - it("ProjectPolicyListResponse with all required params", function() { - const params: ProjectPolicyListResponse = { - limit: 1, - total: 2 - }; - assert.isDefined(params); - }); - - it("getEntityGroupMembership", async function() { - AuthorizationAPI.getEntityGroupMembership(mockedRequestBuilder, { - member: "", - realm: "" - }); - - AuthorizationAPI.getEntityGroupMembership(mockedRequestBuilder, { - member: "", - realm: "", - count: 4, - pageToken: "" - }); - }); - - it("getEntityManagedGroups", async function() { - AuthorizationAPI.getEntityManagedGroups(mockedRequestBuilder, { - member: "", - realm: "" - }); - AuthorizationAPI.getEntityManagedGroups(mockedRequestBuilder, { - member: "", - realm: "", - count: 4, - pageToken: "" - }); - }); - - it("getRealmMember", async function() { - AuthorizationAPI.getRealmMember(mockedRequestBuilder, { - member: "", - realm: "" - }); - }); - - it("getRealmMembers", async function() { - AuthorizationAPI.getRealmMembers(mockedRequestBuilder, { - realm: "", - count: 4 - }); - - AuthorizationAPI.getRealmMembers(mockedRequestBuilder, { - realm: "", - count: 4, - pageToken: "", - entityType: "", - q: "" - }); - }); - - it("cancelRealmMemberInvite", async function() { - AuthorizationAPI.cancelRealmMemberInvite(mockedRequestBuilder, { - invite: "", - realm: "" - }); - }); - - it("createRealmMemberInvite", async function() { - AuthorizationAPI.createRealmMemberInvite(mockedRequestBuilder, { - body: { - emailAddress: "" - }, - realm: "" - }); - }); - - it("resendRealmMemberInvite", async function() { - AuthorizationAPI.resendRealmMemberInvite(mockedRequestBuilder, { - invite: "", - realm: "" - }); - }); - - it("searchRealmMemberInvites", async function() { - AuthorizationAPI.searchRealmMemberInvites(mockedRequestBuilder, { - realm: "" - }); - - AuthorizationAPI.searchRealmMemberInvites(mockedRequestBuilder, { - realm: "", - count: 4, - pageToken: "", - group: "" - }); - }); - - it("addGrant", async function() { - AuthorizationAPI.addGrant(mockedRequestBuilder, { - actionId: "", - entityId: "", - entityType: "", - resourceHrn: "" - }); - }); - - it("getGrant", async function() { - AuthorizationAPI.getGrant(mockedRequestBuilder, { - actionId: "", - entityId: "", - entityType: "", - resourceHrn: "" - }); - }); - - it("getGrants", async function() { - AuthorizationAPI.getGrants(mockedRequestBuilder, { - entityId: "", - entityType: "", - resourceHrn: "" - }); - }); - - it("listGrants", async function() { - AuthorizationAPI.listGrants(mockedRequestBuilder, { - resourceHrn: "" - }); - AuthorizationAPI.listGrants(mockedRequestBuilder, { - resourceHrn: "", - count: 4, - entityType: "", - pageToken: "" - }); - }); - - it("removeGrant", async function() { - AuthorizationAPI.removeGrant(mockedRequestBuilder, { - actionId: "", - entityId: "", - entityType: "", - resourceHrn: "" - }); - }); - - it("addRoleEntity", async function() { - AuthorizationAPI.addRoleEntity(mockedRequestBuilder, { - entity: "", - role: "" - }); - }); - - it("deleteRoleEntity", async function() { - AuthorizationAPI.deleteRoleEntity(mockedRequestBuilder, { - entity: "", - role: "" - }); - }); - - it("getEntityGroupMembership", async function() { - AuthorizationAPI.getEntityGroupMembership(mockedRequestBuilder, { - member: "", - realm: "" - }); - - AuthorizationAPI.getEntityGroupMembership(mockedRequestBuilder, { - member: "", - realm: "", - count: 4, - pageToken: "" +describe("Authorization API", function () { + it("ProjectPolicyListResponse with all required params", function () { + const params: ProjectPolicyListResponse = { + limit: 1, + total: 2 + }; + assert.isDefined(params); + }); + + it("getEntityGroupMembership", async function () { + AuthorizationAPI.getEntityGroupMembership(mockedRequestBuilder, { + member: "", + realm: "" + }); + + AuthorizationAPI.getEntityGroupMembership(mockedRequestBuilder, { + member: "", + realm: "", + count: 4, + pageToken: "" + }); + }); + + it("getEntityManagedGroups", async function () { + AuthorizationAPI.getEntityManagedGroups(mockedRequestBuilder, { + member: "", + realm: "" + }); + AuthorizationAPI.getEntityManagedGroups(mockedRequestBuilder, { + member: "", + realm: "", + count: 4, + pageToken: "" + }); + }); + + it("getRealmMember", async function () { + AuthorizationAPI.getRealmMember(mockedRequestBuilder, { + member: "", + realm: "" + }); + }); + + it("getRealmMembers", async function () { + AuthorizationAPI.getRealmMembers(mockedRequestBuilder, { + realm: "", + count: 4 + }); + + AuthorizationAPI.getRealmMembers(mockedRequestBuilder, { + realm: "", + count: 4, + pageToken: "", + entityType: "", + q: "" + }); + }); + + it("cancelRealmMemberInvite", async function () { + AuthorizationAPI.cancelRealmMemberInvite(mockedRequestBuilder, { + invite: "", + realm: "" + }); + }); + + it("createRealmMemberInvite", async function () { + AuthorizationAPI.createRealmMemberInvite(mockedRequestBuilder, { + body: { + emailAddress: "" + }, + realm: "" + }); + }); + + it("resendRealmMemberInvite", async function () { + AuthorizationAPI.resendRealmMemberInvite(mockedRequestBuilder, { + invite: "", + realm: "" + }); + }); + + it("searchRealmMemberInvites", async function () { + AuthorizationAPI.searchRealmMemberInvites(mockedRequestBuilder, { + realm: "" + }); + + AuthorizationAPI.searchRealmMemberInvites(mockedRequestBuilder, { + realm: "", + count: 4, + pageToken: "", + group: "" + }); + }); + + it("addGrant", async function () { + AuthorizationAPI.addGrant(mockedRequestBuilder, { + actionId: "", + entityId: "", + entityType: "", + resourceHrn: "" + }); + }); + + it("getGrant", async function () { + AuthorizationAPI.getGrant(mockedRequestBuilder, { + actionId: "", + entityId: "", + entityType: "", + resourceHrn: "" + }); + }); + + it("getGrants", async function () { + AuthorizationAPI.getGrants(mockedRequestBuilder, { + entityId: "", + entityType: "", + resourceHrn: "" + }); + }); + + it("listGrants", async function () { + AuthorizationAPI.listGrants(mockedRequestBuilder, { + resourceHrn: "" + }); + AuthorizationAPI.listGrants(mockedRequestBuilder, { + resourceHrn: "", + count: 4, + entityType: "", + pageToken: "" + }); + }); + + it("removeGrant", async function () { + AuthorizationAPI.removeGrant(mockedRequestBuilder, { + actionId: "", + entityId: "", + entityType: "", + resourceHrn: "" + }); + }); + + it("addRoleEntity", async function () { + AuthorizationAPI.addRoleEntity(mockedRequestBuilder, { + entity: "", + role: "" + }); + }); + + it("deleteRoleEntity", async function () { + AuthorizationAPI.deleteRoleEntity(mockedRequestBuilder, { + entity: "", + role: "" + }); }); - }); - it("getMyRoles", async function() { - AuthorizationAPI.getMyRoles(mockedRequestBuilder); - AuthorizationAPI.getMyRoles(mockedRequestBuilder, { - count: 4, - pageToken: "" - }); - }); + it("getEntityGroupMembership", async function () { + AuthorizationAPI.getEntityGroupMembership(mockedRequestBuilder, { + member: "", + realm: "" + }); - it("getRole", async function() { - AuthorizationAPI.getRole(mockedRequestBuilder, { - role: "" + AuthorizationAPI.getEntityGroupMembership(mockedRequestBuilder, { + member: "", + realm: "", + count: 4, + pageToken: "" + }); }); - }); - it("getRoleEntities", async function() { - AuthorizationAPI.getRoleEntities(mockedRequestBuilder, { - role: "" - }); + it("getMyRoles", async function () { + AuthorizationAPI.getMyRoles(mockedRequestBuilder); + AuthorizationAPI.getMyRoles(mockedRequestBuilder, { + count: 4, + pageToken: "" + }); + }); - AuthorizationAPI.getRoleEntities(mockedRequestBuilder, { - role: "", - count: 4, - pageToken: "" - }); - }); + it("getRole", async function () { + AuthorizationAPI.getRole(mockedRequestBuilder, { + role: "" + }); + }); - it("getRoleEntity", async function() { - AuthorizationAPI.getRoleEntity(mockedRequestBuilder, { - entity: "", - role: "" + it("getRoleEntities", async function () { + AuthorizationAPI.getRoleEntities(mockedRequestBuilder, { + role: "" + }); + + AuthorizationAPI.getRoleEntities(mockedRequestBuilder, { + role: "", + count: 4, + pageToken: "" + }); }); - }); - - it("getRolePermission", async function() { - AuthorizationAPI.getRolePermission(mockedRequestBuilder, { - permission: "", - role: "" + + it("getRoleEntity", async function () { + AuthorizationAPI.getRoleEntity(mockedRequestBuilder, { + entity: "", + role: "" + }); }); - }); - it("getRolePermissions", async function() { - AuthorizationAPI.getRolePermissions(mockedRequestBuilder, { - role: "" + it("getRolePermission", async function () { + AuthorizationAPI.getRolePermission(mockedRequestBuilder, { + permission: "", + role: "" + }); }); - AuthorizationAPI.getRolePermissions(mockedRequestBuilder, { - role: "", - count: 4, - pageToken: "" - }); - }); + it("getRolePermissions", async function () { + AuthorizationAPI.getRolePermissions(mockedRequestBuilder, { + role: "" + }); - it("getRoles", async function() { - AuthorizationAPI.getRoles(mockedRequestBuilder); - AuthorizationAPI.getRoles(mockedRequestBuilder, { - count: 4, - pageToken: "", - resource: "", - roleName: "" + AuthorizationAPI.getRolePermissions(mockedRequestBuilder, { + role: "", + count: 4, + pageToken: "" + }); }); - }); - it("addGroupMember", async function() { - AuthorizationAPI.addGroupMember(mockedRequestBuilder, { - groupId: "", - member: "" + it("getRoles", async function () { + AuthorizationAPI.getRoles(mockedRequestBuilder); + AuthorizationAPI.getRoles(mockedRequestBuilder, { + count: 4, + pageToken: "", + resource: "", + roleName: "" + }); }); - }); - it("createGroup", async function() { - AuthorizationAPI.createGroup(mockedRequestBuilder, { - body: { - name: "" - } + it("addGroupMember", async function () { + AuthorizationAPI.addGroupMember(mockedRequestBuilder, { + groupId: "", + member: "" + }); }); - }); - it("deleteGroup", async function() { - AuthorizationAPI.deleteGroup(mockedRequestBuilder, { - groupId: "" + it("createGroup", async function () { + AuthorizationAPI.createGroup(mockedRequestBuilder, { + body: { + name: "" + } + }); }); - }); - it("getGroup", async function() { - AuthorizationAPI.getGroup(mockedRequestBuilder, { - groupId: "" + it("deleteGroup", async function () { + AuthorizationAPI.deleteGroup(mockedRequestBuilder, { + groupId: "" + }); }); - }); - it("getGroupMember", async function() { - AuthorizationAPI.getGroupMember(mockedRequestBuilder, { - groupId: "", - member: "" + it("getGroup", async function () { + AuthorizationAPI.getGroup(mockedRequestBuilder, { + groupId: "" + }); }); - }); - it("getGroupMembers", async function() { - AuthorizationAPI.getGroupMembers(mockedRequestBuilder, { - groupId: "" + it("getGroupMember", async function () { + AuthorizationAPI.getGroupMember(mockedRequestBuilder, { + groupId: "", + member: "" + }); }); - AuthorizationAPI.getGroupMembers(mockedRequestBuilder, { - groupId: "", - count: 4, - entityType: "", - pageToken: "" - }); - }); - - it("getGroupRoles", async function() { - AuthorizationAPI.getGroupRoles(mockedRequestBuilder, { - groupId: "" - }); + it("getGroupMembers", async function () { + AuthorizationAPI.getGroupMembers(mockedRequestBuilder, { + groupId: "" + }); - AuthorizationAPI.getGroupRoles(mockedRequestBuilder, { - groupId: "", - count: 4, - pageToken: "" + AuthorizationAPI.getGroupMembers(mockedRequestBuilder, { + groupId: "", + count: 4, + entityType: "", + pageToken: "" + }); }); - }); - it("getGroups", async function() { - AuthorizationAPI.getGroups(mockedRequestBuilder); - AuthorizationAPI.getGroups(mockedRequestBuilder, { - count: 4, - pageToken: "", - q: "" - }); - }); + it("getGroupRoles", async function () { + AuthorizationAPI.getGroupRoles(mockedRequestBuilder, { + groupId: "" + }); - it("getMyGroups", async function() { - AuthorizationAPI.getMyGroups(mockedRequestBuilder); + AuthorizationAPI.getGroupRoles(mockedRequestBuilder, { + groupId: "", + count: 4, + pageToken: "" + }); + }); - AuthorizationAPI.getMyGroups(mockedRequestBuilder, { - count: 4, - pageToken: "" - }); - }); - - it("leaveGroup", async function() { - AuthorizationAPI.leaveGroup(mockedRequestBuilder, { - groupId: "" - }); - }); - - it("removeGroupMember", async function() { - AuthorizationAPI.removeGroupMember(mockedRequestBuilder, { - groupId: "", - member: "" - }); - }); - - it("updateGroup", async function() { - AuthorizationAPI.updateGroup(mockedRequestBuilder, { - body: { - name: "" - }, - groupId: "" - }); - }); - - it("addProjectMember", async function() { - AuthorizationAPI.addProjectMember(mockedRequestBuilder, { - member: "", - project: "" - }); - - AuthorizationAPI.addProjectMember(mockedRequestBuilder, { - member: "", - project: "", - xCorrelationID: "" - }); - }); - - it("addProjectResourceRelation", async function() { - AuthorizationAPI.addProjectResourceRelation(mockedRequestBuilder, { - body: {}, - project: "", - relation: "home", - resource: "", - type: "artifact" - }); - - AuthorizationAPI.addProjectResourceRelation(mockedRequestBuilder, { - body: {}, - project: "", - relation: "home", - resource: "", - type: "artifact", - xCorrelationID: "" - }); - }); - - it("checkProjectExistance", async function() { - AuthorizationAPI.checkProjectExistance(mockedRequestBuilder, { - project: "" - }); + it("getGroups", async function () { + AuthorizationAPI.getGroups(mockedRequestBuilder); + AuthorizationAPI.getGroups(mockedRequestBuilder, { + count: 4, + pageToken: "", + q: "" + }); + }); + + it("getMyGroups", async function () { + AuthorizationAPI.getMyGroups(mockedRequestBuilder); - AuthorizationAPI.checkProjectExistance(mockedRequestBuilder, { - project: "", - xCorrelationID: "" + AuthorizationAPI.getMyGroups(mockedRequestBuilder, { + count: 4, + pageToken: "" + }); }); - }); - it("createProject", async function() { - AuthorizationAPI.createProject(mockedRequestBuilder, { - body: { - id: "", - name: "" - } - }); - - AuthorizationAPI.createProject(mockedRequestBuilder, { - body: { - id: "", - name: "" - }, - xCorrelationID: "" - }); - }); - - it("deleteProject", async function() { - AuthorizationAPI.deleteProject(mockedRequestBuilder, { - project: "" - }); - - AuthorizationAPI.deleteProject(mockedRequestBuilder, { - project: "", - xCorrelationID: "" - }); - }); - - it("deleteProjectMember", async function() { - AuthorizationAPI.deleteProjectMember(mockedRequestBuilder, { - member: "", - project: "" - }); - - AuthorizationAPI.deleteProjectMember(mockedRequestBuilder, { - member: "", - project: "", - xCorrelationID: "" - }); - }); - - it("deleteProjectResourceReference", async function() { - AuthorizationAPI.deleteProjectResourceReference(mockedRequestBuilder, { - body: {}, - project: "", - relation: "", - resource: "" - }); - - AuthorizationAPI.deleteProjectResourceReference(mockedRequestBuilder, { - body: {}, - project: "", - relation: "", - resource: "", - xCorrelationID: "" - }); - }); - - it("deleteProjectResourceReference", async function() { - AuthorizationAPI.deleteProjectResourceReference(mockedRequestBuilder, { - body: {}, - project: "", - relation: "", - resource: "" - }); - - AuthorizationAPI.deleteProjectResourceReference(mockedRequestBuilder, { - body: {}, - project: "", - relation: "", - resource: "", - xCorrelationID: "" - }); - }); - - it("getAllProjectList", async function() { - AuthorizationAPI.getAllProjectList(mockedRequestBuilder, {}); - - AuthorizationAPI.getAllProjectList(mockedRequestBuilder, { - limit: 5, - pageToken: "", - xCorrelationID: "" - }); - }); - - it("getProject", async function() { - AuthorizationAPI.getProject(mockedRequestBuilder, { - project: "" - }); - AuthorizationAPI.getProject(mockedRequestBuilder, { - project: "", - xCorrelationID: "" - }); - }); - - it("getProjectList", async function() { - AuthorizationAPI.getProjectList(mockedRequestBuilder, {}); - AuthorizationAPI.getProjectList(mockedRequestBuilder, { - canManage: true, - isMember: true, - limit: 4, - pageToken: "", - xCorrelationID: "" - }); - }); - - it("getProjectMember", async function() { - AuthorizationAPI.getProjectMember(mockedRequestBuilder, { - member: "", - project: "" - }); - AuthorizationAPI.getProjectMember(mockedRequestBuilder, { - member: "", - project: "", - xCorrelationID: "" - }); - }); - - it("getProjectResource", async function() { - AuthorizationAPI.getProjectResource(mockedRequestBuilder, { - project: "", - resource: "" - }); - AuthorizationAPI.getProjectResource(mockedRequestBuilder, { - project: "", - resource: "", - relation: "home", - xCorrelationID: "" - }); - }); - - it("leaveProject", async function() { - AuthorizationAPI.leaveProject(mockedRequestBuilder, { - project: "" - }); - - AuthorizationAPI.leaveProject(mockedRequestBuilder, { - project: "", - xCorrelationID: "" - }); - }); - - it("listProjectMembers", async function() { - AuthorizationAPI.listProjectMembers(mockedRequestBuilder, { - project: "" - }); - - AuthorizationAPI.listProjectMembers(mockedRequestBuilder, { - project: "", - limit: 4, - onlyIncludeIdentities: true, - pageToken: "", - xCorrelationID: "" - }); - }); - - it("listProjectResources", async function() { - AuthorizationAPI.listProjectResources(mockedRequestBuilder, { - project: "" - }); - - AuthorizationAPI.listProjectResources(mockedRequestBuilder, { - project: "", - limit: 4, - pageToken: "", - relation: "home", - type: "artifact", - xCorrelationID: "" - }); - }); - - it("patchProject", async function() { - AuthorizationAPI.patchProject(mockedRequestBuilder, { - body: {}, - project: "" - }); - - AuthorizationAPI.patchProject(mockedRequestBuilder, { - body: {}, - project: "", - xCorrelationID: "" - }); - }); - - it("getListOfWaysResourceIsLinkable", async function() { - AuthorizationAPI.getListOfWaysResourceIsLinkable(mockedRequestBuilder, { - resource: "" - }); - - AuthorizationAPI.getListOfWaysResourceIsLinkable(mockedRequestBuilder, { - resource: "", - limit: 4, - pageToken: "", - xCorrelationID: "" - }); - }); - - it("getResource", async function() { - AuthorizationAPI.getResource(mockedRequestBuilder, { - referenceable: true, - resource: "" - }); - - AuthorizationAPI.getResource(mockedRequestBuilder, { - referenceable: true, - resource: "", - xCorrelationID: "" - }); - }); - - it("getResourceLinkability", async function() { - AuthorizationAPI.getResourceLinkability(mockedRequestBuilder, { - availableToHrn: "", - resource: "" - }); - - AuthorizationAPI.getResourceLinkability(mockedRequestBuilder, { - availableToHrn: "", - resource: "", - xCorrelationID: "" - }); - }); - - it("getResourceProjects", async function() { - AuthorizationAPI.getResourceProjects(mockedRequestBuilder, { - resource: "" - }); - - AuthorizationAPI.getResourceProjects(mockedRequestBuilder, { - resource: "", - limit: 4, - pageToken: "", - relation: "home", - xCorrelationID: "" - }); - }); - - it("getResources", async function() { - AuthorizationAPI.getResources(mockedRequestBuilder, { - type: "artifact" - }); - - AuthorizationAPI.getResources(mockedRequestBuilder, { - type: "artifact", - access: "", - limit: 4, - linkable: true, - pageToken: "", - referenceable: true, - xCorrelationID: "" - }); - }); + it("leaveGroup", async function () { + AuthorizationAPI.leaveGroup(mockedRequestBuilder, { + groupId: "" + }); + }); - it("listRealmResources", async function() { - AuthorizationAPI.listRealmResources(mockedRequestBuilder, {}); - AuthorizationAPI.listRealmResources(mockedRequestBuilder, { - limit: 4, - pageToken: "", - type: "artifact", - xCorrelationID: "" + it("removeGroupMember", async function () { + AuthorizationAPI.removeGroupMember(mockedRequestBuilder, { + groupId: "", + member: "" + }); + }); + + it("updateGroup", async function () { + AuthorizationAPI.updateGroup(mockedRequestBuilder, { + body: { + name: "" + }, + groupId: "" + }); + }); + + it("addProjectMember", async function () { + AuthorizationAPI.addProjectMember(mockedRequestBuilder, { + member: "", + project: "" + }); + + AuthorizationAPI.addProjectMember(mockedRequestBuilder, { + member: "", + project: "", + xCorrelationID: "" + }); + }); + + it("addProjectResourceRelation", async function () { + AuthorizationAPI.addProjectResourceRelation(mockedRequestBuilder, { + body: {}, + project: "", + relation: "home", + resource: "", + type: "artifact" + }); + + AuthorizationAPI.addProjectResourceRelation(mockedRequestBuilder, { + body: {}, + project: "", + relation: "home", + resource: "", + type: "artifact", + xCorrelationID: "" + }); + }); + + it("checkProjectExistance", async function () { + AuthorizationAPI.checkProjectExistance(mockedRequestBuilder, { + project: "" + }); + + AuthorizationAPI.checkProjectExistance(mockedRequestBuilder, { + project: "", + xCorrelationID: "" + }); + }); + + it("createProject", async function () { + AuthorizationAPI.createProject(mockedRequestBuilder, { + body: { + id: "", + name: "" + } + }); + + AuthorizationAPI.createProject(mockedRequestBuilder, { + body: { + id: "", + name: "" + }, + xCorrelationID: "" + }); + }); + + it("deleteProject", async function () { + AuthorizationAPI.deleteProject(mockedRequestBuilder, { + project: "" + }); + + AuthorizationAPI.deleteProject(mockedRequestBuilder, { + project: "", + xCorrelationID: "" + }); + }); + + it("deleteProjectMember", async function () { + AuthorizationAPI.deleteProjectMember(mockedRequestBuilder, { + member: "", + project: "" + }); + + AuthorizationAPI.deleteProjectMember(mockedRequestBuilder, { + member: "", + project: "", + xCorrelationID: "" + }); + }); + + it("deleteProjectResourceReference", async function () { + AuthorizationAPI.deleteProjectResourceReference(mockedRequestBuilder, { + body: {}, + project: "", + relation: "", + resource: "" + }); + + AuthorizationAPI.deleteProjectResourceReference(mockedRequestBuilder, { + body: {}, + project: "", + relation: "", + resource: "", + xCorrelationID: "" + }); + }); + + it("deleteProjectResourceReference", async function () { + AuthorizationAPI.deleteProjectResourceReference(mockedRequestBuilder, { + body: {}, + project: "", + relation: "", + resource: "" + }); + + AuthorizationAPI.deleteProjectResourceReference(mockedRequestBuilder, { + body: {}, + project: "", + relation: "", + resource: "", + xCorrelationID: "" + }); + }); + + it("getAllProjectList", async function () { + AuthorizationAPI.getAllProjectList(mockedRequestBuilder, {}); + + AuthorizationAPI.getAllProjectList(mockedRequestBuilder, { + limit: 5, + pageToken: "", + xCorrelationID: "" + }); + }); + + it("getProject", async function () { + AuthorizationAPI.getProject(mockedRequestBuilder, { + project: "" + }); + AuthorizationAPI.getProject(mockedRequestBuilder, { + project: "", + xCorrelationID: "" + }); + }); + + it("getProjectList", async function () { + AuthorizationAPI.getProjectList(mockedRequestBuilder, {}); + AuthorizationAPI.getProjectList(mockedRequestBuilder, { + canManage: true, + isMember: true, + limit: 4, + pageToken: "", + xCorrelationID: "" + }); + }); + + it("getProjectMember", async function () { + AuthorizationAPI.getProjectMember(mockedRequestBuilder, { + member: "", + project: "" + }); + AuthorizationAPI.getProjectMember(mockedRequestBuilder, { + member: "", + project: "", + xCorrelationID: "" + }); + }); + + it("getProjectResource", async function () { + AuthorizationAPI.getProjectResource(mockedRequestBuilder, { + project: "", + resource: "" + }); + AuthorizationAPI.getProjectResource(mockedRequestBuilder, { + project: "", + resource: "", + relation: "home", + xCorrelationID: "" + }); + }); + + it("leaveProject", async function () { + AuthorizationAPI.leaveProject(mockedRequestBuilder, { + project: "" + }); + + AuthorizationAPI.leaveProject(mockedRequestBuilder, { + project: "", + xCorrelationID: "" + }); + }); + + it("listProjectMembers", async function () { + AuthorizationAPI.listProjectMembers(mockedRequestBuilder, { + project: "" + }); + + AuthorizationAPI.listProjectMembers(mockedRequestBuilder, { + project: "", + limit: 4, + onlyIncludeIdentities: true, + pageToken: "", + xCorrelationID: "" + }); + }); + + it("listProjectResources", async function () { + AuthorizationAPI.listProjectResources(mockedRequestBuilder, { + project: "" + }); + + AuthorizationAPI.listProjectResources(mockedRequestBuilder, { + project: "", + limit: 4, + pageToken: "", + relation: "home", + type: "artifact", + xCorrelationID: "" + }); + }); + + it("patchProject", async function () { + AuthorizationAPI.patchProject(mockedRequestBuilder, { + body: {}, + project: "" + }); + + AuthorizationAPI.patchProject(mockedRequestBuilder, { + body: {}, + project: "", + xCorrelationID: "" + }); + }); + + it("getListOfWaysResourceIsLinkable", async function () { + AuthorizationAPI.getListOfWaysResourceIsLinkable(mockedRequestBuilder, { + resource: "" + }); + + AuthorizationAPI.getListOfWaysResourceIsLinkable(mockedRequestBuilder, { + resource: "", + limit: 4, + pageToken: "", + xCorrelationID: "" + }); + }); + + it("getResource", async function () { + AuthorizationAPI.getResource(mockedRequestBuilder, { + referenceable: true, + resource: "" + }); + + AuthorizationAPI.getResource(mockedRequestBuilder, { + referenceable: true, + resource: "", + xCorrelationID: "" + }); + }); + + it("getResourceLinkability", async function () { + AuthorizationAPI.getResourceLinkability(mockedRequestBuilder, { + availableToHrn: "", + resource: "" + }); + + AuthorizationAPI.getResourceLinkability(mockedRequestBuilder, { + availableToHrn: "", + resource: "", + xCorrelationID: "" + }); + }); + + it("getResourceProjects", async function () { + AuthorizationAPI.getResourceProjects(mockedRequestBuilder, { + resource: "" + }); + + AuthorizationAPI.getResourceProjects(mockedRequestBuilder, { + resource: "", + limit: 4, + pageToken: "", + relation: "home", + xCorrelationID: "" + }); + }); + + it("getResources", async function () { + AuthorizationAPI.getResources(mockedRequestBuilder, { + type: "artifact" + }); + + AuthorizationAPI.getResources(mockedRequestBuilder, { + type: "artifact", + access: "", + limit: 4, + linkable: true, + pageToken: "", + referenceable: true, + xCorrelationID: "" + }); + }); + + it("listRealmResources", async function () { + AuthorizationAPI.listRealmResources(mockedRequestBuilder, {}); + AuthorizationAPI.listRealmResources(mockedRequestBuilder, { + limit: 4, + pageToken: "", + type: "artifact", + xCorrelationID: "" + }); + }); + + it("makeResourceLinkable", async function () { + AuthorizationAPI.makeResourceLinkable(mockedRequestBuilder, { + body: { + allowedActions: [] + }, + resource: "" + }); + + AuthorizationAPI.makeResourceLinkable(mockedRequestBuilder, { + body: { + allowedActions: [] + }, + resource: "", + xCorrelationID: "" + }); + }); + + it("removeResourceLinkability", async function () { + AuthorizationAPI.removeResourceLinkability(mockedRequestBuilder, { + availableToHrn: "", + resource: "" + }); + + AuthorizationAPI.removeResourceLinkability(mockedRequestBuilder, { + availableToHrn: "", + resource: "", + xCorrelationID: "" + }); + }); + + it("updateResourceLinkability", async function () { + AuthorizationAPI.updateResourceLinkability(mockedRequestBuilder, { + availableToHrn: "", + resource: "", + body: { + allowedActions: [] + } + }); + + AuthorizationAPI.updateResourceLinkability(mockedRequestBuilder, { + availableToHrn: "", + resource: "", + body: { + allowedActions: [] + }, + xCorrelationID: "" + }); + }); + + it("attachProjectPolicyToMember", async function () { + AuthorizationAPI.attachProjectPolicyToMember(mockedRequestBuilder, { + member: "", + policy: "", + project: "" + }); + }); + + it("createProjectPolicy", async function () { + AuthorizationAPI.createProjectPolicy(mockedRequestBuilder, { + body: { + id: "", + name: "", + permissions: [ + { + allowedActions: [""] + } + ] + }, + project: "" + }); + }); + + it("deleteProjectPolicy", async function () { + AuthorizationAPI.deleteProjectPolicy(mockedRequestBuilder, { + policy: "", + project: "" + }); + }); + + it("detachProjectPolicyFromMember", async function () { + AuthorizationAPI.detachProjectPolicyFromMember(mockedRequestBuilder, { + member: "", + policy: "", + project: "" + }); + }); + + it("getAllProjectMembersWithAttachedPolicy", async function () { + AuthorizationAPI.getAllProjectMembersWithAttachedPolicy( + mockedRequestBuilder, + { + policy: "", + project: "" + } + ); + + AuthorizationAPI.getAllProjectMembersWithAttachedPolicy( + mockedRequestBuilder, + { + policy: "", + project: "", + limit: 4, + pageToken: "", + xCorrelationID: "" + } + ); + }); + + it("getAttachedProjectPoliciesForMember", async function () { + AuthorizationAPI.getAttachedProjectPoliciesForMember( + mockedRequestBuilder, + { + member: "", + project: "" + } + ); + + AuthorizationAPI.getAttachedProjectPoliciesForMember( + mockedRequestBuilder, + { + member: "", + project: "", + limit: 4, + pageToken: "", + xCorrelationID: "" + } + ); + }); + + it("getAttachedProjectPolicyForMember", async function () { + AuthorizationAPI.getAttachedProjectPolicyForMember( + mockedRequestBuilder, + { + member: "", + policy: "", + project: "" + } + ); + }); + + it("getProjectPolicy", async function () { + AuthorizationAPI.getProjectPolicy(mockedRequestBuilder, { + policy: "", + project: "" + }); + }); + + it("getProjectPolicyList", async function () { + AuthorizationAPI.getProjectPolicyList(mockedRequestBuilder, { + project: "" + }); + + AuthorizationAPI.getProjectPolicyList(mockedRequestBuilder, { + project: "", + limit: 4, + pageToken: "", + projectPolicyType: "", + xCorrelationID: "" + }); + }); + + it("setAttachedProjectPoliciesToMember", async function () { + AuthorizationAPI.setAttachedProjectPoliciesToMember( + mockedRequestBuilder, + { + body: [], + member: "", + project: "" + } + ); + }); + + it("updateProjectPolicy", async function () { + AuthorizationAPI.updateProjectPolicy(mockedRequestBuilder, { + body: { + id: "", + name: "", + permissions: [] + }, + policy: "", + project: "" + }); + }); + + it("getResourceActionsForProject", async function () { + AuthorizationAPI.getResourceActionsForProject(mockedRequestBuilder, { + project: "", + resource: "", + type: "" + }); + + AuthorizationAPI.getResourceActionsForProject(mockedRequestBuilder, { + project: "", + resource: "", + type: "", + xCorrelationID: "" + }); + }); + + it("getResourceTypeActionList", async function () { + AuthorizationAPI.getResourceTypeActionList(mockedRequestBuilder, { + resourceType: "artifact", + type: "" + }); + + AuthorizationAPI.getResourceTypeActionList(mockedRequestBuilder, { + resourceType: "artifact", + type: "", + xCorrelationID: "" + }); }); - }); - - it("makeResourceLinkable", async function() { - AuthorizationAPI.makeResourceLinkable(mockedRequestBuilder, { - body: { - allowedActions: [] - }, - resource: "" - }); - - AuthorizationAPI.makeResourceLinkable(mockedRequestBuilder, { - body: { - allowedActions: [] - }, - resource: "", - xCorrelationID: "" - }); - }); - - it("removeResourceLinkability", async function() { - AuthorizationAPI.removeResourceLinkability(mockedRequestBuilder, { - availableToHrn: "", - resource: "" - }); - - AuthorizationAPI.removeResourceLinkability(mockedRequestBuilder, { - availableToHrn: "", - resource: "", - xCorrelationID: "" - }); - }); - - it("updateResourceLinkability", async function() { - AuthorizationAPI.updateResourceLinkability(mockedRequestBuilder, { - availableToHrn: "", - resource: "", - body: { - allowedActions: [] - } - }); - - AuthorizationAPI.updateResourceLinkability(mockedRequestBuilder, { - availableToHrn: "", - resource: "", - body: { - allowedActions: [] - }, - xCorrelationID: "" - }); - }); - - it("attachProjectPolicyToMember", async function() { - AuthorizationAPI.attachProjectPolicyToMember(mockedRequestBuilder, { - member: "", - policy: "", - project: "" - }); - }); - - it("createProjectPolicy", async function() { - AuthorizationAPI.createProjectPolicy(mockedRequestBuilder, { - body: { - id: "", - name: "", - permissions: [ - { - allowedActions: [""] - } - ] - }, - project: "" - }); - }); - - it("deleteProjectPolicy", async function() { - AuthorizationAPI.deleteProjectPolicy(mockedRequestBuilder, { - policy: "", - project: "" - }); - }); - - it("detachProjectPolicyFromMember", async function() { - AuthorizationAPI.detachProjectPolicyFromMember(mockedRequestBuilder, { - member: "", - policy: "", - project: "" - }); - }); - - it("getAllProjectMembersWithAttachedPolicy", async function() { - AuthorizationAPI.getAllProjectMembersWithAttachedPolicy( - mockedRequestBuilder, - { - policy: "", - project: "" - } - ); - - AuthorizationAPI.getAllProjectMembersWithAttachedPolicy( - mockedRequestBuilder, - { - policy: "", - project: "", - limit: 4, - pageToken: "", - xCorrelationID: "" - } - ); - }); - - it("getAttachedProjectPoliciesForMember", async function() { - AuthorizationAPI.getAttachedProjectPoliciesForMember(mockedRequestBuilder, { - member: "", - project: "" - }); - - AuthorizationAPI.getAttachedProjectPoliciesForMember(mockedRequestBuilder, { - member: "", - project: "", - limit: 4, - pageToken: "", - xCorrelationID: "" - }); - }); - - it("getAttachedProjectPolicyForMember", async function() { - AuthorizationAPI.getAttachedProjectPolicyForMember(mockedRequestBuilder, { - member: "", - policy: "", - project: "" - }); - }); - - it("getProjectPolicy", async function() { - AuthorizationAPI.getProjectPolicy(mockedRequestBuilder, { - policy: "", - project: "" - }); - }); - - it("getProjectPolicyList", async function() { - AuthorizationAPI.getProjectPolicyList(mockedRequestBuilder, { - project: "" - }); - - AuthorizationAPI.getProjectPolicyList(mockedRequestBuilder, { - project: "", - limit: 4, - pageToken: "", - projectPolicyType: "", - xCorrelationID: "" - }); - }); - - it("setAttachedProjectPoliciesToMember", async function() { - AuthorizationAPI.setAttachedProjectPoliciesToMember(mockedRequestBuilder, { - body: [], - member: "", - project: "" - }); - }); - - it("updateProjectPolicy", async function() { - AuthorizationAPI.updateProjectPolicy(mockedRequestBuilder, { - body: { - id: "", - name: "", - permissions: [] - }, - policy: "", - project: "" - }); - }); - - it("getResourceActionsForProject", async function() { - AuthorizationAPI.getResourceActionsForProject(mockedRequestBuilder, { - project: "", - resource: "", - type: "" - }); - - AuthorizationAPI.getResourceActionsForProject(mockedRequestBuilder, { - project: "", - resource: "", - type: "", - xCorrelationID: "" - }); - }); - - it("getResourceTypeActionList", async function() { - AuthorizationAPI.getResourceTypeActionList(mockedRequestBuilder, { - resourceType: "artifact", - type: "" - }); - - AuthorizationAPI.getResourceTypeActionList(mockedRequestBuilder, { - resourceType: "artifact", - type: "", - xCorrelationID: "" - }); - }); }); diff --git a/tests/integration/api-breaks/BlobApi.test.ts b/tests/integration/api-breaks/BlobApi.test.ts index 30d0da63..92f97568 100644 --- a/tests/integration/api-breaks/BlobApi.test.ts +++ b/tests/integration/api-breaks/BlobApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,357 +17,360 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { BlobApi } from "@here/olp-sdk-dataservice-api"; import { - BlobInitResponse, - BlobInitResponseCancelLink, - BlobInitResponseCompleteLink, - BlobInitResponseLinks, - BlobInitResponseStatusLink, - BlobInitResponseUploadPartLink, - MultipartCompletePart, - MultipartCompleteRequest, - MultipartUploadMetadata, - MultipartUploadStatus + BlobInitResponse, + BlobInitResponseCancelLink, + BlobInitResponseCompleteLink, + BlobInitResponseLinks, + BlobInitResponseStatusLink, + BlobInitResponseUploadPartLink, + MultipartCompletePart, + MultipartCompleteRequest, + MultipartUploadMetadata, + MultipartUploadStatus } from "@here/olp-sdk-dataservice-api/lib/blob-api"; import { mockedRequestBuilder } from "./MockedRequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("BlobApi", function() { - it("BlobInitResponse with all required params", function() { - const params: BlobInitResponse = {}; - - assert.isDefined(params); - }); - - it("BlobInitResponse with all required and optional params", function() { - const params: BlobInitResponse = { - links: { - complete: { - href: "test", - method: "test" - }, - - _delete: { - href: "test", - method: "test" - }, - - status: { - href: "test", - method: "test" - }, - - uploadPart: { - href: "test", - method: "test" - } - } - }; - - assert.isDefined(params); - }); - - it("BlobInitResponseCancelLink with all required params", function() { - const params: BlobInitResponseCancelLink = {}; - - assert.isDefined(params); - }); - - it("BlobInitResponseCancelLink with all required and optional params", function() { - const params: BlobInitResponseCancelLink = { - href: "test", - method: "test" - }; - - assert.isDefined(params); - }); - - it("BlobInitResponseCompleteLink with all required params", function() { - const params: BlobInitResponseCompleteLink = {}; +describe("BlobApi", function () { + it("BlobInitResponse with all required params", function () { + const params: BlobInitResponse = {}; + + assert.isDefined(params); + }); + + it("BlobInitResponse with all required and optional params", function () { + const params: BlobInitResponse = { + links: { + complete: { + href: "test", + method: "test" + }, + + _delete: { + href: "test", + method: "test" + }, + + status: { + href: "test", + method: "test" + }, + + uploadPart: { + href: "test", + method: "test" + } + } + }; + + assert.isDefined(params); + }); + + it("BlobInitResponseCancelLink with all required params", function () { + const params: BlobInitResponseCancelLink = {}; + + assert.isDefined(params); + }); + + it("BlobInitResponseCancelLink with all required and optional params", function () { + const params: BlobInitResponseCancelLink = { + href: "test", + method: "test" + }; + + assert.isDefined(params); + }); - assert.isDefined(params); - }); - - it("BlobInitResponseCompleteLink with all required and optional params", function() { - const params: BlobInitResponseCompleteLink = { - href: "test", - method: "test" - }; - - assert.isDefined(params); - }); - - it("BlobInitResponseLinks with all required params", function() { - const params: BlobInitResponseLinks = {}; - - assert.isDefined(params); - }); - - it("BlobInitResponseLinks with all required and optional params", function() { - const params: BlobInitResponseLinks = { - complete: { - href: "test", - method: "test" - }, - - _delete: { - href: "test", - method: "test" - }, - - status: { - href: "test", - method: "test" - }, - - uploadPart: { - href: "test", - method: "test" - } - }; - - assert.isDefined(params); - }); - - it("BlobInitResponseStatusLink with all required params", function() { - const params: BlobInitResponseStatusLink = {}; - - assert.isDefined(params); - }); - - it("BlobInitResponseStatusLink with all required and optional params", function() { - const params: BlobInitResponseStatusLink = { - href: "test", - method: "test" - }; - - assert.isDefined(params); - }); - - it("BlobInitResponseUploadPartLink with all required params", function() { - const params: BlobInitResponseUploadPartLink = {}; - - assert.isDefined(params); - }); - - it("BlobInitResponseUploadPartLink with all required and optional params", function() { - const params: BlobInitResponseUploadPartLink = { - href: "test", - method: "test" - }; - - assert.isDefined(params); - }); - - it("MultipartCompletePart with all required params", function() { - const params: MultipartCompletePart = {}; - - assert.isDefined(params); - }); - - it("MultipartCompletePart with all required and optional params", function() { - const params: MultipartCompletePart = { - etag: "test", - number: 1 - }; - - assert.isDefined(params); - }); - - it("MultipartCompleteRequest with all required params", function() { - const params: MultipartCompleteRequest = {}; - - assert.isDefined(params); - }); - - it("MultipartCompleteRequest with all required and optional params", function() { - const params: MultipartCompleteRequest = { - parts: [ - { - etag: "test", - number: 1 - } - ] - }; - - assert.isDefined(params); - }); - - it("MultipartUploadMetadata with all required params", function() { - const params: MultipartUploadMetadata = { - contentType: "test" - }; - - assert.isDefined(params); - }); - - it("MultipartUploadMetadata with all required and optional params", function() { - const params: MultipartUploadMetadata = { - contentEncoding: "gzip", - contentType: "test" - }; - - assert.isDefined(params); - }); - - it("MultipartUploadStatus with all required params", function() { - const params: MultipartUploadStatus = {}; - - assert.isDefined(params); - }); - - it("MultipartUploadStatus with all required and optional params", function() { - const params: MultipartUploadStatus = { - status: "failed" - }; - - assert.isDefined(params); - }); - - it("Test cancelMultipartUpload method with all required params", async function() { - const params = { - layerId: "mocked-id", - dataHandle: "mocked-datahandle", - multiPartToken: "mocked-multiPartToken" - }; - - const result = await BlobApi.cancelMultipartUpload( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test cancelMultipartUpload method with all required and optional params", async function() { - const params = { - layerId: "mocked-id", - dataHandle: "mocked-datahandle", - multiPartToken: "mocked-multiPartToken", - billingTag: "mocked-billingTag" - }; - - const result = await BlobApi.cancelMultipartUpload( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test deleteBlob method with all required params", async function() { - const params = { - layerId: "mocked-id", - dataHandle: "mocked-datahandle" - }; - - const result = await BlobApi.deleteBlob(mockedRequestBuilder, params); - }); - - it("Test deleteBlob method with all required and optional params", async function() { - const params = { - layerId: "mocked-id", - dataHandle: "mocked-datahandle", - billingTag: "mocked-billingTag" - }; - - const result = await BlobApi.deleteBlob(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test getBlob method with all required params", async function() { - const params = { - layerId: "mocked-id", - dataHandle: "mocked-datahandle", - billingTag: "mocked-billingTag" - }; - - const result = await BlobApi.getBlob(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test getBlob method with all required and optional params", async function() { - const params = { - layerId: "mocked-id", - dataHandle: "mocked-datahandle", - billingTag: "mocked-billingTag", - range: "mocked-range" - }; - - const result = await BlobApi.getBlob(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test getMultipartUploadStatus method with all required params", async function() { - const params = { - layerId: "mocked-id", - dataHandle: "mocked-datahandle", - multiPartToken: "mocked-multiPartToken" - }; - - const result = await BlobApi.getMultipartUploadStatus( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getMultipartUploadStatus method with all required and optional params", async function() { - const params = { - layerId: "mocked-id", - dataHandle: "mocked-datahandle", - billingTag: "mocked-billingTag", - multiPartToken: "mocked-multiPartToken" - }; - - const result = await BlobApi.getMultipartUploadStatus( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test startMultipartUpload method with all required params", async function() { - const params = { - layerId: "mocked-id", - dataHandle: "mocked-datahandle", - billingTag: "mocked-billingTag" - }; - - const result = await BlobApi.startMultipartUpload( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test startMultipartUpload method with all required and optional params", async function() { - const params = { - layerId: "mocked-id", - dataHandle: "mocked-datahandle", - billingTag: "mocked-billingTag", - body: "mocked-body" as any - }; - - const result = await BlobApi.startMultipartUpload( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); + it("BlobInitResponseCompleteLink with all required params", function () { + const params: BlobInitResponseCompleteLink = {}; + + assert.isDefined(params); + }); + + it("BlobInitResponseCompleteLink with all required and optional params", function () { + const params: BlobInitResponseCompleteLink = { + href: "test", + method: "test" + }; + + assert.isDefined(params); + }); + + it("BlobInitResponseLinks with all required params", function () { + const params: BlobInitResponseLinks = {}; + + assert.isDefined(params); + }); + + it("BlobInitResponseLinks with all required and optional params", function () { + const params: BlobInitResponseLinks = { + complete: { + href: "test", + method: "test" + }, + + _delete: { + href: "test", + method: "test" + }, + + status: { + href: "test", + method: "test" + }, + + uploadPart: { + href: "test", + method: "test" + } + }; + + assert.isDefined(params); + }); + + it("BlobInitResponseStatusLink with all required params", function () { + const params: BlobInitResponseStatusLink = {}; + + assert.isDefined(params); + }); + + it("BlobInitResponseStatusLink with all required and optional params", function () { + const params: BlobInitResponseStatusLink = { + href: "test", + method: "test" + }; + + assert.isDefined(params); + }); + + it("BlobInitResponseUploadPartLink with all required params", function () { + const params: BlobInitResponseUploadPartLink = {}; + + assert.isDefined(params); + }); + + it("BlobInitResponseUploadPartLink with all required and optional params", function () { + const params: BlobInitResponseUploadPartLink = { + href: "test", + method: "test" + }; + + assert.isDefined(params); + }); + + it("MultipartCompletePart with all required params", function () { + const params: MultipartCompletePart = {}; + + assert.isDefined(params); + }); + + it("MultipartCompletePart with all required and optional params", function () { + const params: MultipartCompletePart = { + etag: "test", + number: 1 + }; + + assert.isDefined(params); + }); + + it("MultipartCompleteRequest with all required params", function () { + const params: MultipartCompleteRequest = {}; + + assert.isDefined(params); + }); + + it("MultipartCompleteRequest with all required and optional params", function () { + const params: MultipartCompleteRequest = { + parts: [ + { + etag: "test", + number: 1 + } + ] + }; + + assert.isDefined(params); + }); + + it("MultipartUploadMetadata with all required params", function () { + const params: MultipartUploadMetadata = { + contentType: "test" + }; + + assert.isDefined(params); + }); + + it("MultipartUploadMetadata with all required and optional params", function () { + const params: MultipartUploadMetadata = { + contentEncoding: "gzip", + contentType: "test" + }; + + assert.isDefined(params); + }); + + it("MultipartUploadStatus with all required params", function () { + const params: MultipartUploadStatus = {}; + + assert.isDefined(params); + }); + + it("MultipartUploadStatus with all required and optional params", function () { + const params: MultipartUploadStatus = { + status: "failed" + }; + + assert.isDefined(params); + }); + + it("Test cancelMultipartUpload method with all required params", async function () { + const params = { + layerId: "mocked-id", + dataHandle: "mocked-datahandle", + multiPartToken: "mocked-multiPartToken" + }; + + const result = await BlobApi.cancelMultipartUpload( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test cancelMultipartUpload method with all required and optional params", async function () { + const params = { + layerId: "mocked-id", + dataHandle: "mocked-datahandle", + multiPartToken: "mocked-multiPartToken", + billingTag: "mocked-billingTag" + }; + + const result = await BlobApi.cancelMultipartUpload( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test deleteBlob method with all required params", async function () { + const params = { + layerId: "mocked-id", + dataHandle: "mocked-datahandle" + }; + + const result = await BlobApi.deleteBlob(mockedRequestBuilder, params); + }); + + it("Test deleteBlob method with all required and optional params", async function () { + const params = { + layerId: "mocked-id", + dataHandle: "mocked-datahandle", + billingTag: "mocked-billingTag" + }; + + const result = await BlobApi.deleteBlob(mockedRequestBuilder, params); + + expect(result).to.be.equal("success"); + }); + + it("Test getBlob method with all required params", async function () { + const params = { + layerId: "mocked-id", + dataHandle: "mocked-datahandle", + billingTag: "mocked-billingTag" + }; + + const result = await BlobApi.getBlob(mockedRequestBuilder, params); + + expect(result).to.be.equal("success"); + }); + + it("Test getBlob method with all required and optional params", async function () { + const params = { + layerId: "mocked-id", + dataHandle: "mocked-datahandle", + billingTag: "mocked-billingTag", + range: "mocked-range" + }; + + const result = await BlobApi.getBlob(mockedRequestBuilder, params); + + expect(result).to.be.equal("success"); + }); + + it("Test getMultipartUploadStatus method with all required params", async function () { + const params = { + layerId: "mocked-id", + dataHandle: "mocked-datahandle", + multiPartToken: "mocked-multiPartToken" + }; + + const result = await BlobApi.getMultipartUploadStatus( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getMultipartUploadStatus method with all required and optional params", async function () { + const params = { + layerId: "mocked-id", + dataHandle: "mocked-datahandle", + billingTag: "mocked-billingTag", + multiPartToken: "mocked-multiPartToken" + }; + + const result = await BlobApi.getMultipartUploadStatus( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test startMultipartUpload method with all required params", async function () { + const params = { + layerId: "mocked-id", + dataHandle: "mocked-datahandle", + billingTag: "mocked-billingTag" + }; + + const result = await BlobApi.startMultipartUpload( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test startMultipartUpload method with all required and optional params", async function () { + const params = { + layerId: "mocked-id", + dataHandle: "mocked-datahandle", + billingTag: "mocked-billingTag", + body: "mocked-body" as any + }; + + const result = await BlobApi.startMultipartUpload( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); }); diff --git a/tests/integration/api-breaks/CatalogClient.test.ts b/tests/integration/api-breaks/CatalogClient.test.ts index c402f708..d70d73bf 100644 --- a/tests/integration/api-breaks/CatalogClient.test.ts +++ b/tests/integration/api-breaks/CatalogClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,169 +16,170 @@ * SPDX-License-Identifier: Apache-2.0 * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { CatalogClient } from "@here/olp-sdk-dataservice-read"; import * as dataServiceRead from "@here/olp-sdk-dataservice-read"; import * as dataServiceApi from "@here/olp-sdk-dataservice-api"; import { HRN, OlpClientSettings } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; +describe("CatalogClient", function () { + class CatalogClientTest extends CatalogClient { + constructor(catalogHrn: HRN, settings: OlpClientSettings) { + super(catalogHrn, settings); + } -describe("CatalogClient", function() { - class CatalogClientTest extends CatalogClient { - constructor(catalogHrn: HRN, settings: OlpClientSettings) { - super(catalogHrn, settings); - } + public async getCatalog( + request: dataServiceRead.CatalogRequest, + abortSignal?: AbortSignal + ): Promise { + return { + created: "test", + description: "test", + hrn: "test", + id: "test", + layers: [], + name: "test", + replication: {}, + summary: "test", + tags: [], + version: 1 + }; + } - public async getCatalog( - request: dataServiceRead.CatalogRequest, - abortSignal?: AbortSignal - ): Promise { - return { - created: "test", - description: "test", - hrn: "test", - id: "test", - layers: [], - name: "test", - replication: {}, - summary: "test", - tags: [], - version: 1 - }; - } + public async getEarliestVersion( + request: dataServiceRead.CatalogVersionRequest, + abortSignal?: AbortSignal + ): Promise { + return Promise.resolve(1); + } - public async getEarliestVersion( - request: dataServiceRead.CatalogVersionRequest, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve(1); - } + public async getLayerVersions( + request: dataServiceRead.LayerVersionsRequest, + abortSignal?: AbortSignal + ): Promise { + return Promise.resolve([ + { + layer: "test", + version: 1, + timestamp: 1 + } + ]); + } - public async getLayerVersions( - request: dataServiceRead.LayerVersionsRequest, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve([ - { - layer: "test", - version: 1, - timestamp: 1 + public async getLatestVersion( + request: dataServiceRead.CatalogVersionRequest, + abortSignal?: AbortSignal + ): Promise { + return Promise.resolve(1); } - ]); } - public async getLatestVersion( - request: dataServiceRead.CatalogVersionRequest, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve(1); - } - } - - let sandbox: sinon.SinonSandbox; - const mockedHRN = HRN.fromString("hrn:here:data:::live-weather-na"); - - sandbox = sinon.createSandbox(); - let settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }); - - it("Shoud be initialized with arguments", async function() { - const catalogClient = new CatalogClient(mockedHRN, settings); - assert.isDefined(catalogClient); - - expect(catalogClient).to.be.instanceOf(CatalogClient); - assert.isDefined(catalogClient.getCatalog); - assert.isDefined(catalogClient.getEarliestVersion); - assert.isDefined(catalogClient.getLatestVersion); - assert.isDefined(catalogClient.getLayerVersions); - }); - - it("Test getCatalog method with request", async function() { - const catalogClient = new CatalogClientTest(mockedHRN, settings); - - const response = await catalogClient.getCatalog( - new dataServiceRead.CatalogRequest() - ); - assert.isDefined(response); - }); - - it("Test getCatalog method with catalogRequest and abortSignal", async function() { - const catalogClient = new CatalogClientTest(mockedHRN, settings); - const abortSignal: any = "test"; - - const response = await catalogClient.getCatalog( - new dataServiceRead.CatalogRequest(), - abortSignal - ); - assert.isDefined(response); - }); - - it("Test getEarliestVersion method with catalogVersionRequest", async function() { - const catalogClient = new CatalogClientTest(mockedHRN, settings); - - const response = await catalogClient.getEarliestVersion( - new dataServiceRead.CatalogVersionRequest() - ); - assert.isDefined(response); - }); - - it("Test getEarliestVersion method with catalogVersionRequest and abortSignal", async function() { - const catalogClient = new CatalogClientTest(mockedHRN, settings); - const abortSignal: any = "test"; - - const response = await catalogClient.getEarliestVersion( - new dataServiceRead.CatalogVersionRequest(), - abortSignal - ); - assert.isDefined(response); - }); - - it("Test getLatestVersion method with catalogVersionRequest", async function() { - const catalogClient = new CatalogClientTest(mockedHRN, settings); - - const response = await catalogClient.getLatestVersion( - new dataServiceRead.CatalogVersionRequest() - ); - assert.isDefined(response); - }); - - it("Test getLatestVersion method with catalogVersionRequest and abortSignal", async function() { - const catalogClient = new CatalogClientTest(mockedHRN, settings); - const abortSignal: any = "test"; - - const response = await catalogClient.getLatestVersion( - new dataServiceRead.CatalogVersionRequest(), - abortSignal - ); - assert.isDefined(response); - }); - - it("Test getLayerVersions method with layerVersionsRequest", async function() { - const catalogClient = new CatalogClientTest(mockedHRN, settings); - - const response = await catalogClient.getLayerVersions( - new dataServiceRead.LayerVersionsRequest() - ); - assert.isDefined(response); - }); - - it("Test getLayerVersions method with layerVersionsRequest and abortSignal", async function() { - const catalogClient = new CatalogClientTest(mockedHRN, settings); - const abortSignal: any = "test"; - - const response = await catalogClient.getLayerVersions( - new dataServiceRead.LayerVersionsRequest(), - abortSignal - ); - assert.isDefined(response); - }); + const mockedHRN = HRN.fromString("hrn:here:data:::live-weather-na"); + + let settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }); + + it("Shoud be initialized with arguments", async function () { + const catalogClient = new CatalogClient(mockedHRN, settings); + assert.isDefined(catalogClient); + + expect(catalogClient).to.be.instanceOf(CatalogClient); + assert.isDefined(catalogClient.getCatalog); + assert.isDefined(catalogClient.getEarliestVersion); + assert.isDefined(catalogClient.getLatestVersion); + assert.isDefined(catalogClient.getLayerVersions); + }); + + it("Test getCatalog method with request", async function () { + const catalogClient = new CatalogClientTest(mockedHRN, settings); + + const response = await catalogClient.getCatalog( + new dataServiceRead.CatalogRequest() + ); + assert.isDefined(response); + }); + + it("Test getCatalog method with catalogRequest and abortSignal", async function () { + const catalogClient = new CatalogClientTest(mockedHRN, settings); + const abortSignal: any = "test"; + + const response = await catalogClient.getCatalog( + new dataServiceRead.CatalogRequest(), + abortSignal + ); + assert.isDefined(response); + }); + + it("Test getEarliestVersion method with catalogVersionRequest", async function () { + const catalogClient = new CatalogClientTest(mockedHRN, settings); + + const response = await catalogClient.getEarliestVersion( + new dataServiceRead.CatalogVersionRequest() + ); + assert.isDefined(response); + }); + + it("Test getEarliestVersion method with catalogVersionRequest and abortSignal", async function () { + const catalogClient = new CatalogClientTest(mockedHRN, settings); + const abortSignal: any = "test"; + + const response = await catalogClient.getEarliestVersion( + new dataServiceRead.CatalogVersionRequest(), + abortSignal + ); + assert.isDefined(response); + }); + + it("Test getLatestVersion method with catalogVersionRequest", async function () { + const catalogClient = new CatalogClientTest(mockedHRN, settings); + + const response = await catalogClient.getLatestVersion( + new dataServiceRead.CatalogVersionRequest() + ); + assert.isDefined(response); + }); + + it("Test getLatestVersion method with catalogVersionRequest and abortSignal", async function () { + const catalogClient = new CatalogClientTest(mockedHRN, settings); + const abortSignal: any = "test"; + + const response = await catalogClient.getLatestVersion( + new dataServiceRead.CatalogVersionRequest(), + abortSignal + ); + assert.isDefined(response); + }); + + it("Test getLayerVersions method with layerVersionsRequest", async function () { + const catalogClient = new CatalogClientTest(mockedHRN, settings); + + const response = await catalogClient.getLayerVersions( + new dataServiceRead.LayerVersionsRequest() + ); + assert.isDefined(response); + }); + + it("Test getLayerVersions method with layerVersionsRequest and abortSignal", async function () { + const catalogClient = new CatalogClientTest(mockedHRN, settings); + const abortSignal: any = "test"; + + const response = await catalogClient.getLayerVersions( + new dataServiceRead.LayerVersionsRequest(), + abortSignal + ); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/CatalogRequest.test.ts b/tests/integration/api-breaks/CatalogRequest.test.ts index 4b2c059d..59ffc3a5 100644 --- a/tests/integration/api-breaks/CatalogRequest.test.ts +++ b/tests/integration/api-breaks/CatalogRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,47 +17,51 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { CatalogRequest } from "@here/olp-sdk-dataservice-read"; -chai.use(sinonChai); +describe("CatalogRequest", function () { + class CatalogRequestTest extends CatalogRequest { + withBillingTag(tag: string): CatalogRequest { + return this; + } -const assert = chai.assert; -const expect = chai.expect; - -describe("CatalogRequest", function() { - class CatalogRequestTest extends CatalogRequest { - withBillingTag(tag: string): CatalogRequest { - return this; - } - - getBillingTag(): string { - return "billing-tag"; + getBillingTag(): string { + return "billing-tag"; + } } - } - it("Shoud be initialized", async function() { - const catalogRequest = new CatalogRequestTest(); - assert.isDefined(catalogRequest); - expect(catalogRequest).to.be.instanceOf(CatalogRequest); + it("Shoud be initialized", async function () { + const catalogRequest = new CatalogRequestTest(); + assert.isDefined(catalogRequest); + expect(catalogRequest).to.be.instanceOf(CatalogRequest); - assert.isFunction(catalogRequest.withBillingTag); - assert.isFunction(catalogRequest.getBillingTag); - }); + assert.isFunction(catalogRequest.withBillingTag); + assert.isFunction(catalogRequest.getBillingTag); + }); - it("Test withBillingTag method with tag", async function() { - const catalogRequest = new CatalogRequestTest(); + it("Test withBillingTag method with tag", async function () { + const catalogRequest = new CatalogRequestTest(); - const response = catalogRequest.withBillingTag("test-tag"); - assert.isDefined(response); - }); + const response = catalogRequest.withBillingTag("test-tag"); + assert.isDefined(response); + }); - it("Test getBillingTag method without params", async function() { - const catalogRequest = new CatalogRequestTest(); - catalogRequest.withBillingTag("test-tag"); + it("Test getBillingTag method without params", async function () { + const catalogRequest = new CatalogRequestTest(); + catalogRequest.withBillingTag("test-tag"); - const response = catalogRequest.getBillingTag(); - assert.isDefined(response); - }); + const response = catalogRequest.getBillingTag(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/CatalogVersionRequest.test.ts b/tests/integration/api-breaks/CatalogVersionRequest.test.ts index a4bbd518..3376a275 100644 --- a/tests/integration/api-breaks/CatalogVersionRequest.test.ts +++ b/tests/integration/api-breaks/CatalogVersionRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,95 +17,99 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { CatalogVersionRequest } from "@here/olp-sdk-dataservice-read"; -chai.use(sinonChai); +describe("CatalogVersionRequest", function () { + class CatalogVersionRequestTest extends CatalogVersionRequest { + getStartVersion(): number { + return 5; + } -const assert = chai.assert; -const expect = chai.expect; + withStartVersion(version: number): CatalogVersionRequest { + return this; + } -describe("CatalogVersionRequest", function() { - class CatalogVersionRequestTest extends CatalogVersionRequest { - getStartVersion(): number { - return 5; - } - - withStartVersion(version: number): CatalogVersionRequest { - return this; - } + getEndVersion(): number { + return 25; + } - getEndVersion(): number { - return 25; - } + withEndVersion(version: number): CatalogVersionRequest { + return this; + } - withEndVersion(version: number): CatalogVersionRequest { - return this; - } - - withBillingTag(tag: string): CatalogVersionRequest { - return this; - } + withBillingTag(tag: string): CatalogVersionRequest { + return this; + } - getBillingTag(): string { - return "billing-tag"; + getBillingTag(): string { + return "billing-tag"; + } } - } - it("Shoud be initialized", async function() { - const catalogRequest = new CatalogVersionRequestTest(); - assert.isDefined(catalogRequest); - expect(catalogRequest).to.be.instanceOf(CatalogVersionRequest); + it("Shoud be initialized", async function () { + const catalogRequest = new CatalogVersionRequestTest(); + assert.isDefined(catalogRequest); + expect(catalogRequest).to.be.instanceOf(CatalogVersionRequest); - assert.isFunction(catalogRequest.withStartVersion); - assert.isFunction(catalogRequest.getStartVersion); - assert.isFunction(catalogRequest.withEndVersion); - assert.isFunction(catalogRequest.getEndVersion); - assert.isFunction(catalogRequest.withBillingTag); - assert.isFunction(catalogRequest.getBillingTag); - }); + assert.isFunction(catalogRequest.withStartVersion); + assert.isFunction(catalogRequest.getStartVersion); + assert.isFunction(catalogRequest.withEndVersion); + assert.isFunction(catalogRequest.getEndVersion); + assert.isFunction(catalogRequest.withBillingTag); + assert.isFunction(catalogRequest.getBillingTag); + }); - it("Test withStartVersion method with version", async function() { - const request = new CatalogVersionRequestTest(); + it("Test withStartVersion method with version", async function () { + const request = new CatalogVersionRequestTest(); - const response = request.withStartVersion(1); - assert.isDefined(response); - }); + const response = request.withStartVersion(1); + assert.isDefined(response); + }); - it("Test getStartVersion method without params", async function() { - const request = new CatalogVersionRequestTest(); + it("Test getStartVersion method without params", async function () { + const request = new CatalogVersionRequestTest(); - const response = request.getStartVersion(); - assert.isDefined(response); - }); + const response = request.getStartVersion(); + assert.isDefined(response); + }); - it("Test withEndVersion method with version", async function() { - const request = new CatalogVersionRequestTest(); + it("Test withEndVersion method with version", async function () { + const request = new CatalogVersionRequestTest(); - const response = request.withEndVersion(25); - assert.isDefined(response); - }); + const response = request.withEndVersion(25); + assert.isDefined(response); + }); - it("Test getEndVersion method without params", async function() { - const request = new CatalogVersionRequestTest(); + it("Test getEndVersion method without params", async function () { + const request = new CatalogVersionRequestTest(); - const response = request.getEndVersion(); - assert.isDefined(response); - }); + const response = request.getEndVersion(); + assert.isDefined(response); + }); - it("Test withBillingTag method with tag", async function() { - const catalogRequest = new CatalogVersionRequestTest(); + it("Test withBillingTag method with tag", async function () { + const catalogRequest = new CatalogVersionRequestTest(); - const response = catalogRequest.withBillingTag("test-tag"); - assert.isDefined(response); - }); + const response = catalogRequest.withBillingTag("test-tag"); + assert.isDefined(response); + }); - it("Test getBillingTag method without params", async function() { - const catalogRequest = new CatalogVersionRequestTest(); - catalogRequest.withBillingTag("test-tag"); + it("Test getBillingTag method without params", async function () { + const catalogRequest = new CatalogVersionRequestTest(); + catalogRequest.withBillingTag("test-tag"); - const response = catalogRequest.getBillingTag(); - assert.isDefined(response); - }); + const response = catalogRequest.getBillingTag(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/CatalogsRequest.test.ts b/tests/integration/api-breaks/CatalogsRequest.test.ts index 1401f570..dda1858b 100644 --- a/tests/integration/api-breaks/CatalogsRequest.test.ts +++ b/tests/integration/api-breaks/CatalogsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,67 +17,71 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { CatalogsRequest } from "@here/olp-sdk-dataservice-read"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("CatalogsRequest", function() { - class CatalogsRequestTest extends CatalogsRequest { - withSchema(schemaHrn: string): CatalogsRequest { - return this; - } - getSchema(): string { - return "schema-hrn"; - } - - withBillingTag(tag: string): CatalogsRequest { - return this; - } - - getBillingTag(): string { - return "billing-tag"; +describe("CatalogsRequest", function () { + class CatalogsRequestTest extends CatalogsRequest { + withSchema(schemaHrn: string): CatalogsRequest { + return this; + } + getSchema(): string { + return "schema-hrn"; + } + + withBillingTag(tag: string): CatalogsRequest { + return this; + } + + getBillingTag(): string { + return "billing-tag"; + } } - } - it("Shoud be initialized", async function() { - const catalogsRequest = new CatalogsRequestTest(); - assert.isDefined(catalogsRequest); - expect(catalogsRequest).to.be.instanceOf(CatalogsRequest); + it("Shoud be initialized", async function () { + const catalogsRequest = new CatalogsRequestTest(); + assert.isDefined(catalogsRequest); + expect(catalogsRequest).to.be.instanceOf(CatalogsRequest); - assert.isFunction(catalogsRequest.withBillingTag); - assert.isFunction(catalogsRequest.getBillingTag); - }); + assert.isFunction(catalogsRequest.withBillingTag); + assert.isFunction(catalogsRequest.getBillingTag); + }); - it("Test withSchema method with schemaHrn", async function() { - const catalogsRequest = new CatalogsRequestTest(); + it("Test withSchema method with schemaHrn", async function () { + const catalogsRequest = new CatalogsRequestTest(); - const response = catalogsRequest.withSchema("test"); - assert.isDefined(response); - }); + const response = catalogsRequest.withSchema("test"); + assert.isDefined(response); + }); - it("Test getSchema method without params", async function() { - const catalogsRequest = new CatalogsRequestTest(); + it("Test getSchema method without params", async function () { + const catalogsRequest = new CatalogsRequestTest(); - const response = catalogsRequest.getSchema(); - assert.isDefined(response); - }); + const response = catalogsRequest.getSchema(); + assert.isDefined(response); + }); - it("Test withBillingTag method with tag", async function() { - const catalogsRequest = new CatalogsRequestTest(); + it("Test withBillingTag method with tag", async function () { + const catalogsRequest = new CatalogsRequestTest(); - const response = catalogsRequest.withBillingTag("test-tag"); - assert.isDefined(response); - }); + const response = catalogsRequest.withBillingTag("test-tag"); + assert.isDefined(response); + }); - it("Test getBillingTag method without params", async function() { - const catalogsRequest = new CatalogsRequestTest(); + it("Test getBillingTag method without params", async function () { + const catalogsRequest = new CatalogsRequestTest(); - const response = catalogsRequest.getBillingTag(); - assert.isDefined(response); - }); + const response = catalogsRequest.getBillingTag(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/ConfigApi.test.ts b/tests/integration/api-breaks/ConfigApi.test.ts index 74a42b6d..5fe53258 100644 --- a/tests/integration/api-breaks/ConfigApi.test.ts +++ b/tests/integration/api-breaks/ConfigApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,427 +17,466 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { ConfigApi } from "@here/olp-sdk-dataservice-api"; import { - StatusLink, - Catalog, - CatalogFailureStatus, - CatalogPendingStatus, - CatalogSummary, - CatalogsList, - CatalogsListResult + StatusLink, + Catalog, + CatalogFailureStatus, + CatalogPendingStatus, + CatalogSummary, + CatalogsList, + CatalogsListResult } from "@here/olp-sdk-dataservice-api/lib/config-api"; import { mockedRequestBuilder } from "./MockedRequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("ConfigApi", function() { - it("Catalog with all required params", function() { - const params: Catalog = { - created: "test", - description: "test", - hrn: "test", - id: "test", - layers: [ - { - billingTags: ["test"], - contentEncoding: "gzip", - contentType: "test", - coverage: { - adminAreas: ["test"] - }, - creator: { - id: "test" - }, - description: "test", - hrn: "test", - id: "test", - layerType: "index", - name: "test", - partitioning: { - scheme: "generic", - tileLevels: [1] - }, - schema: { - hrn: "test" - }, - streamProperties: { - dataInThroughputMbps: 1, - dataOutThroughputMbps: 1 - }, - summary: "test", - tags: ["test"], - volume: { - volumeType: "durable" - }, - digest: "MD5" - } as any - ], - name: "test", - replication: { - regions: [ - { - id: "eu-ireland", - role: "primary" - } - ] - }, - summary: "test", - tags: ["text"], - version: 1 - }; - - assert.isDefined(params); - }); - - it("Catalog with all required and optional params", function() { - const params: Catalog = { - billingTags: ["text"], - coverage: { - adminAreas: ["text"] - }, - created: "test", - description: "test", - hrn: "test", - id: "test", - layers: [ - { - billingTags: ["test"], - contentEncoding: "gzip", - contentType: "test", - coverage: { - adminAreas: ["test"] - }, - creator: { - id: "test" - }, - description: "test", - hrn: "test", - id: "test", - layerType: "index", - name: "test", - partitioning: { - scheme: "generic", - tileLevels: [1] - }, - schema: { - hrn: "test" - }, - streamProperties: { - dataInThroughputMbps: 1, - dataOutThroughputMbps: 1 - }, - summary: "test", - tags: ["test"], - volume: { - volumeType: "durable" - }, - digest: "MD5" - } as any - ], - name: "test", - notifications: { - enabled: true - }, - owner: { - creator: { - id: "text" - }, - organisation: { - id: "text" - } - }, - replication: { - regions: [ - { - id: "eu-ireland", - role: "primary" - } - ] - }, - summary: "test", - tags: ["text"], - version: 1 - }; - - assert.isDefined(params); - }); - - it("CatalogFailureStatus with all required params", function() { - const params: CatalogFailureStatus = {}; - assert.isDefined(params); - }); - - it("CatalogFailureStatus with all required and optional params", function() { - const params: CatalogFailureStatus = { - reason: "test", - status: "test" - }; - assert.isDefined(params); - }); - - it("CatalogPendingStatus with all required params", function() { - const params: CatalogPendingStatus = {}; - assert.isDefined(params); - }); - it("CatalogPendingStatus with all required and optional params", function() { - const params: CatalogPendingStatus = { - status: "test" - }; - assert.isDefined(params); - }); - - it("CatalogSummary with all required params", function() { - const params: CatalogSummary = {}; - assert.isDefined(params); - }); - it("CatalogSummary with all required and optional params", function() { - const params: CatalogSummary = { - href: "test", - hrn: "test", - title: "test", - type: "test" - }; - assert.isDefined(params); - }); - - it("CatalogsList with all required params", function() { - const params: CatalogsList = {}; - assert.isDefined(params); - }); - - it("CatalogsList with all required and optional params", function() { - const params: CatalogsList = { - items: [ - { - href: "test", - hrn: "test", - title: "test", - type: "test" - } - ] - }; - assert.isDefined(params); - }); - - it("CatalogsListResult with all required params", function() { - const params: CatalogsListResult = {}; - assert.isDefined(params); - }); - - it("CatalogsListResult with all required and optional params", function() { - const params: CatalogsListResult = { - results: { - items: [ - { +describe("ConfigApi", function () { + it("Catalog with all required params", function () { + const params: Catalog = { + created: "test", + description: "test", + hrn: "test", + id: "test", + layers: [ + { + billingTags: ["test"], + contentEncoding: "gzip", + contentType: "test", + coverage: { + adminAreas: ["test"] + }, + creator: { + id: "test" + }, + description: "test", + hrn: "test", + id: "test", + layerType: "index", + name: "test", + partitioning: { + scheme: "generic", + tileLevels: [1] + }, + schema: { + hrn: "test" + }, + streamProperties: { + dataInThroughputMbps: 1, + dataOutThroughputMbps: 1 + }, + summary: "test", + tags: ["test"], + volume: { + volumeType: "durable" + }, + digest: "MD5" + } as any + ], + name: "test", + replication: { + regions: [ + { + id: "eu-ireland", + role: "primary" + } + ] + }, + summary: "test", + tags: ["text"], + version: 1 + }; + + assert.isDefined(params); + }); + + it("Catalog with all required and optional params", function () { + const params: Catalog = { + billingTags: ["text"], + coverage: { + adminAreas: ["text"] + }, + created: "test", + description: "test", + hrn: "test", + id: "test", + layers: [ + { + billingTags: ["test"], + contentEncoding: "gzip", + contentType: "test", + coverage: { + adminAreas: ["test"] + }, + creator: { + id: "test" + }, + description: "test", + hrn: "test", + id: "test", + layerType: "index", + name: "test", + partitioning: { + scheme: "generic", + tileLevels: [1] + }, + schema: { + hrn: "test" + }, + streamProperties: { + dataInThroughputMbps: 1, + dataOutThroughputMbps: 1 + }, + summary: "test", + tags: ["test"], + volume: { + volumeType: "durable" + }, + digest: "MD5" + } as any + ], + name: "test", + notifications: { + enabled: true + }, + owner: { + creator: { + id: "text" + }, + organisation: { + id: "text" + } + }, + replication: { + regions: [ + { + id: "eu-ireland", + role: "primary" + } + ] + }, + summary: "test", + tags: ["text"], + version: 1 + }; + + assert.isDefined(params); + }); + + it("CatalogFailureStatus with all required params", function () { + const params: CatalogFailureStatus = {}; + assert.isDefined(params); + }); + + it("CatalogFailureStatus with all required and optional params", function () { + const params: CatalogFailureStatus = { + reason: "test", + status: "test" + }; + assert.isDefined(params); + }); + + it("CatalogPendingStatus with all required params", function () { + const params: CatalogPendingStatus = {}; + assert.isDefined(params); + }); + it("CatalogPendingStatus with all required and optional params", function () { + const params: CatalogPendingStatus = { + status: "test" + }; + assert.isDefined(params); + }); + + it("CatalogSummary with all required params", function () { + const params: CatalogSummary = {}; + assert.isDefined(params); + }); + it("CatalogSummary with all required and optional params", function () { + const params: CatalogSummary = { href: "test", hrn: "test", title: "test", type: "test" - } - ] - } - }; - assert.isDefined(params); - }); - - it("StatusLink with all required params", function() { - const params: StatusLink = {}; - - assert.isDefined(params); - }); - - it("StatusLink with all required and optional params", function() { - const params: StatusLink = { - href: "test", - title: "test", - type: "test" - }; - - assert.isDefined(params); - }); - - //////////////// - - it("Test catalogExists method with all required params", async function() { - const params = { - catalogHrn: "mocked-catalogHrn" - }; - - const result = await ConfigApi.catalogExists(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test catalogExists method with all required and optional params", async function() { - const params = { - catalogHrn: "mocked-catalogHrn", - billingTag: "mocked-billingTag" - }; - - const result = await ConfigApi.catalogExists(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test createCatalog method with all required params", async function() { - const params = { - body: "mocked-body" as any - }; - - const result = await ConfigApi.createCatalog(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test createCatalog method with all required and optional params", async function() { - const params = { - body: "mocked-body" as any, - billingTag: "mocked-billingTag" - }; - - const result = await ConfigApi.createCatalog(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test deleteCatalog method with all required params", async function() { - const params = { - catalogHrn: "mocked-catalogHrn" - }; - - const result = await ConfigApi.deleteCatalog(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test deleteCatalog method with all required and optional params", async function() { - const params = { - catalogHrn: "mocked-catalogHrn", - billingTag: "mocked-billingTag" - }; - - const result = await ConfigApi.deleteCatalog(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test deleteLayer method with all required params", async function() { - const params = { - catalogHrn: "mocked-catalogHrn", - layerId: "mocked-layerId" - }; - - const result = await ConfigApi.deleteLayer(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test getCatalog method with all required params", async function() { - const params = { - catalogHrn: "mocked-catalogHrn", - billingTag: "mocked-billingTag" - }; - - const result = await ConfigApi.getCatalog(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test getCatalogStatus method with all required params", async function() { - const params = { - token: "mocked-token", - billingTag: "mocked-billingTag" - }; - - const result = await ConfigApi.getCatalogStatus( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getCatalogs method with all required params", async function() { - const params = {}; - - const result = await ConfigApi.getCatalogs(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test getCatalogs method with all required and optional params", async function() { - const params = { - billingTag: "mocked-billingTag" as any, - verbose: "mocked-verbose" as any, - q: "mocked-verbose" as any, - organisation: "mocked-organisation" as any, - organisationType: "mocked-organisationType" as any, - layerType: "mocked-layerType" as any, - region: "mocked-region" as any, - schemaHrn: "mocked-schemaHrn" as any, - resourceType: "mocked-resourceType" as any, - coverage: "mocked-coverage" as any, - access: "mocked-access" as any, - limit: "mocked-limit" as any, - sortBy: "mocked-sortBy" as any, - sortOrder: "mocked-sortOrder" as any - }; - - const result = await ConfigApi.getCatalogs(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test patchCatalog method with all required params", async function() { - const params = { - catalogHrn: "mocked-catalogHrn", - body: "mocked-body" as any - }; - - const result = await ConfigApi.patchCatalog(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test patchLayer method with all required params", async function() { - const params = { - catalogHrn: "mocked-catalogHrn", - layerId: "mocked-layerId", - body: "mocked-body" as any - }; - - const result = await ConfigApi.patchLayer(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test updateCatalog method with all required params", async function() { - const params = { - catalogHrn: "mocked-catalogHrn", - body: "mocked-body" as any - }; - - const result = await ConfigApi.updateCatalog(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test updateCatalog method with all required and optional params", async function() { - const params = { - catalogHrn: "mocked-catalogHrn", - body: "mocked-body" as any, - billingTag: "mocked-billingTag" - }; - - const result = await ConfigApi.updateCatalog(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); + }; + assert.isDefined(params); + }); + + it("CatalogsList with all required params", function () { + const params: CatalogsList = {}; + assert.isDefined(params); + }); + + it("CatalogsList with all required and optional params", function () { + const params: CatalogsList = { + items: [ + { + href: "test", + hrn: "test", + title: "test", + type: "test" + } + ] + }; + assert.isDefined(params); + }); + + it("CatalogsListResult with all required params", function () { + const params: CatalogsListResult = {}; + assert.isDefined(params); + }); + + it("CatalogsListResult with all required and optional params", function () { + const params: CatalogsListResult = { + results: { + items: [ + { + href: "test", + hrn: "test", + title: "test", + type: "test" + } + ] + } + }; + assert.isDefined(params); + }); + + it("StatusLink with all required params", function () { + const params: StatusLink = {}; + + assert.isDefined(params); + }); + + it("StatusLink with all required and optional params", function () { + const params: StatusLink = { + href: "test", + title: "test", + type: "test" + }; + + assert.isDefined(params); + }); + + //////////////// + + it("Test catalogExists method with all required params", async function () { + const params = { + catalogHrn: "mocked-catalogHrn" + }; + + const result = await ConfigApi.catalogExists( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test catalogExists method with all required and optional params", async function () { + const params = { + catalogHrn: "mocked-catalogHrn", + billingTag: "mocked-billingTag" + }; + + const result = await ConfigApi.catalogExists( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test createCatalog method with all required params", async function () { + const params = { + body: "mocked-body" as any + }; + + const result = await ConfigApi.createCatalog( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test createCatalog method with all required and optional params", async function () { + const params = { + body: "mocked-body" as any, + billingTag: "mocked-billingTag" + }; + + const result = await ConfigApi.createCatalog( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test deleteCatalog method with all required params", async function () { + const params = { + catalogHrn: "mocked-catalogHrn" + }; + + const result = await ConfigApi.deleteCatalog( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test deleteCatalog method with all required and optional params", async function () { + const params = { + catalogHrn: "mocked-catalogHrn", + billingTag: "mocked-billingTag" + }; + + const result = await ConfigApi.deleteCatalog( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test deleteLayer method with all required params", async function () { + const params = { + catalogHrn: "mocked-catalogHrn", + layerId: "mocked-layerId" + }; + + const result = await ConfigApi.deleteLayer( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getCatalog method with all required params", async function () { + const params = { + catalogHrn: "mocked-catalogHrn", + billingTag: "mocked-billingTag" + }; + + const result = await ConfigApi.getCatalog(mockedRequestBuilder, params); + + expect(result).to.be.equal("success"); + }); + + it("Test getCatalogStatus method with all required params", async function () { + const params = { + token: "mocked-token", + billingTag: "mocked-billingTag" + }; + + const result = await ConfigApi.getCatalogStatus( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getCatalogs method with all required params", async function () { + const params = {}; + + const result = await ConfigApi.getCatalogs( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getCatalogs method with all required and optional params", async function () { + const params = { + billingTag: "mocked-billingTag" as any, + verbose: "mocked-verbose" as any, + q: "mocked-verbose" as any, + organisation: "mocked-organisation" as any, + organisationType: "mocked-organisationType" as any, + layerType: "mocked-layerType" as any, + region: "mocked-region" as any, + schemaHrn: "mocked-schemaHrn" as any, + resourceType: "mocked-resourceType" as any, + coverage: "mocked-coverage" as any, + access: "mocked-access" as any, + limit: "mocked-limit" as any, + sortBy: "mocked-sortBy" as any, + sortOrder: "mocked-sortOrder" as any + }; + + const result = await ConfigApi.getCatalogs( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test patchCatalog method with all required params", async function () { + const params = { + catalogHrn: "mocked-catalogHrn", + body: "mocked-body" as any + }; + + const result = await ConfigApi.patchCatalog( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test patchLayer method with all required params", async function () { + const params = { + catalogHrn: "mocked-catalogHrn", + layerId: "mocked-layerId", + body: "mocked-body" as any + }; + + const result = await ConfigApi.patchLayer(mockedRequestBuilder, params); + + expect(result).to.be.equal("success"); + }); + + it("Test updateCatalog method with all required params", async function () { + const params = { + catalogHrn: "mocked-catalogHrn", + body: "mocked-body" as any + }; + + const result = await ConfigApi.updateCatalog( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test updateCatalog method with all required and optional params", async function () { + const params = { + catalogHrn: "mocked-catalogHrn", + body: "mocked-body" as any, + billingTag: "mocked-billingTag" + }; + + const result = await ConfigApi.updateCatalog( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); }); diff --git a/tests/integration/api-breaks/ConfigClient.test.ts b/tests/integration/api-breaks/ConfigClient.test.ts index 759c2910..1cacda13 100644 --- a/tests/integration/api-breaks/ConfigClient.test.ts +++ b/tests/integration/api-breaks/ConfigClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,61 +16,62 @@ * SPDX-License-Identifier: Apache-2.0 * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { ConfigClient } from "@here/olp-sdk-dataservice-read"; import * as dataServiceRead from "@here/olp-sdk-dataservice-read"; import * as dataServiceApi from "@here/olp-sdk-dataservice-api"; import { OlpClientSettings } from "@here/olp-sdk-core"; -chai.use(sinonChai); +describe("ConfigClient", function () { + class ConfigClientTest extends ConfigClient { + constructor(settings: OlpClientSettings) { + super(settings); + } -const assert = chai.assert; -const expect = chai.expect; - -describe("ConfigClient", function() { - class ConfigClientTest extends ConfigClient { - constructor(settings: OlpClientSettings) { - super(settings); - } - - public async getCatalogs( - request?: dataServiceRead.CatalogsRequest - ): Promise { - return {}; + public async getCatalogs( + request?: dataServiceRead.CatalogsRequest + ): Promise { + return {}; + } } - } - let sandbox: sinon.SinonSandbox; - sandbox = sinon.createSandbox(); - let settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }); + let settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }); - it("Shoud be initialized with arguments", async function() { - const configClient = new ConfigClient(settings); - assert.isDefined(configClient); + it("Shoud be initialized with arguments", async function () { + const configClient = new ConfigClient(settings); + assert.isDefined(configClient); - expect(configClient).to.be.instanceOf(ConfigClient); - assert.isDefined(configClient.getCatalogs); - }); + expect(configClient).to.be.instanceOf(ConfigClient); + assert.isDefined(configClient.getCatalogs); + }); - it("Test getCatalogs method without params", async function() { - const configClient = new ConfigClientTest(settings); + it("Test getCatalogs method without params", async function () { + const configClient = new ConfigClientTest(settings); - const response = await configClient.getCatalogs(); - assert.isDefined(response); - }); + const response = await configClient.getCatalogs(); + assert.isDefined(response); + }); - it("Test getCatalog method with catalogsRequest", async function() { - const configClient = new ConfigClientTest(settings); + it("Test getCatalog method with catalogsRequest", async function () { + const configClient = new ConfigClientTest(settings); - const response = await configClient.getCatalogs( - new dataServiceRead.CatalogsRequest() - ); - assert.isDefined(response); - }); + const response = await configClient.getCatalogs( + new dataServiceRead.CatalogsRequest() + ); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/CoverageApi.test.ts b/tests/integration/api-breaks/CoverageApi.test.ts index bfc5711c..764f54e2 100644 --- a/tests/integration/api-breaks/CoverageApi.test.ts +++ b/tests/integration/api-breaks/CoverageApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,223 +17,226 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { CoverageApi } from "@here/olp-sdk-dataservice-api"; import { - BoundingBox, - CatalogAdminAreas, - LayerBoundingBox, - LayerLevelSummary, - LayerSummary + BoundingBox, + CatalogAdminAreas, + LayerBoundingBox, + LayerLevelSummary, + LayerSummary } from "@here/olp-sdk-dataservice-api/lib/coverage-api"; import { mockedRequestBuilder } from "./MockedRequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("CoverageApi", function() { - it("BoundingBox with all required params", function() { - const params: BoundingBox = {}; - - assert.isDefined(params); - }); - - it("BoundingBox with all optional params", function() { - const params: BoundingBox = { - east: "test", - north: "test", - south: "test", - west: "test" - }; - - assert.isDefined(params); - }); - - it("CatalogAdminAreas with all required params", function() { - const params: CatalogAdminAreas = {}; - - assert.isDefined(params); - }); - - it("CatalogAdminAreas with all optional params", function() { - const params: CatalogAdminAreas = { - cities: ["test"], - counties: ["test"], - countries: ["test"], - states: ["test"] - }; - - assert.isDefined(params); - }); - - it("LayerBoundingBox with all required params", function() { - const params: LayerBoundingBox = { - east: 1, - south: 1, - north: 1, - west: 1 - }; - - assert.isDefined(params); - }); - - it("LayerLevelSummary with all required params", function() { - const params: LayerLevelSummary = { - boundingBox: { - east: 1, - south: 1, - north: 1, - west: 1 - }, - size: 1, - processedTimestamp: 1, - centroid: 1, - minPartitionSize: 1, - maxPartitionSize: 1, - version: 1, - totalPartitions: 1 - }; - - assert.isDefined(params); - }); - - it("LayerSummary with all required params", function() { - const params: LayerSummary = { - catalogHRN: "test-hrn", - layer: "test", - levelSummary: { - 1: { - boundingBox: { +describe("CoverageApi", function () { + it("BoundingBox with all required params", function () { + const params: BoundingBox = {}; + + assert.isDefined(params); + }); + + it("BoundingBox with all optional params", function () { + const params: BoundingBox = { + east: "test", + north: "test", + south: "test", + west: "test" + }; + + assert.isDefined(params); + }); + + it("CatalogAdminAreas with all required params", function () { + const params: CatalogAdminAreas = {}; + + assert.isDefined(params); + }); + + it("CatalogAdminAreas with all optional params", function () { + const params: CatalogAdminAreas = { + cities: ["test"], + counties: ["test"], + countries: ["test"], + states: ["test"] + }; + + assert.isDefined(params); + }); + + it("LayerBoundingBox with all required params", function () { + const params: LayerBoundingBox = { east: 1, south: 1, north: 1, west: 1 - }, - size: 1, - processedTimestamp: 1, - centroid: 1, - minPartitionSize: 1, - maxPartitionSize: 1, - version: 1, - totalPartitions: 1 - } - } - }; - - assert.isDefined(params); - }); - - it("Test getDataCoverageAdminAreas method with all required params", async function() { - const params = { - layerId: "mocked-layerId", - datalevel: "mocked-datalevel" - }; - - const result = await CoverageApi.getDataCoverageAdminAreas( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getDataCoverageSizeMap method with all required params", async function() { - const params = { - layerId: "mocked-layerId" - }; - - const result = await CoverageApi.getDataCoverageSizeMap( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getDataCoverageSizeMap method with all required and optional params", async function() { - const params = { - layerId: "mocked-layerId", - datalevel: 12 - }; - - const result = await CoverageApi.getDataCoverageSizeMap( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getDataCoverageSummary method with all required params", async function() { - const params = { - layerId: "mocked-layerId" - }; - - const result = await CoverageApi.getDataCoverageSummary( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getDataCoverageTile method with all required params", async function() { - const params = { - layerId: "mocked-layerId" - }; - - const result = await CoverageApi.getDataCoverageTile( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getDataCoverageTile method with all required and optional params", async function() { - const params = { - layerId: "mocked-layerId", - datalevel: 12 - }; - - const result = await CoverageApi.getDataCoverageTile( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getDataCoverageTimeMap method with all required params", async function() { - const params = { - layerId: "mocked-layerId", - catalogHRN: "mocked-catalogHRN" - }; - - const result = await CoverageApi.getDataCoverageTimeMap( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getDataCoverageTimeMap method with all required and optional params", async function() { - const params = { - layerId: "mocked-layerId", - datalevel: 12, - catalogHRN: "mocked-catalogHRN" - }; - - const result = await CoverageApi.getDataCoverageTimeMap( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); + }; + + assert.isDefined(params); + }); + + it("LayerLevelSummary with all required params", function () { + const params: LayerLevelSummary = { + boundingBox: { + east: 1, + south: 1, + north: 1, + west: 1 + }, + size: 1, + processedTimestamp: 1, + centroid: 1, + minPartitionSize: 1, + maxPartitionSize: 1, + version: 1, + totalPartitions: 1 + }; + + assert.isDefined(params); + }); + + it("LayerSummary with all required params", function () { + const params: LayerSummary = { + catalogHRN: "test-hrn", + layer: "test", + levelSummary: { + 1: { + boundingBox: { + east: 1, + south: 1, + north: 1, + west: 1 + }, + size: 1, + processedTimestamp: 1, + centroid: 1, + minPartitionSize: 1, + maxPartitionSize: 1, + version: 1, + totalPartitions: 1 + } + } + }; + + assert.isDefined(params); + }); + + it("Test getDataCoverageAdminAreas method with all required params", async function () { + const params = { + layerId: "mocked-layerId", + datalevel: "mocked-datalevel" + }; + + const result = await CoverageApi.getDataCoverageAdminAreas( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getDataCoverageSizeMap method with all required params", async function () { + const params = { + layerId: "mocked-layerId" + }; + + const result = await CoverageApi.getDataCoverageSizeMap( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getDataCoverageSizeMap method with all required and optional params", async function () { + const params = { + layerId: "mocked-layerId", + datalevel: 12 + }; + + const result = await CoverageApi.getDataCoverageSizeMap( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getDataCoverageSummary method with all required params", async function () { + const params = { + layerId: "mocked-layerId" + }; + + const result = await CoverageApi.getDataCoverageSummary( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getDataCoverageTile method with all required params", async function () { + const params = { + layerId: "mocked-layerId" + }; + + const result = await CoverageApi.getDataCoverageTile( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getDataCoverageTile method with all required and optional params", async function () { + const params = { + layerId: "mocked-layerId", + datalevel: 12 + }; + + const result = await CoverageApi.getDataCoverageTile( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getDataCoverageTimeMap method with all required params", async function () { + const params = { + layerId: "mocked-layerId", + catalogHRN: "mocked-catalogHRN" + }; + + const result = await CoverageApi.getDataCoverageTimeMap( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getDataCoverageTimeMap method with all required and optional params", async function () { + const params = { + layerId: "mocked-layerId", + datalevel: 12, + catalogHRN: "mocked-catalogHRN" + }; + + const result = await CoverageApi.getDataCoverageTimeMap( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); }); diff --git a/tests/integration/api-breaks/DataRequest.test.ts b/tests/integration/api-breaks/DataRequest.test.ts index dcc63560..0ac74fc6 100644 --- a/tests/integration/api-breaks/DataRequest.test.ts +++ b/tests/integration/api-breaks/DataRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,116 +17,120 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { DataRequest } from "@here/olp-sdk-dataservice-read"; -chai.use(sinonChai); +describe("DataRequest", function () { + class DataRequestTest extends DataRequest { + getDataHandle(): string | undefined { + return "test"; + } -const assert = chai.assert; -const expect = chai.expect; + withDataHandle(dataHandle: string): DataRequest { + return this; + } -describe("DataRequest", function() { - class DataRequestTest extends DataRequest { - getDataHandle(): string | undefined { - return "test"; - } + getPartitionId(): string | undefined { + return "test"; + } - withDataHandle(dataHandle: string): DataRequest { - return this; - } + withPartitionId(partitionId: string): DataRequest { + return this; + } - getPartitionId(): string | undefined { - return "test"; - } + getVersion(): number | undefined { + return 5; + } - withPartitionId(partitionId: string): DataRequest { - return this; - } + withVersion(version: number): DataRequest { + return this; + } - getVersion(): number | undefined { - return 5; - } - - withVersion(version: number): DataRequest { - return this; - } - - withBillingTag(tag: string): DataRequest { - return this; - } + withBillingTag(tag: string): DataRequest { + return this; + } - getBillingTag(): string { - return "test-billing-tag"; + getBillingTag(): string { + return "test-billing-tag"; + } } - } - it("Shoud be initialized", async function() { - const request = new DataRequest(); - assert.isDefined(request); - expect(request).to.be.instanceOf(DataRequest); + it("Shoud be initialized", async function () { + const request = new DataRequest(); + assert.isDefined(request); + expect(request).to.be.instanceOf(DataRequest); - assert.isFunction(request.withPartitionId); - assert.isFunction(request.getPartitionId); - assert.isFunction(request.withDataHandle); - assert.isFunction(request.getDataHandle); - assert.isFunction(request.withBillingTag); - assert.isFunction(request.getBillingTag); - }); + assert.isFunction(request.withPartitionId); + assert.isFunction(request.getPartitionId); + assert.isFunction(request.withDataHandle); + assert.isFunction(request.getDataHandle); + assert.isFunction(request.withBillingTag); + assert.isFunction(request.getBillingTag); + }); - it("Test withVersion method with version", async function() { - const request = new DataRequestTest(); + it("Test withVersion method with version", async function () { + const request = new DataRequestTest(); - const response = request.withVersion(3); - assert.isDefined(response); - }); + const response = request.withVersion(3); + assert.isDefined(response); + }); - it("Test getVersion method without params", async function() { - const request = new DataRequestTest(); + it("Test getVersion method without params", async function () { + const request = new DataRequestTest(); - const response = request.getVersion(); - assert.isDefined(response); - }); + const response = request.getVersion(); + assert.isDefined(response); + }); - it("Test withPartitionId method with id", async function() { - const request = new DataRequestTest(); + it("Test withPartitionId method with id", async function () { + const request = new DataRequestTest(); - const response = request.withPartitionId("test"); - assert.isDefined(response); - }); + const response = request.withPartitionId("test"); + assert.isDefined(response); + }); - it("Test getPartitionId method without params", async function() { - const request = new DataRequestTest(); + it("Test getPartitionId method without params", async function () { + const request = new DataRequestTest(); - const response = request.getPartitionId(); - assert.isDefined(response); - }); + const response = request.getPartitionId(); + assert.isDefined(response); + }); - it("Test withDataHandle method with dataHandle", async function() { - const request = new DataRequestTest(); + it("Test withDataHandle method with dataHandle", async function () { + const request = new DataRequestTest(); - const response = request.withDataHandle("test"); - assert.isDefined(response); - }); + const response = request.withDataHandle("test"); + assert.isDefined(response); + }); - it("Test getDataHandle method without params", async function() { - const request = new DataRequestTest(); + it("Test getDataHandle method without params", async function () { + const request = new DataRequestTest(); - const response = request.getDataHandle(); - assert.isDefined(response); - }); + const response = request.getDataHandle(); + assert.isDefined(response); + }); - it("Test withBillingTag method with tag", async function() { - const request = new DataRequestTest(); + it("Test withBillingTag method with tag", async function () { + const request = new DataRequestTest(); - const response = request.withBillingTag("test-tag"); - assert.isDefined(response); - }); + const response = request.withBillingTag("test-tag"); + assert.isDefined(response); + }); - it("Test getBillingTag method without params", async function() { - const request = new DataRequestTest(); + it("Test getBillingTag method without params", async function () { + const request = new DataRequestTest(); - const response = request.getBillingTag(); - assert.isDefined(response); - }); + const response = request.getBillingTag(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/HttpError.test.ts b/tests/integration/api-breaks/HttpError.test.ts index 61724ff3..a51b5fcd 100644 --- a/tests/integration/api-breaks/HttpError.test.ts +++ b/tests/integration/api-breaks/HttpError.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,29 +17,32 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { HttpError } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("HttpError", function() { - it("Shoud be initialized with arguments", async function() { - const testError = new HttpError(101, "Test Error"); - assert.isDefined(testError); +describe("HttpError", function () { + it("Shoud be initialized with arguments", async function () { + const testError = new HttpError(101, "Test Error"); + assert.isDefined(testError); - expect(testError).to.be.instanceOf(HttpError); - assert.isDefined(testError.status); - assert.isDefined(testError.message); - }); + expect(testError).to.be.instanceOf(HttpError); + assert.isDefined(testError.status); + assert.isDefined(testError.message); + }); - it("Test isHttpError method with HttpError", async function() { - const testError = new HttpError(101, "Test Error"); - const response = HttpError.isHttpError(testError); - assert.isTrue(response); - }); + it("Test isHttpError method with HttpError", async function () { + const testError = new HttpError(101, "Test Error"); + const response = HttpError.isHttpError(testError); + assert.isTrue(response); + }); }); diff --git a/tests/integration/api-breaks/HttpErrorAuth.test.ts b/tests/integration/api-breaks/HttpErrorAuth.test.ts index 4309b9a5..77ed4fa0 100644 --- a/tests/integration/api-breaks/HttpErrorAuth.test.ts +++ b/tests/integration/api-breaks/HttpErrorAuth.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,29 +17,32 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { HttpError } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("Authentication HttpError", function() { - it("Shoud be initialized with arguments", async function() { - const testError = new HttpError(101, "Test Error"); - assert.isDefined(testError); +describe("Authentication HttpError", function () { + it("Shoud be initialized with arguments", async function () { + const testError = new HttpError(101, "Test Error"); + assert.isDefined(testError); - expect(testError).to.be.instanceOf(HttpError); - assert.isDefined(testError.status); - assert.isDefined(testError.message); - }); + expect(testError).to.be.instanceOf(HttpError); + assert.isDefined(testError.status); + assert.isDefined(testError.message); + }); - it("Test isHttpError method with HttpError", async function() { - const testError = new HttpError(101, "Test Error"); - const response = HttpError.isHttpError(testError); - assert.isTrue(response); - }); + it("Test isHttpError method with HttpError", async function () { + const testError = new HttpError(101, "Test Error"); + const response = HttpError.isHttpError(testError); + assert.isTrue(response); + }); }); diff --git a/tests/integration/api-breaks/IndexApi.test.ts b/tests/integration/api-breaks/IndexApi.test.ts index 11ea70c4..3bd81418 100644 --- a/tests/integration/api-breaks/IndexApi.test.ts +++ b/tests/integration/api-breaks/IndexApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,157 +17,172 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { IndexApi } from "@here/olp-sdk-dataservice-api"; import { - DataResponse, - Index, - MapStringObject, - UpdateIndexRequest + DataResponse, + Index, + MapStringObject, + UpdateIndexRequest } from "@here/olp-sdk-dataservice-api/lib/index-api"; import { mockedRequestBuilder } from "./MockedRequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("IndexApi", function() { - it("DataResponse with all required params", function() { - const params: DataResponse = {}; - - assert.isDefined(params); - }); - - it("DataResponse with all required and optional params", function() { - const params: DataResponse = { - data: [ - { - checksum: "test", - fields: "test", - id: "test", - metadata: { ["test"]: "test" }, - size: 1 - } - ], - error: "test" - }; - - assert.isDefined(params); - }); - - it("Index with all required params", function() { - const params: Index = {}; - - assert.isDefined(params); - }); - - it("Index with all required and optional params", function() { - const params: Index = { - checksum: "test", - fields: "test", - id: "test", - metadata: { ["test"]: "test" }, - size: 1 - }; - - assert.isDefined(params); - }); - - it("MapStringObject with all required params", function() { - const params: MapStringObject = { - mykey: "test" - }; - - assert.isDefined(params); - }); - - it("UpdateIndexRequest with all required params", function() { - const params: UpdateIndexRequest = {}; - - assert.isDefined(params); - }); - - it("UpdateIndexRequest with all required and optional params", function() { - const params: UpdateIndexRequest = { - additions: [ - { - checksum: "test", - fields: "test", - id: "test", - metadata: { ["test"]: "test" }, - size: 1 - } - ], - removals: ["test"] - }; - - assert.isDefined(params); - }); - - it("Test insertIndexes method with all required params", async function() { - const params = { - indexes: [ - { - checksum: "test", - fields: "test", - id: "test", - metadata: { ["test"]: "test" }, - size: 1 - } - ], - layerID: "test" - }; - - const result = await IndexApi.insertIndexes(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test performQuery method with all required params", async function() { - const params = { - layerID: "test", - query: "test" - }; - - const result = await IndexApi.performQuery(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test performQuery method with all required and optional params", async function() { - const params = { - layerID: "test", - query: "test", - huge: true - }; - - const result = await IndexApi.performQuery(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test performUpdate method with all required params", async function() { - const params = { - layerID: "test", - request: { - additions: [ - { +describe("IndexApi", function () { + it("DataResponse with all required params", function () { + const params: DataResponse = {}; + + assert.isDefined(params); + }); + + it("DataResponse with all required and optional params", function () { + const params: DataResponse = { + data: [ + { + checksum: "test", + fields: "test", + id: "test", + metadata: { ["test"]: "test" }, + size: 1 + } + ], + error: "test" + }; + + assert.isDefined(params); + }); + + it("Index with all required params", function () { + const params: Index = {}; + + assert.isDefined(params); + }); + + it("Index with all required and optional params", function () { + const params: Index = { checksum: "test", fields: "test", id: "test", metadata: { ["test"]: "test" }, size: 1 - } - ], - removals: ["test"] - } - }; - - const result = await IndexApi.performUpdate(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); + }; + + assert.isDefined(params); + }); + + it("MapStringObject with all required params", function () { + const params: MapStringObject = { + mykey: "test" + }; + + assert.isDefined(params); + }); + + it("UpdateIndexRequest with all required params", function () { + const params: UpdateIndexRequest = {}; + + assert.isDefined(params); + }); + + it("UpdateIndexRequest with all required and optional params", function () { + const params: UpdateIndexRequest = { + additions: [ + { + checksum: "test", + fields: "test", + id: "test", + metadata: { ["test"]: "test" }, + size: 1 + } + ], + removals: ["test"] + }; + + assert.isDefined(params); + }); + + it("Test insertIndexes method with all required params", async function () { + const params = { + indexes: [ + { + checksum: "test", + fields: "test", + id: "test", + metadata: { ["test"]: "test" }, + size: 1 + } + ], + layerID: "test" + }; + + const result = await IndexApi.insertIndexes( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test performQuery method with all required params", async function () { + const params = { + layerID: "test", + query: "test" + }; + + const result = await IndexApi.performQuery( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test performQuery method with all required and optional params", async function () { + const params = { + layerID: "test", + query: "test", + huge: true + }; + + const result = await IndexApi.performQuery( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test performUpdate method with all required params", async function () { + const params = { + layerID: "test", + request: { + additions: [ + { + checksum: "test", + fields: "test", + id: "test", + metadata: { ["test"]: "test" }, + size: 1 + } + ], + removals: ["test"] + } + }; + + const result = await IndexApi.performUpdate( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); }); diff --git a/tests/integration/api-breaks/IndexLayerClient.test.ts b/tests/integration/api-breaks/IndexLayerClient.test.ts index 81268572..b8ce0405 100644 --- a/tests/integration/api-breaks/IndexLayerClient.test.ts +++ b/tests/integration/api-breaks/IndexLayerClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,207 +17,211 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - IndexLayerClient, - IndexLayerClientParams, - IndexQueryRequest + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + IndexLayerClient, + IndexLayerClientParams, + IndexQueryRequest } from "@here/olp-sdk-dataservice-read"; import { IndexApi } from "@here/olp-sdk-dataservice-api"; import { HRN, OlpClientSettings } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("IndexLayerClientParams", function() { - it("IndexLayerClientParams with all required params", function() { - const params: IndexLayerClientParams = { - catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), - layerId: "mocked-layer-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }) - }; - - assert.isDefined(params); - }); - - it("IndexLayerClientParams with all required and optional params", function() { - const params: IndexLayerClientParams = { - catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), - layerId: "mocked-layer-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }) - }; - - assert.isDefined(params); - }); -}); - -describe("IndexLayerClient", function() { - class IndexLayerClientTest extends IndexLayerClient { - constructor(params: IndexLayerClientParams) { - super(params); - } +describe("IndexLayerClientParams", function () { + it("IndexLayerClientParams with all required params", function () { + const params: IndexLayerClientParams = { + catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), + layerId: "mocked-layer-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }) + }; + + assert.isDefined(params); + }); - async getData( - model: IndexApi.Index, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve(new Response()); - } + it("IndexLayerClientParams with all required and optional params", function () { + const params: IndexLayerClientParams = { + catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), + layerId: "mocked-layer-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }) + }; + + assert.isDefined(params); + }); +}); - async getPartitions( - request: IndexQueryRequest, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve([]); +describe("IndexLayerClient", function () { + class IndexLayerClientTest extends IndexLayerClient { + constructor(params: IndexLayerClientParams) { + super(params); + } + + async getData( + model: IndexApi.Index, + abortSignal?: AbortSignal + ): Promise { + return Promise.resolve(new Response()); + } + + async getPartitions( + request: IndexQueryRequest, + abortSignal?: AbortSignal + ): Promise { + return Promise.resolve([]); + } } - } - - beforeEach(function() { - IndexLayerClientTest; - }); - it("Shoud be initialized with arguments", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new IndexLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings + beforeEach(function () { + IndexLayerClientTest; }); - assert.isDefined(layerClient); - expect(layerClient).to.be.instanceOf(IndexLayerClient); - - assert.isFunction(layerClient.getData); - assert.isFunction(layerClient.getPartitions); - }); - - it("Shoud be initialized with IndexLayerClientParams", async function() { - const layerClient = new IndexLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + + it("Shoud be initialized with arguments", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new IndexLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + assert.isDefined(layerClient); + expect(layerClient).to.be.instanceOf(IndexLayerClient); + + assert.isFunction(layerClient.getData); + assert.isFunction(layerClient.getPartitions); }); - assert.isDefined(layerClient); - expect(layerClient).to.be.instanceOf(IndexLayerClient); - - assert.isFunction(layerClient.getData); - assert.isFunction(layerClient.getPartitions); - }); - - it("getPartitions method with IndexQueryRequest", async function() { - const layerClient = new IndexLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + + it("Shoud be initialized with IndexLayerClientParams", async function () { + const layerClient = new IndexLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + assert.isDefined(layerClient); + expect(layerClient).to.be.instanceOf(IndexLayerClient); + + assert.isFunction(layerClient.getData); + assert.isFunction(layerClient.getPartitions); }); - const response = layerClient.getPartitions(new IndexQueryRequest()); - assert.isDefined(response); - }); - - it("getPartitions method with IndexQueryRequest and abort signal", async function() { - const layerClient = new IndexLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("getPartitions method with IndexQueryRequest", async function () { + const layerClient = new IndexLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const response = layerClient.getPartitions(new IndexQueryRequest()); + assert.isDefined(response); }); - const abortController = new AbortController(); - - const response = layerClient.getPartitions( - new IndexQueryRequest(), - abortController.signal - ); - assert.isDefined(response); - }); - - it("getData method with model", async function() { - const layerClient = new IndexLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("getPartitions method with IndexQueryRequest and abort signal", async function () { + const layerClient = new IndexLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const abortController = new AbortController(); + + const response = layerClient.getPartitions( + new IndexQueryRequest(), + abortController.signal + ); + assert.isDefined(response); }); - const mockedModel = { - id: "8c0e5ac9-b036-4365-8820-dfcba64588fc", - size: 111928, - checksum: "448a33cd65c47bed1eeb4d72e7fa022c95a41158", - timestamp: 1551981674191, - hour_from: 1506402000000, - tile_id: 377894442, - crc: null - }; - const response = await layerClient.getData(mockedModel); - - assert.isDefined(response); - }); - - it("getData method with empty model", async function() { - const layerClient = new IndexLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("getData method with model", async function () { + const layerClient = new IndexLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const mockedModel = { + id: "8c0e5ac9-b036-4365-8820-dfcba64588fc", + size: 111928, + checksum: "448a33cd65c47bed1eeb4d72e7fa022c95a41158", + timestamp: 1551981674191, + hour_from: 1506402000000, + tile_id: 377894442, + crc: null + }; + const response = await layerClient.getData(mockedModel); + + assert.isDefined(response); }); - const mockedModel = {}; - const response = await layerClient.getData(mockedModel); + it("getData method with empty model", async function () { + const layerClient = new IndexLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); - assert.isDefined(response); - }); + const mockedModel = {}; + const response = await layerClient.getData(mockedModel); - it("getData method with model and abort signal", async function() { - const layerClient = new IndexLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + assert.isDefined(response); }); - const abortController = new AbortController(); - - const mockedModel = { - id: "8c0e5ac9-b036-4365-8820-dfcba64588fc", - size: 111928, - checksum: "448a33cd65c47bed1eeb4d72e7fa022c95a41158", - timestamp: 1551981674191, - hour_from: 1506402000000, - tile_id: 377894442, - crc: null - }; - - const response = await layerClient.getData( - mockedModel, - abortController.signal - ); - - assert.isDefined(response); - }); + it("getData method with model and abort signal", async function () { + const layerClient = new IndexLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const abortController = new AbortController(); + + const mockedModel = { + id: "8c0e5ac9-b036-4365-8820-dfcba64588fc", + size: 111928, + checksum: "448a33cd65c47bed1eeb4d72e7fa022c95a41158", + timestamp: 1551981674191, + hour_from: 1506402000000, + tile_id: 377894442, + crc: null + }; + + const response = await layerClient.getData( + mockedModel, + abortController.signal + ); + + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/IndexQueryRequest.test.ts b/tests/integration/api-breaks/IndexQueryRequest.test.ts index ffea9943..e47dc854 100644 --- a/tests/integration/api-breaks/IndexQueryRequest.test.ts +++ b/tests/integration/api-breaks/IndexQueryRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,77 +17,81 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { IndexQueryRequest } from "@here/olp-sdk-dataservice-read"; -chai.use(sinonChai); +describe("IndexQueryRequest", function () { + class IndexQueryRequestTest extends IndexQueryRequest { + withQueryString(query?: string): IndexQueryRequest { + return this; + } -const assert = chai.assert; -const expect = chai.expect; + getQueryString(): string { + return "test-query-string"; + } -describe("IndexQueryRequest", function() { - class IndexQueryRequestTest extends IndexQueryRequest { - withQueryString(query?: string): IndexQueryRequest { - return this; - } - - getQueryString(): string { - return "test-query-string"; - } - - withHugeResponse(isHuge: boolean): IndexQueryRequest { - return this; - } + withHugeResponse(isHuge: boolean): IndexQueryRequest { + return this; + } - getHugeResponse(): boolean { - return true; + getHugeResponse(): boolean { + return true; + } } - } - it("Shoud be initialized", async function() { - const request = new IndexQueryRequest(); - assert.isDefined(request); - expect(request).to.be.instanceOf(IndexQueryRequest); + it("Shoud be initialized", async function () { + const request = new IndexQueryRequest(); + assert.isDefined(request); + expect(request).to.be.instanceOf(IndexQueryRequest); - assert.isFunction(request.withHugeResponse); - assert.isFunction(request.getHugeResponse); - assert.isFunction(request.withQueryString); - assert.isFunction(request.getQueryString); - }); + assert.isFunction(request.withHugeResponse); + assert.isFunction(request.getHugeResponse); + assert.isFunction(request.withQueryString); + assert.isFunction(request.getQueryString); + }); - it("Test withHugeResponse method with isHuge", async function() { - const request = new IndexQueryRequestTest(); + it("Test withHugeResponse method with isHuge", async function () { + const request = new IndexQueryRequestTest(); - const response = request.withHugeResponse(true); - assert.isDefined(response); - }); + const response = request.withHugeResponse(true); + assert.isDefined(response); + }); - it("Test getHugeResponse method without params", async function() { - const request = new IndexQueryRequestTest(); + it("Test getHugeResponse method without params", async function () { + const request = new IndexQueryRequestTest(); - const response = request.getHugeResponse(); - assert.isDefined(response); - }); + const response = request.getHugeResponse(); + assert.isDefined(response); + }); - it("Test withQueryString method with query", async function() { - const request = new IndexQueryRequestTest(); + it("Test withQueryString method with query", async function () { + const request = new IndexQueryRequestTest(); - const response = request.withQueryString("test"); - assert.isDefined(response); - }); + const response = request.withQueryString("test"); + assert.isDefined(response); + }); - it("Test withQueryString method without params", async function() { - const request = new IndexQueryRequestTest(); + it("Test withQueryString method without params", async function () { + const request = new IndexQueryRequestTest(); - const response = request.withQueryString(); - assert.isDefined(response); - }); + const response = request.withQueryString(); + assert.isDefined(response); + }); - it("Test getQueryString method without params", async function() { - const request = new IndexQueryRequestTest(); + it("Test getQueryString method without params", async function () { + const request = new IndexQueryRequestTest(); - const response = request.getQueryString(); - assert.isDefined(response); - }); + const response = request.getQueryString(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/KeyValueCache.test.ts b/tests/integration/api-breaks/KeyValueCache.test.ts index f573e43b..ca03f909 100644 --- a/tests/integration/api-breaks/KeyValueCache.test.ts +++ b/tests/integration/api-breaks/KeyValueCache.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,48 +17,51 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { KeyValueCache } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("KeyValueCache", function() { - it("Shoud be initialized withouth arguments", async function() { - const testKeyValueCache = new KeyValueCache(); - assert.isDefined(testKeyValueCache); +describe("KeyValueCache", function () { + it("Shoud be initialized withouth arguments", async function () { + const testKeyValueCache = new KeyValueCache(); + assert.isDefined(testKeyValueCache); - expect(testKeyValueCache).to.be.instanceOf(KeyValueCache); - assert.isDefined(testKeyValueCache.put); - assert.isDefined(testKeyValueCache.get); - assert.isDefined(testKeyValueCache.remove); - }); + expect(testKeyValueCache).to.be.instanceOf(KeyValueCache); + assert.isDefined(testKeyValueCache.put); + assert.isDefined(testKeyValueCache.get); + assert.isDefined(testKeyValueCache.remove); + }); - it("Test put method with params", async function() { - const testKeyValueCache = new KeyValueCache(); + it("Test put method with params", async function () { + const testKeyValueCache = new KeyValueCache(); - const response = testKeyValueCache.put("test-key", "test"); - assert.isTrue(response); - }); + const response = testKeyValueCache.put("test-key", "test"); + assert.isTrue(response); + }); - it("Test get method with params", async function() { - const testKeyValueCache = new KeyValueCache(); - testKeyValueCache.put("test-key", "test"); + it("Test get method with params", async function () { + const testKeyValueCache = new KeyValueCache(); + testKeyValueCache.put("test-key", "test"); - const response = testKeyValueCache.get("test-key"); - assert.isDefined(response); - }); + const response = testKeyValueCache.get("test-key"); + assert.isDefined(response); + }); - it("Test remove method with params", async function() { - const testKeyValueCache = new KeyValueCache(); - testKeyValueCache.put("test-key", "test"); - testKeyValueCache.put("test-key2", "test"); + it("Test remove method with params", async function () { + const testKeyValueCache = new KeyValueCache(); + testKeyValueCache.put("test-key", "test"); + testKeyValueCache.put("test-key2", "test"); - const response = testKeyValueCache.remove("test-key"); - assert.isTrue(response); - }); + const response = testKeyValueCache.remove("test-key"); + assert.isTrue(response); + }); }); diff --git a/tests/integration/api-breaks/LayerVersionsRequest.test.ts b/tests/integration/api-breaks/LayerVersionsRequest.test.ts index d5f14c66..e0c37848 100644 --- a/tests/integration/api-breaks/LayerVersionsRequest.test.ts +++ b/tests/integration/api-breaks/LayerVersionsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,73 +17,77 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { LayerVersionsRequest } from "@here/olp-sdk-dataservice-read"; -chai.use(sinonChai); +describe("LayerVersionsRequest", function () { + class LayerVersionsRequestTest extends LayerVersionsRequest { + getVersion(): number { + return 5; + } -const assert = chai.assert; -const expect = chai.expect; + withVersion(version: number): LayerVersionsRequest { + return this; + } -describe("LayerVersionsRequest", function() { - class LayerVersionsRequestTest extends LayerVersionsRequest { - getVersion(): number { - return 5; - } - - withVersion(version: number): LayerVersionsRequest { - return this; - } - - getBillingTag(): string { - return "billing-tag"; - } + getBillingTag(): string { + return "billing-tag"; + } - withBillingTag(tag: string): LayerVersionsRequest { - return this; + withBillingTag(tag: string): LayerVersionsRequest { + return this; + } } - } - it("Shoud be initialized", async function() { - const request = new LayerVersionsRequestTest(); - assert.isDefined(request); - expect(request).to.be.instanceOf(LayerVersionsRequest); + it("Shoud be initialized", async function () { + const request = new LayerVersionsRequestTest(); + assert.isDefined(request); + expect(request).to.be.instanceOf(LayerVersionsRequest); - assert.isFunction(request.withVersion); - assert.isFunction(request.getVersion); + assert.isFunction(request.withVersion); + assert.isFunction(request.getVersion); - assert.isFunction(request.withBillingTag); - assert.isFunction(request.getBillingTag); - }); + assert.isFunction(request.withBillingTag); + assert.isFunction(request.getBillingTag); + }); - it("Test withVersion method with version", async function() { - const request = new LayerVersionsRequestTest(); + it("Test withVersion method with version", async function () { + const request = new LayerVersionsRequestTest(); - const response = request.withVersion(11); - assert.isDefined(response); - }); + const response = request.withVersion(11); + assert.isDefined(response); + }); - it("Test getVersion method without params", async function() { - const request = new LayerVersionsRequestTest(); - request.withVersion(11); + it("Test getVersion method without params", async function () { + const request = new LayerVersionsRequestTest(); + request.withVersion(11); - const response = request.getVersion(); - assert.isDefined(response); - }); + const response = request.getVersion(); + assert.isDefined(response); + }); - it("Test withBillingTag method with tag", async function() { - const request = new LayerVersionsRequestTest(); + it("Test withBillingTag method with tag", async function () { + const request = new LayerVersionsRequestTest(); - const response = request.withBillingTag("test-tag"); - assert.isDefined(response); - }); + const response = request.withBillingTag("test-tag"); + assert.isDefined(response); + }); - it("Test getBillingTag method without params", async function() { - const request = new LayerVersionsRequestTest(); - request.withBillingTag("test-tag"); + it("Test getBillingTag method without params", async function () { + const request = new LayerVersionsRequestTest(); + request.withBillingTag("test-tag"); - const response = request.getBillingTag(); - assert.isDefined(response); - }); + const response = request.getBillingTag(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/LookupApi.test.ts b/tests/integration/api-breaks/LookupApi.test.ts index 7023e605..7e113bb4 100644 --- a/tests/integration/api-breaks/LookupApi.test.ts +++ b/tests/integration/api-breaks/LookupApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,127 +17,139 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { LookupApi } from "@here/olp-sdk-dataservice-api"; import { - API, - ApiNotFoundError + API, + ApiNotFoundError } from "@here/olp-sdk-dataservice-api/lib/lookup-api"; import { mockedRequestBuilder } from "./MockedRequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("LookupApi", function() { - it("API with all required params", function() { - const params: API = { - api: "test", - version: "test", - baseURL: "test" - }; - - assert.isDefined(params); - }); - - it("API with all required and optional params", function() { - const params: API = { - api: "test", - version: "test", - baseURL: "test", - parameters: { ["test"]: "test" } - }; - - assert.isDefined(params); - }); - - it("ApiNotFoundError with all required params", function() { - const params: ApiNotFoundError = {}; - - assert.isDefined(params); - }); - - it("ApiNotFoundError with all required and optional params", function() { - const params: ApiNotFoundError = { - status: 1, - title: "test", - detail: [{ name: "test", error: "test" }], - error: "test", - error_description: "test" - }; - - assert.isDefined(params); - }); - - it("Test platformAPI method with all required params", async function() { - const params = { - api: "mocked-api", - version: "mocked-version" - }; - - const result = await LookupApi.platformAPI(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test getPlatformAPIList method without params", async function() { - const result = await LookupApi.getPlatformAPIList(mockedRequestBuilder); - - expect(result).to.be.equal("success"); - }); - - it("Test resourceAPI method with all required params", async function() { - const params = { - hrn: "mocked-hrn", - api: "test", - version: "test" - }; - - const result = await LookupApi.resourceAPI(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test resourceAPI method with all required and optional params", async function() { - const params = { - hrn: "mocked-hrn", - api: "test", - version: "test", - region: "mocked-region" - }; - - const result = await LookupApi.resourceAPI(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test getResourceAPIList method with all required params", async function() { - const params = { - hrn: "mocked-hrn" - }; - - const result = await LookupApi.getResourceAPIList( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getResourceAPIList method with all required and optional params", async function() { - const params = { - hrn: "mocked-hrn", - region: "mocked-region" - }; - - const result = await LookupApi.getResourceAPIList( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); +describe("LookupApi", function () { + it("API with all required params", function () { + const params: API = { + api: "test", + version: "test", + baseURL: "test" + }; + + assert.isDefined(params); + }); + + it("API with all required and optional params", function () { + const params: API = { + api: "test", + version: "test", + baseURL: "test", + parameters: { ["test"]: "test" } + }; + + assert.isDefined(params); + }); + + it("ApiNotFoundError with all required params", function () { + const params: ApiNotFoundError = {}; + + assert.isDefined(params); + }); + + it("ApiNotFoundError with all required and optional params", function () { + const params: ApiNotFoundError = { + status: 1, + title: "test", + detail: [{ name: "test", error: "test" }], + error: "test", + error_description: "test" + }; + + assert.isDefined(params); + }); + + it("Test platformAPI method with all required params", async function () { + const params = { + api: "mocked-api", + version: "mocked-version" + }; + + const result = await LookupApi.platformAPI( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getPlatformAPIList method without params", async function () { + const result = await LookupApi.getPlatformAPIList(mockedRequestBuilder); + + expect(result).to.be.equal("success"); + }); + + it("Test resourceAPI method with all required params", async function () { + const params = { + hrn: "mocked-hrn", + api: "test", + version: "test" + }; + + const result = await LookupApi.resourceAPI( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test resourceAPI method with all required and optional params", async function () { + const params = { + hrn: "mocked-hrn", + api: "test", + version: "test", + region: "mocked-region" + }; + + const result = await LookupApi.resourceAPI( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getResourceAPIList method with all required params", async function () { + const params = { + hrn: "mocked-hrn" + }; + + const result = await LookupApi.getResourceAPIList( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getResourceAPIList method with all required and optional params", async function () { + const params = { + hrn: "mocked-hrn", + region: "mocked-region" + }; + + const result = await LookupApi.getResourceAPIList( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); }); diff --git a/tests/integration/api-breaks/MetadataApi.test.ts b/tests/integration/api-breaks/MetadataApi.test.ts index 24a6f56d..f3117056 100644 --- a/tests/integration/api-breaks/MetadataApi.test.ts +++ b/tests/integration/api-breaks/MetadataApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,402 +17,417 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { MetadataApi } from "@here/olp-sdk-dataservice-api"; import { - LayerVersion, - LayerVersions, - Partition, - Partitions, - VersionDependency, - VersionInfo, - VersionInfos, - VersionResponse + LayerVersion, + LayerVersions, + Partition, + Partitions, + VersionDependency, + VersionInfo, + VersionInfos, + VersionResponse } from "@here/olp-sdk-dataservice-api/lib/metadata-api"; import { mockedRequestBuilder } from "./MockedRequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("MetadataApi", function() { - it("LayerVersion with all required params", function() { - const params: LayerVersion = { - layer: "test", - version: 1, - timestamp: 1 - }; - - assert.isDefined(params); - }); - - it("LayerVersion with all required and optional params", function() { - const params: LayerVersion = { - layer: "test", - version: 1, - timestamp: 1 - }; - - assert.isDefined(params); - }); - - it("LayerVersions with all required params", function() { - const params: LayerVersions = { - layerVersions: [ - { - layer: "test", - version: 1, - timestamp: 1 - } - ], - version: 1 - }; - - assert.isDefined(params); - }); - - it("LayerVersions with all required and optional params", function() { - const params: LayerVersions = { - layerVersions: [ - { - layer: "test", - version: 1, - timestamp: 1 - } - ], - version: 1 - }; - - assert.isDefined(params); - }); - - it("Partition with all required params", function() { - const params: Partition = { - dataHandle: "test", - partition: "test", - version: 1 - }; - - assert.isDefined(params); - }); - - it("Partition with all required and optional params", function() { - const params: Partition = { - checksum: "test", - compressedDataSize: 1, - dataHandle: "test", - dataSize: 1, - partition: "test", - version: 1 - }; - - assert.isDefined(params); - }); - - it("Partitions with all required params", function() { - const params: Partitions = { - partitions: [ - { - checksum: "test", - compressedDataSize: 1, - dataHandle: "test", - dataSize: 1, - partition: "test", - version: 1 - } - ] - }; - - assert.isDefined(params); - }); - - it("Partitions with all required and optional params", function() { - const params: Partitions = { - partitions: [ - { - checksum: "test", - compressedDataSize: 1, - dataHandle: "test", - dataSize: 1, - partition: "test", - version: 1 - } - ], - next: "test" - }; - - assert.isDefined(params); - }); - - it("VersionDependency with all required params", function() { - const params: VersionDependency = { - direct: true, - hrn: "test", - version: 1 - }; - - assert.isDefined(params); - }); - - it("VersionDependency with all required and optional params", function() { - const params: VersionDependency = { - direct: true, - hrn: "test", - version: 1 - }; - - assert.isDefined(params); - }); - - it("VersionInfo with all required params", function() { - const params: VersionInfo = { - dependencies: [ - { - direct: true, - hrn: "test", - version: 1 - } - ], - partitionCounts: { ["test"]: 1 }, - timestamp: 1, - version: 1 - }; - - assert.isDefined(params); - }); - - it("VersionInfo with all required and optional params", function() { - const params: VersionInfo = { - dependencies: [ - { - direct: true, - hrn: "test", - version: 1 - } - ], - partitionCounts: { ["test"]: 1 }, - timestamp: 1, - version: 1 - }; - - assert.isDefined(params); - }); - - it("VersionInfos with all required params", function() { - const params: VersionInfos = { - versions: [ - { - dependencies: [ - { - direct: true, - hrn: "test", - version: 1 - } - ], - partitionCounts: { ["test"]: 1 }, - timestamp: 1, - version: 1 - } - ] - }; - - assert.isDefined(params); - }); - - it("VersionInfos with all required and optional params", function() { - const params: VersionInfos = { - versions: [ - { - dependencies: [ - { - direct: true, - hrn: "test", - version: 1 - } - ], - partitionCounts: { ["test"]: 1 }, - timestamp: 1, - version: 1 - } - ] - }; - - assert.isDefined(params); - }); - - it("VersionResponse with all required params", function() { - const params: VersionResponse = { - version: 1 - }; - - assert.isDefined(params); - }); - - it("VersionResponse with all required and optional params", function() { - const params: VersionResponse = { - version: 1 - }; - - assert.isDefined(params); - }); - - it("Test getChanges method with all required params", async function() { - const params = { - layerId: "test" - }; - - const result = await MetadataApi.getChanges(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test getChanges method with all required and optional params", async function() { - const params = { - layerId: "test", - startVersion: 1, - endVersion: 1, - sinceTime: 1, - additionalFields: ["test"], - range: "test", - billingTag: "test" - }; - - const result = await MetadataApi.getChanges(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test getLayerVersions method with all required params", async function() { - const params = { - version: 1 - }; - - const result = await MetadataApi.getLayerVersions( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getLayerVersions method with all required and optional params", async function() { - const params = { - version: 1, - billingTag: "test" - }; - - const result = await MetadataApi.getLayerVersions( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getPartitions method with all required params", async function() { - const params = { - layerId: "test" - }; - - const result = await MetadataApi.getPartitions( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getPartitions method with all required and optional params", async function() { - const params = { - layerId: "test", - version: 1, - additionalFields: ["test"], - range: "test", - billingTag: "test" - }; - - const result = await MetadataApi.getPartitions( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test latestVersion method with all required params", async function() { - const params = { - startVersion: 1 - }; - - const result = await MetadataApi.latestVersion( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test latestVersion method with all required and optional params", async function() { - const params = { - startVersion: 1, - billingTag: "test" - }; - - const result = await MetadataApi.latestVersion( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test listVersions method with all required params", async function() { - const params = { - startVersion: 1, - endVersion: 1 - }; - - const result = await MetadataApi.listVersions(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test listVersions method with all required and optional params", async function() { - const params = { - startVersion: 1, - endVersion: 1, - billingTag: "test" - }; - - const result = await MetadataApi.listVersions(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test minimumVersion method with all required params", async function() { - const params = {}; - - const result = await MetadataApi.minimumVersion( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test minimumVersion method with all required and optional params", async function() { - const params = { - billingTag: "test" - }; - - const result = await MetadataApi.minimumVersion( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); +describe("MetadataApi", function () { + it("LayerVersion with all required params", function () { + const params: LayerVersion = { + layer: "test", + version: 1, + timestamp: 1 + }; + + assert.isDefined(params); + }); + + it("LayerVersion with all required and optional params", function () { + const params: LayerVersion = { + layer: "test", + version: 1, + timestamp: 1 + }; + + assert.isDefined(params); + }); + + it("LayerVersions with all required params", function () { + const params: LayerVersions = { + layerVersions: [ + { + layer: "test", + version: 1, + timestamp: 1 + } + ], + version: 1 + }; + + assert.isDefined(params); + }); + + it("LayerVersions with all required and optional params", function () { + const params: LayerVersions = { + layerVersions: [ + { + layer: "test", + version: 1, + timestamp: 1 + } + ], + version: 1 + }; + + assert.isDefined(params); + }); + + it("Partition with all required params", function () { + const params: Partition = { + dataHandle: "test", + partition: "test", + version: 1 + }; + + assert.isDefined(params); + }); + + it("Partition with all required and optional params", function () { + const params: Partition = { + checksum: "test", + compressedDataSize: 1, + dataHandle: "test", + dataSize: 1, + partition: "test", + version: 1 + }; + + assert.isDefined(params); + }); + + it("Partitions with all required params", function () { + const params: Partitions = { + partitions: [ + { + checksum: "test", + compressedDataSize: 1, + dataHandle: "test", + dataSize: 1, + partition: "test", + version: 1 + } + ] + }; + + assert.isDefined(params); + }); + + it("Partitions with all required and optional params", function () { + const params: Partitions = { + partitions: [ + { + checksum: "test", + compressedDataSize: 1, + dataHandle: "test", + dataSize: 1, + partition: "test", + version: 1 + } + ], + next: "test" + }; + + assert.isDefined(params); + }); + + it("VersionDependency with all required params", function () { + const params: VersionDependency = { + direct: true, + hrn: "test", + version: 1 + }; + + assert.isDefined(params); + }); + + it("VersionDependency with all required and optional params", function () { + const params: VersionDependency = { + direct: true, + hrn: "test", + version: 1 + }; + + assert.isDefined(params); + }); + + it("VersionInfo with all required params", function () { + const params: VersionInfo = { + dependencies: [ + { + direct: true, + hrn: "test", + version: 1 + } + ], + partitionCounts: { ["test"]: 1 }, + timestamp: 1, + version: 1 + }; + + assert.isDefined(params); + }); + + it("VersionInfo with all required and optional params", function () { + const params: VersionInfo = { + dependencies: [ + { + direct: true, + hrn: "test", + version: 1 + } + ], + partitionCounts: { ["test"]: 1 }, + timestamp: 1, + version: 1 + }; + + assert.isDefined(params); + }); + + it("VersionInfos with all required params", function () { + const params: VersionInfos = { + versions: [ + { + dependencies: [ + { + direct: true, + hrn: "test", + version: 1 + } + ], + partitionCounts: { ["test"]: 1 }, + timestamp: 1, + version: 1 + } + ] + }; + + assert.isDefined(params); + }); + + it("VersionInfos with all required and optional params", function () { + const params: VersionInfos = { + versions: [ + { + dependencies: [ + { + direct: true, + hrn: "test", + version: 1 + } + ], + partitionCounts: { ["test"]: 1 }, + timestamp: 1, + version: 1 + } + ] + }; + + assert.isDefined(params); + }); + + it("VersionResponse with all required params", function () { + const params: VersionResponse = { + version: 1 + }; + + assert.isDefined(params); + }); + + it("VersionResponse with all required and optional params", function () { + const params: VersionResponse = { + version: 1 + }; + + assert.isDefined(params); + }); + + it("Test getChanges method with all required params", async function () { + const params = { + layerId: "test" + }; + + const result = await MetadataApi.getChanges( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getChanges method with all required and optional params", async function () { + const params = { + layerId: "test", + startVersion: 1, + endVersion: 1, + sinceTime: 1, + additionalFields: ["test"], + range: "test", + billingTag: "test" + }; + + const result = await MetadataApi.getChanges( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getLayerVersions method with all required params", async function () { + const params = { + version: 1 + }; + + const result = await MetadataApi.getLayerVersions( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getLayerVersions method with all required and optional params", async function () { + const params = { + version: 1, + billingTag: "test" + }; + + const result = await MetadataApi.getLayerVersions( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getPartitions method with all required params", async function () { + const params = { + layerId: "test" + }; + + const result = await MetadataApi.getPartitions( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getPartitions method with all required and optional params", async function () { + const params = { + layerId: "test", + version: 1, + additionalFields: ["test"], + range: "test", + billingTag: "test" + }; + + const result = await MetadataApi.getPartitions( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test latestVersion method with all required params", async function () { + const params = { + startVersion: 1 + }; + + const result = await MetadataApi.latestVersion( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test latestVersion method with all required and optional params", async function () { + const params = { + startVersion: 1, + billingTag: "test" + }; + + const result = await MetadataApi.latestVersion( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test listVersions method with all required params", async function () { + const params = { + startVersion: 1, + endVersion: 1 + }; + + const result = await MetadataApi.listVersions( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test listVersions method with all required and optional params", async function () { + const params = { + startVersion: 1, + endVersion: 1, + billingTag: "test" + }; + + const result = await MetadataApi.listVersions( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test minimumVersion method with all required params", async function () { + const params = {}; + + const result = await MetadataApi.minimumVersion( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test minimumVersion method with all required and optional params", async function () { + const params = { + billingTag: "test" + }; + + const result = await MetadataApi.minimumVersion( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); }); diff --git a/tests/integration/api-breaks/PartitionsRequest.test.ts b/tests/integration/api-breaks/PartitionsRequest.test.ts index b4b63586..bb511fbc 100644 --- a/tests/integration/api-breaks/PartitionsRequest.test.ts +++ b/tests/integration/api-breaks/PartitionsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,124 +17,128 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { PartitionsRequest } from "@here/olp-sdk-dataservice-read"; import { AdditionalFields } from "@here/olp-sdk-dataservice-api"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("PartitionsRequest", function() { - class PartitionsRequestTest extends PartitionsRequest { - withVersion(version?: number): PartitionsRequest { - return this; - } - getVersion(): number { - return 10; - } - - withBillingTag(tag: string): PartitionsRequest { - return this; - } - - getBillingTag(): string { - return "billing-tag"; - } - - withPartitionIds(ids: string[]): PartitionsRequest { - return this; - } - - getPartitionIds(): string[] { - return ["partitionIds"]; - } - - withAdditionalFields( - additionalFields: AdditionalFields - ): PartitionsRequest { - return this; - } - - getAdditionalFields(): AdditionalFields { - return ["dataSize"]; +describe("PartitionsRequest", function () { + class PartitionsRequestTest extends PartitionsRequest { + withVersion(version?: number): PartitionsRequest { + return this; + } + getVersion(): number { + return 10; + } + + withBillingTag(tag: string): PartitionsRequest { + return this; + } + + getBillingTag(): string { + return "billing-tag"; + } + + withPartitionIds(ids: string[]): PartitionsRequest { + return this; + } + + getPartitionIds(): string[] { + return ["partitionIds"]; + } + + withAdditionalFields( + additionalFields: AdditionalFields + ): PartitionsRequest { + return this; + } + + getAdditionalFields(): AdditionalFields { + return ["dataSize"]; + } } - } - it("Shoud be initialized", async function() { - const request = new PartitionsRequest(); - assert.isDefined(request); - expect(request).to.be.instanceOf(PartitionsRequest); - assert.isFunction(request.withBillingTag); - assert.isFunction(request.getBillingTag); - assert.isFunction(request.withPartitionIds); - assert.isFunction(request.getPartitionIds); - assert.isFunction(request.withAdditionalFields); - assert.isFunction(request.getAdditionalFields); - }); + it("Shoud be initialized", async function () { + const request = new PartitionsRequest(); + assert.isDefined(request); + expect(request).to.be.instanceOf(PartitionsRequest); + assert.isFunction(request.withBillingTag); + assert.isFunction(request.getBillingTag); + assert.isFunction(request.withPartitionIds); + assert.isFunction(request.getPartitionIds); + assert.isFunction(request.withAdditionalFields); + assert.isFunction(request.getAdditionalFields); + }); - it("Test withVersion method with version", async function() { - const request = new PartitionsRequestTest(); + it("Test withVersion method with version", async function () { + const request = new PartitionsRequestTest(); - const response = request.withVersion(5); - assert.isDefined(response); - }); + const response = request.withVersion(5); + assert.isDefined(response); + }); - it("Test withVersion method without params", async function() { - const request = new PartitionsRequestTest(); + it("Test withVersion method without params", async function () { + const request = new PartitionsRequestTest(); - const response = request.withVersion(); - assert.isDefined(response); - }); + const response = request.withVersion(); + assert.isDefined(response); + }); - it("Test getVersion method without params", async function() { - const request = new PartitionsRequestTest(); + it("Test getVersion method without params", async function () { + const request = new PartitionsRequestTest(); - const response = request.getVersion(); - assert.isDefined(response); - }); + const response = request.getVersion(); + assert.isDefined(response); + }); - it("Test withBillingTag method with tag", async function() { - const request = new PartitionsRequestTest(); + it("Test withBillingTag method with tag", async function () { + const request = new PartitionsRequestTest(); - const response = request.withBillingTag("test-tag"); - assert.isDefined(response); - }); + const response = request.withBillingTag("test-tag"); + assert.isDefined(response); + }); - it("Test getBillingTag method without params", async function() { - const request = new PartitionsRequestTest(); + it("Test getBillingTag method without params", async function () { + const request = new PartitionsRequestTest(); - const response = request.getBillingTag(); - assert.isDefined(response); - }); + const response = request.getBillingTag(); + assert.isDefined(response); + }); - it("Test withPartitionIds method with ids", async function() { - const request = new PartitionsRequestTest(); + it("Test withPartitionIds method with ids", async function () { + const request = new PartitionsRequestTest(); - const response = request.withPartitionIds(["test"]); - assert.isDefined(response); - }); + const response = request.withPartitionIds(["test"]); + assert.isDefined(response); + }); - it("Test getPartitionIds method without params", async function() { - const request = new PartitionsRequestTest(); + it("Test getPartitionIds method without params", async function () { + const request = new PartitionsRequestTest(); - const response = request.getPartitionIds(); - assert.isDefined(response); - }); + const response = request.getPartitionIds(); + assert.isDefined(response); + }); - it("Test withAdditionalFields method with AdditionalFields", async function() { - const request = new PartitionsRequestTest(); + it("Test withAdditionalFields method with AdditionalFields", async function () { + const request = new PartitionsRequestTest(); - const response = request.withAdditionalFields(["dataSize"]); - assert.isDefined(response); - }); + const response = request.withAdditionalFields(["dataSize"]); + assert.isDefined(response); + }); - it("Test getAdditionalFields method without params", async function() { - const request = new PartitionsRequestTest(); + it("Test getAdditionalFields method without params", async function () { + const request = new PartitionsRequestTest(); - const response = request.getAdditionalFields(); - assert.isDefined(response); - }); + const response = request.getAdditionalFields(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/PollRequest.test.ts b/tests/integration/api-breaks/PollRequest.test.ts index 725ff857..c403b672 100644 --- a/tests/integration/api-breaks/PollRequest.test.ts +++ b/tests/integration/api-breaks/PollRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,70 +17,74 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { PollRequest } from "@here/olp-sdk-dataservice-read"; -chai.use(sinonChai); +describe("PollRequest", function () { + class PollRequestTest extends PollRequest { + getMode(): "serial" { + return "serial"; + } -const assert = chai.assert; -const expect = chai.expect; + withMode(mode: "serial"): PollRequest { + return this; + } -describe("PollRequest", function() { - class PollRequestTest extends PollRequest { - getMode(): "serial" { - return "serial"; - } - - withMode(mode: "serial"): PollRequest { - return this; - } - - getSubscriptionId(): string { - return "subscription-id"; - } + getSubscriptionId(): string { + return "subscription-id"; + } - withSubscriptionId(id: string): PollRequest { - return this; + withSubscriptionId(id: string): PollRequest { + return this; + } } - } - it("Shoud be initialized", async function() { - const request = new PollRequest(); - assert.isDefined(request); - expect(request).to.be.instanceOf(PollRequest); + it("Shoud be initialized", async function () { + const request = new PollRequest(); + assert.isDefined(request); + expect(request).to.be.instanceOf(PollRequest); - assert.isFunction(request.withMode); - assert.isFunction(request.getMode); - assert.isFunction(request.withSubscriptionId); - assert.isFunction(request.getSubscriptionId); - }); + assert.isFunction(request.withMode); + assert.isFunction(request.getMode); + assert.isFunction(request.withSubscriptionId); + assert.isFunction(request.getSubscriptionId); + }); - it("Test withMode method with mode", async function() { - const request = new PollRequestTest(); + it("Test withMode method with mode", async function () { + const request = new PollRequestTest(); - const response = request.withMode("serial"); - assert.isDefined(response); - }); + const response = request.withMode("serial"); + assert.isDefined(response); + }); - it("Test getMode method without params", async function() { - const request = new PollRequestTest(); + it("Test getMode method without params", async function () { + const request = new PollRequestTest(); - const response = request.getMode(); - assert.isDefined(response); - }); + const response = request.getMode(); + assert.isDefined(response); + }); - it("Test withSubscriptionId method with id", async function() { - const request = new PollRequestTest(); + it("Test withSubscriptionId method with id", async function () { + const request = new PollRequestTest(); - const response = request.withSubscriptionId("test"); - assert.isDefined(response); - }); + const response = request.withSubscriptionId("test"); + assert.isDefined(response); + }); - it("Test getSubscriptionId method without params", async function() { - const request = new PollRequestTest(); + it("Test getSubscriptionId method without params", async function () { + const request = new PollRequestTest(); - const response = request.getSubscriptionId(); - assert.isDefined(response); - }); + const response = request.getSubscriptionId(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/QuadKeyPartitionsRequest.test.ts b/tests/integration/api-breaks/QuadKeyPartitionsRequest.test.ts index ef2d4597..f0f678f3 100644 --- a/tests/integration/api-breaks/QuadKeyPartitionsRequest.test.ts +++ b/tests/integration/api-breaks/QuadKeyPartitionsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,161 +17,165 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { AdditionalFields } from "@here/olp-sdk-dataservice-api"; import { - QuadKeyPartitionsRequest, - QuadTreeIndexDepth + QuadKeyPartitionsRequest, + QuadTreeIndexDepth } from "@here/olp-sdk-dataservice-read"; import { QuadKey } from "@here/olp-sdk-core"; -chai.use(sinonChai); +describe("QuadKeyPartitionsRequest", function () { + class QuadKeyPartitionsRequestTest extends QuadKeyPartitionsRequest { + withVersion(version?: number): QuadKeyPartitionsRequest { + return this; + } + + withQuadKey(quadKey: QuadKey): QuadKeyPartitionsRequest { + return this; + } + + withDepth(depth: QuadTreeIndexDepth): QuadKeyPartitionsRequest { + return this; + } + + withBillingTag(tag: string): QuadKeyPartitionsRequest { + return this; + } + + withAdditionalFields( + additionalFields: AdditionalFields + ): QuadKeyPartitionsRequest { + return this; + } + + getVersion(): number { + return 10; + } + + getQuadKey(): QuadKey { + return { + row: 5, + column: 5, + level: 5 + }; + } + + getDepth(): QuadTreeIndexDepth { + return 0; + } + + getBillingTag(): string { + return "test-billing-tag"; + } + + getAdditionalFields(): AdditionalFields { + return ["dataSize"]; + } + } -const assert = chai.assert; -const expect = chai.expect; + it("Shoud be initialized", async function () { + const request = new QuadKeyPartitionsRequest(); + assert.isDefined(request); + expect(request).to.be.instanceOf(QuadKeyPartitionsRequest); + assert.isFunction(request.withDepth); + assert.isFunction(request.getDepth); + assert.isFunction(request.withQuadKey); + assert.isFunction(request.getQuadKey); + assert.isFunction(request.withBillingTag); + assert.isFunction(request.getBillingTag); + assert.isFunction(request.withAdditionalFields); + assert.isFunction(request.getAdditionalFields); + }); -describe("QuadKeyPartitionsRequest", function() { - class QuadKeyPartitionsRequestTest extends QuadKeyPartitionsRequest { - withVersion(version?: number): QuadKeyPartitionsRequest { - return this; - } + it("Test withVersion method with version", async function () { + const request = new QuadKeyPartitionsRequestTest(); - withQuadKey(quadKey: QuadKey): QuadKeyPartitionsRequest { - return this; - } + const response = request.withVersion(3); + assert.isDefined(response); + }); - withDepth(depth: QuadTreeIndexDepth): QuadKeyPartitionsRequest { - return this; - } + it("Test withVersion method without params", async function () { + const request = new QuadKeyPartitionsRequestTest(); - withBillingTag(tag: string): QuadKeyPartitionsRequest { - return this; - } + const response = request.withVersion(); + assert.isDefined(response); + }); - withAdditionalFields( - additionalFields: AdditionalFields - ): QuadKeyPartitionsRequest { - return this; - } + it("Test getVersion method without params", async function () { + const request = new QuadKeyPartitionsRequestTest(); - getVersion(): number { - return 10; - } + const response = request.getVersion(); + assert.isDefined(response); + }); - getQuadKey(): QuadKey { - return { - row: 5, - column: 5, - level: 5 - }; - } + it("Test withDepth method with depth", async function () { + const request = new QuadKeyPartitionsRequestTest(); - getDepth(): QuadTreeIndexDepth { - return 0; - } + const response = request.withDepth(3); + assert.isDefined(response); + }); - getBillingTag(): string { - return "test-billing-tag"; - } + it("Test getDepth method without params", async function () { + const request = new QuadKeyPartitionsRequestTest(); - getAdditionalFields(): AdditionalFields { - return ["dataSize"]; - } - } - - it("Shoud be initialized", async function() { - const request = new QuadKeyPartitionsRequest(); - assert.isDefined(request); - expect(request).to.be.instanceOf(QuadKeyPartitionsRequest); - assert.isFunction(request.withDepth); - assert.isFunction(request.getDepth); - assert.isFunction(request.withQuadKey); - assert.isFunction(request.getQuadKey); - assert.isFunction(request.withBillingTag); - assert.isFunction(request.getBillingTag); - assert.isFunction(request.withAdditionalFields); - assert.isFunction(request.getAdditionalFields); - }); - - it("Test withVersion method with version", async function() { - const request = new QuadKeyPartitionsRequestTest(); - - const response = request.withVersion(3); - assert.isDefined(response); - }); - - it("Test withVersion method without params", async function() { - const request = new QuadKeyPartitionsRequestTest(); - - const response = request.withVersion(); - assert.isDefined(response); - }); - - it("Test getVersion method without params", async function() { - const request = new QuadKeyPartitionsRequestTest(); - - const response = request.getVersion(); - assert.isDefined(response); - }); - - it("Test withDepth method with depth", async function() { - const request = new QuadKeyPartitionsRequestTest(); - - const response = request.withDepth(3); - assert.isDefined(response); - }); - - it("Test getDepth method without params", async function() { - const request = new QuadKeyPartitionsRequestTest(); - - const response = request.getDepth(); - assert.isDefined(response); - }); - - it("Test withQuadKey method with quadKey", async function() { - const request = new QuadKeyPartitionsRequestTest(); - - const response = request.withQuadKey({ - row: 5, - column: 5, - level: 5 + const response = request.getDepth(); + assert.isDefined(response); + }); + + it("Test withQuadKey method with quadKey", async function () { + const request = new QuadKeyPartitionsRequestTest(); + + const response = request.withQuadKey({ + row: 5, + column: 5, + level: 5 + }); + assert.isDefined(response); }); - assert.isDefined(response); - }); - it("Test getQuadKey method without params", async function() { - const request = new QuadKeyPartitionsRequestTest(); + it("Test getQuadKey method without params", async function () { + const request = new QuadKeyPartitionsRequestTest(); - const response = request.getQuadKey(); - assert.isDefined(response); - }); + const response = request.getQuadKey(); + assert.isDefined(response); + }); - it("Test withBillingTag method with tag", async function() { - const catalogRequest = new QuadKeyPartitionsRequestTest(); + it("Test withBillingTag method with tag", async function () { + const catalogRequest = new QuadKeyPartitionsRequestTest(); - const response = catalogRequest.withBillingTag("test-tag"); - assert.isDefined(response); - }); + const response = catalogRequest.withBillingTag("test-tag"); + assert.isDefined(response); + }); - it("Test getBillingTag method without params", async function() { - const catalogRequest = new QuadKeyPartitionsRequestTest(); + it("Test getBillingTag method without params", async function () { + const catalogRequest = new QuadKeyPartitionsRequestTest(); - const response = catalogRequest.getBillingTag(); - assert.isDefined(response); - }); + const response = catalogRequest.getBillingTag(); + assert.isDefined(response); + }); - it("Test withAdditionalFields method with additionalFields", async function() { - const catalogRequest = new QuadKeyPartitionsRequestTest(); + it("Test withAdditionalFields method with additionalFields", async function () { + const catalogRequest = new QuadKeyPartitionsRequestTest(); - const response = catalogRequest.withAdditionalFields(["dataSize"]); - assert.isDefined(response); - }); + const response = catalogRequest.withAdditionalFields(["dataSize"]); + assert.isDefined(response); + }); - it("Test getAdditionalFields method without params", async function() { - const catalogRequest = new QuadKeyPartitionsRequestTest(); + it("Test getAdditionalFields method without params", async function () { + const catalogRequest = new QuadKeyPartitionsRequestTest(); - const response = catalogRequest.getAdditionalFields(); - assert.isDefined(response); - }); + const response = catalogRequest.getAdditionalFields(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/QuadTreeIndexRequest.test.ts b/tests/integration/api-breaks/QuadTreeIndexRequest.test.ts index 6c934cef..4247fc60 100644 --- a/tests/integration/api-breaks/QuadTreeIndexRequest.test.ts +++ b/tests/integration/api-breaks/QuadTreeIndexRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,204 +17,208 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - QuadTreeIndexDepth, - QuadTreeIndexRequest + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + QuadTreeIndexDepth, + QuadTreeIndexRequest } from "@here/olp-sdk-dataservice-read"; import { AdditionalFields } from "@here/olp-sdk-dataservice-api"; import { QuadKey, HRN } from "@here/olp-sdk-core"; -chai.use(sinonChai); +describe("QuadTreeIndexRequest", function () { + class QuadTreeIndexRequestTest extends QuadTreeIndexRequest { + withVersion(version?: number): QuadTreeIndexRequest { + return this; + } + + withQuadKey(quadKey: QuadKey): QuadTreeIndexRequest { + return this; + } + + withDepth(depth: QuadTreeIndexDepth): QuadTreeIndexRequest { + return this; + } + + withBillingTag(tag: string): QuadTreeIndexRequest { + return this; + } + + withAdditionalFields( + additionalFields?: AdditionalFields + ): QuadTreeIndexRequest { + return this; + } + + getVersion(): number { + return 10; + } + + getQuadKey(): QuadKey { + return { + row: 5, + column: 5, + level: 5 + }; + } + + getDepth(): QuadTreeIndexDepth { + return 0; + } + + getBillingTag(): string { + return "test-billing-tag"; + } + + getAdditionalFields(): AdditionalFields { + return ["dataSize"]; + } + } -const assert = chai.assert; -const expect = chai.expect; + it("Shoud be initialized", async function () { + const request = new QuadTreeIndexRequest( + HRN.fromString("hrn:here:data:::test-hrn"), + "id", + "versioned" + ); + assert.isDefined(request); + expect(request).to.be.instanceOf(QuadTreeIndexRequest); + + assert.isFunction(request.withBillingTag); + assert.isFunction(request.getBillingTag); + }); -describe("QuadTreeIndexRequest", function() { - class QuadTreeIndexRequestTest extends QuadTreeIndexRequest { - withVersion(version?: number): QuadTreeIndexRequest { - return this; - } + it("Test withVersion method with version", async function () { + const request = new QuadTreeIndexRequestTest( + HRN.fromString("hrn:here:data:::test-hrn"), + "id", + "versioned" + ); - withQuadKey(quadKey: QuadKey): QuadTreeIndexRequest { - return this; - } + const response = request.withVersion(3); + assert.isDefined(response); + }); - withDepth(depth: QuadTreeIndexDepth): QuadTreeIndexRequest { - return this; - } + it("Test withVersion method without params", async function () { + const request = new QuadTreeIndexRequestTest( + HRN.fromString("hrn:here:data:::test-hrn"), + "id", + "versioned" + ); - withBillingTag(tag: string): QuadTreeIndexRequest { - return this; - } + const response = request.withVersion(); + assert.isDefined(response); + }); - withAdditionalFields( - additionalFields?: AdditionalFields - ): QuadTreeIndexRequest { - return this; - } + it("Test getVersion method without params", async function () { + const request = new QuadTreeIndexRequestTest( + HRN.fromString("hrn:here:data:::test-hrn"), + "id", + "versioned" + ); - getVersion(): number { - return 10; - } + const response = request.getVersion(); + assert.isDefined(response); + }); - getQuadKey(): QuadKey { - return { - row: 5, - column: 5, - level: 5 - }; - } + it("Test withDepth method with depth", async function () { + const request = new QuadTreeIndexRequestTest( + HRN.fromString("hrn:here:data:::test-hrn"), + "id", + "versioned" + ); - getDepth(): QuadTreeIndexDepth { - return 0; - } + const response = request.withDepth(3); + assert.isDefined(response); + }); - getBillingTag(): string { - return "test-billing-tag"; - } + it("Test getDepth method without params", async function () { + const request = new QuadTreeIndexRequestTest( + HRN.fromString("hrn:here:data:::test-hrn"), + "id", + "versioned" + ); - getAdditionalFields(): AdditionalFields { - return ["dataSize"]; - } - } - - it("Shoud be initialized", async function() { - const request = new QuadTreeIndexRequest( - HRN.fromString("hrn:here:data:::test-hrn"), - "id", - "versioned" - ); - assert.isDefined(request); - expect(request).to.be.instanceOf(QuadTreeIndexRequest); - - assert.isFunction(request.withBillingTag); - assert.isFunction(request.getBillingTag); - }); - - it("Test withVersion method with version", async function() { - const request = new QuadTreeIndexRequestTest( - HRN.fromString("hrn:here:data:::test-hrn"), - "id", - "versioned" - ); - - const response = request.withVersion(3); - assert.isDefined(response); - }); - - it("Test withVersion method without params", async function() { - const request = new QuadTreeIndexRequestTest( - HRN.fromString("hrn:here:data:::test-hrn"), - "id", - "versioned" - ); - - const response = request.withVersion(); - assert.isDefined(response); - }); - - it("Test getVersion method without params", async function() { - const request = new QuadTreeIndexRequestTest( - HRN.fromString("hrn:here:data:::test-hrn"), - "id", - "versioned" - ); - - const response = request.getVersion(); - assert.isDefined(response); - }); - - it("Test withDepth method with depth", async function() { - const request = new QuadTreeIndexRequestTest( - HRN.fromString("hrn:here:data:::test-hrn"), - "id", - "versioned" - ); - - const response = request.withDepth(3); - assert.isDefined(response); - }); - - it("Test getDepth method without params", async function() { - const request = new QuadTreeIndexRequestTest( - HRN.fromString("hrn:here:data:::test-hrn"), - "id", - "versioned" - ); - - const response = request.getDepth(); - assert.isDefined(response); - }); - - it("Test withQuadKey method with quadKey", async function() { - const request = new QuadTreeIndexRequestTest( - HRN.fromString("hrn:here:data:::test-hrn"), - "id", - "versioned" - ); - - const response = request.withQuadKey({ - row: 5, - column: 5, - level: 5 + const response = request.getDepth(); + assert.isDefined(response); + }); + + it("Test withQuadKey method with quadKey", async function () { + const request = new QuadTreeIndexRequestTest( + HRN.fromString("hrn:here:data:::test-hrn"), + "id", + "versioned" + ); + + const response = request.withQuadKey({ + row: 5, + column: 5, + level: 5 + }); + assert.isDefined(response); + }); + + it("Test getQuadKey method without params", async function () { + const request = new QuadTreeIndexRequestTest( + HRN.fromString("hrn:here:data:::test-hrn"), + "id", + "versioned" + ); + + const response = request.getQuadKey(); + assert.isDefined(response); + }); + + it("Test withBillingTag method with tag", async function () { + const request = new QuadTreeIndexRequestTest( + HRN.fromString("hrn:here:data:::test-hrn"), + "id", + "versioned" + ); + + const response = request.withBillingTag("test-tag"); + assert.isDefined(response); + }); + + it("Test getBillingTag method without params", async function () { + const request = new QuadTreeIndexRequestTest( + HRN.fromString("hrn:here:data:::test-hrn"), + "id", + "versioned" + ); + + const response = request.getBillingTag(); + assert.isDefined(response); + }); + + it("Test withAdditionalFields method with additionalFields", async function () { + const request = new QuadTreeIndexRequestTest( + HRN.fromString("hrn:here:data:::test-hrn"), + "id", + "versioned" + ); + + const response = request.withAdditionalFields(["dataSize"]); + assert.isDefined(response); + }); + + it("Test getAdditionalFields method without params", async function () { + const request = new QuadTreeIndexRequestTest( + HRN.fromString("hrn:here:data:::test-hrn"), + "id", + "versioned" + ); + + const response = request.getAdditionalFields(); + assert.isDefined(response); }); - assert.isDefined(response); - }); - - it("Test getQuadKey method without params", async function() { - const request = new QuadTreeIndexRequestTest( - HRN.fromString("hrn:here:data:::test-hrn"), - "id", - "versioned" - ); - - const response = request.getQuadKey(); - assert.isDefined(response); - }); - - it("Test withBillingTag method with tag", async function() { - const request = new QuadTreeIndexRequestTest( - HRN.fromString("hrn:here:data:::test-hrn"), - "id", - "versioned" - ); - - const response = request.withBillingTag("test-tag"); - assert.isDefined(response); - }); - - it("Test getBillingTag method without params", async function() { - const request = new QuadTreeIndexRequestTest( - HRN.fromString("hrn:here:data:::test-hrn"), - "id", - "versioned" - ); - - const response = request.getBillingTag(); - assert.isDefined(response); - }); - - it("Test withAdditionalFields method with additionalFields", async function() { - const request = new QuadTreeIndexRequestTest( - HRN.fromString("hrn:here:data:::test-hrn"), - "id", - "versioned" - ); - - const response = request.withAdditionalFields(["dataSize"]); - assert.isDefined(response); - }); - - it("Test getAdditionalFields method without params", async function() { - const request = new QuadTreeIndexRequestTest( - HRN.fromString("hrn:here:data:::test-hrn"), - "id", - "versioned" - ); - - const response = request.getAdditionalFields(); - assert.isDefined(response); - }); }); diff --git a/tests/integration/api-breaks/QueryApi.test.ts b/tests/integration/api-breaks/QueryApi.test.ts index afd9007a..c8bee689 100644 --- a/tests/integration/api-breaks/QueryApi.test.ts +++ b/tests/integration/api-breaks/QueryApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,272 +17,287 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { QueryApi } from "@here/olp-sdk-dataservice-api"; import { - Index, - ParentQuad, - Partition, - Partitions, - SubQuad + Index, + ParentQuad, + Partition, + Partitions, + SubQuad } from "@here/olp-sdk-dataservice-api/lib/query-api"; import { mockedRequestBuilder } from "./MockedRequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("QueryApi", function() { - it("Index with all required params", function() { - const params: Index = {}; - - assert.isDefined(params); - }); - - it("Index with all required and optional params", function() { - const params: Index = { - parentQuads: [ - { - additionalMetadata: "test", - checksum: "test", - compressedDataSize: 1, - dataHandle: "test", - dataSize: 1, - partition: "test", - version: 1 - } - ], - subQuads: [ - { - additionalMetadata: "test", - checksum: "test", - compressedDataSize: 1, - dataHandle: "test", - dataSize: 1, - subQuadKey: "test", - version: 1 - } - ], - status: 1, - title: "test" - }; - - assert.isDefined(params); - }); - - it("ParentQuad with all required params", function() { - const params: ParentQuad = { - dataHandle: "test", - partition: "test", - version: 1 - }; - - assert.isDefined(params); - }); - - it("ParentQuad with all required and optional params", function() { - const params: ParentQuad = { - additionalMetadata: "test", - checksum: "test", - compressedDataSize: 1, - dataHandle: "test", - dataSize: 1, - partition: "test", - version: 1 - }; - - assert.isDefined(params); - }); - - it("Partition with all required params", function() { - const params: Partition = { - partition: "test", - version: 1 - }; - - assert.isDefined(params); - }); - - it("Partition with all required and optional params", function() { - const params: Partition = { - checksum: "test", - compressedDataSize: 1, - dataHandle: "test", - dataSize: 1, - partition: "test", - version: 1 - }; - - assert.isDefined(params); - }); - - it("Partitions with all required params", function() { - const params: Partitions = {}; - - assert.isDefined(params); - }); - - it("Partitions with all required and optional params", function() { - const params: Partitions = { - partitions: [ - { - checksum: "test", - compressedDataSize: 1, - dataHandle: "test", - dataSize: 1, - partition: "test", - version: 1 - } - ], - status: 1, - title: "test" - }; - - assert.isDefined(params); - }); - - it("SubQuad with all required params", function() { - const params: SubQuad = { - dataHandle: "test", - subQuadKey: "test", - version: 1 - }; - - assert.isDefined(params); - }); - - it("SubQuad with all required and optional params", function() { - const params: SubQuad = { - additionalMetadata: "test", - checksum: "test", - compressedDataSize: 1, - dataHandle: "test", - dataSize: 1, - subQuadKey: "test", - version: 1 - }; - - assert.isDefined(params); - }); - - it("Test getChangesById method with all required params", async function() { - const params = { - layerId: "test", - partition: ["test"] - }; - - const result = await QueryApi.getChangesById(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test getChangesById method with all required and optional params", async function() { - const params = { - layerId: "test", - partition: ["test"], - startVersion: "test", - endVersion: "test", - sinceTime: 1, - additionalFields: ["test"], - billingTag: "test" - }; - - const result = await QueryApi.getChangesById(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test getPartitionsById method with all required params", async function() { - const params = { - layerId: "test", - partition: ["test"] - }; - - const result = await QueryApi.getPartitionsById( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getPartitionsById method with all required and optional params", async function() { - const params = { - layerId: "test", - partition: ["test"], - version: "test", - additionalFields: ["test"], - billingTag: "test" - }; - - const result = await QueryApi.getPartitionsById( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test quadTreeIndex method with all required params", async function() { - const params = { - layerId: "test", - version: 1, - quadKey: "test", - depth: 1 - }; - - const result = await QueryApi.quadTreeIndex(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test quadTreeIndex method with all required and optional params", async function() { - const params = { - layerId: "test", - version: 1, - quadKey: "test", - depth: 1, - additionalFields: ["test"], - billingTag: "test" - }; - - const result = await QueryApi.quadTreeIndex(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test quadTreeIndexVolatile method with all required params", async function() { - const params = { - layerId: "test", - quadKey: "test", - depth: 1 - }; - - const result = await QueryApi.quadTreeIndexVolatile( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test quadTreeIndexVolatile method with all required and optional params", async function() { - const params = { - layerId: "test", - quadKey: "test", - depth: 1, - additionalFields: ["test"], - billingTag: "test" - }; - - const result = await QueryApi.quadTreeIndexVolatile( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); +describe("QueryApi", function () { + it("Index with all required params", function () { + const params: Index = {}; + + assert.isDefined(params); + }); + + it("Index with all required and optional params", function () { + const params: Index = { + parentQuads: [ + { + additionalMetadata: "test", + checksum: "test", + compressedDataSize: 1, + dataHandle: "test", + dataSize: 1, + partition: "test", + version: 1 + } + ], + subQuads: [ + { + additionalMetadata: "test", + checksum: "test", + compressedDataSize: 1, + dataHandle: "test", + dataSize: 1, + subQuadKey: "test", + version: 1 + } + ], + status: 1, + title: "test" + }; + + assert.isDefined(params); + }); + + it("ParentQuad with all required params", function () { + const params: ParentQuad = { + dataHandle: "test", + partition: "test", + version: 1 + }; + + assert.isDefined(params); + }); + + it("ParentQuad with all required and optional params", function () { + const params: ParentQuad = { + additionalMetadata: "test", + checksum: "test", + compressedDataSize: 1, + dataHandle: "test", + dataSize: 1, + partition: "test", + version: 1 + }; + + assert.isDefined(params); + }); + + it("Partition with all required params", function () { + const params: Partition = { + partition: "test", + version: 1 + }; + + assert.isDefined(params); + }); + + it("Partition with all required and optional params", function () { + const params: Partition = { + checksum: "test", + compressedDataSize: 1, + dataHandle: "test", + dataSize: 1, + partition: "test", + version: 1 + }; + + assert.isDefined(params); + }); + + it("Partitions with all required params", function () { + const params: Partitions = {}; + + assert.isDefined(params); + }); + + it("Partitions with all required and optional params", function () { + const params: Partitions = { + partitions: [ + { + checksum: "test", + compressedDataSize: 1, + dataHandle: "test", + dataSize: 1, + partition: "test", + version: 1 + } + ], + status: 1, + title: "test" + }; + + assert.isDefined(params); + }); + + it("SubQuad with all required params", function () { + const params: SubQuad = { + dataHandle: "test", + subQuadKey: "test", + version: 1 + }; + + assert.isDefined(params); + }); + + it("SubQuad with all required and optional params", function () { + const params: SubQuad = { + additionalMetadata: "test", + checksum: "test", + compressedDataSize: 1, + dataHandle: "test", + dataSize: 1, + subQuadKey: "test", + version: 1 + }; + + assert.isDefined(params); + }); + + it("Test getChangesById method with all required params", async function () { + const params = { + layerId: "test", + partition: ["test"] + }; + + const result = await QueryApi.getChangesById( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getChangesById method with all required and optional params", async function () { + const params = { + layerId: "test", + partition: ["test"], + startVersion: "test", + endVersion: "test", + sinceTime: 1, + additionalFields: ["test"], + billingTag: "test" + }; + + const result = await QueryApi.getChangesById( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getPartitionsById method with all required params", async function () { + const params = { + layerId: "test", + partition: ["test"] + }; + + const result = await QueryApi.getPartitionsById( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getPartitionsById method with all required and optional params", async function () { + const params = { + layerId: "test", + partition: ["test"], + version: "test", + additionalFields: ["test"], + billingTag: "test" + }; + + const result = await QueryApi.getPartitionsById( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test quadTreeIndex method with all required params", async function () { + const params = { + layerId: "test", + version: 1, + quadKey: "test", + depth: 1 + }; + + const result = await QueryApi.quadTreeIndex( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test quadTreeIndex method with all required and optional params", async function () { + const params = { + layerId: "test", + version: 1, + quadKey: "test", + depth: 1, + additionalFields: ["test"], + billingTag: "test" + }; + + const result = await QueryApi.quadTreeIndex( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test quadTreeIndexVolatile method with all required params", async function () { + const params = { + layerId: "test", + quadKey: "test", + depth: 1 + }; + + const result = await QueryApi.quadTreeIndexVolatile( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test quadTreeIndexVolatile method with all required and optional params", async function () { + const params = { + layerId: "test", + quadKey: "test", + depth: 1, + additionalFields: ["test"], + billingTag: "test" + }; + + const result = await QueryApi.quadTreeIndexVolatile( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); }); diff --git a/tests/integration/api-breaks/QueryClient.test.ts b/tests/integration/api-breaks/QueryClient.test.ts index b1505496..8d033242 100644 --- a/tests/integration/api-breaks/QueryClient.test.ts +++ b/tests/integration/api-breaks/QueryClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,106 +16,115 @@ * SPDX-License-Identifier: Apache-2.0 * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { QueryClient } from "@here/olp-sdk-dataservice-read"; import * as dataServiceRead from "@here/olp-sdk-dataservice-read"; import * as dataServiceApi from "@here/olp-sdk-dataservice-api"; import { HRN, OlpClientSettings } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("QueryClient", function() { - class QueryClientTest extends QueryClient { - constructor(settings: OlpClientSettings) { - super(settings); +describe("QueryClient", function () { + class QueryClientTest extends QueryClient { + constructor(settings: OlpClientSettings) { + super(settings); + } + + public async fetchQuadTreeIndex( + request: dataServiceRead.QuadTreeIndexRequest, + abortSignal?: AbortSignal + ): Promise { + return { + status: 1, + title: "test" + }; + } + + public async getPartitionsById( + request: dataServiceRead.PartitionsRequest, + layerId: string, + hrn: HRN, + abortSignal?: AbortSignal + ): Promise { + return { + status: 11, + title: "test" + }; + } } - public async fetchQuadTreeIndex( - request: dataServiceRead.QuadTreeIndexRequest, - abortSignal?: AbortSignal - ): Promise { - return { - status: 1, - title: "test" - }; - } - - public async getPartitionsById( - request: dataServiceRead.PartitionsRequest, - layerId: string, - hrn: HRN, - abortSignal?: AbortSignal - ): Promise { - return { - status: 11, - title: "test" - }; - } - } - - let settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }); - - const testCatalogHrn = HRN.fromString("hrn:here:data:::mocked-hrn"); - - it("Shoud be initialized with arguments", async function() { - const queryClient = new QueryClient(settings); - assert.isDefined(queryClient); - - expect(queryClient).to.be.instanceOf(QueryClient); - assert.isDefined(queryClient.fetchQuadTreeIndex); - assert.isDefined(queryClient.getPartitionsById); - }); - - it("Test fetchQuadTreeIndex method with required params", async function() { - const client = new QueryClientTest(settings); - - const response = await client.fetchQuadTreeIndex( - new dataServiceRead.QuadTreeIndexRequest(testCatalogHrn, "test-layer-id") - ); - assert.isDefined(response); - }); - - it("Test fetchQuadTreeIndex method with required and optional params", async function() { - const client = new QueryClientTest(settings); - const controller = new AbortController(); - - const response = await client.fetchQuadTreeIndex( - new dataServiceRead.QuadTreeIndexRequest(testCatalogHrn, "test-layer-id"), - controller.signal - ); - assert.isDefined(response); - }); - - it("Test getPartitionsById method with required params", async function() { - const client = new QueryClientTest(settings); - - const response = await client.getPartitionsById( - new dataServiceRead.PartitionsRequest(), - "test-layer-id", - testCatalogHrn - ); - assert.isDefined(response); - }); - - it("Test getPartitionsById method with required and optional params", async function() { - const client = new QueryClientTest(settings); - const controller = new AbortController(); - - const response = await client.getPartitionsById( - new dataServiceRead.PartitionsRequest(), - "test-layer-id", - testCatalogHrn, - controller.signal - ); - assert.isDefined(response); - }); + let settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }); + + const testCatalogHrn = HRN.fromString("hrn:here:data:::mocked-hrn"); + + it("Shoud be initialized with arguments", async function () { + const queryClient = new QueryClient(settings); + assert.isDefined(queryClient); + + expect(queryClient).to.be.instanceOf(QueryClient); + assert.isDefined(queryClient.fetchQuadTreeIndex); + assert.isDefined(queryClient.getPartitionsById); + }); + + it("Test fetchQuadTreeIndex method with required params", async function () { + const client = new QueryClientTest(settings); + + const response = await client.fetchQuadTreeIndex( + new dataServiceRead.QuadTreeIndexRequest( + testCatalogHrn, + "test-layer-id" + ) + ); + assert.isDefined(response); + }); + + it("Test fetchQuadTreeIndex method with required and optional params", async function () { + const client = new QueryClientTest(settings); + const controller = new AbortController(); + + const response = await client.fetchQuadTreeIndex( + new dataServiceRead.QuadTreeIndexRequest( + testCatalogHrn, + "test-layer-id" + ), + controller.signal + ); + assert.isDefined(response); + }); + + it("Test getPartitionsById method with required params", async function () { + const client = new QueryClientTest(settings); + + const response = await client.getPartitionsById( + new dataServiceRead.PartitionsRequest(), + "test-layer-id", + testCatalogHrn + ); + assert.isDefined(response); + }); + + it("Test getPartitionsById method with required and optional params", async function () { + const client = new QueryClientTest(settings); + const controller = new AbortController(); + + const response = await client.getPartitionsById( + new dataServiceRead.PartitionsRequest(), + "test-layer-id", + testCatalogHrn, + controller.signal + ); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/SchemaDetailsRequest.test.ts b/tests/integration/api-breaks/SchemaDetailsRequest.test.ts index 3f7f4337..467b3ae6 100644 --- a/tests/integration/api-breaks/SchemaDetailsRequest.test.ts +++ b/tests/integration/api-breaks/SchemaDetailsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,73 +17,77 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { SchemaDetailsRequest } from "@here/olp-sdk-dataservice-read"; import { HRN } from "@here/olp-sdk-core"; -chai.use(sinonChai); +describe("SchemaDetailsRequest", function () { + class SchemaDetailsRequestTest extends SchemaDetailsRequest { + getSchema(): HRN { + return HRN.fromString("hrn:here:data:::test-hrn"); + } -const assert = chai.assert; -const expect = chai.expect; + withSchema(schemaHrn: HRN): SchemaDetailsRequest { + return this; + } -describe("SchemaDetailsRequest", function() { - class SchemaDetailsRequestTest extends SchemaDetailsRequest { - getSchema(): HRN { - return HRN.fromString("hrn:here:data:::test-hrn"); - } - - withSchema(schemaHrn: HRN): SchemaDetailsRequest { - return this; - } - - withBillingTag(tag: string): SchemaDetailsRequest { - return this; - } + withBillingTag(tag: string): SchemaDetailsRequest { + return this; + } - getBillingTag(): string { - return "billing-tag"; + getBillingTag(): string { + return "billing-tag"; + } } - } - it("Shoud be initialized", async function() { - const request = new SchemaDetailsRequest(); - assert.isDefined(request); - expect(request).to.be.instanceOf(SchemaDetailsRequest); + it("Shoud be initialized", async function () { + const request = new SchemaDetailsRequest(); + assert.isDefined(request); + expect(request).to.be.instanceOf(SchemaDetailsRequest); - assert.isFunction(request.withSchema); - assert.isFunction(request.getSchema); - assert.isFunction(request.withBillingTag); - assert.isFunction(request.getBillingTag); - }); + assert.isFunction(request.withSchema); + assert.isFunction(request.getSchema); + assert.isFunction(request.withBillingTag); + assert.isFunction(request.getBillingTag); + }); - it("Test withSchema method with schema", async function() { - const request = new SchemaDetailsRequestTest(); + it("Test withSchema method with schema", async function () { + const request = new SchemaDetailsRequestTest(); - const response = request.withSchema( - HRN.fromString("hrn:here:data:::test-hrn") - ); - assert.isDefined(response); - }); + const response = request.withSchema( + HRN.fromString("hrn:here:data:::test-hrn") + ); + assert.isDefined(response); + }); - it("Test getSchema method without params", async function() { - const request = new SchemaDetailsRequestTest(); + it("Test getSchema method without params", async function () { + const request = new SchemaDetailsRequestTest(); - const response = request.getSchema(); - assert.isDefined(response); - }); + const response = request.getSchema(); + assert.isDefined(response); + }); - it("Test withBillingTag method with tag", async function() { - const request = new SchemaDetailsRequestTest(); + it("Test withBillingTag method with tag", async function () { + const request = new SchemaDetailsRequestTest(); - const response = request.withBillingTag("test-tag"); - assert.isDefined(response); - }); + const response = request.withBillingTag("test-tag"); + assert.isDefined(response); + }); - it("Test getBillingTag method without params", async function() { - const request = new SchemaDetailsRequestTest(); + it("Test getBillingTag method without params", async function () { + const request = new SchemaDetailsRequestTest(); - const response = request.getBillingTag(); - assert.isDefined(response); - }); + const response = request.getBillingTag(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/SchemaRequest.test.ts b/tests/integration/api-breaks/SchemaRequest.test.ts index 1e88d3be..33b11ced 100644 --- a/tests/integration/api-breaks/SchemaRequest.test.ts +++ b/tests/integration/api-breaks/SchemaRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,77 +17,81 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { SchemaRequest } from "@here/olp-sdk-dataservice-read"; import { ArtifactApi } from "@here/olp-sdk-dataservice-api"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("SchemaRequest", function() { - class SchemaRequestTest extends SchemaRequest { - getVariant(): ArtifactApi.Variant { - return { - id: "test", - url: "test" - }; - } - - withVariant(variant: ArtifactApi.Variant): SchemaRequest { - return this; - } - - withBillingTag(tag: string): SchemaRequest { - return this; +describe("SchemaRequest", function () { + class SchemaRequestTest extends SchemaRequest { + getVariant(): ArtifactApi.Variant { + return { + id: "test", + url: "test" + }; + } + + withVariant(variant: ArtifactApi.Variant): SchemaRequest { + return this; + } + + withBillingTag(tag: string): SchemaRequest { + return this; + } + + getBillingTag(): string { + return "billing-tag"; + } } - getBillingTag(): string { - return "billing-tag"; - } - } - - it("Shoud be initialized", async function() { - const request = new SchemaRequest(); - assert.isDefined(request); - expect(request).to.be.instanceOf(SchemaRequest); + it("Shoud be initialized", async function () { + const request = new SchemaRequest(); + assert.isDefined(request); + expect(request).to.be.instanceOf(SchemaRequest); - assert.isFunction(request.withVariant); - assert.isFunction(request.getVariant); - assert.isFunction(request.withBillingTag); - assert.isFunction(request.getBillingTag); - }); + assert.isFunction(request.withVariant); + assert.isFunction(request.getVariant); + assert.isFunction(request.withBillingTag); + assert.isFunction(request.getBillingTag); + }); - it("Test withVariant method with variant", async function() { - const request = new SchemaRequestTest(); + it("Test withVariant method with variant", async function () { + const request = new SchemaRequestTest(); - const response = request.withVariant({ - id: "test", - url: "test" + const response = request.withVariant({ + id: "test", + url: "test" + }); + assert.isDefined(response); }); - assert.isDefined(response); - }); - it("Test getVariant method without params", async function() { - const request = new SchemaRequestTest(); + it("Test getVariant method without params", async function () { + const request = new SchemaRequestTest(); - const response = request.getVariant(); - assert.isDefined(response); - }); + const response = request.getVariant(); + assert.isDefined(response); + }); - it("Test withBillingTag method with tag", async function() { - const request = new SchemaRequestTest(); + it("Test withBillingTag method with tag", async function () { + const request = new SchemaRequestTest(); - const response = request.withBillingTag("test-tag"); - assert.isDefined(response); - }); + const response = request.withBillingTag("test-tag"); + assert.isDefined(response); + }); - it("Test getBillingTag method without params", async function() { - const request = new SchemaRequestTest(); + it("Test getBillingTag method without params", async function () { + const request = new SchemaRequestTest(); - const response = request.getBillingTag(); - assert.isDefined(response); - }); + const response = request.getBillingTag(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/SeekRequest.test.ts b/tests/integration/api-breaks/SeekRequest.test.ts index 2a005695..070897e9 100644 --- a/tests/integration/api-breaks/SeekRequest.test.ts +++ b/tests/integration/api-breaks/SeekRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,109 +17,113 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { SeekRequest } from "@here/olp-sdk-dataservice-read"; import { StreamApi } from "@here/olp-sdk-dataservice-api"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("SeekRequest", function() { - class SeekRequestTest extends SeekRequest { - getMode(): "serial" { - return "serial"; - } +describe("SeekRequest", function () { + class SeekRequestTest extends SeekRequest { + getMode(): "serial" { + return "serial"; + } - withMode(mode: "serial"): SeekRequest { - return this; - } + withMode(mode: "serial"): SeekRequest { + return this; + } - getSubscriptionId(): string { - return "subscription-id"; - } + getSubscriptionId(): string { + return "subscription-id"; + } - withSubscriptionId(id: string): SeekRequest { - return this; - } + withSubscriptionId(id: string): SeekRequest { + return this; + } - getSeekOffsets(): StreamApi.SeekOffsetsRequest | undefined { - return { - offsets: [ - { - partition: 1, - offset: 1 - } - ] - }; - } + getSeekOffsets(): StreamApi.SeekOffsetsRequest | undefined { + return { + offsets: [ + { + partition: 1, + offset: 1 + } + ] + }; + } - withSeekOffsets(offsets: StreamApi.SeekOffsetsRequest): SeekRequest { - return this; + withSeekOffsets(offsets: StreamApi.SeekOffsetsRequest): SeekRequest { + return this; + } } - } - - it("Shoud be initialized", async function() { - const request = new SeekRequest(); - assert.isDefined(request); - expect(request).to.be.instanceOf(SeekRequest); - assert.isFunction(request.withMode); - assert.isFunction(request.getMode); - assert.isFunction(request.withSubscriptionId); - assert.isFunction(request.getSubscriptionId); - assert.isFunction(request.withSeekOffsets); - assert.isFunction(request.getSeekOffsets); - }); - - it("Test withMode method with mode", async function() { - const request = new SeekRequestTest(); + it("Shoud be initialized", async function () { + const request = new SeekRequest(); + assert.isDefined(request); + expect(request).to.be.instanceOf(SeekRequest); + + assert.isFunction(request.withMode); + assert.isFunction(request.getMode); + assert.isFunction(request.withSubscriptionId); + assert.isFunction(request.getSubscriptionId); + assert.isFunction(request.withSeekOffsets); + assert.isFunction(request.getSeekOffsets); + }); - const response = request.withMode("serial"); - assert.isDefined(response); - }); + it("Test withMode method with mode", async function () { + const request = new SeekRequestTest(); - it("Test getMode method without params", async function() { - const request = new SeekRequestTest(); + const response = request.withMode("serial"); + assert.isDefined(response); + }); - const response = request.getMode(); - assert.isDefined(response); - }); + it("Test getMode method without params", async function () { + const request = new SeekRequestTest(); - it("Test withSubscriptionId method with id", async function() { - const request = new SeekRequestTest(); + const response = request.getMode(); + assert.isDefined(response); + }); - const response = request.withSubscriptionId("test"); - assert.isDefined(response); - }); + it("Test withSubscriptionId method with id", async function () { + const request = new SeekRequestTest(); - it("Test getSubscriptionId method without params", async function() { - const request = new SeekRequestTest(); + const response = request.withSubscriptionId("test"); + assert.isDefined(response); + }); - const response = request.getSubscriptionId(); - assert.isDefined(response); - }); + it("Test getSubscriptionId method without params", async function () { + const request = new SeekRequestTest(); - it("Test withSeekOffsets method with offsets", async function() { - const request = new SeekRequestTest(); + const response = request.getSubscriptionId(); + assert.isDefined(response); + }); - const response = request.withSeekOffsets({ - offsets: [ - { - partition: 1, - offset: 1 - } - ] + it("Test withSeekOffsets method with offsets", async function () { + const request = new SeekRequestTest(); + + const response = request.withSeekOffsets({ + offsets: [ + { + partition: 1, + offset: 1 + } + ] + }); + assert.isDefined(response); }); - assert.isDefined(response); - }); - it("Test getSeekOffsets method without params", async function() { - const request = new SeekRequestTest(); + it("Test getSeekOffsets method without params", async function () { + const request = new SeekRequestTest(); - const response = request.getSeekOffsets(); - assert.isDefined(response); - }); + const response = request.getSeekOffsets(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/StatisticsClient.test.ts b/tests/integration/api-breaks/StatisticsClient.test.ts index c0789a2b..c895c7bf 100644 --- a/tests/integration/api-breaks/StatisticsClient.test.ts +++ b/tests/integration/api-breaks/StatisticsClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,88 +16,91 @@ * SPDX-License-Identifier: Apache-2.0 * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { StatisticsClient } from "@here/olp-sdk-dataservice-read"; import * as dataServiceRead from "@here/olp-sdk-dataservice-read"; import * as dataServiceApi from "@here/olp-sdk-dataservice-api"; import { OlpClientSettings } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("StatisticsClient", function() { - class StatisticsClientTest extends StatisticsClient { - constructor(settings: OlpClientSettings) { - super(settings); - } +describe("StatisticsClient", function () { + class StatisticsClientTest extends StatisticsClient { + constructor(settings: OlpClientSettings) { + super(settings); + } - public async getSummary( - summaryRequest: dataServiceRead.SummaryRequest - ): Promise { - return { - catalogHRN: "test", - layer: "test", - levelSummary: { - [1]: { - boundingBox: { - east: 1, - south: 1, - north: 1, - west: 1 - }, - size: 1, - processedTimestamp: 1, - centroid: 1, - minPartitionSize: 1, - maxPartitionSize: 1, - version: 1, - totalPartitions: 1 - } + public async getSummary( + summaryRequest: dataServiceRead.SummaryRequest + ): Promise { + return { + catalogHRN: "test", + layer: "test", + levelSummary: { + [1]: { + boundingBox: { + east: 1, + south: 1, + north: 1, + west: 1 + }, + size: 1, + processedTimestamp: 1, + centroid: 1, + minPartitionSize: 1, + maxPartitionSize: 1, + version: 1, + totalPartitions: 1 + } + } + }; } - }; - } - public async getStatistics( - statisticsRequest: dataServiceRead.StatisticsRequest - ): Promise { - return Promise.resolve(new Response()); + public async getStatistics( + statisticsRequest: dataServiceRead.StatisticsRequest + ): Promise { + return Promise.resolve(new Response()); + } } - } - let settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }); + let settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }); - it("Shoud be initialized with arguments", async function() { - const client = new StatisticsClient(settings); - assert.isDefined(client); + it("Shoud be initialized with arguments", async function () { + const client = new StatisticsClient(settings); + assert.isDefined(client); - expect(client).to.be.instanceOf(StatisticsClient); - assert.isDefined(client.getSummary); - assert.isDefined(client.getStatistics); - }); + expect(client).to.be.instanceOf(StatisticsClient); + assert.isDefined(client.getSummary); + assert.isDefined(client.getStatistics); + }); - it("Test getSummary method with summaryRequest", async function() { - const client = new StatisticsClientTest(settings); + it("Test getSummary method with summaryRequest", async function () { + const client = new StatisticsClientTest(settings); - const response = await client.getSummary( - new dataServiceRead.SummaryRequest() - ); - assert.isDefined(response); - }); + const response = await client.getSummary( + new dataServiceRead.SummaryRequest() + ); + assert.isDefined(response); + }); - it("Test getStatistics method with statisticsRequest", async function() { - const client = new StatisticsClientTest(settings); + it("Test getStatistics method with statisticsRequest", async function () { + const client = new StatisticsClientTest(settings); - const response = await client.getStatistics( - new dataServiceRead.StatisticsRequest() - ); - assert.isDefined(response); - }); + const response = await client.getStatistics( + new dataServiceRead.StatisticsRequest() + ); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/StatisticsRequest.test.ts b/tests/integration/api-breaks/StatisticsRequest.test.ts index b4c72570..63793597 100644 --- a/tests/integration/api-breaks/StatisticsRequest.test.ts +++ b/tests/integration/api-breaks/StatisticsRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,168 +17,172 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { StatisticsRequest } from "@here/olp-sdk-dataservice-read"; import { HRN } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("StatisticsRequest", function() { - enum CoverageDataType { - BITMAP = "tilemap", - SIZEMAP = "heatmap/size", - TIMEMAP = "heatmap/age" - } +describe("StatisticsRequest", function () { + enum CoverageDataType { + BITMAP = "tilemap", + SIZEMAP = "heatmap/size", + TIMEMAP = "heatmap/age" + } - class StatisticsRequestTest extends StatisticsRequest { - /*catalogHrn?: string; + class StatisticsRequestTest extends StatisticsRequest { + /*catalogHrn?: string; private layerId?: string; private typemap?: CoverageDataType; private dataLevel?: number; private billingTag?: string; */ - getCatalogHrn(): string { - return "hrn:here:data:::test-hrn"; - } + getCatalogHrn(): string { + return "hrn:here:data:::test-hrn"; + } - getLayerId(): string { - return "test"; - } + getLayerId(): string { + return "test"; + } - getTypemap(): CoverageDataType { - return CoverageDataType.BITMAP; - } + getTypemap(): CoverageDataType { + return CoverageDataType.BITMAP; + } - getDataLevel(): number | undefined; + getDataLevel(): number | undefined; - getDataLevel(): string | undefined; + getDataLevel(): string | undefined; - getDataLevel(): number | string | undefined { - return 3; - } + getDataLevel(): number | string | undefined { + return 3; + } - withCatalogHrn(hrn: HRN): StatisticsRequest { - return new StatisticsRequest(); - } + withCatalogHrn(hrn: HRN): StatisticsRequest { + return new StatisticsRequest(); + } - withLayerId(layerId: string): StatisticsRequest { - return new StatisticsRequest(); - } + withLayerId(layerId: string): StatisticsRequest { + return new StatisticsRequest(); + } - withTypemap(coverageDataType: CoverageDataType): StatisticsRequest { - return new StatisticsRequest(); - } + withTypemap(coverageDataType: CoverageDataType): StatisticsRequest { + return new StatisticsRequest(); + } - withDataLevel(dataLevel: number): StatisticsRequest; + withDataLevel(dataLevel: number): StatisticsRequest; - withDataLevel(dataLevel: string): StatisticsRequest; + withDataLevel(dataLevel: string): StatisticsRequest; - withDataLevel(dataLevel: string | number) { - return new StatisticsRequest(); - } + withDataLevel(dataLevel: string | number) { + return new StatisticsRequest(); + } - withBillingTag(tag: string): StatisticsRequest { - return new StatisticsRequest(); - } + withBillingTag(tag: string): StatisticsRequest { + return new StatisticsRequest(); + } - getBillingTag(): string { - return "billing-tag"; + getBillingTag(): string { + return "billing-tag"; + } } - } - - it("Shoud be initialized", async function() { - const request = new StatisticsRequest(); - assert.isDefined(request); - expect(request).to.be.instanceOf(StatisticsRequest); - - assert.isFunction(request.withTypemap); - assert.isFunction(request.getTypemap); - assert.isFunction(request.withCatalogHrn); - assert.isFunction(request.getCatalogHrn); - assert.isFunction(request.withDataLevel); - assert.isFunction(request.getDataLevel); - assert.isFunction(request.withLayerId); - assert.isFunction(request.getLayerId); - assert.isFunction(request.withLayerId); - assert.isFunction(request.getLayerId); - assert.isFunction(request.withBillingTag); - assert.isFunction(request.getBillingTag); - }); - - it("Test withTypemap method with type map", async function() { - const request = new StatisticsRequestTest(); - - const response = request.withTypemap(CoverageDataType.BITMAP); - assert.isDefined(response); - }); - - it("Test getTypemap method without params", async function() { - const request = new StatisticsRequestTest(); - - const response = request.getTypemap(); - assert.isDefined(response); - }); - - it("Test withCatalogHrn method with hrn", async function() { - const request = new StatisticsRequestTest(); - - const response = request.withCatalogHrn( - HRN.fromString("hrn:here:data:::test-hrn") - ); - assert.isDefined(response); - }); - - it("Test getCatalogHrn method without params", async function() { - const request = new StatisticsRequestTest(); - - const response = request.getCatalogHrn(); - assert.isDefined(response); - }); - - it("Test withDataLevel method with dataLevel", async function() { - const request = new StatisticsRequestTest(); - - const response = request.withDataLevel(1); - assert.isDefined(response); - }); - - it("Test getDataLevel method without params", async function() { - const request = new StatisticsRequestTest(); - - const response = request.getDataLevel(); - assert.isDefined(response); - }); - - it("Test withLayerId method with layerId", async function() { - const request = new StatisticsRequestTest(); - - const response = request.withLayerId("test"); - assert.isDefined(response); - }); - - it("Test getLayerId method without params", async function() { - const request = new StatisticsRequestTest(); - - const response = request.getLayerId(); - assert.isDefined(response); - }); - - it("Test withBillingTag method with tag", async function() { - const request = new StatisticsRequestTest(); - - const response = request.withBillingTag("test-tag"); - assert.isDefined(response); - }); - - it("Test getBillingTag method without params", async function() { - const request = new StatisticsRequestTest(); - - const response = request.getBillingTag(); - assert.isDefined(response); - }); + + it("Shoud be initialized", async function () { + const request = new StatisticsRequest(); + assert.isDefined(request); + expect(request).to.be.instanceOf(StatisticsRequest); + + assert.isFunction(request.withTypemap); + assert.isFunction(request.getTypemap); + assert.isFunction(request.withCatalogHrn); + assert.isFunction(request.getCatalogHrn); + assert.isFunction(request.withDataLevel); + assert.isFunction(request.getDataLevel); + assert.isFunction(request.withLayerId); + assert.isFunction(request.getLayerId); + assert.isFunction(request.withLayerId); + assert.isFunction(request.getLayerId); + assert.isFunction(request.withBillingTag); + assert.isFunction(request.getBillingTag); + }); + + it("Test withTypemap method with type map", async function () { + const request = new StatisticsRequestTest(); + + const response = request.withTypemap(CoverageDataType.BITMAP); + assert.isDefined(response); + }); + + it("Test getTypemap method without params", async function () { + const request = new StatisticsRequestTest(); + + const response = request.getTypemap(); + assert.isDefined(response); + }); + + it("Test withCatalogHrn method with hrn", async function () { + const request = new StatisticsRequestTest(); + + const response = request.withCatalogHrn( + HRN.fromString("hrn:here:data:::test-hrn") + ); + assert.isDefined(response); + }); + + it("Test getCatalogHrn method without params", async function () { + const request = new StatisticsRequestTest(); + + const response = request.getCatalogHrn(); + assert.isDefined(response); + }); + + it("Test withDataLevel method with dataLevel", async function () { + const request = new StatisticsRequestTest(); + + const response = request.withDataLevel(1); + assert.isDefined(response); + }); + + it("Test getDataLevel method without params", async function () { + const request = new StatisticsRequestTest(); + + const response = request.getDataLevel(); + assert.isDefined(response); + }); + + it("Test withLayerId method with layerId", async function () { + const request = new StatisticsRequestTest(); + + const response = request.withLayerId("test"); + assert.isDefined(response); + }); + + it("Test getLayerId method without params", async function () { + const request = new StatisticsRequestTest(); + + const response = request.getLayerId(); + assert.isDefined(response); + }); + + it("Test withBillingTag method with tag", async function () { + const request = new StatisticsRequestTest(); + + const response = request.withBillingTag("test-tag"); + assert.isDefined(response); + }); + + it("Test getBillingTag method without params", async function () { + const request = new StatisticsRequestTest(); + + const response = request.getBillingTag(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/StreamApi.test.ts b/tests/integration/api-breaks/StreamApi.test.ts index 7aacbfd3..92c6ead7 100644 --- a/tests/integration/api-breaks/StreamApi.test.ts +++ b/tests/integration/api-breaks/StreamApi.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,66 +17,184 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { StreamApi } from "@here/olp-sdk-dataservice-api"; import { - BootstrapServer, - CommitOffsetsRequest, - ConsumeDataResponse, - ConsumerSubscribeResponse, - ErrorResponse, - InlineResponse401, - InlineResponse403, - ConsumerProperties, - Message, - Metadata, - StreamOffset, - SeekOffsetsRequest, - StreamLayerEndpointResponse + BootstrapServer, + CommitOffsetsRequest, + ConsumeDataResponse, + ConsumerSubscribeResponse, + ErrorResponse, + InlineResponse401, + InlineResponse403, + ConsumerProperties, + Message, + Metadata, + StreamOffset, + SeekOffsetsRequest, + StreamLayerEndpointResponse } from "@here/olp-sdk-dataservice-api/lib/stream-api"; import { mockedRequestBuilder } from "./MockedRequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("StreamApi", function() { - it("BootstrapServer with all required params", function() { - const params: BootstrapServer = { - hostname: "test", - port: 1 - }; - - assert.isDefined(params); - }); - - it("CommitOffsetsRequest with all required params", function() { - const params: CommitOffsetsRequest = {}; - - assert.isDefined(params); - }); - - it("CommitOffsetsRequest with all required and optional params", function() { - const params: CommitOffsetsRequest = { - offsets: [ - { - partition: 1, - offset: 1 - } - ] - }; - - assert.isDefined(params); - }); - - it("ConsumeDataResponse with all required params", function() { - const params: ConsumeDataResponse = { - messages: [ - { - metaData: { +describe("StreamApi", function () { + it("BootstrapServer with all required params", function () { + const params: BootstrapServer = { + hostname: "test", + port: 1 + }; + + assert.isDefined(params); + }); + + it("CommitOffsetsRequest with all required params", function () { + const params: CommitOffsetsRequest = {}; + + assert.isDefined(params); + }); + + it("CommitOffsetsRequest with all required and optional params", function () { + const params: CommitOffsetsRequest = { + offsets: [ + { + partition: 1, + offset: 1 + } + ] + }; + + assert.isDefined(params); + }); + + it("ConsumeDataResponse with all required params", function () { + const params: ConsumeDataResponse = { + messages: [ + { + metaData: { + partition: "test", + checksum: "test", + compressedDataSize: 1, + dataSize: 1, + data: "test", + dataHandle: "test", + timestamp: 1 + }, + offset: { + partition: 1, + offset: 1 + } + } + ] + }; + + assert.isDefined(params); + }); + + it("ConsumerSubscribeResponse with all required params", function () { + const params: ConsumerSubscribeResponse = {}; + + assert.isDefined(params); + }); + + it("ConsumerSubscribeResponse with all required and optional params", function () { + const params: ConsumerSubscribeResponse = { + nodeBaseURL: "test", + subscriptionId: "test" + }; + + assert.isDefined(params); + }); + + it("ErrorResponse with all required params", function () { + const params: ErrorResponse = { + title: "test", + status: 1, + code: "test", + cause: "test", + action: "test", + correlationId: "test" + }; + + assert.isDefined(params); + }); + + it("InlineResponse401 with all required params", function () { + const params: InlineResponse401 = {}; + + assert.isDefined(params); + }); + + it("InlineResponse401 with all required and optional params", function () { + const params: InlineResponse401 = { + error: "test", + errorDescription: "test" + }; + + assert.isDefined(params); + }); + + it("InlineResponse403 with all required params", function () { + const params: InlineResponse403 = {}; + + assert.isDefined(params); + }); + + it("InlineResponse403 with all required and optional params", function () { + const params: InlineResponse403 = { + error: "test", + errorDescription: "test" + }; + + assert.isDefined(params); + }); + + it("ConsumerProperties with all required params", function () { + const params: ConsumerProperties = { + ["test"]: "test" + }; + + assert.isDefined(params); + }); + + it("Message with all required params", function () { + const params: Message = { + metaData: { + partition: "test", + checksum: "test", + compressedDataSize: 1, + dataSize: 1, + data: "test", + dataHandle: "test", + timestamp: 1 + }, + offset: { + partition: 1, + offset: 1 + } + }; + + assert.isDefined(params); + }); + + it("Metadata with all required params", function () { + const params: Metadata = { + partition: "test" + }; + + assert.isDefined(params); + }); + + it("Metadata with all required and optional params", function () { + const params: Metadata = { partition: "test", checksum: "test", compressedDataSize: 1, @@ -84,359 +202,256 @@ describe("StreamApi", function() { data: "test", dataHandle: "test", timestamp: 1 - }, - offset: { + }; + + assert.isDefined(params); + }); + + it("SeekOffsetsRequest with all required params", function () { + const params: SeekOffsetsRequest = {}; + + assert.isDefined(params); + }); + + it("SeekOffsetsRequest with all required and optional params", function () { + const params: SeekOffsetsRequest = { + offsets: [ + { + partition: 1, + offset: 1 + } + ] + }; + + assert.isDefined(params); + }); + + it("StreamLayerEndpointResponse with all required params", function () { + const params: StreamLayerEndpointResponse = { + kafkaProtocolVersion: ["0.10"], + topic: "test", + clientId: "test", + consumerGroupPrefix: "test", + bootstrapServers: [ + { + hostname: "test", + port: 1 + } + ] + }; + + assert.isDefined(params); + }); + + it("StreamLayerEndpointResponse with all required and optional params", function () { + const params: StreamLayerEndpointResponse = { + kafkaProtocolVersion: ["0.10"], + topic: "test", + clientId: "test", + consumerGroupPrefix: "test", + bootstrapServers: [ + { + hostname: "test", + port: 1 + } + ], + bootstrapServersInternal: [ + { + hostname: "test", + port: 1 + } + ] + }; + + assert.isDefined(params); + }); + + it("StreamOffset with all required params", function () { + const params: StreamOffset = { partition: 1, offset: 1 - } - } - ] - }; - - assert.isDefined(params); - }); - - it("ConsumerSubscribeResponse with all required params", function() { - const params: ConsumerSubscribeResponse = {}; - - assert.isDefined(params); - }); - - it("ConsumerSubscribeResponse with all required and optional params", function() { - const params: ConsumerSubscribeResponse = { - nodeBaseURL: "test", - subscriptionId: "test" - }; - - assert.isDefined(params); - }); - - it("ErrorResponse with all required params", function() { - const params: ErrorResponse = { - title: "test", - status: 1, - code: "test", - cause: "test", - action: "test", - correlationId: "test" - }; - - assert.isDefined(params); - }); - - it("InlineResponse401 with all required params", function() { - const params: InlineResponse401 = {}; - - assert.isDefined(params); - }); - - it("InlineResponse401 with all required and optional params", function() { - const params: InlineResponse401 = { - error: "test", - errorDescription: "test" - }; - - assert.isDefined(params); - }); - - it("InlineResponse403 with all required params", function() { - const params: InlineResponse403 = {}; - - assert.isDefined(params); - }); - - it("InlineResponse403 with all required and optional params", function() { - const params: InlineResponse403 = { - error: "test", - errorDescription: "test" - }; - - assert.isDefined(params); - }); - - it("ConsumerProperties with all required params", function() { - const params: ConsumerProperties = { - ["test"]: "test" - }; - - assert.isDefined(params); - }); - - it("Message with all required params", function() { - const params: Message = { - metaData: { - partition: "test", - checksum: "test", - compressedDataSize: 1, - dataSize: 1, - data: "test", - dataHandle: "test", - timestamp: 1 - }, - offset: { - partition: 1, - offset: 1 - } - }; - - assert.isDefined(params); - }); - - it("Metadata with all required params", function() { - const params: Metadata = { - partition: "test" - }; - - assert.isDefined(params); - }); - - it("Metadata with all required and optional params", function() { - const params: Metadata = { - partition: "test", - checksum: "test", - compressedDataSize: 1, - dataSize: 1, - data: "test", - dataHandle: "test", - timestamp: 1 - }; - - assert.isDefined(params); - }); - - it("SeekOffsetsRequest with all required params", function() { - const params: SeekOffsetsRequest = {}; - - assert.isDefined(params); - }); - - it("SeekOffsetsRequest with all required and optional params", function() { - const params: SeekOffsetsRequest = { - offsets: [ - { - partition: 1, - offset: 1 - } - ] - }; - - assert.isDefined(params); - }); - - it("StreamLayerEndpointResponse with all required params", function() { - const params: StreamLayerEndpointResponse = { - kafkaProtocolVersion: ["0.10"], - topic: "test", - clientId: "test", - consumerGroupPrefix: "test", - bootstrapServers: [ - { - hostname: "test", - port: 1 - } - ] - }; - - assert.isDefined(params); - }); - - it("StreamLayerEndpointResponse with all required and optional params", function() { - const params: StreamLayerEndpointResponse = { - kafkaProtocolVersion: ["0.10"], - topic: "test", - clientId: "test", - consumerGroupPrefix: "test", - bootstrapServers: [ - { - hostname: "test", - port: 1 - } - ], - bootstrapServersInternal: [ - { - hostname: "test", - port: 1 - } - ] - }; - - assert.isDefined(params); - }); - - it("StreamOffset with all required params", function() { - const params: StreamOffset = { - partition: 1, - offset: 1 - }; - - assert.isDefined(params); - }); - - it("Test doCommitOffsets method with all required params", async function() { - const params = { - layerId: "mocked-id", - commitOffsets: { - offsets: [ - { - partition: 25, - offset: 3 - } - ] - } - }; - - const result = await StreamApi.doCommitOffsets( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test doCommitOffsets method with all required and optional params", async function() { - const params = { - layerId: "mocked-id", - subscriptionId: "test-subscriptionId", - xCorrelationId: "test-xCorrelationId", - commitOffsets: { - offsets: [ - { - partition: 25, - offset: 3 - } - ] - } - }; - - const result = await StreamApi.doCommitOffsets( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test consumeData method with all required params", async function() { - const params = { - layerId: "mocked-id" - }; - - const result = await StreamApi.consumeData(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test consumeData method with all required and optional params", async function() { - const params = { - layerId: "mocked-id", - subscriptionId: "test-subscriptionId", - xCorrelationId: "test-xCorrelationId" - }; - - const result = await StreamApi.consumeData(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test deleteSubscription method with all required params", async function() { - const params = { - layerId: "mocked-id" - }; - - const result = await StreamApi.deleteSubscription( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test deleteSubscription method with all required and optional params", async function() { - const params = { - layerId: "mocked-id", - subscriptionId: "test-subscriptionId", - xCorrelationId: "test-xCorrelationId" - }; - - const result = await StreamApi.deleteSubscription( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test endpoint method with all required params", async function() { - const params = { - layerId: "mocked-id" - }; - - const result = await StreamApi.endpoint(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test seekToOffset method with all required params", async function() { - const params = { - layerId: "mocked-id", - seekOffsets: { - offsets: [ - { - partition: 88, - offset: 69 - } - ] - } - }; - - const result = await StreamApi.seekToOffset(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test seekToOffset method with all required and optional params", async function() { - const params = { - layerId: "mocked-id", - seekOffsets: { - offsets: [ - { - partition: 88, - offset: 69 - } - ] - }, - subscriptionId: "test-subscriptionId", - xCorrelationId: "test-xCorrelationId" - }; - - const result = await StreamApi.seekToOffset(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test subscribe method with all required params", async function() { - const params = { - layerId: "mocked-id" - }; - - const result = await StreamApi.subscribe(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); - - it("Test subscribe method with all required and optional params", async function() { - const params = { - layerId: "mocked-id", - subscriptionId: "testSubsId", - consumerId: "testConsumerId", - subscriptionProperties: { - autoCommitIntervalMs: 25, - autoOffsetReset: "earliest" - } - }; - - const result = await StreamApi.subscribe(mockedRequestBuilder, params); - - expect(result).to.be.equal("success"); - }); + }; + + assert.isDefined(params); + }); + + it("Test doCommitOffsets method with all required params", async function () { + const params = { + layerId: "mocked-id", + commitOffsets: { + offsets: [ + { + partition: 25, + offset: 3 + } + ] + } + }; + + const result = await StreamApi.doCommitOffsets( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test doCommitOffsets method with all required and optional params", async function () { + const params = { + layerId: "mocked-id", + subscriptionId: "test-subscriptionId", + xCorrelationId: "test-xCorrelationId", + commitOffsets: { + offsets: [ + { + partition: 25, + offset: 3 + } + ] + } + }; + + const result = await StreamApi.doCommitOffsets( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test consumeData method with all required params", async function () { + const params = { + layerId: "mocked-id" + }; + + const result = await StreamApi.consumeData( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test consumeData method with all required and optional params", async function () { + const params = { + layerId: "mocked-id", + subscriptionId: "test-subscriptionId", + xCorrelationId: "test-xCorrelationId" + }; + + const result = await StreamApi.consumeData( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test deleteSubscription method with all required params", async function () { + const params = { + layerId: "mocked-id" + }; + + const result = await StreamApi.deleteSubscription( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test deleteSubscription method with all required and optional params", async function () { + const params = { + layerId: "mocked-id", + subscriptionId: "test-subscriptionId", + xCorrelationId: "test-xCorrelationId" + }; + + const result = await StreamApi.deleteSubscription( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test endpoint method with all required params", async function () { + const params = { + layerId: "mocked-id" + }; + + const result = await StreamApi.endpoint(mockedRequestBuilder, params); + + expect(result).to.be.equal("success"); + }); + + it("Test seekToOffset method with all required params", async function () { + const params = { + layerId: "mocked-id", + seekOffsets: { + offsets: [ + { + partition: 88, + offset: 69 + } + ] + } + }; + + const result = await StreamApi.seekToOffset( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test seekToOffset method with all required and optional params", async function () { + const params = { + layerId: "mocked-id", + seekOffsets: { + offsets: [ + { + partition: 88, + offset: 69 + } + ] + }, + subscriptionId: "test-subscriptionId", + xCorrelationId: "test-xCorrelationId" + }; + + const result = await StreamApi.seekToOffset( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test subscribe method with all required params", async function () { + const params = { + layerId: "mocked-id" + }; + + const result = await StreamApi.subscribe(mockedRequestBuilder, params); + + expect(result).to.be.equal("success"); + }); + + it("Test subscribe method with all required and optional params", async function () { + const params = { + layerId: "mocked-id", + subscriptionId: "testSubsId", + consumerId: "testConsumerId", + subscriptionProperties: { + autoCommitIntervalMs: 25, + autoOffsetReset: "earliest" + } + }; + + const result = await StreamApi.subscribe(mockedRequestBuilder, params); + + expect(result).to.be.equal("success"); + }); }); diff --git a/tests/integration/api-breaks/StreamLayerClient.test.ts b/tests/integration/api-breaks/StreamLayerClient.test.ts index fb022fc5..abd336f2 100644 --- a/tests/integration/api-breaks/StreamLayerClient.test.ts +++ b/tests/integration/api-breaks/StreamLayerClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,285 +17,298 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - StreamLayerClient, - StreamLayerClientParams, - PollRequest, - SeekRequest, - SubscribeRequest, - UnsubscribeRequest + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + StreamLayerClient, + StreamLayerClientParams, + PollRequest, + SeekRequest, + SubscribeRequest, + UnsubscribeRequest } from "@here/olp-sdk-dataservice-read"; import { StreamApi } from "@here/olp-sdk-dataservice-api"; import { HRN, OlpClientSettings } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("StreamLayerClientParams", function() { - it("StreamLayerClientParams with all required params", function() { - const params: StreamLayerClientParams = { - catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), - layerId: "mocked-layer-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }) - }; - - assert.isDefined(params); - }); +describe("StreamLayerClientParams", function () { + it("StreamLayerClientParams with all required params", function () { + const params: StreamLayerClientParams = { + catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), + layerId: "mocked-layer-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }) + }; + + assert.isDefined(params); + }); }); -describe("StreamLayerClient", function() { - class StreamLayerClientTest extends StreamLayerClient { - constructor(params: StreamLayerClientParams) { - super(params); - } - - async subscribe( - request: SubscribeRequest, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve("response"); - } - - async poll( - request: PollRequest, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve([]); - } - - async unsubscribe( - request: UnsubscribeRequest, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve(new Response()); +describe("StreamLayerClient", function () { + class StreamLayerClientTest extends StreamLayerClient { + constructor(params: StreamLayerClientParams) { + super(params); + } + + async subscribe( + request: SubscribeRequest, + abortSignal?: AbortSignal + ): Promise { + return Promise.resolve("response"); + } + + async poll( + request: PollRequest, + abortSignal?: AbortSignal + ): Promise { + return Promise.resolve([]); + } + + async unsubscribe( + request: UnsubscribeRequest, + abortSignal?: AbortSignal + ): Promise { + return Promise.resolve(new Response()); + } + + async getData( + message: StreamApi.Message, + abortSignal?: AbortSignal + ): Promise { + return Promise.resolve(new Response()); + } + + async seek( + request: SeekRequest, + abortSignal?: AbortSignal + ): Promise { + return Promise.resolve(new Response()); + } } - async getData( - message: StreamApi.Message, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve(new Response()); - } - - async seek( - request: SeekRequest, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve(new Response()); - } - } - - it("Shoud be initialized with StreamLayerClientParams", async function() { - const layerClient = new StreamLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) - }); - assert.isDefined(layerClient); - expect(layerClient).to.be.instanceOf(StreamLayerClient); - - assert.isFunction(layerClient.subscribe); - assert.isFunction(layerClient.poll); - assert.isFunction(layerClient.unsubscribe); - assert.isFunction(layerClient.getData); - assert.isFunction(layerClient.seek); - }); - - it("Test subscribe method method with SubscribeRequest", async function() { - const layerClient = new StreamLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("Shoud be initialized with StreamLayerClientParams", async function () { + const layerClient = new StreamLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + assert.isDefined(layerClient); + expect(layerClient).to.be.instanceOf(StreamLayerClient); + + assert.isFunction(layerClient.subscribe); + assert.isFunction(layerClient.poll); + assert.isFunction(layerClient.unsubscribe); + assert.isFunction(layerClient.getData); + assert.isFunction(layerClient.seek); }); - const request = new SubscribeRequest(); - const response = await layerClient.subscribe(request); + it("Test subscribe method method with SubscribeRequest", async function () { + const layerClient = new StreamLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); - assert.isDefined(response); - }); + const request = new SubscribeRequest(); + const response = await layerClient.subscribe(request); - it("Test subscribe method method with SubscribeRequest and abort signal", async function() { - const layerClient = new StreamLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + assert.isDefined(response); }); - const abortController = new AbortController(); - - const request = new SubscribeRequest(); - const response = await layerClient.subscribe( - request, - abortController.signal - ); - - assert.isDefined(response); - }); - - it("Test poll method method with PollRequest", async function() { - const layerClient = new StreamLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("Test subscribe method method with SubscribeRequest and abort signal", async function () { + const layerClient = new StreamLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const abortController = new AbortController(); + + const request = new SubscribeRequest(); + const response = await layerClient.subscribe( + request, + abortController.signal + ); + + assert.isDefined(response); }); - const request = new PollRequest(); - const response = await layerClient.poll(request); + it("Test poll method method with PollRequest", async function () { + const layerClient = new StreamLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); - assert.isDefined(response); - }); + const request = new PollRequest(); + const response = await layerClient.poll(request); - it("Test poll method method with PollRequest and abort signal", async function() { - const layerClient = new StreamLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + assert.isDefined(response); }); - const abortController = new AbortController(); - - const request = new PollRequest(); - const response = await layerClient.poll(request, abortController.signal); - - assert.isDefined(response); - }); - - it("Test unsubscribe method method with UnsubscribeRequest", async function() { - const layerClient = new StreamLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("Test poll method method with PollRequest and abort signal", async function () { + const layerClient = new StreamLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const abortController = new AbortController(); + + const request = new PollRequest(); + const response = await layerClient.poll( + request, + abortController.signal + ); + + assert.isDefined(response); }); - const request = new UnsubscribeRequest(); - const response = await layerClient.unsubscribe(request); + it("Test unsubscribe method method with UnsubscribeRequest", async function () { + const layerClient = new StreamLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); - assert.isDefined(response); - }); + const request = new UnsubscribeRequest(); + const response = await layerClient.unsubscribe(request); - it("Test unsubscribe method method with UnsubscribeRequest and abort signal", async function() { - const layerClient = new StreamLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + assert.isDefined(response); }); - const abortController = new AbortController(); - - const request = new UnsubscribeRequest(); - const response = await layerClient.unsubscribe( - request, - abortController.signal - ); - - assert.isDefined(response); - }); - - it("Test getData method method with message", async function() { - const layerClient = new StreamLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("Test unsubscribe method method with UnsubscribeRequest and abort signal", async function () { + const layerClient = new StreamLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const abortController = new AbortController(); + + const request = new UnsubscribeRequest(); + const response = await layerClient.unsubscribe( + request, + abortController.signal + ); + + assert.isDefined(response); }); - const message = { - metaData: { partition: "test" }, - offset: { - partition: 1, - offset: 10 - } - }; - const response = await layerClient.getData(message); - - assert.isDefined(response); - }); - - it("Test getData method method with message and abort signal", async function() { - const layerClient = new StreamLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("Test getData method method with message", async function () { + const layerClient = new StreamLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const message = { + metaData: { partition: "test" }, + offset: { + partition: 1, + offset: 10 + } + }; + const response = await layerClient.getData(message); + + assert.isDefined(response); }); - const abortController = new AbortController(); - - const message = { - metaData: { partition: "test" }, - offset: { - partition: 1, - offset: 10 - } - }; - const response = await layerClient.getData(message, abortController.signal); - - assert.isDefined(response); - }); - - it("Test seek method method with SeekRequest", async function() { - const layerClient = new StreamLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("Test getData method method with message and abort signal", async function () { + const layerClient = new StreamLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const abortController = new AbortController(); + + const message = { + metaData: { partition: "test" }, + offset: { + partition: 1, + offset: 10 + } + }; + const response = await layerClient.getData( + message, + abortController.signal + ); + + assert.isDefined(response); }); - const request = new SeekRequest(); - const response = await layerClient.seek(request); + it("Test seek method method with SeekRequest", async function () { + const layerClient = new StreamLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); - assert.isDefined(response); - }); + const request = new SeekRequest(); + const response = await layerClient.seek(request); - it("Test seek method method with SeekRequest and abort signal", async function() { - const layerClient = new StreamLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + assert.isDefined(response); }); - const abortController = new AbortController(); - - const request = new SeekRequest(); - const response = await layerClient.seek(request, abortController.signal); - - assert.isDefined(response); - }); + it("Test seek method method with SeekRequest and abort signal", async function () { + const layerClient = new StreamLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const abortController = new AbortController(); + + const request = new SeekRequest(); + const response = await layerClient.seek( + request, + abortController.signal + ); + + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/SubscribeRequest.test.ts b/tests/integration/api-breaks/SubscribeRequest.test.ts index 432035e5..834d062b 100644 --- a/tests/integration/api-breaks/SubscribeRequest.test.ts +++ b/tests/integration/api-breaks/SubscribeRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,125 +17,129 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { SubscribeRequest } from "@here/olp-sdk-dataservice-read"; import { StreamApi } from "@here/olp-sdk-dataservice-api"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("SubscribeRequest", function() { - class SubscribeRequestTest extends SubscribeRequest { - getMode(): "serial" { - return "serial"; - } - - withMode(mode: "serial"): SubscribeRequest { - return this; +describe("SubscribeRequest", function () { + class SubscribeRequestTest extends SubscribeRequest { + getMode(): "serial" { + return "serial"; + } + + withMode(mode: "serial"): SubscribeRequest { + return this; + } + + getSubscriptionId(): string { + return "subscription-id"; + } + + withSubscriptionId(id: string): SubscribeRequest { + return this; + } + + getConsumerId(): string { + return "test"; + } + + withConsumerId(id: string): SubscribeRequest { + return this; + } + + getSubscriptionProperties(): StreamApi.ConsumerProperties { + return { + "key-test": "test" + }; + } + + withSubscriptionProperties( + props: StreamApi.ConsumerProperties + ): SubscribeRequest { + return this; + } } - getSubscriptionId(): string { - return "subscription-id"; - } - - withSubscriptionId(id: string): SubscribeRequest { - return this; - } - - getConsumerId(): string { - return "test"; - } - - withConsumerId(id: string): SubscribeRequest { - return this; - } - - getSubscriptionProperties(): StreamApi.ConsumerProperties { - return { - "key-test": "test" - }; - } - - withSubscriptionProperties( - props: StreamApi.ConsumerProperties - ): SubscribeRequest { - return this; - } - } - - it("Shoud be initialized", async function() { - const request = new SubscribeRequest(); - assert.isDefined(request); - expect(request).to.be.instanceOf(SubscribeRequest); - - assert.isFunction(request.withMode); - assert.isFunction(request.getMode); - assert.isFunction(request.withSubscriptionId); - assert.isFunction(request.getSubscriptionId); - assert.isFunction(request.withConsumerId); - assert.isFunction(request.getConsumerId); - assert.isFunction(request.withSubscriptionProperties); - assert.isFunction(request.getSubscriptionProperties); - }); + it("Shoud be initialized", async function () { + const request = new SubscribeRequest(); + assert.isDefined(request); + expect(request).to.be.instanceOf(SubscribeRequest); + + assert.isFunction(request.withMode); + assert.isFunction(request.getMode); + assert.isFunction(request.withSubscriptionId); + assert.isFunction(request.getSubscriptionId); + assert.isFunction(request.withConsumerId); + assert.isFunction(request.getConsumerId); + assert.isFunction(request.withSubscriptionProperties); + assert.isFunction(request.getSubscriptionProperties); + }); - it("Test withMode method with mode", async function() { - const request = new SubscribeRequestTest(); + it("Test withMode method with mode", async function () { + const request = new SubscribeRequestTest(); - const response = request.withMode("serial"); - assert.isDefined(response); - }); + const response = request.withMode("serial"); + assert.isDefined(response); + }); - it("Test getMode method without params", async function() { - const request = new SubscribeRequestTest(); + it("Test getMode method without params", async function () { + const request = new SubscribeRequestTest(); - const response = request.getMode(); - assert.isDefined(response); - }); + const response = request.getMode(); + assert.isDefined(response); + }); - it("Test withSubscriptionId method with id", async function() { - const request = new SubscribeRequestTest(); + it("Test withSubscriptionId method with id", async function () { + const request = new SubscribeRequestTest(); - const response = request.withSubscriptionId("test"); - assert.isDefined(response); - }); + const response = request.withSubscriptionId("test"); + assert.isDefined(response); + }); - it("Test getSubscriptionId method without params", async function() { - const request = new SubscribeRequestTest(); + it("Test getSubscriptionId method without params", async function () { + const request = new SubscribeRequestTest(); - const response = request.getSubscriptionId(); - assert.isDefined(response); - }); + const response = request.getSubscriptionId(); + assert.isDefined(response); + }); - it("Test withConsumerId method with id", async function() { - const request = new SubscribeRequestTest(); + it("Test withConsumerId method with id", async function () { + const request = new SubscribeRequestTest(); - const response = request.withConsumerId("test"); - assert.isDefined(response); - }); + const response = request.withConsumerId("test"); + assert.isDefined(response); + }); - it("Test getConsumerId method without params", async function() { - const request = new SubscribeRequestTest(); + it("Test getConsumerId method without params", async function () { + const request = new SubscribeRequestTest(); - const response = request.getConsumerId(); - assert.isDefined(response); - }); + const response = request.getConsumerId(); + assert.isDefined(response); + }); - it("Test withSubscriptionProperties method with props", async function() { - const request = new SubscribeRequestTest(); + it("Test withSubscriptionProperties method with props", async function () { + const request = new SubscribeRequestTest(); - const response = request.withSubscriptionProperties({ - "key-test": "test" + const response = request.withSubscriptionProperties({ + "key-test": "test" + }); + assert.isDefined(response); }); - assert.isDefined(response); - }); - it("Test getSubscriptionProperties method without params", async function() { - const request = new SubscribeRequestTest(); + it("Test getSubscriptionProperties method without params", async function () { + const request = new SubscribeRequestTest(); - const response = request.getSubscriptionProperties(); - assert.isDefined(response); - }); + const response = request.getSubscriptionProperties(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/SummaryRequest.test.ts b/tests/integration/api-breaks/SummaryRequest.test.ts index 32b3e1e5..6fb58000 100644 --- a/tests/integration/api-breaks/SummaryRequest.test.ts +++ b/tests/integration/api-breaks/SummaryRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,76 +16,79 @@ * SPDX-License-Identifier: Apache-2.0 * License-Filename: LICENSE */ -import sinon = require("sinon"); -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { SummaryRequest } from "@here/olp-sdk-dataservice-read"; import { HRN } from "@here/olp-sdk-core"; -chai.use(sinonChai); +describe("SummaryRequest", function () { + const testCatalogHrn = HRN.fromString("hrn:here:data:::mocked-hrn"); -const assert = chai.assert; -const expect = chai.expect; + it("Shoud be initialized with arguments", async function () { + const client = new SummaryRequest(); + assert.isDefined(client); -describe("SummaryRequest", function() { - const testCatalogHrn = HRN.fromString("hrn:here:data:::mocked-hrn"); + expect(client).to.be.instanceOf(SummaryRequest); + assert.isDefined(client.getLayerId); + assert.isDefined(client.getBillingTag); + assert.isDefined(client.getCatalogHrn); + assert.isDefined(client.withBillingTag); + assert.isDefined(client.withCatalogHrn); + assert.isDefined(client.withLayerId); + }); - it("Shoud be initialized with arguments", async function() { - const client = new SummaryRequest(); - assert.isDefined(client); + it("Test withLayerId method with layerId", async function () { + const client = new SummaryRequest(); - expect(client).to.be.instanceOf(SummaryRequest); - assert.isDefined(client.getLayerId); - assert.isDefined(client.getBillingTag); - assert.isDefined(client.getCatalogHrn); - assert.isDefined(client.withBillingTag); - assert.isDefined(client.withCatalogHrn); - assert.isDefined(client.withLayerId); - }); + const response = await client.withLayerId("test"); + assert.isDefined(response); + }); - it("Test withLayerId method with layerId", async function() { - const client = new SummaryRequest(); + it("Test getLayerId method without params", async function () { + const client = new SummaryRequest(); + await client.withLayerId("test"); - const response = await client.withLayerId("test"); - assert.isDefined(response); - }); + const response = await client.getLayerId(); + assert.isDefined(response); + }); - it("Test getLayerId method without params", async function() { - const client = new SummaryRequest(); - await client.withLayerId("test"); + it("Test withBillingTag method with tag", async function () { + const client = new SummaryRequest(); - const response = await client.getLayerId(); - assert.isDefined(response); - }); + const response = await client.withBillingTag("test"); + assert.isDefined(response); + }); - it("Test withBillingTag method with tag", async function() { - const client = new SummaryRequest(); + it("Test getBillingTag method without params", async function () { + const client = new SummaryRequest(); + await client.withBillingTag("test"); - const response = await client.withBillingTag("test"); - assert.isDefined(response); - }); + const response = await client.getBillingTag(); + assert.isDefined(response); + }); - it("Test getBillingTag method without params", async function() { - const client = new SummaryRequest(); - await client.withBillingTag("test"); + it("Test withCatalogHrn method with hrn", async function () { + const client = new SummaryRequest(); - const response = await client.getBillingTag(); - assert.isDefined(response); - }); + const response = await client.withCatalogHrn(testCatalogHrn); + assert.isDefined(response); + }); - it("Test withCatalogHrn method with hrn", async function() { - const client = new SummaryRequest(); + it("Test getCatalogHrn method without params", async function () { + const client = new SummaryRequest(); + await client.withCatalogHrn(testCatalogHrn); - const response = await client.withCatalogHrn(testCatalogHrn); - assert.isDefined(response); - }); - - it("Test getCatalogHrn method without params", async function() { - const client = new SummaryRequest(); - await client.withCatalogHrn(testCatalogHrn); - - const response = await client.getCatalogHrn(); - assert.isDefined(response); - }); + const response = await client.getCatalogHrn(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/UnsubscribeRequest.test.ts b/tests/integration/api-breaks/UnsubscribeRequest.test.ts index e0532045..72887a02 100644 --- a/tests/integration/api-breaks/UnsubscribeRequest.test.ts +++ b/tests/integration/api-breaks/UnsubscribeRequest.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,70 +17,74 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { UnsubscribeRequest } from "@here/olp-sdk-dataservice-read"; -chai.use(sinonChai); +describe("UnsubscribeRequest", function () { + class UnsubscribeRequestTest extends UnsubscribeRequest { + getMode(): "serial" { + return "serial"; + } -const assert = chai.assert; -const expect = chai.expect; + withMode(mode: "serial"): UnsubscribeRequest { + return this; + } -describe("UnsubscribeRequest", function() { - class UnsubscribeRequestTest extends UnsubscribeRequest { - getMode(): "serial" { - return "serial"; - } - - withMode(mode: "serial"): UnsubscribeRequest { - return this; - } - - getSubscriptionId(): string { - return "subscription-id"; - } + getSubscriptionId(): string { + return "subscription-id"; + } - withSubscriptionId(id: string): UnsubscribeRequest { - return this; + withSubscriptionId(id: string): UnsubscribeRequest { + return this; + } } - } - it("Shoud be initialized", async function() { - const request = new UnsubscribeRequest(); - assert.isDefined(request); - expect(request).to.be.instanceOf(UnsubscribeRequest); + it("Shoud be initialized", async function () { + const request = new UnsubscribeRequest(); + assert.isDefined(request); + expect(request).to.be.instanceOf(UnsubscribeRequest); - assert.isFunction(request.withMode); - assert.isFunction(request.getMode); - assert.isFunction(request.withSubscriptionId); - assert.isFunction(request.getSubscriptionId); - }); + assert.isFunction(request.withMode); + assert.isFunction(request.getMode); + assert.isFunction(request.withSubscriptionId); + assert.isFunction(request.getSubscriptionId); + }); - it("Test withMode method with mode", async function() { - const request = new UnsubscribeRequestTest(); + it("Test withMode method with mode", async function () { + const request = new UnsubscribeRequestTest(); - const response = request.withMode("serial"); - assert.isDefined(response); - }); + const response = request.withMode("serial"); + assert.isDefined(response); + }); - it("Test getMode method without params", async function() { - const request = new UnsubscribeRequestTest(); + it("Test getMode method without params", async function () { + const request = new UnsubscribeRequestTest(); - const response = request.getMode(); - assert.isDefined(response); - }); + const response = request.getMode(); + assert.isDefined(response); + }); - it("Test withSubscriptionId method with id", async function() { - const request = new UnsubscribeRequestTest(); + it("Test withSubscriptionId method with id", async function () { + const request = new UnsubscribeRequestTest(); - const response = request.withSubscriptionId("test"); - assert.isDefined(response); - }); + const response = request.withSubscriptionId("test"); + assert.isDefined(response); + }); - it("Test getSubscriptionId method without params", async function() { - const request = new UnsubscribeRequestTest(); + it("Test getSubscriptionId method without params", async function () { + const request = new UnsubscribeRequestTest(); - const response = request.getSubscriptionId(); - assert.isDefined(response); - }); + const response = request.getSubscriptionId(); + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/UserAuth.test.ts b/tests/integration/api-breaks/UserAuth.test.ts index 012f5c69..f7fc3241 100644 --- a/tests/integration/api-breaks/UserAuth.test.ts +++ b/tests/integration/api-breaks/UserAuth.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,233 +17,239 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - UserAuth, - UserAuthConfig, - AuthCredentials, - UserInfo, - OAuthArgs, - Token + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + UserAuth, + UserAuthConfig, + AuthCredentials, + UserInfo, + OAuthArgs, + Token } from "@here/olp-sdk-authentication"; import * as authentication from "@here/olp-sdk-authentication"; import { Signer } from "@here/olp-sdk-authentication/lib/requestToken_common"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("UserAuth", function() { - class UserAuthTest extends UserAuth { - constructor(config: UserAuthConfig) { - super(config); +describe("UserAuth", function () { + class UserAuthTest extends UserAuth { + constructor(config: UserAuthConfig) { + super(config); + } + + async getToken(): Promise { + return Promise.resolve("resolve"); + } + + async validateAccessToken( + userToken: string + ): Promise { + return Promise.resolve(true); + } + + async getUserInfo(token: string): Promise { + return Promise.resolve({ + userId: "userId", + realm: "test", + firstname: "test", + lastname: "test", + email: "test", + dob: "test", + language: "test", + countryCode: "test", + emailVerified: true, + marketingEnabled: true, + createdTime: 1, + updatedTime: 1, + state: "test" + }); + } } - async getToken(): Promise { - return Promise.resolve("resolve"); - } + it("Shoud be initialized with config", async function () { + const credentials = { + accessKeyId: "test-key", + accessKeySecret: "test-key-secret" + }; - async validateAccessToken(userToken: string): Promise { - return Promise.resolve(true); - } + const userAuth = new UserAuthTest({ + credentials, + tokenRequester: authentication.requestToken + }); - async getUserInfo(token: string): Promise { - return Promise.resolve({ - userId: "userId", - realm: "test", - firstname: "test", - lastname: "test", - email: "test", - dob: "test", - language: "test", - countryCode: "test", - emailVerified: true, - marketingEnabled: true, - createdTime: 1, - updatedTime: 1, - state: "test" - }); - } - } + assert.isDefined(userAuth); + expect(userAuth).to.be.instanceOf(UserAuth); - it("Shoud be initialized with config", async function() { - const credentials = { - accessKeyId: "test-key", - accessKeySecret: "test-key-secret" - }; - - const userAuth = new UserAuthTest({ - credentials, - tokenRequester: authentication.requestToken + assert.isFunction(userAuth.getToken); + assert.isFunction(userAuth.validateAccessToken); + assert.isFunction(userAuth.getUserInfo); }); - assert.isDefined(userAuth); - expect(userAuth).to.be.instanceOf(UserAuth); + it("Should getToken be called without arguments", async function () { + const credentials = { + accessKeyId: "test-key", + accessKeySecret: "test-key-secret" + }; - assert.isFunction(userAuth.getToken); - assert.isFunction(userAuth.validateAccessToken); - assert.isFunction(userAuth.getUserInfo); - }); + const userAuth = new UserAuthTest({ + credentials, + tokenRequester: authentication.requestToken + }); - it("Should getToken be called without arguments", async function() { - const credentials = { - accessKeyId: "test-key", - accessKeySecret: "test-key-secret" - }; + const response = await userAuth.getToken(); - const userAuth = new UserAuthTest({ - credentials, - tokenRequester: authentication.requestToken + assert.isDefined(response); }); - const response = await userAuth.getToken(); + it("Should validateAccessToken be called with required arguments", async function () { + const credentials = { + accessKeyId: "test-key", + accessKeySecret: "test-key-secret" + }; - assert.isDefined(response); - }); + const userAuth = new UserAuthTest({ + credentials, + tokenRequester: authentication.requestToken + }); - it("Should validateAccessToken be called with required arguments", async function() { - const credentials = { - accessKeyId: "test-key", - accessKeySecret: "test-key-secret" - }; + const response = await userAuth.validateAccessToken("token"); - const userAuth = new UserAuthTest({ - credentials, - tokenRequester: authentication.requestToken + assert.isDefined(response); }); - const response = await userAuth.validateAccessToken("token"); + it("Test getUserInfo method with token", async function () { + const credentials = { + accessKeyId: "test-key", + accessKeySecret: "test-key-secret" + }; - assert.isDefined(response); - }); + const userAuth = new UserAuthTest({ + credentials, + tokenRequester: authentication.requestToken + }); - it("Test getUserInfo method with token", async function() { - const credentials = { - accessKeyId: "test-key", - accessKeySecret: "test-key-secret" - }; + const response = await userAuth.getUserInfo("user-token"); - const userAuth = new UserAuthTest({ - credentials, - tokenRequester: authentication.requestToken + assert.isDefined(response); }); - - const response = await userAuth.getUserInfo("user-token"); - - assert.isDefined(response); - }); }); -describe("AuthCredentials", function() { - it("Test AuthCredentials with params", function() { - const credentials: AuthCredentials = { - accessKeyId: "test-accessKeyId", - accessKeySecret: "test-accessKeySecret" - }; +describe("AuthCredentials", function () { + it("Test AuthCredentials with params", function () { + const credentials: AuthCredentials = { + accessKeyId: "test-accessKeyId", + accessKeySecret: "test-accessKeySecret" + }; - assert.isDefined(credentials); - }); + assert.isDefined(credentials); + }); - it("Test AuthCredentials with all required params", function() { - const credentials: AuthCredentials = {}; + it("Test AuthCredentials with all required params", function () { + const credentials: AuthCredentials = {}; - assert.isDefined(credentials); - }); + assert.isDefined(credentials); + }); }); -describe("UserAuthConfig", function() { - it("Test UserAuthConfig with params", function() { - const config: UserAuthConfig = { - credentials: { - accessKeyId: "test-accessKeyId", - accessKeySecret: "test-accessKeySecret" - }, - env: "test", - customUrl: "test", - tokenRequester: authentication.requestToken, - scope: "test" - }; - - assert.isDefined(config); - }); - - it("Test UserAuthConfig with all required params", function() { - const config: UserAuthConfig = { - tokenRequester: authentication.requestToken - }; - - assert.isDefined(config); - }); +describe("UserAuthConfig", function () { + it("Test UserAuthConfig with params", function () { + const config: UserAuthConfig = { + credentials: { + accessKeyId: "test-accessKeyId", + accessKeySecret: "test-accessKeySecret" + }, + env: "test", + customUrl: "test", + tokenRequester: authentication.requestToken, + scope: "test" + }; + + assert.isDefined(config); + }); + + it("Test UserAuthConfig with all required params", function () { + const config: UserAuthConfig = { + tokenRequester: authentication.requestToken + }; + + assert.isDefined(config); + }); }); -describe("UserInfo", function() { - it("Test UserInfo with all required params", function() { - const userInfo: UserInfo = { - userId: "userId", - realm: "test", - firstname: "test", - lastname: "test", - email: "test", - dob: "test", - language: "test", - countryCode: "test", - marketingEnabled: true, - createdTime: 1, - updatedTime: 1, - state: "test" - }; - - assert.isDefined(userInfo); - }); +describe("UserInfo", function () { + it("Test UserInfo with all required params", function () { + const userInfo: UserInfo = { + userId: "userId", + realm: "test", + firstname: "test", + lastname: "test", + email: "test", + dob: "test", + language: "test", + countryCode: "test", + marketingEnabled: true, + createdTime: 1, + updatedTime: 1, + state: "test" + }; + + assert.isDefined(userInfo); + }); }); -describe("Signer", function() { - it("Test Signer with all required params", function() { - const signer: Signer = { - sign: (data: ArrayBufferLike, secretKey: string) => - Promise.resolve("test-response"), - getRandomValues: (data: Uint8Array) => [1111] as any - }; +describe("Signer", function () { + it("Test Signer with all required params", function () { + const signer: Signer = { + sign: (data: ArrayBufferLike, secretKey: string) => + Promise.resolve("test-response"), + getRandomValues: (data: Uint8Array) => [1111] as any + }; - assert.isDefined(signer); - }); + assert.isDefined(signer); + }); }); -describe("OAuthArgs", function() { - it("Test OAuthArgs with params", function() { - const oAuthArgs: OAuthArgs = { - url: "test", - consumerKey: "test", - secretKey: "test", - nonce: "test", - timestamp: 1, - scope: "test" - }; - - assert.isDefined(oAuthArgs); - }); - - it("Test OAuthArgs with all required params", function() { - const oAuthArgs: OAuthArgs = { - url: "test", - consumerKey: "test", - secretKey: "test" - }; - - assert.isDefined(oAuthArgs); - }); +describe("OAuthArgs", function () { + it("Test OAuthArgs with params", function () { + const oAuthArgs: OAuthArgs = { + url: "test", + consumerKey: "test", + secretKey: "test", + nonce: "test", + timestamp: 1, + scope: "test" + }; + + assert.isDefined(oAuthArgs); + }); + + it("Test OAuthArgs with all required params", function () { + const oAuthArgs: OAuthArgs = { + url: "test", + consumerKey: "test", + secretKey: "test" + }; + + assert.isDefined(oAuthArgs); + }); }); -describe("Token", function() { - it("Test Token with all required params", function() { - const token: Token = { - accessToken: "test", - tokenType: "test", - expiresIn: 12 - }; +describe("Token", function () { + it("Test Token with all required params", function () { + const token: Token = { + accessToken: "test", + tokenType: "test", + expiresIn: 12 + }; - assert.isDefined(token); - }); + assert.isDefined(token); + }); }); diff --git a/tests/integration/api-breaks/VersionedLayerClient.test.ts b/tests/integration/api-breaks/VersionedLayerClient.test.ts index 833e4679..d7d487f0 100644 --- a/tests/integration/api-breaks/VersionedLayerClient.test.ts +++ b/tests/integration/api-breaks/VersionedLayerClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,218 +17,229 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - VersionedLayerClient, - VersionedLayerClientParams, - QuadKeyPartitionsRequest, - DataRequest, - PartitionsRequest + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + VersionedLayerClient, + VersionedLayerClientParams, + QuadKeyPartitionsRequest, + DataRequest, + PartitionsRequest } from "@here/olp-sdk-dataservice-read"; import { QueryApi, MetadataApi } from "@here/olp-sdk-dataservice-api"; import { HRN, OlpClientSettings } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("VersionedLayerClientParams", function() { - it("VersionedLayerClientParams with all required params", function() { - const params: VersionedLayerClientParams = { - catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), - layerId: "mocked-layer-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }) - }; - - assert.isDefined(params); - }); - - it("VersionedLayerClientParams with all required and optional params", function() { - const params: VersionedLayerClientParams = { - catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), - layerId: "mocked-layer-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }), - version: 4 - }; - - assert.isDefined(params); - }); -}); - -describe("VersionedLayerClient", function() { - class VersionedLayerClientTest extends VersionedLayerClient { - constructor(params: VersionedLayerClientParams) { - super(params); - } +describe("VersionedLayerClientParams", function () { + it("VersionedLayerClientParams with all required params", function () { + const params: VersionedLayerClientParams = { + catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), + layerId: "mocked-layer-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }) + }; + + assert.isDefined(params); + }); - async getData( - dataRequest: DataRequest, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve(new Response()); - } + it("VersionedLayerClientParams with all required and optional params", function () { + const params: VersionedLayerClientParams = { + catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), + layerId: "mocked-layer-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }), + version: 4 + }; + + assert.isDefined(params); + }); +}); - async getPartitions( - quadKeyPartitionsRequest: QuadKeyPartitionsRequest, - abortSignal?: AbortSignal - ): Promise; - async getPartitions( - partitionsRequest: PartitionsRequest, - abortSignal?: AbortSignal - ): Promise; - - async getPartitions( - request: QuadKeyPartitionsRequest | PartitionsRequest, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve({}); +describe("VersionedLayerClient", function () { + class VersionedLayerClientTest extends VersionedLayerClient { + constructor(params: VersionedLayerClientParams) { + super(params); + } + + async getData( + dataRequest: DataRequest, + abortSignal?: AbortSignal + ): Promise { + return Promise.resolve(new Response()); + } + + async getPartitions( + quadKeyPartitionsRequest: QuadKeyPartitionsRequest, + abortSignal?: AbortSignal + ): Promise; + async getPartitions( + partitionsRequest: PartitionsRequest, + abortSignal?: AbortSignal + ): Promise; + + async getPartitions( + request: QuadKeyPartitionsRequest | PartitionsRequest, + abortSignal?: AbortSignal + ): Promise< + QueryApi.Index | MetadataApi.Partitions | QueryApi.Partitions + > { + return Promise.resolve({}); + } } - } - beforeEach(function() { - VersionedLayerClientTest; - }); - - it("Shoud be initialized with arguments", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VersionedLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings - }); - assert.isDefined(layerClient); - expect(layerClient).to.be.instanceOf(VersionedLayerClient); - - assert.isFunction(layerClient.getData); - assert.isFunction(layerClient.getPartitions); - }); - - it("Shoud be initialized with VersionedLayerClientParams", async function() { - const layerClient = new VersionedLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) - }); - assert.isDefined(layerClient); - expect(layerClient).to.be.instanceOf(VersionedLayerClient); - - assert.isFunction(layerClient.getData); - assert.isFunction(layerClient.getPartitions); - }); - - it("getPartitions method with QuadKeyPartitionsRequest", async function() { - const layerClient = new VersionedLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + beforeEach(function () { + VersionedLayerClientTest; }); - const response = layerClient.getPartitions(new QuadKeyPartitionsRequest()); - assert.isDefined(response); - }); - - it("getPartitions method with QuadKeyPartitionsRequest and abort signal", async function() { - const layerClient = new VersionedLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("Shoud be initialized with arguments", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VersionedLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + assert.isDefined(layerClient); + expect(layerClient).to.be.instanceOf(VersionedLayerClient); + + assert.isFunction(layerClient.getData); + assert.isFunction(layerClient.getPartitions); }); - const abortController = new AbortController(); - - const response = layerClient.getPartitions( - new QuadKeyPartitionsRequest(), - abortController.signal - ); - assert.isDefined(response); - }); - - it("getPartitions method with PartitionsRequest", async function() { - const layerClient = new VersionedLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("Shoud be initialized with VersionedLayerClientParams", async function () { + const layerClient = new VersionedLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + assert.isDefined(layerClient); + expect(layerClient).to.be.instanceOf(VersionedLayerClient); + + assert.isFunction(layerClient.getData); + assert.isFunction(layerClient.getPartitions); }); - const response = layerClient.getPartitions(new PartitionsRequest()); - assert.isDefined(response); - }); - - it("getPartitions method with PartitionsRequest and abort signal", async function() { - const layerClient = new VersionedLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("getPartitions method with QuadKeyPartitionsRequest", async function () { + const layerClient = new VersionedLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const response = layerClient.getPartitions( + new QuadKeyPartitionsRequest() + ); + assert.isDefined(response); }); - const abortController = new AbortController(); - - const response = layerClient.getPartitions( - new PartitionsRequest(), - abortController.signal - ); - assert.isDefined(response); - }); - - it("getData method method with dataHandle", async function() { - const layerClient = new VersionedLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("getPartitions method with QuadKeyPartitionsRequest and abort signal", async function () { + const layerClient = new VersionedLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const abortController = new AbortController(); + + const response = layerClient.getPartitions( + new QuadKeyPartitionsRequest(), + abortController.signal + ); + assert.isDefined(response); }); - const mockedDataHandle = "1b2ca68f-d4a0-4379-8120-cd025640510c"; - const request = new DataRequest().withDataHandle(mockedDataHandle); - const response = await layerClient.getData(request); - - assert.isDefined(response); - }); - - it("getData method method with dataHandle and abort signal", async function() { - const layerClient = new VersionedLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("getPartitions method with PartitionsRequest", async function () { + const layerClient = new VersionedLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const response = layerClient.getPartitions(new PartitionsRequest()); + assert.isDefined(response); }); - const abortController = new AbortController(); + it("getPartitions method with PartitionsRequest and abort signal", async function () { + const layerClient = new VersionedLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const abortController = new AbortController(); + + const response = layerClient.getPartitions( + new PartitionsRequest(), + abortController.signal + ); + assert.isDefined(response); + }); - const mockedDataHandle = "1b2ca68f-d4a0-4379-8120-cd025640510c"; - const request = new DataRequest().withDataHandle(mockedDataHandle); - const response = await layerClient.getData(request, abortController.signal); + it("getData method method with dataHandle", async function () { + const layerClient = new VersionedLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const mockedDataHandle = "1b2ca68f-d4a0-4379-8120-cd025640510c"; + const request = new DataRequest().withDataHandle(mockedDataHandle); + const response = await layerClient.getData(request); + + assert.isDefined(response); + }); - assert.isDefined(response); - }); + it("getData method method with dataHandle and abort signal", async function () { + const layerClient = new VersionedLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const abortController = new AbortController(); + + const mockedDataHandle = "1b2ca68f-d4a0-4379-8120-cd025640510c"; + const request = new DataRequest().withDataHandle(mockedDataHandle); + const response = await layerClient.getData( + request, + abortController.signal + ); + + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/VersionedLayerClientWrite.test.ts b/tests/integration/api-breaks/VersionedLayerClientWrite.test.ts index b61e908c..97608c80 100644 --- a/tests/integration/api-breaks/VersionedLayerClientWrite.test.ts +++ b/tests/integration/api-breaks/VersionedLayerClientWrite.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,117 +17,134 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - CancelBatchRequest, - CheckDataExistsRequest, - CompleteBatchRequest, - GetBatchRequest, - PublishSinglePartitionRequest, - StartBatchRequest, - UploadBlobRequest, - UploadPartitionsRequest, - VersionedLayerClient, - VersionedLayerClientParams + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + CancelBatchRequest, + CheckDataExistsRequest, + CompleteBatchRequest, + GetBatchRequest, + PublishSinglePartitionRequest, + StartBatchRequest, + UploadBlobRequest, + UploadPartitionsRequest, + VersionedLayerClient, + VersionedLayerClientParams } from "@here/olp-sdk-dataservice-write"; import { OlpClientSettings, HRN } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; let layerClient: VersionedLayerClient; const abortSignal: AbortSignal = new AbortController().signal; const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + environment: "here", + getToken: () => Promise.resolve("test-token-string") }); -describe("VersionedLayerClientParams", function() { - it("VersionedLayerClientParams with all required params", function() { - const params: VersionedLayerClientParams = { - catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }) - }; +describe("VersionedLayerClientParams", function () { + it("VersionedLayerClientParams with all required params", function () { + const params: VersionedLayerClientParams = { + catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }) + }; - assert.isDefined(params); - }); + assert.isDefined(params); + }); }); -describe("VersionedLayerClient", function() { - beforeEach(function() { - layerClient = new VersionedLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - settings +describe("VersionedLayerClient", function () { + beforeEach(function () { + layerClient = new VersionedLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + settings + }); }); - }); - it("Shoud be initialized with arguments", async function() { - assert.isDefined(layerClient); - expect(layerClient).to.be.instanceOf(VersionedLayerClient); + it("Shoud be initialized with arguments", async function () { + assert.isDefined(layerClient); + expect(layerClient).to.be.instanceOf(VersionedLayerClient); - assert.isFunction(layerClient.checkDataExists); - assert.isFunction(layerClient.getBaseVersion); - assert.isFunction(layerClient.startBatch); - assert.isFunction(layerClient.publishToBatch); - assert.isFunction(layerClient.cancelBatch); - assert.isFunction(layerClient.getBatch); - assert.isFunction(layerClient.completeBatch); - assert.isFunction(layerClient.uploadBlob); - assert.isFunction(layerClient.uploadPartitions); - }); + assert.isFunction(layerClient.checkDataExists); + assert.isFunction(layerClient.getBaseVersion); + assert.isFunction(layerClient.startBatch); + assert.isFunction(layerClient.publishToBatch); + assert.isFunction(layerClient.cancelBatch); + assert.isFunction(layerClient.getBatch); + assert.isFunction(layerClient.completeBatch); + assert.isFunction(layerClient.uploadBlob); + assert.isFunction(layerClient.uploadPartitions); + }); - it("checkDataExists method", async function() { - layerClient.checkDataExists(new CheckDataExistsRequest()).catch(e => e); - layerClient - .checkDataExists(new CheckDataExistsRequest(), abortSignal) - .catch(e => e); - }); - it("getBaseVersion method", async function() { - layerClient.getBaseVersion().catch(e => e); - layerClient.getBaseVersion("mocked-billing-tag").catch(e => e); - layerClient.getBaseVersion("mocked-billing-tag", abortSignal).catch(e => e); - }); - it("startBatch method", async function() { - layerClient.startBatch(new StartBatchRequest()).catch(e => e); - layerClient.startBatch(new StartBatchRequest(), abortSignal).catch(e => e); - }); - it("publishToBatch method", async function() { - layerClient - .publishToBatch(new PublishSinglePartitionRequest()) - .catch(e => e); - layerClient - .publishToBatch(new PublishSinglePartitionRequest(), abortSignal) - .catch(e => e); - }); - it("cancelBatch method", async function() { - layerClient.cancelBatch(new CancelBatchRequest()).catch(e => e); - layerClient - .cancelBatch(new CancelBatchRequest(), abortSignal) - .catch(e => e); - }); - it("getBatch method", async function() { - layerClient.getBatch(new GetBatchRequest()).catch(e => e); - layerClient.getBatch(new GetBatchRequest(), abortSignal).catch(e => e); - }); - it("completeBatch method", async function() { - layerClient.completeBatch(new CompleteBatchRequest()).catch(e => e); - layerClient - .completeBatch(new CompleteBatchRequest(), abortSignal) - .catch(e => e); - }); - it("uploadBlob method", async function() { - layerClient.uploadBlob(new UploadBlobRequest()).catch(e => e); - layerClient.uploadBlob(new UploadBlobRequest(), abortSignal).catch(e => e); - }); - it("uploadPartitions method", async function() { - layerClient.uploadPartitions(new UploadPartitionsRequest()).catch(e => e); - layerClient - .uploadPartitions(new UploadPartitionsRequest(), abortSignal) - .catch(e => e); - }); + it("checkDataExists method", async function () { + layerClient + .checkDataExists(new CheckDataExistsRequest()) + .catch((e) => e); + layerClient + .checkDataExists(new CheckDataExistsRequest(), abortSignal) + .catch((e) => e); + }); + it("getBaseVersion method", async function () { + layerClient.getBaseVersion().catch((e) => e); + layerClient.getBaseVersion("mocked-billing-tag").catch((e) => e); + layerClient + .getBaseVersion("mocked-billing-tag", abortSignal) + .catch((e) => e); + }); + it("startBatch method", async function () { + layerClient.startBatch(new StartBatchRequest()).catch((e) => e); + layerClient + .startBatch(new StartBatchRequest(), abortSignal) + .catch((e) => e); + }); + it("publishToBatch method", async function () { + layerClient + .publishToBatch(new PublishSinglePartitionRequest()) + .catch((e) => e); + layerClient + .publishToBatch(new PublishSinglePartitionRequest(), abortSignal) + .catch((e) => e); + }); + it("cancelBatch method", async function () { + layerClient.cancelBatch(new CancelBatchRequest()).catch((e) => e); + layerClient + .cancelBatch(new CancelBatchRequest(), abortSignal) + .catch((e) => e); + }); + it("getBatch method", async function () { + layerClient.getBatch(new GetBatchRequest()).catch((e) => e); + layerClient + .getBatch(new GetBatchRequest(), abortSignal) + .catch((e) => e); + }); + it("completeBatch method", async function () { + layerClient.completeBatch(new CompleteBatchRequest()).catch((e) => e); + layerClient + .completeBatch(new CompleteBatchRequest(), abortSignal) + .catch((e) => e); + }); + it("uploadBlob method", async function () { + layerClient.uploadBlob(new UploadBlobRequest()).catch((e) => e); + layerClient + .uploadBlob(new UploadBlobRequest(), abortSignal) + .catch((e) => e); + }); + it("uploadPartitions method", async function () { + layerClient + .uploadPartitions(new UploadPartitionsRequest()) + .catch((e) => e); + layerClient + .uploadPartitions(new UploadPartitionsRequest(), abortSignal) + .catch((e) => e); + }); }); diff --git a/tests/integration/api-breaks/VolatileBlob.test.ts b/tests/integration/api-breaks/VolatileBlob.test.ts index 7366af40..fa46becb 100644 --- a/tests/integration/api-breaks/VolatileBlob.test.ts +++ b/tests/integration/api-breaks/VolatileBlob.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,167 +17,170 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { VolatileBlobApi } from "@here/olp-sdk-dataservice-api"; import { - AuthenticationMessage, - AuthorizationMessage + AuthenticationMessage, + AuthorizationMessage } from "@here/olp-sdk-dataservice-api/lib/volatile-blob-api"; import { mockedRequestBuilder } from "./MockedRequestBuilder"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("VolatileBlobApi", function() { - it("AuthenticationMessage with all required params", function() { - const params: AuthenticationMessage = {}; - - assert.isDefined(params); - }); - - it("AuthenticationMessage with all required and optional params", function() { - const params: AuthenticationMessage = { - error: "test", - errorDescription: "test" - }; - - assert.isDefined(params); - }); - - it("AuthorizationMessage with all required params", function() { - const params: AuthorizationMessage = {}; - - assert.isDefined(params); - }); - - it("AuthorizationMessage with all required and optional params", function() { - const params: AuthorizationMessage = { - error: "test", - errorDescription: "test" - }; - - assert.isDefined(params); - }); - - it("Test checkHandleExists method with all required params", async function() { - const params = { - layerId: "test", - dataHandle: "test" - }; - - const result = await VolatileBlobApi.checkHandleExists( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test checkHandleExists method with all required and optional params", async function() { - const params = { - layerId: "test", - dataHandle: "test", - billingTag: "test" - }; - - const result = await VolatileBlobApi.checkHandleExists( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test deleteVolatileBlob method with all required params", async function() { - const params = { - layerId: "test", - dataHandle: "test" - }; - - const result = await VolatileBlobApi.deleteVolatileBlob( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test deleteVolatileBlob method with all required and optional params", async function() { - const params = { - layerId: "test", - dataHandle: "test", - billingTag: "test" - }; - - const result = await VolatileBlobApi.deleteVolatileBlob( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getVolatileBlob method with all required params", async function() { - const params = { - layerId: "test", - dataHandle: "test" - }; - - const result = await VolatileBlobApi.getVolatileBlob( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test getVolatileBlob method with all required and optional params", async function() { - const params = { - layerId: "test", - dataHandle: "test", - billingTag: "test" - }; - - const result = await VolatileBlobApi.getVolatileBlob( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test putVolatileBlob method with all required params", async function() { - const params = { - layerId: "test", - dataHandle: "test", - body: "test" - }; - - const result = await VolatileBlobApi.putVolatileBlob( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); - - it("Test putVolatileBlob method with all required and optional params", async function() { - const params = { - layerId: "test", - dataHandle: "test", - body: "test", - billingTag: "test" - }; - - const result = await VolatileBlobApi.putVolatileBlob( - mockedRequestBuilder, - params - ); - - expect(result).to.be.equal("success"); - }); +describe("VolatileBlobApi", function () { + it("AuthenticationMessage with all required params", function () { + const params: AuthenticationMessage = {}; + + assert.isDefined(params); + }); + + it("AuthenticationMessage with all required and optional params", function () { + const params: AuthenticationMessage = { + error: "test", + errorDescription: "test" + }; + + assert.isDefined(params); + }); + + it("AuthorizationMessage with all required params", function () { + const params: AuthorizationMessage = {}; + + assert.isDefined(params); + }); + + it("AuthorizationMessage with all required and optional params", function () { + const params: AuthorizationMessage = { + error: "test", + errorDescription: "test" + }; + + assert.isDefined(params); + }); + + it("Test checkHandleExists method with all required params", async function () { + const params = { + layerId: "test", + dataHandle: "test" + }; + + const result = await VolatileBlobApi.checkHandleExists( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test checkHandleExists method with all required and optional params", async function () { + const params = { + layerId: "test", + dataHandle: "test", + billingTag: "test" + }; + + const result = await VolatileBlobApi.checkHandleExists( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test deleteVolatileBlob method with all required params", async function () { + const params = { + layerId: "test", + dataHandle: "test" + }; + + const result = await VolatileBlobApi.deleteVolatileBlob( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test deleteVolatileBlob method with all required and optional params", async function () { + const params = { + layerId: "test", + dataHandle: "test", + billingTag: "test" + }; + + const result = await VolatileBlobApi.deleteVolatileBlob( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getVolatileBlob method with all required params", async function () { + const params = { + layerId: "test", + dataHandle: "test" + }; + + const result = await VolatileBlobApi.getVolatileBlob( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test getVolatileBlob method with all required and optional params", async function () { + const params = { + layerId: "test", + dataHandle: "test", + billingTag: "test" + }; + + const result = await VolatileBlobApi.getVolatileBlob( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test putVolatileBlob method with all required params", async function () { + const params = { + layerId: "test", + dataHandle: "test", + body: "test" + }; + + const result = await VolatileBlobApi.putVolatileBlob( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + + it("Test putVolatileBlob method with all required and optional params", async function () { + const params = { + layerId: "test", + dataHandle: "test", + body: "test", + billingTag: "test" + }; + + const result = await VolatileBlobApi.putVolatileBlob( + mockedRequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); }); diff --git a/tests/integration/api-breaks/VolatileLayerClient.test.ts b/tests/integration/api-breaks/VolatileLayerClient.test.ts index 65c10d83..ebda6a6e 100644 --- a/tests/integration/api-breaks/VolatileLayerClient.test.ts +++ b/tests/integration/api-breaks/VolatileLayerClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,217 +17,228 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - VolatileLayerClient, - VolatileLayerClientParams, - QuadKeyPartitionsRequest, - DataRequest, - PartitionsRequest + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + VolatileLayerClient, + VolatileLayerClientParams, + QuadKeyPartitionsRequest, + DataRequest, + PartitionsRequest } from "@here/olp-sdk-dataservice-read"; import { QueryApi, MetadataApi } from "@here/olp-sdk-dataservice-api"; import { HRN, OlpClientSettings } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("VolatileLayerClientParams", function() { - it("VolatileLayerClientParams with all required params", function() { - const params: VolatileLayerClientParams = { - catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), - layerId: "mocked-layer-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }) - }; - - assert.isDefined(params); - }); - - it("VolatileLayerClientParams with all required and optional params", function() { - const params: VolatileLayerClientParams = { - catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), - layerId: "mocked-layer-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }) - }; - - assert.isDefined(params); - }); -}); - -describe("VolatileLayerClient", function() { - class VolatileLayerClientTest extends VolatileLayerClient { - constructor(params: VolatileLayerClientParams) { - super(params); - } +describe("VolatileLayerClientParams", function () { + it("VolatileLayerClientParams with all required params", function () { + const params: VolatileLayerClientParams = { + catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), + layerId: "mocked-layer-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }) + }; + + assert.isDefined(params); + }); - async getData( - dataRequest: DataRequest, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve(new Response()); - } + it("VolatileLayerClientParams with all required and optional params", function () { + const params: VolatileLayerClientParams = { + catalogHrn: HRN.fromString("hrn:here:data:::example-catalog"), + layerId: "mocked-layer-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }) + }; + + assert.isDefined(params); + }); +}); - async getPartitions( - quadKeyPartitionsRequest: QuadKeyPartitionsRequest, - abortSignal?: AbortSignal - ): Promise; - async getPartitions( - partitionsRequest: PartitionsRequest, - abortSignal?: AbortSignal - ): Promise; - - async getPartitions( - request: QuadKeyPartitionsRequest | PartitionsRequest, - abortSignal?: AbortSignal - ): Promise { - return Promise.resolve({}); +describe("VolatileLayerClient", function () { + class VolatileLayerClientTest extends VolatileLayerClient { + constructor(params: VolatileLayerClientParams) { + super(params); + } + + async getData( + dataRequest: DataRequest, + abortSignal?: AbortSignal + ): Promise { + return Promise.resolve(new Response()); + } + + async getPartitions( + quadKeyPartitionsRequest: QuadKeyPartitionsRequest, + abortSignal?: AbortSignal + ): Promise; + async getPartitions( + partitionsRequest: PartitionsRequest, + abortSignal?: AbortSignal + ): Promise; + + async getPartitions( + request: QuadKeyPartitionsRequest | PartitionsRequest, + abortSignal?: AbortSignal + ): Promise< + QueryApi.Index | MetadataApi.Partitions | QueryApi.Partitions + > { + return Promise.resolve({}); + } } - } - beforeEach(function() { - VolatileLayerClientTest; - }); - - it("Shoud be initialized with arguments", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VolatileLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings - }); - assert.isDefined(layerClient); - expect(layerClient).to.be.instanceOf(VolatileLayerClient); - - assert.isFunction(layerClient.getData); - assert.isFunction(layerClient.getPartitions); - }); - - it("Shoud be initialized with VolatileLayerClientParams", async function() { - const layerClient = new VolatileLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) - }); - assert.isDefined(layerClient); - expect(layerClient).to.be.instanceOf(VolatileLayerClient); - - assert.isFunction(layerClient.getData); - assert.isFunction(layerClient.getPartitions); - }); - - it("getPartitions method with QuadKeyPartitionsRequest", async function() { - const layerClient = new VolatileLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + beforeEach(function () { + VolatileLayerClientTest; }); - const response = layerClient.getPartitions(new QuadKeyPartitionsRequest()); - assert.isDefined(response); - }); - - it("getPartitions method with QuadKeyPartitionsRequest and abort signal", async function() { - const layerClient = new VolatileLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("Shoud be initialized with arguments", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VolatileLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + assert.isDefined(layerClient); + expect(layerClient).to.be.instanceOf(VolatileLayerClient); + + assert.isFunction(layerClient.getData); + assert.isFunction(layerClient.getPartitions); }); - const abortController = new AbortController(); - - const response = layerClient.getPartitions( - new QuadKeyPartitionsRequest(), - abortController.signal - ); - assert.isDefined(response); - }); - - it("getPartitions method with PartitionsRequest", async function() { - const layerClient = new VolatileLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("Shoud be initialized with VolatileLayerClientParams", async function () { + const layerClient = new VolatileLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + assert.isDefined(layerClient); + expect(layerClient).to.be.instanceOf(VolatileLayerClient); + + assert.isFunction(layerClient.getData); + assert.isFunction(layerClient.getPartitions); }); - const response = layerClient.getPartitions(new PartitionsRequest()); - assert.isDefined(response); - }); - - it("getPartitions method with PartitionsRequest and abort signal", async function() { - const layerClient = new VolatileLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("getPartitions method with QuadKeyPartitionsRequest", async function () { + const layerClient = new VolatileLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const response = layerClient.getPartitions( + new QuadKeyPartitionsRequest() + ); + assert.isDefined(response); }); - const abortController = new AbortController(); - - const response = layerClient.getPartitions( - new PartitionsRequest(), - abortController.signal - ); - assert.isDefined(response); - }); - - it("getData method method with dataHandle", async function() { - const layerClient = new VolatileLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("getPartitions method with QuadKeyPartitionsRequest and abort signal", async function () { + const layerClient = new VolatileLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const abortController = new AbortController(); + + const response = layerClient.getPartitions( + new QuadKeyPartitionsRequest(), + abortController.signal + ); + assert.isDefined(response); }); - const mockedDataHandle = "1b2ca68f-d4a0-4379-8120-cd025640510c"; - const request = new DataRequest().withDataHandle(mockedDataHandle); - const response = await layerClient.getData(request); - - assert.isDefined(response); - }); - - it("getData method method with dataHandle and abort signal", async function() { - const layerClient = new VolatileLayerClientTest({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }) + it("getPartitions method with PartitionsRequest", async function () { + const layerClient = new VolatileLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const response = layerClient.getPartitions(new PartitionsRequest()); + assert.isDefined(response); }); - const abortController = new AbortController(); + it("getPartitions method with PartitionsRequest and abort signal", async function () { + const layerClient = new VolatileLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const abortController = new AbortController(); + + const response = layerClient.getPartitions( + new PartitionsRequest(), + abortController.signal + ); + assert.isDefined(response); + }); - const mockedDataHandle = "1b2ca68f-d4a0-4379-8120-cd025640510c"; - const request = new DataRequest().withDataHandle(mockedDataHandle); - const response = await layerClient.getData(request, abortController.signal); + it("getData method method with dataHandle", async function () { + const layerClient = new VolatileLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const mockedDataHandle = "1b2ca68f-d4a0-4379-8120-cd025640510c"; + const request = new DataRequest().withDataHandle(mockedDataHandle); + const response = await layerClient.getData(request); + + assert.isDefined(response); + }); - assert.isDefined(response); - }); + it("getData method method with dataHandle and abort signal", async function () { + const layerClient = new VolatileLayerClientTest({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }) + }); + + const abortController = new AbortController(); + + const mockedDataHandle = "1b2ca68f-d4a0-4379-8120-cd025640510c"; + const request = new DataRequest().withDataHandle(mockedDataHandle); + const response = await layerClient.getData( + request, + abortController.signal + ); + + assert.isDefined(response); + }); }); diff --git a/tests/integration/api-breaks/mocha.opts b/tests/integration/api-breaks/mocha.opts deleted file mode 100644 index 5ffc924f..00000000 --- a/tests/integration/api-breaks/mocha.opts +++ /dev/null @@ -1,8 +0,0 @@ ---require ts-node/register ---require source-map-support/register ---full-trace ---bail ---check-leaks ---reporter xunit ---reporter-option output=tests/integration/api-breaks/xunit.xml -tests/integration/api-breaks/*.test.ts \ No newline at end of file diff --git a/tests/integration/bundles/umd/olp-sdk-generated.test.ts b/tests/integration/bundles/umd/olp-sdk-generated.test.ts index c3fe96d2..eef5a8bf 100644 --- a/tests/integration/bundles/umd/olp-sdk-generated.test.ts +++ b/tests/integration/bundles/umd/olp-sdk-generated.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,17 @@ * License-Filename: LICENSE */ +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { OlpSdkDataserviceApiTestCases } from "./olp-sdk-dataservice-api-testCases"; import { OlpSdkAuthenticationTestCases } from "./olp-sdk-authentication-testCases"; import { OlpSdkDataserviceReadTestCases } from "./olp-sdk-dataservice-read-testCases"; @@ -26,65 +37,65 @@ const puppeteer = require("puppeteer"); let browser: any; let page: any; -describe("Test generated olp-edge-datastore-api", function() { - before(async function() { - browser = await puppeteer.launch({ - args: ["no-sandbox", "disable-setuid-sandbox"] +describe("Test generated olp-edge-datastore-api", function () { + beforeAll(async function () { + browser = await puppeteer.launch({ + args: ["--no-sandbox", "--disable-setuid-sandbox"] + }); + page = await browser.newPage(); + await page.goto("http://localhost:8080", { waitUntil: "networkidle2" }); + await page.addScriptTag({ + path: "@here/olp-sdk-dataservice-api/bundle.umd.min.js" + }); }); - page = await browser.newPage(); - await page.goto("http://localhost:8080", { waitUntil: "networkidle2" }); - await page.addScriptTag({ - path: "@here/olp-sdk-dataservice-api/bundle.umd.min.js" - }); - }); - after(async function() { - await browser.close(); - }); + afterAll(async function () { + await browser.close(); + }); - OlpSdkDataserviceApiTestCases.forEach(testCase => { - it(testCase.it, testCase.callback); - }); + OlpSdkDataserviceApiTestCases.forEach((testCase) => { + it(testCase.it, testCase.callback); + }); }); -describe("Test generated olp-edge-datastore-read", function() { - before(async function() { - browser = await puppeteer.launch({ - args: ["no-sandbox", "disable-setuid-sandbox"] +describe("Test generated olp-edge-datastore-read", function () { + beforeAll(async function () { + browser = await puppeteer.launch({ + args: ["--no-sandbox", "--disable-setuid-sandbox"] + }); + page = await browser.newPage(); + await page.addScriptTag({ + path: "@here/olp-sdk-dataservice-read/bundle.umd.min.js" + }); + await page.goto("http://localhost:8080", { waitUntil: "networkidle2" }); }); - page = await browser.newPage(); - await page.addScriptTag({ - path: "@here/olp-sdk-dataservice-read/bundle.umd.min.js" - }); - await page.goto("http://localhost:8080", { waitUntil: "networkidle2" }); - }); - after(async function() { - await browser.close(); - }); + afterAll(async function () { + await browser.close(); + }); - OlpSdkDataserviceReadTestCases.forEach(testCase => { - it(testCase.it, testCase.callback); - }); + OlpSdkDataserviceReadTestCases.forEach((testCase) => { + it(testCase.it, testCase.callback); + }); }); -describe("Test generated olp-sdk-authentication", function() { - before(async function() { - browser = await puppeteer.launch({ - args: ["no-sandbox", "disable-setuid-sandbox"] - }); - page = await browser.newPage(); - await page.addScriptTag({ - path: "@here/olp-sdk-authentication/bundle.umd.min.js" +describe("Test generated olp-sdk-authentication", function () { + beforeAll(async function () { + browser = await puppeteer.launch({ + args: ["--no-sandbox", "--disable-setuid-sandbox"] + }); + page = await browser.newPage(); + await page.addScriptTag({ + path: "@here/olp-sdk-authentication/bundle.umd.min.js" + }); + await page.goto("http://localhost:8080", { waitUntil: "networkidle2" }); }); - await page.goto("http://localhost:8080", { waitUntil: "networkidle2" }); - }); - after(async function() { - await browser.close(); - }); + afterAll(async function () { + await browser.close(); + }); - OlpSdkAuthenticationTestCases.forEach(testCase => { - it(testCase.it, testCase.callback); - }); + OlpSdkAuthenticationTestCases.forEach((testCase) => { + it(testCase.it, testCase.callback); + }); }); diff --git a/tests/integration/bundles/umd/olp-sdk-published.test.ts b/tests/integration/bundles/umd/olp-sdk-published.test.ts index fd43f325..414d26c2 100644 --- a/tests/integration/bundles/umd/olp-sdk-published.test.ts +++ b/tests/integration/bundles/umd/olp-sdk-published.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,17 @@ * License-Filename: LICENSE */ +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { OlpSdkDataserviceApiTestCases } from "./olp-sdk-dataservice-api-testCases"; import { OlpSdkAuthenticationTestCases } from "./olp-sdk-authentication-testCases"; import { OlpSdkDataserviceReadTestCases } from "./olp-sdk-dataservice-read-testCases"; @@ -26,64 +37,64 @@ const puppeteer = require("puppeteer"); let browser: any; let page: any; -describe("Test published olp-edge-datastore-api", async function() { - before(async function() { - browser = await puppeteer.launch({ - args: ["no-sandbox", "disable-setuid-sandbox"] +describe("Test published olp-edge-datastore-api", async function () { + beforeAll(async function () { + browser = await puppeteer.launch({ + args: ["--no-sandbox", "--disable-setuid-sandbox"] + }); + page = await browser.newPage(); + await page.addScriptTag({ + url: "https://unpkg.com/@here/olp-sdk-dataservice-api/bundle.umd.min.js" + }); }); - page = await browser.newPage(); - await page.addScriptTag({ - url: "https://unpkg.com/@here/olp-sdk-dataservice-api/bundle.umd.min.js" - }); - }); - after(async function() { - await browser.close(); - }); + afterAll(async function () { + await browser.close(); + }); - OlpSdkDataserviceApiTestCases.forEach(testCase => { - it(testCase.it, testCase.callback); - }); + OlpSdkDataserviceApiTestCases.forEach((testCase) => { + it(testCase.it, testCase.callback); + }); }); -describe("Test published olp-edge-datastore-read", function() { - before(async function() { - browser = await puppeteer.launch({ - args: ["no-sandbox", "disable-setuid-sandbox"] +describe("Test published olp-edge-datastore-read", function () { + beforeAll(async function () { + browser = await puppeteer.launch({ + args: ["--no-sandbox", "--disable-setuid-sandbox"] + }); + page = await browser.newPage(); + await page.addScriptTag({ + url: "https://unpkg.com/@here/olp-sdk-dataservice-read/bundle.umd.min.js" + }); + await page.goto("http://localhost:8080", { waitUntil: "networkidle2" }); }); - page = await browser.newPage(); - await page.addScriptTag({ - url: "https://unpkg.com/@here/olp-sdk-dataservice-read/bundle.umd.min.js" - }); - await page.goto("http://localhost:8080", { waitUntil: "networkidle2" }); - }); - after(async function() { - await browser.close(); - }); + afterAll(async function () { + await browser.close(); + }); - OlpSdkDataserviceReadTestCases.forEach(testCase => { - it(testCase.it, testCase.callback); - }); + OlpSdkDataserviceReadTestCases.forEach((testCase) => { + it(testCase.it, testCase.callback); + }); }); -describe("Test published olp-sdk-authentication", function() { - before(async function() { - browser = await puppeteer.launch({ - args: ["no-sandbox", "disable-setuid-sandbox"] - }); - page = await browser.newPage(); - await page.addScriptTag({ - url: "https://unpkg.com/@here/olp-sdk-authentication/bundle.umd.min.js" +describe("Test published olp-sdk-authentication", function () { + beforeAll(async function () { + browser = await puppeteer.launch({ + args: ["--no-sandbox", "--disable-setuid-sandbox"] + }); + page = await browser.newPage(); + await page.addScriptTag({ + url: "https://unpkg.com/@here/olp-sdk-authentication/bundle.umd.min.js" + }); + await page.goto("http://localhost:8080", { waitUntil: "networkidle2" }); }); - await page.goto("http://localhost:8080", { waitUntil: "networkidle2" }); - }); - after(async function() { - await browser.close(); - }); + afterAll(async function () { + await browser.close(); + }); - OlpSdkAuthenticationTestCases.forEach(testCase => { - it(testCase.it, testCase.callback); - }); + OlpSdkAuthenticationTestCases.forEach((testCase) => { + it(testCase.it, testCase.callback); + }); }); diff --git a/tests/integration/mocha.opts b/tests/integration/mocha.opts deleted file mode 100644 index 2b282678..00000000 --- a/tests/integration/mocha.opts +++ /dev/null @@ -1,8 +0,0 @@ ---require ts-node/register ---require source-map-support/register ---full-trace ---bail ---check-leaks ---reporter xunit ---reporter-option output=tests/integration/xunit.xml -tests/integration/olp-sdk-*/*.test.ts diff --git a/tests/integration/olp-sdk-dataservice-read/ArtifactClient.test.ts b/tests/integration/olp-sdk-dataservice-read/ArtifactClient.test.ts index c4558c64..b2a9287c 100644 --- a/tests/integration/olp-sdk-dataservice-read/ArtifactClient.test.ts +++ b/tests/integration/olp-sdk-dataservice-read/ArtifactClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,276 +17,285 @@ * License-Filename: LICENSE */ -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - ArtifactClient, - SchemaRequest, - SchemaDetailsRequest + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + ArtifactClient, + SchemaRequest, + SchemaDetailsRequest } from "@here/olp-sdk-dataservice-read"; import { FetchMock } from "../FetchMock"; import * as core from "@here/olp-sdk-core"; -chai.use(sinonChai); +describe("ArtifactClient", function () { + let fetchMock: FetchMock; + let fetchStub: any; + let artifactClient: ArtifactClient; + let settings: core.OlpClientSettings; + + beforeAll(function () {}); -const assert = chai.assert; -const expect = chai.expect; + afterEach(function () { + vi.restoreAllMocks(); + }); -describe("ArtifactClient", function() { - let fetchMock: FetchMock; - let sandbox: sinon.SinonSandbox; - let fetchStub: sinon.SinonStub; - let artifactClient: ArtifactClient; - let settings: core.OlpClientSettings; + beforeEach(function () { + fetchMock = new FetchMock(); + fetchStub = vi.spyOn(global as any, "fetch"); + fetchStub.mockImplementation(fetchMock.fetch()); + + // Setup Artifact Client with new OlpClientSettings. + settings = new core.OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + artifactClient = new ArtifactClient(settings); + }); - before(function() { - sandbox = sinon.createSandbox(); - }); + it("Shoud be initialized with settings", async function () { + assert.isDefined(artifactClient); + expect(artifactClient).to.be.instanceOf(ArtifactClient); + }); - afterEach(function() { - sandbox.restore(); - }); + it("Should fetch the schema details", async function () { + const mockedResponses = new Map(); + const headers = new Headers(); + headers.append("cache-control", "max-age=3600"); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, + new Response( + JSON.stringify([ + { + api: "artifact", + version: "v1", + baseURL: + "https://artifact.data.api.platform.here.com/artifact/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); - beforeEach(function() { - fetchMock = new FetchMock(); - fetchStub = sandbox.stub(global as any, "fetch"); - fetchStub.callsFake(fetchMock.fetch()); + const mockedResponse = { + artifacts: [ + { + artifactId: "test_v1", + created: {}, + groupId: "com.here.rib.schema", + hrn: "hrn:here:artifact::realm:com.here.test.mock:test_v1", + updated: {}, + version: "1.0.0" + } + ], + schema: { + artifactId: "topology-geometry_v1", + created: "2020-01-02T12:28:06.578Z", + groupId: "com.here.rib.schema", + hrn: "hrn:here:artifact::realm:com.here.test.mock:test_v1", + name: "test_v1", + summary: "The schema for road topology.", + updated: "2020-01-02T12:28:06.578Z", + version: "1.0.0" + }, + schemaValidationResults: [ + { + backwardsCompatibility: true, + fileExtension: true, + googleStyle: true, + majorVersionInPackage: true, + module: "string", + packageConsistency: true + } + ], + variants: [ + { + id: "doc", + url: "artifact/hrn:here:artifact:::com.here.schema.fake:100500-v1" + }, + { + id: "doc", + url: "artifact/hrn:here:artifact:::com.here.schema.fake:100500-v2" + } + ] + }; + + // Set the response from Metadata service with the versions info from the catalog. + mockedResponses.set( + `https://artifact.data.api.platform.here.com/artifact/v1/schema/hrn:here:schema:::com.here.schema.mock:test_v2:2.38.0`, + new Response(JSON.stringify(mockedResponse), { headers }) + ); - // Setup Artifact Client with new OlpClientSettings. - settings = new core.OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - artifactClient = new ArtifactClient(settings); - }); - - it("Shoud be initialized with settings", async function() { - assert.isDefined(artifactClient); - expect(artifactClient).to.be.instanceOf(ArtifactClient); - }); - - it("Should fetch the schema details", async function() { - const mockedResponses = new Map(); - const headers = new Headers(); - headers.append("cache-control", "max-age=3600"); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, - new Response( - JSON.stringify([ - { - api: "artifact", - version: "v1", - baseURL: "https://artifact.data.api.platform.here.com/artifact/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedResponse = { - artifacts: [ - { - artifactId: "test_v1", - created: {}, - groupId: "com.here.rib.schema", - hrn: "hrn:here:artifact::realm:com.here.test.mock:test_v1", - updated: {}, - version: "1.0.0" - } - ], - schema: { - artifactId: "topology-geometry_v1", - created: "2020-01-02T12:28:06.578Z", - groupId: "com.here.rib.schema", - hrn: "hrn:here:artifact::realm:com.here.test.mock:test_v1", - name: "test_v1", - summary: "The schema for road topology.", - updated: "2020-01-02T12:28:06.578Z", - version: "1.0.0" - }, - schemaValidationResults: [ - { - backwardsCompatibility: true, - fileExtension: true, - googleStyle: true, - majorVersionInPackage: true, - module: "string", - packageConsistency: true - } - ], - variants: [ - { - id: "doc", - url: "artifact/hrn:here:artifact:::com.here.schema.fake:100500-v1" - }, - { - id: "doc", - url: "artifact/hrn:here:artifact:::com.here.schema.fake:100500-v2" - } - ] - }; - - // Set the response from Metadata service with the versions info from the catalog. - mockedResponses.set( - `https://artifact.data.api.platform.here.com/artifact/v1/schema/hrn:here:schema:::com.here.schema.mock:test_v2:2.38.0`, - new Response(JSON.stringify(mockedResponse), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const request = new SchemaDetailsRequest().withSchema( - core.HRN.fromString( - "hrn:here:schema:::com.here.schema.mock:test_v2:2.38.0" - ) - ); - - const response = await artifactClient.getSchemaDetails(request); - - assert.isDefined(response); - expect(fetchStub.callCount).to.be.equal(2); - }); - - it("Should getSchemaDetails() handle errors", async function() { - const request = new SchemaDetailsRequest().withBillingTag("billing-tag"); - - const response = await artifactClient - .getSchemaDetails(request) - .catch(error => { - expect(error.message).equal( - "Please provide the schema HRN by schemaDetailsRequest.withSchema()" + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const request = new SchemaDetailsRequest().withSchema( + core.HRN.fromString( + "hrn:here:schema:::com.here.schema.mock:test_v2:2.38.0" + ) ); - }); - }); - it("Should getSchema() handle errors", async function() { - const request = new SchemaRequest(); + const response = await artifactClient.getSchemaDetails(request); + + assert.isDefined(response); + expect(fetchStub.mock.calls.length).to.be.equal(2); + }); + + it("Should getSchemaDetails() handle errors", async function () { + const request = new SchemaDetailsRequest().withBillingTag( + "billing-tag" + ); - const response = await artifactClient.getSchema(request).catch(error => { - expect(error.message).equal( - "Please provide the schema variant by schemaRequest.withVariant()" - ); + const response = await artifactClient + .getSchemaDetails(request) + .catch((error) => { + expect(error.message).equal( + "Please provide the schema HRN by schemaDetailsRequest.withSchema()" + ); + }); }); - }); - - it("Should fetch file of the schema", async function() { - const mockedResponses = new Map(); - const headers = new Headers(); - headers.append("cache-control", "max-age=3600"); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, - new Response( - JSON.stringify([ - { - api: "artifact", - version: "v1", - baseURL: "https://artifact.data.api.platform.here.com/artifact/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedResponse = Buffer.alloc(42); - const mockedResponse2 = Buffer.alloc(50); - - // Set the response from Metadata service with the versions info from the catalog. - mockedResponses.set( - `https://artifact.data.api.platform.here.com/artifact/v1/artifact/hrn:here:artifact:::com.here.schema.fake:100500-v2`, - new Response(mockedResponse, { headers }) - ); - - mockedResponses.set( - `https://artifact.data.api.platform.here.com/artifact/v1/artifact/hrn:here:artifact:::com.here.schema.fake:100702-v2`, - new Response(mockedResponse2, { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const request = new SchemaRequest().withVariant({ - id: "doc", - url: "artifact/hrn:here:artifact:::com.here.schema.fake:100500-v2" + + it("Should getSchema() handle errors", async function () { + const request = new SchemaRequest(); + + const response = await artifactClient + .getSchema(request) + .catch((error) => { + expect(error.message).equal( + "Please provide the schema variant by schemaRequest.withVariant()" + ); + }); }); - const request2 = new SchemaRequest().withVariant({ - id: "doc", - url: "artifact/hrn:here:artifact:::com.here.schema.fake:100702-v2" + it("Should fetch file of the schema", async function () { + const mockedResponses = new Map(); + const headers = new Headers(); + headers.append("cache-control", "max-age=3600"); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, + new Response( + JSON.stringify([ + { + api: "artifact", + version: "v1", + baseURL: + "https://artifact.data.api.platform.here.com/artifact/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedResponse = Buffer.alloc(42); + const mockedResponse2 = Buffer.alloc(50); + + // Set the response from Metadata service with the versions info from the catalog. + mockedResponses.set( + `https://artifact.data.api.platform.here.com/artifact/v1/artifact/hrn:here:artifact:::com.here.schema.fake:100500-v2`, + new Response(mockedResponse, { headers }) + ); + + mockedResponses.set( + `https://artifact.data.api.platform.here.com/artifact/v1/artifact/hrn:here:artifact:::com.here.schema.fake:100702-v2`, + new Response(mockedResponse2, { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const request = new SchemaRequest().withVariant({ + id: "doc", + url: "artifact/hrn:here:artifact:::com.here.schema.fake:100500-v2" + }); + + const request2 = new SchemaRequest().withVariant({ + id: "doc", + url: "artifact/hrn:here:artifact:::com.here.schema.fake:100702-v2" + }); + + const response = await artifactClient.getSchema(request); + + const response2 = await artifactClient.getSchema(request2); + + assert.isDefined(response); + expect(response.byteLength).to.be.equal(42); + assert.isDefined(response2); + expect(response2.byteLength).to.be.equal(50); + expect(fetchStub.mock.calls.length).to.be.equal(3); }); - const response = await artifactClient.getSchema(request); - - const response2 = await artifactClient.getSchema(request2); - - assert.isDefined(response); - expect(response.byteLength).to.be.equal(42); - assert.isDefined(response2); - expect(response2.byteLength).to.be.equal(50); - expect(fetchStub.callCount).to.be.equal(3); - }); - - it("Should getSchema() handle 400 error", async function() { - const mockedResponses = new Map(); - const headers = new Headers(); - headers.append("cache-control", "max-age=3600"); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, - new Response( - JSON.stringify([ - { - api: "artifact", - version: "v1", - baseURL: "https://artifact.data.api.platform.here.com/artifact/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedResponse = Buffer.alloc(42); - - // Set the response from Metadata service with the versions info from the catalog. - mockedResponses.set( - `https://artifact.data.api.platform.here.com/artifact/v1/artifact/hrn:here:artifact:::com.here.schema.fake:100500-v2`, - { status: 400, statusText: "Bad request" } - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const request = new SchemaRequest() - .withVariant({ - id: "doc", - url: "artifact/hrn:here:artifact:::com.here.schema.fake:100500-v2" - }) - .withBillingTag("billing-tag"); - - const response = await artifactClient.getSchema(request).catch(error => { - expect(error.message).equal( - "Artifact Service error: HTTP 400: Bad request" - ); + it("Should getSchema() handle 400 error", async function () { + const mockedResponses = new Map(); + const headers = new Headers(); + headers.append("cache-control", "max-age=3600"); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, + new Response( + JSON.stringify([ + { + api: "artifact", + version: "v1", + baseURL: + "https://artifact.data.api.platform.here.com/artifact/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedResponse = Buffer.alloc(42); + + // Set the response from Metadata service with the versions info from the catalog. + mockedResponses.set( + `https://artifact.data.api.platform.here.com/artifact/v1/artifact/hrn:here:artifact:::com.here.schema.fake:100500-v2`, + { status: 400, statusText: "Bad request" } + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const request = new SchemaRequest() + .withVariant({ + id: "doc", + url: "artifact/hrn:here:artifact:::com.here.schema.fake:100500-v2" + }) + .withBillingTag("billing-tag"); + + const response = await artifactClient + .getSchema(request) + .catch((error) => { + expect(error.message).equal( + "Artifact Service error: HTTP 400: Bad request" + ); + }); }); - }); }); diff --git a/tests/integration/olp-sdk-dataservice-read/CatalogClient.test.ts b/tests/integration/olp-sdk-dataservice-read/CatalogClient.test.ts index 3461249f..8ddf5aa6 100644 --- a/tests/integration/olp-sdk-dataservice-read/CatalogClient.test.ts +++ b/tests/integration/olp-sdk-dataservice-read/CatalogClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,569 +17,582 @@ * License-Filename: LICENSE */ -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - CatalogVersionRequest, - CatalogClient, - CatalogRequest, - LayerVersionsRequest + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + CatalogVersionRequest, + CatalogClient, + CatalogRequest, + LayerVersionsRequest } from "@here/olp-sdk-dataservice-read"; import { FetchMock } from "../FetchMock"; import * as core from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("CatalogClient", function() { - let fetchMock: FetchMock; - let sandbox: sinon.SinonSandbox; - let fetchStub: sinon.SinonStub; - let catalogClient: CatalogClient; - let settings: core.OlpClientSettings; - const headers = new Headers(); - headers.append("cache-control", "max-age=3600"); - - before(function() { - sandbox = sinon.createSandbox(); - }); - - afterEach(function() { - sandbox.restore(); - }); - - beforeEach(function() { - fetchMock = new FetchMock(); - fetchStub = sandbox.stub(global as any, "fetch"); - fetchStub.callsFake(fetchMock.fetch()); - - // Setup Catalog Client with new OlpClientSettings. - settings = new core.OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") +describe("CatalogClient", function () { + let fetchMock: FetchMock; + let fetchStub: any; + let catalogClient: CatalogClient; + let settings: core.OlpClientSettings; + const headers = new Headers(); + headers.append("cache-control", "max-age=3600"); + + beforeAll(function () {}); + + afterEach(function () { + vi.restoreAllMocks(); + }); + + beforeEach(function () { + fetchMock = new FetchMock(); + fetchStub = vi.spyOn(global as any, "fetch"); + fetchStub.mockImplementation(fetchMock.fetch()); + + // Setup Catalog Client with new OlpClientSettings. + settings = new core.OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + catalogClient = new CatalogClient( + core.HRN.fromString("hrn:here:data:::test-hrn"), + settings + ); + }); + + it("Shoud be initialized with settings", async function () { + assert.isDefined(catalogClient); + expect(catalogClient).to.be.instanceOf(CatalogClient); + }); + + it("Should fetch the information about about specific catalog versions", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedVersions = { + versions: [ + { + dependencies: [ + { + direct: false, + hrn: "hrn:here:data:::my-catalog", + version: 23 + } + ], + partitionCounts: { + additionalProp1: 0, + additionalProp2: 0, + additionalProp3: 0 + }, + timestamp: "1516397474657", + version: 2 + }, + { + dependencies: [ + { + direct: false, + hrn: "hrn:here:data:::my-catalog", + version: 23 + } + ], + partitionCounts: { + additionalProp1: 0, + additionalProp2: 0, + additionalProp3: 0 + }, + timestamp: "1516397474657", + version: 3 + }, + { + dependencies: [ + { + direct: false, + hrn: "hrn:here:data:::my-catalog", + version: 23 + } + ], + partitionCounts: { + additionalProp1: 0, + additionalProp2: 0, + additionalProp3: 0 + }, + timestamp: "1516397474657", + version: 4 + } + ] + }; + + // Set the response from Metadata service with the versions info from the catalog. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions?startVersion=2&endVersion=4`, + new Response(JSON.stringify(mockedVersions), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const request = new CatalogVersionRequest() + .withStartVersion(2) + .withEndVersion(4); + + let versionsResponse = await catalogClient.getVersions(request); + + assert.isDefined(versionsResponse); + + expect(versionsResponse.versions[0].version).to.be.equal(2); + expect(versionsResponse.versions[1].version).to.be.equal(3); + expect(versionsResponse.versions[2].version).to.be.equal(4); + + expect(fetchStub.mock.calls.length).to.be.equal(2); + }); + + it("Should fetch the information about all catalog versions", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedVersions = { + versions: [ + { + dependencies: [ + { + direct: false, + hrn: "hrn:here:data:::my-catalog", + version: 23 + } + ], + partitionCounts: { + additionalProp1: 0, + additionalProp2: 0, + additionalProp3: 0 + }, + timestamp: "1516397474657", + version: 1 + }, + { + dependencies: [ + { + direct: false, + hrn: "hrn:here:data:::my-catalog", + version: 23 + } + ], + partitionCounts: { + additionalProp1: 0, + additionalProp2: 0, + additionalProp3: 0 + }, + timestamp: "1516397474657", + version: 2 + }, + { + dependencies: [ + { + direct: false, + hrn: "hrn:here:data:::my-catalog", + version: 23 + } + ], + partitionCounts: { + additionalProp1: 0, + additionalProp2: 0, + additionalProp3: 0 + }, + timestamp: "1516397474657", + version: 3 + }, + { + dependencies: [ + { + direct: false, + hrn: "hrn:here:data:::my-catalog", + version: 23 + } + ], + partitionCounts: { + additionalProp1: 0, + additionalProp2: 0, + additionalProp3: 0 + }, + timestamp: "1516397474657", + version: 4 + }, + { + dependencies: [ + { + direct: false, + hrn: "hrn:here:data:::my-catalog", + version: 23 + } + ], + partitionCounts: { + additionalProp1: 0, + additionalProp2: 0, + additionalProp3: 0 + }, + timestamp: "1516397474657", + version: 50 + } + ] + }; + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, + new Response(JSON.stringify(mockedVersions), { headers }) + ); + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions?startVersion=-1`, + new Response(JSON.stringify(mockedVersions), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const request = new CatalogVersionRequest(); + + let versionsResponse = await catalogClient.getVersions(request); + + assert.isDefined(versionsResponse); + + expect(versionsResponse.versions[0].version).to.be.equal(1); + expect(versionsResponse.versions[1].version).to.be.equal(2); + expect(versionsResponse.versions[2].version).to.be.equal(3); + expect(versionsResponse.versions[3].version).to.be.equal(4); + expect(versionsResponse.versions[4].version).to.be.equal(50); + + expect(fetchStub.mock.calls.length).to.be.equal(3); + }); + + it("Should fetch the configuration of all catalogs", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, + new Response( + JSON.stringify([ + { + api: "config", + version: "v1", + baseURL: + "https://config.data.api.platform.here.com/config/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedCatalogs = { + id: "here-internal-test", + hrn: "hrn:here-dev:data:::here-internal-test", + name: "here-internal-test", + summary: "Internal test for here", + description: "Used for internal testing on the staging olp.", + tags: [], + created: "2018-07-13T20:50:08.425Z", + replication: {}, + layers: [ + { + id: "mocked-layed-id", + hrn: "hrn:here-dev:data:::here-internal-test:hype-test-prefetch", + partitioning: { + tileLevels: [], + scheme: "heretile" + }, + contentType: "application/x-protobuf", + layerType: "versioned" + } + ], + version: 3 + }; + + // Set the response from Metadata service with the versions info from the catalog. + mockedResponses.set( + `https://config.data.api.platform.here.com/config/v1/catalogs/hrn:here:data:::test-hrn`, + new Response(JSON.stringify(mockedCatalogs), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const request = new CatalogRequest(); + + let response = await catalogClient.getCatalog(request); + + assert.isDefined(response); + + expect(fetchStub.mock.calls.length).to.be.equal(2); + }); + + it("Should read the full catalog configuration for the requested catalog", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, + new Response( + JSON.stringify([ + { + api: "config", + version: "v1", + baseURL: + "https://config.data.api.platform.here.com/config/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedCatalog = { + id: "here-internal-test", + hrn: "hrn:here-dev:data:::here-internal-test", + name: "here-internal-test", + summary: "Internal test for here", + description: "Catalog Description", + tags: [], + created: "2018-07-13T20:50:08.425Z", + replication: {}, + layers: [ + { + id: "mocked-layed-id", + hrn: "hrn:here-dev:data:::here-internal-test:hype-test-prefetch", + partitioning: { + tileLevels: [], + scheme: "heretile" + }, + contentType: "application/x-protobuf", + layerType: "versioned" + } + ], + version: 3 + }; + + // Set the response from Metadata service with the versions info from the catalog. + mockedResponses.set( + `https://config.data.api.platform.here.com/config/v1/catalogs/hrn:here:data:::test-hrn?billingTag=billingTag`, + new Response(JSON.stringify(mockedCatalog), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const catalogRequest = new CatalogRequest().withBillingTag( + "billingTag" + ); + let catalogConfig = await catalogClient.getCatalog(catalogRequest); + + assert.isDefined(catalogConfig); + expect(catalogConfig.id).to.be.equal("here-internal-test"); + expect(catalogConfig.hrn).to.be.equal( + "hrn:here-dev:data:::here-internal-test" + ); + expect(catalogConfig.name).to.be.equal("here-internal-test"); + expect(catalogConfig.summary).to.be.equal("Internal test for here"); + expect(catalogConfig.description).to.be.equal("Catalog Description"); + expect(catalogConfig.created).to.be.equal("2018-07-13T20:50:08.425Z"); + expect(catalogConfig.version).to.be.equal(3); + expect(catalogConfig.layers[0].id).to.be.equal("mocked-layed-id"); + expect(catalogConfig.layers[0].hrn).to.be.equal( + "hrn:here-dev:data:::here-internal-test:hype-test-prefetch" + ); + expect(catalogConfig.layers[0].layerType).to.be.equal("versioned"); + assert.isDefined(catalogConfig.tags); + assert.isDefined(catalogConfig.replication); + + expect(fetchStub.mock.calls.length).to.be.equal(2); + }); + + it("Should getEarliestVersion() return version", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + mockedResponses.set( + "https://metadata.data.api.platform.here.com/metadata/v1/versions/minimum", + new Response(JSON.stringify({ version: 42 })) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const request = new CatalogVersionRequest(); + + let version = await catalogClient.getEarliestVersion(request); + + assert.isDefined(version); + expect(version).to.be.equal(42); + }); + + it("Should getLayerVersions() with latest version return layer version", async function () { + const mockedResponses = new Map(); + const mockedResponse = { + version: 42, + layerVersions: [1, 2, 3] + }; + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + mockedResponses.set( + "https://metadata.data.api.platform.here.com/metadata/v1/layerVersions?version=42", + new Response(JSON.stringify(mockedResponse)) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const request = new LayerVersionsRequest().withVersion(42); + + let versions = await catalogClient.getLayerVersions(request); + + assert.isDefined(versions); + expect(versions.length).to.be.equal( + mockedResponse.layerVersions.length + ); + }); + + it("Should getLayerVersions() without latest version return layer version", async function () { + const mockedResponses = new Map(); + const mockedResponse = { + version: 42, + layerVersions: [1, 2, 3] + }; + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + mockedResponses.set( + "https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1&billingTag=billingTag", + new Response(JSON.stringify({ version: 42 })) + ); + + mockedResponses.set( + "https://metadata.data.api.platform.here.com/metadata/v1/layerVersions?version=42&billingTag=billingTag", + new Response(JSON.stringify(mockedResponse)) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const request = new LayerVersionsRequest().withBillingTag("billingTag"); + + let versions = await catalogClient.getLayerVersions(request); + + assert.isDefined(versions); + expect(versions.length).to.be.equal( + mockedResponse.layerVersions.length + ); }); - catalogClient = new CatalogClient( - core.HRN.fromString("hrn:here:data:::test-hrn"), - settings - ); - }); - - it("Shoud be initialized with settings", async function() { - assert.isDefined(catalogClient); - expect(catalogClient).to.be.instanceOf(CatalogClient); - }); - - it("Should fetch the information about about specific catalog versions", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedVersions = { - versions: [ - { - dependencies: [ - { - direct: false, - hrn: "hrn:here:data:::my-catalog", - version: 23 - } - ], - partitionCounts: { - additionalProp1: 0, - additionalProp2: 0, - additionalProp3: 0 - }, - timestamp: "1516397474657", - version: 2 - }, - { - dependencies: [ - { - direct: false, - hrn: "hrn:here:data:::my-catalog", - version: 23 - } - ], - partitionCounts: { - additionalProp1: 0, - additionalProp2: 0, - additionalProp3: 0 - }, - timestamp: "1516397474657", - version: 3 - }, - { - dependencies: [ - { - direct: false, - hrn: "hrn:here:data:::my-catalog", - version: 23 - } - ], - partitionCounts: { - additionalProp1: 0, - additionalProp2: 0, - additionalProp3: 0 - }, - timestamp: "1516397474657", - version: 4 - } - ] - }; - - // Set the response from Metadata service with the versions info from the catalog. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions?startVersion=2&endVersion=4`, - new Response(JSON.stringify(mockedVersions), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const request = new CatalogVersionRequest() - .withStartVersion(2) - .withEndVersion(4); - - let versionsResponse = await catalogClient.getVersions(request); - - assert.isDefined(versionsResponse); - - expect(versionsResponse.versions[0].version).to.be.equal(2); - expect(versionsResponse.versions[1].version).to.be.equal(3); - expect(versionsResponse.versions[2].version).to.be.equal(4); - - expect(fetchStub.callCount).to.be.equal(2); - }); - - it("Should fetch the information about all catalog versions", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedVersions = { - versions: [ - { - dependencies: [ - { - direct: false, - hrn: "hrn:here:data:::my-catalog", - version: 23 - } - ], - partitionCounts: { - additionalProp1: 0, - additionalProp2: 0, - additionalProp3: 0 - }, - timestamp: "1516397474657", - version: 1 - }, - { - dependencies: [ - { - direct: false, - hrn: "hrn:here:data:::my-catalog", - version: 23 - } - ], - partitionCounts: { - additionalProp1: 0, - additionalProp2: 0, - additionalProp3: 0 - }, - timestamp: "1516397474657", - version: 2 - }, - { - dependencies: [ - { - direct: false, - hrn: "hrn:here:data:::my-catalog", - version: 23 - } - ], - partitionCounts: { - additionalProp1: 0, - additionalProp2: 0, - additionalProp3: 0 - }, - timestamp: "1516397474657", - version: 3 - }, - { - dependencies: [ - { - direct: false, - hrn: "hrn:here:data:::my-catalog", - version: 23 - } - ], - partitionCounts: { - additionalProp1: 0, - additionalProp2: 0, - additionalProp3: 0 - }, - timestamp: "1516397474657", - version: 4 - }, - { - dependencies: [ - { - direct: false, - hrn: "hrn:here:data:::my-catalog", - version: 23 - } - ], - partitionCounts: { - additionalProp1: 0, - additionalProp2: 0, - additionalProp3: 0 - }, - timestamp: "1516397474657", - version: 50 - } - ] - }; - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, - new Response(JSON.stringify(mockedVersions), { headers }) - ); - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions?startVersion=-1`, - new Response(JSON.stringify(mockedVersions), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const request = new CatalogVersionRequest(); - - let versionsResponse = await catalogClient.getVersions(request); - - assert.isDefined(versionsResponse); - - expect(versionsResponse.versions[0].version).to.be.equal(1); - expect(versionsResponse.versions[1].version).to.be.equal(2); - expect(versionsResponse.versions[2].version).to.be.equal(3); - expect(versionsResponse.versions[3].version).to.be.equal(4); - expect(versionsResponse.versions[4].version).to.be.equal(50); - - expect(fetchStub.callCount).to.be.equal(3); - }); - - it("Should fetch the configuration of all catalogs", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, - new Response( - JSON.stringify([ - { - api: "config", - version: "v1", - baseURL: "https://config.data.api.platform.here.com/config/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedCatalogs = { - id: "here-internal-test", - hrn: "hrn:here-dev:data:::here-internal-test", - name: "here-internal-test", - summary: "Internal test for here", - description: "Used for internal testing on the staging olp.", - tags: [], - created: "2018-07-13T20:50:08.425Z", - replication: {}, - layers: [ - { - id: "mocked-layed-id", - hrn: "hrn:here-dev:data:::here-internal-test:hype-test-prefetch", - partitioning: { - tileLevels: [], - scheme: "heretile" - }, - contentType: "application/x-protobuf", - layerType: "versioned" - } - ], - version: 3 - }; - - // Set the response from Metadata service with the versions info from the catalog. - mockedResponses.set( - `https://config.data.api.platform.here.com/config/v1/catalogs/hrn:here:data:::test-hrn`, - new Response(JSON.stringify(mockedCatalogs), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const request = new CatalogRequest(); - - let response = await catalogClient.getCatalog(request); - - assert.isDefined(response); - - expect(fetchStub.callCount).to.be.equal(2); - }); - - it("Should read the full catalog configuration for the requested catalog", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, - new Response( - JSON.stringify([ - { - api: "config", - version: "v1", - baseURL: "https://config.data.api.platform.here.com/config/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedCatalog = { - id: "here-internal-test", - hrn: "hrn:here-dev:data:::here-internal-test", - name: "here-internal-test", - summary: "Internal test for here", - description: "Catalog Description", - tags: [], - created: "2018-07-13T20:50:08.425Z", - replication: {}, - layers: [ - { - id: "mocked-layed-id", - hrn: "hrn:here-dev:data:::here-internal-test:hype-test-prefetch", - partitioning: { - tileLevels: [], - scheme: "heretile" - }, - contentType: "application/x-protobuf", - layerType: "versioned" - } - ], - version: 3 - }; - - // Set the response from Metadata service with the versions info from the catalog. - mockedResponses.set( - `https://config.data.api.platform.here.com/config/v1/catalogs/hrn:here:data:::test-hrn?billingTag=billingTag`, - new Response(JSON.stringify(mockedCatalog), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const catalogRequest = new CatalogRequest().withBillingTag("billingTag"); - let catalogConfig = await catalogClient.getCatalog(catalogRequest); - - assert.isDefined(catalogConfig); - expect(catalogConfig.id).to.be.equal("here-internal-test"); - expect(catalogConfig.hrn).to.be.equal( - "hrn:here-dev:data:::here-internal-test" - ); - expect(catalogConfig.name).to.be.equal("here-internal-test"); - expect(catalogConfig.summary).to.be.equal("Internal test for here"); - expect(catalogConfig.description).to.be.equal("Catalog Description"); - expect(catalogConfig.created).to.be.equal("2018-07-13T20:50:08.425Z"); - expect(catalogConfig.version).to.be.equal(3); - expect(catalogConfig.layers[0].id).to.be.equal("mocked-layed-id"); - expect(catalogConfig.layers[0].hrn).to.be.equal( - "hrn:here-dev:data:::here-internal-test:hype-test-prefetch" - ); - expect(catalogConfig.layers[0].layerType).to.be.equal("versioned"); - assert.isDefined(catalogConfig.tags); - assert.isDefined(catalogConfig.replication); - - expect(fetchStub.callCount).to.be.equal(2); - }); - - it("Should getEarliestVersion() return version", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - mockedResponses.set( - "https://metadata.data.api.platform.here.com/metadata/v1/versions/minimum", - new Response(JSON.stringify({ version: 42 })) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const request = new CatalogVersionRequest(); - - let version = await catalogClient.getEarliestVersion(request); - - assert.isDefined(version); - expect(version).to.be.equal(42); - }); - - it("Should getLayerVersions() with latest version return layer version", async function() { - const mockedResponses = new Map(); - const mockedResponse = { - version: 42, - layerVersions: [1, 2, 3] - }; - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - mockedResponses.set( - "https://metadata.data.api.platform.here.com/metadata/v1/layerVersions?version=42", - new Response(JSON.stringify(mockedResponse)) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const request = new LayerVersionsRequest().withVersion(42); - - let versions = await catalogClient.getLayerVersions(request); - - assert.isDefined(versions); - expect(versions.length).to.be.equal(mockedResponse.layerVersions.length); - }); - - it("Should getLayerVersions() without latest version return layer version", async function() { - const mockedResponses = new Map(); - const mockedResponse = { - version: 42, - layerVersions: [1, 2, 3] - }; - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - mockedResponses.set( - "https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1&billingTag=billingTag", - new Response(JSON.stringify({ version: 42 })) - ); - - mockedResponses.set( - "https://metadata.data.api.platform.here.com/metadata/v1/layerVersions?version=42&billingTag=billingTag", - new Response(JSON.stringify(mockedResponse)) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const request = new LayerVersionsRequest().withBillingTag("billingTag"); - - let versions = await catalogClient.getLayerVersions(request); - - assert.isDefined(versions); - expect(versions.length).to.be.equal(mockedResponse.layerVersions.length); - }); }); diff --git a/tests/integration/olp-sdk-dataservice-read/ConfigClient.test.ts b/tests/integration/olp-sdk-dataservice-read/ConfigClient.test.ts index e1e27db2..4c8003ee 100644 --- a/tests/integration/olp-sdk-dataservice-read/ConfigClient.test.ts +++ b/tests/integration/olp-sdk-dataservice-read/ConfigClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,140 +17,142 @@ * License-Filename: LICENSE */ -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { ConfigClient, CatalogsRequest } from "@here/olp-sdk-dataservice-read"; import { FetchMock } from "../FetchMock"; import { ConfigApi } from "@here/olp-sdk-dataservice-api"; import { OlpClientSettings } from "@here/olp-sdk-core"; -chai.use(sinonChai); +describe("configClient", function () { + let fetchMock: FetchMock; + let fetchStub: any; + let configClient: ConfigClient; + let settings: OlpClientSettings; -const assert = chai.assert; -const expect = chai.expect; + beforeAll(function () {}); -describe("configClient", function() { - let fetchMock: FetchMock; - let sandbox: sinon.SinonSandbox; - let fetchStub: sinon.SinonStub; - let configClient: ConfigClient; - let settings: OlpClientSettings; - - before(function() { - sandbox = sinon.createSandbox(); - }); - - afterEach(function() { - sandbox.restore(); - }); - - beforeEach(function() { - fetchMock = new FetchMock(); - fetchStub = sandbox.stub(global as any, "fetch"); - fetchStub.callsFake(fetchMock.fetch()); - - // Setup Config Client with new OlpClientSettings. - settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + afterEach(function () { + vi.restoreAllMocks(); }); - configClient = new ConfigClient(settings); - }); - - it("Shoud be initialized with settings", async function() { - assert.isDefined(configClient); - expect(configClient).to.be.instanceOf(ConfigClient); - }); - - it("Should fetch the list of catalogs to which you have access", async function() { - const mockedResponses = new Map(); - - const mockedCatalogsHRN: ConfigApi.CatalogsListResult = { - results: { - items: [ - { hrn: "hrn:::test-hrn" }, - { hrn: "hrn:::test-hrn2" }, - { hrn: "hrn:::test-hrn3" } - ] - } - }; - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, - new Response( - JSON.stringify([ - { - api: "config", - version: "v1", - baseURL: "https://config.data.api.platform.here.com/config/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); - - // Set the response from Metadata service with the versions info from the catalog. - mockedResponses.set( - `https://config.data.api.platform.here.com/config/v1/catalogs?billingTag=billing-tag`, - new Response(JSON.stringify(mockedCatalogsHRN)) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const request = new CatalogsRequest().withBillingTag("billing-tag"); - - const response = await configClient.getCatalogs(request); - - assert.isDefined(response); - expect(fetchStub.callCount).to.be.equal(2); - }); - - it("Should fetch the list of catalogs to which you have access filtered by hrn", async function() { - const mockedResponses = new Map(); - - const mockedCatalogsFilteredByHRN: ConfigApi.CatalogsListResult = { - results: { items: [{ hrn: "hrn:::test-hrn" }] } - }; - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, - new Response( - JSON.stringify([ - { - api: "config", - version: "v1", - baseURL: "https://config.data.api.platform.here.com/config/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); - // Set the response from Metadata service with the versions info from the catalog. - mockedResponses.set( - `https://config.data.api.platform.here.com/config/v1/catalogs?verbose=true&schemaHrn=hrn%3A%3A%3Atest-hrn`, - new Response(JSON.stringify(mockedCatalogsFilteredByHRN)) - ); + beforeEach(function () { + fetchMock = new FetchMock(); + fetchStub = vi.spyOn(global as any, "fetch"); + fetchStub.mockImplementation(fetchMock.fetch()); + + // Setup Config Client with new OlpClientSettings. + settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + configClient = new ConfigClient(settings); + }); - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); + it("Shoud be initialized with settings", async function () { + assert.isDefined(configClient); + expect(configClient).to.be.instanceOf(ConfigClient); + }); - const request = new CatalogsRequest().withSchema("hrn:::test-hrn"); + it("Should fetch the list of catalogs to which you have access", async function () { + const mockedResponses = new Map(); - const response = await configClient.getCatalogs(request); + const mockedCatalogsHRN: ConfigApi.CatalogsListResult = { + results: { + items: [ + { hrn: "hrn:::test-hrn" }, + { hrn: "hrn:::test-hrn2" }, + { hrn: "hrn:::test-hrn3" } + ] + } + }; + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, + new Response( + JSON.stringify([ + { + api: "config", + version: "v1", + baseURL: + "https://config.data.api.platform.here.com/config/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); + + // Set the response from Metadata service with the versions info from the catalog. + mockedResponses.set( + `https://config.data.api.platform.here.com/config/v1/catalogs?billingTag=billing-tag`, + new Response(JSON.stringify(mockedCatalogsHRN)) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const request = new CatalogsRequest().withBillingTag("billing-tag"); + + const response = await configClient.getCatalogs(request); + + assert.isDefined(response); + expect(fetchStub.mock.calls.length).to.be.equal(2); + }); - assert.isDefined(response); - expect(fetchStub.callCount).to.be.equal(2); - }); + it("Should fetch the list of catalogs to which you have access filtered by hrn", async function () { + const mockedResponses = new Map(); + + const mockedCatalogsFilteredByHRN: ConfigApi.CatalogsListResult = { + results: { items: [{ hrn: "hrn:::test-hrn" }] } + }; + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/platform/apis`, + new Response( + JSON.stringify([ + { + api: "config", + version: "v1", + baseURL: + "https://config.data.api.platform.here.com/config/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); + + // Set the response from Metadata service with the versions info from the catalog. + mockedResponses.set( + `https://config.data.api.platform.here.com/config/v1/catalogs?verbose=true&schemaHrn=hrn%3A%3A%3Atest-hrn`, + new Response(JSON.stringify(mockedCatalogsFilteredByHRN)) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const request = new CatalogsRequest().withSchema("hrn:::test-hrn"); + + const response = await configClient.getCatalogs(request); + + assert.isDefined(response); + expect(fetchStub.mock.calls.length).to.be.equal(2); + }); }); diff --git a/tests/integration/olp-sdk-dataservice-read/Handling-versions.test.ts b/tests/integration/olp-sdk-dataservice-read/Handling-versions.test.ts index 91db78bc..5fe613a4 100644 --- a/tests/integration/olp-sdk-dataservice-read/Handling-versions.test.ts +++ b/tests/integration/olp-sdk-dataservice-read/Handling-versions.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,847 +17,867 @@ * License-Filename: LICENSE */ -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - PartitionsRequest, - VersionedLayerClient, - QuadKeyPartitionsRequest, - DataRequest, - CatalogClient, - LayerVersionsRequest, - CatalogVersionRequest + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + PartitionsRequest, + VersionedLayerClient, + QuadKeyPartitionsRequest, + DataRequest, + CatalogClient, + LayerVersionsRequest, + CatalogVersionRequest } from "@here/olp-sdk-dataservice-read"; import { FetchMock } from "../FetchMock"; import * as core from "@here/olp-sdk-core"; -chai.use(sinonChai); -const expect = chai.expect; - -describe("Handling versions in the requests classes and clients", function() { - let fetchMock: FetchMock; - let sandbox: sinon.SinonSandbox; - let fetchStub: sinon.SinonStub; - let settings: core.OlpClientSettings; +describe("Handling versions in the requests classes and clients", function () { + let fetchMock: FetchMock; + let fetchStub: any; + let settings: core.OlpClientSettings; - const headers = new Headers(); - headers.append("cache-control", "max-age=3600"); + const headers = new Headers(); + headers.append("cache-control", "max-age=3600"); - before(function() { - sandbox = sinon.createSandbox(); - }); + beforeAll(function () {}); - afterEach(function() { - sandbox.restore(); - }); + afterEach(function () { + vi.restoreAllMocks(); + }); - beforeEach(function() { - fetchMock = new FetchMock(); - fetchStub = sandbox.stub(global as any, "fetch"); - fetchStub.callsFake(fetchMock.fetch()); + beforeEach(function () { + fetchMock = new FetchMock(); + fetchStub = vi.spyOn(global as any, "fetch"); + fetchStub.mockImplementation(fetchMock.fetch()); - // Setup Catalog Client with new OlpClientSettings. - settings = new core.OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - }); - - it("Should use locked version 142 for getPartitions with PartitionsRequest.withPartitionIds([23605706]);", async function() { - const mockedResponses = new Map(); - - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedPartitions = { - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "23605706" - } - ], - next: "/uri/to/next/page" - }; - - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=142`, - new Response(JSON.stringify(mockedPartitions), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const client = new VersionedLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), - layerId: "topology-geometry", - version: 142, - settings + // Setup Catalog Client with new OlpClientSettings. + settings = new core.OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); }); - const rq = new PartitionsRequest().withPartitionIds(["23605706"]); - - await client.getPartitions(rq); - - const callsToApi = fetchStub.getCalls(); - const callToQueryApi = callsToApi[1]; - - expect(callsToApi.length).equals(2); // First to lookup api, second to the Query API. - expect(callToQueryApi.args[0]).equals( - "https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=142&" + - core.SENT_WITH_PARAM - ); - }); - - it("Should use locked version 142 for getPartitions with QuadKeyPartitionsRequest.withQuadKey(quadKeyFromMortonCode(23605706));", async function() { - const mockedResponses = new Map(); - - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedPartitions = { - parentQuads: [ - { - additionalMetadata: "string", - checksum: "string", - compressedDataSize: 0, - dataHandle: "675911FF6236B7C7604BF8B105F1BB58", - dataSize: 0, - partition: "73982", - version: 0 - } - ], - subQuads: [ - { - additionalMetadata: "string", - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 200, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - subQuadKey: "string", - version: 1 - } - ] - }; - - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/142/quadkeys/23605706/depths/0`, - new Response(JSON.stringify(mockedPartitions), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const client = new VersionedLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), - layerId: "topology-geometry", - version: 142, - settings + it("Should use locked version 142 for getPartitions with PartitionsRequest.withPartitionIds([23605706]);", async function () { + const mockedResponses = new Map(); + + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedPartitions = { + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "23605706" + } + ], + next: "/uri/to/next/page" + }; + + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=142`, + new Response(JSON.stringify(mockedPartitions), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const client = new VersionedLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), + layerId: "topology-geometry", + version: 142, + settings + }); + + const rq = new PartitionsRequest().withPartitionIds(["23605706"]); + + await client.getPartitions(rq); + + const callsToApi = fetchStub.mock.calls; + const callToQueryApi = callsToApi[1]; + + expect(callsToApi.length).equals(2); // First to lookup api, second to the Query API. + expect(callToQueryApi[0]).equals( + "https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=142&" + + core.SENT_WITH_PARAM + ); }); - const rq = new QuadKeyPartitionsRequest().withQuadKey( - core.TileKey.fromMortonCode(23605706) - ); - - await client.getPartitions(rq); - - const callsToApi = fetchStub.getCalls(); - const callToQueryApi = callsToApi[1]; - - expect(callsToApi.length).equals(2); // First to lookup api, second to the Query API. - expect(callToQueryApi.args[0]).equals( - "https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/142/quadkeys/23605706/depths/0?" + - core.SENT_WITH_PARAM - ); - }); - - it("Should use locked version 142 for getData with DataRequest.withQuadKey(quadKeyFromMortonCode(23605706));", async function() { - const mockedResponses = new Map(); - - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "blob", - version: "v1", - baseURL: "https://blob.data.api.platform.here.com/blob/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedPartitions = { - parentQuads: [ - { - additionalMetadata: "string", - checksum: "string", - compressedDataSize: 0, - dataHandle: "675911FF6236B7C7604BF8B105F1BB58", - dataSize: 0, - partition: "73982", - version: 0 - } - ], - subQuads: [ - { - additionalMetadata: "string", - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 200, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - subQuadKey: "string", - version: 1 - } - ] - }; - - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/142/quadkeys/23605706/depths/0`, - new Response(JSON.stringify(mockedPartitions), { headers }) - ); - - mockedResponses.set( - `https://blob.data.api.platform.here.com/blob/v1/layers/topology-geometry/data/1b2ca68f-d4a0-4379-8120-cd025640510c`, - new Response(Buffer.alloc(42), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const client = new VersionedLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), - layerId: "topology-geometry", - version: 142, - settings + it("Should use locked version 142 for getPartitions with QuadKeyPartitionsRequest.withQuadKey(quadKeyFromMortonCode(23605706));", async function () { + const mockedResponses = new Map(); + + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedPartitions = { + parentQuads: [ + { + additionalMetadata: "string", + checksum: "string", + compressedDataSize: 0, + dataHandle: "675911FF6236B7C7604BF8B105F1BB58", + dataSize: 0, + partition: "73982", + version: 0 + } + ], + subQuads: [ + { + additionalMetadata: "string", + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 200, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + subQuadKey: "string", + version: 1 + } + ] + }; + + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/142/quadkeys/23605706/depths/0`, + new Response(JSON.stringify(mockedPartitions), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const client = new VersionedLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), + layerId: "topology-geometry", + version: 142, + settings + }); + + const rq = new QuadKeyPartitionsRequest().withQuadKey( + core.TileKey.fromMortonCode(23605706) + ); + + await client.getPartitions(rq); + + const callsToApi = fetchStub.mock.calls; + const callToQueryApi = callsToApi[1]; + + expect(callsToApi.length).equals(2); // First to lookup api, second to the Query API. + expect(callToQueryApi[0]).equals( + "https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/142/quadkeys/23605706/depths/0?" + + core.SENT_WITH_PARAM + ); }); - }); - - it("Should use locked version 142 for getData with DataRequest.withPartitionId(23605706)", async function() { - const mockedResponses = new Map(); - - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "blob", - version: "v1", - baseURL: "https://blob.data.api.platform.here.com/blob/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedPartitions = { - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "23605706" - } - ], - next: "/uri/to/next/page" - }; - - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=142`, - new Response(JSON.stringify(mockedPartitions), { headers }) - ); - - mockedResponses.set( - `https://blob.data.api.platform.here.com/blob/v1/layers/topology-geometry/data/1b2ca68f-d4a0-4379-8120-cd025640510c`, - new Response(Buffer.alloc(42), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const client = new VersionedLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), - layerId: "topology-geometry", - version: 142, - settings + + it("Should use locked version 142 for getData with DataRequest.withQuadKey(quadKeyFromMortonCode(23605706));", async function () { + const mockedResponses = new Map(); + + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "blob", + version: "v1", + baseURL: + "https://blob.data.api.platform.here.com/blob/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedPartitions = { + parentQuads: [ + { + additionalMetadata: "string", + checksum: "string", + compressedDataSize: 0, + dataHandle: "675911FF6236B7C7604BF8B105F1BB58", + dataSize: 0, + partition: "73982", + version: 0 + } + ], + subQuads: [ + { + additionalMetadata: "string", + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 200, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + subQuadKey: "string", + version: 1 + } + ] + }; + + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/142/quadkeys/23605706/depths/0`, + new Response(JSON.stringify(mockedPartitions), { headers }) + ); + + mockedResponses.set( + `https://blob.data.api.platform.here.com/blob/v1/layers/topology-geometry/data/1b2ca68f-d4a0-4379-8120-cd025640510c`, + new Response(Buffer.alloc(42), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const client = new VersionedLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), + layerId: "topology-geometry", + version: 142, + settings + }); }); - const rq = new DataRequest().withPartitionId("23605706"); - - await client.getData(rq); - - const callsToApi = fetchStub.getCalls(); - const callToQueryApi = callsToApi[1]; - - expect(callsToApi.length).equals(3); // 1 - lookup api, 1 - the Query API, 1 - blob API - expect(callToQueryApi.args[0]).equals( - "https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=142&" + - core.SENT_WITH_PARAM - ); - }); - - it("Should use latest version for getPartitions with PartitionsRequest.withPartitionIds([23605706]) and lock it;", async function() { - const mockedResponses = new Map(); - - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedPartitions = { - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "23605706" - } - ], - next: "/uri/to/next/page" - }; - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, - new Response(JSON.stringify({ version: 0 }), { headers }) - ); - - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=0`, - new Response(JSON.stringify(mockedPartitions), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const client = new VersionedLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), - layerId: "topology-geometry", - settings + it("Should use locked version 142 for getData with DataRequest.withPartitionId(23605706)", async function () { + const mockedResponses = new Map(); + + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "blob", + version: "v1", + baseURL: + "https://blob.data.api.platform.here.com/blob/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedPartitions = { + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "23605706" + } + ], + next: "/uri/to/next/page" + }; + + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=142`, + new Response(JSON.stringify(mockedPartitions), { headers }) + ); + + mockedResponses.set( + `https://blob.data.api.platform.here.com/blob/v1/layers/topology-geometry/data/1b2ca68f-d4a0-4379-8120-cd025640510c`, + new Response(Buffer.alloc(42), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const client = new VersionedLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), + layerId: "topology-geometry", + version: 142, + settings + }); + + const rq = new DataRequest().withPartitionId("23605706"); + + await client.getData(rq); + + const callsToApi = fetchStub.mock.calls; + const callToQueryApi = callsToApi[1]; + + expect(callsToApi.length).equals(3); // 1 - lookup api, 1 - the Query API, 1 - blob API + expect(callToQueryApi[0]).equals( + "https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=142&" + + core.SENT_WITH_PARAM + ); }); - const rq = new PartitionsRequest().withPartitionIds(["23605706"]); - - await client.getPartitions(rq); - - const callsToApi = fetchStub.getCalls(); - const callToQueryApi = callsToApi[2]; - - expect(callsToApi.length).equals(3); // 1 - lookup api, 1 - Metadata API, 1 - Query API. - - expect(client["version"]).equals(0); - expect(callToQueryApi.args[0]).equals( - "https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=0&" + - core.SENT_WITH_PARAM - ); - }); - - it("Should use latest version for getPartitions with QuadKeyPartitionsRequest.withQuadKey(quadKeyFromMortonCode(23605706)) and lock it;", async function() { - const mockedResponses = new Map(); - - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedPartitions = { - parentQuads: [ - { - additionalMetadata: "string", - checksum: "string", - compressedDataSize: 0, - dataHandle: "675911FF6236B7C7604BF8B105F1BB58", - dataSize: 0, - partition: "73982", - version: 0 - } - ], - subQuads: [ - { - additionalMetadata: "string", - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 200, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - subQuadKey: "string", - version: 1 - } - ] - }; - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, - new Response(JSON.stringify({ version: 0 }), { headers }) - ); - - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/0/quadkeys/23605706/depths/0`, - new Response(JSON.stringify(mockedPartitions), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const client = new VersionedLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), - layerId: "topology-geometry", - settings + it("Should use latest version for getPartitions with PartitionsRequest.withPartitionIds([23605706]) and lock it;", async function () { + const mockedResponses = new Map(); + + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedPartitions = { + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "23605706" + } + ], + next: "/uri/to/next/page" + }; + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, + new Response(JSON.stringify({ version: 0 }), { headers }) + ); + + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=0`, + new Response(JSON.stringify(mockedPartitions), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const client = new VersionedLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), + layerId: "topology-geometry", + settings + }); + + const rq = new PartitionsRequest().withPartitionIds(["23605706"]); + + await client.getPartitions(rq); + + const callsToApi = fetchStub.mock.calls; + const callToQueryApi = callsToApi[2]; + + expect(callsToApi.length).equals(3); // 1 - lookup api, 1 - Metadata API, 1 - Query API. + + expect(client["version"]).equals(0); + expect(callToQueryApi[0]).equals( + "https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=0&" + + core.SENT_WITH_PARAM + ); }); - const rq = new QuadKeyPartitionsRequest().withQuadKey( - core.TileKey.fromMortonCode(23605706) - ); - - await client.getPartitions(rq); - - const callsToApi = fetchStub.getCalls(); - const callToQueryApi = callsToApi[2]; - - expect(callsToApi.length).equals(3); // 1 - lookup API, 1 - Metadata API, 1 - Query API. - - expect(client["version"]).equals(0); - expect(callToQueryApi.args[0]).equals( - "https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/0/quadkeys/23605706/depths/0?" + - core.SENT_WITH_PARAM - ); - }); - - it("Should use latest version for getData with DataRequest.withQuadKey(quadKeyFromMortonCode(23605706)) and lock it;", async function() { - const mockedResponses = new Map(); - - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "blob", - version: "v1", - baseURL: "https://blob.data.api.platform.here.com/blob/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedPartitions = { - parentQuads: [ - { - additionalMetadata: "string", - checksum: "string", - compressedDataSize: 0, - dataHandle: "675911FF6236B7C7604BF8B105F1BB58", - dataSize: 0, - partition: "73982", - version: 0 - } - ], - subQuads: [ - { - additionalMetadata: "string", - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 200, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - subQuadKey: "string", - version: 1 - } - ] - }; - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, - new Response(JSON.stringify({ version: 0 }), { headers }) - ); - - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/0/quadkeys/23605706/depths/0`, - new Response(JSON.stringify(mockedPartitions), { headers }) - ); - - mockedResponses.set( - `https://blob.data.api.platform.here.com/blob/v1/layers/topology-geometry/data/1b2ca68f-d4a0-4379-8120-cd025640510c`, - new Response(Buffer.alloc(42), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const client = new VersionedLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), - layerId: "topology-geometry", - settings + it("Should use latest version for getPartitions with QuadKeyPartitionsRequest.withQuadKey(quadKeyFromMortonCode(23605706)) and lock it;", async function () { + const mockedResponses = new Map(); + + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedPartitions = { + parentQuads: [ + { + additionalMetadata: "string", + checksum: "string", + compressedDataSize: 0, + dataHandle: "675911FF6236B7C7604BF8B105F1BB58", + dataSize: 0, + partition: "73982", + version: 0 + } + ], + subQuads: [ + { + additionalMetadata: "string", + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 200, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + subQuadKey: "string", + version: 1 + } + ] + }; + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, + new Response(JSON.stringify({ version: 0 }), { headers }) + ); + + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/0/quadkeys/23605706/depths/0`, + new Response(JSON.stringify(mockedPartitions), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const client = new VersionedLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), + layerId: "topology-geometry", + settings + }); + + const rq = new QuadKeyPartitionsRequest().withQuadKey( + core.TileKey.fromMortonCode(23605706) + ); + + await client.getPartitions(rq); + + const callsToApi = fetchStub.mock.calls; + const callToQueryApi = callsToApi[2]; + + expect(callsToApi.length).equals(3); // 1 - lookup API, 1 - Metadata API, 1 - Query API. + + expect(client["version"]).equals(0); + expect(callToQueryApi[0]).equals( + "https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/0/quadkeys/23605706/depths/0?" + + core.SENT_WITH_PARAM + ); }); - }); - - it("Should use latest version for getData with DataRequest.withPartitionId(23605706) and lock it", async function() { - const mockedResponses = new Map(); - - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "blob", - version: "v1", - baseURL: "https://blob.data.api.platform.here.com/blob/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedPartitions = { - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "23605706" - } - ], - next: "/uri/to/next/page" - }; - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, - new Response(JSON.stringify({ version: 0 }), { headers }) - ); - - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=0`, - new Response(JSON.stringify(mockedPartitions), { headers }) - ); - - mockedResponses.set( - `https://blob.data.api.platform.here.com/blob/v1/layers/topology-geometry/data/1b2ca68f-d4a0-4379-8120-cd025640510c`, - new Response(Buffer.alloc(42), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const client = new VersionedLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), - layerId: "topology-geometry", - settings + + it("Should use latest version for getData with DataRequest.withQuadKey(quadKeyFromMortonCode(23605706)) and lock it;", async function () { + const mockedResponses = new Map(); + + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "blob", + version: "v1", + baseURL: + "https://blob.data.api.platform.here.com/blob/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedPartitions = { + parentQuads: [ + { + additionalMetadata: "string", + checksum: "string", + compressedDataSize: 0, + dataHandle: "675911FF6236B7C7604BF8B105F1BB58", + dataSize: 0, + partition: "73982", + version: 0 + } + ], + subQuads: [ + { + additionalMetadata: "string", + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 200, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + subQuadKey: "string", + version: 1 + } + ] + }; + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, + new Response(JSON.stringify({ version: 0 }), { headers }) + ); + + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/0/quadkeys/23605706/depths/0`, + new Response(JSON.stringify(mockedPartitions), { headers }) + ); + + mockedResponses.set( + `https://blob.data.api.platform.here.com/blob/v1/layers/topology-geometry/data/1b2ca68f-d4a0-4379-8120-cd025640510c`, + new Response(Buffer.alloc(42), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const client = new VersionedLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), + layerId: "topology-geometry", + settings + }); }); - const rq = new DataRequest().withPartitionId("23605706"); - - await client.getData(rq); - - const callsToApi = fetchStub.getCalls(); - const callToQueryApi = callsToApi[2]; - - expect(callsToApi.length).equals(4); // 1 - lookup api, 1 - Metadata API, 1 - the Query API, 1 - blob API - - expect(client["version"]).equals(0); - expect(callToQueryApi.args[0]).equals( - "https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=0&" + - core.SENT_WITH_PARAM - ); - }); - - it("Should use version 0 for getLayerVersions with LayerVersionsRequest.withVersion(0);", async function() { - const mockedResponses = new Map(); - - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/layerVersions?version=0`, - new Response( - JSON.stringify({ - layerVersions: [ - { - layer: "my-layer", - version: 0, - timestamp: "1516397474657" - } - ], - version: 1 - }), - { headers } - ) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const client = new CatalogClient( - core.HRN.fromString("hrn:here:data::olp-here:rib-2"), - settings - ); - - const rq = new LayerVersionsRequest().withVersion(0); - - await client.getLayerVersions(rq); - - const callsToApi = fetchStub.getCalls(); - const callToMetadataApi = callsToApi[1]; - - expect(callsToApi.length).equals(2); // 1 - lookup api, 1 - Metadata API - - expect(callToMetadataApi.args[0]).equals( - "https://metadata.data.api.platform.here.com/metadata/v1/layerVersions?version=0&" + - core.SENT_WITH_PARAM - ); - }); - - it("Should use version 0 for getVersions with CatalogVersionRequest.withEndVersion(0);", async function() { - const mockedResponses = new Map(); - - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions?startVersion=-1&endVersion=0`, - new Response( - JSON.stringify({ - versions: [ - { - dependencies: [ + it("Should use latest version for getData with DataRequest.withPartitionId(23605706) and lock it", async function () { + const mockedResponses = new Map(); + + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "blob", + version: "v1", + baseURL: + "https://blob.data.api.platform.here.com/blob/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedPartitions = { + partitions: [ { - direct: false, - hrn: "hrn:here:data:::my-catalog", - version: 23 + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "23605706" } - ], - partitionCounts: { - property1: 0, - property2: 0 - }, - timestamp: "1516397474657", - version: 1 - } - ] - }), - { headers } - ) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const client = new CatalogClient( - core.HRN.fromString("hrn:here:data::olp-here:rib-2"), - settings - ); - - const rq = new CatalogVersionRequest().withEndVersion(0); - - await client.getVersions(rq); - - const callsToApi = fetchStub.getCalls(); - const callToMetadataApi = callsToApi[1]; - - expect(callsToApi.length).equals(2); // 1 - lookup api, 1 - Metadata API - - expect(callToMetadataApi.args[0]).equals( - "https://metadata.data.api.platform.here.com/metadata/v1/versions?startVersion=-1&endVersion=0&" + - core.SENT_WITH_PARAM - ); - }); + ], + next: "/uri/to/next/page" + }; + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, + new Response(JSON.stringify({ version: 0 }), { headers }) + ); + + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=0`, + new Response(JSON.stringify(mockedPartitions), { headers }) + ); + + mockedResponses.set( + `https://blob.data.api.platform.here.com/blob/v1/layers/topology-geometry/data/1b2ca68f-d4a0-4379-8120-cd025640510c`, + new Response(Buffer.alloc(42), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const client = new VersionedLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data::olp-here:rib-2"), + layerId: "topology-geometry", + settings + }); + + const rq = new DataRequest().withPartitionId("23605706"); + + await client.getData(rq); + + const callsToApi = fetchStub.mock.calls; + const callToQueryApi = callsToApi[2]; + + expect(callsToApi.length).equals(4); // 1 - lookup api, 1 - Metadata API, 1 - the Query API, 1 - blob API + + expect(client["version"]).equals(0); + expect(callToQueryApi[0]).equals( + "https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/partitions?partition=23605706&version=0&" + + core.SENT_WITH_PARAM + ); + }); + + it("Should use version 0 for getLayerVersions with LayerVersionsRequest.withVersion(0);", async function () { + const mockedResponses = new Map(); + + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/layerVersions?version=0`, + new Response( + JSON.stringify({ + layerVersions: [ + { + layer: "my-layer", + version: 0, + timestamp: "1516397474657" + } + ], + version: 1 + }), + { headers } + ) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const client = new CatalogClient( + core.HRN.fromString("hrn:here:data::olp-here:rib-2"), + settings + ); + + const rq = new LayerVersionsRequest().withVersion(0); + + await client.getLayerVersions(rq); + + const callsToApi = fetchStub.mock.calls; + const callToMetadataApi = callsToApi[1]; + + expect(callsToApi.length).equals(2); // 1 - lookup api, 1 - Metadata API + + expect(callToMetadataApi[0]).equals( + "https://metadata.data.api.platform.here.com/metadata/v1/layerVersions?version=0&" + + core.SENT_WITH_PARAM + ); + }); + + it("Should use version 0 for getVersions with CatalogVersionRequest.withEndVersion(0);", async function () { + const mockedResponses = new Map(); + + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions?startVersion=-1&endVersion=0`, + new Response( + JSON.stringify({ + versions: [ + { + dependencies: [ + { + direct: false, + hrn: "hrn:here:data:::my-catalog", + version: 23 + } + ], + partitionCounts: { + property1: 0, + property2: 0 + }, + timestamp: "1516397474657", + version: 1 + } + ] + }), + { headers } + ) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const client = new CatalogClient( + core.HRN.fromString("hrn:here:data::olp-here:rib-2"), + settings + ); + + const rq = new CatalogVersionRequest().withEndVersion(0); + + await client.getVersions(rq); + + const callsToApi = fetchStub.mock.calls; + const callToMetadataApi = callsToApi[1]; + + expect(callsToApi.length).equals(2); // 1 - lookup api, 1 - Metadata API + + expect(callToMetadataApi[0]).equals( + "https://metadata.data.api.platform.here.com/metadata/v1/versions?startVersion=-1&endVersion=0&" + + core.SENT_WITH_PARAM + ); + }); }); diff --git a/tests/integration/olp-sdk-dataservice-read/IndexLayerClient.test.ts b/tests/integration/olp-sdk-dataservice-read/IndexLayerClient.test.ts index e7b87dd5..7be42887 100644 --- a/tests/integration/olp-sdk-dataservice-read/IndexLayerClient.test.ts +++ b/tests/integration/olp-sdk-dataservice-read/IndexLayerClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,271 +17,278 @@ * License-Filename: LICENSE */ -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - IndexLayerClient, - IndexQueryRequest + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + IndexLayerClient, + IndexQueryRequest } from "@here/olp-sdk-dataservice-read"; import { FetchMock } from "../FetchMock"; import { Buffer } from "buffer"; import * as core from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("IndexLayerClient", function() { - let fetchMock: FetchMock; - let sandbox: sinon.SinonSandbox; - let fetchStub: sinon.SinonStub; - - const testHRN = core.HRN.fromString("hrn:here:data:::test-hrn"); - const testLayerId = "test-layed-id"; - - before(function() { - sandbox = sinon.createSandbox(); - }); +describe("IndexLayerClient", function () { + let fetchMock: FetchMock; + let fetchStub: any; - afterEach(function() { - sandbox.restore(); - }); + const testHRN = core.HRN.fromString("hrn:here:data:::test-hrn"); + const testLayerId = "test-layed-id"; - beforeEach(function() { - fetchMock = new FetchMock(); - fetchStub = sandbox.stub(global as any, "fetch"); - fetchStub.callsFake(fetchMock.fetch()); - }); + beforeAll(function () {}); - it("Should be initialized with settings", async function() { - const settings = new core.OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + afterEach(function () { + vi.restoreAllMocks(); }); - const indexClient = new IndexLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings + + beforeEach(function () { + fetchMock = new FetchMock(); + fetchStub = vi.spyOn(global as any, "fetch"); + fetchStub.mockImplementation(fetchMock.fetch()); }); - assert.isDefined(indexClient); - expect(indexClient).to.be.instanceOf(IndexLayerClient); - }); - it("Should initialization error be handled", function() { - const settings = new core.OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + it("Should be initialized with settings", async function () { + const settings = new core.OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const indexClient = new IndexLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + assert.isDefined(indexClient); + expect(indexClient).to.be.instanceOf(IndexLayerClient); }); - try { - const indexClient = new IndexLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "", - settings - }); - } catch (error) { - expect(error.message).equal("Unsupported parameters"); - } - }); - it("Should be fetched partitions all metadata", async function() { - const mockedResponses = new Map(); + it("Should initialization error be handled", function () { + const settings = new core.OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + try { + const indexClient = new IndexLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "", + settings + }); + } catch (error) { + expect(error.message).equal("Unsupported parameters"); + } + }); - // Set the response from lookup api with the info about Index service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "index", - version: "v1", - baseURL: "https://index.data.api.platform.here.com/index/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); + it("Should be fetched partitions all metadata", async function () { + const mockedResponses = new Map(); - // Set the response of mocked partitions from index service. - mockedResponses.set( - `https://index.data.api.platform.here.com/index/v1/layers/test-layed-id?huge=false&query=hour_from%3E0`, - new Response( - JSON.stringify({ - data: [ - { - id: "8c0e5ac9-b036-4365-8820-dfcba64588fc", - size: 111928, - checksum: "448a33cd65c47bed1eeb4d72e7fa022c95a41158", - timestamp: 1551981674191, - hour_from: 1506402000000, - tile_id: 377894442, - crc: null - }, - { - id: "a2ee29d9-4812-4322-b028-bded0bd2b92f", - size: 397246, - checksum: "cb2666fb46ba98788b88c905a766f5675366ef7f", - timestamp: 1551981674191, - hour_from: 1506402000000, - tile_id: 377894440, - crc: null - }, - { - id: "a439ca8d-a3b5-4fdc-8513-4e3697c4fbc7", - size: 364671, - checksum: "0c12b693835a86c02a0b0028cea24d12371acdce", - timestamp: 1551981674191, - hour_from: 1506402000000, - tile_id: 377894444, - crc: null - } - ] - }) - ) - ); + // Set the response from lookup api with the info about Index service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "index", + version: "v1", + baseURL: + "https://index.data.api.platform.here.com/index/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); + // Set the response of mocked partitions from index service. + mockedResponses.set( + `https://index.data.api.platform.here.com/index/v1/layers/test-layed-id?huge=false&query=hour_from%3E0`, + new Response( + JSON.stringify({ + data: [ + { + id: "8c0e5ac9-b036-4365-8820-dfcba64588fc", + size: 111928, + checksum: + "448a33cd65c47bed1eeb4d72e7fa022c95a41158", + timestamp: 1551981674191, + hour_from: 1506402000000, + tile_id: 377894442, + crc: null + }, + { + id: "a2ee29d9-4812-4322-b028-bded0bd2b92f", + size: 397246, + checksum: + "cb2666fb46ba98788b88c905a766f5675366ef7f", + timestamp: 1551981674191, + hour_from: 1506402000000, + tile_id: 377894440, + crc: null + }, + { + id: "a439ca8d-a3b5-4fdc-8513-4e3697c4fbc7", + size: 364671, + checksum: + "0c12b693835a86c02a0b0028cea24d12371acdce", + timestamp: 1551981674191, + hour_from: 1506402000000, + tile_id: 377894444, + crc: null + } + ] + }) + ) + ); - // Setup Layer Client with new OlpClientSettings. - const settings = new core.OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const indexClient = new IndexLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings - }); + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); - // Setup IndexQueryRequest with query parameter - const request = new IndexQueryRequest().withQueryString("hour_from>0"); + // Setup Layer Client with new OlpClientSettings. + const settings = new core.OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const indexClient = new IndexLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); - // Send request for partitions metadata. - const data = await indexClient.getPartitions(request); + // Setup IndexQueryRequest with query parameter + const request = new IndexQueryRequest().withQueryString("hour_from>0"); - // Check if partitions fetched succesful. - assert.isDefined(data); + // Send request for partitions metadata. + const data = await indexClient.getPartitions(request); - if (data) { - // Check if partitions returns as expected. - expect(data[0].id).to.be.equal("8c0e5ac9-b036-4365-8820-dfcba64588fc"); - expect(data[1].checksum).to.be.equal( - "cb2666fb46ba98788b88c905a766f5675366ef7f" - ); - expect(data.length).to.be.equal(3); - } - expect(fetchStub.callCount).to.be.equal(2); - }); + // Check if partitions fetched succesful. + assert.isDefined(data); - it("Should getPartitions() method handle errors", async function() { - const settings = new core.OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + if (data) { + // Check if partitions returns as expected. + expect(data[0].id).to.be.equal( + "8c0e5ac9-b036-4365-8820-dfcba64588fc" + ); + expect(data[1].checksum).to.be.equal( + "cb2666fb46ba98788b88c905a766f5675366ef7f" + ); + expect(data.length).to.be.equal(3); + } + expect(fetchStub.mock.calls.length).to.be.equal(2); }); - const indexClient = new IndexLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings - }); - const request = new IndexQueryRequest().withHugeResponse(true); - const response = indexClient.getPartitions(request).catch(error => { - expect(error.message).equal("Please provide correct query"); - }); - }); - it("Should getData() method handle errors", async function() { - const settings = new core.OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const indexClient = new IndexLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings + it("Should getPartitions() method handle errors", async function () { + const settings = new core.OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const indexClient = new IndexLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + const request = new IndexQueryRequest().withHugeResponse(true); + const response = indexClient.getPartitions(request).catch((error) => { + expect(error.message).equal("Please provide correct query"); + }); }); - const response = indexClient.getData({}).catch(error => { - expect(error.message).equal("No data handle for this partition"); + + it("Should getData() method handle errors", async function () { + const settings = new core.OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const indexClient = new IndexLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + const response = indexClient.getData({}).catch((error) => { + expect(error.message).equal("No data handle for this partition"); + }); }); - }); - it("Should be fetched data with dataHandle", async function() { - const mockedResponses = new Map(); - const mockedData = Buffer.alloc(42); - const mockedModel = { - id: "8c0e5ac9-b036-4365-8820-dfcba64588fc", - size: 111928, - checksum: "448a33cd65c47bed1eeb4d72e7fa022c95a41158", - timestamp: 1551981674191, - hour_from: 1506402000000, - tile_id: 377894442, - crc: null - }; + it("Should be fetched data with dataHandle", async function () { + const mockedResponses = new Map(); + const mockedData = Buffer.alloc(42); + const mockedModel = { + id: "8c0e5ac9-b036-4365-8820-dfcba64588fc", + size: 111928, + checksum: "448a33cd65c47bed1eeb4d72e7fa022c95a41158", + timestamp: 1551981674191, + hour_from: 1506402000000, + tile_id: 377894442, + crc: null + }; - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "blob", - version: "v1", - baseURL: "https://blob.data.api.platform.here.com/blob/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "blob", + version: "v1", + baseURL: + "https://blob.data.api.platform.here.com/blob/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); - // Set the response of mocked partitions from metadata service. - mockedResponses.set( - `https://blob.data.api.platform.here.com/blob/v1/layers/test-layed-id/data/8c0e5ac9-b036-4365-8820-dfcba64588fc`, - new Response(mockedData) - ); + // Set the response of mocked partitions from metadata service. + mockedResponses.set( + `https://blob.data.api.platform.here.com/blob/v1/layers/test-layed-id/data/8c0e5ac9-b036-4365-8820-dfcba64588fc`, + new Response(mockedData) + ); - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); - const settings = new core.OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const indexClient = new IndexLayerClient({ - catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings - }); - - const data = await indexClient.getData(mockedModel); + const settings = new core.OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const indexClient = new IndexLayerClient({ + catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); - assert.isDefined(data); - expect(fetchStub.callCount).to.be.equal(2); - }); + const data = await indexClient.getData(mockedModel); - it("Should be initialized with IndexLayerClientParams", async function() { - const settings = new core.OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + assert.isDefined(data); + expect(fetchStub.mock.calls.length).to.be.equal(2); }); - const indexLayerClientParams = { - catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: settings - }; - const indexLayerClient = new IndexLayerClient(indexLayerClientParams); + it("Should be initialized with IndexLayerClientParams", async function () { + const settings = new core.OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); - assert.isDefined(indexLayerClient); - expect(indexLayerClient).to.be.instanceOf(IndexLayerClient); - assert.equal(indexLayerClient["hrn"], "hrn:here:data:::test-hrn"); - }); + const indexLayerClientParams = { + catalogHrn: core.HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: settings + }; + const indexLayerClient = new IndexLayerClient(indexLayerClientParams); + + assert.isDefined(indexLayerClient); + expect(indexLayerClient).to.be.instanceOf(IndexLayerClient); + assert.equal(indexLayerClient["hrn"], "hrn:here:data:::test-hrn"); + }); }); diff --git a/tests/integration/olp-sdk-dataservice-read/Metadata-api.test.ts b/tests/integration/olp-sdk-dataservice-read/Metadata-api.test.ts index e66f0d54..77b23fa4 100644 --- a/tests/integration/olp-sdk-dataservice-read/Metadata-api.test.ts +++ b/tests/integration/olp-sdk-dataservice-read/Metadata-api.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,116 +17,119 @@ * License-Filename: LICENSE */ -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { MetadataApi } from "@here/olp-sdk-dataservice-api"; import { FetchMock } from "../FetchMock"; import * as core from "@here/olp-sdk-core"; -chai.use(sinonChai); -const expect = chai.expect; +describe("CatalogClient", function () { + let fetchMock: FetchMock; + let fetchStub: any; + let settings: core.OlpClientSettings; -describe("CatalogClient", function() { - let fetchMock: FetchMock; - let sandbox: sinon.SinonSandbox; - let fetchStub: sinon.SinonStub; - let settings: core.OlpClientSettings; + beforeAll(function () {}); - before(function() { - sandbox = sinon.createSandbox(); - }); - - afterEach(function() { - sandbox.restore(); - }); - - beforeEach(function() { - fetchMock = new FetchMock(); - fetchStub = sandbox.stub(global as any, "fetch"); - fetchStub.callsFake(fetchMock.fetch()); - - // Setup Catalog Client with new OlpClientSettings. - settings = new core.OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + afterEach(function () { + vi.restoreAllMocks(); }); - }); - - it("Should be passsed parameter Range to the headers of the metadata request", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); - const mockedPartitions = { - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "314010583" - }, - { - checksum: "123f66029c232400e3403cd6e9cfd45b", - compressedDataSize: 2084, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", - dataSize: 2084, - crc: "c3f2766y", - partition: "1000" - } - ], - next: "/uri/to/next/page" - }; + beforeEach(function () { + fetchMock = new FetchMock(); + fetchStub = vi.spyOn(global as any, "fetch"); + fetchStub.mockImplementation(fetchMock.fetch()); - // Set the response from Metadata service with the versions info from the catalog. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/layers/cartography/partitions?version=842`, - new Response(JSON.stringify(mockedPartitions)) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const requestBuilder = await core.RequestFactory.create( - "metadata", - "v1", - settings, - core.HRN.fromString("hrn:here:data::olp-here:rib-2") - ); - - const partitions = await MetadataApi.getPartitions(requestBuilder, { - layerId: "cartography", - version: 842, - range: "bytes=10-" + // Setup Catalog Client with new OlpClientSettings. + settings = new core.OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); }); - const callsToApi = fetchStub.getCalls(); - const callToMetadata = callsToApi[1]; - - expect(callsToApi.length).equals(2); // First to lookup api, second to the Metadata API. - expect(mockedPartitions).equals(mockedPartitions); - expect(callToMetadata.args[1].headers.get("Authorization")).equals( - "Bearer test-token-string" - ); - expect(callToMetadata.args[1].headers.get("Range")).equals("bytes=10-"); - }); + it("Should be passsed parameter Range to the headers of the metadata request", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data::olp-here:rib-2/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); + + const mockedPartitions = { + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "314010583" + }, + { + checksum: "123f66029c232400e3403cd6e9cfd45b", + compressedDataSize: 2084, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", + dataSize: 2084, + crc: "c3f2766y", + partition: "1000" + } + ], + next: "/uri/to/next/page" + }; + + // Set the response from Metadata service with the versions info from the catalog. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/layers/cartography/partitions?version=842`, + new Response(JSON.stringify(mockedPartitions)) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const requestBuilder = await core.RequestFactory.create( + "metadata", + "v1", + settings, + core.HRN.fromString("hrn:here:data::olp-here:rib-2") + ); + + const partitions = await MetadataApi.getPartitions(requestBuilder, { + layerId: "cartography", + version: 842, + range: "bytes=10-" + }); + + const callsToApi = fetchStub.mock.calls; + const callToMetadata = callsToApi[1]; + + expect(callsToApi.length).equals(2); // First to lookup api, second to the Metadata API. + expect(mockedPartitions).equals(mockedPartitions); + expect(callToMetadata[1].headers.get("Authorization")).equals( + "Bearer test-token-string" + ); + expect(callToMetadata[1].headers.get("Range")).equals("bytes=10-"); + }); }); diff --git a/tests/integration/olp-sdk-dataservice-read/StatisticsClient.test.ts b/tests/integration/olp-sdk-dataservice-read/StatisticsClient.test.ts index 5482a00a..4121499d 100644 --- a/tests/integration/olp-sdk-dataservice-read/StatisticsClient.test.ts +++ b/tests/integration/olp-sdk-dataservice-read/StatisticsClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,297 +17,295 @@ * License-Filename: LICENSE */ -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - StatisticsClient, - SummaryRequest, - StatisticsRequest, - CoverageDataType + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + StatisticsClient, + SummaryRequest, + StatisticsRequest, + CoverageDataType } from "@here/olp-sdk-dataservice-read"; import { FetchMock } from "../FetchMock"; import * as core from "@here/olp-sdk-core"; -chai.use(sinonChai); +describe("StatisticsClient", function () { + let fetchMock: FetchMock; + let fetchStub: any; -const assert = chai.assert; -const expect = chai.expect; + let statisticsClient: StatisticsClient; + let settings: core.OlpClientSettings; -describe("StatisticsClient", function() { - let fetchMock: FetchMock; - let sandbox: sinon.SinonSandbox; - let fetchStub: sinon.SinonStub; + const mockedHRN = core.HRN.fromString("hrn:here:data:::mocked-hrn"); + const mockedLayerId = "mocked-layed-id"; - let statisticsClient: StatisticsClient; - let settings: core.OlpClientSettings; + beforeAll(function () {}); - const mockedHRN = core.HRN.fromString("hrn:here:data:::mocked-hrn"); - const mockedLayerId = "mocked-layed-id"; + afterEach(function () { + vi.restoreAllMocks(); + }); - before(function() { - sandbox = sinon.createSandbox(); - }); + beforeEach(function () { + fetchMock = new FetchMock(); + fetchStub = vi.spyOn(global as any, "fetch"); + fetchStub.mockImplementation(fetchMock.fetch()); + + // Setup Statistics Client with new OlpClientSettings. + settings = new core.OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + statisticsClient = new StatisticsClient(settings); + }); - afterEach(function() { - sandbox.restore(); - }); + it("Shoud be initialized with settings", async function () { + assert.isDefined(statisticsClient); + expect(statisticsClient).to.be.instanceOf(StatisticsClient); + }); - beforeEach(function() { - fetchMock = new FetchMock(); - fetchStub = sandbox.stub(global as any, "fetch"); - fetchStub.callsFake(fetchMock.fetch()); + it("Should fetch the summary info from statistics service", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "statistics", + version: "v1", + baseURL: + "https://statistics.data.api.platform.here.com/statistics/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); + + // Set the response from Statistics service with the summary info. + const mockedStatisticsSummary = { + catalogHRN: "hrn:here-dev:data:::samplecatalog", + layer: "sampleLayer", + levelSummary: [ + { + summaryPerZoomLevel: { + size: 1024, + proccessedTimestamp: 1567116347, + centroid: 1256044, + totalPartitions: 2500, + bbox: { + east: "41.8785", + north: "41.8781", + south: "87.6278", + west: "87.6298" + }, + minPartitionSize: 512, + maxPartitionSize: 1024, + version: 3 + }, + version: 11 + } + ] + }; + + mockedResponses.set( + `https://statistics.data.api.platform.here.com/statistics/v1/layers/mocked-layed-id/summary`, + new Response(JSON.stringify(mockedStatisticsSummary)) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const summaryRequest = new SummaryRequest() + .withCatalogHrn(mockedHRN) + .withLayerId(mockedLayerId); + + const summaryResponse = + await statisticsClient.getSummary(summaryRequest); + assert.isDefined(summaryResponse); + + expect(summaryResponse.catalogHRN).to.be.equal( + "hrn:here-dev:data:::samplecatalog" + ); + expect(summaryResponse.layer).to.be.equal("sampleLayer"); + assert.isDefined(summaryResponse.levelSummary); + + expect(fetchStub.mock.calls.length).to.be.equal(2); + }); + + it("Should method getSummary return error if catalogHRN is not provided", async function () { + const mockedErrorResponse = "No catalogHrn provided"; + + const summaryRequest = new SummaryRequest().withLayerId(mockedLayerId); + + const summaryResponse = await statisticsClient + .getSummary(summaryRequest) + .catch((error) => { + assert.isDefined(error); + assert.equal(mockedErrorResponse, error.message); + }); + }); + + it("Should method getSummary return error if layerId is not provided", async function () { + const mockedErrorResponse = "No layerId provided"; + + const summaryRequest = new SummaryRequest().withCatalogHrn(mockedHRN); + + const summaryResponse = await statisticsClient + .getSummary(summaryRequest) + .catch((error) => { + assert.isDefined(error); + assert.equal(mockedErrorResponse, error.message); + }); + }); + + it("Should method getStatistics return timemap statistics data", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "statistics", + version: "v1", + baseURL: + "https://statistics.data.api.platform.here.com/statistics/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); + + // Set the response from Statistics service with the statistics info. + const mockedData = Buffer.alloc(42); + + mockedResponses.set( + `https://statistics.data.api.platform.here.com/statistics/v1/layers/mocked-layed-id/heatmap/age?datalevel=3&catalogHRN=hrn%3Ahere%3Adata%3A%3A%3Amocked-hrn`, + new Response(JSON.stringify(mockedData)) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const statisticsRequest = new StatisticsRequest() + .withCatalogHrn(mockedHRN) + .withLayerId(mockedLayerId) + .withDataLevel(3) + .withTypemap(CoverageDataType.TIMEMAP); + + const summaryResponse = + await statisticsClient.getStatistics(statisticsRequest); + assert.isDefined(summaryResponse); + expect(fetchStub.mock.calls.length).to.be.equal(2); + }); + + it("Should method getStatistics return sizemap statistics data", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "statistics", + version: "v1", + baseURL: + "https://statistics.data.api.platform.here.com/statistics/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); + + // Set the response from Statistics service with the statistics info. + const mockedData = Buffer.alloc(42); + + mockedResponses.set( + `https://statistics.data.api.platform.here.com/statistics/v1/layers/mocked-layed-id/heatmap/size?datalevel=3`, + new Response(JSON.stringify(mockedData)) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const statisticsRequest = new StatisticsRequest() + .withCatalogHrn(mockedHRN) + .withLayerId(mockedLayerId) + .withDataLevel(3) + .withTypemap(CoverageDataType.SIZEMAP); + + const summaryResponse = + await statisticsClient.getStatistics(statisticsRequest); + assert.isDefined(summaryResponse); + expect(fetchStub.mock.calls.length).to.be.equal(2); + }); - // Setup Statistics Client with new OlpClientSettings. - settings = new core.OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + it("Should method getStatistics return bitmap statistics data", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "statistics", + version: "v1", + baseURL: + "https://statistics.data.api.platform.here.com/statistics/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); + + // Set the response from Statistics service with the statistics info. + const mockedData = Buffer.alloc(42); + + mockedResponses.set( + `https://statistics.data.api.platform.here.com/statistics/v1/layers/mocked-layed-id/tilemap?datalevel=3`, + new Response(JSON.stringify(mockedData)) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const statisticsRequest = new StatisticsRequest() + .withCatalogHrn(mockedHRN) + .withLayerId(mockedLayerId) + .withDataLevel(3) + .withTypemap(CoverageDataType.BITMAP); + + const summaryResponse = + await statisticsClient.getStatistics(statisticsRequest); + assert.isDefined(summaryResponse); + expect(fetchStub.mock.calls.length).to.be.equal(2); }); - statisticsClient = new StatisticsClient(settings); - }); - - it("Shoud be initialized with settings", async function() { - assert.isDefined(statisticsClient); - expect(statisticsClient).to.be.instanceOf(StatisticsClient); - }); - - it("Should fetch the summary info from statistics service", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "statistics", - version: "v1", - baseURL: - "https://statistics.data.api.platform.here.com/statistics/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); - - // Set the response from Statistics service with the summary info. - const mockedStatisticsSummary = { - catalogHRN: "hrn:here-dev:data:::samplecatalog", - layer: "sampleLayer", - levelSummary: [ - { - summaryPerZoomLevel: { - size: 1024, - proccessedTimestamp: 1567116347, - centroid: 1256044, - totalPartitions: 2500, - bbox: { - east: "41.8785", - north: "41.8781", - south: "87.6278", - west: "87.6298" - }, - minPartitionSize: 512, - maxPartitionSize: 1024, - version: 3 - }, - version: 11 - } - ] - }; - - mockedResponses.set( - `https://statistics.data.api.platform.here.com/statistics/v1/layers/mocked-layed-id/summary`, - new Response(JSON.stringify(mockedStatisticsSummary)) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const summaryRequest = new SummaryRequest() - .withCatalogHrn(mockedHRN) - .withLayerId(mockedLayerId); - - const summaryResponse = await statisticsClient.getSummary(summaryRequest); - assert.isDefined(summaryResponse); - - expect(summaryResponse.catalogHRN).to.be.equal( - "hrn:here-dev:data:::samplecatalog" - ); - expect(summaryResponse.layer).to.be.equal("sampleLayer"); - assert.isDefined(summaryResponse.levelSummary); - - expect(fetchStub.callCount).to.be.equal(2); - }); - - it("Should method getSummary return error if catalogHRN is not provided", async function() { - const mockedErrorResponse = "No catalogHrn provided"; - - const summaryRequest = new SummaryRequest().withLayerId(mockedLayerId); - - const summaryResponse = await statisticsClient - .getSummary(summaryRequest) - .catch(error => { - assert.isDefined(error); - assert.equal(mockedErrorResponse, error.message); - }); - }); - - it("Should method getSummary return error if layerId is not provided", async function() { - const mockedErrorResponse = "No layerId provided"; - - const summaryRequest = new SummaryRequest().withCatalogHrn(mockedHRN); - - const summaryResponse = await statisticsClient - .getSummary(summaryRequest) - .catch(error => { - assert.isDefined(error); - assert.equal(mockedErrorResponse, error.message); - }); - }); - - it("Should method getStatistics return timemap statistics data", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "statistics", - version: "v1", - baseURL: - "https://statistics.data.api.platform.here.com/statistics/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); - - // Set the response from Statistics service with the statistics info. - const mockedData = Buffer.alloc(42); - - mockedResponses.set( - `https://statistics.data.api.platform.here.com/statistics/v1/layers/mocked-layed-id/heatmap/age?datalevel=3&catalogHRN=hrn%3Ahere%3Adata%3A%3A%3Amocked-hrn`, - new Response(JSON.stringify(mockedData)) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const statisticsRequest = new StatisticsRequest() - .withCatalogHrn(mockedHRN) - .withLayerId(mockedLayerId) - .withDataLevel(3) - .withTypemap(CoverageDataType.TIMEMAP); - - const summaryResponse = await statisticsClient.getStatistics( - statisticsRequest - ); - assert.isDefined(summaryResponse); - expect(fetchStub.callCount).to.be.equal(2); - }); - - it("Should method getStatistics return sizemap statistics data", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "statistics", - version: "v1", - baseURL: - "https://statistics.data.api.platform.here.com/statistics/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); - - // Set the response from Statistics service with the statistics info. - const mockedData = Buffer.alloc(42); - - mockedResponses.set( - `https://statistics.data.api.platform.here.com/statistics/v1/layers/mocked-layed-id/heatmap/size?datalevel=3`, - new Response(JSON.stringify(mockedData)) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const statisticsRequest = new StatisticsRequest() - .withCatalogHrn(mockedHRN) - .withLayerId(mockedLayerId) - .withDataLevel(3) - .withTypemap(CoverageDataType.SIZEMAP); - - const summaryResponse = await statisticsClient.getStatistics( - statisticsRequest - ); - assert.isDefined(summaryResponse); - expect(fetchStub.callCount).to.be.equal(2); - }); - - it("Should method getStatistics return bitmap statistics data", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "statistics", - version: "v1", - baseURL: - "https://statistics.data.api.platform.here.com/statistics/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); - - // Set the response from Statistics service with the statistics info. - const mockedData = Buffer.alloc(42); - - mockedResponses.set( - `https://statistics.data.api.platform.here.com/statistics/v1/layers/mocked-layed-id/tilemap?datalevel=3`, - new Response(JSON.stringify(mockedData)) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const statisticsRequest = new StatisticsRequest() - .withCatalogHrn(mockedHRN) - .withLayerId(mockedLayerId) - .withDataLevel(3) - .withTypemap(CoverageDataType.BITMAP); - - const summaryResponse = await statisticsClient.getStatistics( - statisticsRequest - ); - assert.isDefined(summaryResponse); - expect(fetchStub.callCount).to.be.equal(2); - }); }); diff --git a/tests/integration/olp-sdk-dataservice-read/StreamLayerClient.test.ts b/tests/integration/olp-sdk-dataservice-read/StreamLayerClient.test.ts index 7f584103..0b2d9149 100644 --- a/tests/integration/olp-sdk-dataservice-read/StreamLayerClient.test.ts +++ b/tests/integration/olp-sdk-dataservice-read/StreamLayerClient.test.ts @@ -1,542 +1,561 @@ -/* - * Copyright (C) 2020-2021 HERE Europe B.V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * License-Filename: LICENSE - */ - -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); -import { - StreamLayerClient, - SubscribeRequest, - PollRequest, - UnsubscribeRequest, - SeekRequest -} from "@here/olp-sdk-dataservice-read"; -import { FetchMock } from "../FetchMock"; -import { Buffer } from "buffer"; -import { Message } from "@here/olp-sdk-dataservice-api/lib/stream-api"; -import { HRN, OlpClientSettings } from "@here/olp-sdk-core"; - -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("StreamLayerClient", function() { - let fetchMock: FetchMock; - let sandbox: sinon.SinonSandbox; - let fetchStub: sinon.SinonStub; - - const testHRN = HRN.fromString("hrn:here:data:::test-hrn"); - const testLayerId = "test-layed-id"; - - before(function() { - sandbox = sinon.createSandbox(); - }); - - afterEach(function() { - sandbox.restore(); - }); - - beforeEach(function() { - fetchMock = new FetchMock(); - fetchStub = sandbox.stub(global as any, "fetch"); - fetchStub.callsFake(fetchMock.fetch()); - }); - - it("Shoud be initialized with StreamLayerClientParams", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - - const streamLayerClientParams = { - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings - }; - const streamLayerClient = new StreamLayerClient(streamLayerClientParams); - - assert.isDefined(streamLayerClient); - expect(streamLayerClient).to.be.instanceOf(StreamLayerClient); - assert.equal(streamLayerClient["layerId"], "test-layed-id"); - }); - - it("Shoud getData() fetch data with dataHandle", async function() { - const mockedResponses = new Map(); - const mockedData = Buffer.alloc(42); - - const mockedMessage = { - metaData: { - partition: "314010583", - checksum: "ff7494d6f17da702862e550c907c0a91", - compressedDataSize: 152417, - dataSize: 250110, - data: "", - dataHandle: "8c0e5ac9-b036-4365-8820-dfcba64588fc", - timestamp: 1517916706 - }, - offset: { - partition: 7, - offset: 38562 - } - }; - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "blob", - version: "v1", - baseURL: "https://blob.data.api.platform.here.com/blob/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); - - // Set the response of mocked partitions from metadata service. - mockedResponses.set( - `https://blob.data.api.platform.here.com/blob/v1/layers/test-layed-id/data/8c0e5ac9-b036-4365-8820-dfcba64588fc`, - new Response(mockedData) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const streamClient = new StreamLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: settings - }); - - const data = await streamClient.getData(mockedMessage); - - assert.isDefined(data); - expect(fetchStub.callCount).to.be.equal(2); - }); - - it("Should getData() method handle error", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const streamClient = new StreamLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: settings - }); - - const data = await streamClient.getData({} as Message).catch(error => { - expect(error.message).to.be.equal("No data handle for this partition"); - }); - }); - - it("Should subscribe() method return data", async function() { - const mockedResponses = new Map(); - const headers = new Headers(); - headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-b5ff"); - - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const streamClient = new StreamLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: settings - }); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "stream", - version: "v2", - baseURL: "https://stream.data.api.platform.here.com/stream/v2", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); - - // Set the response of mocked partitions from metadata service. - mockedResponses.set( - `https://stream.data.api.platform.here.com/stream/v2/layers/test-layed-id/subscribe?subscriptionId=9141392.f96875c`, - new Response( - JSON.stringify({ - subscriptionId: "-9141392.f96875c-9422-4df4-b5ff-41a4f459" - }), - { headers } - ) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const request = new SubscribeRequest().withSubscriptionId( - "9141392.f96875c" - ); - - const result = await streamClient.subscribe(request); - - assert.isDefined(result); - expect(result).equal("-9141392.f96875c-9422-4df4-b5ff-41a4f459"); - }); - - it("Should poll() method get messages from stream layer", async function() { - const mockedResponses = new Map(); - const headers = new Headers(); - const commitOffsetsResponse = new Response("Ok"); - headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-bdfj"); - const mockResponse = { - messages: [ - { - metaData: { - partition: "314010583", - checksum: "ff7494d6f17da702862e550c907c0a91", - compressedDataSize: 152417, - dataSize: 100500, - data: "", - dataHandle: "iVBORw0-Lf9HdIZBfNEiKAA-AAAE-lFTkSuQmCC", - timestamp: 1517916706 - }, - offset: { - partition: 7, - offset: 38562 - } - }, - { - metaData: { - partition: "314010584", - checksum: "ff7494d6f17da702862e550c907c0a91", - dataSize: 100500, - data: "7n348c7y49nry394y39yv39y384tvn3984tvn34ty034ynt3yvt983ny", - dataHandle: "", - timestamp: 1517916707 - }, - offset: { - partition: 8, - offset: 38563 - } - } - ] - }; - - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const streamClient = new StreamLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: settings - }); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "stream", - version: "v2", - baseURL: "https://stream.data.api.platform.here.com/stream/v2", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); - - // Set the response of mocked partitions from metadata service. - mockedResponses.set( - `https://stream.data.api.platform.here.com/stream/v2/layers/test-layed-id/subscribe`, - new Response( - JSON.stringify({ - subscriptionId: "-9141392.f96875c-9422-4df4-b5ff-41a4f459", - nodeBaseURL: "nodeBaseUrl" - }), - { headers } - ) - ); - - mockedResponses.set( - "nodeBaseUrl/layers/test-layed-id/partitions?subscriptionId=-9141392.f96875c-9422-4df4-b5ff-41a4f459", - new Response(JSON.stringify(mockResponse), { headers }) - ); - - mockedResponses.set( - "nodeBaseUrl/layers/test-layed-id/offsets?subscriptionId=-9141392.f96875c-9422-4df4-b5ff-41a4f459", - new Response(JSON.stringify(commitOffsetsResponse)) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - const requestS = new SubscribeRequest(); - const subscribtionId = await streamClient.subscribe(requestS); - const requestP = new PollRequest().withSubscriptionId(subscribtionId); - const messages = await streamClient.poll(requestP); - - assert.isDefined(messages); - expect(messages.length).to.be.equal(2); - expect(messages[0].metaData.dataSize).to.be.equal(100500); - }); - - it("Should poll() method handle errors", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const streamClient = new StreamLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: settings - }); - - const request1 = new PollRequest().withMode("parallel"); - const messages1 = await streamClient.poll(request1).catch(error => { - expect(error.message).to.be.equal( - "Error: for 'parallel' mode 'subscriptionId' is required." - ); - }); - - const request2 = new PollRequest().withSubscriptionId("test-id"); - const messages2 = await streamClient.poll(request2).catch(error => { - expect(error.message).to.be.equal( - `No valid nodeBaseurl provided for the subscribtion id=test-id, please check your subscribtion` - ); - }); - }); - - it("Shoult unsubscribe() method cancel subscription", async function() { - const mockedResponses = new Map(); - const headers = new Headers(); - headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-b5ff"); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "stream", - version: "v2", - baseURL: "https://stream.data.api.platform.here.com/stream/v2", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); - - // Set the response of mocked partitions from metadata service. - mockedResponses.set( - `https://stream.data.api.platform.here.com/stream/v2/layers/test-layed-id/subscribe`, - new Response( - JSON.stringify({ - subscriptionId: "-9141392.f96875c-9422-4df4-b5ff-41a4f459", - nodeBaseURL: "nodeBaseUrl" - }), - { headers } - ) - ); - - mockedResponses.set( - "nodeBaseUrl/layers/test-layed-id/subscribe?subscriptionId=-9141392.f96875c-9422-4df4-b5ff-41a4f459", - new Response( - JSON.stringify({ - status: 200 - }) - ) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const streamClient = new StreamLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: settings - }); - - const subscribtionId = await streamClient.subscribe(new SubscribeRequest()); - const request = new UnsubscribeRequest().withSubscriptionId(subscribtionId); - const unsubscription = await streamClient.unsubscribe(request); - - assert.isDefined(unsubscription); - expect(unsubscription.status).to.be.equal(200); - }); - - it("Should unsubscribe() method handle errors", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const streamClient = new StreamLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: settings - }); - - const request1 = new UnsubscribeRequest().withMode("parallel"); - const messages1 = await streamClient.unsubscribe(request1).catch(error => { - expect(error.message).to.be.equal( - "Error: for 'parallel' mode 'subscriptionId' is required." - ); - }); - - const request2 = new UnsubscribeRequest().withSubscriptionId("test-id"); - const messages2 = await streamClient.unsubscribe(request2).catch(error => { - expect(error.message).to.be.equal( - `Subscribtion error. No valid nodeBaseurl provided for the subscribtion id=test-id, please check your subscribtion` - ); - }); - }); - - it("Should seek() method handle errors", async function() { - const mockedResponses = new Map(); - const headers = new Headers(); - headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-b5ff"); - const mockOffsets = { - offsets: [ - { - partition: 1, - offset: 1 - }, - { - partition: 2, - offset: 2 - } - ] - }; - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "stream", - version: "v2", - baseURL: "https://stream.data.api.platform.here.com/stream/v2", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]) - ) - ); - - // Set the response of mocked partitions from metadata service. - mockedResponses.set( - `https://stream.data.api.platform.here.com/stream/v2/layers/test-layed-id/subscribe?mode=serial&consumerId=consumer-id`, - new Response( - JSON.stringify({ - subscriptionId: "-9141392.f96875c-9422-4df4-b5ff-41a4f459", - nodeBaseURL: "nodeBaseUrl" - }), - { headers } - ) - ); - - mockedResponses.set( - "nodeBaseUrl/layers/test-layed-id/seek?subscriptionId=test-id&mode=serial", - new Response( - JSON.stringify({ - status: 200 - }) - ) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const streamClient = new StreamLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: settings - }); - - const request = new SeekRequest(); - const messages1 = await streamClient.seek(request).catch(error => { - expect(error.message).to.be.equal(`Error: offsets are required.`); - }); - - request.withSeekOffsets(mockOffsets); - - const messages2 = await streamClient - .seek(request.withMode("parallel")) - .catch(error => { - expect(error.message).to.be.equal( - "Error: for 'parallel' mode 'subscriptionId' is required." - ); - }); - - const messages3 = await streamClient - .seek(request.withSubscriptionId("test-id")) - .catch(error => { - expect(error.message).to.be.equal( - `Subscribtion error. No valid nodeBaseurl provided for the subscribtion id=test-id, please check your subscribtion` - ); - }); - - request.withMode("serial"); - const subRequest = new SubscribeRequest() - .withMode("serial") - .withConsumerId("consumer-id") - .withSubscriptionProperties({}); - const subscribtionId = await streamClient.subscribe(subRequest); - const messages4 = await streamClient.seek(request); - - assert.isDefined(messages4); - expect(messages4.status).to.be.equal(200); - }); -}); +/* + * Copyright (C) 2020-2026 HERE Europe B.V. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * License-Filename: LICENSE + */ + +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + StreamLayerClient, + SubscribeRequest, + PollRequest, + UnsubscribeRequest, + SeekRequest +} from "@here/olp-sdk-dataservice-read"; +import { FetchMock } from "../FetchMock"; +import { Buffer } from "buffer"; +import { Message } from "@here/olp-sdk-dataservice-api/lib/stream-api"; +import { HRN, OlpClientSettings } from "@here/olp-sdk-core"; + +describe("StreamLayerClient", function () { + let fetchMock: FetchMock; + let fetchStub: any; + + const testHRN = HRN.fromString("hrn:here:data:::test-hrn"); + const testLayerId = "test-layed-id"; + + beforeAll(function () {}); + + afterEach(function () { + vi.restoreAllMocks(); + }); + + beforeEach(function () { + fetchMock = new FetchMock(); + fetchStub = vi.spyOn(global as any, "fetch"); + fetchStub.mockImplementation(fetchMock.fetch()); + }); + + it("Shoud be initialized with StreamLayerClientParams", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + + const streamLayerClientParams = { + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }; + const streamLayerClient = new StreamLayerClient( + streamLayerClientParams + ); + + assert.isDefined(streamLayerClient); + expect(streamLayerClient).to.be.instanceOf(StreamLayerClient); + assert.equal(streamLayerClient["layerId"], "test-layed-id"); + }); + + it("Shoud getData() fetch data with dataHandle", async function () { + const mockedResponses = new Map(); + const mockedData = Buffer.alloc(42); + + const mockedMessage = { + metaData: { + partition: "314010583", + checksum: "ff7494d6f17da702862e550c907c0a91", + compressedDataSize: 152417, + dataSize: 250110, + data: "", + dataHandle: "8c0e5ac9-b036-4365-8820-dfcba64588fc", + timestamp: 1517916706 + }, + offset: { + partition: 7, + offset: 38562 + } + }; + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "blob", + version: "v1", + baseURL: + "https://blob.data.api.platform.here.com/blob/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); + + // Set the response of mocked partitions from metadata service. + mockedResponses.set( + `https://blob.data.api.platform.here.com/blob/v1/layers/test-layed-id/data/8c0e5ac9-b036-4365-8820-dfcba64588fc`, + new Response(mockedData) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const streamClient = new StreamLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: settings + }); + + const data = await streamClient.getData(mockedMessage); + + assert.isDefined(data); + expect(fetchStub.mock.calls.length).to.be.equal(2); + }); + + it("Should getData() method handle error", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const streamClient = new StreamLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: settings + }); + + const data = await streamClient + .getData({} as Message) + .catch((error) => { + expect(error.message).to.be.equal( + "No data handle for this partition" + ); + }); + }); + + it("Should subscribe() method return data", async function () { + const mockedResponses = new Map(); + const headers = new Headers(); + headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-b5ff"); + + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const streamClient = new StreamLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: settings + }); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "stream", + version: "v2", + baseURL: + "https://stream.data.api.platform.here.com/stream/v2", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); + + // Set the response of mocked partitions from metadata service. + mockedResponses.set( + `https://stream.data.api.platform.here.com/stream/v2/layers/test-layed-id/subscribe?subscriptionId=9141392.f96875c`, + new Response( + JSON.stringify({ + subscriptionId: "-9141392.f96875c-9422-4df4-b5ff-41a4f459" + }), + { headers } + ) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const request = new SubscribeRequest().withSubscriptionId( + "9141392.f96875c" + ); + + const result = await streamClient.subscribe(request); + + assert.isDefined(result); + expect(result).equal("-9141392.f96875c-9422-4df4-b5ff-41a4f459"); + }); + + it("Should poll() method get messages from stream layer", async function () { + const mockedResponses = new Map(); + const headers = new Headers(); + const commitOffsetsResponse = new Response("Ok"); + headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-bdfj"); + const mockResponse = { + messages: [ + { + metaData: { + partition: "314010583", + checksum: "ff7494d6f17da702862e550c907c0a91", + compressedDataSize: 152417, + dataSize: 100500, + data: "", + dataHandle: "iVBORw0-Lf9HdIZBfNEiKAA-AAAE-lFTkSuQmCC", + timestamp: 1517916706 + }, + offset: { + partition: 7, + offset: 38562 + } + }, + { + metaData: { + partition: "314010584", + checksum: "ff7494d6f17da702862e550c907c0a91", + dataSize: 100500, + data: "7n348c7y49nry394y39yv39y384tvn3984tvn34ty034ynt3yvt983ny", + dataHandle: "", + timestamp: 1517916707 + }, + offset: { + partition: 8, + offset: 38563 + } + } + ] + }; + + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const streamClient = new StreamLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: settings + }); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "stream", + version: "v2", + baseURL: + "https://stream.data.api.platform.here.com/stream/v2", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); + + // Set the response of mocked partitions from metadata service. + mockedResponses.set( + `https://stream.data.api.platform.here.com/stream/v2/layers/test-layed-id/subscribe`, + new Response( + JSON.stringify({ + subscriptionId: "-9141392.f96875c-9422-4df4-b5ff-41a4f459", + nodeBaseURL: "nodeBaseUrl" + }), + { headers } + ) + ); + + mockedResponses.set( + "nodeBaseUrl/layers/test-layed-id/partitions?subscriptionId=-9141392.f96875c-9422-4df4-b5ff-41a4f459", + new Response(JSON.stringify(mockResponse), { headers }) + ); + + mockedResponses.set( + "nodeBaseUrl/layers/test-layed-id/offsets?subscriptionId=-9141392.f96875c-9422-4df4-b5ff-41a4f459", + new Response(JSON.stringify(commitOffsetsResponse)) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + const requestS = new SubscribeRequest(); + const subscribtionId = await streamClient.subscribe(requestS); + const requestP = new PollRequest().withSubscriptionId(subscribtionId); + const messages = await streamClient.poll(requestP); + + assert.isDefined(messages); + expect(messages.length).to.be.equal(2); + expect(messages[0].metaData.dataSize).to.be.equal(100500); + }); + + it("Should poll() method handle errors", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const streamClient = new StreamLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: settings + }); + + const request1 = new PollRequest().withMode("parallel"); + const messages1 = await streamClient.poll(request1).catch((error) => { + expect(error.message).to.be.equal( + "Error: for 'parallel' mode 'subscriptionId' is required." + ); + }); + + const request2 = new PollRequest().withSubscriptionId("test-id"); + const messages2 = await streamClient.poll(request2).catch((error) => { + expect(error.message).to.be.equal( + `No valid nodeBaseurl provided for the subscribtion id=test-id, please check your subscribtion` + ); + }); + }); + + it("Shoult unsubscribe() method cancel subscription", async function () { + const mockedResponses = new Map(); + const headers = new Headers(); + headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-b5ff"); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "stream", + version: "v2", + baseURL: + "https://stream.data.api.platform.here.com/stream/v2", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); + + // Set the response of mocked partitions from metadata service. + mockedResponses.set( + `https://stream.data.api.platform.here.com/stream/v2/layers/test-layed-id/subscribe`, + new Response( + JSON.stringify({ + subscriptionId: "-9141392.f96875c-9422-4df4-b5ff-41a4f459", + nodeBaseURL: "nodeBaseUrl" + }), + { headers } + ) + ); + + mockedResponses.set( + "nodeBaseUrl/layers/test-layed-id/subscribe?subscriptionId=-9141392.f96875c-9422-4df4-b5ff-41a4f459", + new Response( + JSON.stringify({ + status: 200 + }) + ) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const streamClient = new StreamLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: settings + }); + + const subscribtionId = await streamClient.subscribe( + new SubscribeRequest() + ); + const request = new UnsubscribeRequest().withSubscriptionId( + subscribtionId + ); + const unsubscription = await streamClient.unsubscribe(request); + + assert.isDefined(unsubscription); + expect(unsubscription.status).to.be.equal(200); + }); + + it("Should unsubscribe() method handle errors", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const streamClient = new StreamLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: settings + }); + + const request1 = new UnsubscribeRequest().withMode("parallel"); + const messages1 = await streamClient + .unsubscribe(request1) + .catch((error) => { + expect(error.message).to.be.equal( + "Error: for 'parallel' mode 'subscriptionId' is required." + ); + }); + + const request2 = new UnsubscribeRequest().withSubscriptionId("test-id"); + const messages2 = await streamClient + .unsubscribe(request2) + .catch((error) => { + expect(error.message).to.be.equal( + `Subscribtion error. No valid nodeBaseurl provided for the subscribtion id=test-id, please check your subscribtion` + ); + }); + }); + + it("Should seek() method handle errors", async function () { + const mockedResponses = new Map(); + const headers = new Headers(); + headers.append("X-Correlation-Id", "9141392.f96875c-9422-4df4-b5ff"); + const mockOffsets = { + offsets: [ + { + partition: 1, + offset: 1 + }, + { + partition: 2, + offset: 2 + } + ] + }; + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "stream", + version: "v2", + baseURL: + "https://stream.data.api.platform.here.com/stream/v2", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]) + ) + ); + + // Set the response of mocked partitions from metadata service. + mockedResponses.set( + `https://stream.data.api.platform.here.com/stream/v2/layers/test-layed-id/subscribe?mode=serial&consumerId=consumer-id`, + new Response( + JSON.stringify({ + subscriptionId: "-9141392.f96875c-9422-4df4-b5ff-41a4f459", + nodeBaseURL: "nodeBaseUrl" + }), + { headers } + ) + ); + + mockedResponses.set( + "nodeBaseUrl/layers/test-layed-id/seek?subscriptionId=test-id&mode=serial", + new Response( + JSON.stringify({ + status: 200 + }) + ) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const streamClient = new StreamLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: settings + }); + + const request = new SeekRequest(); + const messages1 = await streamClient.seek(request).catch((error) => { + expect(error.message).to.be.equal(`Error: offsets are required.`); + }); + + request.withSeekOffsets(mockOffsets); + + const messages2 = await streamClient + .seek(request.withMode("parallel")) + .catch((error) => { + expect(error.message).to.be.equal( + "Error: for 'parallel' mode 'subscriptionId' is required." + ); + }); + + const messages3 = await streamClient + .seek(request.withSubscriptionId("test-id")) + .catch((error) => { + expect(error.message).to.be.equal( + `Subscribtion error. No valid nodeBaseurl provided for the subscribtion id=test-id, please check your subscribtion` + ); + }); + + request.withMode("serial"); + const subRequest = new SubscribeRequest() + .withMode("serial") + .withConsumerId("consumer-id") + .withSubscriptionProperties({}); + const subscribtionId = await streamClient.subscribe(subRequest); + const messages4 = await streamClient.seek(request); + + assert.isDefined(messages4); + expect(messages4.status).to.be.equal(200); + }); +}); diff --git a/tests/integration/olp-sdk-dataservice-read/VersionedLayerClient.test.ts b/tests/integration/olp-sdk-dataservice-read/VersionedLayerClient.test.ts index 78fd13df..f929a9cf 100644 --- a/tests/integration/olp-sdk-dataservice-read/VersionedLayerClient.test.ts +++ b/tests/integration/olp-sdk-dataservice-read/VersionedLayerClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,1171 +17,1210 @@ * License-Filename: LICENSE */ -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - VersionedLayerClient, - PartitionsRequest, - DataRequest, - QuadKeyPartitionsRequest, - TileRequest + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + VersionedLayerClient, + PartitionsRequest, + DataRequest, + QuadKeyPartitionsRequest, + TileRequest } from "@here/olp-sdk-dataservice-read"; import { FetchMock } from "../FetchMock"; import { Buffer } from "buffer"; import { - FetchOptions, - HRN, - LIB_VERSION, - OlpClientSettings, - TileKey + FetchOptions, + HRN, + LIB_VERSION, + OlpClientSettings, + TileKey } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("VersionedLayerClient", function() { - let fetchMock: FetchMock; - let sandbox: sinon.SinonSandbox; - let fetchStub: sinon.SinonStub; - - const testHRN = HRN.fromString("hrn:here:data:::test-hrn"); - const testLayerId = "test-layed-id"; - const headers = new Headers(); - headers.append("cache-control", "max-age=3600"); - - before(function() { - sandbox = sinon.createSandbox(); - }); +describe("VersionedLayerClient", function () { + let fetchMock: FetchMock; + let fetchStub: any; - afterEach(function() { - sandbox.restore(); - }); + const testHRN = HRN.fromString("hrn:here:data:::test-hrn"); + const testLayerId = "test-layed-id"; + const headers = new Headers(); + headers.append("cache-control", "max-age=3600"); - beforeEach(function() { - fetchMock = new FetchMock(); - fetchStub = sandbox.stub(global as any, "fetch"); - fetchStub.callsFake(fetchMock.fetch()); - }); + beforeAll(function () {}); - it("Shoud be initialized with settings", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VersionedLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings - }); - assert.isDefined(layerClient); - expect(layerClient).to.be.instanceOf(VersionedLayerClient); - }); - - it("Shoud be initialization error be handled", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - try { - const layerClient = new VersionedLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "", - settings - }); - } catch (error) { - expect(error.message).equal("Unsupported parameters"); - } - }); - - it("Shoud be initialized with VersionedLayerClientParams with version", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + afterEach(function () { + vi.restoreAllMocks(); }); - const versionedLayerClientParams = { - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: settings, - version: 5 - }; - const layerClientWithVersion = new VersionedLayerClient( - versionedLayerClientParams - ); - assert.isDefined(layerClientWithVersion); - expect(layerClientWithVersion).to.be.instanceOf(VersionedLayerClient); - }); - - it("Shoud be initialised with VersionedLayerClientParams without version", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + beforeEach(function () { + fetchMock = new FetchMock(); + fetchStub = vi.spyOn(global as any, "fetch"); + fetchStub.mockImplementation(fetchMock.fetch()); }); - const versionedLayerClientParams = { - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings - }; - const layerClientWithoutVersion = new VersionedLayerClient( - versionedLayerClientParams - ); - assert.isDefined(layerClientWithoutVersion); - expect(layerClientWithoutVersion).to.be.instanceOf(VersionedLayerClient); - }); - - it("Shoud be fetched partitions metadata for specific IDs", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api with the info about Query API. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "metadata", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - mockedResponses.set( - `https://query.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, - new Response(JSON.stringify({ version: 128 }), { headers }) - ); - - // Set the response with mocked partitions for IDs 100 and 1000 from Query service - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/partitions?partition=100&partition=1000&version=128`, - new Response( - JSON.stringify({ - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "100", - version: 2 - }, - { - checksum: "123f66029c232400e3403cd6e9cfd45b", - compressedDataSize: 2084, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", - dataSize: 2084, - crc: "c3f2766y", - partition: "1000", - version: 2 - } - ] - }), - { headers } - ) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - // Setup Layer Client with new OlpClientSettings. - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + it("Shoud be initialized with settings", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VersionedLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + assert.isDefined(layerClient); + expect(layerClient).to.be.instanceOf(VersionedLayerClient); }); - const layerClient = new VersionedLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings - }); - - // Setup PartitionsRequest to filter response by partition IDs 100 and 1000. - const request = new PartitionsRequest().withPartitionIds(["100", "1000"]); - // Send request for partitions metadata. - const partitions = await layerClient.getPartitions(request).catch(error => { - console.log(`Error getting partitions: ${error}`); + it("Shoud be initialization error be handled", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + try { + const layerClient = new VersionedLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "", + settings + }); + } catch (error) { + expect(error.message).equal("Unsupported parameters"); + } }); - // Check if partitions fetched succesful. - assert.isDefined(partitions); - - if (partitions) { - // Check if partitions returns as expected. - expect(partitions.partitions[0].dataHandle).to.be.equal( - "1b2ca68f-d4a0-4379-8120-cd025640510c" - ); - expect(partitions.partitions[1].dataHandle).to.be.equal( - "1b2ca68f-d4a0-4379-8120-cd025640578e" - ); - expect(partitions.partitions[2]).to.be.undefined; - - /** - * Check if the count of requests are as expected. Should be called 3 times. - * One to the lookup service - * for the baseURL to the Query service, one for the latest version, - * and last one to the query service. - */ - expect(fetchStub.callCount).to.be.equal(3); - } - }); - - it("Shoud be fetched partitions all metadata", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - // Set the response from Metadata service with the info about latest catalog version. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, - new Response(JSON.stringify({ version: 128 }), { headers }) - ); - - // Set the response of mocked partitions from metadata service. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?version=128`, - new Response( - JSON.stringify({ - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "314010583", - version: 1 - }, - { - checksum: "123f66029c232400e3403cd6e9cfd45b", - compressedDataSize: 2084, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", - dataSize: 2084, - crc: "c3f2766y", - partition: "1000", - version: 2 - }, - { - checksum: "123f66029c232400e3403cd6e9cfd345", - compressedDataSize: 2084, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd0256405444", - dataSize: 2084, - crc: "c3f2766y", - partition: "1000", - version: 2 - }, - { - checksum: "123f66029c232400e3403cd6e9cfd234", - compressedDataSize: 2084, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd0256405555", - dataSize: 2084, - crc: "c3f2766y", - partition: "1000", - version: 2 - } - ], - next: "/uri/to/next/page" - }), - { headers } - ) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - // Setup Layer Client with new OlpClientSettings. - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VersionedLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings + it("Shoud be initialized with VersionedLayerClientParams with version", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + + const versionedLayerClientParams = { + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: settings, + version: 5 + }; + const layerClientWithVersion = new VersionedLayerClient( + versionedLayerClientParams + ); + assert.isDefined(layerClientWithVersion); + expect(layerClientWithVersion).to.be.instanceOf(VersionedLayerClient); }); - // Setup PartitionsRequest without any parameters - const request = new PartitionsRequest(); - - // Send request for partitions metadata. - const partitions = await layerClient.getPartitions(request); - - // Check if partitions fetched succesful. - assert.isDefined(partitions); - - if (partitions) { - // Check if partitions returns as expected. - expect(partitions.partitions[0].dataHandle).to.be.equal( - "1b2ca68f-d4a0-4379-8120-cd025640510c" - ); - expect(partitions.partitions[1].dataHandle).to.be.equal( - "1b2ca68f-d4a0-4379-8120-cd025640578e" - ); - expect(partitions.partitions.length).to.be.equal(4); - } - - /** - * Check if the count of requests are as expected. - * Should be called 3 times. One to the lookup service - * for the baseURL to the Metadata service, the second - * one to the Metadata service for getting the latest version - * of catalog and another one to the metadata service for the partitions metadata. - */ - expect(fetchStub.callCount).to.be.equal(3); - }); - - it("Shoud be fetched data with dataHandle", async function() { - const mockedResponses = new Map(); - const mockedDataHandle = "1b2ca68f-d4a0-4379-8120-cd025640510c"; - const mockedData = Buffer.alloc(42); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "blob", - version: "v1", - baseURL: "https://blob.data.api.platform.here.com/blob/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - // Set the response of mocked partitions from metadata service. - mockedResponses.set( - `https://blob.data.api.platform.here.com/blob/v1/layers/test-layed-id/data/1b2ca68f-d4a0-4379-8120-cd025640510c`, - new Response(mockedData, { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VersionedLayerClient({ - catalogHrn: testHRN, - layerId: testLayerId, - settings - }); - const request = new DataRequest().withDataHandle(mockedDataHandle); - - const data = await layerClient.getData(request); - - assert.isDefined(data); - expect(fetchStub.callCount).to.be.equal(2); // 1 - lookup, 1 - blob - }); - - it("Shoud be fetched data with PartitionId", async function() { - const mockedResponses = new Map(); - const mockedPartitionId = "0000042"; - const mockedData = Buffer.alloc(42); - const mockedPartitionsIdData = { - partitions: [ - { - version: 1, - partition: "0000042", - dataHandle: "3C3BE24A341D82321A9BA9075A7EF498.123" - }, - { - version: 42, - partition: "0000013", - dataHandle: "3C3BE24A341D82321A9BA9075A7EF498.123" - } - ] - }; - - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/partitions?partition=0000042&version=42`, - new Response(JSON.stringify(mockedPartitionsIdData), { headers }) - ); - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, - new Response(JSON.stringify({ version: 42 }), { headers }) - ); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "blob", - version: "v1", - baseURL: "https://blob.data.api.platform.here.com/blob/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - // Set the response of mocked partitions from metadata service. - mockedResponses.set( - `https://blob.data.api.platform.here.com/blob/v1/layers/test-layed-id/data/3C3BE24A341D82321A9BA9075A7EF498.123`, - new Response(mockedData, { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VersionedLayerClient({ - catalogHrn: testHRN, - layerId: testLayerId, - settings - }); - const request = new DataRequest().withPartitionId(mockedPartitionId); - - const data = await layerClient.getData(request); - - assert.isDefined(data); - expect(fetchStub.callCount).to.be.equal(4); - }); - - it("Shoud read partitions metadata by QuadKey for specific VersionLayer", async function() { - const mockedResponses = new Map(); - - const billingTag = "billingTag"; - const mockedVersion = 42; - const mockedDepth = 3; - const mockedQuadKey = { - row: 1, - column: 2, - level: 3 - }; - - // Set the response from lookup api with the info about Query API. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - // Set the response with mocked partitions - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/versions/42/quadkeys/70/depths/3`, - new Response( - JSON.stringify({ - parentQuads: [ - { - additionalMetadata: "string", - checksum: "string", - compressedDataSize: 0, - dataHandle: "675911FF6236B7C7604BF8B105F1BB58", - dataSize: 0, - crc: "c3f276d7", - partition: "73982", - version: 0 - } - ], - subQuads: [ - { - additionalMetadata: "string", - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 200, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - subQuadKey: "string", - version: 1 - } - ] - }), - { headers } - ) - ); - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1&billingTag=billingTag`, - new Response(JSON.stringify({ version: 42 }), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - // Setup Layer Client with new OlpClientSettings. - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VersionedLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings, - version: mockedVersion + it("Shoud be initialised with VersionedLayerClientParams without version", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + + const versionedLayerClientParams = { + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }; + const layerClientWithoutVersion = new VersionedLayerClient( + versionedLayerClientParams + ); + assert.isDefined(layerClientWithoutVersion); + expect(layerClientWithoutVersion).to.be.instanceOf( + VersionedLayerClient + ); }); - const quadKeyPartitionsRequest = new QuadKeyPartitionsRequest(); - assert.isDefined(quadKeyPartitionsRequest); - expect(quadKeyPartitionsRequest).be.instanceOf(QuadKeyPartitionsRequest); - - const quadKeyPartitionsRequestWithDepth = quadKeyPartitionsRequest.withDepth( - mockedDepth - ); - const quadKeyPartitionsRequestWithQuadKey = quadKeyPartitionsRequest.withQuadKey( - mockedQuadKey - ); - const quadKeyPartitionsRequestWithBillTag = quadKeyPartitionsRequest.withBillingTag( - billingTag - ); - expect(quadKeyPartitionsRequestWithDepth.getDepth()).to.be.equal( - mockedDepth - ); - expect(quadKeyPartitionsRequestWithQuadKey.getQuadKey()).to.be.equal( - mockedQuadKey - ); - expect(quadKeyPartitionsRequestWithBillTag.getBillingTag()).to.be.equal( - billingTag - ); - - const partitions = await layerClient.getPartitions( - quadKeyPartitionsRequest - ); - - if (partitions.parentQuads) { - expect(partitions.parentQuads[0].partition).to.be.equal("73982"); - } - }); - - it("Shoud read partitions with additionalFields parameter from PartitionsRequest", async function() { - const mockedResponses = new Map(); - - const mockedPartitions = { - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "314010583" - }, - { - checksum: "123f66029c232400e3403cd6e9cfd45b", - compressedDataSize: 2084, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", - dataSize: 2084, - crc: "c3f2766y", - partition: "1000" + it("Shoud be fetched partitions metadata for specific IDs", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api with the info about Query API. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "metadata", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + mockedResponses.set( + `https://query.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, + new Response(JSON.stringify({ version: 128 }), { headers }) + ); + + // Set the response with mocked partitions for IDs 100 and 1000 from Query service + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/partitions?partition=100&partition=1000&version=128`, + new Response( + JSON.stringify({ + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "100", + version: 2 + }, + { + checksum: "123f66029c232400e3403cd6e9cfd45b", + compressedDataSize: 2084, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", + dataSize: 2084, + crc: "c3f2766y", + partition: "1000", + version: 2 + } + ] + }), + { headers } + ) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + // Setup Layer Client with new OlpClientSettings. + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VersionedLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + + // Setup PartitionsRequest to filter response by partition IDs 100 and 1000. + const request = new PartitionsRequest().withPartitionIds([ + "100", + "1000" + ]); + + // Send request for partitions metadata. + const partitions = await layerClient + .getPartitions(request) + .catch((error) => { + console.log(`Error getting partitions: ${error}`); + }); + + // Check if partitions fetched succesful. + assert.isDefined(partitions); + + if (partitions) { + // Check if partitions returns as expected. + expect(partitions.partitions[0].dataHandle).to.be.equal( + "1b2ca68f-d4a0-4379-8120-cd025640510c" + ); + expect(partitions.partitions[1].dataHandle).to.be.equal( + "1b2ca68f-d4a0-4379-8120-cd025640578e" + ); + expect(partitions.partitions[2]).to.be.undefined; + + /** + * Check if the count of requests are as expected. Should be called 3 times. + * One to the lookup service + * for the baseURL to the Query service, one for the latest version, + * and last one to the query service. + */ + expect(fetchStub.mock.calls.length).to.be.equal(3); } - ], - next: "/uri/to/next/page" - }; - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - // Set the response from Metadata service with the info about latest catalog version. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1&billingTag=billing-tag`, - new Response(JSON.stringify({ version: 30 }), { headers }) - ); - - // Set the response of mocked partitions with additional fields. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?version=30&additionalFields=dataSize,checksum,compressedDataSize&billingTag=billing-tag`, - new Response(JSON.stringify(mockedPartitions), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - // Setup Layer Client with new OlpClientSettings. - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VersionedLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings }); - const requestWithAdditionalFields = new PartitionsRequest() - .withAdditionalFields(["dataSize", "checksum", "compressedDataSize"]) - .withFetchOption(FetchOptions.OnlineIfNotFound) - .withBillingTag("billing-tag"); - - const partitions = await layerClient.getPartitions( - requestWithAdditionalFields - ); - - expect(partitions.partitions[0].checksum).to.be.equal( - mockedPartitions.partitions[0].checksum - ); - expect(partitions.partitions[1].compressedDataSize).to.be.equal( - mockedPartitions.partitions[1].compressedDataSize - ); - expect(partitions.partitions[1].dataSize).to.be.equal( - mockedPartitions.partitions[1].dataSize - ); - }); - - it("Shoud read partitions with additionalFields parameter from QuadKeyPartitionsRequest", async function() { - const mockedResponses = new Map(); - - const mockedQuadKey = { - row: 1, - column: 2, - level: 3 - }; - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, - new Response(JSON.stringify({ version: 30 }), { headers }) - ); - - // Set the response from lookup api with the info about Query API. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedPartitions = { - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "314010583" - }, - { - checksum: "123f66029c232400e3403cd6e9cfd45b", - compressedDataSize: 2084, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", - dataSize: 2084, - crc: "c3f2766y", - partition: "1000" + it("Shoud be fetched partitions all metadata", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + // Set the response from Metadata service with the info about latest catalog version. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, + new Response(JSON.stringify({ version: 128 }), { headers }) + ); + + // Set the response of mocked partitions from metadata service. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?version=128`, + new Response( + JSON.stringify({ + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "314010583", + version: 1 + }, + { + checksum: "123f66029c232400e3403cd6e9cfd45b", + compressedDataSize: 2084, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", + dataSize: 2084, + crc: "c3f2766y", + partition: "1000", + version: 2 + }, + { + checksum: "123f66029c232400e3403cd6e9cfd345", + compressedDataSize: 2084, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd0256405444", + dataSize: 2084, + crc: "c3f2766y", + partition: "1000", + version: 2 + }, + { + checksum: "123f66029c232400e3403cd6e9cfd234", + compressedDataSize: 2084, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd0256405555", + dataSize: 2084, + crc: "c3f2766y", + partition: "1000", + version: 2 + } + ], + next: "/uri/to/next/page" + }), + { headers } + ) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + // Setup Layer Client with new OlpClientSettings. + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VersionedLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + + // Setup PartitionsRequest without any parameters + const request = new PartitionsRequest(); + + // Send request for partitions metadata. + const partitions = await layerClient.getPartitions(request); + + // Check if partitions fetched succesful. + assert.isDefined(partitions); + + if (partitions) { + // Check if partitions returns as expected. + expect(partitions.partitions[0].dataHandle).to.be.equal( + "1b2ca68f-d4a0-4379-8120-cd025640510c" + ); + expect(partitions.partitions[1].dataHandle).to.be.equal( + "1b2ca68f-d4a0-4379-8120-cd025640578e" + ); + expect(partitions.partitions.length).to.be.equal(4); } - ], - next: "/uri/to/next/page" - }; - - // Set the response of mocked partitions with additional fields. - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/versions/30/quadkeys/70/depths/0?additionalFields=dataSize,checksum,compressedDataSize`, - new Response(JSON.stringify(mockedPartitions), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - // Setup Layer Client with new OlpClientSettings. - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VersionedLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings - }); - - const quadKeyPartitionsRequest = new QuadKeyPartitionsRequest(); - assert.isDefined(quadKeyPartitionsRequest); - expect(quadKeyPartitionsRequest).be.instanceOf(QuadKeyPartitionsRequest); - const quadKeyPartitionsRequestWithQuadKey = quadKeyPartitionsRequest.withQuadKey( - mockedQuadKey - ); - const quadKeyPartitionsRequestWithAdditionalFields = quadKeyPartitionsRequest.withAdditionalFields( - ["dataSize", "checksum", "compressedDataSize"] - ); - - const partitions = await layerClient.getPartitions( - quadKeyPartitionsRequestWithAdditionalFields - ); - - assert.isDefined(partitions); - }); - - it("GetAggregatedData", async function() { - const mockedResponses = new Map(); - const headers = new Headers(); - headers.append("cache-control", "max-age=3600"); + /** + * Check if the count of requests are as expected. + * Should be called 3 times. One to the lookup service + * for the baseURL to the Metadata service, the second + * one to the Metadata service for getting the latest version + * of catalog and another one to the metadata service for the partitions metadata. + */ + expect(fetchStub.mock.calls.length).to.be.equal(3); + }); - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "blob", - version: "v1", - baseURL: - "https://blob.data.api.platform.here.com/hrn:here:data:::test-hrn/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "query", - version: "v1", - baseURL: - "https://query.data.api.platform.here.com/hrn:here:data:::test-hrn/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - mockedResponses.set( - `https://query.data.api.platform.here.com/hrn:here:data:::test-hrn/v1/layers/mocked-layer/versions/123/quadkeys/24414/depths/4`, - new Response( - `{"subQuads":[{"subQuadKey":"64","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"65","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"66","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"67","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"68","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"69","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"70","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"71","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"72","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"73","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"74","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"75","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"76","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"77","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"78","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"79","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"80","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"81","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"82","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"83","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"84","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"85","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"86","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"87","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"88","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"89","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"90","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"91","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"92","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"93","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"94","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"95","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"96","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"97","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"98","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"99","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"100","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"101","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"102","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"103","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"104","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"105","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"106","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"107","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"108","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"109","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"110","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"111","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"112","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"113","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"114","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"115","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"116","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"117","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"118","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"119","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"120","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"121","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"122","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"123","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"124","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"125","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"126","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"127","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"1","version":309,"dataHandle":"9E835327487159C24CC3BD9ABC1D9D8D.309"},{"subQuadKey":"16","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"17","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"18","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"19","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"20","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"21","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"22","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"23","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"24","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"25","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"26","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"27","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"28","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"29","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"30","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"31","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"256","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"257","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"258","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"259","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"260","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"261","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"262","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"263","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"264","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"265","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"266","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"267","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"268","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"269","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"270","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"271","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"272","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"273","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"274","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"275","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"276","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"277","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"278","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"279","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"280","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"281","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"282","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"283","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"284","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"285","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"286","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"287","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"288","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"289","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"290","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"291","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"292","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"293","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"294","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"295","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"296","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"297","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"298","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"299","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"300","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"301","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"302","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"303","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"304","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"305","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"306","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"307","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"308","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"309","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"310","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"311","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"312","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"313","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"314","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"315","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"316","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"317","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"318","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"319","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"320","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"321","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"322","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"323","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"324","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"325","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"326","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"327","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"328","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"329","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"330","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"331","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"332","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"333","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"334","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"335","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"336","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"337","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"338","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"339","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"340","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"341","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"342","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"343","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"344","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"345","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"346","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"347","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"348","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"349","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"350","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"351","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"352","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"353","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"354","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"355","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"356","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"357","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"358","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"359","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"360","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"361","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"362","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"363","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"364","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"365","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"366","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"367","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"368","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"369","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"370","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"371","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"372","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"373","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"374","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"375","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"376","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"377","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"378","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"379","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"380","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"381","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"382","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"383","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"384","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"385","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"386","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"387","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"388","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"389","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"390","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"391","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"392","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"393","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"394","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"395","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"396","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"397","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"398","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"399","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"400","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"401","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"402","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"403","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"404","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"405","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"406","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"407","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"408","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"409","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"410","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"411","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"412","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"413","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"414","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"415","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"416","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"417","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"418","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"419","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"420","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"421","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"422","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"423","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"424","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"425","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"426","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"427","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"428","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"429","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"430","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"431","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"432","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"433","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"434","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"435","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"436","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"437","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"438","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"439","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"440","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"441","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"442","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"443","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"444","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"445","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"446","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"447","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"448","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"449","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"450","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"451","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"452","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"453","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"454","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"455","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"456","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"457","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"458","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"459","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"460","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"461","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"462","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"463","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"464","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"465","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"466","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"467","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"468","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"469","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"470","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"471","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"472","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"473","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"474","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"475","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"476","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"477","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"478","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"479","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"480","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"481","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"482","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"483","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"484","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"485","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"486","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"487","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"488","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"489","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"490","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"491","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"492","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"493","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"494","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"495","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"496","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"497","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"498","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"499","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"500","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"501","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"502","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"503","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"504","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"505","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"506","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"507","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"508","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"509","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"510","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"511","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"4","version":309,"dataHandle":"8941BA72534EA59DC78AA066874F3F46.309"},{"subQuadKey":"5","version":309,"dataHandle":"8941BA72534EA59DC78AA066874F3F46.309"},{"subQuadKey":"6","version":309,"dataHandle":"0357B7D8E5E267C27A40375EEFD8CBDF.309"},{"subQuadKey":"7","version":309,"dataHandle":"0357B7D8E5E267C27A40375EEFD8CBDF.309"}],"parentQuads":[{"partition":"1525","version":309,"dataHandle":"5FA96A639F78245CCA052E6CA1B2E356.309"},{"partition":"23","version":311,"dataHandle":"E49841168CC61793C19635AB788B19F0.311"},{"partition":"381","version":309,"dataHandle":"B5496E024A5BBDB0AE8A7BD38614BB81.309"},{"partition":"5","version":311,"dataHandle":"48FBFF69B74F5B5CEEAE0D410ACF3783.311"},{"partition":"6103","version":309,"dataHandle":"B003789C316D46D70BDB0B4D02AE654A.309"},{"partition":"95","version":309,"dataHandle":"A46A7D44C6DB3C2880A0076FAE4098AF.309"}]}` - ) - ); - - mockedResponses.set( - `https://blob.data.api.platform.here.com/hrn:here:data:::test-hrn/v1/layers/mocked-layer/data/5D220F614ED66FDD4850E9846482193A.309`, - new Response(Buffer.alloc(100)) - ); - - mockedResponses.set( - `https://blob.data.api.platform.here.com/hrn:here:data:::test-hrn/v1/layers/mocked-layer/data/436735897B05C80C449B1D654541DE5E.309`, - new Response(Buffer.alloc(300)) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + it("Shoud be fetched data with dataHandle", async function () { + const mockedResponses = new Map(); + const mockedDataHandle = "1b2ca68f-d4a0-4379-8120-cd025640510c"; + const mockedData = Buffer.alloc(42); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "blob", + version: "v1", + baseURL: + "https://blob.data.api.platform.here.com/blob/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + // Set the response of mocked partitions from metadata service. + mockedResponses.set( + `https://blob.data.api.platform.here.com/blob/v1/layers/test-layed-id/data/1b2ca68f-d4a0-4379-8120-cd025640510c`, + new Response(mockedData, { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VersionedLayerClient({ + catalogHrn: testHRN, + layerId: testLayerId, + settings + }); + const request = new DataRequest().withDataHandle(mockedDataHandle); + + const data = await layerClient.getData(request); + + assert.isDefined(data); + expect(fetchStub.mock.calls.length).to.be.equal(2); // 1 - lookup, 1 - blob }); - const layerClient = new VersionedLayerClient({ - catalogHrn: testHRN, - layerId: "mocked-layer", - settings, - version: 123 + it("Shoud be fetched data with PartitionId", async function () { + const mockedResponses = new Map(); + const mockedPartitionId = "0000042"; + const mockedData = Buffer.alloc(42); + const mockedPartitionsIdData = { + partitions: [ + { + version: 1, + partition: "0000042", + dataHandle: "3C3BE24A341D82321A9BA9075A7EF498.123" + }, + { + version: 42, + partition: "0000013", + dataHandle: "3C3BE24A341D82321A9BA9075A7EF498.123" + } + ] + }; + + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/partitions?partition=0000042&version=42`, + new Response(JSON.stringify(mockedPartitionsIdData), { headers }) + ); + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, + new Response(JSON.stringify({ version: 42 }), { headers }) + ); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "blob", + version: "v1", + baseURL: + "https://blob.data.api.platform.here.com/blob/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + // Set the response of mocked partitions from metadata service. + mockedResponses.set( + `https://blob.data.api.platform.here.com/blob/v1/layers/test-layed-id/data/3C3BE24A341D82321A9BA9075A7EF498.123`, + new Response(mockedData, { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VersionedLayerClient({ + catalogHrn: testHRN, + layerId: testLayerId, + settings + }); + const request = new DataRequest().withPartitionId(mockedPartitionId); + + const data = await layerClient.getData(request); + + assert.isDefined(data); + expect(fetchStub.mock.calls.length).to.be.equal(4); }); - const request = new TileRequest(); - - const response = await layerClient.getAggregatedData( - request.withTileKey({ row: 818, column: 2021, level: 11 }) - ); - const response2 = await layerClient.getAggregatedData( - request.withTileKey({ row: 819, column: 2021, level: 11 }) - ); - - assert.isDefined(response); - assert.isDefined(response2); - - expect((await response.blob()).size).to.be.equals(100); - expect((await response2.blob()).size).to.be.equals(300); - - /** - * Should be 5 calls: - * 1 - lookup - * 2 - query - * 3 - blob - * 4 - blob - */ - expect(fetchStub.callCount).to.be.equal(4); - }); - - it("Shoud fetch partitions with additionalFields if cached the same partitions, but without additionalFields", async function() { - const mockedResponses = new Map(); - - const mockedPartitions = { - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - partition: "314010583" - }, - { - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", - partition: "1000" - } - ], - next: "/uri/to/next/page" - }; - - const mockedPartitionsWithAdditionalFields = { - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "314010583" - }, - { - checksum: "123f66029c232400e3403cd6e9cfd45b", - compressedDataSize: 2084, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", - dataSize: 2084, - crc: "c3f2766y", - partition: "1000" + it("Shoud read partitions metadata by QuadKey for specific VersionLayer", async function () { + const mockedResponses = new Map(); + + const billingTag = "billingTag"; + const mockedVersion = 42; + const mockedDepth = 3; + const mockedQuadKey = { + row: 1, + column: 2, + level: 3 + }; + + // Set the response from lookup api with the info about Query API. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + // Set the response with mocked partitions + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/versions/42/quadkeys/70/depths/3`, + new Response( + JSON.stringify({ + parentQuads: [ + { + additionalMetadata: "string", + checksum: "string", + compressedDataSize: 0, + dataHandle: "675911FF6236B7C7604BF8B105F1BB58", + dataSize: 0, + crc: "c3f276d7", + partition: "73982", + version: 0 + } + ], + subQuads: [ + { + additionalMetadata: "string", + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 200, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + subQuadKey: "string", + version: 1 + } + ] + }), + { headers } + ) + ); + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1&billingTag=billingTag`, + new Response(JSON.stringify({ version: 42 }), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + // Setup Layer Client with new OlpClientSettings. + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VersionedLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings, + version: mockedVersion + }); + + const quadKeyPartitionsRequest = new QuadKeyPartitionsRequest(); + assert.isDefined(quadKeyPartitionsRequest); + expect(quadKeyPartitionsRequest).be.instanceOf( + QuadKeyPartitionsRequest + ); + + const quadKeyPartitionsRequestWithDepth = + quadKeyPartitionsRequest.withDepth(mockedDepth); + const quadKeyPartitionsRequestWithQuadKey = + quadKeyPartitionsRequest.withQuadKey(mockedQuadKey); + const quadKeyPartitionsRequestWithBillTag = + quadKeyPartitionsRequest.withBillingTag(billingTag); + expect(quadKeyPartitionsRequestWithDepth.getDepth()).to.be.equal( + mockedDepth + ); + expect(quadKeyPartitionsRequestWithQuadKey.getQuadKey()).to.be.equal( + mockedQuadKey + ); + expect(quadKeyPartitionsRequestWithBillTag.getBillingTag()).to.be.equal( + billingTag + ); + + const partitions = await layerClient.getPartitions( + quadKeyPartitionsRequest + ); + + if (partitions.parentQuads) { + expect(partitions.parentQuads[0].partition).to.be.equal("73982"); } - ], - next: "/uri/to/next/page" - }; - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - // Set the response from Metadata service with the info about latest catalog version. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1&billingTag=billing-tag`, - new Response(JSON.stringify({ version: 30 }), { headers }) - ); - - // Set the response of mocked partitions without additional fields. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?version=30&billingTag=billing-tag`, - new Response(JSON.stringify(mockedPartitions), { headers }) - ); - - // Set the response of mocked partitions with additional fields. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?version=30&additionalFields=dataSize,checksum,compressedDataSize&billingTag=billing-tag`, - new Response(JSON.stringify(mockedPartitionsWithAdditionalFields), { - headers - }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - // Setup Layer Client with new OlpClientSettings. - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") }); - const layerClient = new VersionedLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings + + it("Shoud read partitions with additionalFields parameter from PartitionsRequest", async function () { + const mockedResponses = new Map(); + + const mockedPartitions = { + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "314010583" + }, + { + checksum: "123f66029c232400e3403cd6e9cfd45b", + compressedDataSize: 2084, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", + dataSize: 2084, + crc: "c3f2766y", + partition: "1000" + } + ], + next: "/uri/to/next/page" + }; + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + // Set the response from Metadata service with the info about latest catalog version. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1&billingTag=billing-tag`, + new Response(JSON.stringify({ version: 30 }), { headers }) + ); + + // Set the response of mocked partitions with additional fields. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?version=30&additionalFields=dataSize,checksum,compressedDataSize&billingTag=billing-tag`, + new Response(JSON.stringify(mockedPartitions), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + // Setup Layer Client with new OlpClientSettings. + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VersionedLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + + const requestWithAdditionalFields = new PartitionsRequest() + .withAdditionalFields([ + "dataSize", + "checksum", + "compressedDataSize" + ]) + .withFetchOption(FetchOptions.OnlineIfNotFound) + .withBillingTag("billing-tag"); + + const partitions = await layerClient.getPartitions( + requestWithAdditionalFields + ); + + expect(partitions.partitions[0].checksum).to.be.equal( + mockedPartitions.partitions[0].checksum + ); + expect(partitions.partitions[1].compressedDataSize).to.be.equal( + mockedPartitions.partitions[1].compressedDataSize + ); + expect(partitions.partitions[1].dataSize).to.be.equal( + mockedPartitions.partitions[1].dataSize + ); }); - const requestWithoutAdditionalFields = new PartitionsRequest() - .withFetchOption(FetchOptions.OnlineIfNotFound) - .withBillingTag("billing-tag"); - - // fetch and cache partitions without additional fields. - await layerClient.getPartitions(requestWithoutAdditionalFields); - - const requestWithAdditionalFields = new PartitionsRequest() - .withAdditionalFields(["dataSize", "checksum", "compressedDataSize"]) - .withFetchOption(FetchOptions.OnlineIfNotFound) - .withBillingTag("billing-tag"); - - // fetch partition with additionalFields - const partitions = await layerClient.getPartitions( - requestWithAdditionalFields - ); - - expect(partitions.partitions[0].checksum).to.be.equal( - mockedPartitionsWithAdditionalFields.partitions[0].checksum - ); - expect(partitions.partitions[1].compressedDataSize).to.be.equal( - mockedPartitionsWithAdditionalFields.partitions[1].compressedDataSize - ); - expect(partitions.partitions[1].dataSize).to.be.equal( - mockedPartitionsWithAdditionalFields.partitions[1].dataSize - ); - - /** - * Should be 4 calls: - * 1 - lookup - * 2 - metadata for latest version - * 3 - metadata for partitions without additional fields - * 4 - metadata for partitions with additional fields - */ - expect(fetchStub.callCount).to.be.equal(4); - }); - - it("Shoud return from cache partitions with additionalFields if cached with additionalFields", async function() { - const mockedResponses = new Map(); - - const mockedPartitionsWithAdditionalFields = { - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "314010583" - }, - { - checksum: "123f66029c232400e3403cd6e9cfd45b", - compressedDataSize: 2084, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", - dataSize: 2084, - crc: "c3f2766y", - partition: "1000" - } - ], - next: "/uri/to/next/page" - }; - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - // Set the response from Metadata service with the info about latest catalog version. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1&billingTag=billing-tag`, - new Response(JSON.stringify({ version: 30 }), { headers }) - ); - - // Set the response of mocked partitions without additional fields. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?version=30&billingTag=billing-tag`, - new Response(JSON.stringify(mockedPartitionsWithAdditionalFields), { - headers - }) - ); - - // Set the response of mocked partitions with additional fields. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?version=30&additionalFields=dataSize,checksum,compressedDataSize&billingTag=billing-tag`, - new Response(JSON.stringify(mockedPartitionsWithAdditionalFields), { - headers - }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - // Setup Layer Client with new OlpClientSettings. - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + it("Shoud read partitions with additionalFields parameter from QuadKeyPartitionsRequest", async function () { + const mockedResponses = new Map(); + + const mockedQuadKey = { + row: 1, + column: 2, + level: 3 + }; + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, + new Response(JSON.stringify({ version: 30 }), { headers }) + ); + + // Set the response from lookup api with the info about Query API. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedPartitions = { + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "314010583" + }, + { + checksum: "123f66029c232400e3403cd6e9cfd45b", + compressedDataSize: 2084, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", + dataSize: 2084, + crc: "c3f2766y", + partition: "1000" + } + ], + next: "/uri/to/next/page" + }; + + // Set the response of mocked partitions with additional fields. + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/versions/30/quadkeys/70/depths/0?additionalFields=dataSize,checksum,compressedDataSize`, + new Response(JSON.stringify(mockedPartitions), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + // Setup Layer Client with new OlpClientSettings. + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VersionedLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + + const quadKeyPartitionsRequest = new QuadKeyPartitionsRequest(); + assert.isDefined(quadKeyPartitionsRequest); + expect(quadKeyPartitionsRequest).be.instanceOf( + QuadKeyPartitionsRequest + ); + + const quadKeyPartitionsRequestWithQuadKey = + quadKeyPartitionsRequest.withQuadKey(mockedQuadKey); + const quadKeyPartitionsRequestWithAdditionalFields = + quadKeyPartitionsRequest.withAdditionalFields([ + "dataSize", + "checksum", + "compressedDataSize" + ]); + + const partitions = await layerClient.getPartitions( + quadKeyPartitionsRequestWithAdditionalFields + ); + + assert.isDefined(partitions); }); - const layerClient = new VersionedLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings + + it("GetAggregatedData", async function () { + const mockedResponses = new Map(); + const headers = new Headers(); + headers.append("cache-control", "max-age=3600"); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "blob", + version: "v1", + baseURL: + "https://blob.data.api.platform.here.com/hrn:here:data:::test-hrn/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/hrn:here:data:::test-hrn/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + mockedResponses.set( + `https://query.data.api.platform.here.com/hrn:here:data:::test-hrn/v1/layers/mocked-layer/versions/123/quadkeys/24414/depths/4`, + new Response( + `{"subQuads":[{"subQuadKey":"64","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"65","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"66","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"67","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"68","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"69","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"70","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"71","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"72","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"73","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"74","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"75","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"76","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"77","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"78","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"79","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"80","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"81","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"82","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"83","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"84","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"85","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"86","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"87","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"88","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"89","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"90","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"91","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"92","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"93","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"94","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"95","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"96","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"97","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"98","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"99","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"100","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"101","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"102","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"103","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"104","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"105","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"106","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"107","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"108","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"109","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"110","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"111","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"112","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"113","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"114","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"115","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"116","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"117","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"118","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"119","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"120","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"121","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"122","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"123","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"124","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"125","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"126","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"127","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"1","version":309,"dataHandle":"9E835327487159C24CC3BD9ABC1D9D8D.309"},{"subQuadKey":"16","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"17","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"18","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"19","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"20","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"21","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"22","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"23","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"24","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"25","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"26","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"27","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"28","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"29","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"30","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"31","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"256","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"257","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"258","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"259","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"260","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"261","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"262","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"263","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"264","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"265","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"266","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"267","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"268","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"269","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"270","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"271","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"272","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"273","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"274","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"275","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"276","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"277","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"278","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"279","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"280","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"281","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"282","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"283","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"284","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"285","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"286","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"287","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"288","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"289","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"290","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"291","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"292","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"293","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"294","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"295","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"296","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"297","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"298","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"299","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"300","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"301","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"302","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"303","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"304","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"305","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"306","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"307","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"308","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"309","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"310","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"311","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"312","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"313","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"314","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"315","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"316","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"317","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"318","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"319","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"320","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"321","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"322","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"323","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"324","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"325","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"326","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"327","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"328","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"329","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"330","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"331","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"332","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"333","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"334","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"335","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"336","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"337","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"338","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"339","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"340","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"341","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"342","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"343","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"344","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"345","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"346","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"347","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"348","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"349","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"350","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"351","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"352","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"353","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"354","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"355","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"356","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"357","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"358","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"359","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"360","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"361","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"362","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"363","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"364","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"365","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"366","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"367","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"368","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"369","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"370","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"371","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"372","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"373","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"374","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"375","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"376","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"377","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"378","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"379","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"380","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"381","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"382","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"383","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"384","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"385","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"386","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"387","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"388","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"389","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"390","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"391","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"392","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"393","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"394","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"395","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"396","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"397","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"398","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"399","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"400","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"401","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"402","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"403","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"404","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"405","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"406","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"407","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"408","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"409","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"410","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"411","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"412","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"413","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"414","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"415","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"416","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"417","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"418","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"419","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"420","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"421","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"422","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"423","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"424","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"425","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"426","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"427","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"428","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"429","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"430","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"431","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"432","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"433","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"434","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"435","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"436","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"437","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"438","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"439","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"440","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"441","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"442","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"443","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"444","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"445","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"446","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"447","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"448","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"449","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"450","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"451","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"452","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"453","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"454","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"455","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"456","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"457","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"458","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"459","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"460","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"461","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"462","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"463","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"464","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"465","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"466","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"467","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"468","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"469","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"470","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"471","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"472","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"473","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"474","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"475","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"476","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"477","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"478","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"479","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"480","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"481","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"482","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"483","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"484","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"485","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"486","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"487","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"488","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"489","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"490","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"491","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"492","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"493","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"494","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"495","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"496","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"497","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"498","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"499","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"500","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"501","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"502","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"503","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"504","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"505","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"506","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"507","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"508","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"509","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"510","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"511","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"4","version":309,"dataHandle":"8941BA72534EA59DC78AA066874F3F46.309"},{"subQuadKey":"5","version":309,"dataHandle":"8941BA72534EA59DC78AA066874F3F46.309"},{"subQuadKey":"6","version":309,"dataHandle":"0357B7D8E5E267C27A40375EEFD8CBDF.309"},{"subQuadKey":"7","version":309,"dataHandle":"0357B7D8E5E267C27A40375EEFD8CBDF.309"}],"parentQuads":[{"partition":"1525","version":309,"dataHandle":"5FA96A639F78245CCA052E6CA1B2E356.309"},{"partition":"23","version":311,"dataHandle":"E49841168CC61793C19635AB788B19F0.311"},{"partition":"381","version":309,"dataHandle":"B5496E024A5BBDB0AE8A7BD38614BB81.309"},{"partition":"5","version":311,"dataHandle":"48FBFF69B74F5B5CEEAE0D410ACF3783.311"},{"partition":"6103","version":309,"dataHandle":"B003789C316D46D70BDB0B4D02AE654A.309"},{"partition":"95","version":309,"dataHandle":"A46A7D44C6DB3C2880A0076FAE4098AF.309"}]}` + ) + ); + + mockedResponses.set( + `https://blob.data.api.platform.here.com/hrn:here:data:::test-hrn/v1/layers/mocked-layer/data/5D220F614ED66FDD4850E9846482193A.309`, + new Response(Buffer.alloc(100)) + ); + + mockedResponses.set( + `https://blob.data.api.platform.here.com/hrn:here:data:::test-hrn/v1/layers/mocked-layer/data/436735897B05C80C449B1D654541DE5E.309`, + new Response(Buffer.alloc(300)) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + + const layerClient = new VersionedLayerClient({ + catalogHrn: testHRN, + layerId: "mocked-layer", + settings, + version: 123 + }); + + const request = new TileRequest(); + + const response = await layerClient.getAggregatedData( + request.withTileKey({ row: 818, column: 2021, level: 11 }) + ); + const response2 = await layerClient.getAggregatedData( + request.withTileKey({ row: 819, column: 2021, level: 11 }) + ); + + assert.isDefined(response); + assert.isDefined(response2); + + expect((await response.blob()).size).to.be.equals(100); + expect((await response2.blob()).size).to.be.equals(300); + + /** + * Should be 5 calls: + * 1 - lookup + * 2 - query + * 3 - blob + * 4 - blob + */ + expect(fetchStub.mock.calls.length).to.be.equal(4); + }); + + it("Shoud fetch partitions with additionalFields if cached the same partitions, but without additionalFields", async function () { + const mockedResponses = new Map(); + + const mockedPartitions = { + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + partition: "314010583" + }, + { + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", + partition: "1000" + } + ], + next: "/uri/to/next/page" + }; + + const mockedPartitionsWithAdditionalFields = { + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "314010583" + }, + { + checksum: "123f66029c232400e3403cd6e9cfd45b", + compressedDataSize: 2084, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", + dataSize: 2084, + crc: "c3f2766y", + partition: "1000" + } + ], + next: "/uri/to/next/page" + }; + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + // Set the response from Metadata service with the info about latest catalog version. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1&billingTag=billing-tag`, + new Response(JSON.stringify({ version: 30 }), { headers }) + ); + + // Set the response of mocked partitions without additional fields. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?version=30&billingTag=billing-tag`, + new Response(JSON.stringify(mockedPartitions), { headers }) + ); + + // Set the response of mocked partitions with additional fields. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?version=30&additionalFields=dataSize,checksum,compressedDataSize&billingTag=billing-tag`, + new Response(JSON.stringify(mockedPartitionsWithAdditionalFields), { + headers + }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + // Setup Layer Client with new OlpClientSettings. + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VersionedLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + + const requestWithoutAdditionalFields = new PartitionsRequest() + .withFetchOption(FetchOptions.OnlineIfNotFound) + .withBillingTag("billing-tag"); + + // fetch and cache partitions without additional fields. + await layerClient.getPartitions(requestWithoutAdditionalFields); + + const requestWithAdditionalFields = new PartitionsRequest() + .withAdditionalFields([ + "dataSize", + "checksum", + "compressedDataSize" + ]) + .withFetchOption(FetchOptions.OnlineIfNotFound) + .withBillingTag("billing-tag"); + + // fetch partition with additionalFields + const partitions = await layerClient.getPartitions( + requestWithAdditionalFields + ); + + expect(partitions.partitions[0].checksum).to.be.equal( + mockedPartitionsWithAdditionalFields.partitions[0].checksum + ); + expect(partitions.partitions[1].compressedDataSize).to.be.equal( + mockedPartitionsWithAdditionalFields.partitions[1] + .compressedDataSize + ); + expect(partitions.partitions[1].dataSize).to.be.equal( + mockedPartitionsWithAdditionalFields.partitions[1].dataSize + ); + + /** + * Should be 4 calls: + * 1 - lookup + * 2 - metadata for latest version + * 3 - metadata for partitions without additional fields + * 4 - metadata for partitions with additional fields + */ + expect(fetchStub.mock.calls.length).to.be.equal(4); }); - const requestWithAdditionalFields = new PartitionsRequest() - .withAdditionalFields(["dataSize", "checksum", "compressedDataSize"]) - .withFetchOption(FetchOptions.OnlineIfNotFound) - .withBillingTag("billing-tag"); - - // fetch and cache partitions with additional fields. - await layerClient.getPartitions(requestWithAdditionalFields); - - // fetch one more time partition with additionalFields - const partitions = await layerClient.getPartitions( - requestWithAdditionalFields - ); - - expect(partitions.partitions[0].checksum).to.be.equal( - mockedPartitionsWithAdditionalFields.partitions[0].checksum - ); - expect(partitions.partitions[1].compressedDataSize).to.be.equal( - mockedPartitionsWithAdditionalFields.partitions[1].compressedDataSize - ); - expect(partitions.partitions[1].dataSize).to.be.equal( - mockedPartitionsWithAdditionalFields.partitions[1].dataSize - ); - - /** - * Should be 3 calls: - * 1 - lookup - * 2 - metadata for latest version - * 3 - metadata for partitions without additional fields - */ - expect(fetchStub.callCount).to.be.equal(3); - }); + it("Shoud return from cache partitions with additionalFields if cached with additionalFields", async function () { + const mockedResponses = new Map(); + + const mockedPartitionsWithAdditionalFields = { + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "314010583" + }, + { + checksum: "123f66029c232400e3403cd6e9cfd45b", + compressedDataSize: 2084, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", + dataSize: 2084, + crc: "c3f2766y", + partition: "1000" + } + ], + next: "/uri/to/next/page" + }; + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + // Set the response from Metadata service with the info about latest catalog version. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1&billingTag=billing-tag`, + new Response(JSON.stringify({ version: 30 }), { headers }) + ); + + // Set the response of mocked partitions without additional fields. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?version=30&billingTag=billing-tag`, + new Response(JSON.stringify(mockedPartitionsWithAdditionalFields), { + headers + }) + ); + + // Set the response of mocked partitions with additional fields. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?version=30&additionalFields=dataSize,checksum,compressedDataSize&billingTag=billing-tag`, + new Response(JSON.stringify(mockedPartitionsWithAdditionalFields), { + headers + }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + // Setup Layer Client with new OlpClientSettings. + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VersionedLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + + const requestWithAdditionalFields = new PartitionsRequest() + .withAdditionalFields([ + "dataSize", + "checksum", + "compressedDataSize" + ]) + .withFetchOption(FetchOptions.OnlineIfNotFound) + .withBillingTag("billing-tag"); + + // fetch and cache partitions with additional fields. + await layerClient.getPartitions(requestWithAdditionalFields); + + // fetch one more time partition with additionalFields + const partitions = await layerClient.getPartitions( + requestWithAdditionalFields + ); + + expect(partitions.partitions[0].checksum).to.be.equal( + mockedPartitionsWithAdditionalFields.partitions[0].checksum + ); + expect(partitions.partitions[1].compressedDataSize).to.be.equal( + mockedPartitionsWithAdditionalFields.partitions[1] + .compressedDataSize + ); + expect(partitions.partitions[1].dataSize).to.be.equal( + mockedPartitionsWithAdditionalFields.partitions[1].dataSize + ); + + /** + * Should be 3 calls: + * 1 - lookup + * 2 - metadata for latest version + * 3 - metadata for partitions without additional fields + */ + expect(fetchStub.mock.calls.length).to.be.equal(3); + }); }); diff --git a/tests/integration/olp-sdk-dataservice-read/VolatileLayerClient.test.ts b/tests/integration/olp-sdk-dataservice-read/VolatileLayerClient.test.ts index 72525b51..34c09141 100644 --- a/tests/integration/olp-sdk-dataservice-read/VolatileLayerClient.test.ts +++ b/tests/integration/olp-sdk-dataservice-read/VolatileLayerClient.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 HERE Europe B.V. + * Copyright (C) 2019-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,838 +17,859 @@ * License-Filename: LICENSE */ -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); import { - VolatileLayerClient, - PartitionsRequest, - DataRequest, - QuadKeyPartitionsRequest, - TileRequest + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; +import { + VolatileLayerClient, + PartitionsRequest, + DataRequest, + QuadKeyPartitionsRequest, + TileRequest } from "@here/olp-sdk-dataservice-read"; import { FetchMock } from "../FetchMock"; import { Buffer } from "buffer"; import { - HRN, - LIB_VERSION, - OlpClientSettings, - TileKey + HRN, + LIB_VERSION, + OlpClientSettings, + TileKey } from "@here/olp-sdk-core"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("VolatileLayerClient", function() { - let fetchMock: FetchMock; - let sandbox: sinon.SinonSandbox; - let fetchStub: sinon.SinonStub; - - const testHRN = HRN.fromString("hrn:here:data:::test-hrn"); - const testVolatileLayerId = "test-layed-id"; - const headers = new Headers(); - headers.append("cache-control", "max-age=3600"); +describe("VolatileLayerClient", function () { + let fetchMock: FetchMock; + let fetchStub: any; - before(function() { - sandbox = sinon.createSandbox(); - }); - - afterEach(function() { - sandbox.restore(); - }); + const testHRN = HRN.fromString("hrn:here:data:::test-hrn"); + const testVolatileLayerId = "test-layed-id"; + const headers = new Headers(); + headers.append("cache-control", "max-age=3600"); - beforeEach(function() { - fetchMock = new FetchMock(); - fetchStub = sandbox.stub(global as any, "fetch"); - fetchStub.callsFake(fetchMock.fetch()); - }); + beforeAll(function () {}); - it("Shoud be initialized with settings", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VolatileLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings - }); - assert.isDefined(layerClient); - expect(layerClient).to.be.instanceOf(VolatileLayerClient); - }); - - it("Shoud be initialization error be handled", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - try { - const layerClient = new VolatileLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "", - settings - }); - } catch (error) { - expect(error.message).equal("Unsupported parameters"); - } - }); - - it("Shoud be fetched partitions metadata for specific IDs", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api with the info about Query API. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - // Set the response with mocked partitions for IDs 100 and 1000 from Query service - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/partitions?partition=100&partition=1000`, - new Response( - JSON.stringify({ - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "100", - version: 2 - }, - { - checksum: "123f66029c232400e3403cd6e9cfd45b", - compressedDataSize: 2084, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", - dataSize: 2084, - crc: "c3f2766y", - partition: "1000", - version: 2 - } - ] - }), - { headers } - ) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - // Setup Layer Client with new OlpClientSettings. - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VolatileLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings + afterEach(function () { + vi.restoreAllMocks(); }); - // Setup PartitionsRequest to filter response by partition IDs 100 and 1000. - const request = new PartitionsRequest().withPartitionIds(["100", "1000"]); + beforeEach(function () { + fetchMock = new FetchMock(); + fetchStub = vi.spyOn(global as any, "fetch"); + fetchStub.mockImplementation(fetchMock.fetch()); + }); - // Send request for partitions metadata. - const partitions = await layerClient.getPartitions(request).catch(error => { - console.log(`Error getting partitions: ${error}`); + it("Shoud be initialized with settings", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VolatileLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + assert.isDefined(layerClient); + expect(layerClient).to.be.instanceOf(VolatileLayerClient); }); - // Check if partitions fetched succesful. - assert.isDefined(partitions); - - if (partitions) { - // Check if partitions returns as expected. - expect(partitions.partitions[0].dataHandle).to.be.equal( - "1b2ca68f-d4a0-4379-8120-cd025640510c" - ); - expect(partitions.partitions[1].dataHandle).to.be.equal( - "1b2ca68f-d4a0-4379-8120-cd025640578e" - ); - expect(partitions.partitions[2]).to.be.undefined; - - /** - * Check if the count of requests are as expected. Should be called 2 times. - * One to the lookup service - * for the baseURL to the Query service and another one to the query service. - */ - expect(fetchStub.callCount).to.be.equal(2); - } - }); - - it("Shoud be fetched data with PartitionId", async function() { - const mockedResponses = new Map(); - const mockedPartitionId = "0000042"; - const mockedData = Buffer.alloc(42); - const mockedPartitionsIdData = { - partitions: [ - { - version: 1, - partition: "0000042", - dataHandle: "3C3BE24A341D82321A9BA9075A7EF498.123" - }, - { - version: 42, - partition: "0000019", - dataHandle: "3C3BE24A341D82321A9BA9075A7EF498.123" + it("Shoud be initialization error be handled", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + try { + const layerClient = new VolatileLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "", + settings + }); + } catch (error) { + expect(error.message).equal("Unsupported parameters"); } - ] - }; - - // Set the response from lookup api with the info about Query API. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "volatile-blob", - version: "v1", - baseURL: - "https://volatile-blob.data.api.platform.here.com/volatile-blob/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/partitions?partition=0000042`, - new Response(JSON.stringify(mockedPartitionsIdData), { headers }) - ); - - // Set the response of mocked partitions from metadata service. - mockedResponses.set( - `https://volatile-blob.data.api.platform.here.com/volatile-blob/v1/layers/test-layed-id/data/3C3BE24A341D82321A9BA9075A7EF498.123`, - new Response(mockedData, { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VolatileLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings }); - const request = new DataRequest().withPartitionId(mockedPartitionId); - - const data = await layerClient.getData(request); - - assert.isDefined(data); - expect(fetchStub.callCount).to.be.equal(3); - }); - - it("Shoud be fetched partitions all metadata", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - // Set the response of mocked partitions from metadata service. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions`, - new Response( - JSON.stringify({ - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "314010583" - }, - { - checksum: "123f66029c232400e3403cd6e9cfd45b", - compressedDataSize: 2084, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", - dataSize: 2084, - crc: "c3f2766y", - partition: "1000" - } - ], - next: "/uri/to/next/page" - }), - { headers } - ) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - // Setup Layer Client with new OlpClientSettings. - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + it("Shoud be fetched partitions metadata for specific IDs", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api with the info about Query API. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + // Set the response with mocked partitions for IDs 100 and 1000 from Query service + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/partitions?partition=100&partition=1000`, + new Response( + JSON.stringify({ + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "100", + version: 2 + }, + { + checksum: "123f66029c232400e3403cd6e9cfd45b", + compressedDataSize: 2084, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", + dataSize: 2084, + crc: "c3f2766y", + partition: "1000", + version: 2 + } + ] + }), + { headers } + ) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + // Setup Layer Client with new OlpClientSettings. + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VolatileLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + + // Setup PartitionsRequest to filter response by partition IDs 100 and 1000. + const request = new PartitionsRequest().withPartitionIds([ + "100", + "1000" + ]); + + // Send request for partitions metadata. + const partitions = await layerClient + .getPartitions(request) + .catch((error) => { + console.log(`Error getting partitions: ${error}`); + }); + + // Check if partitions fetched succesful. + assert.isDefined(partitions); + + if (partitions) { + // Check if partitions returns as expected. + expect(partitions.partitions[0].dataHandle).to.be.equal( + "1b2ca68f-d4a0-4379-8120-cd025640510c" + ); + expect(partitions.partitions[1].dataHandle).to.be.equal( + "1b2ca68f-d4a0-4379-8120-cd025640578e" + ); + expect(partitions.partitions[2]).to.be.undefined; + + /** + * Check if the count of requests are as expected. Should be called 2 times. + * One to the lookup service + * for the baseURL to the Query service and another one to the query service. + */ + expect(fetchStub.mock.calls.length).to.be.equal(2); + } }); - const layerClient = new VolatileLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings + + it("Shoud be fetched data with PartitionId", async function () { + const mockedResponses = new Map(); + const mockedPartitionId = "0000042"; + const mockedData = Buffer.alloc(42); + const mockedPartitionsIdData = { + partitions: [ + { + version: 1, + partition: "0000042", + dataHandle: "3C3BE24A341D82321A9BA9075A7EF498.123" + }, + { + version: 42, + partition: "0000019", + dataHandle: "3C3BE24A341D82321A9BA9075A7EF498.123" + } + ] + }; + + // Set the response from lookup api with the info about Query API. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "volatile-blob", + version: "v1", + baseURL: + "https://volatile-blob.data.api.platform.here.com/volatile-blob/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/partitions?partition=0000042`, + new Response(JSON.stringify(mockedPartitionsIdData), { headers }) + ); + + // Set the response of mocked partitions from metadata service. + mockedResponses.set( + `https://volatile-blob.data.api.platform.here.com/volatile-blob/v1/layers/test-layed-id/data/3C3BE24A341D82321A9BA9075A7EF498.123`, + new Response(mockedData, { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VolatileLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + + const request = new DataRequest().withPartitionId(mockedPartitionId); + + const data = await layerClient.getData(request); + + assert.isDefined(data); + expect(fetchStub.mock.calls.length).to.be.equal(3); }); - // Setup PartitionsRequest without any parameters - const request = new PartitionsRequest(); + it("Shoud be fetched partitions all metadata", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + // Set the response of mocked partitions from metadata service. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions`, + new Response( + JSON.stringify({ + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "314010583" + }, + { + checksum: "123f66029c232400e3403cd6e9cfd45b", + compressedDataSize: 2084, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", + dataSize: 2084, + crc: "c3f2766y", + partition: "1000" + } + ], + next: "/uri/to/next/page" + }), + { headers } + ) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + // Setup Layer Client with new OlpClientSettings. + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VolatileLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + + // Setup PartitionsRequest without any parameters + const request = new PartitionsRequest(); + + // Send request for partitions metadata. + const partitions = await layerClient + .getPartitions(request) + .catch((error) => { + console.log(`Error getting partitions: ${error}`); + }); + + // Check if partitions fetched succesful. + assert.isDefined(partitions); + + // Check if partitions returns as expected. + if (partitions) { + expect(partitions.partitions[0].dataHandle).to.be.equal( + "1b2ca68f-d4a0-4379-8120-cd025640510c" + ); + expect(partitions.partitions[1].dataHandle).to.be.equal( + "1b2ca68f-d4a0-4379-8120-cd025640578e" + ); + expect(partitions.partitions[0].partition).to.be.equal("314010583"); + expect(partitions.partitions[1].partition).to.be.equal("1000"); + expect(partitions.partitions.length).to.be.equal(2); + } - // Send request for partitions metadata. - const partitions = await layerClient.getPartitions(request).catch(error => { - console.log(`Error getting partitions: ${error}`); + /** + * Check if the count of requests are as expected. + * Should be called 2 times. One to the lookup service + * for the baseURL to the Metadata service and another one + * to the metadata service for the partitions metadata. + */ + expect(fetchStub.mock.calls.length).to.be.equal(2); }); - // Check if partitions fetched succesful. - assert.isDefined(partitions); - - // Check if partitions returns as expected. - if (partitions) { - expect(partitions.partitions[0].dataHandle).to.be.equal( - "1b2ca68f-d4a0-4379-8120-cd025640510c" - ); - expect(partitions.partitions[1].dataHandle).to.be.equal( - "1b2ca68f-d4a0-4379-8120-cd025640578e" - ); - expect(partitions.partitions[0].partition).to.be.equal("314010583"); - expect(partitions.partitions[1].partition).to.be.equal("1000"); - expect(partitions.partitions.length).to.be.equal(2); - } - - /** - * Check if the count of requests are as expected. - * Should be called 2 times. One to the lookup service - * for the baseURL to the Metadata service and another one - * to the metadata service for the partitions metadata. - */ - expect(fetchStub.callCount).to.be.equal(2); - }); - - it("Shoud read data with dataHandle", async function() { - const mockedResponses = new Map(); - const mockedDataHandle = "1b2ca68f-d4a0-4379-8120-cd025640510c"; - const mockedData = Buffer.alloc(42); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "volatile-blob", - version: "v1", - baseURL: - "https://volatile-blob.data.api.platform.here.com/volatile-blob/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - // Set the response of mocked partitions from metadata service. - mockedResponses.set( - `https://volatile-blob.data.api.platform.here.com/volatile-blob/v1/layers/test-layed-id/data/1b2ca68f-d4a0-4379-8120-cd025640510c`, - new Response(mockedData, { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VolatileLayerClient({ - catalogHrn: testHRN, - layerId: testVolatileLayerId, - settings - }); - const request = new DataRequest().withDataHandle(mockedDataHandle); - - const data = await layerClient.getData(request); - - assert.isDefined(data); - expect(fetchStub.callCount).to.be.equal(2); - }); - - it("Shoud read partitions metadata by QuadKey for specific VolatileLayer", async function() { - const mockedResponses = new Map(); - - const billingTag = "billingTag"; - const mockedDepth = 3; - const mockedQuadKey = { - row: 1, - column: 2, - level: 3 - }; - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, - new Response(JSON.stringify({ version: 30 }), { headers }) - ); - - // Set the response with mocked partitions for volatile layer - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/quadkeys/70/depths/3`, - new Response( - JSON.stringify({ - parentQuads: [ - { - additionalMetadata: "string", - checksum: "string", - compressedDataSize: 0, - dataHandle: "675911FF6236B7C7604BF8B105F1BB58", - dataSize: 0, - crc: "c3f276d7", - partition: "73982", - version: 0 - } - ], - subQuads: [ - { - additionalMetadata: "string", - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 200, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - subQuadKey: "string", - version: 1 - } - ] - }), - { headers } - ) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - // Setup Layer Client with new OlpClientSettings. - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VolatileLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings + it("Shoud read data with dataHandle", async function () { + const mockedResponses = new Map(); + const mockedDataHandle = "1b2ca68f-d4a0-4379-8120-cd025640510c"; + const mockedData = Buffer.alloc(42); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "volatile-blob", + version: "v1", + baseURL: + "https://volatile-blob.data.api.platform.here.com/volatile-blob/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + // Set the response of mocked partitions from metadata service. + mockedResponses.set( + `https://volatile-blob.data.api.platform.here.com/volatile-blob/v1/layers/test-layed-id/data/1b2ca68f-d4a0-4379-8120-cd025640510c`, + new Response(mockedData, { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VolatileLayerClient({ + catalogHrn: testHRN, + layerId: testVolatileLayerId, + settings + }); + const request = new DataRequest().withDataHandle(mockedDataHandle); + + const data = await layerClient.getData(request); + + assert.isDefined(data); + expect(fetchStub.mock.calls.length).to.be.equal(2); }); - const quadKeyPartitionsRequest = new QuadKeyPartitionsRequest(); - assert.isDefined(quadKeyPartitionsRequest); - expect(quadKeyPartitionsRequest).be.instanceOf(QuadKeyPartitionsRequest); - - const quadKeyPartitionsRequestWithDepth = quadKeyPartitionsRequest.withDepth( - mockedDepth - ); - const quadKeyPartitionsRequestWithQuadKey = quadKeyPartitionsRequest.withQuadKey( - mockedQuadKey - ); - const quadKeyPartitionsRequestWithBillTag = quadKeyPartitionsRequest.withBillingTag( - billingTag - ); - - expect(quadKeyPartitionsRequestWithDepth.getDepth()).to.be.equal( - mockedDepth - ); - expect(quadKeyPartitionsRequestWithQuadKey.getQuadKey()).to.be.equal( - mockedQuadKey - ); - expect(quadKeyPartitionsRequestWithBillTag.getBillingTag()).to.be.equal( - billingTag - ); - - const partitions = await layerClient.getPartitions( - quadKeyPartitionsRequest - ); - if (partitions.parentQuads) { - expect(partitions.parentQuads[0].partition).to.be.equal("73982"); - } - }); - - it("Shoud read partitions with additionalFields parameter from PartitionsRequest", async function() { - const mockedResponses = new Map(); - - const mockedPartitions = { - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "314010583" - }, - { - checksum: "123f66029c232400e3403cd6e9cfd45b", - compressedDataSize: 2084, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", - dataSize: 2084, - crc: "c3f2766y", - partition: "1000" + it("Shoud read partitions metadata by QuadKey for specific VolatileLayer", async function () { + const mockedResponses = new Map(); + + const billingTag = "billingTag"; + const mockedDepth = 3; + const mockedQuadKey = { + row: 1, + column: 2, + level: 3 + }; + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, + new Response(JSON.stringify({ version: 30 }), { headers }) + ); + + // Set the response with mocked partitions for volatile layer + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/quadkeys/70/depths/3`, + new Response( + JSON.stringify({ + parentQuads: [ + { + additionalMetadata: "string", + checksum: "string", + compressedDataSize: 0, + dataHandle: "675911FF6236B7C7604BF8B105F1BB58", + dataSize: 0, + crc: "c3f276d7", + partition: "73982", + version: 0 + } + ], + subQuads: [ + { + additionalMetadata: "string", + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 200, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + subQuadKey: "string", + version: 1 + } + ] + }), + { headers } + ) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + // Setup Layer Client with new OlpClientSettings. + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VolatileLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + + const quadKeyPartitionsRequest = new QuadKeyPartitionsRequest(); + assert.isDefined(quadKeyPartitionsRequest); + expect(quadKeyPartitionsRequest).be.instanceOf( + QuadKeyPartitionsRequest + ); + + const quadKeyPartitionsRequestWithDepth = + quadKeyPartitionsRequest.withDepth(mockedDepth); + const quadKeyPartitionsRequestWithQuadKey = + quadKeyPartitionsRequest.withQuadKey(mockedQuadKey); + const quadKeyPartitionsRequestWithBillTag = + quadKeyPartitionsRequest.withBillingTag(billingTag); + + expect(quadKeyPartitionsRequestWithDepth.getDepth()).to.be.equal( + mockedDepth + ); + expect(quadKeyPartitionsRequestWithQuadKey.getQuadKey()).to.be.equal( + mockedQuadKey + ); + expect(quadKeyPartitionsRequestWithBillTag.getBillingTag()).to.be.equal( + billingTag + ); + + const partitions = await layerClient.getPartitions( + quadKeyPartitionsRequest + ); + if (partitions.parentQuads) { + expect(partitions.parentQuads[0].partition).to.be.equal("73982"); } - ], - next: "/uri/to/next/page" - }; - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - // Set the response of mocked partitions with additional fields. - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?additionalFields=dataSize,checksum,compressedDataSize`, - new Response(JSON.stringify(mockedPartitions), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - // Setup Layer Client with new OlpClientSettings. - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") - }); - const layerClient = new VolatileLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings }); - const requestWithAdditionalFields = new PartitionsRequest().withAdditionalFields( - ["dataSize", "checksum", "compressedDataSize"] - ); - - const partitions = await layerClient.getPartitions( - requestWithAdditionalFields - ); - - expect(partitions.partitions[0].checksum).to.be.equal( - mockedPartitions.partitions[0].checksum - ); - expect(partitions.partitions[1].compressedDataSize).to.be.equal( - mockedPartitions.partitions[1].compressedDataSize - ); - expect(partitions.partitions[1].dataSize).to.be.equal( - mockedPartitions.partitions[1].dataSize - ); - }); - - it("Shoud read partitions with additionalFields parameter from QuadKeyPartitionsRequest", async function() { - const mockedResponses = new Map(); - - const mockedQuadKey = { - row: 1, - column: 2, - level: 3 - }; - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, - new Response(JSON.stringify({ version: 30 }), { headers }) - ); - - // Set the response from lookup api with the info about Query API. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "query", - version: "v1", - baseURL: "https://query.data.api.platform.here.com/query/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedPartitions = { - partitions: [ - { - checksum: "291f66029c232400e3403cd6e9cfd36e", - compressedDataSize: 1024, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", - dataSize: 1024, - crc: "c3f276d7", - partition: "314010583" - }, - { - checksum: "123f66029c232400e3403cd6e9cfd45b", - compressedDataSize: 2084, - dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", - dataSize: 2084, - crc: "c3f2766y", - partition: "1000" - } - ], - next: "/uri/to/next/page" - }; - - // Set the response of mocked partitions with additional fields. - mockedResponses.set( - `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/quadkeys/70/depths/0?additionalFields=dataSize,checksum,compressedDataSize`, - new Response(JSON.stringify(mockedPartitions), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - // Setup Layer Client with new OlpClientSettings. - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + it("Shoud read partitions with additionalFields parameter from PartitionsRequest", async function () { + const mockedResponses = new Map(); + + const mockedPartitions = { + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "314010583" + }, + { + checksum: "123f66029c232400e3403cd6e9cfd45b", + compressedDataSize: 2084, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", + dataSize: 2084, + crc: "c3f2766y", + partition: "1000" + } + ], + next: "/uri/to/next/page" + }; + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + // Set the response of mocked partitions with additional fields. + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/layers/test-layed-id/partitions?additionalFields=dataSize,checksum,compressedDataSize`, + new Response(JSON.stringify(mockedPartitions), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + // Setup Layer Client with new OlpClientSettings. + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VolatileLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + + const requestWithAdditionalFields = + new PartitionsRequest().withAdditionalFields([ + "dataSize", + "checksum", + "compressedDataSize" + ]); + + const partitions = await layerClient.getPartitions( + requestWithAdditionalFields + ); + + expect(partitions.partitions[0].checksum).to.be.equal( + mockedPartitions.partitions[0].checksum + ); + expect(partitions.partitions[1].compressedDataSize).to.be.equal( + mockedPartitions.partitions[1].compressedDataSize + ); + expect(partitions.partitions[1].dataSize).to.be.equal( + mockedPartitions.partitions[1].dataSize + ); }); - const layerClient = new VolatileLayerClient({ - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings - }); - - const quadKeyPartitionsRequest = new QuadKeyPartitionsRequest(); - assert.isDefined(quadKeyPartitionsRequest); - expect(quadKeyPartitionsRequest).be.instanceOf(QuadKeyPartitionsRequest); - const quadKeyPartitionsRequestWithQuadKey = quadKeyPartitionsRequest.withQuadKey( - mockedQuadKey - ); - const quadKeyPartitionsRequestWithAdditionalFields = quadKeyPartitionsRequest.withAdditionalFields( - ["dataSize", "checksum", "compressedDataSize"] - ); - - const partitions = await layerClient.getPartitions( - quadKeyPartitionsRequestWithAdditionalFields - ); - - assert.isDefined(partitions); - }); - - it("Shoud be initialized with VolatileLayerClientParams", async function() { - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + it("Shoud read partitions with additionalFields parameter from QuadKeyPartitionsRequest", async function () { + const mockedResponses = new Map(); + + const mockedQuadKey = { + row: 1, + column: 2, + level: 3 + }; + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, + new Response(JSON.stringify({ version: 30 }), { headers }) + ); + + // Set the response from lookup api with the info about Query API. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/query/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedPartitions = { + partitions: [ + { + checksum: "291f66029c232400e3403cd6e9cfd36e", + compressedDataSize: 1024, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640510c", + dataSize: 1024, + crc: "c3f276d7", + partition: "314010583" + }, + { + checksum: "123f66029c232400e3403cd6e9cfd45b", + compressedDataSize: 2084, + dataHandle: "1b2ca68f-d4a0-4379-8120-cd025640578e", + dataSize: 2084, + crc: "c3f2766y", + partition: "1000" + } + ], + next: "/uri/to/next/page" + }; + + // Set the response of mocked partitions with additional fields. + mockedResponses.set( + `https://query.data.api.platform.here.com/query/v1/layers/test-layed-id/quadkeys/70/depths/0?additionalFields=dataSize,checksum,compressedDataSize`, + new Response(JSON.stringify(mockedPartitions), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + // Setup Layer Client with new OlpClientSettings. + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + const layerClient = new VolatileLayerClient({ + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings + }); + + const quadKeyPartitionsRequest = new QuadKeyPartitionsRequest(); + assert.isDefined(quadKeyPartitionsRequest); + expect(quadKeyPartitionsRequest).be.instanceOf( + QuadKeyPartitionsRequest + ); + + const quadKeyPartitionsRequestWithQuadKey = + quadKeyPartitionsRequest.withQuadKey(mockedQuadKey); + const quadKeyPartitionsRequestWithAdditionalFields = + quadKeyPartitionsRequest.withAdditionalFields([ + "dataSize", + "checksum", + "compressedDataSize" + ]); + + const partitions = await layerClient.getPartitions( + quadKeyPartitionsRequestWithAdditionalFields + ); + + assert.isDefined(partitions); }); - const volatileLayerClientParams = { - catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), - layerId: "test-layed-id", - settings: settings - }; - const volatileLayerClient = new VolatileLayerClient( - volatileLayerClientParams - ); - - assert.isDefined(volatileLayerClient); - expect(volatileLayerClient).to.be.instanceOf(VolatileLayerClient); - assert.equal(volatileLayerClient["hrn"], "hrn:here:data:::test-hrn"); - }); - - it("GetAggregatedData", async function() { - const mockedResponses = new Map(); - const headers = new Headers(); - headers.append("cache-control", "max-age=3600"); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "volatile-blob", - version: "v1", - baseURL: - "https://volatile-blob.data.api.platform.here.com/hrn:here:data:::test-hrn/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - }, - { - api: "query", - version: "v1", - baseURL: - "https://query.data.api.platform.here.com/hrn:here:data:::test-hrn/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - mockedResponses.set( - `https://query.data.api.platform.here.com/hrn:here:data:::test-hrn/v1/layers/mocked-layer/quadkeys/24414/depths/4`, - new Response( - `{"subQuads":[{"subQuadKey":"64","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"65","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"66","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"67","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"68","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"69","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"70","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"71","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"72","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"73","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"74","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"75","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"76","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"77","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"78","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"79","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"80","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"81","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"82","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"83","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"84","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"85","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"86","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"87","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"88","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"89","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"90","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"91","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"92","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"93","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"94","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"95","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"96","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"97","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"98","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"99","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"100","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"101","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"102","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"103","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"104","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"105","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"106","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"107","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"108","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"109","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"110","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"111","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"112","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"113","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"114","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"115","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"116","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"117","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"118","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"119","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"120","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"121","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"122","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"123","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"124","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"125","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"126","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"127","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"1","version":309,"dataHandle":"9E835327487159C24CC3BD9ABC1D9D8D.309"},{"subQuadKey":"16","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"17","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"18","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"19","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"20","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"21","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"22","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"23","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"24","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"25","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"26","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"27","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"28","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"29","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"30","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"31","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"256","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"257","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"258","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"259","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"260","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"261","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"262","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"263","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"264","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"265","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"266","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"267","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"268","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"269","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"270","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"271","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"272","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"273","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"274","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"275","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"276","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"277","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"278","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"279","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"280","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"281","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"282","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"283","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"284","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"285","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"286","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"287","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"288","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"289","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"290","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"291","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"292","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"293","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"294","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"295","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"296","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"297","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"298","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"299","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"300","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"301","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"302","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"303","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"304","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"305","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"306","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"307","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"308","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"309","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"310","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"311","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"312","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"313","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"314","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"315","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"316","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"317","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"318","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"319","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"320","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"321","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"322","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"323","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"324","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"325","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"326","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"327","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"328","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"329","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"330","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"331","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"332","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"333","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"334","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"335","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"336","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"337","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"338","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"339","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"340","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"341","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"342","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"343","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"344","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"345","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"346","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"347","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"348","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"349","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"350","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"351","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"352","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"353","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"354","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"355","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"356","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"357","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"358","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"359","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"360","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"361","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"362","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"363","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"364","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"365","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"366","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"367","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"368","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"369","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"370","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"371","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"372","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"373","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"374","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"375","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"376","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"377","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"378","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"379","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"380","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"381","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"382","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"383","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"384","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"385","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"386","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"387","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"388","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"389","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"390","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"391","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"392","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"393","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"394","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"395","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"396","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"397","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"398","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"399","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"400","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"401","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"402","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"403","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"404","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"405","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"406","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"407","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"408","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"409","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"410","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"411","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"412","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"413","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"414","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"415","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"416","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"417","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"418","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"419","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"420","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"421","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"422","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"423","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"424","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"425","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"426","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"427","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"428","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"429","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"430","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"431","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"432","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"433","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"434","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"435","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"436","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"437","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"438","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"439","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"440","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"441","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"442","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"443","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"444","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"445","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"446","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"447","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"448","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"449","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"450","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"451","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"452","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"453","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"454","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"455","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"456","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"457","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"458","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"459","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"460","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"461","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"462","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"463","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"464","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"465","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"466","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"467","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"468","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"469","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"470","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"471","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"472","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"473","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"474","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"475","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"476","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"477","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"478","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"479","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"480","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"481","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"482","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"483","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"484","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"485","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"486","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"487","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"488","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"489","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"490","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"491","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"492","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"493","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"494","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"495","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"496","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"497","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"498","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"499","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"500","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"501","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"502","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"503","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"504","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"505","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"506","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"507","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"508","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"509","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"510","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"511","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"4","version":309,"dataHandle":"8941BA72534EA59DC78AA066874F3F46.309"},{"subQuadKey":"5","version":309,"dataHandle":"8941BA72534EA59DC78AA066874F3F46.309"},{"subQuadKey":"6","version":309,"dataHandle":"0357B7D8E5E267C27A40375EEFD8CBDF.309"},{"subQuadKey":"7","version":309,"dataHandle":"0357B7D8E5E267C27A40375EEFD8CBDF.309"}],"parentQuads":[{"partition":"1525","version":309,"dataHandle":"5FA96A639F78245CCA052E6CA1B2E356.309"},{"partition":"23","version":311,"dataHandle":"E49841168CC61793C19635AB788B19F0.311"},{"partition":"381","version":309,"dataHandle":"B5496E024A5BBDB0AE8A7BD38614BB81.309"},{"partition":"5","version":311,"dataHandle":"48FBFF69B74F5B5CEEAE0D410ACF3783.311"},{"partition":"6103","version":309,"dataHandle":"B003789C316D46D70BDB0B4D02AE654A.309"},{"partition":"95","version":309,"dataHandle":"A46A7D44C6DB3C2880A0076FAE4098AF.309"}]}` - ) - ); - - mockedResponses.set( - `https://volatile-blob.data.api.platform.here.com/hrn:here:data:::test-hrn/v1/layers/mocked-layer/data/5D220F614ED66FDD4850E9846482193A.309`, - new Response(Buffer.alloc(100)) - ); - - mockedResponses.set( - `https://volatile-blob.data.api.platform.here.com/hrn:here:data:::test-hrn/v1/layers/mocked-layer/data/436735897B05C80C449B1D654541DE5E.309`, - new Response(Buffer.alloc(300)) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + it("Shoud be initialized with VolatileLayerClientParams", async function () { + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + + const volatileLayerClientParams = { + catalogHrn: HRN.fromString("hrn:here:data:::test-hrn"), + layerId: "test-layed-id", + settings: settings + }; + const volatileLayerClient = new VolatileLayerClient( + volatileLayerClientParams + ); + + assert.isDefined(volatileLayerClient); + expect(volatileLayerClient).to.be.instanceOf(VolatileLayerClient); + assert.equal(volatileLayerClient["hrn"], "hrn:here:data:::test-hrn"); }); - const layerClient = new VolatileLayerClient({ - catalogHrn: testHRN, - layerId: "mocked-layer", - settings + it("GetAggregatedData", async function () { + const mockedResponses = new Map(); + const headers = new Headers(); + headers.append("cache-control", "max-age=3600"); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::test-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "volatile-blob", + version: "v1", + baseURL: + "https://volatile-blob.data.api.platform.here.com/hrn:here:data:::test-hrn/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/hrn:here:data:::test-hrn/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + mockedResponses.set( + `https://query.data.api.platform.here.com/hrn:here:data:::test-hrn/v1/layers/mocked-layer/quadkeys/24414/depths/4`, + new Response( + `{"subQuads":[{"subQuadKey":"64","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"65","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"66","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"67","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"68","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"69","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"70","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"71","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"72","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"73","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"74","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"75","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"76","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"77","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"78","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"79","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"80","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"81","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"82","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"83","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"84","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"85","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"86","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"87","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"88","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"89","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"90","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"91","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"92","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"93","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"94","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"95","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"96","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"97","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"98","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"99","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"100","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"101","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"102","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"103","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"104","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"105","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"106","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"107","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"108","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"109","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"110","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"111","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"112","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"113","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"114","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"115","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"116","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"117","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"118","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"119","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"120","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"121","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"122","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"123","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"124","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"125","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"126","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"127","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"1","version":309,"dataHandle":"9E835327487159C24CC3BD9ABC1D9D8D.309"},{"subQuadKey":"16","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"17","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"18","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"19","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"20","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"21","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"22","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"23","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"24","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"25","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"26","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"27","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"28","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"29","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"30","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"31","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"256","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"257","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"258","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"259","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"260","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"261","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"262","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"263","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"264","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"265","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"266","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"267","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"268","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"269","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"270","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"271","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"272","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"273","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"274","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"275","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"276","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"277","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"278","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"279","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"280","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"281","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"282","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"283","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"284","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"285","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"286","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"287","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"288","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"289","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"290","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"291","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"292","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"293","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"294","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"295","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"296","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"297","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"298","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"299","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"300","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"301","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"302","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"303","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"304","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"305","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"306","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"307","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"308","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"309","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"310","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"311","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"312","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"313","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"314","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"315","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"316","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"317","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"318","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"319","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"320","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"321","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"322","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"323","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"324","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"325","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"326","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"327","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"328","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"329","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"330","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"331","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"332","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"333","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"334","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"335","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"336","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"337","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"338","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"339","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"340","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"341","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"342","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"343","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"344","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"345","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"346","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"347","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"348","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"349","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"350","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"351","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"352","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"353","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"354","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"355","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"356","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"357","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"358","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"359","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"360","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"361","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"362","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"363","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"364","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"365","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"366","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"367","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"368","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"369","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"370","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"371","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"372","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"373","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"374","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"375","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"376","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"377","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"378","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"379","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"380","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"381","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"382","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"383","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"384","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"385","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"386","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"387","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"388","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"389","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"390","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"391","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"392","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"393","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"394","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"395","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"396","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"397","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"398","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"399","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"400","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"401","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"402","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"403","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"404","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"405","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"406","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"407","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"408","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"409","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"410","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"411","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"412","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"413","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"414","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"415","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"416","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"417","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"418","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"419","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"420","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"421","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"422","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"423","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"424","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"425","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"426","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"427","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"428","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"429","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"430","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"431","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"432","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"433","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"434","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"435","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"436","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"437","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"438","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"439","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"440","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"441","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"442","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"443","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"444","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"445","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"446","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"447","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"448","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"449","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"450","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"451","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"452","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"453","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"454","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"455","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"456","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"457","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"458","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"459","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"460","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"461","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"462","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"463","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"464","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"465","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"466","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"467","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"468","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"469","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"470","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"471","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"472","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"473","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"474","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"475","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"476","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"477","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"478","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"479","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"480","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"481","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"482","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"483","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"484","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"485","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"486","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"487","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"488","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"489","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"490","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"491","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"492","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"493","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"494","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"495","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"496","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"497","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"498","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"499","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"500","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"501","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"502","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"503","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"504","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"505","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"506","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"507","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"508","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"509","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"510","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"511","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"4","version":309,"dataHandle":"8941BA72534EA59DC78AA066874F3F46.309"},{"subQuadKey":"5","version":309,"dataHandle":"8941BA72534EA59DC78AA066874F3F46.309"},{"subQuadKey":"6","version":309,"dataHandle":"0357B7D8E5E267C27A40375EEFD8CBDF.309"},{"subQuadKey":"7","version":309,"dataHandle":"0357B7D8E5E267C27A40375EEFD8CBDF.309"}],"parentQuads":[{"partition":"1525","version":309,"dataHandle":"5FA96A639F78245CCA052E6CA1B2E356.309"},{"partition":"23","version":311,"dataHandle":"E49841168CC61793C19635AB788B19F0.311"},{"partition":"381","version":309,"dataHandle":"B5496E024A5BBDB0AE8A7BD38614BB81.309"},{"partition":"5","version":311,"dataHandle":"48FBFF69B74F5B5CEEAE0D410ACF3783.311"},{"partition":"6103","version":309,"dataHandle":"B003789C316D46D70BDB0B4D02AE654A.309"},{"partition":"95","version":309,"dataHandle":"A46A7D44C6DB3C2880A0076FAE4098AF.309"}]}` + ) + ); + + mockedResponses.set( + `https://volatile-blob.data.api.platform.here.com/hrn:here:data:::test-hrn/v1/layers/mocked-layer/data/5D220F614ED66FDD4850E9846482193A.309`, + new Response(Buffer.alloc(100)) + ); + + mockedResponses.set( + `https://volatile-blob.data.api.platform.here.com/hrn:here:data:::test-hrn/v1/layers/mocked-layer/data/436735897B05C80C449B1D654541DE5E.309`, + new Response(Buffer.alloc(300)) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + + const layerClient = new VolatileLayerClient({ + catalogHrn: testHRN, + layerId: "mocked-layer", + settings + }); + + const request = new TileRequest(); + + const response = await layerClient.getAggregatedData( + request.withTileKey({ row: 818, column: 2021, level: 11 }) + ); + const response2 = await layerClient.getAggregatedData( + request.withTileKey({ row: 819, column: 2021, level: 11 }) + ); + + assert.isDefined(response); + assert.isDefined(response2); + + expect((await response.blob()).size).to.be.equals(100); + expect((await response2.blob()).size).to.be.equals(300); + + /** + * Should be 5 calls: + * 1 - lookup + * 2 - query + * 3 - blob + * 4 - blob + */ + expect(fetchStub.mock.calls.length).to.be.equal(4); }); - - const request = new TileRequest(); - - const response = await layerClient.getAggregatedData( - request.withTileKey({ row: 818, column: 2021, level: 11 }) - ); - const response2 = await layerClient.getAggregatedData( - request.withTileKey({ row: 819, column: 2021, level: 11 }) - ); - - assert.isDefined(response); - assert.isDefined(response2); - - expect((await response.blob()).size).to.be.equals(100); - expect((await response2.blob()).size).to.be.equals(300); - - /** - * Should be 5 calls: - * 1 - lookup - * 2 - query - * 3 - blob - * 4 - blob - */ - expect(fetchStub.callCount).to.be.equal(4); - }); }); diff --git a/tests/integration/olp-sdk-dataservice-read/getTile.test.ts b/tests/integration/olp-sdk-dataservice-read/getTile.test.ts index 757a89cc..7ba62ae7 100644 --- a/tests/integration/olp-sdk-dataservice-read/getTile.test.ts +++ b/tests/integration/olp-sdk-dataservice-read/getTile.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,137 +17,137 @@ * License-Filename: LICENSE */ -import * as sinon from "sinon"; -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { getTile, TileRequest } from "@here/olp-sdk-dataservice-read"; import { FetchMock } from "../FetchMock"; import { HRN, OlpClientSettings } from "@here/olp-sdk-core"; -chai.use(sinonChai); +describe("getTile", () => { + let fetchMock: FetchMock; + let fetchStub: any; + let settings: OlpClientSettings; -const assert = chai.assert; -const expect = chai.expect; + beforeAll(() => {}); -describe("getTile", () => { - let fetchMock: FetchMock; - let sandbox: sinon.SinonSandbox; - let fetchStub: sinon.SinonStub; - let settings: OlpClientSettings; - - before(() => { - sandbox = sinon.createSandbox(); - }); - - afterEach(() => { - sandbox.restore(); - }); - - beforeEach(() => { - fetchMock = new FetchMock(); - fetchStub = sandbox.stub(global as any, "fetch"); - fetchStub.callsFake(fetchMock.fetch()); - - // Setup Artifact Client with new OlpClientSettings. - settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("test-token-string") + afterEach(() => { + vi.restoreAllMocks(); }); - }); - - it("Should fetch tile by requested colomn row and level with caching quadTree", async function() { - const mockedResponses = new Map(); - const headers = new Headers(); - headers.append("cache-control", "max-age=3600"); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here-dev:data:::samplecatalog/apis`, - new Response( - JSON.stringify([ - { - api: "blob", - version: "v1", - baseURL: - "https://blob.data.api.platform.here.com/hrn:here-dev:data:::samplecatalog/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" + + beforeEach(() => { + fetchMock = new FetchMock(); + fetchStub = vi.spyOn(global as any, "fetch"); + fetchStub.mockImplementation(fetchMock.fetch()); + + // Setup Artifact Client with new OlpClientSettings. + settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("test-token-string") + }); + }); + + it("Should fetch tile by requested colomn row and level with caching quadTree", async function () { + const mockedResponses = new Map(); + const headers = new Headers(); + headers.append("cache-control", "max-age=3600"); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here-dev:data:::samplecatalog/apis`, + new Response( + JSON.stringify([ + { + api: "blob", + version: "v1", + baseURL: + "https://blob.data.api.platform.here.com/hrn:here-dev:data:::samplecatalog/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + }, + { + api: "query", + version: "v1", + baseURL: + "https://query.data.api.platform.here.com/hrn:here-dev:data:::samplecatalog/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + mockedResponses.set( + `https://query.data.api.platform.here.com/hrn:here-dev:data:::samplecatalog/v1/layers/mocked-layer/versions/123/quadkeys/24414/depths/4`, + new Response( + `{"subQuads":[{"subQuadKey":"64","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"65","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"66","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"67","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"68","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"69","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"70","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"71","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"72","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"73","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"74","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"75","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"76","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"77","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"78","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"79","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"80","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"81","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"82","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"83","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"84","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"85","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"86","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"87","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"88","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"89","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"90","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"91","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"92","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"93","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"94","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"95","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"96","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"97","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"98","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"99","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"100","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"101","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"102","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"103","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"104","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"105","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"106","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"107","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"108","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"109","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"110","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"111","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"112","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"113","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"114","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"115","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"116","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"117","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"118","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"119","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"120","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"121","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"122","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"123","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"124","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"125","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"126","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"127","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"1","version":309,"dataHandle":"9E835327487159C24CC3BD9ABC1D9D8D.309"},{"subQuadKey":"16","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"17","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"18","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"19","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"20","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"21","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"22","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"23","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"24","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"25","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"26","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"27","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"28","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"29","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"30","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"31","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"256","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"257","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"258","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"259","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"260","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"261","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"262","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"263","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"264","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"265","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"266","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"267","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"268","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"269","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"270","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"271","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"272","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"273","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"274","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"275","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"276","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"277","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"278","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"279","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"280","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"281","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"282","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"283","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"284","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"285","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"286","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"287","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"288","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"289","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"290","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"291","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"292","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"293","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"294","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"295","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"296","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"297","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"298","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"299","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"300","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"301","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"302","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"303","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"304","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"305","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"306","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"307","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"308","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"309","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"310","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"311","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"312","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"313","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"314","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"315","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"316","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"317","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"318","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"319","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"320","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"321","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"322","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"323","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"324","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"325","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"326","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"327","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"328","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"329","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"330","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"331","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"332","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"333","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"334","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"335","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"336","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"337","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"338","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"339","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"340","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"341","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"342","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"343","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"344","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"345","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"346","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"347","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"348","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"349","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"350","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"351","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"352","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"353","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"354","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"355","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"356","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"357","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"358","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"359","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"360","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"361","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"362","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"363","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"364","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"365","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"366","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"367","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"368","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"369","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"370","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"371","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"372","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"373","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"374","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"375","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"376","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"377","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"378","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"379","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"380","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"381","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"382","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"383","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"384","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"385","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"386","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"387","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"388","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"389","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"390","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"391","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"392","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"393","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"394","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"395","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"396","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"397","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"398","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"399","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"400","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"401","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"402","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"403","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"404","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"405","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"406","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"407","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"408","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"409","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"410","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"411","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"412","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"413","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"414","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"415","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"416","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"417","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"418","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"419","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"420","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"421","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"422","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"423","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"424","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"425","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"426","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"427","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"428","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"429","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"430","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"431","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"432","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"433","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"434","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"435","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"436","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"437","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"438","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"439","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"440","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"441","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"442","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"443","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"444","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"445","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"446","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"447","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"448","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"449","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"450","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"451","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"452","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"453","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"454","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"455","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"456","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"457","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"458","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"459","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"460","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"461","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"462","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"463","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"464","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"465","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"466","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"467","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"468","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"469","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"470","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"471","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"472","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"473","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"474","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"475","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"476","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"477","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"478","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"479","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"480","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"481","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"482","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"483","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"484","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"485","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"486","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"487","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"488","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"489","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"490","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"491","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"492","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"493","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"494","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"495","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"496","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"497","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"498","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"499","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"500","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"501","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"502","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"503","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"504","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"505","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"506","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"507","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"508","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"509","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"510","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"511","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"4","version":309,"dataHandle":"8941BA72534EA59DC78AA066874F3F46.309"},{"subQuadKey":"5","version":309,"dataHandle":"8941BA72534EA59DC78AA066874F3F46.309"},{"subQuadKey":"6","version":309,"dataHandle":"0357B7D8E5E267C27A40375EEFD8CBDF.309"},{"subQuadKey":"7","version":309,"dataHandle":"0357B7D8E5E267C27A40375EEFD8CBDF.309"}],"parentQuads":[{"partition":"1525","version":309,"dataHandle":"5FA96A639F78245CCA052E6CA1B2E356.309"},{"partition":"23","version":311,"dataHandle":"E49841168CC61793C19635AB788B19F0.311"},{"partition":"381","version":309,"dataHandle":"B5496E024A5BBDB0AE8A7BD38614BB81.309"},{"partition":"5","version":311,"dataHandle":"48FBFF69B74F5B5CEEAE0D410ACF3783.311"},{"partition":"6103","version":309,"dataHandle":"B003789C316D46D70BDB0B4D02AE654A.309"},{"partition":"95","version":309,"dataHandle":"A46A7D44C6DB3C2880A0076FAE4098AF.309"}]}` + ) + ); + + mockedResponses.set( + `https://blob.data.api.platform.here.com/hrn:here-dev:data:::samplecatalog/v1/layers/mocked-layer/data/5D220F614ED66FDD4850E9846482193A.309`, + new Response(Buffer.alloc(100)) + ); + + mockedResponses.set( + `https://blob.data.api.platform.here.com/hrn:here-dev:data:::samplecatalog/v1/layers/mocked-layer/data/436735897B05C80C449B1D654541DE5E.309`, + new Response(Buffer.alloc(300)) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const request = new TileRequest(); + + const response = await getTile( + request.withTileKey({ row: 818, column: 2021, level: 11 }), + { + catalogHrn: HRN.fromString("hrn:here-dev:data:::samplecatalog"), + layerId: "mocked-layer", + layerType: "versioned", + settings, + catalogVersion: 123 } - }, - { - api: "query", - version: "v1", - baseURL: - "https://query.data.api.platform.here.com/hrn:here-dev:data:::samplecatalog/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" + ); + const response2 = await getTile( + request.withTileKey({ row: 819, column: 2021, level: 11 }), + { + catalogHrn: HRN.fromString("hrn:here-dev:data:::samplecatalog"), + layerId: "mocked-layer", + layerType: "versioned", + settings, + catalogVersion: 123 } - } - ]), - { headers } - ) - ); - - mockedResponses.set( - `https://query.data.api.platform.here.com/hrn:here-dev:data:::samplecatalog/v1/layers/mocked-layer/versions/123/quadkeys/24414/depths/4`, - new Response( - `{"subQuads":[{"subQuadKey":"64","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"65","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"66","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"67","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"68","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"69","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"70","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"71","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"72","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"73","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"74","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"75","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"76","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"77","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"78","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"79","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"80","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"81","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"82","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"83","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"84","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"85","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"86","version":309,"dataHandle":"2297193A99F513DA23F40D0021CB01D0.309"},{"subQuadKey":"87","version":309,"dataHandle":"D63FA9E9CD89638BCCCF729BB7AD1CB8.309"},{"subQuadKey":"88","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"89","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"90","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"91","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"92","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"93","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"94","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"95","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"96","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"97","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"98","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"99","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"100","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"101","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"102","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"103","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"104","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"105","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"106","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"107","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"108","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"109","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"110","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"111","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"112","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"113","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"114","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"115","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"116","version":309,"dataHandle":"91682A4ABCAC3AB95758CF1E01444373.309"},{"subQuadKey":"117","version":309,"dataHandle":"7D068B97290AC948DC84BEBF10DD2079.309"},{"subQuadKey":"118","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"119","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"120","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"121","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"122","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"123","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"124","version":309,"dataHandle":"3BC6E551388E7E9449A6376CB0DB9254.309"},{"subQuadKey":"125","version":309,"dataHandle":"235A730981B48E30E04CA20457E3AC05.309"},{"subQuadKey":"126","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"127","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"1","version":309,"dataHandle":"9E835327487159C24CC3BD9ABC1D9D8D.309"},{"subQuadKey":"16","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"17","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"18","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"19","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"20","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"21","version":309,"dataHandle":"DE6CE7A31E7272C8037B3E5344769A1A.309"},{"subQuadKey":"22","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"23","version":309,"dataHandle":"C9522D8AA448785FCBC3B05E763B5477.309"},{"subQuadKey":"24","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"25","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"26","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"27","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"28","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"29","version":309,"dataHandle":"65435B35BBE9825D5A75F8CF77F8B683.309"},{"subQuadKey":"30","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"31","version":309,"dataHandle":"AA64D744612B79BDF0FB9B1D311F28FD.309"},{"subQuadKey":"256","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"257","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"258","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"259","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"260","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"261","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"262","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"263","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"264","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"265","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"266","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"267","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"268","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"269","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"270","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"271","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"272","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"273","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"274","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"275","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"276","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"277","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"278","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"279","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"280","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"281","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"282","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"283","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"284","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"285","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"286","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"287","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"288","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"289","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"290","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"291","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"292","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"293","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"294","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"295","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"296","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"297","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"298","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"299","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"300","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"301","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"302","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"303","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"304","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"305","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"306","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"307","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"308","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"309","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"310","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"311","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"312","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"313","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"314","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"315","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"316","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"317","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"318","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"319","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"320","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"321","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"322","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"323","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"324","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"325","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"326","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"327","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"328","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"329","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"330","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"331","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"332","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"333","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"334","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"335","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"336","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"337","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"338","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"339","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"340","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"341","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"342","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"343","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"344","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"345","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"346","version":309,"dataHandle":"44B55F66BD0CC98BD2EEB22B0946B923.309"},{"subQuadKey":"347","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"348","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"349","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"350","version":309,"dataHandle":"436735897B05C80C449B1D654541DE5E.309"},{"subQuadKey":"351","version":309,"dataHandle":"BB918FD0A2C3D0C13486DC20E70FE5D1.309"},{"subQuadKey":"352","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"353","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"354","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"355","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"356","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"357","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"358","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"359","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"360","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"361","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"362","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"363","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"364","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"365","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"366","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"367","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"368","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"369","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"370","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"371","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"372","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"373","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"374","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"375","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"376","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"377","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"378","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"379","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"380","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"381","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"382","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"383","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"384","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"385","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"386","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"387","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"388","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"389","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"390","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"391","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"392","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"393","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"394","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"395","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"396","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"397","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"398","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"399","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"400","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"401","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"402","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"403","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"404","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"405","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"406","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"407","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"408","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"409","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"410","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"411","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"412","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"413","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"414","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"415","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"416","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"417","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"418","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"419","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"420","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"421","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"422","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"423","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"424","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"425","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"426","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"427","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"428","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"429","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"430","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"431","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"432","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"433","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"434","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"435","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"436","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"437","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"438","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"439","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"440","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"441","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"442","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"443","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"444","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"445","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"446","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"447","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"448","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"449","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"450","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"451","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"452","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"453","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"454","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"455","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"456","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"457","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"458","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"459","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"460","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"461","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"462","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"463","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"464","version":309,"dataHandle":"B0D537F52AC1C17A27A339824C3853F9.309"},{"subQuadKey":"465","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"466","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"467","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"468","version":309,"dataHandle":"8EE1A707C5CB22DA4AC554EA1CF954D7.309"},{"subQuadKey":"469","version":309,"dataHandle":"A2FA393A124DDB2EEAF962D41F33E85F.309"},{"subQuadKey":"470","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"471","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"472","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"473","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"474","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"475","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"476","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"477","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"478","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"479","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"480","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"481","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"482","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"483","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"484","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"485","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"486","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"487","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"488","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"489","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"490","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"491","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"492","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"493","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"494","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"495","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"496","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"497","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"498","version":309,"dataHandle":"F357AFDE030AA20DF6960B48EB625CA3.309"},{"subQuadKey":"499","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"500","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"501","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"502","version":309,"dataHandle":"33FCF2B9A0A070C97A1372C355C56E9D.309"},{"subQuadKey":"503","version":309,"dataHandle":"5F74311EA37E90F55EC09D98F93EDA0C.309"},{"subQuadKey":"504","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"505","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"506","version":309,"dataHandle":"B8B9757AE8399D9603A684BAEA18C0AB.309"},{"subQuadKey":"507","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"508","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"509","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"510","version":309,"dataHandle":"5D220F614ED66FDD4850E9846482193A.309"},{"subQuadKey":"511","version":309,"dataHandle":"3774FD2C4E793770B86B82CF87F85E8B.309"},{"subQuadKey":"4","version":309,"dataHandle":"8941BA72534EA59DC78AA066874F3F46.309"},{"subQuadKey":"5","version":309,"dataHandle":"8941BA72534EA59DC78AA066874F3F46.309"},{"subQuadKey":"6","version":309,"dataHandle":"0357B7D8E5E267C27A40375EEFD8CBDF.309"},{"subQuadKey":"7","version":309,"dataHandle":"0357B7D8E5E267C27A40375EEFD8CBDF.309"}],"parentQuads":[{"partition":"1525","version":309,"dataHandle":"5FA96A639F78245CCA052E6CA1B2E356.309"},{"partition":"23","version":311,"dataHandle":"E49841168CC61793C19635AB788B19F0.311"},{"partition":"381","version":309,"dataHandle":"B5496E024A5BBDB0AE8A7BD38614BB81.309"},{"partition":"5","version":311,"dataHandle":"48FBFF69B74F5B5CEEAE0D410ACF3783.311"},{"partition":"6103","version":309,"dataHandle":"B003789C316D46D70BDB0B4D02AE654A.309"},{"partition":"95","version":309,"dataHandle":"A46A7D44C6DB3C2880A0076FAE4098AF.309"}]}` - ) - ); - - mockedResponses.set( - `https://blob.data.api.platform.here.com/hrn:here-dev:data:::samplecatalog/v1/layers/mocked-layer/data/5D220F614ED66FDD4850E9846482193A.309`, - new Response(Buffer.alloc(100)) - ); - - mockedResponses.set( - `https://blob.data.api.platform.here.com/hrn:here-dev:data:::samplecatalog/v1/layers/mocked-layer/data/436735897B05C80C449B1D654541DE5E.309`, - new Response(Buffer.alloc(300)) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const request = new TileRequest(); - - const response = await getTile( - request.withTileKey({ row: 818, column: 2021, level: 11 }), - { - catalogHrn: HRN.fromString("hrn:here-dev:data:::samplecatalog"), - layerId: "mocked-layer", - layerType: "versioned", - settings, - catalogVersion: 123 - } - ); - const response2 = await getTile( - request.withTileKey({ row: 819, column: 2021, level: 11 }), - { - catalogHrn: HRN.fromString("hrn:here-dev:data:::samplecatalog"), - layerId: "mocked-layer", - layerType: "versioned", - settings, - catalogVersion: 123 - } - ); - - assert.isDefined(response); - assert.isDefined(response2); - - expect((await response.blob()).size).to.be.equals(100); - expect((await response2.blob()).size).to.be.equals(300); - - /** - * Should be 5 calls: - * 1 - lookup - * 2 - query - * 3 - blob - * 4 - blob - */ - expect(fetchStub.callCount).to.be.equal(4); - }); + ); + + assert.isDefined(response); + assert.isDefined(response2); + + expect((await response.blob()).size).to.be.equals(100); + expect((await response2.blob()).size).to.be.equals(300); + + /** + * Should be 5 calls: + * 1 - lookup + * 2 - query + * 3 - blob + * 4 - blob + */ + expect(fetchStub.mock.calls.length).to.be.equal(4); + }); }); diff --git a/tests/integration/olp-sdk-dataservice-write/MultiPartUploadWrapper.test.ts b/tests/integration/olp-sdk-dataservice-write/MultiPartUploadWrapper.test.ts index 8b51a43c..83f57890 100644 --- a/tests/integration/olp-sdk-dataservice-write/MultiPartUploadWrapper.test.ts +++ b/tests/integration/olp-sdk-dataservice-write/MultiPartUploadWrapper.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 HERE Europe B.V. + * Copyright (C) 2021-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,228 +17,227 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); -import sinon = require("sinon"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { MultiPartUploadWrapper } from "@here/olp-sdk-dataservice-write"; import { OlpClientSettings } from "@here/olp-sdk-core"; import { FetchMock } from "../FetchMock"; -chai.use(sinonChai); +describe("Multipart Upload Integration Test", function () { + let fetchMock: FetchMock; + let fetchStub: any; + let settings: OlpClientSettings; -const assert = chai.assert; -const expect = chai.expect; + settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }); + const catalogHrn = "hrn:here:data:::mocked-hrn"; + const layerId = "mocked-layer-id"; + const dataSize = 74 * 1024 * 1024; + const contentType = "text/plain"; + const data = Buffer.alloc(dataSize, 1); -describe("Multipart Upload Integration Test", function() { - let fetchMock: FetchMock; - let sandbox: sinon.SinonSandbox; - let fetchStub: sinon.SinonStub; - let settings: OlpClientSettings; + const headers = new Headers(); + headers.append("cache-control", "max-age=3600"); - settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }); - const catalogHrn = "hrn:here:data:::mocked-hrn"; - const layerId = "mocked-layer-id"; - const dataSize = 74 * 1024 * 1024; - const contentType = "text/plain"; - const data = Buffer.alloc(dataSize, 1); + beforeAll(function () {}); - const headers = new Headers(); - headers.append("cache-control", "max-age=3600"); + afterEach(function () { + vi.restoreAllMocks(); + }); - before(function() { - sandbox = sinon.createSandbox(); - }); + beforeEach(function () { + fetchMock = new FetchMock(); + fetchStub = vi.spyOn(global as any, "fetch"); + fetchStub.mockImplementation(fetchMock.fetch()); - afterEach(function() { - sandbox.restore(); - }); + settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }); + }); - beforeEach(function() { - fetchMock = new FetchMock(); - fetchStub = sandbox.stub(global as any, "fetch"); - fetchStub.callsFake(fetchMock.fetch()); + it("Should initialize", function () { + const wrapper = new MultiPartUploadWrapper( + { + catalogHrn, + layerId, + handle: "mocked-dataHandle", + blobVersion: "v1", + contentType + }, + settings + ); - settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") + assert.isDefined(wrapper); + expect(wrapper).be.instanceOf(MultiPartUploadWrapper); }); - }); - - it("Should initialize", function() { - const wrapper = new MultiPartUploadWrapper( - { - catalogHrn, - layerId, - handle: "mocked-dataHandle", - blobVersion: "v1", - contentType - }, - settings - ); - - assert.isDefined(wrapper); - expect(wrapper).be.instanceOf(MultiPartUploadWrapper); - }); - - it("Should upload to Blob V1", async function() { - const mockedResponses = new Map(); - - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "blob", - version: "v1", - baseURL: `https://mocked.api/blobstore/v1`, - parameters: {} - } - ]), - { headers } - ) - ); - - mockedResponses.set( - `https://mocked.api/blobstore/v1/layers/mocked-layer-id/data/mocked-dataHandle/multiparts`, - new Response( - JSON.stringify({ - links: { - status: { - href: `https://mocked.api/multiparts/mocked-blob-token`, - method: "GET" - }, - delete: { - href: `https://mocked.api/multiparts/mocked-blob-token`, - method: "DELETE" + + it("Should upload to Blob V1", async function () { + const mockedResponses = new Map(); + + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "blob", + version: "v1", + baseURL: `https://mocked.api/blobstore/v1`, + parameters: {} + } + ]), + { headers } + ) + ); + + mockedResponses.set( + `https://mocked.api/blobstore/v1/layers/mocked-layer-id/data/mocked-dataHandle/multiparts`, + new Response( + JSON.stringify({ + links: { + status: { + href: `https://mocked.api/multiparts/mocked-blob-token`, + method: "GET" + }, + delete: { + href: `https://mocked.api/multiparts/mocked-blob-token`, + method: "DELETE" + }, + uploadPart: { + href: `https://mocked.api/multiparts/mocked-blob-token/parts`, + method: "POST" + }, + complete: { + href: `https://mocked.api/multiparts/mocked-blob-token`, + method: "PUT" + } + } + }), + { headers } + ) + ); + + const partsHeaders = new Headers(); + partsHeaders.append("cache-control", "max-age=3600"); + partsHeaders.append("ETag", `${Math.random() * 10000}`); + + for (let partNumber = 0; partNumber < 16; partNumber++) { + mockedResponses.set( + `https://mocked.api/multiparts/mocked-blob-token/parts?partNumber=${partNumber}`, + new Response(undefined, { headers: partsHeaders }) + ); + } + + mockedResponses.set( + `https://mocked.api/multiparts/mocked-blob-token`, + new Response(undefined, { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const wrapper = new MultiPartUploadWrapper( + { + catalogHrn, + layerId, + handle: "mocked-dataHandle", + blobVersion: "v1", + contentType }, - uploadPart: { - href: `https://mocked.api/multiparts/mocked-blob-token/parts`, - method: "POST" + settings + ); + + await wrapper.upload(data); + + /** + * Should be 18 calls: + * 1 - lookup + * 1 - start multipart + * 15 - upload part + * 1 - complete multipart + */ + expect(fetchStub.mock.calls.length).to.be.equal(18); + }); + + it("Should upload to Blob V2", async function () { + const mockedResponses = new Map(); + + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "blob", + version: "v2", + baseURL: `https://mocked.api/blobstore/v2`, + parameters: {} + } + ]), + { headers } + ) + ); + + mockedResponses.set( + `https://mocked.api/blobstore/v2/layers/mocked-layer-id/keys/mocked-key`, + new Response( + JSON.stringify({ + multipartToken: "mocked-multipartToken" + }), + { headers } + ) + ); + + for (let partNumber = 0; partNumber < 16; partNumber++) { + mockedResponses.set( + `https://mocked.api/blobstore/v2/layers/mocked-layer-id/keysMultipart/mocked-multipartToken/parts?partNumber=${partNumber}`, + new Response( + JSON.stringify({ + id: `${Math.random() * 10000}` + }), + { headers } + ) + ); + } + + mockedResponses.set( + `https://mocked.api/blobstore/v2/layers/mocked-layer-id/keysMultipart/mocked-multipartToken`, + new Response(undefined, { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const wrapper = new MultiPartUploadWrapper( + { + catalogHrn, + layerId, + handle: "mocked-key", + blobVersion: "v2", + contentType }, - complete: { - href: `https://mocked.api/multiparts/mocked-blob-token`, - method: "PUT" - } - } - }), - { headers } - ) - ); - - const partsHeaders = new Headers(); - partsHeaders.append("cache-control", "max-age=3600"); - partsHeaders.append("ETag", `${Math.random() * 10000}`); - - for (let partNumber = 0; partNumber < 16; partNumber++) { - mockedResponses.set( - `https://mocked.api/multiparts/mocked-blob-token/parts?partNumber=${partNumber}`, - new Response(undefined, { headers: partsHeaders }) - ); - } - - mockedResponses.set( - `https://mocked.api/multiparts/mocked-blob-token`, - new Response(undefined, { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const wrapper = new MultiPartUploadWrapper( - { - catalogHrn, - layerId, - handle: "mocked-dataHandle", - blobVersion: "v1", - contentType - }, - settings - ); - - await wrapper.upload(data); - - /** - * Should be 18 calls: - * 1 - lookup - * 1 - start multipart - * 15 - upload part - * 1 - complete multipart - */ - expect(fetchStub.callCount).to.be.equal(18); - }); - - it("Should upload to Blob V2", async function() { - const mockedResponses = new Map(); - - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "blob", - version: "v2", - baseURL: `https://mocked.api/blobstore/v2`, - parameters: {} - } - ]), - { headers } - ) - ); - - mockedResponses.set( - `https://mocked.api/blobstore/v2/layers/mocked-layer-id/keys/mocked-key`, - new Response( - JSON.stringify({ - multipartToken: "mocked-multipartToken" - }), - { headers } - ) - ); - - for (let partNumber = 0; partNumber < 16; partNumber++) { - mockedResponses.set( - `https://mocked.api/blobstore/v2/layers/mocked-layer-id/keysMultipart/mocked-multipartToken/parts?partNumber=${partNumber}`, - new Response( - JSON.stringify({ - id: `${Math.random() * 10000}` - }), - { headers } - ) - ); - } - - mockedResponses.set( - `https://mocked.api/blobstore/v2/layers/mocked-layer-id/keysMultipart/mocked-multipartToken`, - new Response(undefined, { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const wrapper = new MultiPartUploadWrapper( - { - catalogHrn, - layerId, - handle: "mocked-key", - blobVersion: "v2", - contentType - }, - settings - ); - - await wrapper.upload(data); - - /** - * Should be 18 calls: - * 1 - lookup - * 1 - start multipart - * 15 - upload part - * 1 - complete multipart - */ - expect(fetchStub.callCount).to.be.equal(18); - }); + settings + ); + + await wrapper.upload(data); + + /** + * Should be 18 calls: + * 1 - lookup + * 1 - start multipart + * 15 - upload part + * 1 - complete multipart + */ + expect(fetchStub.mock.calls.length).to.be.equal(18); + }); }); diff --git a/tests/integration/olp-sdk-dataservice-write/VersionedLayer.test.ts b/tests/integration/olp-sdk-dataservice-write/VersionedLayer.test.ts index 43b6f641..3c86ebde 100644 --- a/tests/integration/olp-sdk-dataservice-write/VersionedLayer.test.ts +++ b/tests/integration/olp-sdk-dataservice-write/VersionedLayer.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. + * Copyright (C) 2020-2026 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,113 +17,113 @@ * License-Filename: LICENSE */ -import * as chai from "chai"; -import sinonChai = require("sinon-chai"); -import sinon = require("sinon"); - +import { + afterAll, + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, + assert +} from "vitest"; import { VersionedLayerClient } from "@here/olp-sdk-dataservice-write"; import { HRN, OlpClientSettings } from "@here/olp-sdk-core"; import { FetchMock } from "../FetchMock"; -chai.use(sinonChai); - -const assert = chai.assert; -const expect = chai.expect; - -describe("Versioned Layer Client for write", function() { - let fetchMock: FetchMock; - let sandbox: sinon.SinonSandbox; - let fetchStub: sinon.SinonStub; - let settings: OlpClientSettings; +describe("Versioned Layer Client for write", function () { + let fetchMock: FetchMock; + let fetchStub: any; + let settings: OlpClientSettings; - settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") - }); - const catalogHrn = HRN.fromString("hrn:here:data:::mocked-hrn"); - - const headers = new Headers(); - headers.append("cache-control", "max-age=3600"); - - before(function() { - sandbox = sinon.createSandbox(); - }); + settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }); + const catalogHrn = HRN.fromString("hrn:here:data:::mocked-hrn"); - afterEach(function() { - sandbox.restore(); - }); + const headers = new Headers(); + headers.append("cache-control", "max-age=3600"); - beforeEach(function() { - fetchMock = new FetchMock(); - fetchStub = sandbox.stub(global as any, "fetch"); - fetchStub.callsFake(fetchMock.fetch()); + beforeAll(function () {}); - settings = new OlpClientSettings({ - environment: "here", - getToken: () => Promise.resolve("mocked-token") + afterEach(function () { + vi.restoreAllMocks(); }); - }); - it("Should initialize", function() { - const client = new VersionedLayerClient({ - catalogHrn, - settings - }); + beforeEach(function () { + fetchMock = new FetchMock(); + fetchStub = vi.spyOn(global as any, "fetch"); + fetchStub.mockImplementation(fetchMock.fetch()); - assert.isDefined(client); - expect(client).be.instanceOf(VersionedLayerClient); - }); - - xit("Should fetch the latest version of catalog", async function() { - const mockedResponses = new Map(); - - // Set the response from lookup api with the info about Metadata service. - mockedResponses.set( - `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, - new Response( - JSON.stringify([ - { - api: "metadata", - version: "v1", - baseURL: "https://metadata.data.api.platform.here.com/metadata/v1", - parameters: { - additionalProp1: "string", - additionalProp2: "string", - additionalProp3: "string" - } - } - ]), - { headers } - ) - ); - - const mockedVersion = { - version: 123 - }; - - mockedResponses.set( - `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, - new Response(JSON.stringify(mockedVersion), { headers }) - ); - - // Setup the fetch to use mocked responses. - fetchMock.withMockedResponses(mockedResponses); - - const client = new VersionedLayerClient({ - catalogHrn, - settings + settings = new OlpClientSettings({ + environment: "here", + getToken: () => Promise.resolve("mocked-token") + }); }); - let versionResponse = await client.getBaseVersion(); - assert.isDefined(versionResponse); + it("Should initialize", function () { + const client = new VersionedLayerClient({ + catalogHrn, + settings + }); - expect(versionResponse).to.be.equal(123); + assert.isDefined(client); + expect(client).be.instanceOf(VersionedLayerClient); + }); - /** - * Should be two calls: - * 1 - lookup - * 2 - metadata - */ - expect(fetchStub.callCount).to.be.equal(2); - }); + it.skip("Should fetch the latest version of catalog", async function () { + const mockedResponses = new Map(); + + // Set the response from lookup api with the info about Metadata service. + mockedResponses.set( + `https://api-lookup.data.api.platform.here.com/lookup/v1/resources/hrn:here:data:::mocked-hrn/apis`, + new Response( + JSON.stringify([ + { + api: "metadata", + version: "v1", + baseURL: + "https://metadata.data.api.platform.here.com/metadata/v1", + parameters: { + additionalProp1: "string", + additionalProp2: "string", + additionalProp3: "string" + } + } + ]), + { headers } + ) + ); + + const mockedVersion = { + version: 123 + }; + + mockedResponses.set( + `https://metadata.data.api.platform.here.com/metadata/v1/versions/latest?startVersion=-1`, + new Response(JSON.stringify(mockedVersion), { headers }) + ); + + // Setup the fetch to use mocked responses. + fetchMock.withMockedResponses(mockedResponses); + + const client = new VersionedLayerClient({ + catalogHrn, + settings + }); + let versionResponse = await client.getBaseVersion(); + + assert.isDefined(versionResponse); + + expect(versionResponse).to.be.equal(123); + + /** + * Should be two calls: + * 1 - lookup + * 2 - metadata + */ + expect(fetchStub.mock.calls.length).to.be.equal(2); + }); }); diff --git a/tsconfig.json b/tsconfig.json index 43fefaaa..2ede515a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,24 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", - "lib": ["es2017", "dom"], + "target": "ES2022", + "lib": ["ES2022", "DOM"], "sourceMap": true, "declaration": true, "baseUrl": ".", "rootDir": ".", "strict": true, + "useUnknownInCatchVariables": false, + "skipLibCheck": true, + // The `exclude` below resolves to the root `node_modules` in every + // extending package config. From TypeScript 6 on, `@types/*` inside an + // excluded directory is no longer auto-included, which makes the Node + // globals (`Buffer`, `fs`, `process`, ...) fail to resolve - already + // visible in editors that ship a newer compiler than the repo pins. + // Request them explicitly. Types reached through an `import`/`require` + // resolve as modules and are unaffected by this list. + "types": ["node"], "resolveJsonModule": true, - "downlevelIteration": true, "newLine": "LF", "noImplicitReturns": true }, diff --git a/vitest.api-breaks.config.ts b/vitest.api-breaks.config.ts new file mode 100644 index 00000000..29106492 --- /dev/null +++ b/vitest.api-breaks.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["tests/integration/api-breaks/*.test.ts"], + environment: "node", + testTimeout: 10000 + } +}); diff --git a/vitest.bundles-generated.config.ts b/vitest.bundles-generated.config.ts new file mode 100644 index 00000000..c40c50f3 --- /dev/null +++ b/vitest.bundles-generated.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["tests/integration/bundles/umd/olp-sdk-generated.test.ts"], + environment: "node", + testTimeout: 30000, + hookTimeout: 30000 + } +}); diff --git a/vitest.bundles-published.config.ts b/vitest.bundles-published.config.ts new file mode 100644 index 00000000..ae6c5553 --- /dev/null +++ b/vitest.bundles-published.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["tests/integration/bundles/umd/olp-sdk-published.test.ts"], + environment: "node", + testTimeout: 30000, + hookTimeout: 30000 + } +}); diff --git a/vitest.functional.config.ts b/vitest.functional.config.ts new file mode 100644 index 00000000..cf1ec950 --- /dev/null +++ b/vitest.functional.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["tests/functional/*.test.ts"], + environment: "node", + testTimeout: 10000, + // The hooks boot and stop a JVM, and mockserver-node polls for + // readiness for about 11 seconds before it gives up. The 10 second + // default always cuts that short and reports a timeout instead of + // the error that mockserver-node is about to raise. + hookTimeout: 30000 + } +}); diff --git a/vitest.integration.config.ts b/vitest.integration.config.ts new file mode 100644 index 00000000..1a871bce --- /dev/null +++ b/vitest.integration.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["tests/integration/olp-sdk-*/*.test.ts"], + environment: "node", + testTimeout: 10000 + } +}); diff --git a/vitest.shared.ts b/vitest.shared.ts new file mode 100644 index 00000000..81fdb4b0 --- /dev/null +++ b/vitest.shared.ts @@ -0,0 +1,41 @@ +import * as path from "path"; +import type { CoverageOptions } from "vitest/node"; + +// Absolute path to the monorepo root (this file lives at the root). +const root = __dirname; + +// Only the higher-level packages are aliased to their TypeScript sources. The +// low-level `olp-sdk-fetch` and `olp-sdk-dataservice-api` are intentionally left +// as compiled output so their exported namespaces (e.g. `BlobApi`, `MetadataApi`) +// keep writable members that `vi.spyOn` can replace. +const packages = [ + "olp-sdk-core", + "olp-sdk-authentication", + "olp-sdk-dataservice-read", + "olp-sdk-dataservice-write" +]; + +// Resolve every `@here/*` import (including deep `@here/*/lib/...` paths) to the +// package TypeScript sources instead of the compiled output. This gives Vitest a +// single, consistent module graph so module mocking, spying and self-referential +// barrel imports behave predictably. +export const hereAliases = [ + ...packages.map((name) => ({ + find: new RegExp(`^@here/${name}/(.*)`), + replacement: path.join(root, "@here", name, "$1") + })), + ...packages.map((name) => ({ + find: new RegExp(`^@here/${name}$`), + replacement: path.join(root, "@here", name, "index.ts") + })) +]; + +// Every package writes its own report, and Codecov merges them by file path. +// Package relative paths collide - all six packages have an `index.ts`, and +// both dataservice packages have a `lib/client/VersionedLayerClient.ts` - so +// the lcov paths are written relative to the monorepo root instead. +export const coverageReporters: CoverageOptions["reporter"] = [ + "text", + "html", + ["lcov", { projectRoot: root }] +]; diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 0463c034..00000000 --- a/yarn.lock +++ /dev/null @@ -1,9448 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ampproject/remapping@^2.2.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" - integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.24" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.2": - version "7.24.2" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" - integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== - dependencies: - "@babel/highlight" "^7.24.2" - picocolors "^1.0.0" - -"@babel/compat-data@^7.23.5": - version "7.24.4" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.4.tgz#6f102372e9094f25d908ca0d34fc74c74606059a" - integrity sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ== - -"@babel/core@^7.0.0", "@babel/core@^7.7.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.5.tgz#15ab5b98e101972d171aeef92ac70d8d6718f06a" - integrity sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.24.2" - "@babel/generator" "^7.24.5" - "@babel/helper-compilation-targets" "^7.23.6" - "@babel/helper-module-transforms" "^7.24.5" - "@babel/helpers" "^7.24.5" - "@babel/parser" "^7.24.5" - "@babel/template" "^7.24.0" - "@babel/traverse" "^7.24.5" - "@babel/types" "^7.24.5" - convert-source-map "^2.0.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.3" - semver "^6.3.1" - -"@babel/generator@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.5.tgz#e5afc068f932f05616b66713e28d0f04e99daeb3" - integrity sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA== - dependencies: - "@babel/types" "^7.24.5" - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.25" - jsesc "^2.5.1" - -"@babel/helper-compilation-targets@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz#4d79069b16cbcf1461289eccfbbd81501ae39991" - integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== - dependencies: - "@babel/compat-data" "^7.23.5" - "@babel/helper-validator-option" "^7.23.5" - browserslist "^4.22.2" - lru-cache "^5.1.1" - semver "^6.3.1" - -"@babel/helper-environment-visitor@^7.22.20": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" - integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== - -"@babel/helper-function-name@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" - integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== - dependencies: - "@babel/template" "^7.22.15" - "@babel/types" "^7.23.0" - -"@babel/helper-hoist-variables@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" - integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-module-imports@^7.24.3": - version "7.24.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz#6ac476e6d168c7c23ff3ba3cf4f7841d46ac8128" - integrity sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg== - dependencies: - "@babel/types" "^7.24.0" - -"@babel/helper-module-transforms@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz#ea6c5e33f7b262a0ae762fd5986355c45f54a545" - integrity sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A== - dependencies: - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-module-imports" "^7.24.3" - "@babel/helper-simple-access" "^7.24.5" - "@babel/helper-split-export-declaration" "^7.24.5" - "@babel/helper-validator-identifier" "^7.24.5" - -"@babel/helper-simple-access@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz#50da5b72f58c16b07fbd992810be6049478e85ba" - integrity sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ== - dependencies: - "@babel/types" "^7.24.5" - -"@babel/helper-split-export-declaration@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz#b9a67f06a46b0b339323617c8c6213b9055a78b6" - integrity sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q== - dependencies: - "@babel/types" "^7.24.5" - -"@babel/helper-string-parser@^7.24.1": - version "7.24.1" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz#f99c36d3593db9540705d0739a1f10b5e20c696e" - integrity sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ== - -"@babel/helper-validator-identifier@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz#918b1a7fa23056603506370089bd990d8720db62" - integrity sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA== - -"@babel/helper-validator-option@^7.23.5": - version "7.23.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" - integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== - -"@babel/helpers@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.5.tgz#fedeb87eeafa62b621160402181ad8585a22a40a" - integrity sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q== - dependencies: - "@babel/template" "^7.24.0" - "@babel/traverse" "^7.24.5" - "@babel/types" "^7.24.5" - -"@babel/highlight@^7.24.2": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.5.tgz#bc0613f98e1dd0720e99b2a9ee3760194a704b6e" - integrity sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw== - dependencies: - "@babel/helper-validator-identifier" "^7.24.5" - chalk "^2.4.2" - js-tokens "^4.0.0" - picocolors "^1.0.0" - -"@babel/parser@^7.24.0", "@babel/parser@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.5.tgz#4a4d5ab4315579e5398a82dcf636ca80c3392790" - integrity sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg== - -"@babel/runtime@^7.0.0": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.5.tgz#230946857c053a36ccc66e1dd03b17dd0c4ed02c" - integrity sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g== - dependencies: - regenerator-runtime "^0.14.0" - -"@babel/template@^7.22.15", "@babel/template@^7.24.0": - version "7.24.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.0.tgz#c6a524aa93a4a05d66aaf31654258fae69d87d50" - integrity sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA== - dependencies: - "@babel/code-frame" "^7.23.5" - "@babel/parser" "^7.24.0" - "@babel/types" "^7.24.0" - -"@babel/traverse@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.5.tgz#972aa0bc45f16983bf64aa1f877b2dd0eea7e6f8" - integrity sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA== - dependencies: - "@babel/code-frame" "^7.24.2" - "@babel/generator" "^7.24.5" - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.23.0" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.24.5" - "@babel/parser" "^7.24.5" - "@babel/types" "^7.24.5" - debug "^4.3.1" - globals "^11.1.0" - -"@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.0", "@babel/types@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.5.tgz#7661930afc638a5383eb0c4aee59b74f38db84d7" - integrity sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ== - dependencies: - "@babel/helper-string-parser" "^7.24.1" - "@babel/helper-validator-identifier" "^7.24.5" - to-fast-properties "^2.0.0" - -"@cspotcode/source-map-support@^0.8.0": - version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - -"@gar/promisify@^1.0.1": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" - integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== - -"@hutson/parse-repository-url@^3.0.0": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340" - integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q== - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jridgewell/gen-mapping@^0.3.5": - version "0.3.5" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" - integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== - dependencies: - "@jridgewell/set-array" "^1.2.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.24" - -"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" - integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== - -"@jridgewell/set-array@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" - integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== - -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": - version "0.3.25" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" - integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - -"@lerna/add@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/add/-/add-4.0.0.tgz#c36f57d132502a57b9e7058d1548b7a565ef183f" - integrity sha512-cpmAH1iS3k8JBxNvnMqrGTTjbY/ZAiKa1ChJzFevMYY3eeqbvhsBKnBcxjRXtdrJ6bd3dCQM+ZtK+0i682Fhng== - dependencies: - "@lerna/bootstrap" "4.0.0" - "@lerna/command" "4.0.0" - "@lerna/filter-options" "4.0.0" - "@lerna/npm-conf" "4.0.0" - "@lerna/validation-error" "4.0.0" - dedent "^0.7.0" - npm-package-arg "^8.1.0" - p-map "^4.0.0" - pacote "^11.2.6" - semver "^7.3.4" - -"@lerna/bootstrap@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-4.0.0.tgz#5f5c5e2c6cfc8fcec50cb2fbe569a8c607101891" - integrity sha512-RkS7UbeM2vu+kJnHzxNRCLvoOP9yGNgkzRdy4UV2hNalD7EP41bLvRVOwRYQ7fhc2QcbhnKNdOBihYRL0LcKtw== - dependencies: - "@lerna/command" "4.0.0" - "@lerna/filter-options" "4.0.0" - "@lerna/has-npm-version" "4.0.0" - "@lerna/npm-install" "4.0.0" - "@lerna/package-graph" "4.0.0" - "@lerna/pulse-till-done" "4.0.0" - "@lerna/rimraf-dir" "4.0.0" - "@lerna/run-lifecycle" "4.0.0" - "@lerna/run-topologically" "4.0.0" - "@lerna/symlink-binary" "4.0.0" - "@lerna/symlink-dependencies" "4.0.0" - "@lerna/validation-error" "4.0.0" - dedent "^0.7.0" - get-port "^5.1.1" - multimatch "^5.0.0" - npm-package-arg "^8.1.0" - npmlog "^4.1.2" - p-map "^4.0.0" - p-map-series "^2.1.0" - p-waterfall "^2.1.1" - read-package-tree "^5.3.1" - semver "^7.3.4" - -"@lerna/changed@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-4.0.0.tgz#b9fc76cea39b9292a6cd263f03eb57af85c9270b" - integrity sha512-cD+KuPRp6qiPOD+BO6S6SN5cARspIaWSOqGBpGnYzLb4uWT8Vk4JzKyYtc8ym1DIwyoFXHosXt8+GDAgR8QrgQ== - dependencies: - "@lerna/collect-updates" "4.0.0" - "@lerna/command" "4.0.0" - "@lerna/listable" "4.0.0" - "@lerna/output" "4.0.0" - -"@lerna/check-working-tree@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-4.0.0.tgz#257e36a602c00142e76082a19358e3e1ae8dbd58" - integrity sha512-/++bxM43jYJCshBiKP5cRlCTwSJdRSxVmcDAXM+1oUewlZJVSVlnks5eO0uLxokVFvLhHlC5kHMc7gbVFPHv6Q== - dependencies: - "@lerna/collect-uncommitted" "4.0.0" - "@lerna/describe-ref" "4.0.0" - "@lerna/validation-error" "4.0.0" - -"@lerna/child-process@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-4.0.0.tgz#341b96a57dffbd9705646d316e231df6fa4df6e1" - integrity sha512-XtCnmCT9eyVsUUHx6y/CTBYdV9g2Cr/VxyseTWBgfIur92/YKClfEtJTbOh94jRT62hlKLqSvux/UhxXVh613Q== - dependencies: - chalk "^4.1.0" - execa "^5.0.0" - strong-log-transformer "^2.1.0" - -"@lerna/clean@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-4.0.0.tgz#8f778b6f2617aa2a936a6b5e085ae62498e57dc5" - integrity sha512-uugG2iN9k45ITx2jtd8nEOoAtca8hNlDCUM0N3lFgU/b1mEQYAPRkqr1qs4FLRl/Y50ZJ41wUz1eazS+d/0osA== - dependencies: - "@lerna/command" "4.0.0" - "@lerna/filter-options" "4.0.0" - "@lerna/prompt" "4.0.0" - "@lerna/pulse-till-done" "4.0.0" - "@lerna/rimraf-dir" "4.0.0" - p-map "^4.0.0" - p-map-series "^2.1.0" - p-waterfall "^2.1.1" - -"@lerna/cli@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-4.0.0.tgz#8eabd334558836c1664df23f19acb95e98b5bbf3" - integrity sha512-Neaw3GzFrwZiRZv2g7g6NwFjs3er1vhraIniEs0jjVLPMNC4eata0na3GfE5yibkM/9d3gZdmihhZdZ3EBdvYA== - dependencies: - "@lerna/global-options" "4.0.0" - dedent "^0.7.0" - npmlog "^4.1.2" - yargs "^16.2.0" - -"@lerna/collect-uncommitted@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-4.0.0.tgz#855cd64612969371cfc2453b90593053ff1ba779" - integrity sha512-ufSTfHZzbx69YNj7KXQ3o66V4RC76ffOjwLX0q/ab//61bObJ41n03SiQEhSlmpP+gmFbTJ3/7pTe04AHX9m/g== - dependencies: - "@lerna/child-process" "4.0.0" - chalk "^4.1.0" - npmlog "^4.1.2" - -"@lerna/collect-updates@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-4.0.0.tgz#8e208b1bafd98a372ff1177f7a5e288f6bea8041" - integrity sha512-bnNGpaj4zuxsEkyaCZLka9s7nMs58uZoxrRIPJ+nrmrZYp1V5rrd+7/NYTuunOhY2ug1sTBvTAxj3NZQ+JKnOw== - dependencies: - "@lerna/child-process" "4.0.0" - "@lerna/describe-ref" "4.0.0" - minimatch "^3.0.4" - npmlog "^4.1.2" - slash "^3.0.0" - -"@lerna/command@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/command/-/command-4.0.0.tgz#991c7971df8f5bf6ae6e42c808869a55361c1b98" - integrity sha512-LM9g3rt5FsPNFqIHUeRwWXLNHJ5NKzOwmVKZ8anSp4e1SPrv2HNc1V02/9QyDDZK/w+5POXH5lxZUI1CHaOK/A== - dependencies: - "@lerna/child-process" "4.0.0" - "@lerna/package-graph" "4.0.0" - "@lerna/project" "4.0.0" - "@lerna/validation-error" "4.0.0" - "@lerna/write-log-file" "4.0.0" - clone-deep "^4.0.1" - dedent "^0.7.0" - execa "^5.0.0" - is-ci "^2.0.0" - npmlog "^4.1.2" - -"@lerna/conventional-commits@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-4.0.0.tgz#660fb2c7b718cb942ead70110df61f18c6f99750" - integrity sha512-CSUQRjJHFrH8eBn7+wegZLV3OrNc0Y1FehYfYGhjLE2SIfpCL4bmfu/ViYuHh9YjwHaA+4SX6d3hR+xkeseKmw== - dependencies: - "@lerna/validation-error" "4.0.0" - conventional-changelog-angular "^5.0.12" - conventional-changelog-core "^4.2.2" - conventional-recommended-bump "^6.1.0" - fs-extra "^9.1.0" - get-stream "^6.0.0" - lodash.template "^4.5.0" - npm-package-arg "^8.1.0" - npmlog "^4.1.2" - pify "^5.0.0" - semver "^7.3.4" - -"@lerna/create-symlink@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-4.0.0.tgz#8c5317ce5ae89f67825443bd7651bf4121786228" - integrity sha512-I0phtKJJdafUiDwm7BBlEUOtogmu8+taxq6PtIrxZbllV9hWg59qkpuIsiFp+no7nfRVuaasNYHwNUhDAVQBig== - dependencies: - cmd-shim "^4.1.0" - fs-extra "^9.1.0" - npmlog "^4.1.2" - -"@lerna/create@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-4.0.0.tgz#b6947e9b5dfb6530321952998948c3e63d64d730" - integrity sha512-mVOB1niKByEUfxlbKTM1UNECWAjwUdiioIbRQZEeEabtjCL69r9rscIsjlGyhGWCfsdAG5wfq4t47nlDXdLLag== - dependencies: - "@lerna/child-process" "4.0.0" - "@lerna/command" "4.0.0" - "@lerna/npm-conf" "4.0.0" - "@lerna/validation-error" "4.0.0" - dedent "^0.7.0" - fs-extra "^9.1.0" - globby "^11.0.2" - init-package-json "^2.0.2" - npm-package-arg "^8.1.0" - p-reduce "^2.1.0" - pacote "^11.2.6" - pify "^5.0.0" - semver "^7.3.4" - slash "^3.0.0" - validate-npm-package-license "^3.0.4" - validate-npm-package-name "^3.0.0" - whatwg-url "^8.4.0" - yargs-parser "20.2.4" - -"@lerna/describe-ref@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-4.0.0.tgz#53c53b4ea65fdceffa072a62bfebe6772c45d9ec" - integrity sha512-eTU5+xC4C5Gcgz+Ey4Qiw9nV2B4JJbMulsYJMW8QjGcGh8zudib7Sduj6urgZXUYNyhYpRs+teci9M2J8u+UvQ== - dependencies: - "@lerna/child-process" "4.0.0" - npmlog "^4.1.2" - -"@lerna/diff@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-4.0.0.tgz#6d3071817aaa4205a07bf77cfc6e932796d48b92" - integrity sha512-jYPKprQVg41+MUMxx6cwtqsNm0Yxx9GDEwdiPLwcUTFx+/qKCEwifKNJ1oGIPBxyEHX2PFCOjkK39lHoj2qiag== - dependencies: - "@lerna/child-process" "4.0.0" - "@lerna/command" "4.0.0" - "@lerna/validation-error" "4.0.0" - npmlog "^4.1.2" - -"@lerna/exec@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-4.0.0.tgz#eb6cb95cb92d42590e9e2d628fcaf4719d4a8be6" - integrity sha512-VGXtL/b/JfY84NB98VWZpIExfhLOzy0ozm/0XaS4a2SmkAJc5CeUfrhvHxxkxiTBLkU+iVQUyYEoAT0ulQ8PCw== - dependencies: - "@lerna/child-process" "4.0.0" - "@lerna/command" "4.0.0" - "@lerna/filter-options" "4.0.0" - "@lerna/profiler" "4.0.0" - "@lerna/run-topologically" "4.0.0" - "@lerna/validation-error" "4.0.0" - p-map "^4.0.0" - -"@lerna/filter-options@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-4.0.0.tgz#ac94cc515d7fa3b47e2f7d74deddeabb1de5e9e6" - integrity sha512-vV2ANOeZhOqM0rzXnYcFFCJ/kBWy/3OA58irXih9AMTAlQLymWAK0akWybl++sUJ4HB9Hx12TOqaXbYS2NM5uw== - dependencies: - "@lerna/collect-updates" "4.0.0" - "@lerna/filter-packages" "4.0.0" - dedent "^0.7.0" - npmlog "^4.1.2" - -"@lerna/filter-packages@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-4.0.0.tgz#b1f70d70e1de9cdd36a4e50caa0ac501f8d012f2" - integrity sha512-+4AJIkK7iIiOaqCiVTYJxh/I9qikk4XjNQLhE3kixaqgMuHl1NQ99qXRR0OZqAWB9mh8Z1HA9bM5K1HZLBTOqA== - dependencies: - "@lerna/validation-error" "4.0.0" - multimatch "^5.0.0" - npmlog "^4.1.2" - -"@lerna/get-npm-exec-opts@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-4.0.0.tgz#dc955be94a4ae75c374ef9bce91320887d34608f" - integrity sha512-yvmkerU31CTWS2c7DvmAWmZVeclPBqI7gPVr5VATUKNWJ/zmVcU4PqbYoLu92I9Qc4gY1TuUplMNdNuZTSL7IQ== - dependencies: - npmlog "^4.1.2" - -"@lerna/get-packed@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-4.0.0.tgz#0989d61624ac1f97e393bdad2137c49cd7a37823" - integrity sha512-rfWONRsEIGyPJTxFzC8ECb3ZbsDXJbfqWYyeeQQDrJRPnEJErlltRLPLgC2QWbxFgFPsoDLeQmFHJnf0iDfd8w== - dependencies: - fs-extra "^9.1.0" - ssri "^8.0.1" - tar "^6.1.0" - -"@lerna/github-client@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-4.0.0.tgz#2ced67721363ef70f8e12ffafce4410918f4a8a4" - integrity sha512-2jhsldZtTKXYUBnOm23Lb0Fx8G4qfSXF9y7UpyUgWUj+YZYd+cFxSuorwQIgk5P4XXrtVhsUesIsli+BYSThiw== - dependencies: - "@lerna/child-process" "4.0.0" - "@octokit/plugin-enterprise-rest" "^6.0.1" - "@octokit/rest" "^18.1.0" - git-url-parse "^11.4.4" - npmlog "^4.1.2" - -"@lerna/gitlab-client@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-4.0.0.tgz#00dad73379c7b38951d4b4ded043504c14e2b67d" - integrity sha512-OMUpGSkeDWFf7BxGHlkbb35T7YHqVFCwBPSIR6wRsszY8PAzCYahtH3IaJzEJyUg6vmZsNl0FSr3pdA2skhxqA== - dependencies: - node-fetch "^2.6.1" - npmlog "^4.1.2" - whatwg-url "^8.4.0" - -"@lerna/global-options@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-4.0.0.tgz#c7d8b0de6a01d8a845e2621ea89e7f60f18c6a5f" - integrity sha512-TRMR8afAHxuYBHK7F++Ogop2a82xQjoGna1dvPOY6ltj/pEx59pdgcJfYcynYqMkFIk8bhLJJN9/ndIfX29FTQ== - -"@lerna/has-npm-version@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-4.0.0.tgz#d3fc3292c545eb28bd493b36e6237cf0279f631c" - integrity sha512-LQ3U6XFH8ZmLCsvsgq1zNDqka0Xzjq5ibVN+igAI5ccRWNaUsE/OcmsyMr50xAtNQMYMzmpw5GVLAivT2/YzCg== - dependencies: - "@lerna/child-process" "4.0.0" - semver "^7.3.4" - -"@lerna/import@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/import/-/import-4.0.0.tgz#bde656c4a451fa87ae41733ff8a8da60547c5465" - integrity sha512-FaIhd+4aiBousKNqC7TX1Uhe97eNKf5/SC7c5WZANVWtC7aBWdmswwDt3usrzCNpj6/Wwr9EtEbYROzxKH8ffg== - dependencies: - "@lerna/child-process" "4.0.0" - "@lerna/command" "4.0.0" - "@lerna/prompt" "4.0.0" - "@lerna/pulse-till-done" "4.0.0" - "@lerna/validation-error" "4.0.0" - dedent "^0.7.0" - fs-extra "^9.1.0" - p-map-series "^2.1.0" - -"@lerna/info@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/info/-/info-4.0.0.tgz#b9fb0e479d60efe1623603958a831a88b1d7f1fc" - integrity sha512-8Uboa12kaCSZEn4XRfPz5KU9XXoexSPS4oeYGj76s2UQb1O1GdnEyfjyNWoUl1KlJ2i/8nxUskpXIftoFYH0/Q== - dependencies: - "@lerna/command" "4.0.0" - "@lerna/output" "4.0.0" - envinfo "^7.7.4" - -"@lerna/init@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/init/-/init-4.0.0.tgz#dadff67e6dfb981e8ccbe0e6a310e837962f6c7a" - integrity sha512-wY6kygop0BCXupzWj5eLvTUqdR7vIAm0OgyV9WHpMYQGfs1V22jhztt8mtjCloD/O0nEe4tJhdG62XU5aYmPNQ== - dependencies: - "@lerna/child-process" "4.0.0" - "@lerna/command" "4.0.0" - fs-extra "^9.1.0" - p-map "^4.0.0" - write-json-file "^4.3.0" - -"@lerna/link@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/link/-/link-4.0.0.tgz#c3a38aabd44279d714e90f2451e31b63f0fb65ba" - integrity sha512-KlvPi7XTAcVOByfaLlOeYOfkkDcd+bejpHMCd1KcArcFTwijOwXOVi24DYomIeHvy6HsX/IUquJ4PPUJIeB4+w== - dependencies: - "@lerna/command" "4.0.0" - "@lerna/package-graph" "4.0.0" - "@lerna/symlink-dependencies" "4.0.0" - p-map "^4.0.0" - slash "^3.0.0" - -"@lerna/list@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/list/-/list-4.0.0.tgz#24b4e6995bd73f81c556793fe502b847efd9d1d7" - integrity sha512-L2B5m3P+U4Bif5PultR4TI+KtW+SArwq1i75QZ78mRYxPc0U/piau1DbLOmwrdqr99wzM49t0Dlvl6twd7GHFg== - dependencies: - "@lerna/command" "4.0.0" - "@lerna/filter-options" "4.0.0" - "@lerna/listable" "4.0.0" - "@lerna/output" "4.0.0" - -"@lerna/listable@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-4.0.0.tgz#d00d6cb4809b403f2b0374fc521a78e318b01214" - integrity sha512-/rPOSDKsOHs5/PBLINZOkRIX1joOXUXEtyUs5DHLM8q6/RP668x/1lFhw6Dx7/U+L0+tbkpGtZ1Yt0LewCLgeQ== - dependencies: - "@lerna/query-graph" "4.0.0" - chalk "^4.1.0" - columnify "^1.5.4" - -"@lerna/log-packed@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-4.0.0.tgz#95168fe2e26ac6a71e42f4be857519b77e57a09f" - integrity sha512-+dpCiWbdzgMAtpajLToy9PO713IHoE6GV/aizXycAyA07QlqnkpaBNZ8DW84gHdM1j79TWockGJo9PybVhrrZQ== - dependencies: - byte-size "^7.0.0" - columnify "^1.5.4" - has-unicode "^2.0.1" - npmlog "^4.1.2" - -"@lerna/npm-conf@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-4.0.0.tgz#b259fd1e1cee2bf5402b236e770140ff9ade7fd2" - integrity sha512-uS7H02yQNq3oejgjxAxqq/jhwGEE0W0ntr8vM3EfpCW1F/wZruwQw+7bleJQ9vUBjmdXST//tk8mXzr5+JXCfw== - dependencies: - config-chain "^1.1.12" - pify "^5.0.0" - -"@lerna/npm-dist-tag@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-4.0.0.tgz#d1e99b4eccd3414142f0548ad331bf2d53f3257a" - integrity sha512-F20sg28FMYTgXqEQihgoqSfwmq+Id3zT23CnOwD+XQMPSy9IzyLf1fFVH319vXIw6NF6Pgs4JZN2Qty6/CQXGw== - dependencies: - "@lerna/otplease" "4.0.0" - npm-package-arg "^8.1.0" - npm-registry-fetch "^9.0.0" - npmlog "^4.1.2" - -"@lerna/npm-install@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-4.0.0.tgz#31180be3ab3b7d1818a1a0c206aec156b7094c78" - integrity sha512-aKNxq2j3bCH3eXl3Fmu4D54s/YLL9WSwV8W7X2O25r98wzrO38AUN6AB9EtmAx+LV/SP15et7Yueg9vSaanRWg== - dependencies: - "@lerna/child-process" "4.0.0" - "@lerna/get-npm-exec-opts" "4.0.0" - fs-extra "^9.1.0" - npm-package-arg "^8.1.0" - npmlog "^4.1.2" - signal-exit "^3.0.3" - write-pkg "^4.0.0" - -"@lerna/npm-publish@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-4.0.0.tgz#84eb62e876fe949ae1fd62c60804423dbc2c4472" - integrity sha512-vQb7yAPRo5G5r77DRjHITc9piR9gvEKWrmfCH7wkfBnGWEqu7n8/4bFQ7lhnkujvc8RXOsYpvbMQkNfkYibD/w== - dependencies: - "@lerna/otplease" "4.0.0" - "@lerna/run-lifecycle" "4.0.0" - fs-extra "^9.1.0" - libnpmpublish "^4.0.0" - npm-package-arg "^8.1.0" - npmlog "^4.1.2" - pify "^5.0.0" - read-package-json "^3.0.0" - -"@lerna/npm-run-script@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-4.0.0.tgz#dfebf4f4601442e7c0b5214f9fb0d96c9350743b" - integrity sha512-Jmyh9/IwXJjOXqKfIgtxi0bxi1pUeKe5bD3S81tkcy+kyng/GNj9WSqD5ZggoNP2NP//s4CLDAtUYLdP7CU9rA== - dependencies: - "@lerna/child-process" "4.0.0" - "@lerna/get-npm-exec-opts" "4.0.0" - npmlog "^4.1.2" - -"@lerna/otplease@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-4.0.0.tgz#84972eb43448f8a1077435ba1c5e59233b725850" - integrity sha512-Sgzbqdk1GH4psNiT6hk+BhjOfIr/5KhGBk86CEfHNJTk9BK4aZYyJD4lpDbDdMjIV4g03G7pYoqHzH765T4fxw== - dependencies: - "@lerna/prompt" "4.0.0" - -"@lerna/output@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/output/-/output-4.0.0.tgz#b1d72215c0e35483e4f3e9994debc82c621851f2" - integrity sha512-Un1sHtO1AD7buDQrpnaYTi2EG6sLF+KOPEAMxeUYG5qG3khTs2Zgzq5WE3dt2N/bKh7naESt20JjIW6tBELP0w== - dependencies: - npmlog "^4.1.2" - -"@lerna/pack-directory@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-4.0.0.tgz#8b617db95d20792f043aaaa13a9ccc0e04cb4c74" - integrity sha512-NJrmZNmBHS+5aM+T8N6FVbaKFScVqKlQFJNY2k7nsJ/uklNKsLLl6VhTQBPwMTbf6Tf7l6bcKzpy7aePuq9UiQ== - dependencies: - "@lerna/get-packed" "4.0.0" - "@lerna/package" "4.0.0" - "@lerna/run-lifecycle" "4.0.0" - npm-packlist "^2.1.4" - npmlog "^4.1.2" - tar "^6.1.0" - temp-write "^4.0.0" - -"@lerna/package-graph@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-4.0.0.tgz#16a00253a8ac810f72041481cb46bcee8d8123dd" - integrity sha512-QED2ZCTkfXMKFoTGoccwUzjHtZMSf3UKX14A4/kYyBms9xfFsesCZ6SLI5YeySEgcul8iuIWfQFZqRw+Qrjraw== - dependencies: - "@lerna/prerelease-id-from-version" "4.0.0" - "@lerna/validation-error" "4.0.0" - npm-package-arg "^8.1.0" - npmlog "^4.1.2" - semver "^7.3.4" - -"@lerna/package@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/package/-/package-4.0.0.tgz#1b4c259c4bcff45c876ee1d591a043aacbc0d6b7" - integrity sha512-l0M/izok6FlyyitxiQKr+gZLVFnvxRQdNhzmQ6nRnN9dvBJWn+IxxpM+cLqGACatTnyo9LDzNTOj2Db3+s0s8Q== - dependencies: - load-json-file "^6.2.0" - npm-package-arg "^8.1.0" - write-pkg "^4.0.0" - -"@lerna/prerelease-id-from-version@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-4.0.0.tgz#c7e0676fcee1950d85630e108eddecdd5b48c916" - integrity sha512-GQqguzETdsYRxOSmdFZ6zDBXDErIETWOqomLERRY54f4p+tk4aJjoVdd9xKwehC9TBfIFvlRbL1V9uQGHh1opg== - dependencies: - semver "^7.3.4" - -"@lerna/profiler@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-4.0.0.tgz#8a53ab874522eae15d178402bff90a14071908e9" - integrity sha512-/BaEbqnVh1LgW/+qz8wCuI+obzi5/vRE8nlhjPzdEzdmWmZXuCKyWSEzAyHOJWw1ntwMiww5dZHhFQABuoFz9Q== - dependencies: - fs-extra "^9.1.0" - npmlog "^4.1.2" - upath "^2.0.1" - -"@lerna/project@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/project/-/project-4.0.0.tgz#ff84893935833533a74deff30c0e64ddb7f0ba6b" - integrity sha512-o0MlVbDkD5qRPkFKlBZsXZjoNTWPyuL58564nSfZJ6JYNmgAptnWPB2dQlAc7HWRZkmnC2fCkEdoU+jioPavbg== - dependencies: - "@lerna/package" "4.0.0" - "@lerna/validation-error" "4.0.0" - cosmiconfig "^7.0.0" - dedent "^0.7.0" - dot-prop "^6.0.1" - glob-parent "^5.1.1" - globby "^11.0.2" - load-json-file "^6.2.0" - npmlog "^4.1.2" - p-map "^4.0.0" - resolve-from "^5.0.0" - write-json-file "^4.3.0" - -"@lerna/prompt@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-4.0.0.tgz#5ec69a803f3f0db0ad9f221dad64664d3daca41b" - integrity sha512-4Ig46oCH1TH5M7YyTt53fT6TuaKMgqUUaqdgxvp6HP6jtdak6+amcsqB8YGz2eQnw/sdxunx84DfI9XpoLj4bQ== - dependencies: - inquirer "^7.3.3" - npmlog "^4.1.2" - -"@lerna/publish@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-4.0.0.tgz#f67011305adeba120066a3b6d984a5bb5fceef65" - integrity sha512-K8jpqjHrChH22qtkytA5GRKIVFEtqBF6JWj1I8dWZtHs4Jywn8yB1jQ3BAMLhqmDJjWJtRck0KXhQQKzDK2UPg== - dependencies: - "@lerna/check-working-tree" "4.0.0" - "@lerna/child-process" "4.0.0" - "@lerna/collect-updates" "4.0.0" - "@lerna/command" "4.0.0" - "@lerna/describe-ref" "4.0.0" - "@lerna/log-packed" "4.0.0" - "@lerna/npm-conf" "4.0.0" - "@lerna/npm-dist-tag" "4.0.0" - "@lerna/npm-publish" "4.0.0" - "@lerna/otplease" "4.0.0" - "@lerna/output" "4.0.0" - "@lerna/pack-directory" "4.0.0" - "@lerna/prerelease-id-from-version" "4.0.0" - "@lerna/prompt" "4.0.0" - "@lerna/pulse-till-done" "4.0.0" - "@lerna/run-lifecycle" "4.0.0" - "@lerna/run-topologically" "4.0.0" - "@lerna/validation-error" "4.0.0" - "@lerna/version" "4.0.0" - fs-extra "^9.1.0" - libnpmaccess "^4.0.1" - npm-package-arg "^8.1.0" - npm-registry-fetch "^9.0.0" - npmlog "^4.1.2" - p-map "^4.0.0" - p-pipe "^3.1.0" - pacote "^11.2.6" - semver "^7.3.4" - -"@lerna/pulse-till-done@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-4.0.0.tgz#04bace7d483a8205c187b806bcd8be23d7bb80a3" - integrity sha512-Frb4F7QGckaybRhbF7aosLsJ5e9WuH7h0KUkjlzSByVycxY91UZgaEIVjS2oN9wQLrheLMHl6SiFY0/Pvo0Cxg== - dependencies: - npmlog "^4.1.2" - -"@lerna/query-graph@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-4.0.0.tgz#09dd1c819ac5ee3f38db23931143701f8a6eef63" - integrity sha512-YlP6yI3tM4WbBmL9GCmNDoeQyzcyg1e4W96y/PKMZa5GbyUvkS2+Jc2kwPD+5KcXou3wQZxSPzR3Te5OenaDdg== - dependencies: - "@lerna/package-graph" "4.0.0" - -"@lerna/resolve-symlink@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-4.0.0.tgz#6d006628a210c9b821964657a9e20a8c9a115e14" - integrity sha512-RtX8VEUzqT+uLSCohx8zgmjc6zjyRlh6i/helxtZTMmc4+6O4FS9q5LJas2uGO2wKvBlhcD6siibGt7dIC3xZA== - dependencies: - fs-extra "^9.1.0" - npmlog "^4.1.2" - read-cmd-shim "^2.0.0" - -"@lerna/rimraf-dir@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-4.0.0.tgz#2edf3b62d4eb0ef4e44e430f5844667d551ec25a" - integrity sha512-QNH9ABWk9mcMJh2/muD9iYWBk1oQd40y6oH+f3wwmVGKYU5YJD//+zMiBI13jxZRtwBx0vmBZzkBkK1dR11cBg== - dependencies: - "@lerna/child-process" "4.0.0" - npmlog "^4.1.2" - path-exists "^4.0.0" - rimraf "^3.0.2" - -"@lerna/run-lifecycle@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-4.0.0.tgz#e648a46f9210a9bcd7c391df6844498cb5079334" - integrity sha512-IwxxsajjCQQEJAeAaxF8QdEixfI7eLKNm4GHhXHrgBu185JcwScFZrj9Bs+PFKxwb+gNLR4iI5rpUdY8Y0UdGQ== - dependencies: - "@lerna/npm-conf" "4.0.0" - npm-lifecycle "^3.1.5" - npmlog "^4.1.2" - -"@lerna/run-topologically@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-4.0.0.tgz#af846eeee1a09b0c2be0d1bfb5ef0f7b04bb1827" - integrity sha512-EVZw9hGwo+5yp+VL94+NXRYisqgAlj0jWKWtAIynDCpghRxCE5GMO3xrQLmQgqkpUl9ZxQFpICgYv5DW4DksQA== - dependencies: - "@lerna/query-graph" "4.0.0" - p-queue "^6.6.2" - -"@lerna/run@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/run/-/run-4.0.0.tgz#4bc7fda055a729487897c23579694f6183c91262" - integrity sha512-9giulCOzlMPzcZS/6Eov6pxE9gNTyaXk0Man+iCIdGJNMrCnW7Dme0Z229WWP/UoxDKg71F2tMsVVGDiRd8fFQ== - dependencies: - "@lerna/command" "4.0.0" - "@lerna/filter-options" "4.0.0" - "@lerna/npm-run-script" "4.0.0" - "@lerna/output" "4.0.0" - "@lerna/profiler" "4.0.0" - "@lerna/run-topologically" "4.0.0" - "@lerna/timer" "4.0.0" - "@lerna/validation-error" "4.0.0" - p-map "^4.0.0" - -"@lerna/symlink-binary@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-4.0.0.tgz#21009f62d53a425f136cb4c1a32c6b2a0cc02d47" - integrity sha512-zualodWC4q1QQc1pkz969hcFeWXOsVYZC5AWVtAPTDfLl+TwM7eG/O6oP+Rr3fFowspxo6b1TQ6sYfDV6HXNWA== - dependencies: - "@lerna/create-symlink" "4.0.0" - "@lerna/package" "4.0.0" - fs-extra "^9.1.0" - p-map "^4.0.0" - -"@lerna/symlink-dependencies@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-4.0.0.tgz#8910eca084ae062642d0490d8972cf2d98e9ebbd" - integrity sha512-BABo0MjeUHNAe2FNGty1eantWp8u83BHSeIMPDxNq0MuW2K3CiQRaeWT3EGPAzXpGt0+hVzBrA6+OT0GPn7Yuw== - dependencies: - "@lerna/create-symlink" "4.0.0" - "@lerna/resolve-symlink" "4.0.0" - "@lerna/symlink-binary" "4.0.0" - fs-extra "^9.1.0" - p-map "^4.0.0" - p-map-series "^2.1.0" - -"@lerna/timer@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-4.0.0.tgz#a52e51bfcd39bfd768988049ace7b15c1fd7a6da" - integrity sha512-WFsnlaE7SdOvjuyd05oKt8Leg3ENHICnvX3uYKKdByA+S3g+TCz38JsNs7OUZVt+ba63nC2nbXDlUnuT2Xbsfg== - -"@lerna/validation-error@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-4.0.0.tgz#af9d62fe8304eaa2eb9a6ba1394f9aa807026d35" - integrity sha512-1rBOM5/koiVWlRi3V6dB863E1YzJS8v41UtsHgMr6gB2ncJ2LsQtMKlJpi3voqcgh41H8UsPXR58RrrpPpufyw== - dependencies: - npmlog "^4.1.2" - -"@lerna/version@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/version/-/version-4.0.0.tgz#532659ec6154d8a8789c5ab53878663e244e3228" - integrity sha512-otUgiqs5W9zGWJZSCCMRV/2Zm2A9q9JwSDS7s/tlKq4mWCYriWo7+wsHEA/nPTMDyYyBO5oyZDj+3X50KDUzeA== - dependencies: - "@lerna/check-working-tree" "4.0.0" - "@lerna/child-process" "4.0.0" - "@lerna/collect-updates" "4.0.0" - "@lerna/command" "4.0.0" - "@lerna/conventional-commits" "4.0.0" - "@lerna/github-client" "4.0.0" - "@lerna/gitlab-client" "4.0.0" - "@lerna/output" "4.0.0" - "@lerna/prerelease-id-from-version" "4.0.0" - "@lerna/prompt" "4.0.0" - "@lerna/run-lifecycle" "4.0.0" - "@lerna/run-topologically" "4.0.0" - "@lerna/validation-error" "4.0.0" - chalk "^4.1.0" - dedent "^0.7.0" - load-json-file "^6.2.0" - minimatch "^3.0.4" - npmlog "^4.1.2" - p-map "^4.0.0" - p-pipe "^3.1.0" - p-reduce "^2.1.0" - p-waterfall "^2.1.1" - semver "^7.3.4" - slash "^3.0.0" - temp-write "^4.0.0" - write-json-file "^4.3.0" - -"@lerna/write-log-file@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-4.0.0.tgz#18221a38a6a307d6b0a5844dd592ad53fa27091e" - integrity sha512-XRG5BloiArpXRakcnPHmEHJp+4AtnhRtpDIHSghmXD5EichI1uD73J7FgPp30mm2pDRq3FdqB0NbwSEsJ9xFQg== - dependencies: - npmlog "^4.1.2" - write-file-atomic "^3.0.3" - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@npmcli/ci-detect@^1.0.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@npmcli/ci-detect/-/ci-detect-1.4.0.tgz#18478bbaa900c37bfbd8a2006a6262c62e8b0fe1" - integrity sha512-3BGrt6FLjqM6br5AhWRKTr3u5GIVkjRYeAFrMp3HjnfICrg4xOrVRwFavKT6tsp++bq5dluL5t8ME/Nha/6c1Q== - -"@npmcli/fs@^1.0.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-1.1.1.tgz#72f719fe935e687c56a4faecf3c03d06ba593257" - integrity sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ== - dependencies: - "@gar/promisify" "^1.0.1" - semver "^7.3.5" - -"@npmcli/git@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-2.1.0.tgz#2fbd77e147530247d37f325930d457b3ebe894f6" - integrity sha512-/hBFX/QG1b+N7PZBFs0bi+evgRZcK9nWBxQKZkGoXUT5hJSwl5c4d7y8/hm+NQZRPhQ67RzFaj5UM9YeyKoryw== - dependencies: - "@npmcli/promise-spawn" "^1.3.2" - lru-cache "^6.0.0" - mkdirp "^1.0.4" - npm-pick-manifest "^6.1.1" - promise-inflight "^1.0.1" - promise-retry "^2.0.1" - semver "^7.3.5" - which "^2.0.2" - -"@npmcli/installed-package-contents@^1.0.6": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz#ab7408c6147911b970a8abe261ce512232a3f4fa" - integrity sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw== - dependencies: - npm-bundled "^1.1.1" - npm-normalize-package-bin "^1.0.1" - -"@npmcli/move-file@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674" - integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== - dependencies: - mkdirp "^1.0.4" - rimraf "^3.0.2" - -"@npmcli/node-gyp@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz#a912e637418ffc5f2db375e93b85837691a43a33" - integrity sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA== - -"@npmcli/promise-spawn@^1.2.0", "@npmcli/promise-spawn@^1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz#42d4e56a8e9274fba180dabc0aea6e38f29274f5" - integrity sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg== - dependencies: - infer-owner "^1.0.4" - -"@npmcli/run-script@^1.8.2": - version "1.8.6" - resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-1.8.6.tgz#18314802a6660b0d4baa4c3afe7f1ad39d8c28b7" - integrity sha512-e42bVZnC6VluBZBAFEr3YrdqSspG3bgilyg4nSLBJ7TRGNCzxHa92XAHxQBLYg0BmgwO4b2mf3h/l5EkEWRn3g== - dependencies: - "@npmcli/node-gyp" "^1.0.2" - "@npmcli/promise-spawn" "^1.3.2" - node-gyp "^7.1.0" - read-package-json-fast "^2.0.1" - -"@octokit/auth-token@^2.4.4": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36" - integrity sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g== - dependencies: - "@octokit/types" "^6.0.3" - -"@octokit/core@^3.5.1": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.6.0.tgz#3376cb9f3008d9b3d110370d90e0a1fcd5fe6085" - integrity sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q== - dependencies: - "@octokit/auth-token" "^2.4.4" - "@octokit/graphql" "^4.5.8" - "@octokit/request" "^5.6.3" - "@octokit/request-error" "^2.0.5" - "@octokit/types" "^6.0.3" - before-after-hook "^2.2.0" - universal-user-agent "^6.0.0" - -"@octokit/endpoint@^6.0.1": - version "6.0.12" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.12.tgz#3b4d47a4b0e79b1027fb8d75d4221928b2d05658" - integrity sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA== - dependencies: - "@octokit/types" "^6.0.3" - is-plain-object "^5.0.0" - universal-user-agent "^6.0.0" - -"@octokit/graphql@^4.5.8": - version "4.8.0" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.8.0.tgz#664d9b11c0e12112cbf78e10f49a05959aa22cc3" - integrity sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg== - dependencies: - "@octokit/request" "^5.6.0" - "@octokit/types" "^6.0.3" - universal-user-agent "^6.0.0" - -"@octokit/openapi-types@^12.11.0": - version "12.11.0" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.11.0.tgz#da5638d64f2b919bca89ce6602d059f1b52d3ef0" - integrity sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ== - -"@octokit/plugin-enterprise-rest@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437" - integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw== - -"@octokit/plugin-paginate-rest@^2.16.8": - version "2.21.3" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz#7f12532797775640dbb8224da577da7dc210c87e" - integrity sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw== - dependencies: - "@octokit/types" "^6.40.0" - -"@octokit/plugin-request-log@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" - integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== - -"@octokit/plugin-rest-endpoint-methods@^5.12.0": - version "5.16.2" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz#7ee8bf586df97dd6868cf68f641354e908c25342" - integrity sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw== - dependencies: - "@octokit/types" "^6.39.0" - deprecation "^2.3.1" - -"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677" - integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg== - dependencies: - "@octokit/types" "^6.0.3" - deprecation "^2.0.0" - once "^1.4.0" - -"@octokit/request@^5.6.0", "@octokit/request@^5.6.3": - version "5.6.3" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.3.tgz#19a022515a5bba965ac06c9d1334514eb50c48b0" - integrity sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A== - dependencies: - "@octokit/endpoint" "^6.0.1" - "@octokit/request-error" "^2.1.0" - "@octokit/types" "^6.16.1" - is-plain-object "^5.0.0" - node-fetch "^2.6.7" - universal-user-agent "^6.0.0" - -"@octokit/rest@^18.1.0": - version "18.12.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.12.0.tgz#f06bc4952fc87130308d810ca9d00e79f6988881" - integrity sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q== - dependencies: - "@octokit/core" "^3.5.1" - "@octokit/plugin-paginate-rest" "^2.16.8" - "@octokit/plugin-request-log" "^1.0.4" - "@octokit/plugin-rest-endpoint-methods" "^5.12.0" - -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.39.0", "@octokit/types@^6.40.0": - version "6.41.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.41.0.tgz#e58ef78d78596d2fb7df9c6259802464b5f84a04" - integrity sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg== - dependencies: - "@octokit/openapi-types" "^12.11.0" - -"@samverschueren/stream-to-observable@^0.3.0": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz#a21117b19ee9be70c379ec1877537ef2e1c63301" - integrity sha512-c/qwwcHyafOQuVQJj0IlBjf5yYgBI7YPJ77k4fOJYesb41jio65eaJODRUmfYKhTOFBrIZ66kgvGPlNbjuoRdQ== - dependencies: - any-observable "^0.3.0" - -"@sinonjs/commons@^1", "@sinonjs/commons@^1.3.0", "@sinonjs/commons@^1.4.0", "@sinonjs/commons@^1.7.0": - version "1.8.6" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.6.tgz#80c516a4dc264c2a69115e7578d62581ff455ed9" - integrity sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ== - dependencies: - type-detect "4.0.8" - -"@sinonjs/formatio@^3.2.1": - version "3.2.2" - resolved "https://registry.yarnpkg.com/@sinonjs/formatio/-/formatio-3.2.2.tgz#771c60dfa75ea7f2d68e3b94c7e888a78781372c" - integrity sha512-B8SEsgd8gArBLMD6zpRw3juQ2FVSsmdd7qlevyDqzS9WTCtvF55/gAL+h6gue8ZvPYcdiPdvueM/qm//9XzyTQ== - dependencies: - "@sinonjs/commons" "^1" - "@sinonjs/samsam" "^3.1.0" - -"@sinonjs/samsam@^3.1.0", "@sinonjs/samsam@^3.3.3": - version "3.3.3" - resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-3.3.3.tgz#46682efd9967b259b81136b9f120fd54585feb4a" - integrity sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ== - dependencies: - "@sinonjs/commons" "^1.3.0" - array-from "^2.1.1" - lodash "^4.17.15" - -"@sinonjs/text-encoding@^0.7.1": - version "0.7.2" - resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz#5981a8db18b56ba38ef0efb7d995b12aa7b51918" - integrity sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ== - -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - -"@tsconfig/node10@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" - integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== - -"@tsconfig/node12@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" - integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - -"@tsconfig/node14@^1.0.0": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" - integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - -"@tsconfig/node16@^1.0.2": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" - integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== - -"@types/chai@*", "@types/chai@^4.2.7": - version "4.3.14" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.14.tgz#ae3055ea2be43c91c9fd700a36d67820026d96e6" - integrity sha512-Wj71sXE4Q4AkGdG9Tvq1u/fquNz9EdG4LIJMwVVII7ashjD/8cf8fyIfJAjRr6YcsXnSE8cOGQPq1gqeR8z+3w== - -"@types/fetch-mock@^7.3.2": - version "7.3.8" - resolved "https://registry.yarnpkg.com/@types/fetch-mock/-/fetch-mock-7.3.8.tgz#2fd769cb7881ac029d06ab2c23a254a9f208a034" - integrity sha512-ztsIGiyUvD0GaqPc9/hb8k20gnr6lupqA6SFtqt+8v2mtHhNO/Ebb6/b7N6af/7x0A7s1C8nxrEGzajMBqz8qA== - -"@types/glob@^7.1.1": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" - integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - -"@types/minimatch@*": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" - integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== - -"@types/minimatch@^3.0.3": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" - integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== - -"@types/minimist@^1.2.0": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.5.tgz#ec10755e871497bcd83efe927e43ec46e8c0747e" - integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== - -"@types/mocha@^5.2.7": - version "5.2.7" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.7.tgz#315d570ccb56c53452ff8638738df60726d5b6ea" - integrity sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ== - -"@types/node@*": - version "20.12.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.7.tgz#04080362fa3dd6c5822061aa3124f5c152cff384" - integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg== - dependencies: - undici-types "~5.26.4" - -"@types/node@18.7.14": - version "18.7.14" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.14.tgz#0fe081752a3333392d00586d815485a17c2cf3c9" - integrity sha512-6bbDaETVi8oyIARulOE9qF1/Qdi/23z6emrUh0fNJRUmjznqrixD4MpGDdgOFk5Xb0m2H6Xu42JGdvAxaJR/wA== - -"@types/normalize-package-data@^2.4.0": - version "2.4.4" - resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" - integrity sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA== - -"@types/parse-json@^4.0.0": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.2.tgz#5950e50960793055845e956c427fc2b0d70c5239" - integrity sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw== - -"@types/properties-reader@^2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@types/properties-reader/-/properties-reader-2.1.3.tgz#cc307e7a9d36ccfdd9c7761f6fcee0b68fd797ee" - integrity sha512-k4fBDScfZ9xQjIrZm0HcJlyWVZ5ltE9W8N2AIecsgFXfg5REhKKHEwmpRvSQvEPWnIEsL67K70P1tx7kGo+cjQ== - -"@types/sinon-chai@^3.2.3": - version "3.2.12" - resolved "https://registry.yarnpkg.com/@types/sinon-chai/-/sinon-chai-3.2.12.tgz#c7cb06bee44a534ec84f3a5534c3a3a46fd779b6" - integrity sha512-9y0Gflk3b0+NhQZ/oxGtaAJDvRywCa5sIyaVnounqLvmf93yBF4EgIRspePtkMs3Tr844nCclYMlcCNmLCvjuQ== - dependencies: - "@types/chai" "*" - "@types/sinon" "*" - -"@types/sinon@*": - version "17.0.3" - resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-17.0.3.tgz#9aa7e62f0a323b9ead177ed23a36ea757141a5fa" - integrity sha512-j3uovdn8ewky9kRBG19bOwaZbexJu/XjtkHyjvUgt4xfPFz18dcORIMqnYh66Fx3Powhcr85NT5+er3+oViapw== - dependencies: - "@types/sinonjs__fake-timers" "*" - -"@types/sinon@7.0.3": - version "7.0.3" - resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-7.0.3.tgz#f8647e883d873962130f906a6114a4e187755696" - integrity sha512-cjmJQLx2B5Hp9SzO7rdSivipo3kBqRqeYkTW17nLST1tn5YLWBjTdnzdmeTJXA1+KrrBLsEuvKQ0fUPGrfazQg== - -"@types/sinonjs__fake-timers@*": - version "8.1.5" - resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz#5fd3592ff10c1e9695d377020c033116cc2889f2" - integrity sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ== - -"@types/yauzl@^2.9.1": - version "2.10.3" - resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.3.tgz#e9b2808b4f109504a03cda958259876f61017999" - integrity sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q== - dependencies: - "@types/node" "*" - -"@webassemblyjs/ast@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" - integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== - dependencies: - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" - -"@webassemblyjs/floating-point-hex-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" - integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== - -"@webassemblyjs/helper-api-error@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" - integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== - -"@webassemblyjs/helper-buffer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" - integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== - -"@webassemblyjs/helper-code-frame@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" - integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== - dependencies: - "@webassemblyjs/wast-printer" "1.9.0" - -"@webassemblyjs/helper-fsm@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" - integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== - -"@webassemblyjs/helper-module-context@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" - integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== - dependencies: - "@webassemblyjs/ast" "1.9.0" - -"@webassemblyjs/helper-wasm-bytecode@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" - integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== - -"@webassemblyjs/helper-wasm-section@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" - integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - -"@webassemblyjs/ieee754@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" - integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" - integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" - integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== - -"@webassemblyjs/wasm-edit@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" - integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/helper-wasm-section" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-opt" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - "@webassemblyjs/wast-printer" "1.9.0" - -"@webassemblyjs/wasm-gen@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" - integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" - -"@webassemblyjs/wasm-opt@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" - integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - -"@webassemblyjs/wasm-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" - integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" - -"@webassemblyjs/wast-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" - integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/floating-point-hex-parser" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-code-frame" "1.9.0" - "@webassemblyjs/helper-fsm" "1.9.0" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/wast-printer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" - integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" - "@xtuc/long" "4.2.2" - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - -"@zeit/schemas@2.6.0": - version "2.6.0" - resolved "https://registry.yarnpkg.com/@zeit/schemas/-/schemas-2.6.0.tgz#004e8e553b4cd53d538bd38eac7bcbf58a867fe3" - integrity sha512-uUrgZ8AxS+Lio0fZKAipJjAh415JyrOZowliZAzmnJSsf7piVL5w+G0+gFJ0KSu3QRhvui/7zuvpLz03YjXAhg== - -JSONStream@^1.0.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" - integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -accepts@~1.3.5: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - -acorn-walk@^8.1.1: - version "8.3.2" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" - integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== - -acorn@^6.4.1: - version "6.4.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" - integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== - -acorn@^8.4.1: - version "8.11.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== - -add-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" - integrity sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ== - -agent-base@5: - version "5.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" - integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== - -agent-base@6, agent-base@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -agentkeepalive@^4.1.3: - version "4.5.0" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" - integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== - dependencies: - humanize-ms "^1.2.1" - -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - -ajv-errors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" - integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== - -ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv@6.12.6, ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.3: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-align@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.1.tgz#0cdf12e111ace773a86e9a1fad1225c43cb19a59" - integrity sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w== - dependencies: - string-width "^4.1.0" - -ansi-colors@3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" - integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== - -ansi-escapes@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" - integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== - -ansi-escapes@^4.2.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== - -ansi-regex@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" - integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== - -ansi-regex@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" - integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA== - -ansi-styles@^3.2.0, ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -any-observable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" - integrity sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog== - -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -anymatch@~3.1.1, anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -append-transform@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-2.0.0.tgz#99d9d29c7b38391e6f428d28ce136551f0b77e12" - integrity sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg== - dependencies: - default-require-extensions "^3.0.0" - -aproba@^1.0.3, aproba@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -aproba@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" - integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== - -arch@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" - integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== - -archy@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" - integrity sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw== - -are-we-there-yet@~1.1.2: - version "1.1.7" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" - integrity sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -arg@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arg/-/arg-2.0.0.tgz#c06e7ff69ab05b3a4a03ebe0407fac4cba657545" - integrity sha512-XxNTUzKnz1ctK3ZIcI2XUPlD96wbHP2nGqkPKpvk/HNRlPveYrXIVSTk9m3LcqOgDPg3B1nMvdV/K8wZd7PG4w== - -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argv@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab" - integrity sha512-dEamhpPEwRUBpLNHeuCm/v+g0anFByHahxodVO/BbAarHVBBg2MccCwf9K+o1Pof+2btdnkJelYVUWjW/VrATw== - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA== - -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== - -array-buffer-byte-length@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" - integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== - dependencies: - call-bind "^1.0.5" - is-array-buffer "^3.0.4" - -array-differ@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" - integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== - -array-from@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/array-from/-/array-from-2.1.1.tgz#cfe9d8c26628b9dc5aecc62a9f5d8f1f352c1195" - integrity sha512-GQTc6Uupx1FCavi5mPzBvVT7nEOeWMmUA9P95wpfpW1XwMSKs+KaymD5C2Up7KAUKg/mYwbsUYzdZWcoajlNZg== - -array-ify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" - integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng== - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== - -array.prototype.reduce@^1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.7.tgz#6aadc2f995af29cb887eb866d981dc85ab6f7dc7" - integrity sha512-mzmiUCVwtiD4lgxYP8g7IYy8El8p2CSMePvIbTS7gchKir/L1fgJrk0yDKmAX6mnRQFKNADYIk8nNlTris5H1Q== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-abstract "^1.23.2" - es-array-method-boxes-properly "^1.0.0" - es-errors "^1.3.0" - es-object-atoms "^1.0.0" - is-string "^1.0.7" - -arraybuffer.prototype.slice@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" - integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== - dependencies: - array-buffer-byte-length "^1.0.1" - call-bind "^1.0.5" - define-properties "^1.2.1" - es-abstract "^1.22.3" - es-errors "^1.2.1" - get-intrinsic "^1.2.3" - is-array-buffer "^3.0.4" - is-shared-array-buffer "^1.0.2" - -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== - -arrify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" - integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== - -asap@^2.0.0: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== - -asn1.js@^4.10.1: - version "4.10.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" - integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -asn1@~0.2.3: - version "0.2.6" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" - integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== - -assert@^1.1.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.1.tgz#038ab248e4ff078e7bc2485ba6e6388466c78f76" - integrity sha512-zzw1uCAgLbsKwBfFc8CX78DDg+xZeBksSO3vwVIDDN5i94eOrPsSSyiVhmsSABFDM/OcpE2aagCat9dnWQLG1A== - dependencies: - object.assign "^4.1.4" - util "^0.10.4" - -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== - -async-each@^1.0.1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.6.tgz#52f1d9403818c179b7561e11a5d1b77eb2160e77" - integrity sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -available-typed-arrays@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" - integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== - dependencies: - possible-typed-array-names "^1.0.0" - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== - -aws4@^1.8.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" - integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -base64-js@^1.0.2, base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== - dependencies: - tweetnacl "^0.14.3" - -before-after-hook@^2.2.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" - integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - -binary-extensions@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" - integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== - -bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - -bl@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - -bluebird@^3.5.5: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -bn.js@^5.0.0, bn.js@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== - -boxen@5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50" - integrity sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ== - dependencies: - ansi-align "^3.0.0" - camelcase "^6.2.0" - chalk "^4.1.0" - cli-boxes "^2.2.1" - string-width "^4.2.2" - type-fest "^0.20.2" - widest-line "^3.1.0" - wrap-ansi "^7.0.0" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@^2.3.1, braces@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -brorand@^1.0.1, brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - -browser-or-node@~2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/browser-or-node/-/browser-or-node-2.1.1.tgz#738790b3a86a8fc020193fa581273fbe65eaea0f" - integrity sha512-8CVjaLJGuSKMVTxJ2DpBl5XnlNDiT4cQFeuCJJrvJmts9YrTZDizTX7PjC2s6W4x+MBGZeEY6dGMrF04/6Hgqg== - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -browserify-aes@^1.0.4, browserify-aes@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" - integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== - dependencies: - bn.js "^5.0.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.3.tgz#7afe4c01ec7ee59a89a558a4b75bd85ae62d4208" - integrity sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw== - dependencies: - bn.js "^5.2.1" - browserify-rsa "^4.1.0" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.5" - hash-base "~3.0" - inherits "^2.0.4" - parse-asn1 "^5.1.7" - readable-stream "^2.3.8" - safe-buffer "^5.2.1" - -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - dependencies: - pako "~1.0.5" - -browserslist@^4.22.2: - version "4.23.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" - integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== - dependencies: - caniuse-lite "^1.0.30001587" - electron-to-chromium "^1.4.668" - node-releases "^2.0.14" - update-browserslist-db "^1.0.13" - -buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== - -buffer@^4.3.0: - version "4.9.2" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" - integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -buffer@^5.2.1, buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -bufferutil@^4.0.1: - version "4.0.8" - resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.8.tgz#1de6a71092d65d7766c4d8a522b261a6e787e8ea" - integrity sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw== - dependencies: - node-gyp-build "^4.3.0" - -builtin-modules@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ== - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ== - -builtins@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" - integrity sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ== - -byline@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" - integrity sha512-s6webAy+R4SR8XVuJWt2V2rGvhnrhxN+9S15GNuTK3wKPOXFF6RNc+8ug2XhH+2s4f+uudG4kUVYmYOQWL2g0Q== - -byte-size@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-7.0.1.tgz#b1daf3386de7ab9d706b941a748dbfc71130dee3" - integrity sha512-crQdqyCwhokxwV1UyDzLZanhkugAgft7vt0qbbdt60C6Zf3CAiGmtUCylbtYwrU6loOUw3euGrNtW1J651ot1A== - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== - -cacache@^12.0.2: - version "12.0.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" - integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== - dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" - figgy-pudding "^3.5.1" - glob "^7.1.4" - graceful-fs "^4.1.15" - infer-owner "^1.0.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" - unique-filename "^1.1.1" - y18n "^4.0.0" - -cacache@^15.0.5, cacache@^15.2.0: - version "15.3.0" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb" - integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== - dependencies: - "@npmcli/fs" "^1.0.0" - "@npmcli/move-file" "^1.0.1" - chownr "^2.0.0" - fs-minipass "^2.0.0" - glob "^7.1.4" - infer-owner "^1.0.4" - lru-cache "^6.0.0" - minipass "^3.1.1" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.2" - mkdirp "^1.0.3" - p-map "^4.0.0" - promise-inflight "^1.0.1" - rimraf "^3.0.2" - ssri "^8.0.1" - tar "^6.0.2" - unique-filename "^1.1.1" - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -caching-transform@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-4.0.0.tgz#00d297a4206d71e2163c39eaffa8157ac0651f0f" - integrity sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA== - dependencies: - hasha "^5.0.0" - make-dir "^3.0.0" - package-hash "^4.0.0" - write-file-atomic "^3.0.0" - -call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" - integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== - dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - function-bind "^1.1.2" - get-intrinsic "^1.2.4" - set-function-length "^1.2.1" - -caller-callsite@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" - integrity sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ== - dependencies: - callsites "^2.0.0" - -caller-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" - integrity sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A== - dependencies: - caller-callsite "^2.0.0" - -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ== - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase-keys@^6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" - integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== - dependencies: - camelcase "^5.3.1" - map-obj "^4.0.0" - quick-lru "^4.0.1" - -camelcase@^5.0.0, camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.2.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -caniuse-lite@^1.0.30001587: - version "1.0.30001614" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001614.tgz#f894b4209376a0bf923d67d9c361d96b1dfebe39" - integrity sha512-jmZQ1VpmlRwHgdP1/uiKzgiAuGOfLEJsYFP4+GBou/QQ4U6IOJCB4NP1c+1p9RGLpwObcT94jA5/uO+F1vBbog== - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== - -chai@^4.2.0: - version "4.4.1" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.1.tgz#3603fa6eba35425b0f2ac91a009fe924106e50d1" - integrity sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.3" - deep-eql "^4.1.3" - get-func-name "^2.0.2" - loupe "^2.3.6" - pathval "^1.1.1" - type-detect "^4.0.8" - -chalk@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^1.0.0, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A== - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.1.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chardet@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" - integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== - -check-error@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" - integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== - dependencies: - get-func-name "^2.0.2" - -chokidar@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" - integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.2.0" - optionalDependencies: - fsevents "~2.1.1" - -chokidar@^2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" - integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" - optionalDependencies: - fsevents "^1.2.7" - -chokidar@^3.4.1: - version "3.6.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" - integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -chownr@^1.1.1, chownr@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -chownr@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" - integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - -chrome-trace-event@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" - integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== - -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - -cli-boxes@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" - integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== - -cli-cursor@^2.0.0, cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw== - dependencies: - restore-cursor "^2.0.0" - -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - -cli-truncate@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" - integrity sha512-f4r4yJnbT++qUPI9NR4XLDLq41gQ+uqnPItWG0F5ZkehuNiTTa3EY0S4AqTSUOeJ7/zU41oWPQSNkW5BqPL9bg== - dependencies: - slice-ansi "0.0.4" - string-width "^1.0.1" - -cli-width@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" - integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== - -clipboardy@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-2.3.0.tgz#3c2903650c68e46a91b388985bc2774287dba290" - integrity sha512-mKhiIL2DrQIsuXMgBgnfEHOZOryC7kY7YO//TN6c63wlEm3NG5tz+YgY5rVi29KCmq/QQjKYvM7a19+MDOTHOQ== - dependencies: - arch "^2.1.1" - execa "^1.0.0" - is-wsl "^2.1.1" - -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -clone-deep@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" - integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== - dependencies: - is-plain-object "^2.0.4" - kind-of "^6.0.2" - shallow-clone "^3.0.0" - -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== - -clone@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" - integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== - -cmd-shim@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-4.1.0.tgz#b3a904a6743e9fede4148c6f3800bf2a08135bdd" - integrity sha512-lb9L7EM4I/ZRVuljLPEtUJOP+xiQVknZ4ZMpMgEp4JzNldPb27HU03hi6K1/6CoIuit/Zm/LQXySErFeXxDprw== - dependencies: - mkdirp-infer-owner "^2.0.0" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== - -codecov@3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.7.2.tgz#998e68c8c1ef4b55cfcf11cd456866d35e13d693" - integrity sha512-fmCjAkTese29DUX3GMIi4EaKGflHa4K51EoMc29g8fBHawdk/+KEq5CWOeXLdd9+AT7o1wO4DIpp/Z1KCqCz1g== - dependencies: - argv "0.0.2" - ignore-walk "3.0.3" - js-yaml "3.13.1" - teeny-request "6.0.1" - urlgrey "0.4.4" - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw== - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -columnify@^1.5.4: - version "1.6.0" - resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.6.0.tgz#6989531713c9008bb29735e61e37acf5bd553cf3" - integrity sha512-lomjuFZKfM6MSAnV9aCZC9sc0qGbmZdfygNv+nCpqVkSKdCxCklLtd16O0EILGkImHw9ZpHkAnHaB+8Zxq5W6Q== - dependencies: - strip-ansi "^6.0.1" - wcwidth "^1.0.0" - -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@^2.12.1, commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== - -compare-func@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" - integrity sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA== - dependencies: - array-ify "^1.0.0" - dot-prop "^5.1.0" - -component-emitter@^1.2.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.1.tgz#ef1d5796f7d93f135ee6fb684340b26403c97d17" - integrity sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ== - -compressible@~2.0.14: - version "2.0.18" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" - integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== - dependencies: - mime-db ">= 1.43.0 < 2" - -compression@1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" - integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.14" - debug "2.6.9" - on-headers "~1.0.1" - safe-buffer "5.1.2" - vary "~1.1.2" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -concat-stream@^1.5.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -concat-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1" - integrity sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.0.2" - typedarray "^0.0.6" - -config-chain@^1.1.12: - version "1.1.13" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" - integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== - dependencies: - ini "^1.3.4" - proto-list "~1.2.1" - -console-browserify@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" - integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ== - -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - integrity sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA== - -conventional-changelog-angular@^5.0.12: - version "5.0.13" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz#896885d63b914a70d4934b59d2fe7bde1832b28c" - integrity sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA== - dependencies: - compare-func "^2.0.0" - q "^1.5.1" - -conventional-changelog-core@^4.2.2: - version "4.2.4" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.4.tgz#e50d047e8ebacf63fac3dc67bf918177001e1e9f" - integrity sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg== - dependencies: - add-stream "^1.0.0" - conventional-changelog-writer "^5.0.0" - conventional-commits-parser "^3.2.0" - dateformat "^3.0.0" - get-pkg-repo "^4.0.0" - git-raw-commits "^2.0.8" - git-remote-origin-url "^2.0.0" - git-semver-tags "^4.1.1" - lodash "^4.17.15" - normalize-package-data "^3.0.0" - q "^1.5.1" - read-pkg "^3.0.0" - read-pkg-up "^3.0.0" - through2 "^4.0.0" - -conventional-changelog-preset-loader@^2.3.4: - version "2.3.4" - resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" - integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== - -conventional-changelog-writer@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-5.0.1.tgz#e0757072f045fe03d91da6343c843029e702f359" - integrity sha512-5WsuKUfxW7suLblAbFnxAcrvf6r+0b7GvNaWUwUIk0bXMnENP/PEieGKVUQrjPqwPT4o3EPAASBXiY6iHooLOQ== - dependencies: - conventional-commits-filter "^2.0.7" - dateformat "^3.0.0" - handlebars "^4.7.7" - json-stringify-safe "^5.0.1" - lodash "^4.17.15" - meow "^8.0.0" - semver "^6.0.0" - split "^1.0.0" - through2 "^4.0.0" - -conventional-commits-filter@^2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz#f8d9b4f182fce00c9af7139da49365b136c8a0b3" - integrity sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA== - dependencies: - lodash.ismatch "^4.4.0" - modify-values "^1.0.0" - -conventional-commits-parser@^3.2.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz#a7d3b77758a202a9b2293d2112a8d8052c740972" - integrity sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q== - dependencies: - JSONStream "^1.0.4" - is-text-path "^1.0.1" - lodash "^4.17.15" - meow "^8.0.0" - split2 "^3.0.0" - through2 "^4.0.0" - -conventional-recommended-bump@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz#cfa623285d1de554012f2ffde70d9c8a22231f55" - integrity sha512-uiApbSiNGM/kkdL9GTOLAqC4hbptObFo4wW2QRyHsKciGAfQuLU1ShZ1BIVI/+K2BE/W1AWYQMCXAsv4dyKPaw== - dependencies: - concat-stream "^2.0.0" - conventional-changelog-preset-loader "^2.3.4" - conventional-commits-filter "^2.0.7" - conventional-commits-parser "^3.2.0" - git-raw-commits "^2.0.8" - git-semver-tags "^4.1.1" - meow "^8.0.0" - q "^1.5.1" - -convert-source-map@^1.7.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" - integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== - -convert-source-map@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" - integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== - -copy-concurrently@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" - integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== - dependencies: - aproba "^1.1.1" - fs-write-stream-atomic "^1.0.8" - iferr "^0.1.5" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.0" - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw== - -core-js@^3.0.0: - version "3.37.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.37.0.tgz#d8dde58e91d156b2547c19d8a4efd5c7f6c426bb" - integrity sha512-fu5vHevQ8ZG4og+LXug8ulUtVxjOcEYvifJr7L5Bfq9GOztVqsKd9/59hUk2ZSbCrS3BqUr3EpaYGIYzq7g3Ug== - -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== - -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -cosmiconfig@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" - integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== - dependencies: - import-fresh "^2.0.0" - is-directory "^0.3.1" - js-yaml "^3.13.1" - parse-json "^4.0.0" - -cosmiconfig@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6" - integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - -cross-fetch@3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== - dependencies: - node-fetch "2.6.7" - -cross-spawn@^6.0.0, cross-spawn@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^7.0.0, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -crypto-browserify@^3.11.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -cyclist@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.2.tgz#673b5f233bf34d8e602b949429f8171d9121bea3" - integrity sha512-0sVXIohTfLqVIW3kb/0n6IiWF3Ifj5nm2XaSrLq2DI6fKIGa2fYAZdk917rUneaeLVpYfFcyXE2ft0fe3remsA== - -d@1, d@^1.0.1, d@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.2.tgz#2aefd554b81981e7dccf72d6842ae725cb17e5de" - integrity sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw== - dependencies: - es5-ext "^0.10.64" - type "^2.7.2" - -dargs@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" - integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== - dependencies: - assert-plus "^1.0.0" - -data-view-buffer@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" - integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== - dependencies: - call-bind "^1.0.6" - es-errors "^1.3.0" - is-data-view "^1.0.1" - -data-view-byte-length@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" - integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== - dependencies: - call-bind "^1.0.7" - es-errors "^1.3.0" - is-data-view "^1.0.1" - -data-view-byte-offset@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" - integrity sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== - dependencies: - call-bind "^1.0.6" - es-errors "^1.3.0" - is-data-view "^1.0.1" - -date-fns@^1.27.2: - version "1.30.1" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" - integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== - -dateformat@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" - integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -debuglog@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" - integrity sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw== - -decamelize-keys@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8" - integrity sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg== - dependencies: - decamelize "^1.1.0" - map-obj "^1.0.0" - -decamelize@^1.1.0, decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== - -decode-uri-component@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" - integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== - -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== - -deep-eql@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" - integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== - dependencies: - type-detect "^4.0.0" - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -default-require-extensions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-3.0.1.tgz#bfae00feeaeada68c2ae256c62540f60b80625bd" - integrity sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw== - dependencies: - strip-bom "^4.0.0" - -defaults@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" - integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== - dependencies: - clone "^1.0.2" - -define-data-property@^1.0.1, define-data-property@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" - integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== - dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - gopd "^1.0.1" - -define-properties@^1.1.2, define-properties@^1.2.0, define-properties@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" - integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== - dependencies: - define-data-property "^1.0.1" - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA== - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA== - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -del@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/del/-/del-5.1.0.tgz#d9487c94e367410e6eff2925ee58c0c84a75b3a7" - integrity sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA== - dependencies: - globby "^10.0.1" - graceful-fs "^4.2.2" - is-glob "^4.0.1" - is-path-cwd "^2.2.0" - is-path-inside "^3.0.1" - p-map "^3.0.0" - rimraf "^3.0.0" - slash "^3.0.0" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== - -deprecation@^2.0.0, deprecation@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" - integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== - -des.js@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.1.0.tgz#1d37f5766f3bbff4ee9638e871a8768c173b81da" - integrity sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -detect-file@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" - integrity sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q== - -detect-indent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" - integrity sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g== - -detect-indent@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6" - integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA== - -devtools-protocol@0.0.981744: - version "0.0.981744" - resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.981744.tgz#9960da0370284577d46c28979a0b32651022bacf" - integrity sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg== - -dezalgo@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.4.tgz#751235260469084c132157dfa857f386d4c33d81" - integrity sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig== - dependencies: - asap "^2.0.0" - wrappy "1" - -diff@3.5.0, diff@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -domain-browser@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - -dot-prop@^5.1.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" - integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== - dependencies: - is-obj "^2.0.0" - -dot-prop@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-6.0.1.tgz#fc26b3cf142b9e59b74dbd39ed66ce620c681083" - integrity sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA== - dependencies: - is-obj "^2.0.0" - -duplexer@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" - integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== - -duplexify@^3.4.2, duplexify@^3.6.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" - integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -electron-to-chromium@^1.4.668: - version "1.4.752" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.752.tgz#99227455547c8254488e3dab7d316c34a2c067b8" - integrity sha512-P3QJreYI/AUTcfBVrC4zy9KvnZWekViThgQMX/VpJ+IsOBbcX5JFpORM4qWapwWQ+agb2nYAOyn/4PMXOk0m2Q== - -elegant-spinner@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" - integrity sha512-B+ZM+RXvRqQaAmkMlO/oSe5nMUOaUnyfGYCEHoR8wrXsZR2mA0XVibsxV1bvTwxdRWah1PkQqso2EzhILGHtEQ== - -elliptic@^6.5.3, elliptic@^6.5.5: - version "6.5.5" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.5.tgz#c715e09f78b6923977610d4c2346d6ce22e6dded" - integrity sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -encoding@^0.1.12: - version "0.1.13" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - -end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -enhanced-resolve@^4.1.1, enhanced-resolve@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec" - integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg== - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.5.0" - tapable "^1.0.0" - -env-paths@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" - integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== - -envinfo@^7.7.4: - version "7.13.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" - integrity sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q== - -err-code@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" - integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== - -errno@^0.1.3, errno@~0.1.7: - version "0.1.8" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" - integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== - dependencies: - prr "~1.0.1" - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2: - version "1.23.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" - integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== - dependencies: - array-buffer-byte-length "^1.0.1" - arraybuffer.prototype.slice "^1.0.3" - available-typed-arrays "^1.0.7" - call-bind "^1.0.7" - data-view-buffer "^1.0.1" - data-view-byte-length "^1.0.1" - data-view-byte-offset "^1.0.0" - es-define-property "^1.0.0" - es-errors "^1.3.0" - es-object-atoms "^1.0.0" - es-set-tostringtag "^2.0.3" - es-to-primitive "^1.2.1" - function.prototype.name "^1.1.6" - get-intrinsic "^1.2.4" - get-symbol-description "^1.0.2" - globalthis "^1.0.3" - gopd "^1.0.1" - has-property-descriptors "^1.0.2" - has-proto "^1.0.3" - has-symbols "^1.0.3" - hasown "^2.0.2" - internal-slot "^1.0.7" - is-array-buffer "^3.0.4" - is-callable "^1.2.7" - is-data-view "^1.0.1" - is-negative-zero "^2.0.3" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.3" - is-string "^1.0.7" - is-typed-array "^1.1.13" - is-weakref "^1.0.2" - object-inspect "^1.13.1" - object-keys "^1.1.1" - object.assign "^4.1.5" - regexp.prototype.flags "^1.5.2" - safe-array-concat "^1.1.2" - safe-regex-test "^1.0.3" - string.prototype.trim "^1.2.9" - string.prototype.trimend "^1.0.8" - string.prototype.trimstart "^1.0.8" - typed-array-buffer "^1.0.2" - typed-array-byte-length "^1.0.1" - typed-array-byte-offset "^1.0.2" - typed-array-length "^1.0.6" - unbox-primitive "^1.0.2" - which-typed-array "^1.1.15" - -es-array-method-boxes-properly@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" - integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== - -es-define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" - integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== - dependencies: - get-intrinsic "^1.2.4" - -es-errors@^1.2.1, es-errors@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" - integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== - -es-object-atoms@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" - integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== - dependencies: - es-errors "^1.3.0" - -es-set-tostringtag@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" - integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== - dependencies: - get-intrinsic "^1.2.4" - has-tostringtag "^1.0.2" - hasown "^2.0.1" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es5-ext@^0.10.35, es5-ext@^0.10.50, es5-ext@^0.10.62, es5-ext@^0.10.64, es5-ext@~0.10.14: - version "0.10.64" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714" - integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg== - dependencies: - es6-iterator "^2.0.3" - es6-symbol "^3.1.3" - esniff "^2.0.1" - next-tick "^1.1.0" - -es6-error@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" - integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== - -es6-iterator@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" - integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== - dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" - -es6-symbol@^3.1.1, es6-symbol@^3.1.3: - version "3.1.4" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.4.tgz#f4e7d28013770b4208ecbf3e0bf14d3bcb557b8c" - integrity sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg== - dependencies: - d "^1.0.2" - ext "^1.7.0" - -escalade@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== - -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -eslint-scope@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" - integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - -esniff@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308" - integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg== - dependencies: - d "^1.0.1" - es5-ext "^0.10.62" - event-emitter "^0.3.5" - type "^2.7.2" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esrecurse@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -event-emitter@^0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" - integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== - dependencies: - d "1" - es5-ext "~0.10.14" - -eventemitter3@^4.0.4: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - -events@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== - dependencies: - cross-spawn "^6.0.0" - get-stream "^4.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -execa@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-2.1.0.tgz#e5d3ecd837d2a60ec50f3da78fd39767747bbe99" - integrity sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw== - dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^3.0.0" - onetime "^5.1.0" - p-finally "^2.0.0" - signal-exit "^3.0.2" - strip-final-newline "^2.0.0" - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA== - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-tilde@^2.0.0, expand-tilde@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" - integrity sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw== - dependencies: - homedir-polyfill "^1.0.1" - -ext@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" - integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== - dependencies: - type "^2.7.2" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q== - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -external-editor@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" - integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - dependencies: - chardet "^0.7.0" - iconv-lite "^0.4.24" - tmp "^0.0.33" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extract-zip@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" - integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== - dependencies: - debug "^4.1.1" - get-stream "^5.1.0" - yauzl "^2.10.0" - optionalDependencies: - "@types/yauzl" "^2.9.1" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== - -extsprintf@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" - integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-glob@^3.0.3, fast-glob@^3.2.9: - version "3.3.2" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" - integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-url-parser@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" - integrity sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ== - dependencies: - punycode "^1.3.2" - -fastq@^1.6.0: - version "1.17.1" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" - integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== - dependencies: - reusify "^1.0.4" - -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== - dependencies: - pend "~1.2.0" - -fetch-mock@^9.11.0: - version "9.11.0" - resolved "https://registry.yarnpkg.com/fetch-mock/-/fetch-mock-9.11.0.tgz#371c6fb7d45584d2ae4a18ee6824e7ad4b637a3f" - integrity sha512-PG1XUv+x7iag5p/iNHD4/jdpxL9FtVSqRMUQhPab4hVDt80T1MH5ehzVrL2IdXO9Q2iBggArFvPqjUbHFuI58Q== - dependencies: - "@babel/core" "^7.0.0" - "@babel/runtime" "^7.0.0" - core-js "^3.0.0" - debug "^4.1.1" - glob-to-regexp "^0.4.0" - is-subset "^0.1.1" - lodash.isequal "^4.5.0" - path-to-regexp "^2.2.1" - querystring "^0.2.0" - whatwg-url "^6.5.0" - -figgy-pudding@^3.5.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" - integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== - -figures@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" - integrity sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ== - dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" - -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - integrity sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA== - dependencies: - escape-string-regexp "^1.0.5" - -figures@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - dependencies: - escape-string-regexp "^1.0.5" - -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ== - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -filter-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" - integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== - -find-cache-dir@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" - integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== - dependencies: - commondir "^1.0.1" - make-dir "^2.0.0" - pkg-dir "^3.0.0" - -find-cache-dir@^3.2.0: - version "3.3.2" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-up@3.0.0, find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-up@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== - dependencies: - locate-path "^2.0.0" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -findup-sync@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" - integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== - dependencies: - detect-file "^1.0.0" - is-glob "^4.0.0" - micromatch "^3.0.4" - resolve-dir "^1.0.1" - -flat@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" - integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== - dependencies: - is-buffer "~2.0.3" - -flush-write-stream@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" - integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== - dependencies: - inherits "^2.0.3" - readable-stream "^2.3.6" - -follow-redirects@~1.15.2: - version "1.15.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" - integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== - -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ== - -foreground-child@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-2.0.0.tgz#71b32800c9f15aa8f2f83f4a6bd9bff35d861a53" - integrity sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA== - dependencies: - cross-spawn "^7.0.0" - signal-exit "^3.0.2" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA== - dependencies: - map-cache "^0.2.2" - -from2@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - integrity sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g== - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - -fromentries@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a" - integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg== - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-minipass@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - -fs-minipass@^2.0.0, fs-minipass@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" - integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - dependencies: - minipass "^3.0.0" - -fs-write-stream-atomic@^1.0.8: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" - integrity sha512-gehEzmPn2nAwr39eay+x3X34Ra+M2QlVUTLhkXPjWdeO8RF9kszk116avgBJM3ZyNHgHXBNx+VmPaFC36k0PzA== - dependencies: - graceful-fs "^4.1.2" - iferr "^0.1.5" - imurmurhash "^0.1.4" - readable-stream "1 || 2" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@^1.2.7: - version "1.2.13" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" - integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - -fsevents@~2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== - -fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - -function-bind@^1.1.1, function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== - -function.prototype.name@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" - integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - functions-have-names "^1.2.3" - -functions-have-names@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg== - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.1, get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-func-name@^2.0.1, get-func-name@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" - integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== - -get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" - integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== - dependencies: - es-errors "^1.3.0" - function-bind "^1.1.2" - has-proto "^1.0.1" - has-symbols "^1.0.3" - hasown "^2.0.0" - -get-own-enumerable-property-symbols@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" - integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-pkg-repo@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz#75973e1c8050c73f48190c52047c4cee3acbf385" - integrity sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA== - dependencies: - "@hutson/parse-repository-url" "^3.0.0" - hosted-git-info "^4.0.0" - through2 "^2.0.0" - yargs "^16.2.0" - -get-port@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193" - integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ== - -get-stdin@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6" - integrity sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ== - -get-stream@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-stream@^5.0.0, get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-symbol-description@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" - integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== - dependencies: - call-bind "^1.0.5" - es-errors "^1.3.0" - get-intrinsic "^1.2.4" - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== - dependencies: - assert-plus "^1.0.0" - -git-raw-commits@^2.0.8: - version "2.0.11" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.11.tgz#bc3576638071d18655e1cc60d7f524920008d723" - integrity sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A== - dependencies: - dargs "^7.0.0" - lodash "^4.17.15" - meow "^8.0.0" - split2 "^3.0.0" - through2 "^4.0.0" - -git-remote-origin-url@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" - integrity sha512-eU+GGrZgccNJcsDH5LkXR3PB9M958hxc7sbA8DFJjrv9j4L2P/eZfKhM+QD6wyzpiv+b1BpK0XrYCxkovtjSLw== - dependencies: - gitconfiglocal "^1.0.0" - pify "^2.3.0" - -git-semver-tags@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.1.1.tgz#63191bcd809b0ec3e151ba4751c16c444e5b5780" - integrity sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA== - dependencies: - meow "^8.0.0" - semver "^6.0.0" - -git-up@^4.0.0: - version "4.0.5" - resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.5.tgz#e7bb70981a37ea2fb8fe049669800a1f9a01d759" - integrity sha512-YUvVDg/vX3d0syBsk/CKUTib0srcQME0JyHkL5BaYdwLsiCslPWmDSi8PUMo9pXYjrryMcmsCoCgsTpSCJEQaA== - dependencies: - is-ssh "^1.3.0" - parse-url "^6.0.0" - -git-url-parse@^11.4.4: - version "11.6.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.6.0.tgz#c634b8de7faa66498a2b88932df31702c67df605" - integrity sha512-WWUxvJs5HsyHL6L08wOusa/IXYtMuCAhrMmnTjQPpBU0TTHyDhnOATNH3xNQz7YOQUsqIIPTGr4xiVti1Hsk5g== - dependencies: - git-up "^4.0.0" - -gitconfiglocal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" - integrity sha512-spLUXeTAVHxDtKsJc8FkFVgFtMdEN9qPGpL23VfSHx4fP4+Ds097IXLvymbnDH8FnmxX5Nr9bPw3A+AQ6mWEaQ== - dependencies: - ini "^1.3.2" - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA== - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-to-regexp@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - -glob@7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^8.0.3: - version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - -glob@~8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" - integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - -global-modules@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" - integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== - dependencies: - global-prefix "^1.0.1" - is-windows "^1.0.1" - resolve-dir "^1.0.0" - -global-modules@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" - integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== - dependencies: - global-prefix "^3.0.0" - -global-prefix@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" - integrity sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg== - dependencies: - expand-tilde "^2.0.2" - homedir-polyfill "^1.0.1" - ini "^1.3.4" - is-windows "^1.0.1" - which "^1.2.14" - -global-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" - integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== - dependencies: - ini "^1.3.5" - kind-of "^6.0.2" - which "^1.3.1" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globalthis@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" - integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== - dependencies: - define-properties "^1.2.1" - gopd "^1.0.1" - -globby@^10.0.1: - version "10.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" - integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== - dependencies: - "@types/glob" "^7.1.1" - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.0.3" - glob "^7.1.3" - ignore "^5.1.1" - merge2 "^1.2.3" - slash "^3.0.0" - -globby@^11.0.2: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.3: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -handlebars@^4.7.7: - version "4.7.8" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" - integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== - dependencies: - minimist "^1.2.5" - neo-async "^2.6.2" - source-map "^0.6.1" - wordwrap "^1.0.0" - optionalDependencies: - uglify-js "^3.1.4" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -hard-rejection@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" - integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg== - dependencies: - ansi-regex "^2.0.0" - -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" - integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== - dependencies: - es-define-property "^1.0.0" - -has-proto@^1.0.1, has-proto@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" - integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== - -has-symbols@^1.0.0, has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" - integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== - dependencies: - has-symbols "^1.0.3" - -has-unicode@^2.0.0, has-unicode@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q== - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw== - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ== - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ== - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash-base@~3.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -hasha@^5.0.0: - version "5.2.2" - resolved "https://registry.yarnpkg.com/hasha/-/hasha-5.2.2.tgz#a48477989b3b327aea3c04f53096d816d97522a1" - integrity sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ== - dependencies: - is-stream "^2.0.0" - type-fest "^0.8.0" - -hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== - dependencies: - function-bind "^1.1.2" - -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -homedir-polyfill@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" - integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== - dependencies: - parse-passwd "^1.0.0" - -hosted-git-info@^2.1.4: - version "2.8.9" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" - integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== - -hosted-git-info@^4.0.0, hosted-git-info@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224" - integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA== - dependencies: - lru-cache "^6.0.0" - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -http-cache-semantics@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" - integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== - -http-proxy-agent@^4.0.0, http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg== - -https-proxy-agent@5.0.1, https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -https-proxy-agent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" - integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== - dependencies: - agent-base "5" - debug "4" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -humanize-ms@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" - integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== - dependencies: - ms "^2.0.0" - -husky@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/husky/-/husky-3.1.0.tgz#5faad520ab860582ed94f0c1a77f0f04c90b57c0" - integrity sha512-FJkPoHHB+6s4a+jwPqBudBDvYZsoQW5/HBuMSehC8qDiCe50kpcxeqFoDSlow+9I6wg47YxBoT3WxaURlrDIIQ== - dependencies: - chalk "^2.4.2" - ci-info "^2.0.0" - cosmiconfig "^5.2.1" - execa "^1.0.0" - get-stdin "^7.0.0" - opencollective-postinstall "^2.0.2" - pkg-dir "^4.2.0" - please-upgrade-node "^3.2.0" - read-pkg "^5.2.0" - run-node "^1.0.0" - slash "^3.0.0" - -iconv-lite@^0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -iconv-lite@^0.6.2: - version "0.6.3" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -ieee754@^1.1.13, ieee754@^1.1.4: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -iferr@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" - integrity sha512-DUNFN5j7Tln0D+TxzloUjKB+CtVu6myn0JEFak6dG18mNt9YkQ6lzGCdafwofISZ1lLF3xRHJ98VKy9ynkcFaA== - -ignore-walk@3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" - integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== - dependencies: - minimatch "^3.0.4" - -ignore-walk@^3.0.3: - version "3.0.4" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.4.tgz#c9a09f69b7c7b479a5d74ac1a3c0d4236d2a6335" - integrity sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ== - dependencies: - minimatch "^3.0.4" - -ignore@^5.1.1, ignore@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== - -import-fresh@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" - integrity sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg== - dependencies: - caller-path "^2.0.0" - resolve-from "^3.0.0" - -import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-local@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" - integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== - dependencies: - pkg-dir "^3.0.0" - resolve-cwd "^2.0.0" - -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -indent-string@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" - integrity sha512-BYqTHXTGUIvg7t1r4sJNKcbDZkL92nkXA8YtRpbjFHRHGDL/NtUeiBJMeE60kIFN/Mg8ESaWQvftaYMGJzQZCQ== - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -infer-owner@^1.0.3, infer-owner@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" - integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== - -ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: - version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - -init-package-json@^2.0.2: - version "2.0.5" - resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-2.0.5.tgz#78b85f3c36014db42d8f32117252504f68022646" - integrity sha512-u1uGAtEFu3VA6HNl/yUWw57jmKEMx8SKOxHhxjGnOFUiIlFnohKDFg4ZrPpv9wWqk44nDxGJAtqjdQFm+9XXQA== - dependencies: - npm-package-arg "^8.1.5" - promzard "^0.3.0" - read "~1.0.1" - read-package-json "^4.1.1" - semver "^7.3.5" - validate-npm-package-license "^3.0.4" - validate-npm-package-name "^3.0.0" - -inquirer@^7.3.3: - version "7.3.3" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" - integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== - dependencies: - ansi-escapes "^4.2.1" - chalk "^4.1.0" - cli-cursor "^3.1.0" - cli-width "^3.0.0" - external-editor "^3.0.3" - figures "^3.0.0" - lodash "^4.17.19" - mute-stream "0.0.8" - run-async "^2.4.0" - rxjs "^6.6.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - through "^2.3.6" - -internal-slot@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" - integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== - dependencies: - es-errors "^1.3.0" - hasown "^2.0.0" - side-channel "^1.0.4" - -interpret@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" - integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== - -ip-address@^9.0.5: - version "9.0.5" - resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" - integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== - dependencies: - jsbn "1.1.0" - sprintf-js "^1.1.3" - -is-accessor-descriptor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz#3223b10628354644b86260db29b3e693f5ceedd4" - integrity sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA== - dependencies: - hasown "^2.0.0" - -is-array-buffer@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" - integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.1" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q== - dependencies: - binary-extensions "^1.0.0" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-buffer@~2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" - integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== - -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-ci@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" - integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== - dependencies: - ci-info "^2.0.0" - -is-core-module@^2.13.0, is-core-module@^2.5.0: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== - dependencies: - hasown "^2.0.0" - -is-data-descriptor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz#2109164426166d32ea38c405c1e0945d9e6a4eeb" - integrity sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw== - dependencies: - hasown "^2.0.0" - -is-data-view@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" - integrity sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== - dependencies: - is-typed-array "^1.1.13" - -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - -is-descriptor@^0.1.0: - version "0.1.7" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.7.tgz#2727eb61fd789dcd5bdf0ed4569f551d2fe3be33" - integrity sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg== - dependencies: - is-accessor-descriptor "^1.0.1" - is-data-descriptor "^1.0.1" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.3.tgz#92d27cb3cd311c4977a4db47df457234a13cb306" - integrity sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw== - dependencies: - is-accessor-descriptor "^1.0.1" - is-data-descriptor "^1.0.1" - -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - integrity sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw== - -is-docker@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw== - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-lambda@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" - integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== - -is-negative-zero@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" - integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg== - dependencies: - kind-of "^3.0.2" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-obj@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" - integrity sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg== - -is-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" - integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== - -is-observable@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-1.1.0.tgz#b3e986c8f44de950867cab5403f5a3465005975e" - integrity sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA== - dependencies: - symbol-observable "^1.1.0" - -is-path-cwd@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" - integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== - -is-path-inside@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== - -is-plain-obj@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - -is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-plain-object@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" - integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== - -is-promise@^2.1.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" - integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== - -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" - integrity sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA== - -is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" - integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== - dependencies: - call-bind "^1.0.7" - -is-ssh@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.4.0.tgz#4f8220601d2839d8fa624b3106f8e8884f01b8b2" - integrity sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ== - dependencies: - protocols "^2.0.1" - -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ== - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-subset@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" - integrity sha512-6Ybun0IkarhmEqxXCNw/C0bna6Zb/TkfUX9UbwJtK6ObwAVCxmAP308WWTHviM/zAqXk05cdhYsUsZeGQh99iw== - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-text-path@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" - integrity sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w== - dependencies: - text-extensions "^1.0.0" - -is-typed-array@^1.1.13: - version "1.1.13" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" - integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== - dependencies: - which-typed-array "^1.1.14" - -is-typedarray@^1.0.0, is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - -is-windows@^1.0.1, is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw== - -is-wsl@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - -isarray@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" - integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA== - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" - integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== - -istanbul-lib-hook@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz#8f84c9434888cc6b1d0a9d7092a76d239ebf0cc6" - integrity sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ== - dependencies: - append-transform "^2.0.0" - -istanbul-lib-instrument@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" - integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== - dependencies: - "@babel/core" "^7.7.5" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.0.0" - semver "^6.3.0" - -istanbul-lib-processinfo@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz#366d454cd0dcb7eb6e0e419378e60072c8626169" - integrity sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg== - dependencies: - archy "^1.0.0" - cross-spawn "^7.0.3" - istanbul-lib-coverage "^3.2.0" - p-map "^3.0.0" - rimraf "^3.0.0" - uuid "^8.3.2" - -istanbul-lib-report@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" - integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^4.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.0.2: - version "3.1.7" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" - integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsbn@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" - integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" - integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== - -json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== - -json5@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" - integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== - dependencies: - minimist "^1.2.0" - -json5@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -jsonc-parser@^3.0.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" - integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -jsonparse@^1.2.0, jsonparse@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" - integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== - -jsprim@^1.2.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" - integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.4.0" - verror "1.10.0" - -just-extend@^4.0.2: - version "4.2.1" - resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.2.1.tgz#ef5e589afb61e5d66b24eca749409a8939a8c744" - integrity sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg== - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw== - dependencies: - is-buffer "^1.1.5" - -kind-of@^6.0.2, kind-of@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -lerna@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-4.0.0.tgz#b139d685d50ea0ca1be87713a7c2f44a5b678e9e" - integrity sha512-DD/i1znurfOmNJb0OBw66NmNqiM8kF6uIrzrJ0wGE3VNdzeOhz9ziWLYiRaZDGGwgbcjOo6eIfcx9O5Qynz+kg== - dependencies: - "@lerna/add" "4.0.0" - "@lerna/bootstrap" "4.0.0" - "@lerna/changed" "4.0.0" - "@lerna/clean" "4.0.0" - "@lerna/cli" "4.0.0" - "@lerna/create" "4.0.0" - "@lerna/diff" "4.0.0" - "@lerna/exec" "4.0.0" - "@lerna/import" "4.0.0" - "@lerna/info" "4.0.0" - "@lerna/init" "4.0.0" - "@lerna/link" "4.0.0" - "@lerna/list" "4.0.0" - "@lerna/publish" "4.0.0" - "@lerna/run" "4.0.0" - "@lerna/version" "4.0.0" - import-local "^3.0.2" - npmlog "^4.1.2" - -libnpmaccess@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-4.0.3.tgz#dfb0e5b0a53c315a2610d300e46b4ddeb66e7eec" - integrity sha512-sPeTSNImksm8O2b6/pf3ikv4N567ERYEpeKRPSmqlNt1dTZbvgpJIzg5vAhXHpw2ISBsELFRelk0jEahj1c6nQ== - dependencies: - aproba "^2.0.0" - minipass "^3.1.1" - npm-package-arg "^8.1.2" - npm-registry-fetch "^11.0.0" - -libnpmpublish@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-4.0.2.tgz#be77e8bf5956131bcb45e3caa6b96a842dec0794" - integrity sha512-+AD7A2zbVeGRCFI2aO//oUmapCwy7GHqPXFJh3qpToSRNU+tXKJ2YFUgjt04LPPAf2dlEH95s6EhIHM1J7bmOw== - dependencies: - normalize-package-data "^3.0.2" - npm-package-arg "^8.1.2" - npm-registry-fetch "^11.0.0" - semver "^7.1.3" - ssri "^8.0.1" - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -lint-staged@^9.5.0: - version "9.5.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-9.5.0.tgz#290ec605252af646d9b74d73a0fa118362b05a33" - integrity sha512-nawMob9cb/G1J98nb8v3VC/E8rcX1rryUYXVZ69aT9kde6YWX+uvNOEHY5yf2gcWcTJGiD0kqXmCnS3oD75GIA== - dependencies: - chalk "^2.4.2" - commander "^2.20.0" - cosmiconfig "^5.2.1" - debug "^4.1.1" - dedent "^0.7.0" - del "^5.0.0" - execa "^2.0.3" - listr "^0.14.3" - log-symbols "^3.0.0" - micromatch "^4.0.2" - normalize-path "^3.0.0" - please-upgrade-node "^3.1.1" - string-argv "^0.3.0" - stringify-object "^3.3.0" - -listr-silent-renderer@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" - integrity sha512-L26cIFm7/oZeSNVhWB6faeorXhMg4HNlb/dS/7jHhr708jxlXrtrBWo4YUxZQkc6dGoxEAe6J/D3juTRBUzjtA== - -listr-update-renderer@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz#4ea8368548a7b8aecb7e06d8c95cb45ae2ede6a2" - integrity sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA== - dependencies: - chalk "^1.1.3" - cli-truncate "^0.2.1" - elegant-spinner "^1.0.1" - figures "^1.7.0" - indent-string "^3.0.0" - log-symbols "^1.0.2" - log-update "^2.3.0" - strip-ansi "^3.0.1" - -listr-verbose-renderer@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz#f1132167535ea4c1261102b9f28dac7cba1e03db" - integrity sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw== - dependencies: - chalk "^2.4.1" - cli-cursor "^2.1.0" - date-fns "^1.27.2" - figures "^2.0.0" - -listr@^0.14.3: - version "0.14.3" - resolved "https://registry.yarnpkg.com/listr/-/listr-0.14.3.tgz#2fea909604e434be464c50bddba0d496928fa586" - integrity sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA== - dependencies: - "@samverschueren/stream-to-observable" "^0.3.0" - is-observable "^1.1.0" - is-promise "^2.1.0" - is-stream "^1.1.0" - listr-silent-renderer "^1.1.1" - listr-update-renderer "^0.5.0" - listr-verbose-renderer "^0.5.0" - p-map "^2.0.0" - rxjs "^6.3.3" - -load-json-file@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" - integrity sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw== - dependencies: - graceful-fs "^4.1.2" - parse-json "^4.0.0" - pify "^3.0.0" - strip-bom "^3.0.0" - -load-json-file@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-6.2.0.tgz#5c7770b42cafa97074ca2848707c61662f4251a1" - integrity sha512-gUD/epcRms75Cw8RT1pUdHugZYM5ce64ucs2GEISABwkRsOQr0q2wm/MV2TKThycIe5e0ytRweW2RZxclogCdQ== - dependencies: - graceful-fs "^4.1.15" - parse-json "^5.0.0" - strip-bom "^4.0.0" - type-fest "^0.6.0" - -loader-runner@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" - integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== - -loader-utils@^1.2.3, loader-utils@^1.4.0: - version "1.4.2" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3" - integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^1.0.1" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -lodash._reinterpolate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== - -lodash.flattendeep@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" - integrity sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ== - -lodash.isequal@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" - integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== - -lodash.ismatch@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" - integrity sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g== - -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== - -lodash.template@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" - integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.templatesettings "^4.0.0" - -lodash.templatesettings@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" - integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== - dependencies: - lodash._reinterpolate "^3.0.0" - -lodash@^4.17.15, lodash@^4.17.19, lodash@^4.7.0: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" - integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== - dependencies: - chalk "^2.0.1" - -log-symbols@3.0.0, log-symbols@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" - integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== - dependencies: - chalk "^2.4.2" - -log-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" - integrity sha512-mmPrW0Fh2fxOzdBbFv4g1m6pR72haFLPJ2G5SJEELf1y+iaQrDG6cWCPjy54RHYbZAt7X+ls690Kw62AdWXBzQ== - dependencies: - chalk "^1.0.0" - -log-update@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-2.3.0.tgz#88328fd7d1ce7938b29283746f0b1bc126b24708" - integrity sha512-vlP11XfFGyeNQlmEn9tJ66rEW1coA/79m5z6BCkudjbAGE83uhAcGYrBFwfs3AdLiLzGRusRPAbSPK9xZteCmg== - dependencies: - ansi-escapes "^3.0.0" - cli-cursor "^2.0.0" - wrap-ansi "^3.0.1" - -lolex@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lolex/-/lolex-4.2.0.tgz#ddbd7f6213ca1ea5826901ab1222b65d714b3cd7" - integrity sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg== - -lolex@^5.0.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/lolex/-/lolex-5.1.2.tgz#953694d098ce7c07bc5ed6d0e42bc6c0c6d5a367" - integrity sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A== - dependencies: - "@sinonjs/commons" "^1.7.0" - -loupe@^2.3.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" - integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== - dependencies: - get-func-name "^2.0.1" - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -lunr@^2.3.9: - version "2.3.9" - resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" - integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== - -make-dir@^2.0.0, make-dir@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" - integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== - dependencies: - pify "^4.0.1" - semver "^5.6.0" - -make-dir@^3.0.0, make-dir@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -make-dir@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" - integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== - dependencies: - semver "^7.5.3" - -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - -make-fetch-happen@^8.0.9: - version "8.0.14" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-8.0.14.tgz#aaba73ae0ab5586ad8eaa68bd83332669393e222" - integrity sha512-EsS89h6l4vbfJEtBZnENTOFk8mCRpY5ru36Xe5bcX1KYIli2mkSHqoFsp5O1wMDvTJJzxe/4THpCTtygjeeGWQ== - dependencies: - agentkeepalive "^4.1.3" - cacache "^15.0.5" - http-cache-semantics "^4.1.0" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^6.0.0" - minipass "^3.1.3" - minipass-collect "^1.0.2" - minipass-fetch "^1.3.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - promise-retry "^2.0.1" - socks-proxy-agent "^5.0.0" - ssri "^8.0.0" - -make-fetch-happen@^9.0.1: - version "9.1.0" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968" - integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== - dependencies: - agentkeepalive "^4.1.3" - cacache "^15.2.0" - http-cache-semantics "^4.1.0" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^6.0.0" - minipass "^3.1.3" - minipass-collect "^1.0.2" - minipass-fetch "^1.3.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.2" - promise-retry "^2.0.1" - socks-proxy-agent "^6.0.0" - ssri "^8.0.0" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg== - -map-obj@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" - integrity sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg== - -map-obj@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" - integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w== - dependencies: - object-visit "^1.0.0" - -marked@^4.0.16: - version "4.3.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" - integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -memory-fs@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - integrity sha512-cda4JKCxReDXFXRqOHPQscuIYg1PvxbE2S2GP45rnwfEK+vZaXC8C1OFvdHIbgw0DLzowXGVoxLaAmlgRy14GQ== - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -memory-fs@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" - integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -meow@^8.0.0: - version "8.1.2" - resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" - integrity sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q== - dependencies: - "@types/minimist" "^1.2.0" - camelcase-keys "^6.2.2" - decamelize-keys "^1.1.0" - hard-rejection "^2.1.0" - minimist-options "4.1.0" - normalize-package-data "^3.0.0" - read-pkg-up "^7.0.1" - redent "^3.0.0" - trim-newlines "^3.0.0" - type-fest "^0.18.0" - yargs-parser "^20.2.3" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -micromatch@^4.0.2, micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-db@~1.33.0: - version "1.33.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" - integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== - -mime-types@2.1.18: - version "2.1.18" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" - integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== - dependencies: - mime-db "~1.33.0" - -mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.34: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -min-indent@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" - integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - -minimatch@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^3.0.4, minimatch@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^5.0.1, minimatch@^5.1.0: - version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== - dependencies: - brace-expansion "^2.0.1" - -minimist-options@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" - integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== - dependencies: - arrify "^1.0.1" - is-plain-obj "^1.1.0" - kind-of "^6.0.3" - -minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -minipass-collect@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" - integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== - dependencies: - minipass "^3.0.0" - -minipass-fetch@^1.3.0, minipass-fetch@^1.3.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.4.1.tgz#d75e0091daac1b0ffd7e9d41629faff7d0c1f1b6" - integrity sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw== - dependencies: - minipass "^3.1.0" - minipass-sized "^1.0.3" - minizlib "^2.0.0" - optionalDependencies: - encoding "^0.1.12" - -minipass-flush@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" - integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== - dependencies: - minipass "^3.0.0" - -minipass-json-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz#7edbb92588fbfc2ff1db2fc10397acb7b6b44aa7" - integrity sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg== - dependencies: - jsonparse "^1.3.1" - minipass "^3.0.0" - -minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" - integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== - dependencies: - minipass "^3.0.0" - -minipass-sized@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" - integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== - dependencies: - minipass "^3.0.0" - -minipass@^2.6.0, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: - version "3.3.6" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" - integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== - dependencies: - yallist "^4.0.0" - -minipass@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" - integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== - -minizlib@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - -minizlib@^2.0.0, minizlib@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" - integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== - dependencies: - minipass "^3.0.0" - yallist "^4.0.0" - -mississippi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" - integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== - dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^3.0.0" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" - -mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp-classic@^0.5.2: - version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" - integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== - -mkdirp-infer-owner@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz#55d3b368e7d89065c38f32fd38e638f0ab61d316" - integrity sha512-sdqtiFt3lkOaYvTXSRIUjkIdPTcxgv5+fgqYE/5qgwdw12cOrAuzzgzvVExIkH/ul1oeHN3bCLOWSG3XOqbKKw== - dependencies: - chownr "^2.0.0" - infer-owner "^1.0.4" - mkdirp "^1.0.3" - -mkdirp@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.4.tgz#fd01504a6797ec5c9be81ff43d204961ed64a512" - integrity sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw== - dependencies: - minimist "^1.2.5" - -mkdirp@0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -mkdirp@^1.0.3, mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mocha@^6.2.2: - version "6.2.3" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-6.2.3.tgz#e648432181d8b99393410212664450a4c1e31912" - integrity sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg== - dependencies: - ansi-colors "3.2.3" - browser-stdout "1.3.1" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" - growl "1.10.5" - he "1.2.0" - js-yaml "3.13.1" - log-symbols "2.2.0" - minimatch "3.0.4" - mkdirp "0.5.4" - ms "2.1.1" - node-environment-flags "1.0.5" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" - wide-align "1.1.3" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.0" - -mocha@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" - integrity sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== - dependencies: - ansi-colors "3.2.3" - browser-stdout "1.3.1" - chokidar "3.3.0" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" - growl "1.10.5" - he "1.2.0" - js-yaml "3.13.1" - log-symbols "3.0.0" - minimatch "3.0.4" - mkdirp "0.5.5" - ms "2.1.1" - node-environment-flags "1.0.6" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" - wide-align "1.1.3" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.0" - -mockserver-client@^5.12.0: - version "5.15.0" - resolved "https://registry.yarnpkg.com/mockserver-client/-/mockserver-client-5.15.0.tgz#18ab89fe294b64e41907d513842cbe1e79268248" - integrity sha512-t0DiypyKH60cX1L9ubUMNnJz+XxmwTYHVdFePQMUNnrwBgERcA5WNqKyuttxRMf7P/WiWO3nWHNHSlPirIFEPw== - dependencies: - browser-or-node "~2.1.1" - q "~2.0.3" - websocket "~1.0.34" - -mockserver-node@^5.12.0: - version "5.15.0" - resolved "https://registry.yarnpkg.com/mockserver-node/-/mockserver-node-5.15.0.tgz#983ae01e118f2d205eee209a1afa6e8c66891d77" - integrity sha512-Po442dwW5GpTSgP2T2FbGFv8vp07llfTVJSZBZQZ2VoTFvkhRgCN1D1FqRFhTFZ/42aCTYsWxQnjp1Tt1nISxA== - dependencies: - follow-redirects "~1.15.2" - glob "~8.0.3" - q "~2.0.3" - -modify-values@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" - integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== - -move-concurrently@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" - integrity sha512-hdrFxZOycD/g6A6SoI2bB5NA/5NEqD0569+S47WZhPvm46sD50ZHdYaFmnua5lndde9rCHGjmfK7Z8BuCt/PcQ== - dependencies: - aproba "^1.1.1" - copy-concurrently "^1.0.0" - fs-write-stream-atomic "^1.0.8" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.3" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@^2.0.0, ms@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -multimatch@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-5.0.0.tgz#932b800963cea7a31a033328fa1e0c3a1874dbe6" - integrity sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA== - dependencies: - "@types/minimatch" "^3.0.3" - array-differ "^3.0.0" - array-union "^2.1.0" - arrify "^2.0.1" - minimatch "^3.0.4" - -mute-stream@0.0.8, mute-stream@~0.0.4: - version "0.0.8" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" - integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== - -nan@^2.12.1: - version "2.19.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.19.0.tgz#bb58122ad55a6c5bc973303908d5b16cfdd5a8c0" - integrity sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -negotiator@0.6.3, negotiator@^0.6.2: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -neo-async@^2.5.0, neo-async@^2.6.1, neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -next-tick@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" - integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -nise@^1.5.2: - version "1.5.3" - resolved "https://registry.yarnpkg.com/nise/-/nise-1.5.3.tgz#9d2cfe37d44f57317766c6e9408a359c5d3ac1f7" - integrity sha512-Ymbac/94xeIrMf59REBPOv0thr+CJVFMhrlAkW/gjCIE58BGQdCj0x7KRCb3yz+Ga2Rz3E9XXSvUyyxqqhjQAQ== - dependencies: - "@sinonjs/formatio" "^3.2.1" - "@sinonjs/text-encoding" "^0.7.1" - just-extend "^4.0.2" - lolex "^5.0.1" - path-to-regexp "^1.7.0" - -node-environment-flags@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.5.tgz#fa930275f5bf5dae188d6192b24b4c8bbac3d76a" - integrity sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ== - dependencies: - object.getownpropertydescriptors "^2.0.3" - semver "^5.7.0" - -node-environment-flags@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" - integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== - dependencies: - object.getownpropertydescriptors "^2.0.3" - semver "^5.7.0" - -node-fetch@2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - -node-fetch@^2.2.0, node-fetch@^2.6.1, node-fetch@^2.6.7: - version "2.7.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" - integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== - dependencies: - whatwg-url "^5.0.0" - -node-gyp-build@^4.3.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.0.tgz#3fee9c1731df4581a3f9ead74664369ff00d26dd" - integrity sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og== - -node-gyp@^5.0.2: - version "5.1.1" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e" - integrity sha512-WH0WKGi+a4i4DUt2mHnvocex/xPLp9pYt5R6M2JdFB7pJ7Z34hveZ4nDTGTiLXCkitA9T8HFZjhinBCiVHYcWw== - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.2" - mkdirp "^0.5.1" - nopt "^4.0.1" - npmlog "^4.1.2" - request "^2.88.0" - rimraf "^2.6.3" - semver "^5.7.1" - tar "^4.4.12" - which "^1.3.1" - -node-gyp@^7.1.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-7.1.2.tgz#21a810aebb187120251c3bcec979af1587b188ae" - integrity sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ== - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.3" - nopt "^5.0.0" - npmlog "^4.1.2" - request "^2.88.2" - rimraf "^3.0.2" - semver "^7.3.2" - tar "^6.0.2" - which "^2.0.2" - -node-libs-browser@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" - integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== - dependencies: - assert "^1.1.1" - browserify-zlib "^0.2.0" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^3.0.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "0.0.1" - process "^0.11.10" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.3.3" - stream-browserify "^2.0.1" - stream-http "^2.7.2" - string_decoder "^1.0.0" - timers-browserify "^2.0.4" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.11.0" - vm-browserify "^1.0.1" - -node-preload@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/node-preload/-/node-preload-0.2.1.tgz#c03043bb327f417a18fee7ab7ee57b408a144301" - integrity sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ== - dependencies: - process-on-spawn "^1.0.0" - -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== - -nopt@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" - integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== - dependencies: - abbrev "1" - osenv "^0.1.4" - -nopt@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" - integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== - dependencies: - abbrev "1" - -normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-package-data@^3.0.0, normalize-package-data@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" - integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== - dependencies: - hosted-git-info "^4.0.1" - is-core-module "^2.5.0" - semver "^7.3.4" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w== - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-url@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" - integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== - -npm-bundled@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.2.tgz#944c78789bd739035b70baa2ca5cc32b8d860bc1" - integrity sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ== - dependencies: - npm-normalize-package-bin "^1.0.1" - -npm-install-checks@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-4.0.0.tgz#a37facc763a2fde0497ef2c6d0ac7c3fbe00d7b4" - integrity sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w== - dependencies: - semver "^7.1.1" - -npm-lifecycle@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz#9882d3642b8c82c815782a12e6a1bfeed0026309" - integrity sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g== - dependencies: - byline "^5.0.0" - graceful-fs "^4.1.15" - node-gyp "^5.0.2" - resolve-from "^4.0.0" - slide "^1.1.6" - uid-number "0.0.6" - umask "^1.1.0" - which "^1.3.1" - -npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" - integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== - -npm-package-arg@^8.0.0, npm-package-arg@^8.0.1, npm-package-arg@^8.1.0, npm-package-arg@^8.1.2, npm-package-arg@^8.1.5: - version "8.1.5" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.5.tgz#3369b2d5fe8fdc674baa7f1786514ddc15466e44" - integrity sha512-LhgZrg0n0VgvzVdSm1oiZworPbTxYHUJCgtsJW8mGvlDpxTM1vSJc3m5QZeUkhAHIzbz3VCHd/R4osi1L1Tg/Q== - dependencies: - hosted-git-info "^4.0.1" - semver "^7.3.4" - validate-npm-package-name "^3.0.0" - -npm-packlist@^2.1.4: - version "2.2.2" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-2.2.2.tgz#076b97293fa620f632833186a7a8f65aaa6148c8" - integrity sha512-Jt01acDvJRhJGthnUJVF/w6gumWOZxO7IkpY/lsX9//zqQgnF7OJaxgQXcerd4uQOLu7W5bkb4mChL9mdfm+Zg== - dependencies: - glob "^7.1.6" - ignore-walk "^3.0.3" - npm-bundled "^1.1.1" - npm-normalize-package-bin "^1.0.1" - -npm-pick-manifest@^6.0.0, npm-pick-manifest@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-6.1.1.tgz#7b5484ca2c908565f43b7f27644f36bb816f5148" - integrity sha512-dBsdBtORT84S8V8UTad1WlUyKIY9iMsAmqxHbLdeEeBNMLQDlDWWra3wYUx9EBEIiG/YwAy0XyNHDd2goAsfuA== - dependencies: - npm-install-checks "^4.0.0" - npm-normalize-package-bin "^1.0.1" - npm-package-arg "^8.1.2" - semver "^7.3.4" - -npm-registry-fetch@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-11.0.0.tgz#68c1bb810c46542760d62a6a965f85a702d43a76" - integrity sha512-jmlgSxoDNuhAtxUIG6pVwwtz840i994dL14FoNVZisrmZW5kWd63IUTNv1m/hyRSGSqWjCUp/YZlS1BJyNp9XA== - dependencies: - make-fetch-happen "^9.0.1" - minipass "^3.1.3" - minipass-fetch "^1.3.0" - minipass-json-stream "^1.0.1" - minizlib "^2.0.0" - npm-package-arg "^8.0.0" - -npm-registry-fetch@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-9.0.0.tgz#86f3feb4ce00313bc0b8f1f8f69daae6face1661" - integrity sha512-PuFYYtnQ8IyVl6ib9d3PepeehcUeHN9IO5N/iCRhyg9tStQcqGQBRVHmfmMWPDERU3KwZoHFvbJ4FPXPspvzbA== - dependencies: - "@npmcli/ci-detect" "^1.0.0" - lru-cache "^6.0.0" - make-fetch-happen "^8.0.9" - minipass "^3.1.3" - minipass-fetch "^1.3.0" - minipass-json-stream "^1.0.1" - minizlib "^2.0.0" - npm-package-arg "^8.0.0" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw== - dependencies: - path-key "^2.0.0" - -npm-run-path@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-3.1.0.tgz#7f91be317f6a466efed3c9f2980ad8a4ee8b0fa5" - integrity sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg== - dependencies: - path-key "^3.0.0" - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -npmlog@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== - -nyc@^15.0.0: - version "15.1.0" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.1.0.tgz#1335dae12ddc87b6e249d5a1994ca4bdaea75f02" - integrity sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A== - dependencies: - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - caching-transform "^4.0.0" - convert-source-map "^1.7.0" - decamelize "^1.2.0" - find-cache-dir "^3.2.0" - find-up "^4.1.0" - foreground-child "^2.0.0" - get-package-type "^0.1.0" - glob "^7.1.6" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-hook "^3.0.0" - istanbul-lib-instrument "^4.0.0" - istanbul-lib-processinfo "^2.0.2" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.0.2" - make-dir "^3.0.0" - node-preload "^0.2.1" - p-map "^3.0.0" - process-on-spawn "^1.0.0" - resolve-from "^5.0.0" - rimraf "^3.0.0" - signal-exit "^3.0.2" - spawn-wrap "^2.0.0" - test-exclude "^6.0.0" - yargs "^15.0.2" - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ== - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-inspect@^1.13.1: - version "1.13.1" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" - integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== - -object-keys@^1.0.11, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA== - dependencies: - isobject "^3.0.0" - -object.assign@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - -object.assign@^4.1.4, object.assign@^4.1.5: - version "4.1.5" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" - integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== - dependencies: - call-bind "^1.0.5" - define-properties "^1.2.1" - has-symbols "^1.0.3" - object-keys "^1.1.1" - -object.getownpropertydescriptors@^2.0.3: - version "2.1.8" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.8.tgz#2f1fe0606ec1a7658154ccd4f728504f69667923" - integrity sha512-qkHIGe4q0lSYMv0XI4SsBTJz3WaURhLvd0lKSgtVuOsJ2krg4SgMw3PIRQFMp07yi++UR3se2mkcLqsBNpBb/A== - dependencies: - array.prototype.reduce "^1.0.6" - call-bind "^1.0.7" - define-properties "^1.2.1" - es-abstract "^1.23.2" - es-object-atoms "^1.0.0" - gopd "^1.0.1" - safe-array-concat "^1.1.2" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ== - dependencies: - isobject "^3.0.1" - -on-headers@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" - integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ== - dependencies: - mimic-fn "^1.0.0" - -onetime@^5.1.0, onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -opencollective-postinstall@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" - integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== - -os-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A== - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ== - -os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== - -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== - -p-finally@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561" - integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw== - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-limit@^2.0.0, p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== - dependencies: - p-limit "^1.1.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-map-series@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-2.1.0.tgz#7560d4c452d9da0c07e692fdbfe6e2c81a2a91f2" - integrity sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q== - -p-map@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" - integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== - -p-map@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" - integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== - dependencies: - aggregate-error "^3.0.0" - -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - -p-pipe@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-3.1.0.tgz#48b57c922aa2e1af6a6404cb7c6bf0eb9cc8e60e" - integrity sha512-08pj8ATpzMR0Y80x50yJHn37NF6vjrqHutASaX5LiH5npS9XPvrUmscd9MF5R4fuYRHOxQR1FfMIlF7AzwoPqw== - -p-queue@^6.6.2: - version "6.6.2" - resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.6.2.tgz#2068a9dcf8e67dd0ec3e7a2bcb76810faa85e426" - integrity sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ== - dependencies: - eventemitter3 "^4.0.4" - p-timeout "^3.2.0" - -p-reduce@^2.0.0, p-reduce@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-2.1.0.tgz#09408da49507c6c274faa31f28df334bc712b64a" - integrity sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw== - -p-timeout@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" - integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== - dependencies: - p-finally "^1.0.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -p-waterfall@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/p-waterfall/-/p-waterfall-2.1.1.tgz#63153a774f472ccdc4eb281cdb2967fcf158b2ee" - integrity sha512-RRTnDb2TBG/epPRI2yYXsimO0v3BXC8Yd3ogr1545IaqKK17VGhbWVeGGN+XfCm/08OK8635nH31c8bATkHuSw== - dependencies: - p-reduce "^2.0.0" - -package-hash@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/package-hash/-/package-hash-4.0.0.tgz#3537f654665ec3cc38827387fc904c163c54f506" - integrity sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ== - dependencies: - graceful-fs "^4.1.15" - hasha "^5.0.0" - lodash.flattendeep "^4.4.0" - release-zalgo "^1.0.0" - -pacote@^11.2.6: - version "11.3.5" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-11.3.5.tgz#73cf1fc3772b533f575e39efa96c50be8c3dc9d2" - integrity sha512-fT375Yczn4zi+6Hkk2TBe1x1sP8FgFsEIZ2/iWaXY2r/NkhDJfxbcn5paz1+RTFCyNf+dPnaoBDJoAxXSU8Bkg== - dependencies: - "@npmcli/git" "^2.1.0" - "@npmcli/installed-package-contents" "^1.0.6" - "@npmcli/promise-spawn" "^1.2.0" - "@npmcli/run-script" "^1.8.2" - cacache "^15.0.5" - chownr "^2.0.0" - fs-minipass "^2.1.0" - infer-owner "^1.0.4" - minipass "^3.1.3" - mkdirp "^1.0.3" - npm-package-arg "^8.0.1" - npm-packlist "^2.1.4" - npm-pick-manifest "^6.0.0" - npm-registry-fetch "^11.0.0" - promise-retry "^2.0.1" - read-package-json-fast "^2.0.1" - rimraf "^3.0.2" - ssri "^8.0.1" - tar "^6.1.0" - -pako@~1.0.5: - version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - -parallel-transform@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" - integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== - dependencies: - cyclist "^1.0.1" - inherits "^2.0.3" - readable-stream "^2.1.5" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parse-asn1@^5.0.0, parse-asn1@^5.1.7: - version "5.1.7" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.7.tgz#73cdaaa822125f9647165625eb45f8a051d2df06" - integrity sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg== - dependencies: - asn1.js "^4.10.1" - browserify-aes "^1.2.0" - evp_bytestokey "^1.0.3" - hash-base "~3.0" - pbkdf2 "^3.1.2" - safe-buffer "^5.2.1" - -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - -parse-json@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" - integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== - -parse-path@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.4.tgz#4bf424e6b743fb080831f03b536af9fc43f0ffea" - integrity sha512-Z2lWUis7jlmXC1jeOG9giRO2+FsuyNipeQ43HAjqAZjwSe3SEf+q/84FGPHoso3kyntbxa4c4i77t3m6fGf8cw== - dependencies: - is-ssh "^1.3.0" - protocols "^1.4.0" - qs "^6.9.4" - query-string "^6.13.8" - -parse-url@^6.0.0: - version "6.0.5" - resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-6.0.5.tgz#4acab8982cef1846a0f8675fa686cef24b2f6f9b" - integrity sha512-e35AeLTSIlkw/5GFq70IN7po8fmDUjpDPY1rIK+VubRfsUvBonjQ+PBZG+vWMACnQSmNlvl524IucoDmcioMxA== - dependencies: - is-ssh "^1.3.0" - normalize-url "^6.1.0" - parse-path "^4.0.0" - protocols "^1.4.0" - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== - -path-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" - integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q== - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-is-inside@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w== - -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-to-regexp@2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.2.1.tgz#90b617025a16381a879bc82a38d4e8bdeb2bcf45" - integrity sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ== - -path-to-regexp@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" - integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== - dependencies: - isarray "0.0.1" - -path-to-regexp@^2.2.1: - version "2.4.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.4.0.tgz#35ce7f333d5616f1c1e1bfe266c3aba2e5b2e704" - integrity sha512-G6zHoVqC6GGTQkZwF4lkuEyMbVOjoBKAEybQUypI1WTkqinCOrq2x6U2+phkJ1XsEMTy4LjtwPI7HW+NVrRR2w== - -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - -pbkdf2@^3.0.3, pbkdf2@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" - integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" - integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== - -pkg-dir@4.2.0, pkg-dir@^4.1.0, pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== - dependencies: - find-up "^3.0.0" - -please-upgrade-node@^3.1.1, please-upgrade-node@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" - integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== - dependencies: - semver-compare "^1.0.0" - -pop-iterate@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/pop-iterate/-/pop-iterate-1.0.1.tgz#ceacfdab4abf353d7a0f2aaa2c1fc7b3f9413ba3" - integrity sha512-HRCx4+KJE30JhX84wBN4+vja9bNfysxg1y28l0DuJmkoaICiv2ZSilKddbS48pq50P8d2erAhqDLbp47yv3MbQ== - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== - -possible-typed-array-names@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" - integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== - -prettier@^1.19.1: - version "1.19.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" - integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process-on-spawn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/process-on-spawn/-/process-on-spawn-1.0.0.tgz#95b05a23073d30a17acfdc92a440efd2baefdc93" - integrity sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg== - dependencies: - fromentries "^1.2.0" - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== - -progress@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - -promise-inflight@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" - integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== - -promise-retry@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" - integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== - dependencies: - err-code "^2.0.2" - retry "^0.12.0" - -promzard@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee" - integrity sha512-JZeYqd7UAcHCwI+sTOeUDYkvEU+1bQ7iE0UT1MgB/tERkAPkesW46MrpIySzODi+owTjZtiF8Ay5j9m60KmMBw== - dependencies: - read "1" - -properties-reader@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/properties-reader/-/properties-reader-2.3.0.tgz#f3ab84224c9535a7a36e011ae489a79a13b472b2" - integrity sha512-z597WicA7nDZxK12kZqHr2TcvwNU1GCfA5UwfDY/HDp3hXPoPlb5rlEx9bwGTiJnc0OqbBTkU975jDToth8Gxw== - dependencies: - mkdirp "^1.0.4" - -proto-list@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" - integrity sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA== - -protocols@^1.4.0: - version "1.4.8" - resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.8.tgz#48eea2d8f58d9644a4a32caae5d5db290a075ce8" - integrity sha512-IgjKyaUSjsROSO8/D49Ab7hP8mJgTYcqApOqdPhLoPxAplXmkp+zRvsrSQjFn5by0rhm4VH0GAUELIPpx7B1yg== - -protocols@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/protocols/-/protocols-2.0.1.tgz#8f155da3fc0f32644e83c5782c8e8212ccf70a86" - integrity sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q== - -proxy-from-env@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== - -psl@^1.1.28: - version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pumpify@^1.3.3: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - -punycode@^1.2.4, punycode@^1.3.2, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== - -punycode@^2.1.0, punycode@^2.1.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - -puppeteer-to-istanbul@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/puppeteer-to-istanbul/-/puppeteer-to-istanbul-1.4.0.tgz#451dced6f42652448f55cf0bc780b35512c8d1b0" - integrity sha512-dzW8u/PMqMZppvoXCFod8IkCTI2JL0yP2YUBbaALnX+iJJ6gqjk77fIoK9MqnMqRZAcoa81GLFfZExakWg/Q4Q== - dependencies: - clone "^2.1.2" - mkdirp "^1.0.4" - v8-to-istanbul "^1.2.1" - yargs "^15.3.1" - -puppeteer@^13.1.3: - version "13.7.0" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-13.7.0.tgz#18e16f83e397cf02f7a0804c67c1603d381cfb0b" - integrity sha512-U1uufzBjz3+PkpCxFrWzh4OrMIdIb2ztzCu0YEPfRHjHswcSwHZswnK+WdsOQJsRV8WeTg3jLhJR4D867+fjsA== - dependencies: - cross-fetch "3.1.5" - debug "4.3.4" - devtools-protocol "0.0.981744" - extract-zip "2.0.1" - https-proxy-agent "5.0.1" - pkg-dir "4.2.0" - progress "2.0.3" - proxy-from-env "1.1.0" - rimraf "3.0.2" - tar-fs "2.1.1" - unbzip2-stream "1.4.3" - ws "8.5.0" - -q@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== - -q@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/q/-/q-2.0.3.tgz#75b8db0255a1a5af82f58c3f3aaa1efec7d0d134" - integrity sha512-gv6vLGcmAOg96/fgo3d9tvA4dJNZL3fMyBqVRrGxQ+Q/o4k9QzbJ3NQF9cOO/71wRodoXhaPgphvMFU68qVAJQ== - dependencies: - asap "^2.0.0" - pop-iterate "^1.0.1" - weak-map "^1.0.5" - -qs@^6.11.2, qs@^6.9.4: - version "6.12.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.1.tgz#39422111ca7cbdb70425541cba20c7d7b216599a" - integrity sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ== - dependencies: - side-channel "^1.0.6" - -qs@~6.5.2: - version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== - -query-string@^6.13.8: - version "6.14.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a" - integrity sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw== - dependencies: - decode-uri-component "^0.2.0" - filter-obj "^1.1.0" - split-on-first "^1.0.0" - strict-uri-encode "^2.0.0" - -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA== - -querystring@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" - integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -quick-lru@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" - integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A== - -rc@^1.0.1, rc@^1.1.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -read-cmd-shim@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-2.0.0.tgz#4a50a71d6f0965364938e9038476f7eede3928d9" - integrity sha512-HJpV9bQpkl6KwjxlJcBoqu9Ba0PQg8TqSNIOrulGt54a0uup0HtevreFHzYzkm0lpnleRdNBzXznKrgxglEHQw== - -read-package-json-fast@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz#323ca529630da82cb34b36cc0b996693c98c2b83" - integrity sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ== - dependencies: - json-parse-even-better-errors "^2.3.0" - npm-normalize-package-bin "^1.0.1" - -read-package-json@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.2.tgz#6992b2b66c7177259feb8eaac73c3acd28b9222a" - integrity sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA== - dependencies: - glob "^7.1.1" - json-parse-even-better-errors "^2.3.0" - normalize-package-data "^2.0.0" - npm-normalize-package-bin "^1.0.0" - -read-package-json@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-3.0.1.tgz#c7108f0b9390257b08c21e3004d2404c806744b9" - integrity sha512-aLcPqxovhJTVJcsnROuuzQvv6oziQx4zd3JvG0vGCL5MjTONUc4uJ90zCBC6R7W7oUKBNoR/F8pkyfVwlbxqng== - dependencies: - glob "^7.1.1" - json-parse-even-better-errors "^2.3.0" - normalize-package-data "^3.0.0" - npm-normalize-package-bin "^1.0.0" - -read-package-json@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-4.1.2.tgz#b444d047de7c75d4a160cb056d00c0693c1df703" - integrity sha512-Dqer4pqzamDE2O4M55xp1qZMuLPqi4ldk2ya648FOMHRjwMzFhuxVrG04wd0c38IsvkVdr3vgHI6z+QTPdAjrQ== - dependencies: - glob "^7.1.1" - json-parse-even-better-errors "^2.3.0" - normalize-package-data "^3.0.0" - npm-normalize-package-bin "^1.0.0" - -read-package-tree@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.3.1.tgz#a32cb64c7f31eb8a6f31ef06f9cedf74068fe636" - integrity sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw== - dependencies: - read-package-json "^2.0.0" - readdir-scoped-modules "^1.0.0" - util-promisify "^2.1.0" - -read-pkg-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" - integrity sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw== - dependencies: - find-up "^2.0.0" - read-pkg "^3.0.0" - -read-pkg-up@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" - integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== - dependencies: - find-up "^4.1.0" - read-pkg "^5.2.0" - type-fest "^0.8.1" - -read-pkg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" - integrity sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA== - dependencies: - load-json-file "^4.0.0" - normalize-package-data "^2.3.2" - path-type "^3.0.0" - -read-pkg@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" - integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== - dependencies: - "@types/normalize-package-data" "^2.4.0" - normalize-package-data "^2.5.0" - parse-json "^5.0.0" - type-fest "^0.6.0" - -read@1, read@~1.0.1: - version "1.0.7" - resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" - integrity sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ== - dependencies: - mute-stream "~0.0.4" - -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@^2.3.8, readable-stream@~2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" - integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readdir-scoped-modules@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" - integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw== - dependencies: - debuglog "^1.0.1" - dezalgo "^1.0.0" - graceful-fs "^4.1.2" - once "^1.3.0" - -readdirp@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -readdirp@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" - integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== - dependencies: - picomatch "^2.0.4" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -redent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" - integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== - dependencies: - indent-string "^4.0.0" - strip-indent "^3.0.0" - -regenerator-runtime@^0.14.0: - version "0.14.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" - integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexp.prototype.flags@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" - integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== - dependencies: - call-bind "^1.0.6" - define-properties "^1.2.1" - es-errors "^1.3.0" - set-function-name "^2.0.1" - -registry-auth-token@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" - integrity sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ== - dependencies: - rc "^1.1.6" - safe-buffer "^5.0.1" - -registry-url@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" - integrity sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA== - dependencies: - rc "^1.0.1" - -release-zalgo@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" - integrity sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA== - dependencies: - es6-error "^4.0.1" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw== - -repeat-element@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" - integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== - -repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== - -request@^2.88.0, request@^2.88.2: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - integrity sha512-ccu8zQTrzVr954472aUVPLEcB3YpKSYR3cg/3lo1okzobPBM+1INXBbBZlDbnI/hbEocnf8j0QVo43hQKrbchg== - dependencies: - resolve-from "^3.0.0" - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-dir@^1.0.0, resolve-dir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" - integrity sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg== - dependencies: - expand-tilde "^2.0.0" - global-modules "^1.0.0" - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw== - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== - -resolve@^1.10.0, resolve@^1.3.2: - version "1.22.8" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" - integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== - dependencies: - is-core-module "^2.13.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q== - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -rimraf@^2.5.4, rimraf@^2.6.3: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -run-async@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - -run-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e" - integrity sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A== - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -run-queue@^1.0.0, run-queue@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" - integrity sha512-ntymy489o0/QQplUDnpYAYUsO50K9SBrIVaKCWDOJzYJts0f9WH9RFJkyagebkw5+y1oi00R7ynNW/d12GBumg== - dependencies: - aproba "^1.1.1" - -rxjs@^6.3.3, rxjs@^6.6.0: - version "6.6.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" - integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== - dependencies: - tslib "^1.9.0" - -safe-array-concat@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" - integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== - dependencies: - call-bind "^1.0.7" - get-intrinsic "^1.2.4" - has-symbols "^1.0.3" - isarray "^2.0.5" - -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-regex-test@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" - integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== - dependencies: - call-bind "^1.0.6" - es-errors "^1.3.0" - is-regex "^1.1.4" - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg== - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -schema-utils@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" - integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== - dependencies: - ajv "^6.1.0" - ajv-errors "^1.0.0" - ajv-keywords "^3.1.0" - -semver-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" - integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow== - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: - version "5.7.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - -semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: - version "6.3.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^7.1.1, semver@^7.1.3, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.5.3: - version "7.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" - integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== - dependencies: - lru-cache "^6.0.0" - -serialize-javascript@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" - integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== - dependencies: - randombytes "^2.1.0" - -serve-handler@6.1.3: - version "6.1.3" - resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.3.tgz#1bf8c5ae138712af55c758477533b9117f6435e8" - integrity sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w== - dependencies: - bytes "3.0.0" - content-disposition "0.5.2" - fast-url-parser "1.1.3" - mime-types "2.1.18" - minimatch "3.0.4" - path-is-inside "1.0.2" - path-to-regexp "2.2.1" - range-parser "1.2.0" - -serve@^13.0.2: - version "13.0.4" - resolved "https://registry.yarnpkg.com/serve/-/serve-13.0.4.tgz#fc4466dc84b3e4a6cb622247c85ed8afe4b88820" - integrity sha512-Lj8rhXmphJCRQVv5qwu0NQZ2h+0MrRyRJxDZu5y3qLH2i/XY6a0FPj/VmjMUdkJb672MBfE8hJ274PU6JzBd0Q== - dependencies: - "@zeit/schemas" "2.6.0" - ajv "6.12.6" - arg "2.0.0" - boxen "5.1.2" - chalk "2.4.1" - clipboardy "2.3.0" - compression "1.7.3" - serve-handler "6.1.3" - update-check "1.5.2" - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== - -set-function-length@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" - integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== - dependencies: - define-data-property "^1.1.4" - es-errors "^1.3.0" - function-bind "^1.1.2" - get-intrinsic "^1.2.4" - gopd "^1.0.1" - has-property-descriptors "^1.0.2" - -set-function-name@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" - integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== - dependencies: - define-data-property "^1.1.4" - es-errors "^1.3.0" - functions-have-names "^1.2.3" - has-property-descriptors "^1.0.2" - -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setimmediate@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shallow-clone@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" - integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== - dependencies: - kind-of "^6.0.2" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== - dependencies: - shebang-regex "^1.0.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -shiki@^0.10.1: - version "0.10.1" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.10.1.tgz#6f9a16205a823b56c072d0f1a0bcd0f2646bef14" - integrity sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng== - dependencies: - jsonc-parser "^3.0.0" - vscode-oniguruma "^1.6.1" - vscode-textmate "5.2.0" - -side-channel@^1.0.4, side-channel@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" - integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== - dependencies: - call-bind "^1.0.7" - es-errors "^1.3.0" - get-intrinsic "^1.2.4" - object-inspect "^1.13.1" - -signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -sinon-chai@^3.4.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/sinon-chai/-/sinon-chai-3.7.0.tgz#cfb7dec1c50990ed18c153f1840721cf13139783" - integrity sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g== - -sinon@7.4.2: - version "7.4.2" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-7.4.2.tgz#ecd54158fef2fcfbdb231a3fa55140e8cb02ad6c" - integrity sha512-pY5RY99DKelU3pjNxcWo6XqeB1S118GBcVIIdDi6V+h6hevn1izcg2xv1hTHW/sViRXU7sUOxt4wTUJ3gsW2CQ== - dependencies: - "@sinonjs/commons" "^1.4.0" - "@sinonjs/formatio" "^3.2.1" - "@sinonjs/samsam" "^3.3.3" - diff "^3.5.0" - lolex "^4.2.0" - nise "^1.5.2" - supports-color "^5.5.0" - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" - integrity sha512-up04hB2hR92PgjpyU3y/eg91yIBILyjVY26NvvciY3EVVPjybkMszMpXQ9QAkcS3I5rtJBDLoTxxg+qvW8c7rw== - -slide@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" - integrity sha512-NwrtjCg+lZoqhFU8fOwl4ay2ei8PaqCBOUV3/ektPY9trO1yQ1oXEfmHAhKArUVUr/hOHvy5f6AdP17dCM0zMw== - -smart-buffer@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" - integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -socks-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.1.tgz#032fb583048a29ebffec2e6a73fca0761f48177e" - integrity sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ== - dependencies: - agent-base "^6.0.2" - debug "4" - socks "^2.3.3" - -socks-proxy-agent@^6.0.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz#2687a31f9d7185e38d530bef1944fe1f1496d6ce" - integrity sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ== - dependencies: - agent-base "^6.0.2" - debug "^4.3.3" - socks "^2.6.2" - -socks@^2.3.3, socks@^2.6.2: - version "2.8.3" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" - integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== - dependencies: - ip-address "^9.0.5" - smart-buffer "^4.2.0" - -sort-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" - integrity sha512-/dPCrG1s3ePpWm6yBbxZq5Be1dXGLyLn9Z791chDC3NFrpkVbWGzkBwPN1knaciexFXgRJ7hzdnwZ4stHSDmjg== - dependencies: - is-plain-obj "^1.0.0" - -sort-keys@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-4.2.0.tgz#6b7638cee42c506fff8c1cecde7376d21315be18" - integrity sha512-aUYIEU/UviqPgc8mHR6IW1EGxkAXpeRETYcrzg8cLAvUPZcpAlleSXHV2mY7G12GphSH6Gzv+4MMVSSkbdteHg== - dependencies: - is-plain-obj "^2.0.0" - -source-list-map@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" - integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== - -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.5.16, source-map-support@~0.5.12: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" - integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== - -source-map@^0.5.6: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -spawn-wrap@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-2.0.0.tgz#103685b8b8f9b79771318827aa78650a610d457e" - integrity sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg== - dependencies: - foreground-child "^2.0.0" - is-windows "^1.0.2" - make-dir "^3.0.0" - rimraf "^3.0.0" - signal-exit "^3.0.2" - which "^2.0.1" - -spdx-correct@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" - integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz#5d607d27fc806f66d7b64a766650fa890f04ed66" - integrity sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.17" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz#887da8aa73218e51a1d917502d79863161a93f9c" - integrity sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg== - -split-on-first@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" - integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -split2@^3.0.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" - integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== - dependencies: - readable-stream "^3.0.0" - -split@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" - integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== - dependencies: - through "2" - -sprintf-js@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" - integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -sshpk@^1.7.0: - version "1.18.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.18.0.tgz#1663e55cddf4d688b86a46b77f0d5fe363aba028" - integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -ssri@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" - integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q== - dependencies: - figgy-pudding "^3.5.1" - -ssri@^8.0.0, ssri@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.1.tgz#638e4e439e2ffbd2cd289776d5ca457c4f51a2af" - integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== - dependencies: - minipass "^3.1.1" - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g== - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -stream-browserify@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" - integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-each@^1.1.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" - integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== - dependencies: - end-of-stream "^1.1.0" - stream-shift "^1.0.0" - -stream-events@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/stream-events/-/stream-events-1.0.5.tgz#bbc898ec4df33a4902d892333d47da9bf1c406d5" - integrity sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg== - dependencies: - stubs "^3.0.0" - -stream-http@^2.7.2: - version "2.8.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" - integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -stream-shift@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" - integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ== - -strict-uri-encode@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" - integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== - -string-argv@^0.3.0: - version "0.3.2" - resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" - integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2", string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - -string.prototype.trim@^1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" - integrity sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-abstract "^1.23.0" - es-object-atoms "^1.0.0" - -string.prototype.trimend@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" - integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-object-atoms "^1.0.0" - -string.prototype.trimstart@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" - integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-object-atoms "^1.0.0" - -string_decoder@^1.0.0, string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -stringify-object@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" - integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw== - dependencies: - get-own-enumerable-property-symbols "^3.0.0" - is-obj "^1.0.1" - is-regexp "^1.0.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== - -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-indent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" - integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== - dependencies: - min-indent "^1.0.0" - -strip-json-comments@2.0.1, strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== - -strong-log-transformer@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" - integrity sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA== - dependencies: - duplexer "^0.1.1" - minimist "^1.2.0" - through "^2.3.4" - -stubs@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b" - integrity sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw== - -supports-color@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" - integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== - dependencies: - has-flag "^3.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g== - -supports-color@^5.3.0, supports-color@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -symbol-observable@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" - integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== - -tapable@^1.0.0, tapable@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - -tar-fs@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" - integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== - dependencies: - chownr "^1.1.1" - mkdirp-classic "^0.5.2" - pump "^3.0.0" - tar-stream "^2.1.4" - -tar-stream@^2.1.4: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - -tar@^4.4.12: - version "4.4.19" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" - integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== - dependencies: - chownr "^1.1.4" - fs-minipass "^1.2.7" - minipass "^2.9.0" - minizlib "^1.3.3" - mkdirp "^0.5.5" - safe-buffer "^5.2.1" - yallist "^3.1.1" - -tar@^6.0.2, tar@^6.1.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" - integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== - dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^5.0.0" - minizlib "^2.1.1" - mkdirp "^1.0.3" - yallist "^4.0.0" - -teeny-request@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-6.0.1.tgz#9b1f512cef152945827ba7e34f62523a4ce2c5b0" - integrity sha512-TAK0c9a00ELOqLrZ49cFxvPVogMUFaWY8dUsQc/0CuQPGF+BOxOQzXfE413BAk2kLomwNplvdtMpeaeGWmoc2g== - dependencies: - http-proxy-agent "^4.0.0" - https-proxy-agent "^4.0.0" - node-fetch "^2.2.0" - stream-events "^1.0.5" - uuid "^3.3.2" - -temp-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" - integrity sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ== - -temp-write@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-4.0.0.tgz#cd2e0825fc826ae72d201dc26eef3bf7e6fc9320" - integrity sha512-HIeWmj77uOOHb0QX7siN3OtwV3CTntquin6TNVg6SHOqCP3hYKmox90eeFOGaY1MqJ9WYDDjkyZrW6qS5AWpbw== - dependencies: - graceful-fs "^4.1.15" - is-stream "^2.0.0" - make-dir "^3.0.0" - temp-dir "^1.0.0" - uuid "^3.3.2" - -terser-webpack-plugin@^1.4.3, terser-webpack-plugin@^1.4.5: - version "1.4.5" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz#a217aefaea330e734ffacb6120ec1fa312d6040b" - integrity sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw== - dependencies: - cacache "^12.0.2" - find-cache-dir "^2.1.0" - is-wsl "^1.1.0" - schema-utils "^1.0.0" - serialize-javascript "^4.0.0" - source-map "^0.6.1" - terser "^4.1.2" - webpack-sources "^1.4.0" - worker-farm "^1.7.0" - -terser@^4.1.2: - version "4.8.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.1.tgz#a00e5634562de2239fd404c649051bf6fc21144f" - integrity sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-extensions@^1.0.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" - integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== - -through2@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -through2@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/through2/-/through2-4.0.2.tgz#a7ce3ac2a7a8b0b966c80e7c49f0484c3b239764" - integrity sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw== - dependencies: - readable-stream "3" - -through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== - -timers-browserify@^2.0.4: - version "2.0.12" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" - integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== - dependencies: - setimmediate "^1.0.4" - -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - integrity sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg== - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg== - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA== - dependencies: - punycode "^2.1.0" - -tr46@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" - integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== - dependencies: - punycode "^2.1.1" - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - -trim-newlines@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" - integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== - -ts-node@10.9.2: - version "10.9.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" - integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" - yn "3.1.1" - -tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslint-config-prettier@^1.18.0: - version "1.18.0" - resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz#75f140bde947d35d8f0d238e0ebf809d64592c37" - integrity sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg== - -tslint@^6.1.3: - version "6.1.3" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.3.tgz#5c23b2eccc32487d5523bd3a470e9aa31789d904" - integrity sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg== - dependencies: - "@babel/code-frame" "^7.0.0" - builtin-modules "^1.1.1" - chalk "^2.3.0" - commander "^2.12.1" - diff "^4.0.1" - glob "^7.1.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" - mkdirp "^0.5.3" - resolve "^1.3.2" - semver "^5.3.0" - tslib "^1.13.0" - tsutils "^2.29.0" - -tsutils@^2.29.0: - version "2.29.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" - integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== - dependencies: - tslib "^1.8.1" - -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - integrity sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw== - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== - -type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.18.0: - version "0.18.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" - integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-fest@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8" - integrity sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw== - -type-fest@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" - integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== - -type-fest@^0.8.0, type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - -type@^2.7.2: - version "2.7.2" - resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" - integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== - -typed-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" - integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== - dependencies: - call-bind "^1.0.7" - es-errors "^1.3.0" - is-typed-array "^1.1.13" - -typed-array-byte-length@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" - integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== - dependencies: - call-bind "^1.0.7" - for-each "^0.3.3" - gopd "^1.0.1" - has-proto "^1.0.3" - is-typed-array "^1.1.13" - -typed-array-byte-offset@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" - integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== - dependencies: - available-typed-arrays "^1.0.7" - call-bind "^1.0.7" - for-each "^0.3.3" - gopd "^1.0.1" - has-proto "^1.0.3" - is-typed-array "^1.1.13" - -typed-array-length@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" - integrity sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== - dependencies: - call-bind "^1.0.7" - for-each "^0.3.3" - gopd "^1.0.1" - has-proto "^1.0.3" - is-typed-array "^1.1.13" - possible-typed-array-names "^1.0.0" - -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== - -typedoc@^0.22.13: - version "0.22.18" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.22.18.tgz#1d000c33b66b88fd8cdfea14a26113a83b7e6591" - integrity sha512-NK9RlLhRUGMvc6Rw5USEYgT4DVAUFk7IF7Q6MYfpJ88KnTZP7EneEa4RcP+tX1auAcz7QT1Iy0bUSZBYYHdoyA== - dependencies: - glob "^8.0.3" - lunr "^2.3.9" - marked "^4.0.16" - minimatch "^5.1.0" - shiki "^0.10.1" - -typescript@4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5" - integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg== - -uglify-js@^3.1.4: - version "3.17.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" - integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== - -uid-number@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - integrity sha512-c461FXIljswCuscZn67xq9PpszkPT6RjheWFQTgCyabJrTUozElanb0YEqv2UGgk247YpcJkFBuSGNvBlpXM9w== - -umask@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" - integrity sha512-lE/rxOhmiScJu9L6RTNVgB/zZbF+vGC0/p6D3xnkAePI2o0sMyFG966iR5Ki50OI/0mNi2yaRnxfLsPmEZF/JA== - -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - -unbzip2-stream@1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" - integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== - dependencies: - buffer "^5.2.1" - through "^2.3.8" - -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - -unique-filename@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" - integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== - dependencies: - unique-slug "^2.0.0" - -unique-slug@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" - integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== - dependencies: - imurmurhash "^0.1.4" - -universal-user-agent@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.1.tgz#15f20f55da3c930c57bddbf1734c6654d5fd35aa" - integrity sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ== - -universalify@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" - integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ== - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -upath@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" - integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== - -upath@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" - integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== - -update-browserslist-db@^1.0.13: - version "1.0.13" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" - integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -update-check@1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/update-check/-/update-check-1.5.2.tgz#2fe09f725c543440b3d7dabe8971f2d5caaedc28" - integrity sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ== - dependencies: - registry-auth-token "3.3.2" - registry-url "3.1.0" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== - -url@^0.11.0: - version "0.11.3" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.3.tgz#6f495f4b935de40ce4a0a52faee8954244f3d3ad" - integrity sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw== - dependencies: - punycode "^1.4.1" - qs "^6.11.2" - -urlgrey@0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f" - integrity sha512-vfQzI+JDPBrBRw374pgWi6bFPfc+6BonRsazCj3weBIWe8moRcvfgy0lpaiGkMGnExs4Z/Dws8lp5mc9IegURw== - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -utf-8-validate@^5.0.2: - version "5.0.10" - resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.10.tgz#d7d10ea39318171ca982718b6b96a8d2442571a2" - integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== - dependencies: - node-gyp-build "^4.3.0" - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -util-promisify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/util-promisify/-/util-promisify-2.1.0.tgz#3c2236476c4d32c5ff3c47002add7c13b9a82a53" - integrity sha512-K+5eQPYs14b3+E+hmE2J6gCZ4JmMl9DbYS6BeP2CHq6WMuNxErxf5B/n0fz85L8zUuoO6rIzNNmIQDu/j+1OcA== - dependencies: - object.getownpropertydescriptors "^2.0.3" - -util@^0.10.4: - version "0.10.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" - integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== - dependencies: - inherits "2.0.3" - -util@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" - integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== - dependencies: - inherits "2.0.3" - -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -v8-compile-cache-lib@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" - integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - -v8-compile-cache@^2.1.1: - version "2.4.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz#cdada8bec61e15865f05d097c5f4fd30e94dc128" - integrity sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw== - -v8-to-istanbul@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-1.2.1.tgz#8f63a94b7f91243f5dcc6a495540b5653beb1279" - integrity sha512-NglPycIwSQeSJj7VJ6L8vTsPKC9MG5Lcx4n3SvYqNHzklbMI4dGcLJnkLPEPJ3uB8UyTdWviMhM0Ptq+xD5UFQ== - -validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -validate-npm-package-name@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" - integrity sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw== - dependencies: - builtins "^1.0.3" - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vm-browserify@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" - integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== - -vscode-oniguruma@^1.6.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" - integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== - -vscode-textmate@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e" - integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ== - -watchpack-chokidar2@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz#38500072ee6ece66f3769936950ea1771be1c957" - integrity sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww== - dependencies: - chokidar "^2.1.8" - -watchpack@^1.7.4: - version "1.7.5" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" - integrity sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== - dependencies: - graceful-fs "^4.1.2" - neo-async "^2.5.0" - optionalDependencies: - chokidar "^3.4.1" - watchpack-chokidar2 "^2.0.1" - -wcwidth@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== - dependencies: - defaults "^1.0.3" - -weak-map@^1.0.5: - version "1.0.8" - resolved "https://registry.yarnpkg.com/weak-map/-/weak-map-1.0.8.tgz#394c18a9e8262e790544ed8b55c6a4ddad1cb1a3" - integrity sha512-lNR9aAefbGPpHO7AEnY0hCFjz1eTkWCXYvkTRrTHs9qv8zJp+SkVYpzfLIFXQQiG3tVvbNFQgVg2bQS8YGgxyw== - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== - -webidl-conversions@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" - integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== - -webpack-cli@^3.3.10: - version "3.3.12" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.12.tgz#94e9ada081453cd0aa609c99e500012fd3ad2d4a" - integrity sha512-NVWBaz9k839ZH/sinurM+HcDvJOTXwSjYp1ku+5XKeOC03z8v5QitnK/x+lAxGXFyhdayoIf/GOpv85z3/xPag== - dependencies: - chalk "^2.4.2" - cross-spawn "^6.0.5" - enhanced-resolve "^4.1.1" - findup-sync "^3.0.0" - global-modules "^2.0.0" - import-local "^2.0.0" - interpret "^1.4.0" - loader-utils "^1.4.0" - supports-color "^6.1.0" - v8-compile-cache "^2.1.1" - yargs "^13.3.2" - -webpack-sources@^1.4.0, webpack-sources@^1.4.1: - version "1.4.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" - integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - -webpack@^4.46.0: - version "4.47.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.47.0.tgz#8b8a02152d7076aeb03b61b47dad2eeed9810ebc" - integrity sha512-td7fYwgLSrky3fI1EuU5cneU4+pbH6GgOfuKNS1tNPcfdGinGELAqsb/BP4nnvZyKSG2i/xFGU7+n2PvZA8HJQ== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/wasm-edit" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - acorn "^6.4.1" - ajv "^6.10.2" - ajv-keywords "^3.4.1" - chrome-trace-event "^1.0.2" - enhanced-resolve "^4.5.0" - eslint-scope "^4.0.3" - json-parse-better-errors "^1.0.2" - loader-runner "^2.4.0" - loader-utils "^1.2.3" - memory-fs "^0.4.1" - micromatch "^3.1.10" - mkdirp "^0.5.3" - neo-async "^2.6.1" - node-libs-browser "^2.2.1" - schema-utils "^1.0.0" - tapable "^1.1.3" - terser-webpack-plugin "^1.4.3" - watchpack "^1.7.4" - webpack-sources "^1.4.1" - -websocket@~1.0.34: - version "1.0.34" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" - integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== - dependencies: - bufferutil "^4.0.1" - debug "^2.2.0" - es5-ext "^0.10.50" - typedarray-to-buffer "^3.1.5" - utf-8-validate "^5.0.2" - yaeti "^0.0.6" - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -whatwg-url@^6.5.0: - version "6.5.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" - integrity sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - -whatwg-url@^8.4.0: - version "8.7.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" - integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== - dependencies: - lodash "^4.7.0" - tr46 "^2.1.0" - webidl-conversions "^6.1.0" - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-module@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" - integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== - -which-typed-array@^1.1.14, which-typed-array@^1.1.15: - version "1.1.15" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" - integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== - dependencies: - available-typed-arrays "^1.0.7" - call-bind "^1.0.7" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.2" - -which@1.3.1, which@^1.2.14, which@^1.2.9, which@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -which@^2.0.1, which@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wide-align@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -wide-align@^1.1.0: - version "1.1.5" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" - integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== - dependencies: - string-width "^1.0.2 || 2 || 3 || 4" - -widest-line@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" - integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== - dependencies: - string-width "^4.0.0" - -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== - -worker-farm@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" - integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== - dependencies: - errno "~0.1.7" - -wrap-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba" - integrity sha512-iXR3tDXpbnTpzjKSylUJRkLuOrEC7hwEB221cgn6wtF8wpmz28puFXAEfPT5zrjM3wahygB//VuWEr1vTkDcNQ== - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -write-file-atomic@^2.4.2: - version "2.4.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" - integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -write-file-atomic@^3.0.0, write-file-atomic@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" - integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== - dependencies: - imurmurhash "^0.1.4" - is-typedarray "^1.0.0" - signal-exit "^3.0.2" - typedarray-to-buffer "^3.1.5" - -write-json-file@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" - integrity sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ== - dependencies: - detect-indent "^5.0.0" - graceful-fs "^4.1.15" - make-dir "^2.1.0" - pify "^4.0.1" - sort-keys "^2.0.0" - write-file-atomic "^2.4.2" - -write-json-file@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-4.3.0.tgz#908493d6fd23225344af324016e4ca8f702dd12d" - integrity sha512-PxiShnxf0IlnQuMYOPPhPkhExoCQuTUNPOa/2JWCYTmBquU9njyyDuwRKN26IZBlp4yn1nt+Agh2HOOBl+55HQ== - dependencies: - detect-indent "^6.0.0" - graceful-fs "^4.1.15" - is-plain-obj "^2.0.0" - make-dir "^3.0.0" - sort-keys "^4.0.0" - write-file-atomic "^3.0.0" - -write-pkg@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-4.0.0.tgz#675cc04ef6c11faacbbc7771b24c0abbf2a20039" - integrity sha512-v2UQ+50TNf2rNHJ8NyWttfm/EJUBWMJcx6ZTYZr6Qp52uuegWw/lBkCtCbnYZEmPRNL61m+u67dAmGxo+HTULA== - dependencies: - sort-keys "^2.0.0" - type-fest "^0.4.1" - write-json-file "^3.2.0" - -ws@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" - integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== - -xtend@^4.0.0, xtend@~4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -y18n@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" - integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yaeti@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" - integrity sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug== - -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yaml@^1.10.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" - integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== - -yargs-parser@13.1.2, yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^18.1.2: - version "18.1.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" - integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^20.2.2, yargs-parser@^20.2.3: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-unparser@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" - integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== - dependencies: - flat "^4.1.0" - lodash "^4.17.15" - yargs "^13.3.0" - -yargs@13.3.2, yargs@^13.3.0, yargs@^13.3.2: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - -yargs@^15.0.2, yargs@^15.3.1: - version "15.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" - integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== - dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^4.2.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^18.1.2" - -yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yauzl@^2.10.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" - -yn@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==