diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index af03becbf..4692b3180 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -2,14 +2,6 @@ name: Alloy Dev on: pull_request: workflow_dispatch: -env: - SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} - SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} - SAUCE_JOB: "Alloy Dev Workflow" - SAUCE_CAPABILITIES_OVERRIDES_PATH: "sauceLabsCapabilities.json" - EDGE_BASE_PATH: ee-pre-prd - ALLOY_ENV: int - SAUCE_TUNNEL_ID: github-action-tunnel jobs: linting: @@ -49,59 +41,9 @@ jobs: - name: Install dependencies if: steps.npm-cache.outputs.cache-hit != 'true' run: npm ci - - name: Build - run: npm run test:functional:build:int - - uses: saucelabs/sauce-connect-action@v2 - with: - username: ${{ secrets.SAUCE_USERNAME }} - accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} - name: Run Unit Test - run: npx karma start karma.saucelabs.conf.cjs --single-run + run: npm run test env: BUILD_NUMBER: $GITHUB_RUN_NUMBER BUILD_ID: $GITHUB_RUN_ID JOB_NUMBER: $GITHUB_JOB - - alloy-int-e2e: - name: "Dev Functional Test - Saucectl" - runs-on: ubuntu-latest - needs: unit-test - timeout-minutes: 60 - steps: - - name: Set up Node.js version - uses: actions/setup-node@v4 - with: - node-version: 22 - - - uses: actions/checkout@v4 - - - name: Clear cache - uses: actions/cache@v4 - id: npm-cache - with: - path: "**/node_modules" - key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}-${{ secrets.NPM_CACHE_VERSION }} # increment NPM_CACHE_VERSION secret to force cache reset - - - name: Store Alloy version into env - uses: nyaa8/package-version@v1 - - - name: Install dependencies - if: steps.npm-cache.outputs.cache-hit != 'true' - run: npm ci - - - name: Build - run: npm run test:functional:build:int - env: - ALLOY_PROD_VERSION: ${{ env.PACKAGE_VERSION }} - - - uses: saucelabs/saucectl-run-action@v4.3.0 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - sauce-username: ${{ secrets.SAUCE_USERNAME }} - sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }} - env: | - ALLOY_PROD_VERSION=${{ env.PACKAGE_VERSION }} - NPM_PACKAGE_VERSION=${{ env.PACKAGE_VERSION }} - ALLOY_ENV=int - config-file: ./.sauce/dev.yml \ No newline at end of file diff --git a/.github/workflows/publish-to-npm.yaml b/.github/workflows/publish-to-npm.yaml index 9d270894e..6fe220c52 100644 --- a/.github/workflows/publish-to-npm.yaml +++ b/.github/workflows/publish-to-npm.yaml @@ -1,8 +1,5 @@ name: Publish To NPM on: workflow_dispatch -env: - SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} - SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} jobs: publish-to-npm: diff --git a/.husky/pre-commit b/.husky/pre-commit index d7ea2d80f..5e0776cc7 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,3 @@ -npm run checkthattestfilesexist STAGED_ONLY=true npm run add-license npx lint-staged npm run test:unit diff --git a/.sauceignore b/.sauceignore deleted file mode 100644 index 9be88b5a4..000000000 --- a/.sauceignore +++ /dev/null @@ -1,12 +0,0 @@ -# This file instructs saucectl to not package any files mentioned here. -.git/ -.github/ -.DS_Store -.hg/ -.vscode/ -.idea/ -.gitignore -.hgignore -.npmrc -*.gif -sandbox/ \ No newline at end of file diff --git a/karma.conf.cjs b/karma.conf.cjs deleted file mode 100644 index 5e441fa81..000000000 --- a/karma.conf.cjs +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2019 Adobe. All rights reserved. -This file is licensed to you 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 REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ -const rollupConfig = require("./rollup.test.config.cjs"); - -module.exports = (config) => { - config.set({ - // base path that will be used to resolve all patterns (eg. files, exclude) - basePath: "", - // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - frameworks: ["jasmine"], - - // list of files / patterns to load in the browser - files: [ - { - pattern: "test/unit/specs/karmaEntry.spec.cjs", - watched: false, // The preprocessor will use its own watcher - }, - ], - - // list of files to exclude - exclude: [], - - // preprocess matching files before serving them to the browser - // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: { - "test/unit/specs/karmaEntry.spec.cjs": ["rollup"], - }, - - // test results reporter to use - // possible values: "dots", "progress" - // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ["dots"], - - // web server port - port: 9876, - - // enable / disable colors in the output (reporters and logs) - colors: true, - - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_INFO, - - // enable / disable watching file and executing tests whenever any file changes - autoWatch: true, - - // start these browsers - // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ["ChromeHeadlessNoSandbox"], - customLaunchers: { - ChromeHeadlessNoSandbox: { - base: "ChromeHeadless", - flags: ["--no-sandbox"], - }, - }, - // Continuous Integration mode - // if true, Karma captures browsers, runs the tests and exits - singleRun: false, - - // Concurrency level - // how many browser should be started simultaneous - concurrency: Infinity, - - coverageReporter: { - reporters: [ - { type: "html" }, - { type: "lcovonly", subdir: ".", file: "lcov.dat" }, - ], - }, - - captureTimeout: 180000, - browserDisconnectTimeout: 180000, - browserDisconnectTolerance: 3, - browserNoActivityTimeout: 300000, - - rollupPreprocessor: rollupConfig, - }); -}; diff --git a/karma.saucelabs.conf.cjs b/karma.saucelabs.conf.cjs deleted file mode 100644 index 4929ebcaf..000000000 --- a/karma.saucelabs.conf.cjs +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright 2023 Adobe. All rights reserved. -This file is licensed to you 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 REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ -const karmaSauceLauncher = require("karma-sauce-launcher"); -const karmaConfig = require("./karma.conf.cjs"); - -module.exports = (config) => { - karmaConfig(config); - const customLaunchers = { - sl_chromeW3C: { - base: "SauceLabs", - browserName: "chrome", - browserVersion: "latest", - platformName: "Windows 11", - "sauce:options": { - tunnelIdentifier: process.env.SAUCE_TUNNEL_ID, - headless: true, - }, - }, - sl_safariW3C: { - base: "SauceLabs", - browserName: "safari", - browserVersion: "latest", - platformName: "macOS 13", - "sauce:options": { - tunnelIdentifier: process.env.SAUCE_TUNNEL_ID, - headless: true, - }, - }, - sl_firefoxW3C: { - base: "SauceLabs", - browserName: "firefox", - browserVersion: "latest", - platformName: "Windows 11", - "sauce:options": { - tunnelIdentifier: process.env.SAUCE_TUNNEL_ID, - headless: true, - }, - }, - }; - - config.set({ - browsers: Object.keys(customLaunchers), - customLaunchers, - concurrency: 10, - colors: true, - sauceLabs: { - testName: "Alloy Unit Tests", - build: `GH #${process.env.BUILD_NUMBER} (${process.env.BUILD_ID})`, - tunnelIdentifier: process.env.SAUCE_TUNNEL_ID, - screenResolution: "1280x1024", - recordVideo: false, - recordScreenshots: false, - }, - plugins: [ - "karma-jasmine", - "karma-coverage", - "karma-jasmine-matchers", - "karma-spec-reporter", - "karma-rollup-preprocessor", - karmaSauceLauncher, - ], - - reporters: ["dots", "saucelabs"], - }); -}; diff --git a/package-lock.json b/package-lock.json index fbf0b54d4..9513a720f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "@adobe/alloy", "version": "2.24.0", + "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@adobe/aep-rules-engine": "^2.0.2", @@ -40,8 +41,9 @@ "@babel/plugin-transform-runtime": "^7.25.9", "@eslint/js": "^9.14.0", "@octokit/rest": "^21.0.2", + "@vitest/browser": "^2.1.8", + "@vitest/coverage-v8": "^2.1.8", "bundlesize": "^0.18.2", - "chai": "^5.1.2", "chalk": "^5.3.0", "concurrently": "^9.1.0", "date-fns": "^4.1.0", @@ -56,22 +58,10 @@ "glob": "^11.0.0", "globals": "^15.12.0", "handlebars": "^4.7.8", + "happy-dom": "^15.11.1", "husky": "^9.1.6", - "jasmine": "^5.4.0", - "jasmine-core": "^5.4.0", - "karma": "^6.4.4", - "karma-chrome-launcher": "^3.2.0", - "karma-coverage": "^2.2.1", - "karma-firefox-launcher": "^2.1.3", - "karma-jasmine": "^5.1.0", - "karma-jasmine-html-reporter": "^2.1.0", - "karma-jasmine-matchers": "^5.0.0", - "karma-junit-reporter": "^2.0.1", - "karma-rollup-preprocessor": "^7.0.8", - "karma-safari-launcher": "^1.0.0", - "karma-sauce-launcher": "^4.3.6", - "karma-spec-reporter": "0.0.36", "lint-staged": "^15.2.10", + "playwright": "^1.49.1", "prettier": "^3.3.3", "read-cache": "^1.0.0", "recursive-readdir": "^2.2.3", @@ -83,20 +73,19 @@ "staged-git-files": "^1.3.0", "start-server-and-test": "^2.0.8", "testcafe": "^3.7.0", - "testcafe-browser-provider-saucelabs": "^3.0.0", "testcafe-reporter-junit": "^3.0.2", - "testcafe-reporter-saucelabs": "^3.5.1", "url-exists-nodejs": "^0.2.4", - "url-parse": "^1.5.10" + "url-parse": "^1.5.10", + "vitest": "^2.1.4" }, "optionalDependencies": { "@rollup/rollup-linux-x64-gnu": "^4.24.4" } }, "node_modules/@adobe/aep-rules-engine": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@adobe/aep-rules-engine/-/aep-rules-engine-2.0.2.tgz", - "integrity": "sha512-y5B1LcLo1xbUtRZLe4FRGiburzLu6kgY2VgLutgjoz0bpsKFxb21mqJ1axemsTfpJawYEvuP23+No1ud1ZsP2A==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@adobe/aep-rules-engine/-/aep-rules-engine-2.0.3.tgz", + "integrity": "sha512-9znsMcqXrDACO4zgH6gRlbGVfYcYW7yDS7eXS4J/a+ONrWmOHobshUJiRUCwnUK/4igmrCJYlL8GylhsPwi9hQ==", "license": "Apache-2.0" }, "node_modules/@adobe/alloy": { @@ -136,9 +125,9 @@ } }, "node_modules/@adobe/css-tools": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.0.tgz", - "integrity": "sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.1.tgz", + "integrity": "sha512-12WGKBQzjUAI4ayyF4IAtfw2QR/IDoqk6jTddXDhtYTJF9ASmoE1zst7cVtP0aL/F1jUJL5r+JxKXKEgHNbEUQ==", "dev": true, "license": "MIT" }, @@ -173,19 +162,10 @@ "license": "Apache-2.0" }, "node_modules/@adobe/reactor-promise": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@adobe/reactor-promise/-/reactor-promise-1.2.0.tgz", - "integrity": "sha512-0haTPOfJRKvTuG5Sbja3xAFPdv8aJUz+CiU2ocV5F88az0g6fOwt4+NLlLKzJcbh7qcg6MjDMZopbNc0xqUUVg==", - "license": "Apache-2.0", - "dependencies": { - "promise-polyfill": "8.1.3" - } - }, - "node_modules/@adobe/reactor-promise/node_modules/promise-polyfill": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.1.3.tgz", - "integrity": "sha512-MG5r82wBzh7pSKDRa9y+vllNHz3e3d4CNj1PQE4BQYxLme0gKYYBm9YENq+UkEikyZ0XbiGWxYlVw3Rl9O/U8g==", - "license": "MIT" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@adobe/reactor-promise/-/reactor-promise-2.0.0.tgz", + "integrity": "sha512-kP5jg4J77Rtl9TpNmADaXRWvy3ST+9MDHUlkDtuwuFNL6IKG3L4V930zcM0u0lTntskTd/gAJadTJaWOn1mBCQ==", + "license": "Apache-2.0" }, "node_modules/@adobe/reactor-query-string": { "version": "2.0.0", @@ -207,9 +187,9 @@ } }, "node_modules/@babel/cli": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.25.9.tgz", - "integrity": "sha512-I+02IfrTiSanpxJBlZQYb18qCxB6c2Ih371cVpfgIrPQrjAYkf45XxomTJOG8JBWX5GY35/+TmhCMdJ4ZPkL8Q==", + "version": "7.26.4", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.26.4.tgz", + "integrity": "sha512-+mORf3ezU3p3qr+82WvJSnQNE1GAYeoCfEv4fik6B5/2cvKZ75AX8oawWQdXtM9MmndooQj15Jr9kelRFWsuRw==", "dev": true, "license": "MIT", "dependencies": { @@ -269,9 +249,9 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.0.tgz", - "integrity": "sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", @@ -283,9 +263,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.0.tgz", - "integrity": "sha512-qETICbZSLe7uXv9VE8T/RWOdIE5qqyTucOt4zLYMafj2MRO271VGgLd4RACJMeBO37UPWhXiKMBk7YlJ0fOzQA==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.3.tgz", + "integrity": "sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -358,13 +338,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.0.tgz", - "integrity": "sha512-/AIkAmInnWwgEAJGQr9vY0c66Mj6kjkE2ZPB1PurTRaRAh3U+J45sAQMjQDJdh4WbR3l0x5xkimXBKyBXXAu2w==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.3.tgz", + "integrity": "sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==", "license": "MIT", "dependencies": { - "@babel/parser": "^7.26.0", - "@babel/types": "^7.26.0", + "@babel/parser": "^7.26.3", + "@babel/types": "^7.26.3", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -385,19 +365,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.25.9.tgz", - "integrity": "sha512-C47lC7LIDCnz0h4vai/tpNOI95tCd5ZT3iBt/DBH5lXKHZsyNQv18yf1wIIg2ntiQNgmAvA+DgZ82iW8Qdym8g==", - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-compilation-targets": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", @@ -454,13 +421,13 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.9.tgz", - "integrity": "sha512-ORPNZ3h6ZRkOyAa/SaHU+XsLZr0UQzRwuDQ0cczIA17nAzZ+85G5cVkOJIj7QavLZGSe8QXUmNFxSZzjcZF9bw==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.26.3.tgz", + "integrity": "sha512-G7ZRb40uUgdKOQqPLjfD12ZmGA54PzqDFUv2BKImnC9QIfGhIHKvVML0oN8IUiDq4iRqpq74ABpvOaerfWdong==", "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.25.9", - "regexpu-core": "^6.1.1", + "regexpu-core": "^6.2.0", "semver": "^6.3.1" }, "engines": { @@ -480,9 +447,9 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", - "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.3.tgz", + "integrity": "sha512-HK7Bi+Hj6H+VTHA3ZvBis7V/6hu9QuTrnMXNybfUf2iiuU/N97I8VjB+KbhFF8Rld/Lx5MzoCwPCpPjfK+n8Cg==", "license": "MIT", "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", @@ -593,19 +560,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-simple-access": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.9.tgz", - "integrity": "sha512-c6WHXuiaRsJTyHYLJV75t9IqsmTbItYfdj99PnzYGQZkYKvan5/2jKJ7gu31J3/BJ/A18grImSPModuyG/Eo0Q==", - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz", @@ -674,12 +628,12 @@ } }, "node_modules/@babel/parser": { - "version": "7.26.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.1.tgz", - "integrity": "sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.3.tgz", + "integrity": "sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==", "license": "MIT", "dependencies": { - "@babel/types": "^7.26.0" + "@babel/types": "^7.26.3" }, "bin": { "parser": "bin/babel-parser.js" @@ -768,15 +722,15 @@ } }, "node_modules/@babel/plugin-proposal-decorators": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.24.7.tgz", - "integrity": "sha512-RL9GR0pUG5Kc8BUWLNDm2T5OpYwSX15r98I0IkgmRQTXuELq/OynH8xtMTMvTJFjXbMWFVTKtYkTaYQsuAwQlQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.25.9.tgz", + "integrity": "sha512-smkNLL/O1ezy9Nhy4CNosc4Va+1wo5w4gzSZeLe6y6dM4mmHfYOCPolXQPHQxonZCF+ZyebxN9vqOolkYrSn5g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-decorators": "^7.24.7" + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-syntax-decorators": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -798,13 +752,13 @@ } }, "node_modules/@babel/plugin-syntax-decorators": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.24.7.tgz", - "integrity": "sha512-Ui4uLJJrRV1lb38zg1yYTmRKmiZLiftDEvZN2iq3kd9kUFU+PttmzTbAFC2ucRk/XJmtek6G23gPsuZbhrT8fQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.25.9.tgz", + "integrity": "sha512-ryzI0McXUPJnRCvMo4lumIKZUzhYUO/ScI+Mz4YVaTLt04DHNSjEUjKVvbzQjZFLuod/cYEc07mJWhzl6v4DPg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -827,13 +781,13 @@ } }, "node_modules/@babel/plugin-syntax-flow": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.24.7.tgz", - "integrity": "sha512-9G8GYT/dxn/D1IIKOUBmGX0mnmj46mGH9NnZyJLwtCpgh5f7D2VbuKodb+2s9m1Yavh1s7ASQN8lf0eqrb1LTw==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.26.0.tgz", + "integrity": "sha512-B+O2DnPc0iG+YXFqOxv2WNuNU97ToWjOomUQ78DouOENWUaM5sVrmet9mcomUGQFwpJd//gvUagXBSdzO1fRKg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -886,13 +840,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", - "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1151,12 +1105,11 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.25.9.tgz", - "integrity": "sha512-KRhdhlVk2nObA5AYa7QMgTMTVJdfHprfpAk4DjZVtllqRg9qarilstTKEhpVjyt+Npi8ThRyiV8176Am3CodPA==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.26.3.tgz", + "integrity": "sha512-7CAHcQ58z2chuXPWblnn1K6rLDnDWieghSOEmqQsrBenH0P9InCUtOJYD89pvngljmZlJcz3fcmgYsXFNGa1ZQ==", "license": "MIT", "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.25.9", "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { @@ -1182,14 +1135,14 @@ } }, "node_modules/@babel/plugin-transform-flow-strip-types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.24.7.tgz", - "integrity": "sha512-cjRKJ7FobOH2eakx7Ja+KpJRj8+y+/SiB3ooYm/n2UJfxu0oEaOoxOinitkJcPqv9KxS0kxTGPUaR7L2XcXDXA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.25.9.tgz", + "integrity": "sha512-/VVukELzPDdci7UUsWQaSkhgnjIWXnIyRpM02ldxaVoFK96c41So8JcKT3m0gYjyv7j5FNPGS5vfELrWalkbDA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-flow": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-syntax-flow": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1308,14 +1261,13 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.25.9.tgz", - "integrity": "sha512-dwh2Ol1jWwL2MgkCzUSOvfmKElqQcuswAZypBSUsScMXvgdT8Ekq5YA6TtqpTVWH+4903NmboMuH1o9i8Rxlyg==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.26.3.tgz", + "integrity": "sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ==", "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.25.9", - "@babel/helper-plugin-utils": "^7.25.9", - "@babel/helper-simple-access": "^7.25.9" + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1547,13 +1499,13 @@ } }, "node_modules/@babel/plugin-transform-react-display-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.24.7.tgz", - "integrity": "sha512-H/Snz9PFxKsS1JLI4dJLtnJgCJRoo0AUm3chP6NYr+9En1JMKloheEiLIhlp5MDVznWo+H3AAC1Mc8lmUEpsgg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.25.9.tgz", + "integrity": "sha512-KJfMlYIUxQB1CJfO3e0+h0ZHWOTLCPP115Awhaz8U0Zpq36Gl/cXlpoyMRnUWlhNUBAzldnCiAZNvCDj7CrKxQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1563,17 +1515,17 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.24.7.tgz", - "integrity": "sha512-+Dj06GDZEFRYvclU6k4bme55GKBEWUmByM/eoKuqg4zTNQHiApWRhQph5fxQB2wAEFvRzL1tOEj1RJ19wJrhoA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.25.9.tgz", + "integrity": "sha512-s5XwpQYCqGerXl+Pu6VDL3x0j2d82eiV77UJ8a2mDHAW7j9SWRqQ2y1fNo1Z74CdcYipl5Z41zvjj4Nfzq36rw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-jsx": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-syntax-jsx": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1583,13 +1535,13 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-development": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.24.7.tgz", - "integrity": "sha512-QG9EnzoGn+Qar7rxuW+ZOsbWOt56FvvI93xInqsZDC5fsekx1AlIO4KIJ5M+D0p0SqSH156EpmZyXq630B8OlQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.25.9.tgz", + "integrity": "sha512-9mj6rm7XVYs4mdLIpbZnHOYdpW42uoiBCTVowg7sP1thUOiANgMb4UtpRivR0pp5iL+ocvUv7X4mZgFRpJEzGw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/plugin-transform-react-jsx": "^7.24.7" + "@babel/plugin-transform-react-jsx": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1599,14 +1551,14 @@ } }, "node_modules/@babel/plugin-transform-react-pure-annotations": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.24.7.tgz", - "integrity": "sha512-PLgBVk3fzbmEjBJ/u8kFzOqS9tUeDjiaWud/rRym/yjCo/M9cASPlnrd2ZmmZpQT40fOOrvR8jh+n8jikrOhNA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.25.9.tgz", + "integrity": "sha512-KQ/Takk3T8Qzj5TppkS1be588lkbTp5uj7w6a0LeQaTMSckU/wK0oJ/pih+T690tkgI5jfmg2TqDJvd41Sj1Cg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1925,15 +1877,15 @@ } }, "node_modules/@babel/preset-flow": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.24.7.tgz", - "integrity": "sha512-NL3Lo0NorCU607zU3NwRyJbpaB6E3t0xtd3LfAQKDfkeX4/ggcDXvkmkW42QWT5owUeW/jAe4hn+2qvkV1IbfQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.25.9.tgz", + "integrity": "sha512-EASHsAhE+SSlEzJ4bzfusnXSHiU+JfAYzj+jbw2vgQKgq5HrUr8qs+vgtiEL5dOH6sEweI+PNt2D7AqrDSHyqQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "@babel/plugin-transform-flow-strip-types": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "@babel/plugin-transform-flow-strip-types": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1957,18 +1909,18 @@ } }, "node_modules/@babel/preset-react": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.24.7.tgz", - "integrity": "sha512-AAH4lEkpmzFWrGVlHaxJB7RLH21uPQ9+He+eFLWHmF9IuFQVugz8eAsamaW0DXRrTfco5zj1wWtpdcXJUOfsag==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.26.3.tgz", + "integrity": "sha512-Nl03d6T9ky516DGK2YMxrTqvnpUW63TnJMOMonj+Zae0JiPC5BC9xPMSL6L8fiSpA5vP88qfygavVQvnLp+6Cw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "@babel/plugin-transform-react-display-name": "^7.24.7", - "@babel/plugin-transform-react-jsx": "^7.24.7", - "@babel/plugin-transform-react-jsx-development": "^7.24.7", - "@babel/plugin-transform-react-pure-annotations": "^7.24.7" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "@babel/plugin-transform-react-display-name": "^7.25.9", + "@babel/plugin-transform-react-jsx": "^7.25.9", + "@babel/plugin-transform-react-jsx-development": "^7.25.9", + "@babel/plugin-transform-react-pure-annotations": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1978,9 +1930,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.8.tgz", - "integrity": "sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" @@ -2004,16 +1956,16 @@ } }, "node_modules/@babel/traverse": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", - "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", + "version": "7.26.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.4.tgz", + "integrity": "sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w==", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.25.9", - "@babel/generator": "^7.25.9", - "@babel/parser": "^7.25.9", + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.3", + "@babel/parser": "^7.26.3", "@babel/template": "^7.25.9", - "@babel/types": "^7.25.9", + "@babel/types": "^7.26.3", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -2031,9 +1983,9 @@ } }, "node_modules/@babel/types": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", - "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", + "integrity": "sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==", "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.25.9", @@ -2043,14 +1995,88 @@ "node": ">=6.9.0" } }, - "node_modules/@colors/colors": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@bundled-es-modules/cookie": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@bundled-es-modules/cookie/-/cookie-2.0.1.tgz", + "integrity": "sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cookie": "^0.7.2" + } + }, + "node_modules/@bundled-es-modules/statuses": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@bundled-es-modules/statuses/-/statuses-1.0.1.tgz", + "integrity": "sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==", + "dev": true, + "license": "ISC", + "dependencies": { + "statuses": "^2.0.1" + } + }, + "node_modules/@bundled-es-modules/statuses/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/@bundled-es-modules/tough-cookie": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@bundled-es-modules/tough-cookie/-/tough-cookie-0.1.6.tgz", + "integrity": "sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==", + "dev": true, + "license": "ISC", + "dependencies": { + "@types/tough-cookie": "^4.0.5", + "tough-cookie": "^4.1.4" + } + }, + "node_modules/@bundled-es-modules/tough-cookie/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/@bundled-es-modules/tough-cookie/node_modules/tough-cookie": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@bundled-es-modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.1.90" + "node": ">= 4.0.0" } }, "node_modules/@devexpress/bin-v8-flags-filter": { @@ -2138,9 +2164,9 @@ } }, "node_modules/@electron/asar": { - "version": "3.2.10", - "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.2.10.tgz", - "integrity": "sha512-mvBSwIBUeiRscrCeJE1LwctAriBj65eUDm0Pc11iE5gRwzkmsdbS7FnZ1XUWjpSeQWL1L5g12Fc/SchPM9DUOw==", + "version": "3.2.17", + "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.2.17.tgz", + "integrity": "sha512-OcWImUI686w8LkghQj9R2ynZ2ME693Ek6L1SiaAgqGKzBaTIZw3fHDqN82Rcl+EU1Gm9EgkJ5KLIY/q5DCRbbA==", "dev": true, "license": "MIT", "dependencies": { @@ -2187,442 +2213,603 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + "node": ">=12" } }, - "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==", - "license": "Apache-2.0", + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=12" } }, - "node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", - "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=12" } }, - "node_modules/@eslint/eslintrc/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==", - "license": "Python-2.0" - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, - "node_modules/@eslint/eslintrc/node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@eslint/eslintrc/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=4" + "node": ">=12" } }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "license": "(MIT OR CC0-1.0)", + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, - "node_modules/@eslint/js": { - "version": "9.14.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.14.0.tgz", - "integrity": "sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==", + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": ">=12" } }, - "node_modules/@hapi/hoek": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@hapi/topo": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", - "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "deprecated": "Use @eslint/config-array instead", - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10.10.0" + "node": ">=12" } }, - "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==", - "license": "Apache-2.0", + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "node": ">=12" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "license": "BSD-3-Clause" - }, - "node_modules/@inquirer/checkbox": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.0.1.tgz", - "integrity": "sha512-ehJjmNPdguajc1hStvjN7DJNVjwG5LC1mgGMGFjCmdkn2fxB2GtULftMnlaqNmvMdPpqdaSoOFpl86VkLtG4pQ==", + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@inquirer/core": "^10.0.1", - "@inquirer/figures": "^1.0.7", - "@inquirer/type": "^3.0.0", - "ansi-escapes": "^4.3.2", - "yoctocolors-cjs": "^2.1.2" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@types/node": ">=18" + "node": ">=12" } }, - "node_modules/@inquirer/checkbox/node_modules/@inquirer/type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.0.tgz", - "integrity": "sha512-YYykfbw/lefC7yKj7nanzQXILM7r3suIvyFlCcMskc99axmsSewXWkAfXKwMbgxL76iAFVmRwmYdwNZNc8gjog==", + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@types/node": ">=18" + "node": ">=12" } }, - "node_modules/@inquirer/confirm": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.0.1.tgz", - "integrity": "sha512-6ycMm7k7NUApiMGfVc32yIPp28iPKxhGRMqoNDiUjq2RyTAkbs5Fx0TdzBqhabcKvniDdAAvHCmsRjnNfTsogw==", + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@inquirer/core": "^10.0.1", - "@inquirer/type": "^3.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@types/node": ">=18" + "node": ">=12" } }, - "node_modules/@inquirer/confirm/node_modules/@inquirer/type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.0.tgz", - "integrity": "sha512-YYykfbw/lefC7yKj7nanzQXILM7r3suIvyFlCcMskc99axmsSewXWkAfXKwMbgxL76iAFVmRwmYdwNZNc8gjog==", + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@types/node": ">=18" + "node": ">=12" } }, - "node_modules/@inquirer/core": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.0.1.tgz", - "integrity": "sha512-KKTgjViBQUi3AAssqjUFMnMO3CM3qwCHvePV9EW+zTKGKafFGFF01sc1yOIYjLJ7QU52G/FbzKc+c01WLzXmVQ==", + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@inquirer/figures": "^1.0.7", - "@inquirer/type": "^3.0.0", - "ansi-escapes": "^4.3.2", - "cli-width": "^4.1.0", - "mute-stream": "^2.0.0", - "signal-exit": "^4.1.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^6.2.0", - "yoctocolors-cjs": "^2.1.2" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=18" + "node": ">=12" } }, - "node_modules/@inquirer/core/node_modules/@inquirer/type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.0.tgz", - "integrity": "sha512-YYykfbw/lefC7yKj7nanzQXILM7r3suIvyFlCcMskc99axmsSewXWkAfXKwMbgxL76iAFVmRwmYdwNZNc8gjog==", + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@types/node": ">=18" + "node": ">=12" } }, - "node_modules/@inquirer/core/node_modules/mute-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", - "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", - "license": "ISC", + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=12" } }, - "node_modules/@inquirer/editor": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.0.1.tgz", - "integrity": "sha512-qAHHJ6hs343eNtCKgV2wV5CImFxYG8J1pl/YCeI5w9VoW7QpulRUU26+4NsMhjR6zDRjKBsH/rRjCIcaAOHsrg==", + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@inquirer/core": "^10.0.1", - "@inquirer/type": "^3.0.0", - "external-editor": "^3.1.0" - }, + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@types/node": ">=18" + "node": ">=12" } }, - "node_modules/@inquirer/editor/node_modules/@inquirer/type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.0.tgz", - "integrity": "sha512-YYykfbw/lefC7yKj7nanzQXILM7r3suIvyFlCcMskc99axmsSewXWkAfXKwMbgxL76iAFVmRwmYdwNZNc8gjog==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@types/node": ">=18" + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@inquirer/expand": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.1.tgz", - "integrity": "sha512-9anjpdc802YInXekwePsa5LWySzVMHbhVS6v6n5IJxrl8w09mODOeP69wZ1d0WrOvot2buQSmYp4lW/pq8y+zQ==", + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.0.1", - "@inquirer/type": "^3.0.0", - "yoctocolors-cjs": "^2.1.2" + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": ">=18" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" }, "peerDependencies": { - "@types/node": ">=18" + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@inquirer/expand/node_modules/@inquirer/type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.0.tgz", - "integrity": "sha512-YYykfbw/lefC7yKj7nanzQXILM7r3suIvyFlCcMskc99axmsSewXWkAfXKwMbgxL76iAFVmRwmYdwNZNc8gjog==", - "license": "MIT", + "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==", + "license": "Apache-2.0", "engines": { - "node": ">=18" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "peerDependencies": { - "@types/node": ">=18" + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@inquirer/figures": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.7.tgz", - "integrity": "sha512-m+Trk77mp54Zma6xLkLuY+mvanPxlE4A7yNKs2HBiyZ4UkVs28Mv5c/pgWrHeInx+USHeX/WEPzjrWrcJiQgjw==", + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "license": "MIT", "engines": { - "node": ">=18" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@inquirer/input": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.0.1.tgz", - "integrity": "sha512-m+SliZ2m43cDRIpAdQxfv5QOeAQCuhS8TGLvtzEP1An4IH1kBES4RLMRgE/fC+z29aN8qYG8Tq/eXQQKTYwqAg==", + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.0.1", - "@inquirer/type": "^3.0.0" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": ">=18" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "peerDependencies": { - "@types/node": ">=18" + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@inquirer/input/node_modules/@inquirer/type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.0.tgz", - "integrity": "sha512-YYykfbw/lefC7yKj7nanzQXILM7r3suIvyFlCcMskc99axmsSewXWkAfXKwMbgxL76iAFVmRwmYdwNZNc8gjog==", + "node_modules/@eslint/eslintrc/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==", + "license": "Python-2.0" + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=18" + "node": ">=8" }, - "peerDependencies": { - "@types/node": ">=18" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@inquirer/number": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.1.tgz", - "integrity": "sha512-gF3erqfm0snpwBjbyKXUUe17QJ7ebm49btXApajrM0rgCCoYX0o9W5NCuYNae87iPxaIJVjtuoQ42DX32IdbMA==", + "node_modules/@eslint/eslintrc/node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.0.1", - "@inquirer/type": "^3.0.0" + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" }, "engines": { - "node": ">=18" + "node": ">=6" }, - "peerDependencies": { - "@types/node": ">=18" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@inquirer/number/node_modules/@inquirer/type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.0.tgz", - "integrity": "sha512-YYykfbw/lefC7yKj7nanzQXILM7r3suIvyFlCcMskc99axmsSewXWkAfXKwMbgxL76iAFVmRwmYdwNZNc8gjog==", + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/eslintrc/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "license": "MIT", "engines": { - "node": ">=18" + "node": ">=4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" }, - "peerDependencies": { - "@types/node": ">=18" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@inquirer/password": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.1.tgz", - "integrity": "sha512-D7zUuX4l4ZpL3D7/SWu9ibijP09jigwHi/gfUHLx5GMS5oXzuMfPV2xPMG1tskco4enTx70HA0VtMXecerpvbg==", + "node_modules/@eslint/js": { + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", + "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", + "dev": true, "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@hapi/topo": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "@inquirer/core": "^10.0.1", - "@inquirer/type": "^3.0.0", - "ansi-escapes": "^4.3.2" + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" }, "engines": { - "node": ">=18" + "node": ">=10.10.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==", + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" }, - "peerDependencies": { - "@types/node": ">=18" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@inquirer/password/node_modules/@inquirer/type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.0.tgz", - "integrity": "sha512-YYykfbw/lefC7yKj7nanzQXILM7r3suIvyFlCcMskc99axmsSewXWkAfXKwMbgxL76iAFVmRwmYdwNZNc8gjog==", + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "license": "BSD-3-Clause" + }, + "node_modules/@inquirer/checkbox": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.0.4.tgz", + "integrity": "sha512-fYAKCAcGNMdfjL6hZTRUwkIByQ8EIZCXKrIQZH7XjADnN/xvRUhj8UdBbpC4zoUzvChhkSC/zRKaP/tDs3dZpg==", "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.2", + "@inquirer/figures": "^1.0.9", + "@inquirer/type": "^3.0.2", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, "engines": { "node": ">=18" }, @@ -2630,22 +2817,14 @@ "@types/node": ">=18" } }, - "node_modules/@inquirer/prompts": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.0.1.tgz", - "integrity": "sha512-cu2CpGC2hz7WTt2VBvdkzahDvYice6vYA/8Dm7Fy3tRNzKuQTF2EY3CV4H2GamveWE6tA2XzyXtbWX8+t4WMQg==", + "node_modules/@inquirer/confirm": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.1.tgz", + "integrity": "sha512-vVLSbGci+IKQvDOtzpPTCOiEJCNidHcAq9JYVoWTW0svb5FiwSLotkM+JXNXejfjnzVYV9n0DTBythl9+XgTxg==", "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^4.0.1", - "@inquirer/confirm": "^5.0.1", - "@inquirer/editor": "^4.0.1", - "@inquirer/expand": "^4.0.1", - "@inquirer/input": "^4.0.1", - "@inquirer/number": "^3.0.1", - "@inquirer/password": "^4.0.1", - "@inquirer/rawlist": "^4.0.1", - "@inquirer/search": "^3.0.1", - "@inquirer/select": "^4.0.1" + "@inquirer/core": "^10.1.2", + "@inquirer/type": "^3.0.2" }, "engines": { "node": ">=18" @@ -2654,28 +2833,36 @@ "@types/node": ">=18" } }, - "node_modules/@inquirer/rawlist": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.0.1.tgz", - "integrity": "sha512-0LuMOgaWs7W8JNcbiKkoFwyWFDEeCmLqDCygF0hidQUVa6J5grFVRZxrpompiWDFM49Km2rf7WoZwRo1uf1yWQ==", + "node_modules/@inquirer/core": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.2.tgz", + "integrity": "sha512-bHd96F3ezHg1mf/J0Rb4CV8ndCN0v28kUlrHqP7+ECm1C/A+paB7Xh2lbMk6x+kweQC+rZOxM/YeKikzxco8bQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.0.1", - "@inquirer/type": "^3.0.0", + "@inquirer/figures": "^1.0.9", + "@inquirer/type": "^3.0.2", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "mute-stream": "^2.0.0", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", "yoctocolors-cjs": "^2.1.2" }, "engines": { "node": ">=18" - }, - "peerDependencies": { - "@types/node": ">=18" } }, - "node_modules/@inquirer/rawlist/node_modules/@inquirer/type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.0.tgz", - "integrity": "sha512-YYykfbw/lefC7yKj7nanzQXILM7r3suIvyFlCcMskc99axmsSewXWkAfXKwMbgxL76iAFVmRwmYdwNZNc8gjog==", + "node_modules/@inquirer/editor": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.1.tgz", + "integrity": "sha512-xn9aDaiP6nFa432i68JCaL302FyL6y/6EG97nAtfIPnWZ+mWPgCMLGc4XZ2QQMsZtu9q3Jd5AzBPjXh10aX9kA==", "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.2", + "@inquirer/type": "^3.0.2", + "external-editor": "^3.1.0" + }, "engines": { "node": ">=18" }, @@ -2683,15 +2870,14 @@ "@types/node": ">=18" } }, - "node_modules/@inquirer/search": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.1.tgz", - "integrity": "sha512-ehMqjiO0pAf+KtdONKeCLVy4i3fy3feyRRhDrvzWhiwB8JccgKn7eHFr39l+Nx/FaZAhr0YxIJvkK5NuNvG+Ww==", + "node_modules/@inquirer/expand": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.4.tgz", + "integrity": "sha512-GYocr+BPyxKPxQ4UZyNMqZFSGKScSUc0Vk17II3J+0bDcgGsQm0KYQNooN1Q5iBfXsy3x/VWmHGh20QnzsaHwg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.0.1", - "@inquirer/figures": "^1.0.7", - "@inquirer/type": "^3.0.0", + "@inquirer/core": "^10.1.2", + "@inquirer/type": "^3.0.2", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -2701,29 +2887,23 @@ "@types/node": ">=18" } }, - "node_modules/@inquirer/search/node_modules/@inquirer/type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.0.tgz", - "integrity": "sha512-YYykfbw/lefC7yKj7nanzQXILM7r3suIvyFlCcMskc99axmsSewXWkAfXKwMbgxL76iAFVmRwmYdwNZNc8gjog==", + "node_modules/@inquirer/figures": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.9.tgz", + "integrity": "sha512-BXvGj0ehzrngHTPTDqUoDT3NXL8U0RxUk2zJm2A66RhCEIWdtU1v6GuUqNAgArW4PQ9CinqIWyHdQgdwOj06zQ==", "license": "MIT", "engines": { "node": ">=18" - }, - "peerDependencies": { - "@types/node": ">=18" } }, - "node_modules/@inquirer/select": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.0.1.tgz", - "integrity": "sha512-tVRatFRGU49bxFCKi/3P+C0E13KZduNFbWuHWRx0L2+jbiyKRpXgHp9qiRHWRk/KarhYBXzH/di6w3VQ5aJd5w==", + "node_modules/@inquirer/input": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.1.1.tgz", + "integrity": "sha512-nAXAHQndZcXB+7CyjIW3XuQZZHbQQ0q8LX6miY6bqAWwDzNa9JUioDBYrFmOUNIsuF08o1WT/m2gbBXvBhYVxg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.0.1", - "@inquirer/figures": "^1.0.7", - "@inquirer/type": "^3.0.0", - "ansi-escapes": "^4.3.2", - "yoctocolors-cjs": "^2.1.2" + "@inquirer/core": "^10.1.2", + "@inquirer/type": "^3.0.2" }, "engines": { "node": ">=18" @@ -2732,10 +2912,121 @@ "@types/node": ">=18" } }, - "node_modules/@inquirer/select/node_modules/@inquirer/type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.0.tgz", - "integrity": "sha512-YYykfbw/lefC7yKj7nanzQXILM7r3suIvyFlCcMskc99axmsSewXWkAfXKwMbgxL76iAFVmRwmYdwNZNc8gjog==", + "node_modules/@inquirer/number": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.4.tgz", + "integrity": "sha512-DX7a6IXRPU0j8kr2ovf+QaaDiIf+zEKaZVzCWdLOTk7XigqSXvoh4cul7x68xp54WTQrgSnW7P1WBJDbyY3GhA==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.2", + "@inquirer/type": "^3.0.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + } + }, + "node_modules/@inquirer/password": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.4.tgz", + "integrity": "sha512-wiliQOWdjM8FnBmdIHtQV2Ca3S1+tMBUerhyjkRCv1g+4jSvEweGu9GCcvVEgKDhTBT15nrxvk5/bVrGUqSs1w==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.2", + "@inquirer/type": "^3.0.2", + "ansi-escapes": "^4.3.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + } + }, + "node_modules/@inquirer/prompts": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.2.1.tgz", + "integrity": "sha512-v2JSGri6/HXSfoGIwuKEn8sNCQK6nsB2BNpy2lSX6QH9bsECrMv93QHnj5+f+1ZWpF/VNioIV2B/PDox8EvGuQ==", + "license": "MIT", + "dependencies": { + "@inquirer/checkbox": "^4.0.4", + "@inquirer/confirm": "^5.1.1", + "@inquirer/editor": "^4.2.1", + "@inquirer/expand": "^4.0.4", + "@inquirer/input": "^4.1.1", + "@inquirer/number": "^3.0.4", + "@inquirer/password": "^4.0.4", + "@inquirer/rawlist": "^4.0.4", + "@inquirer/search": "^3.0.4", + "@inquirer/select": "^4.0.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + } + }, + "node_modules/@inquirer/rawlist": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.0.4.tgz", + "integrity": "sha512-IsVN2EZdNHsmFdKWx9HaXb8T/s3FlR/U1QPt9dwbSyPtjFbMTlW9CRFvnn0bm/QIsrMRD2oMZqrQpSWPQVbXXg==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.2", + "@inquirer/type": "^3.0.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + } + }, + "node_modules/@inquirer/search": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.4.tgz", + "integrity": "sha512-tSkJk2SDmC2MEdTIjknXWmCnmPr5owTs9/xjfa14ol1Oh95n6xW7SYn5fiPk4/vrJPys0ggSWiISdPze4LTa7A==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.2", + "@inquirer/figures": "^1.0.9", + "@inquirer/type": "^3.0.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + } + }, + "node_modules/@inquirer/select": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.0.4.tgz", + "integrity": "sha512-ZzYLuLoUzTIW9EJm++jBpRiTshGqS3Q1o5qOEQqgzaBlmdsjQr6pA4TUNkwu6OBYgM2mIRbCz6mUhFDfl/GF+w==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.2", + "@inquirer/figures": "^1.0.9", + "@inquirer/type": "^3.0.2", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + } + }, + "node_modules/@inquirer/type": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.2.tgz", + "integrity": "sha512-ZhQ4TvhwHZF+lGhQ2O/rsjo80XoZR5/5qhOY3t6FJuX5XBg5Be8YzYTvaUGJnc12AUGI2nr4QSUE4PhKSigx7g==", "license": "MIT", "engines": { "node": ">=18" @@ -2763,9 +3054,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "license": "MIT", "engines": { @@ -2775,29 +3066,17 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { @@ -2845,9 +3124,9 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.2.1", @@ -2902,6 +3181,24 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@mswjs/interceptors": { + "version": "0.37.5", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.37.5.tgz", + "integrity": "sha512-AAwRb5vXFcY4L+FvZ7LZusDuZ0vEe0Zm8ohn1FM6/X7A3bj4mqmkAcGRWuvC2JwSygNwHAAmMnAI73vPHeqsHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@open-draft/deferred-promise": "^2.2.0", + "@open-draft/logger": "^0.3.0", + "@open-draft/until": "^2.0.0", + "is-node-process": "^1.2.0", + "outvariant": "^1.4.3", + "strict-event-emitter": "^0.5.1" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@nicolo-ribaudo/chokidar-2": { "version": "2.1.8-no-fsevents.3", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", @@ -2965,17 +3262,17 @@ } }, "node_modules/@octokit/core": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.2.tgz", - "integrity": "sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.3.tgz", + "integrity": "sha512-z+j7DixNnfpdToYsOutStDgeRzJSMnbj8T1C/oQjB6Aa+kRfNjs/Fn7W6c8bmlt6mfy3FkgeKBRnDjxQow5dow==", "dev": true, "license": "MIT", "dependencies": { "@octokit/auth-token": "^5.0.0", - "@octokit/graphql": "^8.0.0", - "@octokit/request": "^9.0.0", - "@octokit/request-error": "^6.0.1", - "@octokit/types": "^13.0.0", + "@octokit/graphql": "^8.1.2", + "@octokit/request": "^9.1.4", + "@octokit/request-error": "^6.1.6", + "@octokit/types": "^13.6.2", "before-after-hook": "^3.0.2", "universal-user-agent": "^7.0.0" }, @@ -2984,13 +3281,13 @@ } }, "node_modules/@octokit/endpoint": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.1.tgz", - "integrity": "sha512-JYjh5rMOwXMJyUpj028cu0Gbp7qe/ihxfJMLc8VZBMMqSwLgOxDI1911gV4Enl1QSavAQNJcwmwBF9M0VvLh6Q==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.2.tgz", + "integrity": "sha512-XybpFv9Ms4hX5OCHMZqyODYqGTZ3H6K6Vva+M9LR7ib/xr1y1ZnlChYv9H680y77Vd/i/k+thXApeRASBQkzhA==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.0.0", + "@octokit/types": "^13.6.2", "universal-user-agent": "^7.0.2" }, "engines": { @@ -2998,14 +3295,14 @@ } }, "node_modules/@octokit/graphql": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.1.tgz", - "integrity": "sha512-ukiRmuHTi6ebQx/HFRCXKbDlOh/7xEV6QUXaE7MJEKGNAncGI/STSbOkl12qVXZrfZdpXctx5O9X1AIaebiDBg==", + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.2.tgz", + "integrity": "sha512-bdlj/CJVjpaz06NBpfHhp4kGJaRZfz7AzC+6EwUImRtrwIw8dIgJ63Xg0OzV9pRn3rIzrt5c2sa++BL0JJ8GLw==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/request": "^9.0.0", - "@octokit/types": "^13.0.0", + "@octokit/request": "^9.1.4", + "@octokit/types": "^13.6.2", "universal-user-agent": "^7.0.0" }, "engines": { @@ -3020,13 +3317,13 @@ "license": "MIT" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "11.3.3", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.3.tgz", - "integrity": "sha512-o4WRoOJZlKqEEgj+i9CpcmnByvtzoUYC6I8PD2SA95M+BJ2x8h7oLcVOg9qcowWXBOdcTRsMZiwvM3EyLm9AfA==", + "version": "11.3.6", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.6.tgz", + "integrity": "sha512-zcvqqf/+TicbTCa/Z+3w4eBJcAxCFymtc0UAIsR3dEVoNilWld4oXdscQ3laXamTszUZdusw97K8+DrbFiOwjw==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.5.0" + "@octokit/types": "^13.6.2" }, "engines": { "node": ">= 18" @@ -3049,13 +3346,13 @@ } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "13.2.4", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.4.tgz", - "integrity": "sha512-gusyAVgTrPiuXOdfqOySMDztQHv6928PQ3E4dqVGEtOvRXAKRbJR4b1zQyniIT9waqaWk/UDaoJ2dyPr7Bk7Iw==", + "version": "13.2.6", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.6.tgz", + "integrity": "sha512-wMsdyHMjSfKjGINkdGKki06VEkgdEldIGstIEyGX0wbYHGByOwN/KiM+hAAlUwAtPkP3gvXtVQA9L3ITdV2tVw==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.5.0" + "@octokit/types": "^13.6.1" }, "engines": { "node": ">= 18" @@ -3065,15 +3362,16 @@ } }, "node_modules/@octokit/request": { - "version": "9.1.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.3.tgz", - "integrity": "sha512-V+TFhu5fdF3K58rs1pGUJIDH5RZLbZm5BI+MNF+6o/ssFNT4vWlCh/tVpF3NxGtP15HUxTTMUbsG5llAuU2CZA==", + "version": "9.1.4", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.4.tgz", + "integrity": "sha512-tMbOwGm6wDII6vygP3wUVqFTw3Aoo0FnVQyhihh8vVq12uO3P+vQZeo2CKMpWtPSogpACD0yyZAlVlQnjW71DA==", "dev": true, "license": "MIT", "dependencies": { "@octokit/endpoint": "^10.0.0", "@octokit/request-error": "^6.0.1", - "@octokit/types": "^13.1.0", + "@octokit/types": "^13.6.2", + "fast-content-type-parse": "^2.0.0", "universal-user-agent": "^7.0.2" }, "engines": { @@ -3081,13 +3379,13 @@ } }, "node_modules/@octokit/request-error": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.4.tgz", - "integrity": "sha512-VpAhIUxwhWZQImo/dWAN/NpPqqojR6PSLgLYAituLM6U+ddx9hCioFGwBr5Mi+oi5CLeJkcAs3gJ0PYYzU6wUg==", + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.6.tgz", + "integrity": "sha512-pqnVKYo/at0NuOjinrgcQYpEbv4snvP3bKMRqHaD9kIsk9u1LCpb2smHZi8/qJfgeNqLo5hNW4Z7FezNdEo0xg==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.0.0" + "@octokit/types": "^13.6.2" }, "engines": { "node": ">= 18" @@ -3110,15 +3408,40 @@ } }, "node_modules/@octokit/types": { - "version": "13.5.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.5.0.tgz", - "integrity": "sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ==", + "version": "13.6.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.2.tgz", + "integrity": "sha512-WpbZfZUcZU77DrSW4wbsSgTPfKcp286q3ItaIgvSbBpZJlu6mnYXAkjZz6LVZPXkEvLIM8McanyZejKTYUHipA==", "dev": true, "license": "MIT", "dependencies": { "@octokit/openapi-types": "^22.2.0" } }, + "node_modules/@open-draft/deferred-promise": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz", + "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@open-draft/logger": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz", + "integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-node-process": "^1.2.0", + "outvariant": "^1.4.0" + } + }, + "node_modules/@open-draft/until": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz", + "integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==", + "dev": true, + "license": "MIT" + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -3143,10 +3466,17 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/@polka/url": { + "version": "1.0.0-next.28", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", + "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", + "dev": true, + "license": "MIT" + }, "node_modules/@promptbook/utils": { - "version": "0.58.0", - "resolved": "https://registry.npmjs.org/@promptbook/utils/-/utils-0.58.0.tgz", - "integrity": "sha512-TglWndmjikWN+OGg9eNOUaMTM7RHr8uFCtgxfWULT1BUjcohywdijf54vS1U4mZ1tBLdHD4/fIrIHtmHzPUIZQ==", + "version": "0.69.5", + "resolved": "https://registry.npmjs.org/@promptbook/utils/-/utils-0.69.5.tgz", + "integrity": "sha512-xm5Ti/Hp3o4xHrsK9Yy3MS6KbDxYbq485hDsFvxqaNA7equHLPdo8H8faTitTeb14QCDfLW4iwCxdVYu5sn6YQ==", "dev": true, "funding": [ { @@ -3159,38 +3489,34 @@ } ], "license": "CC-BY-4.0", + "optional": true, + "peer": true, "dependencies": { - "spacetrim": "0.11.36" + "spacetrim": "0.11.59" } }, "node_modules/@puppeteer/browsers": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.4.6.tgz", - "integrity": "sha512-x4BEjr2SjOPowNeiguzjozQbsc6h437ovD/wu+JpaenxVLm3jkgzHY2xOslMTp50HoTvQreMjiexiGQw1sqZlQ==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.9.1.tgz", + "integrity": "sha512-PuvK6xZzGhKPvlx3fpfdM2kYY3P/hB1URtK8wA7XUJ6prn6pp22zvJHu48th0SGcHL9SutbPHrFuQgfXTFobWA==", "dev": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "dependencies": { "debug": "4.3.4", "extract-zip": "2.0.1", "progress": "2.0.3", - "proxy-agent": "6.3.0", + "proxy-agent": "6.3.1", "tar-fs": "3.0.4", "unbzip2-stream": "1.4.3", - "yargs": "17.7.1" + "yargs": "17.7.2" }, "bin": { "browsers": "lib/cjs/main-cli.js" }, "engines": { "node": ">=16.3.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } } }, "node_modules/@puppeteer/browsers/node_modules/debug": { @@ -3199,6 +3525,8 @@ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "ms": "2.1.2" }, @@ -3211,12 +3539,23 @@ } } }, + "node_modules/@puppeteer/browsers/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/@puppeteer/browsers/node_modules/tar-fs": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", @@ -3229,31 +3568,14 @@ "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", "streamx": "^2.15.0" } }, - "node_modules/@puppeteer/browsers/node_modules/yargs": { - "version": "17.7.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", - "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/@rollup/plugin-babel": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.4.tgz", @@ -3281,9 +3603,9 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "28.0.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.1.tgz", - "integrity": "sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==", + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.2.tgz", + "integrity": "sha512-BEFI2EDqzl+vA1rl97IDRZ61AIwGH093d9nz8+dThxJNH8oSoB7MjWvPCX3dkaK1/RCJ/1v/R1XB15FuSs0fQw==", "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", @@ -3306,36 +3628,10 @@ } } }, - "node_modules/@rollup/plugin-commonjs/node_modules/fdir": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", - "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", - "license": "MIT", - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-commonjs/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/@rollup/plugin-node-resolve": { - "version": "15.3.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.0.tgz", - "integrity": "sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==", + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.1.tgz", + "integrity": "sha512-tgg6b91pAybXHJQMAAwW9VuWBO6Thi+q7BCNARLwSqlmsHz0XYURtGvh/AuwSADXSI4h/2uHbs7s4FzlZDGSGA==", "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", @@ -3379,14 +3675,14 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", - "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.4.tgz", + "integrity": "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==", "license": "MIT", "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" + "picomatch": "^4.0.2" }, "engines": { "node": ">=14.0.0" @@ -3401,9 +3697,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.4.tgz", - "integrity": "sha512-jfUJrFct/hTA0XDM5p/htWKoNNTbDLY0KRwEt6pyOA6k2fmk0WVwl65PdUdJZgzGEHWx+49LilkcSaumQRyNQw==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.30.0.tgz", + "integrity": "sha512-qFcFto9figFLz2g25DxJ1WWL9+c91fTxnGuwhToCl8BaqDsDYMl/kOnBXAyAqkkzAWimYMSWNPWEjt+ADAHuoQ==", "cpu": [ "arm" ], @@ -3414,9 +3710,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.4.tgz", - "integrity": "sha512-j4nrEO6nHU1nZUuCfRKoCcvh7PIywQPUCBa2UsootTHvTHIoIu2BzueInGJhhvQO/2FTRdNYpf63xsgEqH9IhA==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.30.0.tgz", + "integrity": "sha512-vqrQdusvVl7dthqNjWCL043qelBK+gv9v3ZiqdxgaJvmZyIAAXMjeGVSqZynKq69T7062T5VrVTuikKSAAVP6A==", "cpu": [ "arm64" ], @@ -3427,9 +3723,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.4.tgz", - "integrity": "sha512-GmU/QgGtBTeraKyldC7cDVVvAJEOr3dFLKneez/n7BvX57UdhOqDsVwzU7UOnYA7AAOt+Xb26lk79PldDHgMIQ==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.30.0.tgz", + "integrity": "sha512-617pd92LhdA9+wpixnzsyhVft3szYiN16aNUMzVkf2N+yAk8UXY226Bfp36LvxYTUt7MO/ycqGFjQgJ0wlMaWQ==", "cpu": [ "arm64" ], @@ -3440,9 +3736,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.4.tgz", - "integrity": "sha512-N6oDBiZCBKlwYcsEPXGDE4g9RoxZLK6vT98M8111cW7VsVJFpNEqvJeIPfsCzbf0XEakPslh72X0gnlMi4Ddgg==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.30.0.tgz", + "integrity": "sha512-Y3b4oDoaEhCypg8ajPqigKDcpi5ZZovemQl9Edpem0uNv6UUjXv7iySBpGIUTSs2ovWOzYpfw9EbFJXF/fJHWw==", "cpu": [ "x64" ], @@ -3453,9 +3749,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.24.4.tgz", - "integrity": "sha512-py5oNShCCjCyjWXCZNrRGRpjWsF0ic8f4ieBNra5buQz0O/U6mMXCpC1LvrHuhJsNPgRt36tSYMidGzZiJF6mw==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.30.0.tgz", + "integrity": "sha512-3REQJ4f90sFIBfa0BUokiCdrV/E4uIjhkWe1bMgCkhFXbf4D8YN6C4zwJL881GM818qVYE9BO3dGwjKhpo2ABA==", "cpu": [ "arm64" ], @@ -3466,9 +3762,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.24.4.tgz", - "integrity": "sha512-L7VVVW9FCnTTp4i7KrmHeDsDvjB4++KOBENYtNYAiYl96jeBThFfhP6HVxL74v4SiZEVDH/1ILscR5U9S4ms4g==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.30.0.tgz", + "integrity": "sha512-ZtY3Y8icbe3Cc+uQicsXG5L+CRGUfLZjW6j2gn5ikpltt3Whqjfo5mkyZ86UiuHF9Q3ZsaQeW7YswlHnN+lAcg==", "cpu": [ "x64" ], @@ -3479,9 +3775,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.4.tgz", - "integrity": "sha512-10ICosOwYChROdQoQo589N5idQIisxjaFE/PAnX2i0Zr84mY0k9zul1ArH0rnJ/fpgiqfu13TFZR5A5YJLOYZA==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.30.0.tgz", + "integrity": "sha512-bsPGGzfiHXMhQGuFGpmo2PyTwcrh2otL6ycSZAFTESviUoBOuxF7iBbAL5IJXc/69peXl5rAtbewBFeASZ9O0g==", "cpu": [ "arm" ], @@ -3492,9 +3788,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.4.tgz", - "integrity": "sha512-ySAfWs69LYC7QhRDZNKqNhz2UKN8LDfbKSMAEtoEI0jitwfAG2iZwVqGACJT+kfYvvz3/JgsLlcBP+WWoKCLcw==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.30.0.tgz", + "integrity": "sha512-kvyIECEhs2DrrdfQf++maCWJIQ974EI4txlz1nNSBaCdtf7i5Xf1AQCEJWOC5rEBisdaMFFnOWNLYt7KpFqy5A==", "cpu": [ "arm" ], @@ -3505,9 +3801,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.4.tgz", - "integrity": "sha512-uHYJ0HNOI6pGEeZ/5mgm5arNVTI0nLlmrbdph+pGXpC9tFHFDQmDMOEqkmUObRfosJqpU8RliYoGz06qSdtcjg==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.30.0.tgz", + "integrity": "sha512-CFE7zDNrokaotXu+shwIrmWrFxllg79vciH4E/zeK7NitVuWEaXRzS0mFfFvyhZfn8WfVOG/1E9u8/DFEgK7WQ==", "cpu": [ "arm64" ], @@ -3518,9 +3814,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.4.tgz", - "integrity": "sha512-38yiWLemQf7aLHDgTg85fh3hW9stJ0Muk7+s6tIkSUOMmi4Xbv5pH/5Bofnsb6spIwD5FJiR+jg71f0CH5OzoA==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.30.0.tgz", + "integrity": "sha512-MctNTBlvMcIBP0t8lV/NXiUwFg9oK5F79CxLU+a3xgrdJjfBLVIEHSAjQ9+ipofN2GKaMLnFFXLltg1HEEPaGQ==", "cpu": [ "arm64" ], @@ -3530,10 +3826,23 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.30.0.tgz", + "integrity": "sha512-fBpoYwLEPivL3q368+gwn4qnYnr7GVwM6NnMo8rJ4wb0p/Y5lg88vQRRP077gf+tc25akuqd+1Sxbn9meODhwA==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.4.tgz", - "integrity": "sha512-q73XUPnkwt9ZNF2xRS4fvneSuaHw2BXuV5rI4cw0fWYVIWIBeDZX7c7FWhFQPNTnE24172K30I+dViWRVD9TwA==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.30.0.tgz", + "integrity": "sha512-1hiHPV6dUaqIMXrIjN+vgJqtfkLpqHS1Xsg0oUfUVD98xGp1wX89PIXgDF2DWra1nxAd8dfE0Dk59MyeKaBVAw==", "cpu": [ "ppc64" ], @@ -3544,9 +3853,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.4.tgz", - "integrity": "sha512-Aie/TbmQi6UXokJqDZdmTJuZBCU3QBDA8oTKRGtd4ABi/nHgXICulfg1KI6n9/koDsiDbvHAiQO3YAUNa/7BCw==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.30.0.tgz", + "integrity": "sha512-U0xcC80SMpEbvvLw92emHrNjlS3OXjAM0aVzlWfar6PR0ODWCTQtKeeB+tlAPGfZQXicv1SpWwRz9Hyzq3Jx3g==", "cpu": [ "riscv64" ], @@ -3557,9 +3866,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.4.tgz", - "integrity": "sha512-P8MPErVO/y8ohWSP9JY7lLQ8+YMHfTI4bAdtCi3pC2hTeqFJco2jYspzOzTUB8hwUWIIu1xwOrJE11nP+0JFAQ==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.30.0.tgz", + "integrity": "sha512-VU/P/IODrNPasgZDLIFJmMiLGez+BN11DQWfTVlViJVabyF3JaeaJkP6teI8760f18BMGCQOW9gOmuzFaI1pUw==", "cpu": [ "s390x" ], @@ -3570,9 +3879,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.4.tgz", - "integrity": "sha512-K03TljaaoPK5FOyNMZAAEmhlyO49LaE4qCsr0lYHUKyb6QacTNF9pnfPpXnFlFD3TXuFbFbz7tJ51FujUXkXYA==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.30.0.tgz", + "integrity": "sha512-laQVRvdbKmjXuFA3ZiZj7+U24FcmoPlXEi2OyLfbpY2MW1oxLt9Au8q9eHd0x6Pw/Kw4oe9gwVXWwIf2PVqblg==", "cpu": [ "x64" ], @@ -3583,9 +3892,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.4.tgz", - "integrity": "sha512-VJYl4xSl/wqG2D5xTYncVWW+26ICV4wubwN9Gs5NrqhJtayikwCXzPL8GDsLnaLU3WwhQ8W02IinYSFJfyo34Q==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.30.0.tgz", + "integrity": "sha512-3wzKzduS7jzxqcOvy/ocU/gMR3/QrHEFLge5CD7Si9fyHuoXcidyYZ6jyx8OPYmCcGm3uKTUl+9jUSAY74Ln5A==", "cpu": [ "x64" ], @@ -3596,9 +3905,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.4.tgz", - "integrity": "sha512-ku2GvtPwQfCqoPFIJCqZ8o7bJcj+Y54cZSr43hHca6jLwAiCbZdBUOrqE6y29QFajNAzzpIOwsckaTFmN6/8TA==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.30.0.tgz", + "integrity": "sha512-jROwnI1+wPyuv696rAFHp5+6RFhXGGwgmgSfzE8e4xfit6oLRg7GyMArVUoM3ChS045OwWr9aTnU+2c1UdBMyw==", "cpu": [ "arm64" ], @@ -3609,9 +3918,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.4.tgz", - "integrity": "sha512-V3nCe+eTt/W6UYNr/wGvO1fLpHUrnlirlypZfKCT1fG6hWfqhPgQV/K/mRBXBpxc0eKLIF18pIOFVPh0mqHjlg==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.30.0.tgz", + "integrity": "sha512-duzweyup5WELhcXx5H1jokpr13i3BV9b48FMiikYAwk/MT1LrMYYk2TzenBd0jj4ivQIt58JWSxc19y4SvLP4g==", "cpu": [ "ia32" ], @@ -3622,9 +3931,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.4.tgz", - "integrity": "sha512-LTw1Dfd0mBIEqUVCxbvTE/LLo+9ZxVC9k99v1v4ahg9Aak6FpqOfNu5kRkeTAn0wphoC4JU7No1/rL+bBCEwhg==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.30.0.tgz", + "integrity": "sha512-DYvxS0M07PvgvavMIybCOBYheyrqlui6ZQBHJs6GqduVzHSZ06TPPvlfvnYstjODHQ8UUXFwt5YE+h0jFI8kwg==", "cpu": [ "x64" ], @@ -3641,30 +3950,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@saucelabs/sauce-json-reporter": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@saucelabs/sauce-json-reporter/-/sauce-json-reporter-4.1.0.tgz", - "integrity": "sha512-UhqXXsaW4yRA/7v10qeCp1B7tIw09fghsNIr2wuU93XhbkqxXmMJTYItqFX66k1JJSEzHsay8Md7sTkUlJfV6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16.13.2" - } - }, - "node_modules/@saucelabs/testcomposer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@saucelabs/testcomposer/-/testcomposer-3.0.1.tgz", - "integrity": "sha512-4Ye6v09vXsxud89YSoQ1Ag6JFUsZUTYYMZtOux/S1sUch2nN9jkhb4Itn6PxmUqwA7vjMNII8qHOPdLByEFQhA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "axios": "^1.7.5", - "form-data": "^4.0.0" - }, - "engines": { - "node": ">=16.13.2" - } - }, "node_modules/@sideway/address": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", @@ -3689,122 +3974,128 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "node_modules/@testing-library/dom": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", + "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">=10" + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" + "engines": { + "node": ">=18" } }, - "node_modules/@socket.io/component-emitter": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", - "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "node_modules/@testing-library/dom/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", "dependencies": { - "defer-to-connect": "^2.0.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@tootallnate/quickjs-emscripten": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", - "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "node_modules/@testing-library/dom/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT" - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "license": "MIT", - "optional": true, - "peer": true, "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } }, - "node_modules/@types/babel__generator": { - "version": "7.6.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "node_modules/@testing-library/dom/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { - "@babel/types": "^7.0.0" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "node_modules/@testing-library/dom/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@testing-library/dom/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", - "optional": true, - "peer": true, "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/@types/babel__traverse": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", - "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "node_modules/@testing-library/user-event": { + "version": "14.5.2", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.2.tgz", + "integrity": "sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==", + "dev": true, "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@babel/types": "^7.20.7" + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "peerDependencies": { + "@testing-library/dom": ">=7.21.4" } }, - "node_modules/@types/cacheable-request": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", - "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", "dev": true, "license": "MIT", - "dependencies": { - "@types/http-cache-semantics": "*", - "@types/keyv": "^3.1.4", - "@types/node": "*", - "@types/responselike": "^1.0.0" - } + "optional": true, + "peer": true }, - "node_modules/@types/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", - "dev": true + "node_modules/@types/aria-query": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", + "dev": true, + "license": "MIT" }, - "node_modules/@types/cors": { - "version": "2.8.17", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", - "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", "dev": true, - "dependencies": { - "@types/node": "*" - } + "license": "MIT" }, "node_modules/@types/estree": { "version": "1.0.6", @@ -3812,23 +4103,14 @@ "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "license": "MIT" }, - "node_modules/@types/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/minimatch": "^5.1.2", - "@types/node": "*" - } - }, "node_modules/@types/http-cache-semantics": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/@types/json5": { "version": "0.0.29", @@ -3837,20 +4119,10 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/lodash": { - "version": "4.17.7", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz", - "integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==", + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.14.tgz", + "integrity": "sha512-jsxagdikDiDBeIRaPYtArcT8my4tN1og7MtMRquFT3XNA6axxyHDRUemqDz/taRDdOUn0GnGHRCuff4q48sW9A==", "dev": true, "license": "MIT" }, @@ -3862,12 +4134,12 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.14.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz", - "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==", + "version": "22.10.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.5.tgz", + "integrity": "sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==", "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.20.0" } }, "node_modules/@types/resolve": { @@ -3876,29 +4148,37 @@ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", "license": "MIT" }, - "node_modules/@types/responselike": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", - "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", + "node_modules/@types/statuses": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.5.tgz", + "integrity": "sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==", "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } + "license": "MIT" + }, + "node_modules/@types/tough-cookie": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", + "dev": true, + "license": "MIT" }, "node_modules/@types/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@types/which/-/which-2.0.2.tgz", "integrity": "sha512-113D3mDkZDjo+EeUEHCFy0qniNc1ZpecGiAU7WSo7YDoSzolZIQKpYFHrPpjkB2nuyahcKfrmLXeQlh7gqJYdw==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/@types/ws": { - "version": "8.5.11", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.11.tgz", - "integrity": "sha512-4+q7P5h3SpJxaBft0Dzpbr6lmMaqh0Jr2tbhJZ/luAwvD7ohSCniYkwz/pLxuT2h0EOa6QADgJj1Ko+TzRfZ+w==", + "version": "8.5.13", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", + "integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@types/node": "*" } @@ -3910,236 +4190,248 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "@types/node": "*" } }, "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz", + "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==", "license": "ISC" }, - "node_modules/@wdio/config": { - "version": "7.33.0", - "resolved": "https://registry.npmjs.org/@wdio/config/-/config-7.33.0.tgz", - "integrity": "sha512-SaCZNKrDtBghf7ujyaxTiU4pBW+1Kms32shSoXpJ/wFop6/MiA7nb19qpUPoJtEDw5/NOKevUKz8nBMBXphiew==", + "node_modules/@vitest/browser": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@vitest/browser/-/browser-2.1.8.tgz", + "integrity": "sha512-OWVvEJThRgxlNMYNVLEK/9qVkpRcLvyuKLngIV3Hob01P56NjPHprVBYn+rx4xAJudbM9yrCrywPIEuA3Xyo8A==", "dev": true, "license": "MIT", "dependencies": { - "@types/glob": "^8.1.0", - "@wdio/logger": "7.26.0", - "@wdio/types": "7.33.0", - "@wdio/utils": "7.33.0", - "deepmerge": "^4.0.0", - "glob": "^8.0.3" + "@testing-library/dom": "^10.4.0", + "@testing-library/user-event": "^14.5.2", + "@vitest/mocker": "2.1.8", + "@vitest/utils": "2.1.8", + "magic-string": "^0.30.12", + "msw": "^2.6.4", + "sirv": "^3.0.0", + "tinyrainbow": "^1.2.0", + "ws": "^8.18.0" }, - "engines": { - "node": ">=12.0.0" + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "playwright": "*", + "vitest": "2.1.8", + "webdriverio": "*" + }, + "peerDependenciesMeta": { + "playwright": { + "optional": true + }, + "safaridriver": { + "optional": true + }, + "webdriverio": { + "optional": true + } } }, - "node_modules/@wdio/config/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/@vitest/coverage-v8": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.8.tgz", + "integrity": "sha512-2Y7BPlKH18mAZYAW1tYByudlCYrQyl5RGvnnDYJKW5tCiO5qg3KSAy3XAxcxKz900a0ZXxWtKrMuZLe3lKBpJw==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@wdio/config/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" + "@ampproject/remapping": "^2.3.0", + "@bcoe/v8-coverage": "^0.2.3", + "debug": "^4.3.7", + "istanbul-lib-coverage": "^3.2.2", + "istanbul-lib-report": "^3.0.1", + "istanbul-lib-source-maps": "^5.0.6", + "istanbul-reports": "^3.1.7", + "magic-string": "^0.30.12", + "magicast": "^0.3.5", + "std-env": "^3.8.0", + "test-exclude": "^7.0.1", + "tinyrainbow": "^1.2.0" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@vitest/browser": "2.1.8", + "vitest": "2.1.8" + }, + "peerDependenciesMeta": { + "@vitest/browser": { + "optional": true + } } }, - "node_modules/@wdio/config/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "node_modules/@vitest/coverage-v8/node_modules/istanbul-lib-source-maps": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", "dev": true, - "license": "ISC", + "license": "BSD-3-Clause", "dependencies": { - "brace-expansion": "^2.0.1" + "@jridgewell/trace-mapping": "^0.3.23", + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0" }, "engines": { "node": ">=10" } }, - "node_modules/@wdio/logger": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-7.26.0.tgz", - "integrity": "sha512-kQj9s5JudAG9qB+zAAcYGPHVfATl2oqKgqj47yjehOQ1zzG33xmtL1ArFbQKWhDG32y1A8sN6b0pIqBEIwgg8Q==", + "node_modules/@vitest/expect": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.8.tgz", + "integrity": "sha512-8ytZ/fFHq2g4PJVAtDX57mayemKgDR6X3Oa2Foro+EygiOJHUXhCqBAAKQYYajZpFoIfvBCF1j6R6IYRSIUFuw==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "loglevel": "^1.6.0", - "loglevel-plugin-prefix": "^0.8.4", - "strip-ansi": "^6.0.0" + "@vitest/spy": "2.1.8", + "@vitest/utils": "2.1.8", + "chai": "^5.1.2", + "tinyrainbow": "^1.2.0" }, - "engines": { - "node": ">=12.0.0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@wdio/logger/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/@vitest/mocker": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.8.tgz", + "integrity": "sha512-7guJ/47I6uqfttp33mgo6ga5Gr1VnL58rcqYKyShoRK9ebu8T5Rs6HN3s1NABiBeVTdWNrwUMcHH54uXZBN4zA==", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" + "@vitest/spy": "2.1.8", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.12" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@wdio/logger/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "url": "https://opencollective.com/vitest" }, - "engines": { - "node": ">=10" + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0" }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } } }, - "node_modules/@wdio/logger/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/@vitest/mocker/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": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" + "@types/estree": "^1.0.0" } }, - "node_modules/@wdio/logger/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@wdio/logger/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==", + "node_modules/@vitest/pretty-format": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.8.tgz", + "integrity": "sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ==", "dev": true, "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "tinyrainbow": "^1.2.0" }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@wdio/protocols": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@wdio/protocols/-/protocols-7.27.0.tgz", - "integrity": "sha512-hT/U22R5i3HhwPjkaKAG0yd59eaOaZB0eibRj2+esCImkb5Y6rg8FirrlYRxIGFVBl0+xZV0jKHzR5+o097nvg==", + "node_modules/@vitest/runner": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.8.tgz", + "integrity": "sha512-17ub8vQstRnRlIU5k50bG+QOMLHRhYPAna5tw8tYbj+jzjcspnwnwtPtiOlkuKC4+ixDPTuLZiqiWWQ2PSXHVg==", "dev": true, "license": "MIT", - "engines": { - "node": ">=12.0.0" + "dependencies": { + "@vitest/utils": "2.1.8", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@wdio/repl": { - "version": "8.24.12", - "resolved": "https://registry.npmjs.org/@wdio/repl/-/repl-8.24.12.tgz", - "integrity": "sha512-321F3sWafnlw93uRTSjEBVuvWCxTkWNDs7ektQS15drrroL3TMeFOynu4rDrIz0jXD9Vas0HCD2Tq/P0uxFLdw==", + "node_modules/@vitest/snapshot": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.8.tgz", + "integrity": "sha512-20T7xRFbmnkfcmgVEz+z3AU/3b0cEzZOt/zmnvZEctg64/QZbSDJEVm9fLnnlSi74KibmRsO9/Qabi+t0vCRPg==", "dev": true, "license": "MIT", "dependencies": { - "@types/node": "^20.1.0" + "@vitest/pretty-format": "2.1.8", + "magic-string": "^0.30.12", + "pathe": "^1.1.2" }, - "engines": { - "node": "^16.13 || >=18" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@wdio/types": { - "version": "7.33.0", - "resolved": "https://registry.npmjs.org/@wdio/types/-/types-7.33.0.tgz", - "integrity": "sha512-tNcuN5Kl+i5CffaeTYV1omzAo4rVjiI1m9raIA8ph6iVteWdCzYv2/ImpGgFiBPb7Mf6VokU3+q9Slh5Jitaww==", + "node_modules/@vitest/spy": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.8.tgz", + "integrity": "sha512-5swjf2q95gXeYPevtW0BLk6H8+bPlMb4Vw/9Em4hFxDcaOxS+e0LOX4yqNxoHzMR2akEB2xfpnWUzkZokmgWDg==", "dev": true, "license": "MIT", "dependencies": { - "@types/node": "^18.0.0", - "got": "^11.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "typescript": "^4.6.2" + "tinyspy": "^3.0.2" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@wdio/types/node_modules/@types/node": { - "version": "18.19.40", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.40.tgz", - "integrity": "sha512-MIxieZHrm4Ee8XArBIc+Or9HINt2StOmCbgRcXGSJl8q14svRvkZPe7LJq9HKtTI1SK3wU8b91TjntUm7T69Pg==", + "node_modules/@vitest/utils": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.8.tgz", + "integrity": "sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "@vitest/pretty-format": "2.1.8", + "loupe": "^3.1.2", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@wdio/utils": { - "version": "7.33.0", - "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-7.33.0.tgz", - "integrity": "sha512-4kQQ86EvEN6fBY5+u7M08cT6LfJtpk1rHd203xyxmbmV9lpNv/OCl4CsC+SD0jGT0aZZqYSIJ/Pil07pAh5K0g==", + "node_modules/@wdio/repl": { + "version": "8.40.3", + "resolved": "https://registry.npmjs.org/@wdio/repl/-/repl-8.40.3.tgz", + "integrity": "sha512-mWEiBbaC7CgxvSd2/ozpbZWebnRIc8KRu/J81Hlw/txUWio27S7IpXBlZGVvhEsNzq0+cuxB/8gDkkXvMPbesw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "@wdio/logger": "7.26.0", - "@wdio/types": "7.33.0", - "p-iteration": "^1.1.8" + "@types/node": "^22.2.0" }, "engines": { - "node": ">=12.0.0" + "node": "^16.13 || >=18" } }, "node_modules/@zip.js/zip.js": { - "version": "2.7.47", - "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.47.tgz", - "integrity": "sha512-jmtJMA3/Jl4rMzo/DZ79s6g0CJ1AZcNAO6emTy/vHfIKAB/iiFY7PLs6KmbRTJ+F8GnK2eCLnjQfCCneRxXgzg==", + "version": "2.7.54", + "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.54.tgz", + "integrity": "sha512-qMrJVg2hoEsZJjMJez9yI2+nZlBUxgYzGV3mqcb2B/6T1ihXp0fWBDYlVHlHquuorgNUQP5a8qSmX6HF5rFJNg==", "dev": true, "license": "BSD-3-Clause", + "optional": true, + "peer": true, "engines": { "bun": ">=0.7.0", "deno": ">=1.0.0", @@ -4152,6 +4444,8 @@ "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "event-target-shim": "^5.0.0" }, @@ -4159,23 +4453,10 @@ "node": ">=6.5" } }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -4210,13 +4491,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/add-matchers": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/add-matchers/-/add-matchers-0.6.2.tgz", - "integrity": "sha512-hVO2wodMei9RF00qe+506MoeJ/NEOdCMEkSJ12+fC3hx/5Z4zmhNiP92nJEF6XhmXokeB0hOtuQrjHCx2vmXrQ==", - "dev": true, - "license": "MIT" - }, "node_modules/address": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/address/-/address-2.0.3.tgz", @@ -4227,27 +4501,16 @@ "node": ">= 16.0.0" } }, - "node_modules/adm-zip": { - "version": "0.4.16", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", - "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", + "node_modules/agent-base": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { - "node": ">=0.3.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" + "node": ">= 14" } }, "node_modules/aggregate-error": { @@ -4315,13 +4578,13 @@ } }, "node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" @@ -4333,6 +4596,7 @@ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "license": "ISC", + "optional": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -4341,56 +4605,26 @@ "node": ">= 8" } }, - "node_modules/aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true, - "license": "ISC" - }, - "node_modules/arch": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", - "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/archive-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", - "integrity": "sha512-zV4Ky0v1F8dBrdYElwTvQhweQ0P7Kwc1aluqJsYtOBP01jXcWCyW2IEfI1YiqsG+Iy7ZR+o5LF1N+PGECBxHWA==", + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "license": "MIT", - "dependencies": { - "file-type": "^4.2.0" - }, + "optional": true, "engines": { - "node": ">=4" + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/archive-type/node_modules/file-type": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", - "integrity": "sha512-f2UbFQEk7LXgWpi5ntcO86OeA/cC80fuDDDaX/fZ2ZGel+AF7leRQqBBW1eJNiiQkrZlAoM6P+VYP5P6bOlDEQ==", + "node_modules/aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } + "license": "ISC" }, "node_modules/archiver": { "version": "7.0.1", @@ -4398,6 +4632,8 @@ "integrity": "sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "archiver-utils": "^5.0.2", "async": "^3.2.4", @@ -4417,6 +4653,8 @@ "integrity": "sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "glob": "^10.0.0", "graceful-fs": "^4.2.0", @@ -4436,6 +4674,8 @@ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -4460,6 +4700,8 @@ } ], "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -4471,6 +4713,8 @@ "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", @@ -4492,6 +4736,8 @@ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=8" }, @@ -4505,6 +4751,8 @@ "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "license": "BlueOak-1.0.0", + "optional": true, + "peer": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -4520,7 +4768,9 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, - "license": "ISC" + "license": "ISC", + "optional": true, + "peer": true }, "node_modules/archiver-utils/node_modules/minimatch": { "version": "9.0.5", @@ -4528,6 +4778,8 @@ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "dependencies": { "brace-expansion": "^2.0.1" }, @@ -4544,6 +4796,8 @@ "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "license": "BlueOak-1.0.0", + "optional": true, + "peer": true, "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -4556,11 +4810,13 @@ } }, "node_modules/archiver-utils/node_modules/readable-stream": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", - "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.6.0.tgz", + "integrity": "sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", @@ -4591,7 +4847,9 @@ "url": "https://feross.org/support" } ], - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/archiver-utils/node_modules/string_decoder": { "version": "1.3.0", @@ -4599,20 +4857,12 @@ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "safe-buffer": "~5.2.0" } }, - "node_modules/archiver/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/archiver/node_modules/buffer": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", @@ -4633,30 +4883,21 @@ } ], "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, - "node_modules/archiver/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/archiver/node_modules/readable-stream": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", - "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.6.0.tgz", + "integrity": "sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", @@ -4668,16 +4909,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/archiver/node_modules/readdir-glob": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", - "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "minimatch": "^5.1.0" - } - }, "node_modules/archiver/node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -4697,7 +4928,9 @@ "url": "https://feross.org/support" } ], - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/archiver/node_modules/string_decoder": { "version": "1.3.0", @@ -4705,6 +4938,8 @@ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -4715,6 +4950,8 @@ "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", @@ -4761,14 +4998,14 @@ } }, "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" }, "engines": { "node": ">= 0.4" @@ -4856,16 +5093,16 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -4875,16 +5112,16 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -4894,20 +5131,19 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", "dev": true, "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", "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" + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" }, "engines": { "node": ">= 0.4" @@ -4952,6 +5188,8 @@ "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "tslib": "^2.0.1" }, @@ -4960,9 +5198,9 @@ } }, "node_modules/async": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", - "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", "dev": true, "license": "MIT" }, @@ -5010,16 +5248,16 @@ } }, "node_modules/aws4": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.0.tgz", - "integrity": "sha512-3AungXC4I8kKsS9PuS4JH2nc+0bVY/mjgrephHTIi8fpEeGsTHBUJeosp0Wc1myYMElmD0B3Oc4XL/HVJ4PV2g==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", "dev": true, "license": "MIT" }, "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", "dev": true, "license": "MIT", "dependencies": { @@ -5029,11 +5267,13 @@ } }, "node_modules/b4a": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz", - "integrity": "sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", + "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==", "dev": true, - "license": "Apache-2.0" + "license": "Apache-2.0", + "optional": true, + "peer": true }, "node_modules/babel-plugin-module-resolver": { "version": "5.0.0", @@ -5097,13 +5337,13 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", - "integrity": "sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==", + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.12.tgz", + "integrity": "sha512-CPWT6BwvhrTO2d8QVorhTCQw9Y43zOu7G9HigcfxvepOU6b8o3tcWad6oVgZIsZCTt42FFv97aA7ZJsbM4+8og==", "license": "MIT", "dependencies": { "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.6.2", + "@babel/helper-define-polyfill-provider": "^0.6.3", "semver": "^6.3.1" }, "peerDependencies": { @@ -5133,12 +5373,12 @@ } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz", - "integrity": "sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.3.tgz", + "integrity": "sha512-LiWSbl4CRSIa5x/JAU6jZiG9eit9w6mz+yVMFwDE83LAWvt0AfGBoZ7HS/mkhrKuh2ZlzfVZYKoLjXdqw6Yt7Q==", "license": "MIT", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.2" + "@babel/helper-define-polyfill-provider": "^0.6.3" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -5151,33 +5391,6 @@ "dev": true, "license": "MIT" }, - "node_modules/babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "node_modules/babel-runtime/node_modules/core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", - "dev": true, - "hasInstallScript": true, - "license": "MIT" - }, - "node_modules/babel-runtime/node_modules/regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true, - "license": "MIT" - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -5185,20 +5398,22 @@ "license": "MIT" }, "node_modules/bare-events": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.4.2.tgz", - "integrity": "sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.2.tgz", + "integrity": "sha512-KSdMqLj1ZERZMP1PTmnLK7SqJu9z9/SbwUUPZly2puMtfVcytC+jl6mb/9XYiqq0PXcx1rNDS+Qvl1g54Lho6A==", "dev": true, "license": "Apache-2.0", - "optional": true + "optional": true, + "peer": true }, "node_modules/bare-fs": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.1.tgz", - "integrity": "sha512-W/Hfxc/6VehXlsgFtbB5B4xFcsCl+pAh30cYhoFyXErf6oGrwjh8SwiPAdHgpmWonKuYpZgGywN0SXt7dgsADA==", + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.5.tgz", + "integrity": "sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw==", "dev": true, "license": "Apache-2.0", "optional": true, + "peer": true, "dependencies": { "bare-events": "^2.0.0", "bare-path": "^2.0.0", @@ -5206,12 +5421,13 @@ } }, "node_modules/bare-os": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.0.tgz", - "integrity": "sha512-v8DTT08AS/G0F9xrhyLtepoo9EJBJ85FRSMbu1pQUlAf6A8T0tEEQGMVObWeqpjhSPXsE0VGlluFBJu2fdoTNg==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.4.tgz", + "integrity": "sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ==", "dev": true, "license": "Apache-2.0", - "optional": true + "optional": true, + "peer": true }, "node_modules/bare-path": { "version": "2.1.3", @@ -5220,19 +5436,21 @@ "dev": true, "license": "Apache-2.0", "optional": true, + "peer": true, "dependencies": { "bare-os": "^2.1.0" } }, "node_modules/bare-stream": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.1.3.tgz", - "integrity": "sha512-tiDAH9H/kP+tvNO5sczyn9ZAA7utrSMobyDchsnyyXBuUe2FSQWbxhtuHB8jwpHYYevVo2UJpcmvvjrbHboUUQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.6.1.tgz", + "integrity": "sha512-eVZbtKM+4uehzrsj49KtCy3Pbg7kO1pJ3SKZ1SFrIH/0pnj9scuGGgUlNDf/7qS8WKtGdiJY5Kyhs/ivYPTB/g==", "dev": true, "license": "Apache-2.0", "optional": true, + "peer": true, "dependencies": { - "streamx": "^2.18.0" + "streamx": "^2.21.0" } }, "node_modules/base64-js": { @@ -5256,21 +5474,14 @@ ], "license": "MIT" }, - "node_modules/base64id": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", - "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", - "dev": true, - "engines": { - "node": "^4.5.0 || >= 5.9" - } - }, "node_modules/basic-ftp": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10.0.0" } @@ -5292,5476 +5503,3944 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/bin-check": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", - "integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==", + "node_modules/big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", "dev": true, - "license": "MIT", - "dependencies": { - "execa": "^0.7.0", - "executable": "^4.1.0" - }, + "license": "Unlicense", + "optional": true, + "peer": true, "engines": { - "node": ">=4" - } - }, - "node_modules/bin-check/node_modules/cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "node": ">=0.6" } }, - "node_modules/bin-check/node_modules/execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw==", + "node_modules/binary": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", + "integrity": "sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.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" + "buffers": "~0.1.1", + "chainsaw": "~0.1.0" }, "engines": { - "node": ">=4" + "node": "*" } }, - "node_modules/bin-check/node_modules/get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "license": "MIT", + "optional": true, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/bin-check/node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } + "license": "MIT" }, - "node_modules/bin-check/node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "node_modules/bowser": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==", "dev": true, - "license": "ISC", + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/bin-check/node_modules/npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "license": "MIT", "dependencies": { - "path-key": "^2.0.0" + "fill-range": "^7.1.1" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/bin-check/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "node_modules/brotli-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/brotli-size/-/brotli-size-0.1.0.tgz", + "integrity": "sha512-5ny7BNvpe2TSmdafF1T9dnFYp3AIrJ8qJt29K0DQJzORlK38LBim/CmlY26JtreV6SWmXza7Oa+9m61SzvxR0Q==", "dev": true, "license": "MIT", + "dependencies": { + "duplexer": "^0.1.1", + "iltorb": "^2.4.3" + }, "engines": { - "node": ">=4" + "node": ">=0.12.0" } }, - "node_modules/bin-check/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, + "node_modules/browserslist": { + "version": "4.24.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.3.tgz", + "integrity": "sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==", + "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": { - "shebang-regex": "^1.0.0" + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.1" + }, + "bin": { + "browserslist": "cli.js" }, "engines": { - "node": ">=0.10.0" + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, - "node_modules/bin-check/node_modules/shebang-regex": { + "node_modules/buffer-crc32": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-1.0.0.tgz", + "integrity": "sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=8.0.0" + } + }, + "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==", + "license": "MIT" + }, + "node_modules/buffer-indexof-polyfill": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", + "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { - "node": ">=0.10.0" + "node": ">=0.10" } }, - "node_modules/bin-check/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "node_modules/buffers": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", + "integrity": "sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==", "dev": true, - "license": "ISC" + "optional": true, + "peer": true, + "engines": { + "node": ">=0.2.0" + } }, - "node_modules/bin-check/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/bundlesize": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/bundlesize/-/bundlesize-0.18.2.tgz", + "integrity": "sha512-wthRURckcAbe0Qcr7xMH8evVE/kjID8gqY0M17XJI/FVgCljLx6Ag4lIDbV76KVb2Ey5iCA4n5Fur61TEhF1JQ==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "isexe": "^2.0.0" + "axios": "^1.6.2", + "brotli-size": "0.1.0", + "bytes": "^3.1.0", + "ci-env": "^1.4.0", + "commander": "^2.20.0", + "cosmiconfig": "^5.2.1", + "github-build": "^1.2.4", + "glob": "^7.1.4", + "gzip-size": "^4.0.0", + "prettycli": "^1.4.3" }, "bin": { - "which": "bin/which" + "bundlesize": "index.js", + "bundlesize-init": "src/init-status.js", + "bundlesize-pipe": "pipe.js" } }, - "node_modules/bin-check/node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "node_modules/bundlesize/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": "ISC" + "license": "MIT" }, - "node_modules/bin-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-3.1.0.tgz", - "integrity": "sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==", + "node_modules/bundlesize/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "execa": "^1.0.0", - "find-versions": "^3.0.0" + "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" }, "engines": { - "node": ">=6" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/bin-version-check": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-4.0.0.tgz", - "integrity": "sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ==", + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, "license": "MIT", - "dependencies": { - "bin-version": "^3.0.0", - "semver": "^5.6.0", - "semver-truncate": "^1.1.2" - }, "engines": { - "node": ">=6" + "node": ">= 0.8" } }, - "node_modules/bin-version-check/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" + "license": "MIT", + "engines": { + "node": ">=8" } }, - "node_modules/bin-version/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "dev": true, "license": "MIT", "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" }, "engines": { - "node": ">=4.8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/bin-version/node_modules/execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", "dev": true, "license": "MIT", "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" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" }, "engines": { - "node": ">=6" + "node": ">= 0.4" } }, - "node_modules/bin-version/node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", "dev": true, "license": "MIT", "dependencies": { - "pump": "^3.0.0" + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" }, "engines": { - "node": ">=6" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/bin-version/node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "node_modules/caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==", "dev": true, "license": "MIT", + "dependencies": { + "callsites": "^2.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/bin-version/node_modules/npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", + "node_modules/caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==", "dev": true, "license": "MIT", "dependencies": { - "path-key": "^2.0.0" + "caller-callsite": "^2.0.0" }, "engines": { "node": ">=4" } }, - "node_modules/bin-version/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "node_modules/callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==", "dev": true, "license": "MIT", "engines": { "node": ">=4" } }, - "node_modules/bin-version/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "node_modules/caniuse-lite": { + "version": "1.0.30001690", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz", + "integrity": "sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==", + "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/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } + "license": "Apache-2.0" }, - "node_modules/bin-version/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "node_modules/chai": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", + "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==", "dev": true, "license": "MIT", "dependencies": { - "shebang-regex": "^1.0.0" + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=12" } }, - "node_modules/bin-version/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "node_modules/chainsaw": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", + "integrity": "sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==", "dev": true, - "license": "MIT", + "license": "MIT/X11", + "optional": true, + "peer": true, + "dependencies": { + "traverse": ">=0.3.0 <0.4" + }, "engines": { - "node": ">=0.10.0" + "node": "*" } }, - "node_modules/bin-version/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/bin-version/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/chalk": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, - "bin": { - "which": "bin/which" + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/bin-wrapper": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-4.1.0.tgz", - "integrity": "sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q==", + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "license": "MIT" + }, + "node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", "dev": true, "license": "MIT", - "dependencies": { - "bin-check": "^4.1.0", - "bin-version-check": "^4.0.0", - "download": "^7.1.0", - "import-lazy": "^3.1.0", - "os-filter-obj": "^2.0.0", - "pify": "^4.0.1" - }, "engines": { - "node": ">=6" + "node": ">= 16" } }, - "node_modules/bin-wrapper/node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "node_modules/check-more-types": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", "dev": true, "license": "MIT", "engines": { - "node": ">=6" + "node": ">= 0.8.0" } }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, "license": "MIT", + "optional": true, + "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" + }, "engines": { - "node": ">=8" + "node": ">= 8.10.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true, - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } + "license": "ISC" }, - "node_modules/bl/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "node_modules/chrome-remote-interface": { + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/chrome-remote-interface/-/chrome-remote-interface-0.32.2.tgz", + "integrity": "sha512-3UbFKtEmqApehPQnqdblcggx7KveQphEMKQmdJZsOguE9ylw2N2/9Z7arO7xS55+DBJ/hyP8RrayLt4MMdJvQg==", "dev": true, "license": "MIT", "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "commander": "2.11.x", + "ws": "^7.2.0" }, - "engines": { - "node": ">= 6" + "bin": { + "chrome-remote-interface": "bin/client.js" } }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "node_modules/chrome-remote-interface/node_modules/commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", "dev": true, "license": "MIT" }, - "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "node_modules/chrome-remote-interface/node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "dev": true, - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, + "license": "MIT", "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/chromium-bidi": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.5.8.tgz", + "integrity": "sha512-blqh+1cEQbHBKmok3rVJkBlBxt9beKBgOsxbFgs7UJcoVbbeZ+K7+6liAsjgpc8l1Xd55cQUy14fXZdGSb4zIw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", + "optional": true, + "peer": true, "dependencies": { - "ms": "2.0.0" + "mitt": "3.0.1", + "urlpattern-polyfill": "10.0.0" + }, + "peerDependencies": { + "devtools-protocol": "*" } }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "node_modules/ci-env": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/ci-env/-/ci-env-1.17.0.tgz", + "integrity": "sha512-NtTjhgSEqv4Aj90TUYHQLxHdnCPXnjdtuGG1X8lTfp/JqeXTdw0FTWl/vUAPuvbWZTF8QVpv6ASe/XacE+7R2A==", "dev": true, "license": "MIT" }, - "node_modules/boolean": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", - "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", + "node_modules/ci-info": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", "dev": true, "license": "MIT" }, - "node_modules/bowser": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", - "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==", + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "engines": { + "node": ">=6" } }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", "dev": true, "license": "MIT", "dependencies": { - "fill-range": "^7.1.1" + "restore-cursor": "^5.0.0" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/brotli-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/brotli-size/-/brotli-size-0.1.0.tgz", - "integrity": "sha512-5ny7BNvpe2TSmdafF1T9dnFYp3AIrJ8qJt29K0DQJzORlK38LBim/CmlY26JtreV6SWmXza7Oa+9m61SzvxR0Q==", + "node_modules/cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", "dev": true, "license": "MIT", "dependencies": { - "duplexer": "^0.1.1", - "iltorb": "^2.4.3" + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" }, "engines": { - "node": ">=0.12.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/browserslist": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", - "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", - "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" - } - ], + "node_modules/cli-truncate/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001669", - "electron-to-chromium": "^1.5.41", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.1" + "engines": { + "node": ">=12" }, - "bin": { - "browserslist": "cli.js" + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/cli-truncate/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true, + "license": "MIT" + }, + "node_modules/cli-truncate/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": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "node_modules/cli-truncate/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "license": "MIT", "dependencies": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true, - "license": "MIT" - }, - "node_modules/buffer-crc32": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-1.0.0.tgz", - "integrity": "sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==", - "dev": true, - "license": "MIT", + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "license": "ISC", "engines": { - "node": ">=8.0.0" + "node": ">= 12" } }, - "node_modules/buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==", - "dev": true, - "license": "MIT" - }, - "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==", - "license": "MIT" - }, - "node_modules/bundlesize": { - "version": "0.18.2", - "resolved": "https://registry.npmjs.org/bundlesize/-/bundlesize-0.18.2.tgz", - "integrity": "sha512-wthRURckcAbe0Qcr7xMH8evVE/kjID8gqY0M17XJI/FVgCljLx6Ag4lIDbV76KVb2Ey5iCA4n5Fur61TEhF1JQ==", + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "axios": "^1.6.2", - "brotli-size": "0.1.0", - "bytes": "^3.1.0", - "ci-env": "^1.4.0", - "commander": "^2.20.0", - "cosmiconfig": "^5.2.1", - "github-build": "^1.2.4", - "glob": "^7.1.4", - "gzip-size": "^4.0.0", - "prettycli": "^1.4.3" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, - "bin": { - "bundlesize": "index.js", - "bundlesize-init": "src/init-status.js", - "bundlesize-pipe": "pipe.js" + "engines": { + "node": ">=12" } }, - "node_modules/bundlesize/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/bundlesize/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "ISC", + "license": "MIT", "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" + "color-convert": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "node_modules/cliui/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, "engines": { - "node": ">= 0.8" + "node": ">=7.0.0" } }, - "node_modules/cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "node_modules/cliui/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", "engines": { - "node": ">=10.6.0" + "node": ">=8" } }, - "node_modules/cacheable-request": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", - "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" } }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "license": "MIT", "dependencies": { - "pump": "^3.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", "dev": true, "license": "MIT", - "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" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==", + "node_modules/coffeescript": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.7.0.tgz", + "integrity": "sha512-hzWp6TUE2d/jCcN67LrW1eh5b/rSDKQK6oD6VMLlggYVUUFexgTH9z3dNYihzX4RMhze5FTUsUmOXViJKFQR/A==", "dev": true, "license": "MIT", - "dependencies": { - "callsites": "^2.0.0" + "bin": { + "cake": "bin/cake", + "coffee": "bin/coffee" }, "engines": { - "node": ">=4" + "node": ">=6" } }, - "node_modules/caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==", + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "license": "MIT", "dependencies": { - "caller-callsite": "^2.0.0" - }, - "engines": { - "node": ">=4" + "color-name": "1.1.3" } }, - "node_modules/callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ==", + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true, - "engines": { - "node": "*" - } + "license": "MIT" }, - "node_modules/callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==", + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, "engines": { - "node": ">=4" + "node": ">= 0.8" } }, - "node_modules/camel-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", - "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", - "dev": true, + "node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "license": "MIT", - "dependencies": { - "pascal-case": "^3.1.2", - "tslib": "^2.0.3" + "engines": { + "node": ">=18" } }, - "node_modules/caniuse-lite": { - "version": "1.0.30001673", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001673.tgz", - "integrity": "sha512-WTrjUCSMp3LYX0nE12ECkV0a+e6LC85E0Auz75555/qr78Oc8YWhEPNfDd6SHdtlCMSzqtuXY0uyEMNRcsKpKw==", + "node_modules/commenting": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/commenting/-/commenting-1.1.0.tgz", + "integrity": "sha512-YeNK4tavZwtH7jEgK1ZINXzLKm6DZdEMfsaaieOsCAN0S8vsY7UeuO3Q7d/M018EFgE+IeUAuBOKkFccBZsUZA==", + "license": "MIT" + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "license": "MIT" + }, + "node_modules/compress-commons": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-6.0.2.tgz", + "integrity": "sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "crc-32": "^1.2.0", + "crc32-stream": "^6.0.0", + "is-stream": "^2.0.1", + "normalize-path": "^3.0.0", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/compress-commons/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, "funding": [ { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" + "type": "github", + "url": "https://github.com/sponsors/feross" }, { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + "type": "patreon", + "url": "https://www.patreon.com/feross" }, { - "type": "github", - "url": "https://github.com/sponsors/ai" + "type": "consulting", + "url": "https://feross.org/support" } ], - "license": "CC-BY-4.0" - }, - "node_modules/capital-case": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz", - "integrity": "sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==", - "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" } }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/caw": { + "node_modules/compress-commons/node_modules/is-stream": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", - "integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, "license": "MIT", - "dependencies": { - "get-proxy": "^2.0.0", - "isurl": "^1.0.0-alpha5", - "tunnel-agent": "^0.6.0", - "url-to-options": "^1.0.1" - }, + "optional": true, + "peer": true, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/chai": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", - "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==", + "node_modules/compress-commons/node_modules/readable-stream": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.6.0.tgz", + "integrity": "sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "assertion-error": "^2.0.1", - "check-error": "^2.1.1", - "deep-eql": "^5.0.1", - "loupe": "^3.1.0", - "pathval": "^2.0.0" + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" }, "engines": { - "node": ">=12" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "node_modules/compress-commons/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } + "optional": true, + "peer": true }, - "node_modules/change-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-4.1.2.tgz", - "integrity": "sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==", + "node_modules/compress-commons/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "camel-case": "^4.1.2", - "capital-case": "^1.0.4", - "constant-case": "^3.0.4", - "dot-case": "^3.0.4", - "header-case": "^2.0.4", - "no-case": "^3.0.4", - "param-case": "^3.0.4", - "pascal-case": "^3.1.2", - "path-case": "^3.0.4", - "sentence-case": "^3.0.4", - "snake-case": "^3.0.4", - "tslib": "^2.0.3" + "safe-buffer": "~5.2.0" } }, - "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "license": "MIT" }, - "node_modules/check-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", - "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "node_modules/concurrently": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.1.2.tgz", + "integrity": "sha512-H9MWcoPsYddwbOGM6difjVwVZHl63nwMEwDJG/L7VGtuaJhb12h2caPG2tVPWs7emuYix252iGfqOyrz1GczTQ==", "dev": true, "license": "MIT", + "dependencies": { + "chalk": "^4.1.2", + "lodash": "^4.17.21", + "rxjs": "^7.8.1", + "shell-quote": "^1.8.1", + "supports-color": "^8.1.1", + "tree-kill": "^1.2.2", + "yargs": "^17.7.2" + }, + "bin": { + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" + }, "engines": { - "node": ">= 16" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" } }, - "node_modules/check-more-types": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", - "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", + "node_modules/concurrently/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": ">= 0.8.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "node_modules/concurrently/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "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" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">= 8.10.0" + "node": ">=10" }, "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "node_modules/concurrently/node_modules/chalk/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": "ISC" + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } }, - "node_modules/chrome-remote-interface": { - "version": "0.32.2", - "resolved": "https://registry.npmjs.org/chrome-remote-interface/-/chrome-remote-interface-0.32.2.tgz", - "integrity": "sha512-3UbFKtEmqApehPQnqdblcggx7KveQphEMKQmdJZsOguE9ylw2N2/9Z7arO7xS55+DBJ/hyP8RrayLt4MMdJvQg==", + "node_modules/concurrently/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "license": "MIT", "dependencies": { - "commander": "2.11.x", - "ws": "^7.2.0" + "color-name": "~1.1.4" }, - "bin": { - "chrome-remote-interface": "bin/client.js" + "engines": { + "node": ">=7.0.0" } }, - "node_modules/chrome-remote-interface/node_modules/commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "node_modules/concurrently/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, "license": "MIT" }, - "node_modules/chrome-remote-interface/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/chromium-bidi": { - "version": "0.4.16", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.16.tgz", - "integrity": "sha512-7ZbXdWERxRxSwo3txsBjjmc/NLxqb1Bk30mRb0BMS4YIaiV6zvKZqL/UAH+DdqcDYayDWk2n/y8klkBDODrPvA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "mitt": "3.0.0" - }, - "peerDependencies": { - "devtools-protocol": "*" - } - }, - "node_modules/ci-env": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/ci-env/-/ci-env-1.17.0.tgz", - "integrity": "sha512-NtTjhgSEqv4Aj90TUYHQLxHdnCPXnjdtuGG1X8lTfp/JqeXTdw0FTWl/vUAPuvbWZTF8QVpv6ASe/XacE+7R2A==", + "node_modules/confusing-browser-globals": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", "dev": true, "license": "MIT" }, - "node_modules/ci-info": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true, + "license": "ISC" + }, + "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==", "license": "MIT" }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "dev": true, "license": "MIT", "engines": { - "node": ">=6" + "node": ">= 0.6" } }, - "node_modules/cli-cursor": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", - "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", - "dev": true, + "node_modules/core-js-compat": { + "version": "3.39.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.39.0.tgz", + "integrity": "sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==", "license": "MIT", "dependencies": { - "restore-cursor": "^5.0.0" - }, - "engines": { - "node": ">=18" + "browserslist": "^4.24.2" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/core-js" } }, - "node_modules/cli-truncate": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", - "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", "dev": true, "license": "MIT", "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^7.0.0" + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" }, "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, - "node_modules/cli-truncate/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" + "license": "Apache-2.0", + "optional": true, + "peer": true, + "bin": { + "crc32": "bin/crc32.njs" }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "engines": { + "node": ">=0.8" } }, - "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", - "dev": true, - "license": "MIT" - }, - "node_modules/cli-truncate/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==", + "node_modules/crc32-stream": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-6.0.0.tgz", + "integrity": "sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" + "crc-32": "^1.2.0", + "readable-stream": "^4.0.0" }, "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 14" } }, - "node_modules/cli-truncate/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "node_modules/crc32-stream/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/cli-width": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", - "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", - "license": "ISC", - "engines": { - "node": ">= 12" + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" } }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "node_modules/crc32-stream/node_modules/readable-stream": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.6.0.tgz", + "integrity": "sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw==", "dev": true, - "license": "ISC", + "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" }, "engines": { - "node": ">=12" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/crc32-stream/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/crc32-stream/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "safe-buffer": "~5.2.0" } }, - "node_modules/cliui/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", "dependencies": { - "color-name": "~1.1.4" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=7.0.0" + "node": ">= 8" } }, - "node_modules/cliui/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "node_modules/crypto-md5": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/crypto-md5/-/crypto-md5-1.0.0.tgz", + "integrity": "sha512-65Mtei8+EkSIK+5Ie4gpWXoJ/5bgpqPXFknHHXAyhDqKsEAAzUslGd8mOeawbfcuQ8fADNKcF4xQA3fqlZJ8Ig==", + "dev": true, + "license": "BSD", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.5.2" + } + }, + "node_modules/css-shorthand-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/css-shorthand-properties/-/css-shorthand-properties-1.1.2.tgz", + "integrity": "sha512-C2AugXIpRGQTxaCW0N7n5jD/p5irUmCrwl03TrnMFBHDbdq44CFWR2zO7rK9xPN4Eo3pUxC4vQzQgbIpzrD1PQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/css-value": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/css-value/-/css-value-0.0.1.tgz", + "integrity": "sha512-FUV3xaJ63buRLgHrLQVlVgQnQdR4yqdLGaDu7g8CQcWjInDfM9plBTPI9FRfpahju1UBSaMckeb2/46ApS/V1Q==", "dev": true, + "optional": true, + "peer": true + }, + "node_modules/css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", "license": "MIT" }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "node_modules/cssstyle": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.1.0.tgz", + "integrity": "sha512-h66W1URKpBS5YMI/V8PyXvTMFT8SupJ1IzoIV8IeBC/ji8WVmrO8dGlTi+2dh6whmdk6BiKJLD/ZBkhWbcg6nA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "rrweb-cssom": "^0.7.1" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=18" } }, - "node_modules/clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, "license": "MIT", "dependencies": { - "mimic-response": "^1.0.0" + "assert-plus": "^1.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", - "dev": true, - "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=0.10" } }, - "node_modules/coffeescript": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.7.0.tgz", - "integrity": "sha512-hzWp6TUE2d/jCcN67LrW1eh5b/rSDKQK6oD6VMLlggYVUUFexgTH9z3dNYihzX4RMhze5FTUsUmOXViJKFQR/A==", + "node_modules/data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", "dev": true, "license": "MIT", - "bin": { - "cake": "bin/cake", - "coffee": "bin/coffee" - }, + "optional": true, + "peer": true, "engines": { - "node": ">=6" + "node": ">= 14" } }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/data-urls": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "color-name": "1.1.3" + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" + }, + "engines": { + "node": ">=18" } }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "node_modules/data-urls/node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { - "node": ">=0.1.90" + "node": ">=18" } }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "node_modules/data-view-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", "dev": true, "license": "MIT", "dependencies": { - "delayed-stream": "~1.0.0" + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "node_modules/data-view-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", + "dev": true, "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, "engines": { - "node": ">=18" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/inspect-js" } }, - "node_modules/commenting": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/commenting/-/commenting-1.1.0.tgz", - "integrity": "sha512-YeNK4tavZwtH7jEgK1ZINXzLKm6DZdEMfsaaieOsCAN0S8vsY7UeuO3Q7d/M018EFgE+IeUAuBOKkFccBZsUZA==", - "license": "MIT" - }, - "node_modules/commondir": { + "node_modules/data-view-byte-offset": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "license": "MIT" - }, - "node_modules/compress-commons": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-6.0.2.tgz", - "integrity": "sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", "dev": true, "license": "MIT", "dependencies": { - "crc-32": "^1.2.0", - "crc32-stream": "^6.0.0", - "is-stream": "^2.0.1", - "normalize-path": "^3.0.0", - "readable-stream": "^4.0.0" + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" }, "engines": { - "node": ">= 14" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/compress-commons/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "node_modules/date-fns": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", + "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" + } + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "license": "MIT", "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/compress-commons/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "node_modules/decamelize": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz", + "integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/compress-commons/node_modules/readable-stream": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", - "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" + "mimic-response": "^3.1.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/compress-commons/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dedent": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.4.0.tgz", + "integrity": "sha512-25DJIXD6mCqYHIqI3/aBfAvFgJSY9jIx397eUQSofXbWVR4lcB21a17qQ5Bswj0Zv+3Nf06zNCyfkGyvo0AqqQ==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "license": "MIT" }, - "node_modules/compress-commons/node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", "dev": true, "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" + "engines": { + "node": ">=6" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "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==", "license": "MIT" }, - "node_modules/concurrently": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.1.0.tgz", - "integrity": "sha512-VxkzwMAn4LP7WyMnJNbHN5mKV9L2IbyDjpzemKr99sXNR3GqRNMMHdm7prV1ws9wg7ETj6WUkNOigZVsptwbgg==", + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/deepmerge-ts": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-5.1.0.tgz", + "integrity": "sha512-eS8dRJOckyo9maw9Tu5O5RUi/4inFLrnoLkBe3cPfDMx3WZioXtmOew4TXQaxq7Rhl4xjDtR7c6x8nNTxOvbFw==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "peer": true, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", "dev": true, "license": "MIT", - "dependencies": { - "chalk": "^4.1.2", - "lodash": "^4.17.21", - "rxjs": "^7.8.1", - "shell-quote": "^1.8.1", - "supports-color": "^8.1.1", - "tree-kill": "^1.2.2", - "yargs": "^17.7.2" - }, - "bin": { - "conc": "dist/bin/concurrently.js", - "concurrently": "dist/bin/concurrently.js" - }, + "optional": true, + "peer": true, "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + "node": ">=10" } }, - "node_modules/concurrently/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { - "node": ">=8" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/concurrently/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/concurrently/node_modules/chalk/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==", + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "has-flag": "^4.0.0" + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" }, "engines": { - "node": ">=8" + "node": ">= 14" } }, - "node_modules/concurrently/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/del": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha512-7yjqSoVSlJzA4t/VUwazuEagGeANEKB3f/aNI//06pfKgwoCb7f6Q1gETN1sZzYaj6chTQ0AhIwDiPdfOjko4A==", "dev": true, "license": "MIT", "dependencies": { - "color-name": "~1.1.4" + "globby": "^6.1.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "p-map": "^1.1.1", + "pify": "^3.0.0", + "rimraf": "^2.2.8" }, "engines": { - "node": ">=7.0.0" + "node": ">=4" } }, - "node_modules/concurrently/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "node_modules/del/node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", "dev": true, "license": "MIT", "dependencies": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/confusing-browser-globals": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", - "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", - "dev": true, - "license": "MIT" - }, - "node_modules/connect": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", - "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "node_modules/del/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "debug": "2.6.9", - "finalhandler": "1.1.2", - "parseurl": "~1.3.3", - "utils-merge": "1.0.1" + "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" }, "engines": { - "node": ">= 0.10.0" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/connect/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/del/node_modules/globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.0.0" + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/connect/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/console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "node_modules/del/node_modules/globby/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true, - "license": "ISC" + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/constant-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz", - "integrity": "sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==", + "node_modules/del/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case": "^2.0.2" + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" } }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, "engines": { - "node": ">= 0.6" + "node": ">=0.4.0" } }, - "node_modules/content-disposition/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "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==", "license": "MIT" }, - "node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "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": ">= 0.6" + "node": ">=6" } }, - "node_modules/core-js": { - "version": "3.37.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.1.tgz", - "integrity": "sha512-Xn6qmxrQZyB0FFY8E3bgRXei3lWDJHhvI+u0q9TKIYM49G8pAr0FgnnrFRAmsbptZL1yxRADVXn+x5AGsbBfyw==", + "node_modules/des.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", + "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", "dev": true, - "hasInstallScript": true, "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, - "node_modules/core-js-compat": { - "version": "3.38.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.1.tgz", - "integrity": "sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==", - "license": "MIT", - "dependencies": { - "browserslist": "^4.23.3" + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "detect-libc": "bin/detect-libc.js" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" + "engines": { + "node": ">=0.10" } }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "node_modules/device-specs": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/device-specs/-/device-specs-1.0.1.tgz", + "integrity": "sha512-rxns/NDZfbdYumnn801z9uo8kWIz3Eld7Bk/F0V9zw4sZemSoD93+gxHEonLdxYulkws4iCMt7ZP8zuM8EzUSg==", "dev": true, "license": "MIT" }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "node_modules/devtools-protocol": { + "version": "0.0.1109433", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1109433.tgz", + "integrity": "sha512-w1Eqih66egbSr2eOoGZ+NsdF7HdxmKDo3pKFBySEGsmVvwWWNXzNCDcKrbFnd23Jf7kH1M806OfelXwu+Jk11g==", "dev": true, - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, + "license": "BSD-3-Clause" + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", "engines": { - "node": ">= 0.10" + "node": ">=0.3.1" } }, - "node_modules/cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "license": "MIT", "dependencies": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" + "path-type": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", - "dev": true, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "license": "Apache-2.0", - "bin": { - "crc32": "bin/crc32.njs" + "dependencies": { + "esutils": "^2.0.2" }, "engines": { - "node": ">=0.8" + "node": ">=6.0.0" } }, - "node_modules/crc32-stream": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-6.0.0.tgz", - "integrity": "sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==", + "node_modules/dom-accessibility-api": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", "dev": true, - "license": "MIT", - "dependencies": { - "crc-32": "^1.2.0", - "readable-stream": "^4.0.0" - }, - "engines": { - "node": ">= 14" - } + "license": "MIT" }, - "node_modules/crc32-stream/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" } }, - "node_modules/crc32-stream/node_modules/readable-stream": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", - "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "dev": true, "license": "MIT", "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">= 0.4" } }, - "node_modules/crc32-stream/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "license": "MIT" }, - "node_modules/crc32-stream/node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "node_modules/duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", + "optional": true, + "peer": true, "dependencies": { - "safe-buffer": "~5.2.0" + "readable-stream": "^2.0.2" } }, - "node_modules/cross-fetch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", - "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, "license": "MIT", "dependencies": { - "node-fetch": "^2.6.12" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "node_modules/edge-paths": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/edge-paths/-/edge-paths-3.0.5.tgz", + "integrity": "sha512-sB7vSrDnFa4ezWQk9nZ/n0FdpdUuC6R1EOrlU3DL+bovcNFK28rqu2emmAUjujYEJTWIgQGqgVVWUZXMnc8iWg==", + "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "@types/which": "^2.0.1", + "which": "^2.0.2" }, "engines": { - "node": ">= 8" + "node": ">=14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/shirshak55" } }, - "node_modules/crypto-md5": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-md5/-/crypto-md5-1.0.0.tgz", - "integrity": "sha512-65Mtei8+EkSIK+5Ie4gpWXoJ/5bgpqPXFknHHXAyhDqKsEAAzUslGd8mOeawbfcuQ8fADNKcF4xQA3fqlZJ8Ig==", + "node_modules/edgedriver": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-5.6.1.tgz", + "integrity": "sha512-3Ve9cd5ziLByUdigw6zovVeWJjVs8QHVmqOB0sJ0WNeVPcwf4p18GnxMmVvlFmYRloUwf5suNuorea4QzwBIOA==", "dev": true, - "license": "BSD", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.5.2" - } - }, - "node_modules/css-shorthand-properties": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/css-shorthand-properties/-/css-shorthand-properties-1.1.1.tgz", - "integrity": "sha512-Md+Juc7M3uOdbAFwOYlTrccIZ7oCFuzrhKYQjdeUEW/sE1hv17Jp/Bws+ReOPpGVBTYCBoYo+G17V5Qo8QQ75A==", - "dev": true - }, - "node_modules/css-value": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/css-value/-/css-value-0.0.1.tgz", - "integrity": "sha512-FUV3xaJ63buRLgHrLQVlVgQnQdR4yqdLGaDu7g8CQcWjInDfM9plBTPI9FRfpahju1UBSaMckeb2/46ApS/V1Q==", - "dev": true - }, - "node_modules/css.escape": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", - "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", - "license": "MIT" - }, - "node_modules/custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", - "dev": true, - "license": "MIT" + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@wdio/logger": "^8.38.0", + "@zip.js/zip.js": "^2.7.48", + "decamelize": "^6.0.0", + "edge-paths": "^3.0.5", + "fast-xml-parser": "^4.4.1", + "node-fetch": "^3.3.2", + "which": "^4.0.0" + }, + "bin": { + "edgedriver": "bin/edgedriver.js" + } }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "node_modules/edgedriver/node_modules/@wdio/logger": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-8.38.0.tgz", + "integrity": "sha512-kcHL86RmNbcQP+Gq/vQUGlArfU6IIcbbnNp32rRIraitomZow+iEoc519rdQmSVusDozMS5DZthkgDdxK+vz6Q==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "assert-plus": "^1.0.0" + "chalk": "^5.1.2", + "loglevel": "^1.6.0", + "loglevel-plugin-prefix": "^0.8.4", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=0.10" + "node": "^16.13 || >=18" } }, - "node_modules/data-uri-to-buffer": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", - "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "node_modules/edgedriver/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { - "node": ">= 14" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "node_modules/edgedriver/node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, + "optional": true, + "peer": true, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 12" } }, - "node_modules/data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "node_modules/edgedriver/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "license": "ISC", + "optional": true, + "peer": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/edgedriver/node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" }, "engines": { - "node": ">= 0.4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" } }, - "node_modules/data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "node_modules/edgedriver/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/date-fns": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", - "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", + "node_modules/edgedriver/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/kossnocorp" + "license": "ISC", + "optional": true, + "peer": true, + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" } }, - "node_modules/date-format": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", - "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", + "node_modules/electron-to-chromium": { + "version": "1.5.77", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.77.tgz", + "integrity": "sha512-AnJSrt5JpRVgY6dgd5yccguLc5A7oMSF0Kt3fcW+Hp5WTuFbl5upeSFZbMZYy2o7jhmIhU8Ekrd82GhyXUqUUg==", + "license": "ISC" + }, + "node_modules/elegant-spinner": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", + "integrity": "sha512-B+ZM+RXvRqQaAmkMlO/oSe5nMUOaUnyfGYCEHoR8wrXsZR2mA0XVibsxV1bvTwxdRWah1PkQqso2EzhILGHtEQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=4.0" + "node": ">=0.10.0" } }, - "node_modules/debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", + "node_modules/email-validator": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/email-validator/-/email-validator-2.0.4.tgz", + "integrity": "sha512-gYCwo7kh5S3IDyZPLZf6hSS0MnZT8QmJFqYvbqlDZSbwdZlY6QZWxJ4i/6UhITOJ4XzyI647Bm2MXKCLqnJ4nQ==", "dev": true, - "license": "MIT" - }, - "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">4.0" } }, - "node_modules/debug/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==", - "license": "MIT" - }, - "node_modules/decamelize": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz", - "integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==", + "node_modules/emittery": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.4.1.tgz", + "integrity": "sha512-r4eRSeStEGf6M5SKdrQhhLK5bOwOBxQhIE3YSTnZE3GpKiLfnnhE+tPtrJE79+eDJgm39BM6LSoI8SCx4HbwlQ==", "dev": true, "license": "MIT", "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10" - } + "license": "MIT" }, - "node_modules/decompress": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", - "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "license": "MIT", "dependencies": { - "decompress-tar": "^4.0.0", - "decompress-tarbz2": "^4.0.0", - "decompress-targz": "^4.0.0", - "decompress-unzip": "^4.0.1", - "graceful-fs": "^4.1.10", - "make-dir": "^1.0.0", - "pify": "^2.3.0", - "strip-dirs": "^2.0.0" - }, - "engines": { - "node": ">=4" + "once": "^1.4.0" } }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "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": "MIT", - "dependencies": { - "mimic-response": "^3.1.0" - }, + "license": "BSD-2-Clause", "engines": { - "node": ">=10" + "node": ">=0.12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", "dev": true, "license": "MIT", "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/decompress-tar": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", - "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "license": "MIT", "dependencies": { - "file-type": "^5.2.0", - "is-stream": "^1.1.0", - "tar-stream": "^1.5.2" - }, - "engines": { - "node": ">=4" + "is-arrayish": "^0.2.1" } }, - "node_modules/decompress-tar/node_modules/file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==", + "node_modules/error-stack-parser": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz", + "integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">=4" + "dependencies": { + "stackframe": "^1.3.4" } }, - "node_modules/decompress-tar/node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decompress-tarbz2": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", - "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "node_modules/es-abstract": { + "version": "1.23.9", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", + "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", "dev": true, "license": "MIT", "dependencies": { - "decompress-tar": "^4.1.0", - "file-type": "^6.1.0", - "is-stream": "^1.1.0", - "seek-bzip": "^1.0.5", - "unbzip2-stream": "^1.0.9" + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.0", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.2", + "is-regex": "^1.2.1", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.0", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.3", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.18" }, "engines": { - "node": ">=4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/decompress-tarbz2/node_modules/file-type": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", - "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">= 0.4" } }, - "node_modules/decompress-tarbz2/node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "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.10.0" + "node": ">= 0.4" } }, - "node_modules/decompress-targz": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", - "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "node_modules/es-module-lexer": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz", + "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", "dev": true, "license": "MIT", "dependencies": { - "decompress-tar": "^4.1.1", - "file-type": "^5.2.0", - "is-stream": "^1.1.0" + "es-errors": "^1.3.0" }, "engines": { - "node": ">=4" + "node": ">= 0.4" } }, - "node_modules/decompress-targz/node_modules/file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==", + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", "dev": true, "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, "engines": { - "node": ">=4" + "node": ">= 0.4" } }, - "node_modules/decompress-targz/node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, "license": "MIT", - "engines": { - "node": ">=0.10.0" + "dependencies": { + "hasown": "^2.0.0" } }, - "node_modules/decompress-unzip": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", - "integrity": "sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw==", + "node_modules/es-to-primitive": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", "dev": true, "license": "MIT", "dependencies": { - "file-type": "^3.8.0", - "get-stream": "^2.2.0", - "pify": "^2.3.0", - "yauzl": "^2.4.2" + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" }, "engines": { - "node": ">=4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/decompress-unzip/node_modules/file-type": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", - "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "dev": true, + "hasInstallScript": true, "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, "engines": { - "node": ">=0.10.0" + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" } }, - "node_modules/decompress-unzip/node_modules/get-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", - "integrity": "sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA==", - "dev": true, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "license": "MIT", - "dependencies": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/decompress-unzip/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, + "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==", "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/decompress/node_modules/make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", + "optional": true, + "peer": true, "dependencies": { - "pify": "^3.0.0" + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" }, "engines": { - "node": ">=4" + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" } }, - "node_modules/decompress/node_modules/make-dir/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "node_modules/escodegen/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", + "optional": true, + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/decompress/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "node_modules/eslint-config-airbnb-base": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", "dev": true, "license": "MIT", + "dependencies": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5", + "semver": "^6.3.0" + }, "engines": { - "node": ">=0.10.0" + "node": "^10.12.0 || >=12.0.0" + }, + "peerDependencies": { + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.2" } }, - "node_modules/dedent": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.4.0.tgz", - "integrity": "sha512-25DJIXD6mCqYHIqI3/aBfAvFgJSY9jIx397eUQSofXbWVR4lcB21a17qQ5Bswj0Zv+3Nf06zNCyfkGyvo0AqqQ==", + "node_modules/eslint-config-airbnb-base/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "license": "MIT" + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } }, - "node_modules/deep-eql": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", - "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "license": "MIT", - "engines": { - "node": ">=6" + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" } }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, "license": "MIT", - "engines": { - "node": ">=4.0.0" + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" } }, - "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==", - "license": "MIT" - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/deepmerge-ts": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-5.1.0.tgz", - "integrity": "sha512-eS8dRJOckyo9maw9Tu5O5RUi/4inFLrnoLkBe3cPfDMx3WZioXtmOew4TXQaxq7Rhl4xjDtR7c6x8nNTxOvbFw==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">=10" + "dependencies": { + "ms": "^2.1.1" } }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "node_modules/eslint-module-utils": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", + "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", "dev": true, "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" + "debug": "^3.2.7" }, "engines": { - "node": ">= 0.4" + "node": ">=4" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "license": "MIT", "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "ms": "^2.1.1" } }, - "node_modules/degenerator": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", - "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "node_modules/eslint-plugin-ban": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-ban/-/eslint-plugin-ban-1.6.0.tgz", + "integrity": "sha512-gZptoV+SFHOHO57/5lmPvizMvSXrjFatP9qlVQf3meL/WHo9TxSoERygrMlESl19CPh95U86asTxohT8OprwDw==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "ast-types": "^0.13.4", - "escodegen": "^2.1.0", - "esprima": "^4.0.1" + "requireindex": "~1.2.0" }, "engines": { - "node": ">= 14" + "node": ">=0.10.0" } }, - "node_modules/del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha512-7yjqSoVSlJzA4t/VUwazuEagGeANEKB3f/aNI//06pfKgwoCb7f6Q1gETN1sZzYaj6chTQ0AhIwDiPdfOjko4A==", + "node_modules/eslint-plugin-import": { + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", + "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", "dev": true, "license": "MIT", "dependencies": { - "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.12.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", + "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.8", + "tsconfig-paths": "^3.15.0" }, "engines": { "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" } }, - "node_modules/del/node_modules/array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "license": "MIT", "dependencies": { - "array-uniq": "^1.0.1" + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/del/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "license": "ISC", - "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" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/del/node_modules/globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==", + "node_modules/eslint-plugin-prettier": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", + "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", "dev": true, "license": "MIT", "dependencies": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" }, "engines": { - "node": ">=0.10.0" + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } } }, - "node_modules/del/node_modules/globby/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "node_modules/eslint-plugin-testcafe": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-testcafe/-/eslint-plugin-testcafe-0.2.1.tgz", + "integrity": "sha512-LZMHQ2kHFXzbt6ZSS2yUOQhr8QaHwaqvmra1EnXKK0qEwpAvegLdjntCbRPtuD6bDGxPFG87Y7mkI3S9TjZA4A==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } + "license": "MIT" }, - "node_modules/del/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", + "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==", + "license": "BSD-2-Clause", "dependencies": { - "glob": "^7.1.3" + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" }, - "bin": { - "rimraf": "bin.js" + "engines": { + "node": ">=8.0.0" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "license": "MIT", + "node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "license": "Apache-2.0", "engines": { - "node": ">=0.4.0" + "node": ">=10" } }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, + "node_modules/eslint/node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "license": "MIT", "engines": { - "node": ">= 0.8" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": ">=6" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/des.js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", - "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", - "dev": true, + "node_modules/eslint/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==", + "license": "Python-2.0" + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "license": "MIT", "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/desired-capabilities": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/desired-capabilities/-/desired-capabilities-0.1.0.tgz", - "integrity": "sha512-MNcwZi1elX2YXbTUfs1R6A6RD5Ns3loTljRBu6FGNHY3LPFLVHzTg2tNLlZEpWVZdHQ0cVeQRHrCBdrnW/n1wA==", - "dev": true, - "license": "CC0", + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", "dependencies": { - "extend": "^3.0.0" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, - "license": "MIT", + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "dev": true, + "node_modules/eslint/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==", "license": "Apache-2.0", - "bin": { - "detect-libc": "bin/detect-libc.js" - }, "engines": { - "node": ">=0.10" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/detect-node": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", - "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", - "dev": true, - "license": "MIT" - }, - "node_modules/device-specs": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/device-specs/-/device-specs-1.0.1.tgz", - "integrity": "sha512-rxns/NDZfbdYumnn801z9uo8kWIz3Eld7Bk/F0V9zw4sZemSoD93+gxHEonLdxYulkws4iCMt7ZP8zuM8EzUSg==", - "dev": true, - "license": "MIT" - }, - "node_modules/devtools-protocol": { - "version": "0.0.1302984", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1302984.tgz", - "integrity": "sha512-Rgh2Sk5fUSCtEx4QGH9iwTyECdFPySG2nlz5J8guGh2Wlha6uzSOCq/DCEC8faHlLaMPZJMuZ4ovgcX4LvOkKA==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/di": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", - "integrity": "sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==", - "dev": true, - "license": "MIT" + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "license": "BSD-3-Clause", + "node_modules/eslint/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==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, "engines": { - "node": ">=0.3.1" + "node": ">=10.13.0" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, + "node_modules/eslint/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "license": "MIT", "dependencies": { - "path-type": "^4.0.0" + "type-fest": "^0.20.2" }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "license": "Apache-2.0", + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", "dependencies": { - "esutils": "^2.0.2" + "argparse": "^2.0.1" }, - "engines": { - "node": ">=6.0.0" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/dom-serialize": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", - "integrity": "sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==", - "dev": true, + "node_modules/eslint/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==", "license": "MIT", "dependencies": { - "custom-event": "~1.0.0", - "ent": "~2.2.0", - "extend": "^3.0.0", - "void-elements": "^2.0.0" + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/dot-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", - "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/esotope-hammerhead": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/esotope-hammerhead/-/esotope-hammerhead-0.6.8.tgz", + "integrity": "sha512-2Zhg0c6NfrNA4QT5s4+QG5WJQtq3Se7GonNwtNwfr7sVIo/7L8rirPfh9yyloEmDA7R0yPgD10teFxhf2vWyIw==", "dev": true, "license": "MIT", "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" + "@types/estree": "0.0.46" } }, - "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "node_modules/esotope-hammerhead/node_modules/@types/estree": { + "version": "0.0.46", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.46.tgz", + "integrity": "sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg==", "dev": true, + "license": "MIT" + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, "engines": { - "node": ">=12" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://dotenvx.com" + "url": "https://opencollective.com/eslint" } }, - "node_modules/download": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/download/-/download-7.1.0.tgz", - "integrity": "sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "archive-type": "^4.0.0", - "caw": "^2.0.1", - "content-disposition": "^0.5.2", - "decompress": "^4.2.0", - "ext-name": "^5.0.0", - "file-type": "^8.1.0", - "filenamify": "^2.0.0", - "get-stream": "^3.0.0", - "got": "^8.3.1", - "make-dir": "^1.2.0", - "p-event": "^2.1.0", - "pify": "^3.0.0" - }, + "node_modules/espree/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==", + "license": "Apache-2.0", "engines": { - "node": ">=6" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/download/node_modules/@sindresorhus/is": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", - "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, "engines": { "node": ">=4" } }, - "node_modules/download/node_modules/cacheable-request": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", - "integrity": "sha512-vag0O2LKZ/najSoUwDbVlnlCFvhBE/7mGTY2B5FgCBDcRD+oVV1HYTOwM6JZfMg/hIcM6IwnTZ1uQQL5/X3xIQ==", - "dev": true, - "license": "MIT", + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "license": "BSD-3-Clause", "dependencies": { - "clone-response": "1.0.2", - "get-stream": "3.0.0", - "http-cache-semantics": "3.8.1", - "keyv": "3.0.0", - "lowercase-keys": "1.0.0", - "normalize-url": "2.0.1", - "responselike": "1.0.2" + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" } }, - "node_modules/download/node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha512-RPlX0+PHuvxVDZ7xX+EBVAp4RsVxP/TdDSN2mJYdiq1Lc4Hz7EUSjUI7RZrKKlmrIzVhf6Jo2stj7++gVarS0A==", - "dev": true, - "license": "MIT", + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "license": "BSD-2-Clause", "engines": { - "node": ">=0.10.0" + "node": ">=4.0" } }, - "node_modules/download/node_modules/clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-response": "^1.0.0" - } - }, - "node_modules/download/node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", - "dev": true, - "license": "MIT", + "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==", + "license": "BSD-2-Clause", "dependencies": { - "mimic-response": "^1.0.0" + "estraverse": "^5.2.0" }, "engines": { - "node": ">=4" + "node": ">=4.0" } }, - "node_modules/download/node_modules/get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", - "dev": true, - "license": "MIT", + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "license": "BSD-2-Clause", "engines": { - "node": ">=4" + "node": ">=4.0" } }, - "node_modules/download/node_modules/got": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", - "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sindresorhus/is": "^0.7.0", - "cacheable-request": "^2.1.1", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "into-stream": "^3.1.0", - "is-retry-allowed": "^1.1.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "mimic-response": "^1.0.0", - "p-cancelable": "^0.4.0", - "p-timeout": "^2.0.1", - "pify": "^3.0.0", - "safe-buffer": "^5.1.1", - "timed-out": "^4.0.1", - "url-parse-lax": "^3.0.0", - "url-to-options": "^1.0.1" - }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "license": "BSD-2-Clause", "engines": { - "node": ">=4" + "node": ">=4.0" } }, - "node_modules/download/node_modules/http-cache-semantics": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/download/node_modules/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==", - "dev": true, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "license": "MIT" }, - "node_modules/download/node_modules/keyv": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", - "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.0" - } - }, - "node_modules/download/node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "license": "MIT", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, - "node_modules/download/node_modules/make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "node_modules/event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==", "dev": true, "license": "MIT", "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" } }, - "node_modules/download/node_modules/normalize-url": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", - "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", "dev": true, "license": "MIT", - "dependencies": { - "prepend-http": "^2.0.0", - "query-string": "^5.0.1", - "sort-keys": "^2.0.0" - }, + "optional": true, + "peer": true, "engines": { - "node": ">=4" + "node": ">=6" } }, - "node_modules/download/node_modules/p-cancelable": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", - "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", + "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", + "optional": true, + "peer": true, "engines": { - "node": ">=4" - } - }, - "node_modules/download/node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "lowercase-keys": "^1.0.0" + "node": ">=0.8.x" } }, - "node_modules/download/node_modules/sort-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", - "integrity": "sha512-/dPCrG1s3ePpWm6yBbxZq5Be1dXGLyLn9Z791chDC3NFrpkVbWGzkBwPN1knaciexFXgRJ7hzdnwZ4stHSDmjg==", + "node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, "license": "MIT", "dependencies": { - "is-plain-obj": "^1.0.0" + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" }, "engines": { - "node": ">=4" + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", "dev": true, - "license": "MIT" + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } }, - "node_modules/duplexer3": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", - "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", + "node_modules/expect-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.1.0.tgz", + "integrity": "sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==", "dev": true, - "license": "BSD-3-Clause" + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true, "license": "MIT" }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dev": true, - "license": "MIT", - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/edge-paths": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/edge-paths/-/edge-paths-3.0.5.tgz", - "integrity": "sha512-sB7vSrDnFa4ezWQk9nZ/n0FdpdUuC6R1EOrlU3DL+bovcNFK28rqu2emmAUjujYEJTWIgQGqgVVWUZXMnc8iWg==", - "dev": true, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", "license": "MIT", "dependencies": { - "@types/which": "^2.0.1", - "which": "^2.0.2" + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" }, "engines": { - "node": ">=14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/shirshak55" + "node": ">=4" } }, - "node_modules/edgedriver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-5.6.0.tgz", - "integrity": "sha512-IeJXEczG+DNYBIa9gFgVYTqrawlxmc9SUqUsWU2E98jOsO/amA7wzabKOS8Bwgr/3xWoyXCJ6yGFrbFKrilyyQ==", + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, - "hasInstallScript": true, - "license": "MIT", + "license": "BSD-2-Clause", + "optional": true, + "peer": true, "dependencies": { - "@wdio/logger": "^8.28.0", - "@zip.js/zip.js": "^2.7.44", - "decamelize": "^6.0.0", - "edge-paths": "^3.0.5", - "node-fetch": "^3.3.2", - "which": "^4.0.0" + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" }, "bin": { - "edgedriver": "bin/edgedriver.js" - } - }, - "node_modules/edgedriver/node_modules/@wdio/logger": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-8.38.0.tgz", - "integrity": "sha512-kcHL86RmNbcQP+Gq/vQUGlArfU6IIcbbnNp32rRIraitomZow+iEoc519rdQmSVusDozMS5DZthkgDdxK+vz6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^5.1.2", - "loglevel": "^1.6.0", - "loglevel-plugin-prefix": "^0.8.4", - "strip-ansi": "^7.1.0" + "extract-zip": "cli.js" }, "engines": { - "node": "^16.13 || >=18" + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" } }, - "node_modules/edgedriver/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "node_modules/extract-zip/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "pump": "^3.0.0" + }, "engines": { - "node": ">=12" + "node": ">=8" }, "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/edgedriver/node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 12" - } + "engines": [ + "node >=0.6.0" + ], + "license": "MIT" }, - "node_modules/edgedriver/node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "node_modules/fast-content-type-parse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz", + "integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==", "dev": true, - "license": "ISC", - "engines": { - "node": ">=16" - } - }, - "node_modules/edgedriver/node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/edgedriver/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/edgedriver/node_modules/which": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", - "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^16.13.0 || >=18.0.0" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true, - "license": "MIT" - }, - "node_modules/electron-to-chromium": { - "version": "1.5.47", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.47.tgz", - "integrity": "sha512-zS5Yer0MOYw4rtK2iq43cJagHZ8sXN0jDHDKzB+86gSBSAI4v07S97mcq+Gs2vclAxSh1j7vOAHxSVgduiiuVQ==", - "license": "ISC" - }, - "node_modules/elegant-spinner": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", - "integrity": "sha512-B+ZM+RXvRqQaAmkMlO/oSe5nMUOaUnyfGYCEHoR8wrXsZR2mA0XVibsxV1bvTwxdRWah1PkQqso2EzhILGHtEQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/email-validator": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/email-validator/-/email-validator-2.0.4.tgz", - "integrity": "sha512-gYCwo7kh5S3IDyZPLZf6hSS0MnZT8QmJFqYvbqlDZSbwdZlY6QZWxJ4i/6UhITOJ4XzyI647Bm2MXKCLqnJ4nQ==", - "dev": true, - "engines": { - "node": ">4.0" - } - }, - "node_modules/emittery": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.4.1.tgz", - "integrity": "sha512-r4eRSeStEGf6M5SKdrQhhLK5bOwOBxQhIE3YSTnZE3GpKiLfnnhE+tPtrJE79+eDJgm39BM6LSoI8SCx4HbwlQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/engine.io": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.2.tgz", - "integrity": "sha512-gmNvsYi9C8iErnZdVcJnvCpSKbWTt1E8+JZo8b+daLninywUWi5NQ5STSHZ9rFjFO7imNcvb8Pc5pe/wMR5xEw==", - "dev": true, - "dependencies": { - "@types/cookie": "^0.4.1", - "@types/cors": "^2.8.12", - "@types/node": ">=10.0.0", - "accepts": "~1.3.4", - "base64id": "2.0.0", - "cookie": "~0.7.2", - "cors": "~2.8.5", - "debug": "~4.3.1", - "engine.io-parser": "~5.2.1", - "ws": "~8.17.1" - }, - "engines": { - "node": ">=10.2.0" - } - }, - "node_modules/engine.io-parser": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", - "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/ent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.1.tgz", - "integrity": "sha512-QHuXVeZx9d+tIQAz/XztU0ZwZf2Agg9CcXcgE1rurqvdBeDBrpSwjl8/6XUqMg7tw2Y7uAdKb2sRv+bSEFqQ5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^1.4.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "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/environment": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", - "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/error-stack-parser": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz", - "integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "stackframe": "^1.3.4" - } - }, - "node_modules/es-abstract": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", - "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", - "dev": true, - "license": "MIT", - "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" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.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-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.0" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true, - "license": "MIT" - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true, - "license": "MIT" - }, - "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==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/escodegen/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/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-airbnb-base": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", - "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", - "dev": true, - "license": "MIT", - "dependencies": { - "confusing-browser-globals": "^1.0.10", - "object.assign": "^4.1.2", - "object.entries": "^1.1.5", - "semver": "^6.3.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "peerDependencies": { - "eslint": "^7.32.0 || ^8.2.0", - "eslint-plugin-import": "^2.25.2" - } - }, - "node_modules/eslint-config-airbnb-base/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-config-prettier": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", - "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", - "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", - "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-ban": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-ban/-/eslint-plugin-ban-1.6.0.tgz", - "integrity": "sha512-gZptoV+SFHOHO57/5lmPvizMvSXrjFatP9qlVQf3meL/WHo9TxSoERygrMlESl19CPh95U86asTxohT8OprwDw==", - "dev": true, - "license": "ISC", - "dependencies": { - "requireindex": "~1.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.31.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", - "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.8", - "array.prototype.findlastindex": "^1.2.5", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.0", - "hasown": "^2.0.2", - "is-core-module": "^2.15.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.0", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.8", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-plugin-prettier": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", - "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", - "dev": true, - "license": "MIT", - "dependencies": { - "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.9.1" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-plugin-prettier" - }, - "peerDependencies": { - "@types/eslint": ">=8.0.0", - "eslint": ">=8.0.0", - "eslint-config-prettier": "*", - "prettier": ">=3.0.0" - }, - "peerDependenciesMeta": { - "@types/eslint": { - "optional": true - }, - "eslint-config-prettier": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-testcafe": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-testcafe/-/eslint-plugin-testcafe-0.2.1.tgz", - "integrity": "sha512-LZMHQ2kHFXzbt6ZSS2yUOQhr8QaHwaqvmra1EnXKK0qEwpAvegLdjntCbRPtuD6bDGxPFG87Y7mkI3S9TjZA4A==", - "dev": true, - "license": "MIT" - }, - "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==", - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint/node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/eslint/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==", - "license": "Python-2.0" - }, - "node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/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==", - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/eslint/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==", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/eslint/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==", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/esotope-hammerhead": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/esotope-hammerhead/-/esotope-hammerhead-0.6.8.tgz", - "integrity": "sha512-2Zhg0c6NfrNA4QT5s4+QG5WJQtq3Se7GonNwtNwfr7sVIo/7L8rirPfh9yyloEmDA7R0yPgD10teFxhf2vWyIw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "0.0.46" - } - }, - "node_modules/esotope-hammerhead/node_modules/@types/estree": { - "version": "0.0.46", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.46.tgz", - "integrity": "sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg==", - "dev": true, - "license": "MIT" - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/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==", - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "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==", - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "license": "MIT" - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/event-stream": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", - "integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" - } - }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "dev": true, - "license": "MIT" - }, - "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/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/executable": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", - "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "pify": "^2.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/executable/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "dev": true, - "license": "(MIT OR WTFPL)", - "engines": { - "node": ">=6" - } - }, - "node_modules/ext-list": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", - "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "^1.28.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ext-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", - "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ext-list": "^2.0.0", - "sort-keys-length": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true, - "license": "MIT" - }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "license": "MIT", - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, - "node_modules/extract-zip/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "license": "MIT", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "license": "MIT" - }, - "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==", - "license": "MIT" - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/fast-fifo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", - "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "license": "MIT", - "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" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "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==", - "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==", - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/file-type": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz", - "integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/filename-reserved-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", - "integrity": "sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/filenamify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-2.1.0.tgz", - "integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==", - "dev": true, - "license": "MIT", - "dependencies": { - "filename-reserved-regex": "^2.0.0", - "strip-outer": "^1.0.0", - "trim-repeated": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/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/finalhandler/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/finalhandler/node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", - "dev": true, - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/find-babel-config": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.1.1.tgz", - "integrity": "sha512-5Ji+EAysHGe1OipH7GN4qDjok5Z1uw5KAwDCbicU/4wyTZY7CqOCzcWbG7J5ad9mazq67k89fXlbc1MuIfl9uA==", - "dev": true, - "license": "MIT", - "dependencies": { - "json5": "^2.2.3", - "path-exists": "^4.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==", - "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/find-versions": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", - "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver-regex": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flat-cache/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "license": "ISC", - "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" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/flat-cache/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "license": "ISC" - }, - "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.1.3" - } - }, - "node_modules/foreground-child": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/form-data-encoder": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", - "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.17" - } - }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT" }, - "node_modules/from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==", - "dev": true, + "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==", "license": "MIT" }, - "node_modules/from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==", + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } + "license": "Apache-2.0" }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, - "node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" }, "engines": { - "node": ">=6 <7 || >=8" + "node": ">=8.6.0" } }, - "node_modules/fs-readdir-recursive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", - "dev": true, + "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==", "license": "MIT" }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "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==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "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==", + "license": "MIT" }, - "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "node_modules/fast-xml-parser": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.1.tgz", + "integrity": "sha512-y655CeyUQ+jj7KBbYMc4FG01V8ZQqjN+gDYGJ50RtfsUB8iG9AmwmwoAgeKLJdmueKKMrH1RJ7yXHTSoczdv5w==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" + "strnum": "^1.0.5" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "fxparser": "src/cli/cli.js" } }, - "node_modules/gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==", - "deprecated": "This package is no longer supported.", - "dev": true, + "node_modules/fastq": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz", + "integrity": "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==", "license": "ISC", "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" - } - }, - "node_modules/gauge/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" + "reusify": "^1.0.4" } }, - "node_modules/gauge/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" + "pend": "~1.2.0" } }, - "node_modules/gauge/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/gauge/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", - "dev": true, + "node_modules/fdir": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", + "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", "license": "MIT", - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "peerDependencies": { + "picomatch": "^3 || ^4" }, - "engines": { - "node": ">=0.10.0" + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } } }, - "node_modules/gauge/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/geckodriver": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-4.4.2.tgz", - "integrity": "sha512-/JFJ7DJPJUvDhLjzQk+DwjlkAmiShddfRHhZ/xVL9FWbza5Bi3UMGmmerEKqD69JbRs7R81ZW31co686mdYZyA==", - "dev": true, - "hasInstallScript": true, - "license": "MPL-2.0", - "dependencies": { - "@wdio/logger": "^8.28.0", - "@zip.js/zip.js": "^2.7.44", - "decamelize": "^6.0.0", - "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.4", - "node-fetch": "^3.3.2", - "tar-fs": "^3.0.6", - "which": "^4.0.0" - }, - "bin": { - "geckodriver": "bin/geckodriver.js" + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" }, "engines": { - "node": "^16.13 || >=18 || >=20" + "node": "^12.20 || >= 14.13" } }, - "node_modules/geckodriver/node_modules/@wdio/logger": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-8.38.0.tgz", - "integrity": "sha512-kcHL86RmNbcQP+Gq/vQUGlArfU6IIcbbnNp32rRIraitomZow+iEoc519rdQmSVusDozMS5DZthkgDdxK+vz6Q==", - "dev": true, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "license": "MIT", "dependencies": { - "chalk": "^5.1.2", - "loglevel": "^1.6.0", - "loglevel-plugin-prefix": "^0.8.4", - "strip-ansi": "^7.1.0" + "flat-cache": "^3.0.4" }, "engines": { - "node": "^16.13 || >=18" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/geckodriver/node_modules/agent-base": { + "node_modules/fill-range": { "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "license": "MIT", "dependencies": { - "debug": "^4.3.4" + "to-regex-range": "^5.0.1" }, "engines": { - "node": ">= 14" + "node": ">=8" } }, - "node_modules/geckodriver/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "node_modules/find-babel-config": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.1.2.tgz", + "integrity": "sha512-ZfZp1rQyp4gyuxqt1ZqjFGVeVBvmpURMqdIWXbPRfB97Bf6BzdK/xSIbylEINzQ0kB5tlDQfn9HkNXXWsqTqLg==", "dev": true, "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "dependencies": { + "json5": "^2.2.3" } }, - "node_modules/geckodriver/node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "dev": true, + "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==", "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, "engines": { - "node": ">= 12" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/geckodriver/node_modules/https-proxy-agent": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", - "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", - "dev": true, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "license": "MIT", "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" }, "engines": { - "node": ">= 14" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/geckodriver/node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", - "dev": true, + "node_modules/flat-cache/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "license": "ISC", - "engines": { - "node": ">=16" - } - }, - "node_modules/geckodriver/node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "dev": true, - "license": "MIT", "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" + "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" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": "*" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/geckodriver/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", "dependencies": { - "ansi-regex": "^6.0.1" + "glob": "^7.1.3" }, - "engines": { - "node": ">=12" + "bin": { + "rimraf": "bin.js" }, "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/geckodriver/node_modules/tar-fs": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", - "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", + "node_modules/flatted": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "license": "ISC" + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], "license": "MIT", - "dependencies": { - "pump": "^3.0.0", - "tar-stream": "^3.1.5" + "engines": { + "node": ">=4.0" }, - "optionalDependencies": { - "bare-fs": "^2.1.1", - "bare-path": "^2.1.0" + "peerDependenciesMeta": { + "debug": { + "optional": true + } } }, - "node_modules/geckodriver/node_modules/tar-stream": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", - "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, "license": "MIT", "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" + "is-callable": "^1.1.3" } }, - "node_modules/geckodriver/node_modules/which": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", - "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", "dev": true, "license": "ISC", "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" }, "engines": { - "node": "^16.13.0 || >=18.0.0" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "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.2.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", - "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "engines": { "node": "*" } }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "dev": true, "license": "MIT", "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" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-os-info": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-os-info/-/get-os-info-1.0.2.tgz", - "integrity": "sha512-Nlgt85ph6OHZ4XvTcC8LMLDDFUzf7LAinYJZUwzrnc3WiO+vDEHDmNItTtzixBDLv94bZsvJGrrDRAE6uPs4MQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "getos": "^3.2.1", - "macos-release": "^3.0.1", - "os-family": "^1.1.0", - "windows-release": "^5.0.1" + "node": ">= 6" } }, - "node_modules/get-port": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-7.1.0.tgz", - "integrity": "sha512-QB9NKEeDg3xxVwCCwJQ9+xycaz6pBB6iQ76wiWMl1927n0Kir6alPiP+yuiICLLU4jpMe08dXfpebuQppFA2zw==", + "node_modules/form-data-encoder": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", + "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 14.17" } }, - "node_modules/get-proxy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", - "integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==", + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "npm-conf": "^1.1.0" + "fetch-blob": "^3.1.2" }, "engines": { - "node": ">=4" + "node": ">=12.20.0" } }, - "node_modules/get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha512-F5aQMywwJ2n85s4hJPTT9RPxGmubonuB10MNYo17/xph174n2MIR33HRguhzVag10O/npM7SPk73LMZNP+FaWw==", + "node_modules/from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } + "license": "MIT" }, - "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "license": "MIT" }, - "node_modules/get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "node_modules/fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", "dev": true, + "license": "MIT" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/get-uri": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", - "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", + "node_modules/fstream": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "deprecated": "This package is no longer supported.", "dev": true, - "license": "MIT", + "license": "ISC", + "optional": true, + "peer": true, "dependencies": { - "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^6.0.2", - "debug": "^4.3.4", - "fs-extra": "^11.2.0" + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" }, "engines": { - "node": ">= 14" + "node": ">=0.6" } }, - "node_modules/get-uri/node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "node_modules/fstream/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "license": "MIT", + "license": "ISC", + "optional": true, + "peer": true, "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "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" }, "engines": { - "node": ">=14.14" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/get-uri/node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "node_modules/fstream/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, - "license": "MIT", + "license": "ISC", + "optional": true, + "peer": true, "dependencies": { - "universalify": "^2.0.0" + "glob": "^7.1.3" }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "bin": { + "rimraf": "bin.js" } }, - "node_modules/get-uri/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, + "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==", "license": "MIT", - "engines": { - "node": ">= 10.0.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/getos": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", - "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", + "node_modules/function.prototype.name": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", "dev": true, "license": "MIT", "dependencies": { - "async": "^3.2.0" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/github-build": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/github-build/-/github-build-1.2.4.tgz", - "integrity": "sha512-1kdMmIrvYH18ITHGMVa5BXOxj/+i/VZzPR4PGMBpLW9h15woU+gpM/mlqOk+jmuD4mmib8Dgb6Xcbyy0v+RqqA==", + "node_modules/gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==", + "deprecated": "This package is no longer supported.", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "axios": "1.6.0" + "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" } }, - "node_modules/github-build/node_modules/axios": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", - "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", + "node_modules/gauge/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", "dev": true, "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "dev": true, - "license": "MIT" - }, - "node_modules/glob": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", - "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", + "node_modules/gauge/node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^4.0.1", - "minimatch": "^10.0.0", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^2.0.0" - }, - "bin": { - "glob": "dist/esm/bin.mjs" + "number-is-nan": "^1.0.0" }, "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=0.10.0" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/gauge/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } + "license": "ISC" }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/gauge/node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/glob/node_modules/minimatch": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", - "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "node_modules/gauge/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": "20 || >=22" + "ansi-regex": "^2.0.0" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/global-agent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-2.2.0.tgz", - "integrity": "sha512-+20KpaW6DDLqhG7JDiJpD1JvNvb8ts+TNl7BPOYcURqCrXqnN1Vf+XVOrkKJAFPqfX+oEhsdzOj1hLWkBTdNJg==", + "node_modules/geckodriver": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-4.2.1.tgz", + "integrity": "sha512-4m/CRk0OI8MaANRuFIahvOxYTSjlNAO2p9JmE14zxueknq6cdtB5M9UGRQ8R9aMV0bLGNVHHDnDXmoXdOwJfWg==", "dev": true, - "license": "BSD-3-Clause", + "hasInstallScript": true, + "license": "MPL-2.0", + "optional": true, + "peer": true, "dependencies": { - "boolean": "^3.0.1", - "core-js": "^3.6.5", - "es6-error": "^4.1.1", - "matcher": "^3.0.0", - "roarr": "^2.15.3", - "semver": "^7.3.2", - "serialize-error": "^7.0.1" + "@wdio/logger": "^8.11.0", + "decamelize": "^6.0.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "node-fetch": "^3.3.1", + "tar-fs": "^3.0.4", + "unzipper": "^0.10.14", + "which": "^4.0.0" + }, + "bin": { + "geckodriver": "bin/geckodriver.js" }, "engines": { - "node": ">=10.0" + "node": "^16.13 || >=18 || >=20" } }, - "node_modules/globals": { - "version": "15.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.12.0.tgz", - "integrity": "sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==", + "node_modules/geckodriver/node_modules/@wdio/logger": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-8.38.0.tgz", + "integrity": "sha512-kcHL86RmNbcQP+Gq/vQUGlArfU6IIcbbnNp32rRIraitomZow+iEoc519rdQmSVusDozMS5DZthkgDdxK+vz6Q==", "dev": true, "license": "MIT", - "engines": { - "node": ">=18" + "optional": true, + "peer": true, + "dependencies": { + "chalk": "^5.1.2", + "loglevel": "^1.6.0", + "loglevel-plugin-prefix": "^0.8.4", + "strip-ansi": "^7.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": "^16.13 || >=18" } }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "node_modules/geckodriver/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, + "optional": true, + "peer": true, "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "node_modules/geckodriver/node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", "dev": true, "license": "MIT", - "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" - }, + "optional": true, + "peer": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 12" } }, - "node_modules/globby/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "node_modules/geckodriver/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", "dev": true, - "license": "MIT", + "license": "ISC", + "optional": true, + "peer": true, "engines": { - "node": ">=8" + "node": ">=16" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "node_modules/geckodriver/node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "get-intrinsic": "^1.1.3" + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" } }, - "node_modules/got": { - "version": "11.8.6", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", - "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", + "node_modules/geckodriver/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=10.19.0" + "node": ">=12" }, "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "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/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "license": "MIT" - }, - "node_modules/graphlib": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", - "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", + "node_modules/geckodriver/node_modules/tar-fs": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", + "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "lodash": "^4.17.15" + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^2.1.1", + "bare-path": "^2.1.0" } }, - "node_modules/gzip-size": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-4.1.0.tgz", - "integrity": "sha512-1g6EPVvIHuPmpAdBBpsIVYLgjzGV/QqcFRJXpMyrqEWG10JhOaTjQeCcjMDyX0Iqfm/Q5M9twR/mbDk5f5MqkA==", + "node_modules/geckodriver/node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "duplexer": "^0.1.1", - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" } }, - "node_modules/handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "node_modules/geckodriver/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", "dev": true, - "license": "MIT", + "license": "ISC", + "optional": true, + "peer": true, "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.2", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" + "isexe": "^3.1.1" }, "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" + "node-which": "bin/which.js" }, - "optionalDependencies": { - "uglify-js": "^3.1.4" - } - }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "dev": true, - "license": "ISC", "engines": { - "node": ">=4" + "node": "^16.13.0 || >=18.0.0" } }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dev": true, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "license": "MIT", - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, "engines": { - "node": ">=6" + "node": ">=6.9.0" } }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "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": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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==", - "license": "MIT", + "license": "ISC", "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "node_modules/get-east-asian-width": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", + "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", "dev": true, "license": "MIT", "engines": { "node": "*" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/get-intrinsic": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", "dev": true, "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "function-bind": "^1.1.2", + "get-proto": "^1.0.0", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, "engines": { "node": ">= 0.4" }, @@ -10769,934 +9448,1004 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "node_modules/get-os-info": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-os-info/-/get-os-info-1.0.2.tgz", + "integrity": "sha512-Nlgt85ph6OHZ4XvTcC8LMLDDFUzf7LAinYJZUwzrnc3WiO+vDEHDmNItTtzixBDLv94bZsvJGrrDRAE6uPs4MQ==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "has-symbol-support-x": "^1.4.1" - }, - "engines": { - "node": "*" + "getos": "^3.2.1", + "macos-release": "^3.0.1", + "os-family": "^1.1.0", + "windows-release": "^5.0.1" } }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "node_modules/get-port": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-7.1.0.tgz", + "integrity": "sha512-QB9NKEeDg3xxVwCCwJQ9+xycaz6pBB6iQ76wiWMl1927n0Kir6alPiP+yuiICLLU4jpMe08dXfpebuQppFA2zw==", "dev": true, "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, + "optional": true, + "peer": true, "engines": { - "node": ">= 0.4" + "node": ">=16" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", "dev": true, - "license": "ISC" + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "node_modules/get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha512-F5aQMywwJ2n85s4hJPTT9RPxGmubonuB10MNYo17/xph174n2MIR33HRguhzVag10O/npM7SPk73LMZNP+FaWw==", "dev": true, "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, "engines": { - "node": ">= 0.4" + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/header-case": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", - "integrity": "sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==", + "node_modules/get-symbol-description": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", "dev": true, "license": "MIT", "dependencies": { - "capital-case": "^1.0.4", - "tslib": "^2.0.3" + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/highlight-es": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/highlight-es/-/highlight-es-1.0.3.tgz", - "integrity": "sha512-s/SIX6yp/5S1p8aC/NRDC1fwEb+myGIfp8/TzZz0rtAv8fzsdX7vGl3Q1TrXCsczFq8DI3CBFBCySPClfBSdbg==", + "node_modules/get-uri": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.4.tgz", + "integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "chalk": "^2.4.0", - "is-es2016-keyword": "^1.0.0", - "js-tokens": "^3.0.0" + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" } }, - "node_modules/highlight-es/node_modules/ansi-styles": { + "node_modules/getos": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", + "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" + "async": "^3.2.0" } }, - "node_modules/highlight-es/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" + "assert-plus": "^1.0.0" } }, - "node_modules/highlight-es/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/github-build": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/github-build/-/github-build-1.2.4.tgz", + "integrity": "sha512-1kdMmIrvYH18ITHGMVa5BXOxj/+i/VZzPR4PGMBpLW9h15woU+gpM/mlqOk+jmuD4mmib8Dgb6Xcbyy0v+RqqA==", "dev": true, "license": "MIT", - "engines": { - "node": ">=0.8.0" + "dependencies": { + "axios": "1.6.0" } }, - "node_modules/highlight-es/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "node_modules/github-build/node_modules/axios": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", "dev": true, "license": "MIT", - "engines": { - "node": ">=4" + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, - "node_modules/highlight-es/node_modules/js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", "dev": true, "license": "MIT" }, - "node_modules/highlight-es/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/glob": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", + "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "has-flag": "^3.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=4" + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "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==", + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "MIT" + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "BSD-2-Clause" + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "node_modules/glob/node_modules/minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">= 0.8" + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/http-errors/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "node_modules/globals": { + "version": "15.14.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.14.0.tgz", + "integrity": "sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, "license": "MIT", "dependencies": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "license": "MIT", "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" + "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" }, "engines": { - "node": ">= 14" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/http-proxy-agent/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "node_modules/globby/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", - "dependencies": { - "debug": "^4.3.4" - }, "engines": { - "node": ">= 14" + "node": ">=8" } }, - "node_modules/http-signature": { + "node_modules/gopd": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "dev": true, "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/http-status-codes": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.3.0.tgz", - "integrity": "sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==", + "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": "MIT" + "license": "ISC" }, - "node_modules/http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true, "license": "MIT", - "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" - }, - "engines": { - "node": ">=10.19.0" - } + "optional": true, + "peer": true }, - "node_modules/httpntlm": { - "version": "1.8.13", - "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.8.13.tgz", - "integrity": "sha512-2F2FDPiWT4rewPzNMg3uPhNkP3NExENlUGADRUDPQvuftuUTGW98nLZtGemCIW3G40VhWZYgkIDcQFAwZ3mf2Q==", + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "license": "MIT" + }, + "node_modules/graphlib": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", + "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", "dev": true, - "funding": [ - { - "type": "paypal", - "url": "https://www.paypal.com/donate/?hosted_button_id=2CKNJLZJBW8ZC" - }, - { - "type": "buymeacoffee", - "url": "https://www.buymeacoffee.com/samdecrock" - } - ], + "license": "MIT", "dependencies": { - "des.js": "^1.0.1", - "httpreq": ">=0.4.22", - "js-md4": "^0.3.2", - "underscore": "~1.12.1" - }, - "engines": { - "node": ">=10.4.0" + "lodash": "^4.17.15" } }, - "node_modules/httpreq": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-1.1.1.tgz", - "integrity": "sha512-uhSZLPPD2VXXOSN8Cni3kIsoFHaU2pT/nySEU/fHr/ePbqHYr0jeiQRmUKLEirC09SFPsdMoA7LU7UXMd/w0Kw==", + "node_modules/graphql": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.10.0.tgz", + "integrity": "sha512-AjqGKbDGUFRKIRCP9tCKiIGHyriz2oHEbPIbEtcSLSs4YjReZOIPQQWek4+6hjw62H9QShXHyaGivGiYVLeYFQ==", "dev": true, "license": "MIT", "engines": { - "node": ">= 6.15.1" + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "node_modules/gzip-size": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-4.1.0.tgz", + "integrity": "sha512-1g6EPVvIHuPmpAdBBpsIVYLgjzGV/QqcFRJXpMyrqEWG10JhOaTjQeCcjMDyX0Iqfm/Q5M9twR/mbDk5f5MqkA==", "dev": true, "license": "MIT", "dependencies": { - "agent-base": "6", - "debug": "4" + "duplexer": "^0.1.1", + "pify": "^3.0.0" }, "engines": { - "node": ">= 6" - } - }, - "node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=16.17.0" + "node": ">=4" } }, - "node_modules/humanize-duration": { - "version": "3.32.1", - "resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.32.1.tgz", - "integrity": "sha512-inh5wue5XdfObhu/IGEMiA1nUXigSGcaKNemcbLRKa7jXYGDZXr3LoT9pTIzq2hPEbld7w/qv9h+ikWGz8fL1g==", - "dev": true, - "license": "Unlicense" - }, - "node_modules/husky": { - "version": "9.1.6", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.6.tgz", - "integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==", + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", "dev": true, "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, "bin": { - "husky": "bin.js" + "handlebars": "bin/handlebars" }, "engines": { - "node": ">=18" + "node": ">=0.4.7" }, - "funding": { - "url": "https://github.com/sponsors/typicode" + "optionalDependencies": { + "uglify-js": "^3.1.4" } }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "node_modules/happy-dom": { + "version": "15.11.7", + "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-15.11.7.tgz", + "integrity": "sha512-KyrFvnl+J9US63TEzwoiJOQzZBJY7KgBushJA8X61DMbNsH+2ONkDuLDnCnwUiPTF42tLoEmrPyoqbenVA5zrg==", + "dev": true, "license": "MIT", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "entities": "^4.5.0", + "webidl-conversions": "^7.0.0", + "whatwg-mimetype": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=18.0.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "license": "MIT", + "license": "ISC", "engines": { - "node": ">= 4" + "node": ">=4" } }, - "node_modules/iltorb": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/iltorb/-/iltorb-2.4.5.tgz", - "integrity": "sha512-EMCMl3LnnNSZJS5QrxyZmMTaAC4+TJkM5woD+xbpm9RB+mFYCr7C05GFE3TEGCsVQSVHmjX+3sf5AiwsylNInQ==", - "deprecated": "The zlib module provides APIs for brotli compression/decompression starting with Node.js v10.16.0, please use it over iltorb", + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", "dev": true, - "hasInstallScript": true, "license": "MIT", "dependencies": { - "detect-libc": "^1.0.3", - "nan": "^2.14.0", - "npmlog": "^4.1.2", - "prebuild-install": "^5.3.3", - "which-pm-runs": "^1.0.0" + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" } }, - "node_modules/immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "node_modules/has-bigints": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", + "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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "license": "MIT", "dependencies": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" + "es-define-property": "^1.0.0" }, - "engines": { - "node": ">=4" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/import-lazy": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", - "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==", + "node_modules/has-proto": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", "dev": true, "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, "engines": { - "node": ">=6" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/import-meta-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", - "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==", + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "dev": true, "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, "engines": { - "node": ">=0.8.19" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/indent-string": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-1.2.2.tgz", - "integrity": "sha512-Z1vqf6lDC3f4N2mWqRywY6odjRatPNGDZgUr4DY9MLC14+Fp2/y+CI/RnNGlb8hD6ckscE/8DlZUwHUaiDBshg==", + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", "dev": true, + "license": "ISC" + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "license": "MIT", "dependencies": { - "get-stdin": "^4.0.1", - "minimist": "^1.1.0", - "repeating": "^1.1.0" - }, - "bin": { - "indent-string": "cli.js" + "function-bind": "^1.1.2" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "node": ">= 0.4" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "node_modules/headers-polyfill": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-4.0.3.tgz", + "integrity": "sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==", "dev": true, - "license": "ISC" + "license": "MIT" }, - "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "node_modules/highlight-es": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/highlight-es/-/highlight-es-1.0.3.tgz", + "integrity": "sha512-s/SIX6yp/5S1p8aC/NRDC1fwEb+myGIfp8/TzZz0rtAv8fzsdX7vGl3Q1TrXCsczFq8DI3CBFBCySPClfBSdbg==", "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" + "chalk": "^2.4.0", + "is-es2016-keyword": "^1.0.0", + "js-tokens": "^3.0.0" } }, - "node_modules/into-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", - "integrity": "sha512-TcdjPibTksa1NQximqep2r17ISRiNE9fwlfbg3F8ANdvP5/yrFTew86VcO//jk4QTaMlbjypPBq76HN2zaKfZQ==", + "node_modules/highlight-es/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "license": "MIT", "dependencies": { - "from2": "^2.1.1", - "p-is-promise": "^1.1.0" + "color-convert": "^1.9.0" }, "engines": { "node": ">=4" } }, - "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "node_modules/highlight-es/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "license": "MIT", "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": ">= 12" + "node": ">=4" } }, - "node_modules/ip-address/node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", - "dev": true, - "license": "MIT" - }, - "node_modules/ip-address/node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "node_modules/highlight-es/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, - "license": "BSD-3-Clause" + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } }, - "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "node_modules/highlight-es/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4" } }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "node_modules/highlight-es/node_modules/js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", "dev": true, "license": "MIT" }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "node_modules/highlight-es/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "license": "MIT", "dependencies": { - "has-bigints": "^1.0.1" + "has-flag": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=4" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "node_modules/html-encoding-sniffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "binary-extensions": "^2.0.0" + "whatwg-encoding": "^3.1.1" }, "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "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/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "agent-base": "^7.1.0", + "debug": "^4.3.4" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 14" } }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.4" + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" } }, - "node_modules/is-ci": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "node_modules/http-status-codes": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.3.0.tgz", + "integrity": "sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==", "dev": true, - "license": "MIT", - "dependencies": { - "ci-info": "^1.5.0" - }, - "bin": { - "is-ci": "bin.js" - } + "license": "MIT" }, - "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", - "license": "MIT", + "node_modules/httpntlm": { + "version": "1.8.13", + "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.8.13.tgz", + "integrity": "sha512-2F2FDPiWT4rewPzNMg3uPhNkP3NExENlUGADRUDPQvuftuUTGW98nLZtGemCIW3G40VhWZYgkIDcQFAwZ3mf2Q==", + "dev": true, + "funding": [ + { + "type": "paypal", + "url": "https://www.paypal.com/donate/?hosted_button_id=2CKNJLZJBW8ZC" + }, + { + "type": "buymeacoffee", + "url": "https://www.buymeacoffee.com/samdecrock" + } + ], "dependencies": { - "hasown": "^2.0.2" + "des.js": "^1.0.1", + "httpreq": ">=0.4.22", + "js-md4": "^0.3.2", + "underscore": "~1.12.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=10.4.0" } }, - "node_modules/is-data-view": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "node_modules/httpreq": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-1.1.1.tgz", + "integrity": "sha512-uhSZLPPD2VXXOSN8Cni3kIsoFHaU2pT/nySEU/fHr/ePbqHYr0jeiQRmUKLEirC09SFPsdMoA7LU7UXMd/w0Kw==", "dev": true, "license": "MIT", - "dependencies": { - "is-typed-array": "^1.1.13" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 6.15.1" } }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "agent-base": "^7.1.2", + "debug": "4" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 14" } }, - "node_modules/is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==", + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "engines": { - "node": ">=0.10.0" + "node": ">=16.17.0" } }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "node_modules/humanize-duration": { + "version": "3.32.1", + "resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.32.1.tgz", + "integrity": "sha512-inh5wue5XdfObhu/IGEMiA1nUXigSGcaKNemcbLRKa7jXYGDZXr3LoT9pTIzq2hPEbld7w/qv9h+ikWGz8fL1g==", + "dev": true, + "license": "Unlicense" + }, + "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": { - "is-docker": "cli.js" + "husky": "bin.js" }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/typicode" } }, - "node_modules/is-es2016-keyword": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-es2016-keyword/-/is-es2016-keyword-1.0.0.tgz", - "integrity": "sha512-JtZWPUwjdbQ1LIo9OSZ8MdkWEve198ors27vH+RzUUvZXXZkzXCxFnlUhzWYxy5IexQSRiXVw9j2q/tHMmkVYQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "license": "MIT", "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 4" } }, - "node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "node_modules/iltorb": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/iltorb/-/iltorb-2.4.5.tgz", + "integrity": "sha512-EMCMl3LnnNSZJS5QrxyZmMTaAC4+TJkM5woD+xbpm9RB+mFYCr7C05GFE3TEGCsVQSVHmjX+3sf5AiwsylNInQ==", + "deprecated": "The zlib module provides APIs for brotli compression/decompression starting with Node.js v10.16.0, please use it over iltorb", "dev": true, + "hasInstallScript": true, "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "dependencies": { + "detect-libc": "^1.0.3", + "nan": "^2.14.0", + "npmlog": "^4.1.2", + "prebuild-install": "^5.3.3", + "which-pm-runs": "^1.0.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==", + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", + "dev": true, "license": "MIT", "dependencies": { - "is-extglob": "^2.1.1" + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "license": "MIT" - }, - "node_modules/is-natural-number": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", - "integrity": "sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ==", + "node_modules/import-lazy": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", + "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=6" + } }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "node_modules/import-meta-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", + "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==", "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.4" - }, + "optional": true, + "peer": true, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "github", + "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "license": "MIT", "engines": { - "node": ">=0.12.0" + "node": ">=0.8.19" } }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "node_modules/indent-string": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-1.2.2.tgz", + "integrity": "sha512-Z1vqf6lDC3f4N2mWqRywY6odjRatPNGDZgUr4DY9MLC14+Fp2/y+CI/RnNGlb8hD6ckscE/8DlZUwHUaiDBshg==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "get-stdin": "^4.0.1", + "minimist": "^1.1.0", + "repeating": "^1.1.0" }, - "engines": { - "node": ">= 0.4" + "bin": { + "indent-string": "cli.js" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/is-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", - "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" } }, - "node_modules/is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha512-cnS56eR9SPAscL77ik76ATVqoPARTqPIVkMDVxRaWH06zT+6+CzIroYRJ0VVvm0Z1zfAvxvz9i/D3Ppjaqt5Nw==", + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } + "license": "ISC" }, - "node_modules/is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "node_modules/internal-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", "dev": true, "license": "MIT", "dependencies": { - "is-path-inside": "^1.0.0" + "es-errors": "^1.3.0", + "hasown": "^2.0.2", + "side-channel": "^1.1.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, - "node_modules/is-path-in-cwd/node_modules/is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha512-qhsCR/Esx4U4hg/9I19OVUAJkGWtjRYHMRgUMZE2TDdj+Ag+kttZanLupfddNyglzz50cUlmWzUaI37GDfNx/g==", + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "path-is-inside": "^1.0.1" + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "license": "MIT", - "engines": { - "node": ">=8" + "node": ">= 12" } }, - "node_modules/is-plain-obj": { + "node_modules/ip-address/node_modules/jsbn": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", "dev": true, "license": "MIT", - "engines": { - "node": ">=0.10.0" - } + "optional": true, + "peer": true }, - "node_modules/is-podman": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-podman/-/is-podman-1.0.1.tgz", - "integrity": "sha512-+5vbtF5FIg262iUa7gOIseIWTx0740RHiax7oSmJMhbfSoBIMQ/IacKKgfnGj65JGeH9lGEVQcdkDwhn1Em1mQ==", + "node_modules/ip-address/node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "peer": true + }, + "node_modules/is-array-buffer": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", "dev": true, "license": "MIT", - "bin": { - "is-podman": "cli.js" + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-reference": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", - "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-async-function": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.0.tgz", + "integrity": "sha512-GExz9MtyhlZyXYLxzlJRj5WUCE661zhDa1Yna52CN57AJsymh+DvXXjyveSioqSRdxvUrdKdvqB1b5cVKsNpWQ==", + "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "*" + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "node_modules/is-bigint": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "has-bigints": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -11705,24 +10454,29 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "license": "MIT", + "optional": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "node_modules/is-boolean-object": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.1.tgz", + "integrity": "sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -11731,43 +10485,39 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, "license": "MIT", "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "node_modules/is-ci": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" + "ci-info": "^1.5.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "is-ci": "bin.js" } }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", "license": "MIT", "dependencies": { - "has-symbols": "^1.0.2" + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -11776,14 +10526,16 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "node_modules/is-data-view": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", "dev": true, "license": "MIT", "dependencies": { - "which-typed-array": "^1.1.14" + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -11792,865 +10544,747 @@ "url": "https://github.com/sponsors/ljharb" } }, - "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/is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "node_modules/is-date-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "node_modules/is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==", "dev": true, "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0" - }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/isbinaryfile": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", - "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, "engines": { - "node": ">= 8.0.0" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/gjtorikian/" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "license": "ISC" - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "node_modules/is-es2016-keyword": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-es2016-keyword/-/is-es2016-keyword-1.0.0.tgz", + "integrity": "sha512-JtZWPUwjdbQ1LIo9OSZ8MdkWEve198ors27vH+RzUUvZXXZkzXCxFnlUhzWYxy5IexQSRiXVw9j2q/tHMmkVYQ==", "dev": true, "license": "MIT" }, - "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", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "node_modules/is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" + "call-bound": "^1.0.3" }, "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "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==", + "node_modules/is-finite": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, + "license": "MIT", "engines": { - "node": ">=10" + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/istanbul-lib-report/node_modules/make-dir": { + "node_modules/is-fullwidth-code-point": { "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==", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true, "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/istanbul-lib-report/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==", + "node_modules/is-generator-function": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", "dev": true, "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "license": "BSD-3-Clause", + "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==", + "license": "MIT", "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" + "is-extglob": "^2.1.1" }, "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/isurl": { + "node_modules/is-module": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "license": "MIT" + }, + "node_modules/is-node-process": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz", + "integrity": "sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "license": "MIT", - "dependencies": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - }, "engines": { - "node": ">= 4" + "node": ">=0.12.0" } }, - "node_modules/jackspeak": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.1.tgz", - "integrity": "sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==", + "node_modules/is-number-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", "dev": true, - "license": "BlueOak-1.0.0", + "license": "MIT", "dependencies": { - "@isaacs/cliui": "^8.0.2" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { - "node": "20 || >=22" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jasmine": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-5.4.0.tgz", - "integrity": "sha512-E2u4ylX5tgGYvbynImU6EUBKKrSVB1L72FEPjGh4M55ov1VsxR26RA2JU91L9YSPFgcjo4mCLyKn/QXvEYGBkA==", + "node_modules/is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha512-cnS56eR9SPAscL77ik76ATVqoPARTqPIVkMDVxRaWH06zT+6+CzIroYRJ0VVvm0Z1zfAvxvz9i/D3Ppjaqt5Nw==", "dev": true, "license": "MIT", - "dependencies": { - "glob": "^10.2.2", - "jasmine-core": "~5.4.0" - }, - "bin": { - "jasmine": "bin/jasmine.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/jasmine-core": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.4.0.tgz", - "integrity": "sha512-T4fio3W++llLd7LGSGsioriDHgWyhoL6YTu4k37uwJLF7DzOzspz7mNxRoM3cQdLWtL/ebazQpIf/yZGJx/gzg==", - "dev": true, - "license": "MIT" - }, - "node_modules/jasmine-expect": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/jasmine-expect/-/jasmine-expect-5.0.0.tgz", - "integrity": "sha512-byn1zq0EQBA9UKs5A+H6gk5TRcanV+TqQMRxrjurGuqKkclaqgjw/vV6aT/jtf5tabXGonTH6VDZJ33Z1pxSxw==", + "node_modules/is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "license": "MIT", "dependencies": { - "add-matchers": "0.6.2" + "is-path-inside": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/jasmine/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/is-path-in-cwd/node_modules/is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha512-qhsCR/Esx4U4hg/9I19OVUAJkGWtjRYHMRgUMZE2TDdj+Ag+kttZanLupfddNyglzz50cUlmWzUaI37GDfNx/g==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "path-is-inside": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/jasmine/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-podman": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-podman/-/is-podman-1.0.1.tgz", + "integrity": "sha512-+5vbtF5FIg262iUa7gOIseIWTx0740RHiax7oSmJMhbfSoBIMQ/IacKKgfnGj65JGeH9lGEVQcdkDwhn1Em1mQ==", "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, + "license": "MIT", "bin": { - "glob": "dist/esm/bin.mjs" + "is-podman": "cli.js" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "engines": { + "node": ">=8" } }, - "node_modules/jasmine/node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true, - "license": "BlueOak-1.0.0", + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "license": "MIT", "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" + "@types/estree": "*" } }, - "node_modules/jasmine/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/jasmine/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "brace-expansion": "^2.0.1" + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jasmine/node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, + "license": "MIT", "engines": { - "node": ">=16 || 14 >=14.18" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/joi": { - "version": "17.13.3", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.3.tgz", - "integrity": "sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==", + "node_modules/is-shared-array-buffer": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "@hapi/hoek": "^9.3.0", - "@hapi/topo": "^5.1.0", - "@sideway/address": "^4.1.5", - "@sideway/formula": "^3.0.1", - "@sideway/pinpoint": "^2.0.0" + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/js-cookie": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", - "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, "license": "MIT", "engines": { - "node": ">=14" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/js-md4": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", - "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==", - "dev": true, - "license": "MIT" - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "node_modules/is-string": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", "dev": true, "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "node_modules/is-symbol": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", "dev": true, - "license": "MIT" - }, - "node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" + "dependencies": { + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" }, "engines": { - "node": ">=6" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "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==", - "license": "MIT" - }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "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": "(AFL-2.1 OR BSD-3-Clause)" - }, - "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==", "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==", + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", + "dev": true, "license": "MIT" }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", "dev": true, - "license": "ISC" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, "engines": { - "node": ">=6" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "node_modules/is-weakref": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.0.tgz", + "integrity": "sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q==", "dev": true, "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "dependencies": { + "call-bound": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "node_modules/is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", "dev": true, "license": "MIT", "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" }, "engines": { - "node": ">=0.6.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jszip": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", - "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", "dev": true, - "license": "(MIT OR GPL-3.0-or-later)", - "dependencies": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "setimmediate": "^1.0.5" - } + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" }, - "node_modules/karma": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.4.tgz", - "integrity": "sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w==", + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true, - "license": "MIT", - "dependencies": { - "@colors/colors": "1.5.0", - "body-parser": "^1.19.0", - "braces": "^3.0.2", - "chokidar": "^3.5.1", - "connect": "^3.7.0", - "di": "^0.0.1", - "dom-serialize": "^2.2.1", - "glob": "^7.1.7", - "graceful-fs": "^4.2.6", - "http-proxy": "^1.18.1", - "isbinaryfile": "^4.0.8", - "lodash": "^4.17.21", - "log4js": "^6.4.1", - "mime": "^2.5.2", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.5", - "qjobs": "^1.2.0", - "range-parser": "^1.2.1", - "rimraf": "^3.0.2", - "socket.io": "^4.7.2", - "source-map": "^0.6.1", - "tmp": "^0.2.1", - "ua-parser-js": "^0.7.30", - "yargs": "^16.1.1" - }, - "bin": { - "karma": "bin/karma" - }, - "engines": { - "node": ">= 10" - } + "license": "MIT" }, - "node_modules/karma-chrome-launcher": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz", - "integrity": "sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q==", + "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": "MIT", - "dependencies": { - "which": "^1.2.1" + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" } }, - "node_modules/karma-chrome-launcher/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "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": "ISC", + "license": "BSD-3-Clause", "dependencies": { - "isexe": "^2.0.0" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" }, - "bin": { - "which": "bin/which" + "engines": { + "node": ">=10" } }, - "node_modules/karma-coverage": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/karma-coverage/-/karma-coverage-2.2.1.tgz", - "integrity": "sha512-yj7hbequkQP2qOSb20GuNSIyE//PgJWHwC2IydLE6XRtsnaflv+/OSGNssPjobYUlhVVagy99TQpqUt3vAUG7A==", + "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": { - "istanbul-lib-coverage": "^3.2.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.1", - "istanbul-reports": "^3.0.5", - "minimatch": "^3.0.4" + "semver": "^7.5.3" }, "engines": { - "node": ">=10.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/karma-firefox-launcher": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/karma-firefox-launcher/-/karma-firefox-launcher-2.1.3.tgz", - "integrity": "sha512-LMM2bseebLbYjODBOVt7TCPP9OI2vZIXCavIXhkO9m+10Uj5l7u/SKoeRmYx8FYHTVGZSpk6peX+3BMHC1WwNw==", + "node_modules/istanbul-lib-report/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": { - "is-wsl": "^2.2.0", - "which": "^3.0.0" + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/karma-firefox-launcher/node_modules/which": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", - "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, - "license": "ISC", + "license": "BSD-3-Clause", "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/which.js" + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=8" } }, - "node_modules/karma-jasmine": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-5.1.0.tgz", - "integrity": "sha512-i/zQLFrfEpRyQoJF9fsCdTMOF5c2dK7C7OmsuKg2D0YSsuZSfQDiLuaiktbuio6F2wiCsZSnSnieIQ0ant/uzQ==", + "node_modules/jackspeak": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.2.tgz", + "integrity": "sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==", "dev": true, - "license": "MIT", + "license": "BlueOak-1.0.0", "dependencies": { - "jasmine-core": "^4.1.0" + "@isaacs/cliui": "^8.0.2" }, "engines": { - "node": ">=12" + "node": "20 || >=22" }, - "peerDependencies": { - "karma": "^6.0.0" + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/karma-jasmine-html-reporter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-2.1.0.tgz", - "integrity": "sha512-sPQE1+nlsn6Hwb5t+HHwyy0A1FNCVKuL1192b+XNauMYWThz2kweiBVW1DqloRpVvZIJkIoHVB7XRpK78n1xbQ==", + "node_modules/joi": { + "version": "17.13.3", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.3.tgz", + "integrity": "sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==", "dev": true, - "license": "MIT", - "peerDependencies": { - "jasmine-core": "^4.0.0 || ^5.0.0", - "karma": "^6.0.0", - "karma-jasmine": "^5.0.0" + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.3.0", + "@hapi/topo": "^5.1.0", + "@sideway/address": "^4.1.5", + "@sideway/formula": "^3.0.1", + "@sideway/pinpoint": "^2.0.0" } }, - "node_modules/karma-jasmine-matchers": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/karma-jasmine-matchers/-/karma-jasmine-matchers-5.0.0.tgz", - "integrity": "sha512-XnwKFbeQ8vqCkL/6bLiCFsHR4+TWTIVByuUYFrPM38JBD1hb7TNLP7cPRkQs4QBNWQ1o8z/u4EOetQC2ZFMb8A==", - "dev": true, + "node_modules/js-cookie": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", + "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", "license": "MIT", - "dependencies": { - "jasmine-expect": "5.0.0" + "engines": { + "node": ">=14" } }, - "node_modules/karma-jasmine/node_modules/jasmine-core": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.6.1.tgz", - "integrity": "sha512-VYz/BjjmC3klLJlLwA4Kw8ytk0zDSmbbDLNs794VnWmkcCB7I9aAL/D48VNQtmITyPvea2C3jdUMfc3kAoy0PQ==", + "node_modules/js-md4": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", + "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==", "dev": true, "license": "MIT" }, - "node_modules/karma-junit-reporter": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/karma-junit-reporter/-/karma-junit-reporter-2.0.1.tgz", - "integrity": "sha512-VtcGfE0JE4OE1wn0LK8xxDKaTP7slN8DO3I+4xg6gAi1IoAHAXOJ1V9G/y45Xg6sxdxPOR3THCFtDlAfBo9Afw==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-is-absolute": "^1.0.0", - "xmlbuilder": "12.0.0" - }, - "engines": { - "node": ">= 8" - }, - "peerDependencies": { - "karma": ">=0.9" - } + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" }, - "node_modules/karma-rollup-preprocessor": { - "version": "7.0.8", - "resolved": "https://registry.npmjs.org/karma-rollup-preprocessor/-/karma-rollup-preprocessor-7.0.8.tgz", - "integrity": "sha512-WiuBCS9qsatJuR17dghiTARBZ7LF+ml+eb7qJXhw7IbsdY0lTWELDRQC/93J9i6636CsAXVBL3VJF4WtaFLZzA==", + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "license": "MIT", "dependencies": { - "chokidar": "^3.3.1", - "debounce": "^1.2.0" - }, - "engines": { - "node": ">= 8.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" }, - "peerDependencies": { - "rollup": ">= 1.0.0" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/karma-safari-launcher": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/karma-safari-launcher/-/karma-safari-launcher-1.0.0.tgz", - "integrity": "sha512-qmypLWd6F2qrDJfAETvXDfxHvKDk+nyIjpH9xIeI3/hENr0U3nuqkxaftq73PfXZ4aOuOChA6SnLW4m4AxfRjQ==", + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true, - "license": "MIT", - "peerDependencies": { - "karma": ">=0.9" - } + "license": "MIT" }, - "node_modules/karma-sauce-launcher": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/karma-sauce-launcher/-/karma-sauce-launcher-4.3.6.tgz", - "integrity": "sha512-Ej62q4mUPFktyAm8g0g8J5qhwEkXwdHrwtiV4pZjKNHNnSs+4qgDyzs3VkpOy3AmNTsTqQXUN/lpiy0tZpDJZQ==", + "node_modules/jsdom": { + "version": "25.0.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-25.0.1.tgz", + "integrity": "sha512-8i7LzZj7BF8uplX+ZyOlIz86V6TAsSs+np6m1kpW9u0JWi4z/1t+FzcK1aek+ybTnAC4KhBL4uXCNT0wcUIeCw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "global-agent": "^2.1.12", - "saucelabs": "^4.6.3", - "webdriverio": "^6.7.0" + "cssstyle": "^4.1.0", + "data-urls": "^5.0.0", + "decimal.js": "^10.4.3", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.5", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.12", + "parse5": "^7.1.2", + "rrweb-cssom": "^0.7.1", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^5.0.0", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0", + "ws": "^8.18.0", + "xml-name-validator": "^5.0.0" }, "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/karma-spec-reporter": { - "version": "0.0.36", - "resolved": "https://registry.npmjs.org/karma-spec-reporter/-/karma-spec-reporter-0.0.36.tgz", - "integrity": "sha512-11bvOl1x6ryKZph7kmbmMpbi8vsngEGxGOoeTlIcDaH3ab3j8aPJnZ+r+K/SS0sBSGy5VGkGYO2+hLct7hw/6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "colors": "1.4.0" + "node": ">=18" }, "peerDependencies": { - "karma": ">=0.9" + "canvas": "^2.11.2" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } } }, - "node_modules/karma/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/jsdom/node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", "dev": true, "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, + "optional": true, + "peer": true, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/karma/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "node": ">=18" } }, - "node_modules/karma/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" + "bin": { + "jsesc": "bin/jsesc" }, "engines": { - "node": ">=7.0.0" + "node": ">=6" } }, - "node_modules/karma/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, + "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==", "license": "MIT" }, - "node_modules/karma/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true, - "license": "ISC", - "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" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } + "license": "MIT" }, - "node_modules/karma/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } + "license": "(AFL-2.1 OR BSD-3-Clause)" }, - "node_modules/karma/node_modules/tmp": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", - "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.14" - } + "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==", + "license": "MIT" }, - "node_modules/karma/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "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==", + "license": "MIT" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true, + "license": "ISC" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "bin": { + "json5": "lib/cli.js" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=6" } }, - "node_modules/karma/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dev": true, "license": "MIT", "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" + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" }, "engines": { - "node": ">=10" + "node": ">=0.6.0" } }, - "node_modules/karma/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" + "license": "(MIT OR GPL-3.0-or-later)", + "optional": true, + "peer": true, + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" } }, "node_modules/keyv": { @@ -12672,19 +11306,6 @@ "node": ">=6" } }, - "node_modules/ky": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/ky/-/ky-0.30.0.tgz", - "integrity": "sha512-X/u76z4JtDVq10u1JA5UQfatPxgPaVDMYTrgHyiTpGN2z4TMEJkIHsoSBBSg9SWZEIXTKsi9kHgiQ9o3Y/4yog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/ky?sponsor=1" - } - }, "node_modules/lazy-ass": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", @@ -12701,6 +11322,8 @@ "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "readable-stream": "^2.0.5" }, @@ -12727,14 +11350,16 @@ "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "immediate": "~3.0.5" } }, "node_modules/lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "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": { @@ -12745,22 +11370,22 @@ } }, "node_modules/lint-staged": { - "version": "15.2.10", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.10.tgz", - "integrity": "sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.3.0.tgz", + "integrity": "sha512-vHFahytLoF2enJklgtOtCtIjZrKD/LoxlaUusd5nh7dWv/dkKQJY74ndFSzxCdv7g0ueGg1ORgTSt4Y9LPZn9A==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "~5.3.0", + "chalk": "~5.4.1", "commander": "~12.1.0", - "debug": "~4.3.6", + "debug": "~4.4.0", "execa": "~8.0.1", - "lilconfig": "~3.1.2", - "listr2": "~8.2.4", + "lilconfig": "~3.1.3", + "listr2": "~8.2.5", "micromatch": "~4.0.8", "pidtree": "~0.6.0", "string-argv": "~0.3.2", - "yaml": "~2.5.0" + "yaml": "~2.6.1" }, "bin": { "lint-staged": "bin/lint-staged.js" @@ -12782,10 +11407,19 @@ "os-family": "^1.0.0" } }, + "node_modules/listenercount": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", + "integrity": "sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ==", + "dev": true, + "license": "ISC", + "optional": true, + "peer": true + }, "node_modules/listr2": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.4.tgz", - "integrity": "sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g==", + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.5.tgz", + "integrity": "sha512-iyAZCeyD+c1gPyE9qpFu8af0Y+MRtmKOncdGoA2S5EY8iFq99dmmvkNnHiWo+pj0s7yH7l3KPIgee77tKpXPWQ==", "dev": true, "license": "MIT", "dependencies": { @@ -12801,9 +11435,9 @@ } }, "node_modules/listr2/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "license": "MIT", "engines": { @@ -12813,10 +11447,23 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, + "node_modules/listr2/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/listr2/node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", "dev": true, "license": "MIT" }, @@ -12880,9 +11527,9 @@ } }, "node_modules/locate-app": { - "version": "2.4.21", - "resolved": "https://registry.npmjs.org/locate-app/-/locate-app-2.4.21.tgz", - "integrity": "sha512-ySSBwlUnVKoLgw39q8YaNtvklhaTMoVqBf2+CuY3hkOFuWubHAJ6NJuTjv+jfTV1FuOgKsigRdsYUIeVgKHvNA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/locate-app/-/locate-app-2.5.0.tgz", + "integrity": "sha512-xIqbzPMBYArJRmPGUZD9CzV9wOqmVtQnaAn3wrj3s6WYW0bQvPI7x+sPYUGmDTYMHefVK//zc6HEYZ1qnxIK+Q==", "dev": true, "funding": [ { @@ -12894,21 +11541,25 @@ "url": "https://github.com/hejny/locate-app/blob/main/README.md#%EF%B8%8F-contributing" } ], - "license": "SEE LICENSE IN LICENSE", + "license": "Apache-2.0", + "optional": true, + "peer": true, "dependencies": { - "@promptbook/utils": "0.58.0", - "type-fest": "2.13.0", - "userhome": "1.0.0" + "@promptbook/utils": "0.69.5", + "type-fest": "4.26.0", + "userhome": "1.0.1" } }, "node_modules/locate-app/node_modules/type-fest": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.13.0.tgz", - "integrity": "sha512-lPfAm42MxE4/456+QyIaaVBAwgpJb6xZ8PRu09utnhPdWwcyj9vgy6Sq0Z5yNbJ21EdxB5dRU/Qg8bsyAMtlcw==", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.26.0.tgz", + "integrity": "sha512-OduNjVJsFbifKb57UqZ2EMP1i4u64Xwow3NYXUtBbD4vIwJdQd4+xl8YDou1dlm4DVrtwT/7Ky8z8WyCULVfxw==", "dev": true, "license": "(MIT OR CC0-1.0)", + "optional": true, + "peer": true, "engines": { - "node": ">=12.20" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -12940,7 +11591,9 @@ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/lodash.debounce": { "version": "4.0.8", @@ -12959,7 +11612,9 @@ "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", "integrity": "sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/log-update": { "version": "6.1.0", @@ -13030,6 +11685,23 @@ "dev": true, "license": "MIT" }, + "node_modules/log-update-async-hook/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-update-async-hook/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/log-update-async-hook/node_modules/mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", @@ -13053,6 +11725,21 @@ "node": ">=4" } }, + "node_modules/log-update-async-hook/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/log-update-async-hook/node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -13088,9 +11775,9 @@ } }, "node_modules/log-update/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "license": "MIT", "engines": { @@ -13100,10 +11787,23 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, + "node_modules/log-update/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/log-update/node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", "dev": true, "license": "MIT" }, @@ -13192,29 +11892,14 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/log4js": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.9.1.tgz", - "integrity": "sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "date-format": "^4.0.14", - "debug": "^4.3.4", - "flatted": "^3.2.7", - "rfdc": "^1.3.0", - "streamroller": "^3.1.5" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/loglevel": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", - "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz", + "integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">= 0.6.0" }, @@ -13228,37 +11913,16 @@ "resolved": "https://registry.npmjs.org/loglevel-plugin-prefix/-/loglevel-plugin-prefix-0.8.4.tgz", "integrity": "sha512-WpG9CcFAOjz/FtNht+QJeGpvVl/cdR6P0z6OcXSkr8wFJOsV2GRj2j10JLfjuA4aYkcKCNIEqRGCyTife9R8/g==", "dev": true, - "license": "MIT" - }, - "node_modules/loupe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", - "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.1" - } - }, - "node_modules/lower-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", - "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", - "dev": true, "license": "MIT", - "dependencies": { - "tslib": "^2.0.3" - } + "optional": true, + "peer": true }, - "node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "node_modules/loupe": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.2.tgz", + "integrity": "sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } + "license": "MIT" }, "node_modules/lru-cache": { "version": "5.1.1", @@ -13269,10 +11933,20 @@ "yallist": "^3.0.2" } }, + "node_modules/lz-string": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", + "dev": true, + "license": "MIT", + "bin": { + "lz-string": "bin/bin.js" + } + }, "node_modules/macos-release": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-3.2.0.tgz", - "integrity": "sha512-fSErXALFNsnowREYZ49XCdOHF8wOPWuFOGQrAhP7x5J/BqQv+B02cNsTykGpDgRVx43EKg++6ANmTaGTtW+hUA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-3.3.0.tgz", + "integrity": "sha512-tPJQ1HeyiU2vRruNGhZ+VleWuMQRro8iFtJxYgnS4NQe+EukKF6aGiIT+7flZhISAt2iaXBCfFGvAyif7/f8nQ==", "dev": true, "license": "MIT", "engines": { @@ -13283,14 +11957,26 @@ } }, "node_modules/magic-string": { - "version": "0.30.12", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", - "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, + "node_modules/magicast": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", + "source-map-js": "^1.2.0" + } + }, "node_modules/make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -13351,27 +12037,14 @@ "node": ">=0.8.0" } }, - "node_modules/matcher": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", - "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">= 0.4" } }, "node_modules/merge-stream": { @@ -13396,6 +12069,7 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -13404,17 +12078,17 @@ "node": ">=8.6" } }, - "node_modules/mime": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", - "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "license": "MIT", - "bin": { - "mime": "cli.js" - }, "engines": { - "node": ">=4.0.0" + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/mime-db": { @@ -13466,16 +12140,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -13516,11 +12180,13 @@ } }, "node_modules/mitt": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz", - "integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==", + "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" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/mkdirp": { "version": "0.5.6", @@ -13558,13 +12224,80 @@ "dev": true, "license": "MIT" }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "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==", "license": "MIT" }, + "node_modules/msw": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/msw/-/msw-2.7.0.tgz", + "integrity": "sha512-BIodwZ19RWfCbYTxWTUfTXc+sg4OwjCAgxU1ZsgmggX/7S3LdUifsbUPJs61j0rWb19CZRGY5if77duhc0uXzw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@bundled-es-modules/cookie": "^2.0.1", + "@bundled-es-modules/statuses": "^1.0.1", + "@bundled-es-modules/tough-cookie": "^0.1.6", + "@inquirer/confirm": "^5.0.0", + "@mswjs/interceptors": "^0.37.0", + "@open-draft/deferred-promise": "^2.2.0", + "@open-draft/until": "^2.1.0", + "@types/cookie": "^0.6.0", + "@types/statuses": "^2.0.4", + "graphql": "^16.8.1", + "headers-polyfill": "^4.0.2", + "is-node-process": "^1.2.0", + "outvariant": "^1.4.3", + "path-to-regexp": "^6.3.0", + "picocolors": "^1.1.1", + "strict-event-emitter": "^0.5.1", + "type-fest": "^4.26.1", + "yargs": "^17.7.2" + }, + "bin": { + "msw": "cli/index.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/mswjs" + }, + "peerDependencies": { + "typescript": ">= 4.8.x" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/msw/node_modules/type-fest": { + "version": "4.31.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.31.0.tgz", + "integrity": "sha512-yCxltHW07Nkhv/1F6wWBr8kz+5BGMfP+RbRSYFnegVb0qV/UMT0G0ElBloPVerqn4M2ZV80Ir1FtCcYv1cT6vQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mustache": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/mustache/-/mustache-2.3.2.tgz", @@ -13578,17 +12311,26 @@ "npm": ">=1.4.0" } }, + "node_modules/mute-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/nan": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.20.0.tgz", - "integrity": "sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==", + "version": "2.22.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz", + "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==", "dev": true, "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { @@ -13617,15 +12359,6 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "license": "MIT" }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -13639,28 +12372,12 @@ "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">= 0.4.0" } }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/no-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", - "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" - } - }, "node_modules/node-abi": { "version": "2.30.1", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", @@ -13697,6 +12414,8 @@ } ], "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10.5.0" } @@ -13707,6 +12426,8 @@ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "whatwg-url": "^5.0.0" }, @@ -13722,10 +12443,41 @@ } } }, + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "peer": true + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "license": "MIT" }, "node_modules/noop-logger": { @@ -13741,37 +12493,11 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "license": "MIT", + "optional": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-conf": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", - "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", - "dev": true, - "license": "MIT", - "dependencies": { - "config-chain": "^1.1.11", - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/npm-run-path": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", @@ -13825,6 +12551,15 @@ "node": ">=0.10.0" } }, + "node_modules/nwsapi": { + "version": "2.2.16", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.16.tgz", + "integrity": "sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -13846,9 +12581,9 @@ } }, "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", "dev": true, "license": "MIT", "engines": { @@ -13869,15 +12604,17 @@ } }, "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", "object-keys": "^1.1.1" }, "engines": { @@ -13937,13 +12674,14 @@ } }, "node_modules/object.values": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", - "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, @@ -13954,19 +12692,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -14016,19 +12741,6 @@ "dev": true, "license": "MIT" }, - "node_modules/os-filter-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", - "integrity": "sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==", - "dev": true, - "license": "MIT", - "dependencies": { - "arch": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -14038,57 +12750,29 @@ "node": ">=0.10.0" } }, - "node_modules/p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", + "node_modules/outvariant": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz", + "integrity": "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } + "license": "MIT" }, - "node_modules/p-event": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz", - "integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", + "node_modules/own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", "dev": true, "license": "MIT", "dependencies": { - "p-timeout": "^2.0.1" + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" }, "engines": { - "node": ">=6" - } - }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/p-is-promise": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", - "integrity": "sha512-zL7VE4JVS2IFSkR2GQKDSPEVxkoH43/p7oEnwpdCndKYJO0HVeRB7fA8TJwuLOTBREtK0ea8eHaxdwcpob5dmg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/p-iteration": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/p-iteration/-/p-iteration-1.1.8.tgz", - "integrity": "sha512-IMFBSDIYcPNnW7uWYGrBqmvTiq7W0uB0fJn6shQZs7dlF3OvrHOre+JT9ikSZ7gZS3vWqclVgoQSvToJrns7uQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/p-limit": { @@ -14131,19 +12815,6 @@ "node": ">=4" } }, - "node_modules/p-timeout": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", - "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-finally": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -14155,47 +12826,22 @@ } }, "node_modules/pac-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz", - "integrity": "sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.1.0.tgz", + "integrity": "sha512-Z5FnLVVZSnX7WjBg0mhDtydeRZ1xMcATZThjySQUHqr+0ksP8kqaw23fNKkaaN/Z8gwLUs/W7xdl0I75eP2Xyw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.5", + "https-proxy-agent": "^7.0.6", "pac-resolver": "^7.0.1", - "socks-proxy-agent": "^8.0.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-proxy-agent/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", - "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" + "socks-proxy-agent": "^8.0.5" }, "engines": { "node": ">= 14" @@ -14207,6 +12853,8 @@ "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "degenerator": "^5.0.0", "netmask": "^2.0.2" @@ -14216,9 +12864,9 @@ } }, "node_modules/package-json-from-dist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", - "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true, "license": "BlueOak-1.0.0" }, @@ -14239,18 +12887,9 @@ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", "dev": true, - "license": "(MIT AND Zlib)" - }, - "node_modules/param-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", - "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", - "dev": true, - "license": "MIT", - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } + "license": "(MIT AND Zlib)", + "optional": true, + "peer": true }, "node_modules/parent-module": { "version": "1.0.1", @@ -14291,46 +12930,22 @@ "version": "1.0.9", "resolved": "https://registry.npmjs.org/parse-uri/-/parse-uri-1.0.9.tgz", "integrity": "sha512-YZfRHHkEZa6qTfPF/xgZ1ErQYCABfud/Vcqp1Q1GNa7RKwv6Oe0YaxXfQQMnQsGdNTo3fwaT0GbVEX7dMAr7tw==", + "license": "MIT", "engines": { "node": ">= 0.10" } }, "node_modules/parse5": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz", - "integrity": "sha512-w2jx/0tJzvgKwZa58sj2vAYq/S/K1QJfIB3cWYea/Iu1scFPDQQ3IQiVZTHWtRBwAjv2Yd7S/xeZf3XqLDb3bA==", - "dev": true - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/pascal-case": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", - "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", - "dev": true, - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/path-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/path-case/-/path-case-3.0.4.tgz", - "integrity": "sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", + "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==", "dev": true, "license": "MIT", "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" + "entities": "^4.5.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" } }, "node_modules/path-exists": { @@ -14391,15 +13006,22 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.0.tgz", - "integrity": "sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.2.tgz", + "integrity": "sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==", "dev": true, "license": "ISC", "engines": { "node": "20 || >=22" } }, + "node_modules/path-to-regexp": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", + "dev": true, + "license": "MIT" + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -14410,6 +13032,13 @@ "node": ">=8" } }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true, + "license": "MIT" + }, "node_modules/pathval": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", @@ -14438,7 +13067,9 @@ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/performance-now": { "version": "2.1.0", @@ -14454,12 +13085,12 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "license": "MIT", "engines": { - "node": ">=8.6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" @@ -14590,6 +13221,53 @@ "node": ">=4" } }, + "node_modules/playwright": { + "version": "1.49.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.1.tgz", + "integrity": "sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.49.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.49.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.1.tgz", + "integrity": "sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/playwright/node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/pngjs": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", @@ -14610,6 +13288,35 @@ "node": ">= 0.4" } }, + "node_modules/postcss": { + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", + "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.7", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, "node_modules/prebuild-install": { "version": "5.3.6", "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.6.tgz", @@ -14649,20 +13356,10 @@ "node": ">= 0.8.0" } }, - "node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "dev": true, "license": "MIT", "bin": { @@ -14688,6 +13385,21 @@ "node": ">=6.0.0" } }, + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, "node_modules/pretty-hrtime": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", @@ -14775,6 +13487,8 @@ "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">= 0.6.0" } @@ -14792,6 +13506,8 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=0.4.0" } @@ -14820,55 +13536,23 @@ "node": ">= 6" } }, - "node_modules/proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", - "dev": true, - "license": "ISC" - }, "node_modules/proxy-agent": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.0.tgz", - "integrity": "sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.1.tgz", + "integrity": "sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "agent-base": "^7.0.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.0", + "pac-proxy-agent": "^7.0.1", "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.1" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/proxy-agent/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", - "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" + "socks-proxy-agent": "^8.0.2" }, "engines": { "node": ">= 14" @@ -14880,6 +13564,8 @@ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "engines": { "node": ">=12" } @@ -14907,24 +13593,33 @@ "node": ">= 0.10" } }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "node_modules/psl": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", "dev": true, - "license": "ISC" + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" + } }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "node_modules/psl/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" + "license": "MIT", + "engines": { + "node": ">=6" + } }, "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", "dev": true, "license": "MIT", "dependencies": { @@ -14932,37 +13627,24 @@ "once": "^1.3.1" } }, - "node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true, - "license": "MIT" - }, "node_modules/puppeteer-core": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-20.9.0.tgz", - "integrity": "sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==", + "version": "21.11.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.11.0.tgz", + "integrity": "sha512-ArbnyA3U5SGHokEvkfWjW+O8hOxV1RSJxOgriX/3A4xZRqixt9ZFHD0yPgZQF05Qj0oAqi8H/7stDorjoHY90Q==", "dev": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "dependencies": { - "@puppeteer/browsers": "1.4.6", - "chromium-bidi": "0.4.16", + "@puppeteer/browsers": "1.9.1", + "chromium-bidi": "0.5.8", "cross-fetch": "4.0.0", "debug": "4.3.4", - "devtools-protocol": "0.0.1147663", - "ws": "8.13.0" + "devtools-protocol": "0.0.1232444", + "ws": "8.16.0" }, "engines": { - "node": ">=16.3.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=16.13.2" } }, "node_modules/puppeteer-core/node_modules/debug": { @@ -14971,6 +13653,8 @@ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "ms": "2.1.2" }, @@ -14984,18 +13668,31 @@ } }, "node_modules/puppeteer-core/node_modules/devtools-protocol": { - "version": "0.0.1147663", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1147663.tgz", - "integrity": "sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==", + "version": "0.0.1232444", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1232444.tgz", + "integrity": "sha512-pM27vqEfxSxRkTMnF+XCmxSEb6duO5R+t8A9DEEJgy4Wz2RVanje2mmj99B6A3zv2r/qGfYlOvYznUhuokizmg==", "dev": true, - "license": "BSD-3-Clause" + "license": "BSD-3-Clause", + "optional": true, + "peer": true + }, + "node_modules/puppeteer-core/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/puppeteer-core/node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10.0.0" }, @@ -15012,16 +13709,6 @@ } } }, - "node_modules/qjobs": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", - "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.9" - } - }, "node_modules/qrcode-terminal": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.10.0.tgz", @@ -15031,42 +13718,14 @@ "qrcode-terminal": "bin/qrcode-terminal.js" } }, - "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dev": true, - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/query-selector-shadow-dom": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/query-selector-shadow-dom/-/query-selector-shadow-dom-1.0.1.tgz", "integrity": "sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw==", "dev": true, - "license": "MIT" - }, - "node_modules/query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "dev": true, "license": "MIT", - "dependencies": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } + "optional": true, + "peer": true }, "node_modules/querystringify": { "version": "2.2.0", @@ -15100,7 +13759,9 @@ "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/quick-lru": { "version": "5.1.1", @@ -15108,6 +13769,8 @@ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" }, @@ -15124,32 +13787,6 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -15176,6 +13813,13 @@ "node": ">=0.10.0" } }, + "node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true, + "license": "MIT" + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -15222,12 +13866,52 @@ "util-deprecate": "~1.0.1" } }, + "node_modules/readdir-glob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", + "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "minimatch": "^5.1.0" + } + }, + "node_modules/readdir-glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/readdir-glob/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "optional": true, + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "license": "MIT", + "optional": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -15235,6 +13919,20 @@ "node": ">=8.10.0" } }, + "node_modules/readdirp/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/recursive-readdir": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", @@ -15248,6 +13946,29 @@ "node": ">=6.0.0" } }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -15282,16 +14003,18 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", - "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -15301,15 +14024,15 @@ } }, "node_modules/regexpu-core": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.1.1.tgz", - "integrity": "sha512-k67Nb9jvwJcJmVpw0jPttR1/zVfnKf8Km0IPatrU/zJ5XeG3+Slx0xLXs9HByJSzXzrlz5EDvN6yLNMDc2qdnw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.2.0.tgz", + "integrity": "sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==", "license": "MIT", "dependencies": { "regenerate": "^1.4.2", "regenerate-unicode-properties": "^10.2.0", "regjsgen": "^0.8.0", - "regjsparser": "^0.11.0", + "regjsparser": "^0.12.0", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.1.0" }, @@ -15324,9 +14047,9 @@ "license": "MIT" }, "node_modules/regjsparser": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.11.2.tgz", - "integrity": "sha512-3OGZZ4HoLJkkAZx/48mTXJNlmqTGOzc0o9OWQPuWpkOlXXPbyN6OafCcoXUnBqE2D3f/T5L+pWc1kdEmnfnRsA==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz", + "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==", "license": "BSD-2-Clause", "dependencies": { "jsesc": "~3.0.2" @@ -15335,6 +14058,18 @@ "regjsparser": "bin/parser" } }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/repeating": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz", @@ -15406,6 +14141,16 @@ "node": ">= 0.12" } }, + "node_modules/request/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/request/node_modules/qs": { "version": "6.5.3", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", @@ -15416,6 +14161,20 @@ "node": ">=0.6" } }, + "node_modules/request/node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/request/node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -15462,18 +14221,21 @@ "license": "MIT" }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.0", "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" } @@ -15483,7 +14245,9 @@ "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/resolve-cwd": { "version": "1.0.0", @@ -15518,25 +14282,14 @@ "node": ">=4" } }, - "node_modules/responselike": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", - "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", - "dev": true, - "license": "MIT", - "dependencies": { - "lowercase-keys": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/resq": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/resq/-/resq-1.11.0.tgz", "integrity": "sha512-G10EBz+zAAy3zUd/CDoBbXRL6ia9kOo3xRHrMDsHljI0GDkhYlyjwoCx5+3eCC4swi1uCoZQhskuJkj7Gp57Bw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "fast-deep-equal": "^2.0.1" } @@ -15546,7 +14299,9 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/restore-cursor": { "version": "5.1.0", @@ -15603,7 +14358,9 @@ "resolved": "https://registry.npmjs.org/rgb2hex/-/rgb2hex-0.2.5.tgz", "integrity": "sha512-22MOP1Rh7sAo1BZpDG6R5RFYzR2lYEgwq7HEmyW2qcsOqR2lQKmn+O//xV3YG/0rrhMC6KVX2hU+ZXuaw9a5bw==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/rimraf": { "version": "6.0.1", @@ -15625,35 +14382,10 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/roarr": { - "version": "2.15.4", - "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz", - "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "boolean": "^3.0.1", - "detect-node": "^2.0.4", - "globalthis": "^1.0.1", - "json-stringify-safe": "^5.0.1", - "semver-compare": "^1.0.0", - "sprintf-js": "^1.1.2" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/roarr/node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/rollup": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.4.tgz", - "integrity": "sha512-vGorVWIsWfX3xbcyAS+I047kFKapHYivmkaT63Smj77XwvLSJos6M1xGqZnBPFQFBRZDOcG1QnYEIxAvTr/HjA==", + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.30.0.tgz", + "integrity": "sha512-sDnr1pcjTgUT69qBksNF1N1anwfbyYG6TBQ22b03bII8EdiUQ7J0TlozVaTMjT/eEJAO49e1ndV7t+UZfL1+vA==", "license": "MIT", "dependencies": { "@types/estree": "1.0.6" @@ -15666,24 +14398,25 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.24.4", - "@rollup/rollup-android-arm64": "4.24.4", - "@rollup/rollup-darwin-arm64": "4.24.4", - "@rollup/rollup-darwin-x64": "4.24.4", - "@rollup/rollup-freebsd-arm64": "4.24.4", - "@rollup/rollup-freebsd-x64": "4.24.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.24.4", - "@rollup/rollup-linux-arm-musleabihf": "4.24.4", - "@rollup/rollup-linux-arm64-gnu": "4.24.4", - "@rollup/rollup-linux-arm64-musl": "4.24.4", - "@rollup/rollup-linux-powerpc64le-gnu": "4.24.4", - "@rollup/rollup-linux-riscv64-gnu": "4.24.4", - "@rollup/rollup-linux-s390x-gnu": "4.24.4", - "@rollup/rollup-linux-x64-gnu": "4.24.4", - "@rollup/rollup-linux-x64-musl": "4.24.4", - "@rollup/rollup-win32-arm64-msvc": "4.24.4", - "@rollup/rollup-win32-ia32-msvc": "4.24.4", - "@rollup/rollup-win32-x64-msvc": "4.24.4", + "@rollup/rollup-android-arm-eabi": "4.30.0", + "@rollup/rollup-android-arm64": "4.30.0", + "@rollup/rollup-darwin-arm64": "4.30.0", + "@rollup/rollup-darwin-x64": "4.30.0", + "@rollup/rollup-freebsd-arm64": "4.30.0", + "@rollup/rollup-freebsd-x64": "4.30.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.30.0", + "@rollup/rollup-linux-arm-musleabihf": "4.30.0", + "@rollup/rollup-linux-arm64-gnu": "4.30.0", + "@rollup/rollup-linux-arm64-musl": "4.30.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.30.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.30.0", + "@rollup/rollup-linux-riscv64-gnu": "4.30.0", + "@rollup/rollup-linux-s390x-gnu": "4.30.0", + "@rollup/rollup-linux-x64-gnu": "4.30.0", + "@rollup/rollup-linux-x64-musl": "4.30.0", + "@rollup/rollup-win32-arm64-msvc": "4.30.0", + "@rollup/rollup-win32-ia32-msvc": "4.30.0", + "@rollup/rollup-win32-x64-msvc": "4.30.0", "fsevents": "~2.3.2" } }, @@ -15768,23 +14501,9 @@ "picomatch": "^3 || ^4" }, "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/rollup-plugin-license/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "picomatch": { + "optional": true + } } }, "node_modules/rollup-pluginutils": { @@ -15804,6 +14523,15 @@ "dev": true, "license": "MIT" }, + "node_modules/rrweb-cssom": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz", + "integrity": "sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -15842,18 +14570,21 @@ "resolved": "https://registry.npmjs.org/safaridriver/-/safaridriver-0.1.2.tgz", "integrity": "sha512-4R309+gWflJktzPXBQCobbWEHlzC4aK3a+Ov3tz2Ib2aBxiwd11phkdIBH1l0EO22x24CJMUQkpKFumRriCSRg==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/safe-array-concat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", "isarray": "^2.0.5" }, "engines": { @@ -15876,16 +14607,15 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "license": "MIT" }, - "node_modules/safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", "es-errors": "^1.3.0", - "is-regex": "^1.1.4" + "isarray": "^2.0.5" }, "engines": { "node": ">= 0.4" @@ -15894,345 +14624,73 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" - }, - "node_modules/sanitize-filename": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", - "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==", - "dev": true, - "license": "WTFPL OR ISC", - "dependencies": { - "truncate-utf8-bytes": "^1.0.0" - } - }, - "node_modules/sauce-connect-launcher": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/sauce-connect-launcher/-/sauce-connect-launcher-1.3.2.tgz", - "integrity": "sha512-wf0coUlidJ7rmeClgVVBh6Kw55/yalZCY/Un5RgjSnTXRAeGqagnTsTYpZaqC4dCtrY4myuYpOAZXCdbO7lHfQ==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "adm-zip": "~0.4.3", - "async": "^2.1.2", - "https-proxy-agent": "^5.0.0", - "lodash": "^4.16.6", - "rimraf": "^2.5.4" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/sauce-connect-launcher/node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/sauce-connect-launcher/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "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" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sauce-connect-launcher/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/saucelabs": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-4.7.8.tgz", - "integrity": "sha512-K2qaRUixc7+8JiAwpTvEsIQVzzUkYwa0mAfs0akGagRlWXUR1JrsmgJRyz28qkwpERW1KDuByn3Ju96BuW1V7Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bin-wrapper": "^4.1.0", - "change-case": "^4.1.1", - "form-data": "^3.0.0", - "got": "^11.7.0", - "hash.js": "^1.1.7", - "tunnel": "0.0.6", - "yargs": "^16.0.3" - }, - "bin": { - "sl": "bin/sl" - } - }, - "node_modules/saucelabs-connector": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/saucelabs-connector/-/saucelabs-connector-2.0.0.tgz", - "integrity": "sha512-fWZ8hmS/xEgmfGA8itOO1eEzIlLGxpw8PpQ0TpSxhm5xA2LUS3NPeR1b/6GhPbjzCjDTmjKoQgsOuKIkHIRI9Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "got": "^11.8.2", - "os-family": "^1.0.0", - "read-file-relative": "^1.2.0", - "sauce-connect-launcher": "^1.2.7", - "webdriver": "^7.31.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/saucelabs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/saucelabs/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/saucelabs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/saucelabs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "node_modules/safe-push-apply/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true, "license": "MIT" }, - "node_modules/saucelabs/node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dev": true, - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/saucelabs/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" }, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/saucelabs/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "license": "MIT", - "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" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/saucelabs/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/seek-bzip": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", - "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "commander": "^2.8.1" - }, - "bin": { - "seek-bunzip": "bin/seek-bunzip", - "seek-table": "bin/seek-bzip-table" - } - }, - "node_modules/seek-bzip/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/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==", - "dev": true, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "license": "MIT" }, - "node_modules/semver-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", - "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/semver-truncate": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz", - "integrity": "sha512-V1fGg9i4CL3qesB6U0L6XAm4xOJiHmt4QAacazumuasc03BvtFGIMCduv01JWQ69Nv+JST9TqhSCiJoxoY031w==", + "node_modules/sanitize-filename": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", + "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==", "dev": true, - "license": "MIT", + "license": "WTFPL OR ISC", "dependencies": { - "semver": "^5.3.0" - }, - "engines": { - "node": ">=0.10.0" + "truncate-utf8-bytes": "^1.0.0" } }, - "node_modules/semver-truncate/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dev": true, "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/sentence-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-3.0.4.tgz", - "integrity": "sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" - } - }, - "node_modules/serialize-error": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", - "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==", - "dev": true, - "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "type-fest": "^0.13.1" + "xmlchars": "^2.2.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=v12.22.7" } }, - "node_modules/serialize-error/node_modules/type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/serialize-javascript": { @@ -16252,9 +14710,9 @@ "license": "ISC" }, "node_modules/set-cookie-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz", - "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", "dev": true, "license": "MIT" }, @@ -16292,19 +14750,29 @@ "node": ">= 0.4" } }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", "dev": true, - "license": "MIT" - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true, - "license": "ISC" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/shebang-command": { "version": "2.0.0", @@ -16328,26 +14796,86 @@ } }, "node_modules/shell-quote": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", - "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.2.tgz", + "integrity": "sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==", "dev": true, "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -16356,6 +14884,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "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/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", @@ -16427,6 +14962,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/sirv": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.0.tgz", + "integrity": "sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -16461,12 +15011,27 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -16478,66 +15043,14 @@ "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==", "license": "MIT" }, - "node_modules/snake-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", - "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", - "dev": true, - "license": "MIT", - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/socket.io": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.0.tgz", - "integrity": "sha512-8U6BEgGjQOfGz3HHTYaC/L1GaxDCJ/KM0XTkJly0EhZ5U/du9uNEZy4ZgYzEzIqlx2CMm25CrCqr1ck899eLNA==", - "dev": true, - "dependencies": { - "accepts": "~1.3.4", - "base64id": "~2.0.0", - "cors": "~2.8.5", - "debug": "~4.3.2", - "engine.io": "~6.6.0", - "socket.io-adapter": "~2.5.2", - "socket.io-parser": "~4.2.4" - }, - "engines": { - "node": ">=10.2.0" - } - }, - "node_modules/socket.io-adapter": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz", - "integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "~4.3.4", - "ws": "~8.17.1" - } - }, - "node_modules/socket.io-parser": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", - "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", - "dev": true, - "license": "MIT", - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/socks": { "version": "2.8.3", "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" @@ -16548,13 +15061,15 @@ } }, "node_modules/socks-proxy-agent": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", - "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "agent-base": "^7.1.1", + "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" }, @@ -16562,49 +15077,20 @@ "node": ">= 14" } }, - "node_modules/socks-proxy-agent/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", - "integrity": "sha512-vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-plain-obj": "^1.0.0" - }, + "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==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, - "node_modules/sort-keys-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", - "integrity": "sha512-GRbEOUqCxemTAk/b32F2xa8wDTs+Z1QHOkbhJDQTvv/6G3ZkbJ+frYWsTcc7cBB3Fu4wy4XlLCuNtJuMn7Gsvw==", + "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": "MIT", - "dependencies": { - "sort-keys": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "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==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -16621,9 +15107,9 @@ } }, "node_modules/spacetrim": { - "version": "0.11.36", - "resolved": "https://registry.npmjs.org/spacetrim/-/spacetrim-0.11.36.tgz", - "integrity": "sha512-jqv5aAfMLkBnFK+38QUtEGgU7x1KrfpDnCdjX4+W1IEVgA8Kf3tk8K9je8j2nkCSXdIngjda53fuXERr4/61kw==", + "version": "0.11.59", + "resolved": "https://registry.npmjs.org/spacetrim/-/spacetrim-0.11.59.tgz", + "integrity": "sha512-lLYsktklSRKprreOm7NXReW8YiX2VBjbgmXYEziOoGf/qsJqAEACaDvoTtUOycwjpaSh+bT8eu0KrJn7UNxiCg==", "dev": true, "funding": [ { @@ -16635,7 +15121,9 @@ "url": "https://github.com/hejny/spacetrim/blob/main/README.md#%EF%B8%8F-contributing" } ], - "license": "SEE LICENSE IN LICENSE" + "license": "Apache-2.0", + "optional": true, + "peer": true }, "node_modules/spdx-compare": { "version": "1.0.0", @@ -16674,9 +15162,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.18", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", - "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", "license": "CC0-1.0" }, "node_modules/spdx-ranges": { @@ -16715,6 +15203,8 @@ "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "engines": { "node": ">= 10.x" } @@ -16752,6 +15242,13 @@ "node": ">=0.10.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/stackframe": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz", @@ -16770,16 +15267,16 @@ } }, "node_modules/start-server-and-test": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/start-server-and-test/-/start-server-and-test-2.0.8.tgz", - "integrity": "sha512-v2fV6NV2F7tL1ocwfI4Wpait+IKjRbT5l3ZZ+ZikXdMLmxYsS8ynGAsCQAUVXkVyGyS+UibsRnvgHkMvJIvCsw==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/start-server-and-test/-/start-server-and-test-2.0.9.tgz", + "integrity": "sha512-DDceIvc4wdpr+z3Aqkot2QMho8TcUBh5qH0wEHDpEexBTzlheOcmh53d3dExABY4J5C7qS2UbSXqRWLtxpbWIQ==", "dev": true, "license": "MIT", "dependencies": { "arg": "^5.0.2", "bluebird": "3.7.2", "check-more-types": "2.24.0", - "debug": "4.3.7", + "debug": "4.4.0", "execa": "5.1.1", "lazy-ass": "1.6.0", "ps-tree": "1.2.0", @@ -16910,15 +15407,12 @@ "node": ">=6" } }, - "node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "node_modules/std-env": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", + "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } + "license": "MIT" }, "node_modules/stream-combiner": { "version": "0.0.4", @@ -16930,27 +15424,14 @@ "duplexer": "~0.1.1" } }, - "node_modules/streamroller": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", - "integrity": "sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "date-format": "^4.0.14", - "debug": "^4.3.4", - "fs-extra": "^8.1.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/streamx": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.18.0.tgz", - "integrity": "sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ==", + "version": "2.21.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.21.1.tgz", + "integrity": "sha512-PhP9wUnFLa+91CPy3N6tiQsK+gnYyUNuk15S3YG/zjYE7RuPeCjJngqnzpC31ow0lzBHQ+QGO4cNJnd0djYUsw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "fast-fifo": "^1.3.2", "queue-tick": "^1.0.1", @@ -16960,15 +15441,12 @@ "bare-events": "^2.2.0" } }, - "node_modules/strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==", + "node_modules/strict-event-emitter": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz", + "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } + "license": "MIT" }, "node_modules/string_decoder": { "version": "1.1.1", @@ -16991,17 +15469,21 @@ } }, "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/string-width-cjs": { @@ -17020,6 +15502,13 @@ "node": ">=8" } }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -17030,26 +15519,49 @@ "node": ">=8" } }, - "node_modules/string-width/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/string.prototype.trim": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -17059,16 +15571,20 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -17130,26 +15646,6 @@ "node": ">=0.10.0" } }, - "node_modules/strip-dirs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", - "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-natural-number": "^4.0.1" - } - }, - "node_modules/strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -17175,28 +15671,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strip-outer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", - "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^1.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-outer/node_modules/escape-string-regexp": { + "node_modules/strnum": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", "dev": true, "license": "MIT", - "engines": { - "node": ">=0.8.0" - } + "optional": true, + "peer": true }, "node_modules/supports-color": { "version": "8.1.1", @@ -17226,10 +15708,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/synckit": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", - "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", "dev": true, "license": "MIT", "dependencies": { @@ -17256,6 +15747,18 @@ "tar-stream": "^2.1.4" } }, + "node_modules/tar-fs/node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "node_modules/tar-fs/node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -17288,40 +15791,10 @@ "node": ">=6" } }, - "node_modules/tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/tar-stream/node_modules/bl": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", - "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, "node_modules/terser": { - "version": "5.31.3", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.3.tgz", - "integrity": "sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.37.0.tgz", + "integrity": "sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==", "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -17342,10 +15815,112 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "license": "MIT" }, + "node_modules/test-exclude": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^10.4.1", + "minimatch": "^9.0.4" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/test-exclude/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/testcafe": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/testcafe/-/testcafe-3.7.0.tgz", - "integrity": "sha512-e77yuzX/1eSqb6ctE0oW+PJbgsA975Ui8xYiVAFTQjZnt9oZixB7gEgbwRdIls5EEWmtcxJ5tvqTm1rPBsrOvA==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/testcafe/-/testcafe-3.7.1.tgz", + "integrity": "sha512-Nz7lnGPsbocm7+iNMxEfoDNQyi2rovJv0g7TXzhJfKt7WMJXMT3OyQza2g9AbICee29GenzKtzt3JhUsyIiOug==", "dev": true, "license": "MIT", "dependencies": { @@ -17432,7 +16007,7 @@ "source-map-support": "^0.5.16", "strip-bom": "^2.0.0", "testcafe-browser-tools": "2.0.26", - "testcafe-hammerhead": "31.7.3", + "testcafe-hammerhead": "31.7.4", "testcafe-legacy-api": "5.1.8", "testcafe-reporter-json": "^2.1.0", "testcafe-reporter-list": "^2.2.0", @@ -17454,23 +16029,6 @@ "node": ">=16.0.0" } }, - "node_modules/testcafe-browser-provider-saucelabs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/testcafe-browser-provider-saucelabs/-/testcafe-browser-provider-saucelabs-3.0.0.tgz", - "integrity": "sha512-CywfkQ8tDTUeEawLRaCgedEjXM6zCKvXhAtYzPjXo6wZ3Xp3i3jbuW8l7/9Gn2gFN0CevFZ131L0/cr1n7//CA==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-runtime": "^6.11.6", - "desired-capabilities": "^0.1.0", - "lodash": "^4.14.2", - "pinkie": "^2.0.4", - "saucelabs-connector": "^2.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/testcafe-browser-tools": { "version": "2.0.26", "resolved": "https://registry.npmjs.org/testcafe-browser-tools/-/testcafe-browser-tools-2.0.26.tgz", @@ -17806,9 +16364,9 @@ } }, "node_modules/testcafe-hammerhead": { - "version": "31.7.3", - "resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-31.7.3.tgz", - "integrity": "sha512-LmldhnuUUNcel66z8hjwPkxGrA6jaGt6K9B8iuxOVVRuhpqFfmP3do5MeplK9NyPbIjkAW6WsHDu+nUM88IUsA==", + "version": "31.7.4", + "resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-31.7.4.tgz", + "integrity": "sha512-cTBLS4pDGTJpGoLI9TBuB/TfmVuawSss4PRqxfa2MhvD2QVnLgOlQ/ODNZcYJXaeJKrmlSoSlF6uSt5lif00Uw==", "dev": true, "license": "MIT", "dependencies": { @@ -17907,18 +16465,12 @@ "mime": "cli.js" } }, - "node_modules/testcafe-hammerhead/node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "node_modules/testcafe-hammerhead/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true, - "license": "MIT", - "dependencies": { - "entities": "^4.4.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } + "license": "MIT" }, "node_modules/testcafe-hammerhead/node_modules/punycode": { "version": "2.3.1", @@ -18098,26 +16650,6 @@ "dev": true, "license": "MIT" }, - "node_modules/testcafe-reporter-saucelabs": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/testcafe-reporter-saucelabs/-/testcafe-reporter-saucelabs-3.5.1.tgz", - "integrity": "sha512-7aVMDZPErrynVTNDDEPfGZ8/Iq69iR7HAkxVGT2lwWAF0Zmdx0z1YPmZvmgGrTikWPIwE3ysJ/+F+mFQSc4Eeg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@devexpress/callsite-record": "4.1.7", - "@saucelabs/sauce-json-reporter": "4.1.0", - "@saucelabs/testcomposer": "3.0.1", - "axios": "^1.7.5", - "debug": "^4.3.6" - }, - "engines": { - "node": ">=16.13.2" - }, - "peerDependencies": { - "testcafe": ">=3.2.0" - } - }, "node_modules/testcafe-reporter-spec": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/testcafe-reporter-spec/-/testcafe-reporter-spec-2.2.0.tgz", @@ -18333,13 +16865,6 @@ "node": ">=0.12" } }, - "node_modules/testcafe/node_modules/devtools-protocol": { - "version": "0.0.1109433", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1109433.tgz", - "integrity": "sha512-w1Eqih66egbSr2eOoGZ+NsdF7HdxmKDo3pKFBySEGsmVvwWWNXzNCDcKrbFnd23Jf7kH1M806OfelXwu+Jk11g==", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/testcafe/node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -18511,6 +17036,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/testcafe/node_modules/parse5": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz", + "integrity": "sha512-w2jx/0tJzvgKwZa58sj2vAYq/S/K1QJfIB3cWYea/Iu1scFPDQQ3IQiVZTHWtRBwAjv2Yd7S/xeZf3XqLDb3bA==", + "dev": true + }, "node_modules/testcafe/node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -18584,6 +17115,27 @@ "node": ">=0.4.0" } }, + "node_modules/testcafe/node_modules/typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/testcafe/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "license": "MIT" + }, "node_modules/testcafe/node_modules/url-to-options": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-2.0.0.tgz", @@ -18595,11 +17147,13 @@ } }, "node_modules/text-decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.1.1.tgz", - "integrity": "sha512-8zll7REEv4GDD3x4/0pW+ppIxSNs7H1J10IKFZsuOMscumCdM2a+toDGLPA3T+1+fLBql4zbt5z83GEQGGV5VA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", + "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", "dev": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "dependencies": { "b4a": "^1.6.4" } @@ -18627,16 +17181,74 @@ "node": ">= 0.12" } }, - "node_modules/timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==", + "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": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinypool": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", + "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-1.2.0.tgz", + "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", + "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tldts": { + "version": "6.1.71", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.71.tgz", + "integrity": "sha512-LQIHmHnuzfZgZWAf2HzL83TIIrD8NhhI0DVxqo9/FdOd4ilec+NTNZOlDZf7EwrTNoutccbsHjvWHYXLAtvxjw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "tldts-core": "^6.1.71" + }, + "bin": { + "tldts": "bin/cli.js" } }, + "node_modules/tldts-core": { + "version": "6.1.71", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.71.tgz", + "integrity": "sha512-LRbChn2YRpic1KxY+ldL1pGXN/oVvKfCVufwfVzEQdFYNo39uF7AJa/WXdo+gYO7PTvdfkCPCed6Hkvz/kR7jg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -18649,13 +17261,6 @@ "node": ">=0.6.0" } }, - "node_modules/to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", - "dev": true, - "license": "MIT" - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -18669,46 +17274,69 @@ "node": ">=8.0" } }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.6" + "node": ">=6" } }, "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz", + "integrity": "sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==", "dev": true, "license": "BSD-3-Clause", + "optional": true, + "peer": true, "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "tldts": "^6.1.32" }, "engines": { - "node": ">=0.8" + "node": ">=16" + } + }, + "node_modules/tr46": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" } }, - "node_modules/tough-cookie/node_modules/punycode": { + "node_modules/tr46/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", + "optional": true, + "peer": true, "engines": { "node": ">=6" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "node_modules/traverse": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", + "integrity": "sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==", "dev": true, - "license": "MIT" + "license": "MIT/X11", + "optional": true, + "peer": true, + "engines": { + "node": "*" + } }, "node_modules/tree-kill": { "version": "1.2.2", @@ -18720,29 +17348,6 @@ "tree-kill": "cli.js" } }, - "node_modules/trim-repeated": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", - "integrity": "sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^1.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/trim-repeated/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/truncate-utf8-bytes": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", @@ -18790,22 +17395,12 @@ } }, "node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", + "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" }, - "node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -18839,9 +17434,9 @@ } }, "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true, "license": "MIT", "engines": { @@ -18860,47 +17455,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -18910,18 +17491,19 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", - "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", "dev": true, "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" }, "engines": { "node": ">= 0.4" @@ -18931,18 +17513,18 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", - "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", "dev": true, "license": "MIT", "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" + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" }, "engines": { "node": ">= 0.4" @@ -18952,11 +17534,13 @@ } }, "node_modules/typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -18965,34 +17549,10 @@ "node": ">=4.2.0" } }, - "node_modules/ua-parser-js": { - "version": "0.7.38", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.38.tgz", - "integrity": "sha512-fYmIy7fKTSFAhG3fuPlubeGaMoAd6r0rSnfEsO5nEY55i26KSLt9EH7PLQiiqPUhNqYIJvSkTy1oArIcXAbPbA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/ua-parser-js" - }, - { - "type": "paypal", - "url": "https://paypal.me/faisalman" - }, - { - "type": "github", - "url": "https://github.com/sponsors/faisalman" - } - ], - "license": "MIT", - "engines": { - "node": "*" - } - }, "node_modules/uglify-js": { - "version": "3.19.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.0.tgz", - "integrity": "sha512-wNKHUY2hYYkf6oSFfhwwiHo4WCHzHmzcXsqXYTN9ja3iApYIFbb2U6ics9hBcYLHcYGQoAlwnZlTrf3oF+BL/Q==", + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", "dev": true, "license": "BSD-2-Clause", "optional": true, @@ -19004,16 +17564,19 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "call-bound": "^1.0.3", "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -19025,6 +17588,8 @@ "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "buffer": "^5.2.1", "through": "^2.3.8" @@ -19038,9 +17603,9 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { @@ -19090,32 +17655,42 @@ "dev": true, "license": "ISC" }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "node_modules/unquote": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", + "integrity": "sha512-vRCqFv6UhXpWxZPyGDh/F3ZpNv8/qo7w6iufLpQg9aKnQ71qM4B5KiI7Mia9COcjEhrO9LueHpMYjYzsWH3OIg==", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } + "license": "MIT" }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "node_modules/unzipper": { + "version": "0.10.14", + "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.14.tgz", + "integrity": "sha512-ti4wZj+0bQTiX2KmKWuwj7lhV+2n//uXEotUmGuQqrbVZSEGFMbI68+c6JCQ8aAmUWYvtHEz2A8K6wXvueR/6g==", "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.8" + "optional": true, + "peer": true, + "dependencies": { + "big-integer": "^1.6.17", + "binary": "~0.3.0", + "bluebird": "~3.4.1", + "buffer-indexof-polyfill": "~1.0.0", + "duplexer2": "~0.1.4", + "fstream": "^1.0.12", + "graceful-fs": "^4.2.2", + "listenercount": "~1.0.1", + "readable-stream": "~2.3.6", + "setimmediate": "~1.0.4" } }, - "node_modules/unquote": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", - "integrity": "sha512-vRCqFv6UhXpWxZPyGDh/F3ZpNv8/qo7w6iufLpQg9aKnQ71qM4B5KiI7Mia9COcjEhrO9LueHpMYjYzsWH3OIg==", + "node_modules/unzipper/node_modules/bluebird": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", + "integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/update-browserslist-db": { "version": "1.1.1", @@ -19147,26 +17722,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/upper-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", - "integrity": "sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.0.3" - } - }, - "node_modules/upper-case-first": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz", - "integrity": "sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.0.3" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -19203,34 +17758,23 @@ "requires-port": "^1.0.0" } }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==", + "node_modules/urlpattern-polyfill": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", "dev": true, "license": "MIT", - "dependencies": { - "prepend-http": "^2.0.0" - }, - "engines": { - "node": ">=4" - } + "optional": true, + "peer": true }, - "node_modules/url-to-options": { + "node_modules/userhome": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha512-0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A==", + "resolved": "https://registry.npmjs.org/userhome/-/userhome-1.0.1.tgz", + "integrity": "sha512-5cnLm4gseXjAclKowC4IjByaGsjtAoV6PrOQOljplNB54ReUYJP8HdAFq2muHinSDAh09PPX/uXDPfdxRHvuSA==", "dev": true, "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/userhome": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/userhome/-/userhome-1.0.0.tgz", - "integrity": "sha512-ayFKY3H+Pwfy4W98yPdtH1VqH4psDeyW8lYYFzfecR9d6hqLpqhecktvYR3SEEXt7vG0S1JEpciI3g94pMErig==", - "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">= 0.8.0" } @@ -19249,20 +17793,10 @@ "dev": true, "license": "MIT" }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/uuid": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.2.tgz", - "integrity": "sha512-14FfcOJmqdjbBPdDjFQyk/SdT4NySW4eM0zcG+HqbHP5jzuH56xO3J1DGhgs/cEMCfwYi3HQI1gnTO62iaG+tQ==", + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.4.tgz", + "integrity": "sha512-IzL6VtTTYcAhA/oghbFJ1Dkmqev+FpQWnCBaKq/gUluLxliWvO8DPFWfIviRmYbtaavtSQe4WBL++rFjdcGWEg==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" @@ -19272,45 +17806,190 @@ "uuid": "dist/esm/bin/uuid" } }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, - "engines": [ - "node >=0.6.0" - ], + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/verror/node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/vite": { + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.8.tgz", + "integrity": "sha512-uPAwSr57kYjAUux+8E2j0q0Fxpn8M9VoyfGiRI8Kfktz9NcYMCenwY5RnZxnF1WTu3TGiYipirIzacLL3VVGFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.7", + "es-module-lexer": "^1.5.4", + "pathe": "^1.1.2", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.8.tgz", + "integrity": "sha512-1vBKTZskHw/aosXqQUlVWWlGUxSJR8YtiyZDJAFeW2kPAeX6S3Sool0mjspO+kXLuxVWlEDDowBAeqeAQefqLQ==", + "dev": true, "license": "MIT", "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "@vitest/expect": "2.1.8", + "@vitest/mocker": "2.1.8", + "@vitest/pretty-format": "^2.1.8", + "@vitest/runner": "2.1.8", + "@vitest/snapshot": "2.1.8", + "@vitest/spy": "2.1.8", + "@vitest/utils": "2.1.8", + "chai": "^5.1.2", + "debug": "^4.3.7", + "expect-type": "^1.1.0", + "magic-string": "^0.30.12", + "pathe": "^1.1.2", + "std-env": "^3.8.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.1", + "tinypool": "^1.0.1", + "tinyrainbow": "^1.2.0", + "vite": "^5.0.0", + "vite-node": "2.1.8", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "2.1.8", + "@vitest/ui": "2.1.8", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } } }, - "node_modules/verror/node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", + "node_modules/w3c-xmlserializer": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "xml-name-validator": "^5.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=18" } }, "node_modules/wait-on": { @@ -19339,6 +18018,8 @@ "integrity": "sha512-3e04qkoN3LxTMLakdqeWth8nih8usyg+sf1Bgdf9wwUkp05iuK1eSY/QpLvscT/+F/gA89+LpUmmgBtesbqI2Q==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "chalk": "^4.1.2", "commander": "^9.3.0", @@ -19357,6 +18038,8 @@ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -19373,6 +18056,8 @@ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -19390,6 +18075,8 @@ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "color-name": "~1.1.4" }, @@ -19402,7 +18089,9 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/wait-port/node_modules/commander": { "version": "9.5.0", @@ -19410,6 +18099,8 @@ "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": "^12.20.0 || >=14" } @@ -19420,6 +18111,8 @@ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -19433,60 +18126,33 @@ "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">= 8" } }, - "node_modules/webdriver": { - "version": "7.33.0", - "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-7.33.0.tgz", - "integrity": "sha512-cyMRAVUHgQhEBHojOeNet2e8GkfyvvjpioNCPcF6qUtT+URdagr8Mh0t4Fs+Jr0tpuMqFnw70xZexAcV/6I/jg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "^18.0.0", - "@wdio/config": "7.33.0", - "@wdio/logger": "7.26.0", - "@wdio/protocols": "7.27.0", - "@wdio/types": "7.33.0", - "@wdio/utils": "7.33.0", - "got": "^11.0.2", - "ky": "0.30.0", - "lodash.merge": "^4.6.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/webdriver/node_modules/@types/node": { - "version": "18.19.40", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.40.tgz", - "integrity": "sha512-MIxieZHrm4Ee8XArBIc+Or9HINt2StOmCbgRcXGSJl8q14svRvkZPe7LJq9HKtTI1SK3wU8b91TjntUm7T69Pg==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, "node_modules/webdriverio": { - "version": "8.39.1", - "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-8.39.1.tgz", - "integrity": "sha512-dPwLgLNtP+l4vnybz+YFxxH8nBKOP7j6VVzKtfDyTLDQg9rz3U8OA4xMMQCBucnrVXy3KcKxGqlnMa+c4IfWCQ==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-8.41.0.tgz", + "integrity": "sha512-WlQfw0mUEhTS8DPr+TBSYMhEnqXkFr2dcUwPb5XkffTB+i0wftf+BLXJPSVD9M1PTLyYcFdCIu68pqR54dq5BA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "@types/node": "^20.1.0", - "@wdio/config": "8.39.0", + "@types/node": "^22.2.0", + "@wdio/config": "8.41.0", "@wdio/logger": "8.38.0", - "@wdio/protocols": "8.38.0", - "@wdio/repl": "8.24.12", - "@wdio/types": "8.39.0", - "@wdio/utils": "8.39.0", + "@wdio/protocols": "8.40.3", + "@wdio/repl": "8.40.3", + "@wdio/types": "8.41.0", + "@wdio/utils": "8.41.0", "archiver": "^7.0.0", "aria-query": "^5.0.0", "css-shorthand-properties": "^1.1.1", "css-value": "^0.0.1", - "devtools-protocol": "^0.0.1302984", + "devtools-protocol": "^0.0.1359167", "grapheme-splitter": "^1.0.2", "import-meta-resolve": "^4.0.0", "is-plain-obj": "^4.1.0", @@ -19494,12 +18160,12 @@ "lodash.clonedeep": "^4.5.0", "lodash.zip": "^4.2.0", "minimatch": "^9.0.0", - "puppeteer-core": "^20.9.0", + "puppeteer-core": "^21.11.0", "query-selector-shadow-dom": "^1.0.0", "resq": "^1.9.1", "rgb2hex": "0.2.5", "serialize-error": "^11.0.1", - "webdriver": "8.39.0" + "webdriver": "8.41.0" }, "engines": { "node": "^16.13 || >=18" @@ -19513,34 +18179,14 @@ } } }, - "node_modules/webdriverio/node_modules/@puppeteer/browsers": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.9.1.tgz", - "integrity": "sha512-PuvK6xZzGhKPvlx3fpfdM2kYY3P/hB1URtK8wA7XUJ6prn6pp22zvJHu48th0SGcHL9SutbPHrFuQgfXTFobWA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "debug": "4.3.4", - "extract-zip": "2.0.1", - "progress": "2.0.3", - "proxy-agent": "6.3.1", - "tar-fs": "3.0.4", - "unbzip2-stream": "1.4.3", - "yargs": "17.7.2" - }, - "bin": { - "browsers": "lib/cjs/main-cli.js" - }, - "engines": { - "node": ">=16.3.0" - } - }, "node_modules/webdriverio/node_modules/@sindresorhus/is": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz", "integrity": "sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=14.16" }, @@ -19554,6 +18200,8 @@ "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "defer-to-connect": "^2.0.1" }, @@ -19562,15 +18210,17 @@ } }, "node_modules/webdriverio/node_modules/@wdio/config": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@wdio/config/-/config-8.39.0.tgz", - "integrity": "sha512-yNuGPMPibY91s936gnJCHWlStvIyDrwLwGfLC/NCdTin4F7HL4Gp5iJnHWkJFty1/DfFi8jjoIUBNLM8HEez+A==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@wdio/config/-/config-8.41.0.tgz", + "integrity": "sha512-/6Z3sfSyhX5oVde0l01fyHimbqRYIVUDBnhDG2EMSCoC2lsaJX3Bm3IYpYHYHHFsgoDCi3B3Gv++t9dn2eSZZw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@wdio/logger": "8.38.0", - "@wdio/types": "8.39.0", - "@wdio/utils": "8.39.0", + "@wdio/types": "8.41.0", + "@wdio/utils": "8.41.0", "decamelize": "^6.0.0", "deepmerge-ts": "^5.0.0", "glob": "^10.2.2", @@ -19586,6 +18236,8 @@ "integrity": "sha512-kcHL86RmNbcQP+Gq/vQUGlArfU6IIcbbnNp32rRIraitomZow+iEoc519rdQmSVusDozMS5DZthkgDdxK+vz6Q==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "chalk": "^5.1.2", "loglevel": "^1.6.0", @@ -19597,39 +18249,45 @@ } }, "node_modules/webdriverio/node_modules/@wdio/protocols": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@wdio/protocols/-/protocols-8.38.0.tgz", - "integrity": "sha512-7BPi7aXwUtnXZPeWJRmnCNFjyDvGrXlBmN9D4Pi58nILkyjVRQKEY9/qv/pcdyB0cvmIvw++Kl/1Lg+RxG++UA==", + "version": "8.40.3", + "resolved": "https://registry.npmjs.org/@wdio/protocols/-/protocols-8.40.3.tgz", + "integrity": "sha512-wK7+eyrB3TAei8RwbdkcyoNk2dPu+mduMBOdPJjp8jf/mavd15nIUXLID1zA+w5m1Qt1DsT1NbvaeO9+aJQ33A==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/webdriverio/node_modules/@wdio/types": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@wdio/types/-/types-8.39.0.tgz", - "integrity": "sha512-86lcYROTapOJuFd9ouomFDfzDnv3Kn+jE0RmqfvN9frZAeLVJ5IKjX9M6HjplsyTZhjGO1uCaehmzx+HJus33Q==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@wdio/types/-/types-8.41.0.tgz", + "integrity": "sha512-t4NaNTvJZci3Xv/yUZPH4eTL0hxrVTf5wdwNnYIBrzMnlRDbNefjQ0P7FM7ZjQCLaH92AEH6t/XanUId7Webug==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "@types/node": "^20.1.0" + "@types/node": "^22.2.0" }, "engines": { "node": "^16.13 || >=18" } }, "node_modules/webdriverio/node_modules/@wdio/utils": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-8.39.0.tgz", - "integrity": "sha512-jY+n6jlGeK+9Tx8T659PKLwMQTGpLW5H78CSEWgZLbjbVSr2LfGR8Lx0CRktNXxAtqEVZPj16Pi74OtAhvhE6Q==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-8.41.0.tgz", + "integrity": "sha512-0TcTjBiax1VxtJQ/iQA0ZyYOSHjjX2ARVmEI0AMo9+AuIq+xBfnY561+v8k9GqOMPKsiH/HrK3xwjx8xCVS03g==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@puppeteer/browsers": "^1.6.0", "@wdio/logger": "8.38.0", - "@wdio/types": "8.39.0", + "@wdio/types": "8.41.0", "decamelize": "^6.0.0", "deepmerge-ts": "^5.1.0", "edgedriver": "^5.5.0", - "geckodriver": "^4.3.1", + "geckodriver": "~4.2.0", "get-port": "^7.0.0", "import-meta-resolve": "^4.0.0", "locate-app": "^2.1.0", @@ -19641,25 +18299,14 @@ "node": "^16.13 || >=18" } }, - "node_modules/webdriverio/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/webdriverio/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=12" }, @@ -19673,6 +18320,8 @@ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -19683,6 +18332,8 @@ "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=14.16" } @@ -19693,6 +18344,8 @@ "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@types/http-cache-semantics": "^4.0.2", "get-stream": "^6.0.1", @@ -19706,23 +18359,14 @@ "node": ">=14.16" } }, - "node_modules/webdriverio/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "node_modules/webdriverio/node_modules/devtools-protocol": { + "version": "0.0.1359167", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1359167.tgz", + "integrity": "sha512-f/9PeTaSH3weS/WAwrQb5/s9R3KMOeTGe+Jkhg5952yInub7iDPjdlzRdrDgpLZfxHbTrBuG9aUkAMM+ocVkXQ==", "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } + "license": "BSD-3-Clause", + "optional": true, + "peer": true }, "node_modules/webdriverio/node_modules/get-stream": { "version": "6.0.1", @@ -19730,6 +18374,8 @@ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=10" }, @@ -19743,6 +18389,8 @@ "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", @@ -19764,6 +18412,8 @@ "integrity": "sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@sindresorhus/is": "^5.2.0", "@szmarczak/http-timer": "^5.0.1", @@ -19790,6 +18440,8 @@ "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.2.0" @@ -19798,26 +18450,14 @@ "node": ">=10.19.0" } }, - "node_modules/webdriverio/node_modules/https-proxy-agent": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", - "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/webdriverio/node_modules/is-plain-obj": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=12" }, @@ -19831,6 +18471,8 @@ "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "license": "BlueOak-1.0.0", + "optional": true, + "peer": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -19847,6 +18489,8 @@ "integrity": "sha512-CasD9OCEQSFIam2U8efFK81Yeg8vNMTBUqtMOHlrcWQHqUX3HeCl9Dr31u4toV7emlH8Mymk5+9p0lL6mKb/Xw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=14.16" }, @@ -19860,6 +18504,8 @@ "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -19868,14 +18514,13 @@ } }, "node_modules/webdriverio/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, "license": "ISC", - "engines": { - "node": ">=12" - } + "optional": true, + "peer": true }, "node_modules/webdriverio/node_modules/mimic-response": { "version": "4.0.0", @@ -19883,6 +18528,8 @@ "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -19896,6 +18543,8 @@ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "license": "ISC", + "optional": true, + "peer": true, "dependencies": { "brace-expansion": "^2.0.1" }, @@ -19912,6 +18561,8 @@ "integrity": "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=14.16" }, @@ -19925,6 +18576,8 @@ "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": ">=12.20" } @@ -19935,6 +18588,8 @@ "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "license": "BlueOak-1.0.0", + "optional": true, + "peer": true, "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -19946,39 +18601,14 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/webdriverio/node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/webdriverio/node_modules/proxy-agent": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.1.tgz", - "integrity": "sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "^4.3.4", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", - "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.1", - "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.2" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/webdriverio/node_modules/responselike": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "lowercase-keys": "^3.0.0" }, @@ -19995,6 +18625,8 @@ "integrity": "sha512-2G2y++21dhj2R7iHAdd0FIzjGwuKZld+7Pl/bTU6YIkrC2ZMbVUjm+luj6A6V34Rv9XfKJDKpTWu9W4Gse1D9g==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "type-fest": "^2.12.2" }, @@ -20011,38 +18643,16 @@ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/webdriverio/node_modules/tar-fs": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", - "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^3.1.5" - } - }, - "node_modules/webdriverio/node_modules/tar-stream": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", - "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/webdriverio/node_modules/type-fest": { @@ -20051,6 +18661,8 @@ "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", "dev": true, "license": "(MIT OR CC0-1.0)", + "optional": true, + "peer": true, "engines": { "node": ">=12.20" }, @@ -20059,19 +18671,21 @@ } }, "node_modules/webdriverio/node_modules/webdriver": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-8.39.0.tgz", - "integrity": "sha512-Kc3+SfiH4ufyrIht683VT2vnJocx0pfH8rYdyPvEh1b2OYewtFTHK36k9rBDHZiBmk6jcSXs4M2xeFgOuon9Lg==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-8.41.0.tgz", + "integrity": "sha512-n8OrFnVT4hAaGa0Advr3T8ObJdeKNTRklHIEzM2CYVx/5DZt+2KwaKSxWsURNd4zU7FbsfaJUU4rQWCmvozQLg==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "@types/node": "^20.1.0", + "@types/node": "^22.2.0", "@types/ws": "^8.5.3", - "@wdio/config": "8.39.0", + "@wdio/config": "8.41.0", "@wdio/logger": "8.38.0", - "@wdio/protocols": "8.38.0", - "@wdio/types": "8.39.0", - "@wdio/utils": "8.39.0", + "@wdio/protocols": "8.40.3", + "@wdio/types": "8.41.0", + "@wdio/utils": "8.41.0", "deepmerge-ts": "^5.1.0", "got": "^12.6.1", "ky": "^0.33.0", @@ -20082,21 +18696,69 @@ } }, "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true, - "license": "BSD-2-Clause" + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } }, "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.1.0.tgz", + "integrity": "sha512-jlf/foYIKywAt3x/XWKZ/3rz8OSJPiWktjmk891alJUEjiVxKX9LEO92qH3hv4aJ0mN3MWPvGMCy8jQi95xK4w==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "tr46": "^5.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" } }, "node_modules/which": { @@ -20115,17 +18777,74 @@ } }, "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/which-collection": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, "license": "MIT", "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" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -20200,16 +18919,17 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", + "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", "dev": true, "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "for-each": "^0.3.3", - "gopd": "^1.0.1", + "gopd": "^1.2.0", "has-tostringtag": "^1.0.2" }, "engines": { @@ -20219,6 +18939,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "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/wide-align": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", @@ -20229,6 +18966,38 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, + "node_modules/wide-align/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wide-align/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wide-align/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/windows-release": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-5.1.1.tgz", @@ -20446,6 +19215,38 @@ "dev": true, "license": "MIT" }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -20479,6 +19280,35 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -20486,9 +19316,9 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "dev": true, "license": "MIT", "engines": { @@ -20507,25 +19337,26 @@ } } }, - "node_modules/xmlbuilder": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-12.0.0.tgz", - "integrity": "sha512-lMo8DJ8u6JRWp0/Y4XLa/atVDr75H9litKlb2E5j3V3MesoL50EBgZDWoLT3F/LztVnG67GjPXLZpqcky/UMnQ==", + "node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", + "optional": true, + "peer": true, "engines": { - "node": ">=6.0" + "node": ">=18" } }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true, "license": "MIT", - "engines": { - "node": ">=0.4" - } + "optional": true, + "peer": true }, "node_modules/y18n": { "version": "5.0.8", @@ -20544,9 +19375,9 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz", - "integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", + "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", "dev": true, "license": "ISC", "bin": { @@ -20585,12 +19416,46 @@ "node": ">=12" } }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" @@ -20602,6 +19467,8 @@ "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "engines": { "node": "*" } @@ -20636,6 +19503,8 @@ "integrity": "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "archiver-utils": "^5.0.0", "compress-commons": "^6.0.2", @@ -20665,17 +19534,21 @@ } ], "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, "node_modules/zip-stream/node_modules/readable-stream": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", - "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.6.0.tgz", + "integrity": "sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", @@ -20706,7 +19579,9 @@ "url": "https://feross.org/support" } ], - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/zip-stream/node_modules/string_decoder": { "version": "1.3.0", @@ -20714,6 +19589,8 @@ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "safe-buffer": "~5.2.0" } diff --git a/package.json b/package.json index ccbbad1f8..e44dfd494 100644 --- a/package.json +++ b/package.json @@ -21,20 +21,18 @@ "clean": "rimraf dist distTest libEs5 libEs6", "lint": "eslint --cache --fix \"*.{js,cjs,mjs,jsx}\" \"{src,test,scripts}/**/*.{js,cjs,mjs,jsx}\"", "format": "prettier --write \"*.{html,js,cjs,mjs,jsx}\" \"{sandbox,src,test,scripts}/**/*.{html,js,cjs,mjs,jsx}\"", - "test": "npm run test:unit && npm run test:scripts && npm run test:functional", - "test:unit": "karma start karma.conf.cjs --single-run", - "test:unit:debug": "karma start karma.conf.cjs --browsers=Chrome --single-run=false --debug", - "test:unit:watch": "karma start", - "test:unit:saucelabs:local": "karma start karma.saucelabs.conf.cjs --single-run", - "test:unit:coverage": "karma start --single-run --reporters spec,coverage", + "test": "npm run test:unit && npm run test:scripts", + "test:unit": "vitest run", + "test:unit:debug": "vitest --no-file-parallelism --browser.headless=false", + "test:unit:watch": "vitest", + "test:unit:coverage": "vitest run --coverage", "test:functional": "EDGE_BASE_PATH=\"ee-pre-prd\" ALLOY_ENV=\"int\" testcafe chrome", "test:functional:custom": "node scripts/helpers/runFunctionalTests.js", - "test:functional:saucelabs:dev": "NPM_PACKAGE_VERSION=$(npm pkg get version | tr -d '\"') EDGE_BASE_PATH=\"ee-pre-prd\" ALLOY_ENV=\"int\" saucectl run --config ./.sauce/dev.yml", "test:functional:watch": "EDGE_BASE_PATH=\"ee-pre-prd\" ALLOY_ENV=\"int\" ./scripts/watchFunctionalTests.js --browsers chrome", "test:functional:debug": "EDGE_BASE_PATH=\"ee-pre-prd\" ALLOY_ENV=\"int\" testcafe --inspect-brk chrome", "test:functional:build:int": "rollup -c --environment BASE_CODE_MIN,STANDALONE,NPM_PACKAGE_LOCAL", "test:functional:build:prod": "rollup -c --environment BASE_CODE_MIN,NPM_PACKAGE_PROD", - "test:scripts": "jasmine --config=scripts/specs/jasmine.json", + "test:scripts": "vitest run --config=./scripts/specs/vitest.config.js", "sandbox:build": "rollup -c --environment SANDBOX && cd sandbox && npm run build", "dev": "concurrently --names build,sandbox \"rollup -c -w --environment SANDBOX\" \"cd sandbox && export REACT_APP_NONCE=321 && npm start\"", "dev:standalone": "npm run clean && rollup -c -w --environment STANDALONE", @@ -43,7 +41,8 @@ "prepare": "husky && cd sandbox && npm install", "prepack": "rimraf libEs5 libEs6 && babel src -d libEs5 --env-name npmEs5 && babel src -d libEs6 --env-name npmEs6", "checkthattestfilesexist": "./scripts/checkThatTestFilesExist.js", - "add-license": "./scripts/add-license.js" + "add-license": "./scripts/add-license.js", + "postinstall": "npx playwright install chromium" }, "lint-staged": { "./*.{cjs,mjs,js,jsx}": [ @@ -99,8 +98,9 @@ "@babel/plugin-transform-runtime": "^7.25.9", "@eslint/js": "^9.14.0", "@octokit/rest": "^21.0.2", + "@vitest/browser": "^2.1.8", + "@vitest/coverage-v8": "^2.1.8", "bundlesize": "^0.18.2", - "chai": "^5.1.2", "chalk": "^5.3.0", "concurrently": "^9.1.0", "date-fns": "^4.1.0", @@ -115,22 +115,10 @@ "glob": "^11.0.0", "globals": "^15.12.0", "handlebars": "^4.7.8", + "happy-dom": "^15.11.1", "husky": "^9.1.6", - "jasmine": "^5.4.0", - "jasmine-core": "^5.4.0", - "karma": "^6.4.4", - "karma-chrome-launcher": "^3.2.0", - "karma-coverage": "^2.2.1", - "karma-firefox-launcher": "^2.1.3", - "karma-jasmine": "^5.1.0", - "karma-jasmine-html-reporter": "^2.1.0", - "karma-jasmine-matchers": "^5.0.0", - "karma-junit-reporter": "^2.0.1", - "karma-rollup-preprocessor": "^7.0.8", - "karma-safari-launcher": "^1.0.0", - "karma-sauce-launcher": "^4.3.6", - "karma-spec-reporter": "0.0.36", "lint-staged": "^15.2.10", + "playwright": "^1.49.1", "prettier": "^3.3.3", "read-cache": "^1.0.0", "recursive-readdir": "^2.2.3", @@ -142,16 +130,10 @@ "staged-git-files": "^1.3.0", "start-server-and-test": "^2.0.8", "testcafe": "^3.7.0", - "testcafe-browser-provider-saucelabs": "^3.0.0", "testcafe-reporter-junit": "^3.0.2", - "testcafe-reporter-saucelabs": "^3.5.1", "url-exists-nodejs": "^0.2.4", - "url-parse": "^1.5.10" - }, - "overrides": { - "karma-sauce-launcher": { - "webdriverio": "^8.35.1" - } + "url-parse": "^1.5.10", + "vitest": "^2.1.4" }, "optionalDependencies": { "@rollup/rollup-linux-x64-gnu": "^4.24.4" diff --git a/sauceLabsCapabilities.json b/sauceLabsCapabilities.json deleted file mode 100644 index 073d5e8e2..000000000 --- a/sauceLabsCapabilities.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extendedDebugging": true, - "capturePerformance": true, - "recordScreenshots": false, - "recordVideo": false -} \ No newline at end of file diff --git a/scripts/specs/applicationError.spec.js b/scripts/specs/applicationError.spec.js index 9028e42fb..da1e80f25 100644 --- a/scripts/specs/applicationError.spec.js +++ b/scripts/specs/applicationError.spec.js @@ -9,6 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + +import { describe, it, expect } from "vitest"; import ApplicationError from "../helpers/applicationError.js"; describe("ApplicationError", () => { @@ -19,11 +21,12 @@ describe("ApplicationError", () => { expect(e.name).toEqual("ApplicationError"); } }); + it("works with instanceof", () => { try { throw new ApplicationError("foo"); } catch (e) { - expect(e instanceof ApplicationError).toBeTrue(); + expect(e instanceof ApplicationError).toBeTruthy(); } }); }); diff --git a/scripts/specs/createLogger.spec.js b/scripts/specs/createLogger.spec.js index fc6a59b52..9d91d199a 100644 --- a/scripts/specs/createLogger.spec.js +++ b/scripts/specs/createLogger.spec.js @@ -9,6 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + +import { vi, describe, beforeEach, it, expect } from "vitest"; import chalk from "chalk"; import createLogger from "../helpers/createLogger.js"; @@ -18,40 +20,42 @@ describe("createLogger", () => { const now = new Date(2001, 2, 3, 4, 5, 6, 7); const prefix = chalk.white("[04:05:06.007]"); beforeEach(() => { - myConsole = jasmine.createSpyObj("myConsole", [ - "log", - "info", - "warn", - "error", - ]); + myConsole = { log: vi.fn(), warn: vi.fn(), error: vi.fn(), info: vi.fn() }; logger = createLogger(myConsole, () => now); }); it("adds a prefix", () => { logger.log("mylog"); - expect(myConsole.log).toHaveBeenCalledOnceWith(`${prefix} mylog`); + + expect(myConsole.log).toHaveBeenCalledTimes(1); + expect(myConsole.log).toHaveBeenCalledWith(`${prefix} mylog`); }); it("leaves objects alone", () => { const err = new Error("myerror"); logger.error(err); - expect(myConsole.error).toHaveBeenCalledOnceWith(err); + + expect(myConsole.error).toHaveBeenCalledTimes(1); + expect(myConsole.error).toHaveBeenCalledWith(err); }); it("logs warnings yellow", () => { logger.warn("mywarn"); - expect(myConsole.warn).toHaveBeenCalledOnceWith( + expect(myConsole.warn).toHaveBeenCalledTimes(1); + expect(myConsole.warn).toHaveBeenCalledWith( `${prefix} ${chalk.yellow("mywarn")}`, ); }); it("logs errors red", () => { logger.error("myerror"); - expect(myConsole.error).toHaveBeenCalledOnceWith( + expect(myConsole.error).toHaveBeenCalledWith( `${prefix} ${chalk.red("myerror")}`, ); }); it("logs additional parameters", () => { logger.info("a", "b"); - expect(myConsole.info).toHaveBeenCalledOnceWith(`${prefix} a`, "b"); + + expect(myConsole.info).toHaveBeenCalledTimes(1); + expect(myConsole.info).toHaveBeenCalledWith(`${prefix} a`, "b"); }); }); diff --git a/scripts/specs/exec.spec.js b/scripts/specs/exec.spec.js index dccf0a3cf..9127e3bbe 100644 --- a/scripts/specs/exec.spec.js +++ b/scripts/specs/exec.spec.js @@ -9,6 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + +import { describe, it, expect } from "vitest"; import { Writable } from "stream"; import exec from "../helpers/exec.js"; import ApplicationError from "../helpers/applicationError.js"; @@ -29,9 +31,9 @@ const createStringBackedWritableStream = () => { describe("exec", () => { it("throws an ApplicationError on a non-zero exit code.", async () => { const [outputStream] = createStringBackedWritableStream(); - await expectAsync( - exec("bad exit", "exit 42", { outputStream }), - ).toBeRejectedWithError(ApplicationError); + await expect(exec("bad exit", "exit 42", { outputStream })).rejects.toThrow( + ApplicationError, + ); }); it("logs the exit code", async () => { const [outputStream, getResult] = createStringBackedWritableStream(); diff --git a/scripts/specs/jasmine.json b/scripts/specs/jasmine.json deleted file mode 100644 index 2e0705610..000000000 --- a/scripts/specs/jasmine.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "spec_dir": "scripts/specs", - "spec_files": ["**/*[sS]pec.js"], - "helpers": [], - "stopSpecOnExpectationFailure": false, - "random": true -} diff --git a/scripts/specs/publishTag.spec.js b/scripts/specs/publishTag.spec.js index 45e5c97cc..fd2cb97f5 100644 --- a/scripts/specs/publishTag.spec.js +++ b/scripts/specs/publishTag.spec.js @@ -9,6 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + +import { vi, describe, beforeEach, it, expect } from "vitest"; import publishTag from "../helpers/publishTag.js"; describe("publishTag", () => { @@ -18,28 +20,34 @@ describe("publishTag", () => { let container; beforeEach(() => { - exec = jasmine.createSpy("exec"); - execSync = jasmine.createSpy("execSync"); - logger = jasmine.createSpyObj("logger", ["warn", "info"]); + exec = vi.fn(); + execSync = vi.fn(); + logger = { warn: vi.fn(), info: vi.fn() }; container = { exec, execSync, logger, version: "1.2.3" }; }); it("doesn't publish a tag", async () => { - execSync.and.returnValue("v1.2.3"); + execSync.mockReturnValue("v1.2.3"); await publishTag(container); - expect(logger.warn).toHaveBeenCalledOnceWith( + + expect(logger.warn).toHaveBeenCalledTimes(1); + expect(logger.warn).toHaveBeenCalledWith( "Git tag v1.2.3 already published.", ); expect(logger.info).not.toHaveBeenCalled(); expect(exec).not.toHaveBeenCalled(); }); it("publishes a tag", async () => { - execSync.and.returnValue(""); - exec.and.returnValue(Promise.resolve(), Promise.resolve()); + execSync.mockReturnValue(""); + exec + .mockReturnValueOnce(Promise.resolve()) + .mockReturnValueOnce(Promise.resolve()); await publishTag(container); - expect(logger.info).toHaveBeenCalledOnceWith("Publishing Git tag v1.2.3."); + + expect(logger.info).toHaveBeenCalledTimes(1); + expect(logger.info).toHaveBeenCalledWith("Publishing Git tag v1.2.3."); expect(logger.warn).not.toHaveBeenCalled(); - expect(exec).toHaveBeenCalledWith("git tag", jasmine.any(String)); - expect(exec).toHaveBeenCalledWith("git push", jasmine.any(String)); + expect(exec).toHaveBeenCalledWith("git tag", expect.any(String)); + expect(exec).toHaveBeenCalledWith("git push", expect.any(String)); }); }); diff --git a/scripts/specs/publishToNpm.spec.js b/scripts/specs/publishToNpm.spec.js index f8cc1c773..029722097 100644 --- a/scripts/specs/publishToNpm.spec.js +++ b/scripts/specs/publishToNpm.spec.js @@ -9,6 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + +import { vi, describe, beforeEach, it, expect } from "vitest"; import publishToNpm from "../helpers/publishToNpm.js"; describe("publishToNpm", () => { @@ -20,32 +22,36 @@ describe("publishToNpm", () => { let container; beforeEach(() => { - exec = jasmine.createSpy("exec"); - execSync = jasmine.createSpy("execSync"); - logger = jasmine.createSpyObj("logger", ["warn", "info"]); + exec = vi.fn(); + execSync = vi.fn(); + logger = { warn: vi.fn(), info: vi.fn() }; container = { exec, execSync, logger, npmTag, version }; }); it("publishes to NPM", async () => { - execSync.and.returnValue(""); + execSync.mockReturnValue(""); await publishToNpm(container); - expect(execSync).toHaveBeenCalledOnceWith( + + expect(execSync).toHaveBeenCalledTimes(1); + expect(execSync).toHaveBeenCalledWith( "npm view @adobe/alloy@1.2.3 version --json", ); expect(logger.warn).not.toHaveBeenCalled(); expect(logger.info).toHaveBeenCalledWith("Publishing NPM package."); - expect(exec).toHaveBeenCalledWith("npm publish", jasmine.any(String)); + expect(exec).toHaveBeenCalledWith("npm publish", expect.any(String)); }); it("doesn't publish to NPM", async () => { - execSync.and.returnValue('"1.2.3"'); + execSync.mockReturnValue('"1.2.3"'); await publishToNpm(container); - expect(execSync).toHaveBeenCalledOnceWith( + + expect(execSync).toHaveBeenCalledTimes(1); + expect(execSync).toHaveBeenCalledWith( "npm view @adobe/alloy@1.2.3 version --json", ); - expect(logger.warn).toHaveBeenCalledOnceWith( - "NPM already has version 1.2.3.", - ); + + expect(logger.warn).toHaveBeenCalledTimes(1); + expect(logger.warn).toHaveBeenCalledWith("NPM already has version 1.2.3."); expect(logger.info).not.toHaveBeenCalled(); expect(exec).not.toHaveBeenCalled(); }); diff --git a/scripts/specs/publishVersionBranch.spec.js b/scripts/specs/publishVersionBranch.spec.js index b60677c25..987bd7673 100644 --- a/scripts/specs/publishVersionBranch.spec.js +++ b/scripts/specs/publishVersionBranch.spec.js @@ -9,6 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + +import { vi, describe, beforeEach, it, expect } from "vitest"; import publishVersionBranch from "../helpers/publishVersionBranch.js"; describe("publishVersionBranch", () => { @@ -18,16 +20,18 @@ describe("publishVersionBranch", () => { let container; beforeEach(() => { - exec = jasmine.createSpy("exec"); - execSync = jasmine.createSpy("execSync"); - logger = jasmine.createSpyObj("logger", ["warn", "info"]); + exec = vi.fn(); + execSync = vi.fn(); + logger = { warn: vi.fn(), info: vi.fn() }; container = { exec, execSync, logger, version: "1.2.3" }; }); it("doesn't publish a prerelease branch", async () => { container.version = "1.2.3-beta.0"; await publishVersionBranch(container); - expect(logger.info).toHaveBeenCalledOnceWith( + + expect(logger.info).toHaveBeenCalledTimes(1); + expect(logger.info).toHaveBeenCalledWith( "No need to create a test branch for a prerelease version.", ); expect(logger.warn).not.toHaveBeenCalled(); @@ -36,9 +40,11 @@ describe("publishVersionBranch", () => { }); it("doesn't publish a branch that was already published", async () => { - execSync.and.returnValue("v1.2.3"); + execSync.mockReturnValue("v1.2.3"); await publishVersionBranch(container); - expect(logger.warn).toHaveBeenCalledOnceWith( + + expect(logger.warn).toHaveBeenCalledTimes(1); + expect(logger.warn).toHaveBeenCalledWith( "Git branch v1.2.3 already published.", ); expect(logger.info).not.toHaveBeenCalled(); @@ -46,14 +52,14 @@ describe("publishVersionBranch", () => { }); it("publishes a branch", async () => { - execSync.and.returnValue(""); - exec.and.returnValue(Promise.resolve(), Promise.resolve()); + execSync.mockReturnValue(""); + exec.mockReturnValue(Promise.resolve(), Promise.resolve()); await publishVersionBranch(container); - expect(logger.info).toHaveBeenCalledOnceWith( - "Publishing Git branch v1.2.3.", - ); + + expect(logger.info).toHaveBeenCalledTimes(1); + expect(logger.info).toHaveBeenCalledWith("Publishing Git branch v1.2.3."); expect(logger.warn).not.toHaveBeenCalled(); - expect(exec).toHaveBeenCalledWith("git branch", jasmine.any(String)); - expect(exec).toHaveBeenCalledWith("git push", jasmine.any(String)); + expect(exec).toHaveBeenCalledWith("git branch", expect.any(String)); + expect(exec).toHaveBeenCalledWith("git push", expect.any(String)); }); }); diff --git a/scripts/specs/setupDeployment.spec.js b/scripts/specs/setupDeployment.spec.js index e7eaa003d..5bb66d6df 100644 --- a/scripts/specs/setupDeployment.spec.js +++ b/scripts/specs/setupDeployment.spec.js @@ -9,6 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + +import { vi, describe, beforeEach, it, expect } from "vitest"; import setupDeployment from "../helpers/setupDeployment.js"; describe("setupDeployment", () => { @@ -20,8 +22,8 @@ describe("setupDeployment", () => { let container; beforeEach(() => { - exec = jasmine.createSpy("exec"); - logger = jasmine.createSpyObj("logger", ["info"]); + exec = vi.fn(); + logger = { info: vi.fn() }; container = { exec, githubActor, @@ -37,16 +39,16 @@ describe("setupDeployment", () => { expect(logger.info).toHaveBeenCalled(); // make sure all the container parameters are defined expect(exec).toHaveBeenCalledWith( - jasmine.anything(), - jasmine.stringMatching(/myactor/), + expect.anything(), + expect.stringMatching(/myactor/), ); expect(exec).toHaveBeenCalledWith( - jasmine.anything(), - jasmine.stringMatching(/myrepo/), + expect.anything(), + expect.stringMatching(/myrepo/), ); expect(exec).toHaveBeenCalledWith( - jasmine.anything(), - jasmine.stringMatching(/mytoken/), + expect.anything(), + expect.stringMatching(/mytoken/), ); }); }); diff --git a/scripts/specs/updateDevDependency.spec.js b/scripts/specs/updateDevDependency.spec.js index fe4903d14..70f98fcaf 100644 --- a/scripts/specs/updateDevDependency.spec.js +++ b/scripts/specs/updateDevDependency.spec.js @@ -9,6 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + +import { vi, describe, beforeEach, it, expect } from "vitest"; import updateDevDependency from "../helpers/updateDevDependency.js"; describe("updateDevDependency", () => { @@ -20,35 +22,39 @@ describe("updateDevDependency", () => { let container; beforeEach(() => { - exec = jasmine.createSpy("exec"); - execSync = jasmine.createSpy("execSync"); - logger = jasmine.createSpyObj("logger", ["warn", "info"]); + exec = vi.fn(); + execSync = vi.fn(); + logger = { warn: vi.fn(), info: vi.fn() }; container = { exec, execSync, githubRef, logger, version }; }); it("installs the dev dependency", async () => { - execSync.and.returnValue( + execSync.mockReturnValue( JSON.stringify({ dependencies: { "@adobe/alloy": { version: "1.2.2" } }, }), ); - exec.and.returnValue(Promise.resolve()); + exec.mockReturnValue(Promise.resolve()); await updateDevDependency(container); expect(logger.warn).not.toHaveBeenCalled(); - expect(logger.info).toHaveBeenCalledOnceWith( + + expect(logger.info).toHaveBeenCalledTimes(1); + expect(logger.info).toHaveBeenCalledWith( "Installing @adobe/alloy@1.2.3 as a dev dependency.", ); expect(exec).toHaveBeenCalledTimes(4); }); it("doesn't install the dev dependency", async () => { - execSync.and.returnValue( + execSync.mockReturnValue( JSON.stringify({ dependencies: { "@adobe/alloy": { version: "1.2.3" } }, }), ); await updateDevDependency(container); - expect(logger.warn).toHaveBeenCalledOnceWith( + + expect(logger.warn).toHaveBeenCalledTimes(1); + expect(logger.warn).toHaveBeenCalledWith( "Dependency @adobe/alloy@1.2.3 already installed.", ); expect(logger.info).not.toHaveBeenCalled(); diff --git a/scripts/specs/updatePackageVersion.spec.js b/scripts/specs/updatePackageVersion.spec.js index cfdd9aa7f..ed7304b08 100644 --- a/scripts/specs/updatePackageVersion.spec.js +++ b/scripts/specs/updatePackageVersion.spec.js @@ -9,6 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + +import { vi, describe, beforeEach, it, expect } from "vitest"; import updatePackageVersion from "../helpers/updatePackageVersion.js"; describe("updatePackageVersion", () => { @@ -19,16 +21,16 @@ describe("updatePackageVersion", () => { let container; beforeEach(() => { - exec = jasmine.createSpy("exec"); - exec.and.returnValue(Promise.resolve()); - logger = jasmine.createSpyObj("logger", ["warn", "info"]); + exec = vi.fn().mockReturnValue(Promise.resolve()); + logger = { warn: vi.fn(), info: vi.fn() }; container = { exec, githubRef, logger, version }; }); it("updates the package version", async () => { await updatePackageVersion({ currentVersion: "1.2.2", ...container }); expect(logger.warn).not.toHaveBeenCalled(); - expect(logger.info).toHaveBeenCalledOnceWith( + expect(logger.info).toHaveBeenCalledTimes(1); + expect(logger.info).toHaveBeenCalledWith( "Updating package.json with version 1.2.3.", ); expect(exec).toHaveBeenCalledTimes(5); @@ -36,7 +38,9 @@ describe("updatePackageVersion", () => { it("doesn't update the package version", async () => { await updatePackageVersion({ currentVersion: "1.2.3", ...container }); - expect(logger.warn).toHaveBeenCalledOnceWith( + + expect(logger.warn).toHaveBeenCalledTimes(1); + expect(logger.warn).toHaveBeenCalledWith( "Version in package.json is already 1.2.3.", ); expect(logger.info).not.toHaveBeenCalled(); diff --git a/scripts/specs/uploadToCDN.spec.js b/scripts/specs/uploadToCDN.spec.js index 022793a46..23efcfa48 100644 --- a/scripts/specs/uploadToCDN.spec.js +++ b/scripts/specs/uploadToCDN.spec.js @@ -9,6 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + +import { vi, describe, beforeEach, it, expect } from "vitest"; import ApplicationError from "../helpers/applicationError.js"; import uploadToCDN from "../helpers/uploadToCDN.js"; @@ -20,15 +22,15 @@ describe("uploadToCDN", () => { let container; beforeEach(() => { - exec = jasmine.createSpy("exec"); - exec.and.returnValue(Promise.resolve()); - logger = jasmine.createSpyObj("logger", ["info"]); - urlExists = jasmine.createSpy("urlExists"); + exec = vi.fn(); + exec.mockReturnValue(Promise.resolve()); + logger = { info: vi.fn() }; + urlExists = vi.fn(); container = { exec, logger, urlExists, version }; }); it("uploads to CDN", async () => { - urlExists.and.returnValue(Promise.resolve(true)); + urlExists.mockReturnValue(Promise.resolve(true)); await uploadToCDN(container); expect(logger.info).toHaveBeenCalledWith("Building files for CDN"); expect(exec).toHaveBeenCalledWith("build", "npm run build"); @@ -44,16 +46,20 @@ describe("uploadToCDN", () => { "https://cdn1.adoberesources.net/alloy/1.2.3/alloy.min.js", ); }); + it("fails to upload min file to CDN", async () => { - urlExists.and.returnValues([Promise.resolve(false), Promise.resolve(true)]); - await expectAsync(uploadToCDN(container)).toBeRejectedWithError( - ApplicationError, - ); + urlExists + .mockReturnValueOnce(Promise.resolve(false)) + .mockReturnValueOnce(Promise.resolve(true)); + + await expect(uploadToCDN(container)).rejects.toThrow(ApplicationError); }); + it("fails to upload regular file to CDN", async () => { - urlExists.and.returnValues([Promise.resolve(true), Promise.resolve(false)]); - await expectAsync(uploadToCDN(container)).toBeRejectedWithError( - ApplicationError, - ); + urlExists + .mockReturnValueOnce(Promise.resolve(true)) + .mockReturnValueOnce(Promise.resolve(false)); + + await expect(uploadToCDN(container)).rejects.toThrow(ApplicationError); }); }); diff --git a/scripts/specs/vitest.config.js b/scripts/specs/vitest.config.js new file mode 100644 index 000000000..dd955f623 --- /dev/null +++ b/scripts/specs/vitest.config.js @@ -0,0 +1,12 @@ +// eslint-disable-next-line import/no-unresolved +import { defineProject } from "vitest/config"; + +export default defineProject({ + test: { + name: "scripts-tests", + include: ["scripts/specs/*.{test,spec}.?(c|m)[jt]s?(x)"], + isolate: false, + pool: "threads", + environment: "happy-dom", + }, +}); diff --git a/scripts/specs/withErrorHandling.spec.js b/scripts/specs/withErrorHandling.spec.js index 837d827d7..cac68b756 100644 --- a/scripts/specs/withErrorHandling.spec.js +++ b/scripts/specs/withErrorHandling.spec.js @@ -9,6 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + +import { vi, describe, beforeEach, it, expect } from "vitest"; import ApplicationError from "../helpers/applicationError.js"; import withErrorHandling from "../helpers/withErrorHandling.js"; @@ -19,14 +21,14 @@ describe("withErrorHandling", () => { let func; beforeEach(() => { - logger = jasmine.createSpyObj("logger", ["info", "error"]); - process = jasmine.createSpyObj("process", ["exit"]); + logger = { info: vi.fn(), error: vi.fn() }; + process = { exit: vi.fn() }; container = { logger, process }; - func = jasmine.createSpy("func"); + func = vi.fn(); }); it("runs without failure", async () => { - func.and.returnValue(Promise.resolve()); + func.mockReturnValue(Promise.resolve()); await withErrorHandling(container, "Deploy", func); expect(logger.info).toHaveBeenCalledWith("Deploy."); expect(func).toHaveBeenCalled(); @@ -34,7 +36,9 @@ describe("withErrorHandling", () => { }); it("handles ApplicationErrors", async () => { - func.and.throwError(new ApplicationError("myerrormessage")); + func.mockImplementationOnce(() => { + throw new ApplicationError("myerrormessage"); + }); await withErrorHandling(container, "Deploy", func); expect(logger.info).toHaveBeenCalledWith("Deploy."); expect(logger.error).toHaveBeenCalledWith("Deploy FAILED."); @@ -43,7 +47,9 @@ describe("withErrorHandling", () => { }); it("handles unexpected errors", async () => { const error = new Error("myerrormessage"); - func.and.throwError(error); + func.mockImplementationOnce(() => { + throw error; + }); await withErrorHandling(container, "Deploy", func); expect(logger.info).toHaveBeenCalledWith("Deploy."); expect(logger.error).toHaveBeenCalledWith("Deploy FAILED."); diff --git a/scripts/testConvert.js b/scripts/testConvert.js new file mode 100755 index 000000000..066e377bd --- /dev/null +++ b/scripts/testConvert.js @@ -0,0 +1,367 @@ +#!/usr/bin/env node + +import { execSync as exec } from "child_process"; +import fs from "fs"; +import path from "path"; +import babel from "@babel/core"; + +const getFilesRecursively = (directory, files) => { + const filesInDirectory = fs.readdirSync(directory); + for (let i = 0; i < filesInDirectory.length; i += 1) { + const file = filesInDirectory[i]; + const absolute = path.join(directory, file); + if (fs.statSync(absolute).isDirectory()) { + getFilesRecursively(absolute, files); + } else { + files.push(absolute); + } + } +}; + +const addTopImport = (output) => { + let optionalImports = [ + "beforeEach", + "afterEach", + "afterAll", + "describe", + "it", + "expect", + ]; + const requiredImports = ["vi"]; + + let importIndex = output.indexOf("import") - 1; + + if (importIndex < -1) { + importIndex = output.indexOf("License.\n*/") + 11; + } + + optionalImports = optionalImports.filter((i) => output.indexOf(i) !== -1); + + output = `${output.slice(0, importIndex)}\nimport { ${requiredImports.concat(optionalImports.join(", "))} } from 'vitest';\n${output.slice(importIndex + 1)}`; + return output; +}; + +const start = 0; +const end = 400; + +exec("mkdir -p ./vtest/unit"); +// exec("rm -rf ./vtest/unit/*"); +// +if (!fs.existsSync("./vtest/unit/constants")) { + exec("cp -r ./test/unit/constants ./vtest/unit/constants"); +} + +if (!fs.existsSync("./vtest/unit/helpers")) { + exec("cp -r ./test/unit/helpers ./vtest/unit/helpers"); +} +exec("mkdir -p ./vtest/unit/specs"); + +const t = babel.types; +const f = []; +getFilesRecursively("./vtest/unit/helpers", f); +getFilesRecursively("./test/unit/specs", f); + +f.sort((a, b) => { + const z = [ + "responsesMock/eventResponses.js", + "resetMocks.js", + "functional/helpers/createResponse.js", + ]; + + for (let i = 0; i < z.length; i += 1) { + if (a.includes(z[i])) { + return -1; + } + + if (b.includes(z[i])) { + return 1; + } + } + + return 0; +}); + +for (let fileIndex = start; fileIndex < f.length; fileIndex += 1) { + const filePath = f[fileIndex]; + const newDir = path.dirname(filePath).replace(/^test\/unit/, "vtest/unit"); + const newFilePath = path.join(newDir, path.basename(filePath)); + + if (!fs.existsSync(newFilePath)) { + let output = babel.transformFileSync(filePath, { + plugins: [ + { + visitor: { + Identifier(babelPath) { + if (babelPath.node.name === "callFake") { + // callFake => mockImplementation + babelPath.replaceWith(t.identifier("mockImplementation")); + } else if (babelPath.node.name === "and") { + if (babelPath.parentPath.node.type === "MemberExpression") { + babelPath.parentPath.replaceWith( + babelPath.parentPath.get("object"), + ); + } + } else if (babelPath.node.name === "returnValue") { + babelPath.replaceWith(t.identifier("mockReturnValue")); + } else if ( + ["toBeTrue", "toBeFalse"].includes(babelPath.node.name) + ) { + const booleanValue = babelPath.node.name === "toBeTrue"; + babelPath.replaceWith(t.identifier("toBe")); + + let v = babelPath; + while (v.parentPath.type !== "ExpressionStatement") { + v = v.parentPath; + } + + v.replaceWith( + t.callExpression(v.get("callee").node, [ + t.booleanLiteral(booleanValue), + ]), + ); + + v.stop(); + } else if (babelPath.node.name === "expectAsync") { + const v = babelPath.findParent( + (p) => p.type === "ReturnStatement", + ); + + if (!v) { + return; + } + + let command = "resolves.toBe"; + if ( + v + .get("argument.arguments") + .map((n) => n.node.type) + .includes("ObjectExpression") + ) { + command = "resolves.toStrictEqual"; + } + + if ( + ["toBeRejectedWithError", "toBeRejected"].includes( + v.get("argument.callee.property").node.name, + ) + ) { + command = "rejects.toThrowError"; + } + + if (v.get("argument.callee.property").node.name !== "then") { + const vPath = v.get("argument.callee.property"); + vPath.replaceWith(t.identifier(`${command}`)); + vPath.stop(); + } + + babelPath.replaceWith(t.identifier("expect")); + } else if (babelPath.node.name === "toThrowMatching") { + const parent = babelPath.findParent( + (p) => p.type === "CallExpression", + ); + const regExp = parent.get( + "arguments.0.body.body.0.argument.callee.object", + ); + parent + .get("callee.property") + .replaceWith(t.identifier("toThrowError")); + parent.get("arguments.0").replaceWith(regExp); + } else if (babelPath.node.name === "returnValues") { + const callExpression = babelPath.findParent((p) => + p.isCallExpression(), + ); + + const args = callExpression + .get("arguments") + .map((n) => n.node.name); + + callExpression.replaceWithSourceString( + `${callExpression.get("callee.object").node.name}.${args.map((v) => `mockReturnValueOnce(${v})`).join(".")}`, + ); + } else if (babelPath.node.name === "toHaveBeenCalledOnceWith") { + const callExpression = babelPath + .findParent((p) => p.isExpressionStatement()) + .get("expression"); + + const args = callExpression.get("arguments").map((a) => a.node); + + babelPath.replaceWith(t.identifier("toHaveBeenNthCalledWith")); + + callExpression.replaceWith( + t.callExpression(callExpression.get("callee").node, [ + t.identifier("1"), + ...args, + ]), + ); + } else if (babelPath.node.name === "toBeResolvedTo") { + babelPath.replaceWith(t.identifier("resolves.toStrictEqual")); + } else if (babelPath.node.name === "callThrough") { + const parentMemberExpression = babelPath.findParent((p) => + p.isMemberExpression(), + ); + const parentCallExpression = parentMemberExpression.findParent( + (pp) => pp.isCallExpression(), + ); + const object = parentMemberExpression.get("object"); + parentCallExpression.replaceWith(object); + } else if (babelPath.node.name === "calls") { + const parentPath = babelPath.parentPath.parentPath; + const callExpressionPath = babelPath.findParent((p) => + p.isCallExpression(), + ); + if (callExpressionPath) { + const pathToKeep = callExpressionPath.get("callee"); + const args = callExpressionPath.get("arguments"); + if (parentPath.isMemberExpression()) { + babelPath.parentPath.parentPath.replaceWith( + babelPath.parentPath, + ); + callExpressionPath.replaceWith(pathToKeep); + + babelPath.replaceWith( + t.identifier(`mock.calls[${args[0]}]`), + ); + } + } + } + }, + + MemberExpression(babelPath) { + if ( + babelPath.node.object.name === "jasmine" && + babelPath.node.property.name === "createSpy" + ) { + babelPath.parentPath.replaceWith( + t.callExpression( + t.memberExpression(t.identifier("vi"), t.identifier("fn")), + [], + ), + ); + } else if ( + babelPath.node.object.name === "jasmine" && + [ + "stringMatching", + "any", + "objectContaining", + "stringContaining", + "arrayContaining", + ].includes(babelPath.node.property.name) + ) { + babelPath.replaceWith( + t.memberExpression( + t.identifier("expect"), + babelPath.node.property, + ), + ); + } + }, + + CallExpression(babelPath) { + if ( + babelPath.node.callee.type === "MemberExpression" && + babelPath.node.callee.object.name === "jasmine" && + babelPath.node.callee.property.name === "createSpyObj" + ) { + // jasmine.createSpyObj => object with mocks + const args = babelPath.get("arguments"); + let newProps = []; + + for (let a = 0; a < args.length; a += 1) { + const obj = args[a]; + + if (obj && obj.type === "ObjectExpression") { + const objectProperties = obj.get("properties"); + + for (let i = 0; i < objectProperties.length; i += 1) { + const v = objectProperties[i].get("value"); + const n = v.node; + + newProps.push( + t.objectProperty( + t.identifier( + objectProperties[i].get("key").node.name, + ), + t.callExpression( + t.memberExpression( + t.callExpression( + t.memberExpression( + t.identifier("vi"), + t.identifier("fn"), + ), + [], + ), + t.identifier("mockReturnValue"), + ), + [n], + ), + ), + ); + } + } else if (obj && obj.type === "ArrayExpression") { + try { + // obj.node.elements + newProps = newProps.concat( + obj.node.elements.map((element) => + t.objectProperty( + t.identifier(element.value), + t.identifier("vi.fn()"), + ), + ), + ); + } catch (e) { + // sss + } + } + } + + if (newProps.length) { + babelPath.replaceWith(t.objectExpression(newProps)); + } + } else if ( + babelPath.node.callee.type === "Identifier" && + babelPath.node.callee.name === "spyOn" + ) { + // spyOn => vi.spyOn + const v = babelPath.get("callee"); + v.replaceWith( + t.memberExpression(t.identifier("vi"), t.identifier("spyOn")), + ); + } else if (babelPath.get("callee").node.name === "done") { + babelPath.remove(); + } + }, + }, + }, + ], + }).code; + + output = addTopImport(output); + exec(`mkdir -p ${newDir}`); + if ( + ![ + "vtest/unit/specs/components/Personalization/dom-actions/action.spec.js", + "vtest/unit/specs/components/Personalization/dom-actions/dom/insertBefore.spec.js", + "vtest/unit/specs/components/Personalization/dom-actions/swapImage.spec.js", + "vtest/unit/specs/components/Personalization/dom-actions/remapHeadOffers.spec.js", + "vtest/unit/specs/components/RulesEngine/constants.spec.js", + "vtest/unit/specs/karmaEntry.spec.cjs", + "vtest/unit/specs/utils/cookieJar.spec.js", + "vtest/unit/specs/utils/fireImage.spec.js", + "vtest/unit/specs/utils/querystring.spec.js", + "vtest/unit/specs/utils/request/createRequest.spec.js", + "vtest/unit/specs/utils/request/createRequestPayload.spec.js", + "vtest/unit/specs/utils/uuid.spec.js", + ].includes(newFilePath) + ) { + exec(`touch ${newFilePath}`); + fs.writeFileSync(newFilePath, output); + console.log(`Converted ${newFilePath}`, fileIndex); + } + } else { + console.log(`Skipping ${newFilePath}`, fileIndex); + } + + if (fileIndex === end) { + break; + } +} diff --git a/src/components/Personalization/dom-actions/dom/createFragment.js b/src/components/Personalization/dom-actions/dom/createFragment.js index dc9f8a8f9..8ef84cb17 100644 --- a/src/components/Personalization/dom-actions/dom/createFragment.js +++ b/src/components/Personalization/dom-actions/dom/createFragment.js @@ -13,6 +13,6 @@ governing permissions and limitations under the License. import { createNode } from "../../../../utils/dom/index.js"; import { DIV } from "../../../../constants/tagName.js"; -export default (content) => { +export default (content = "undefined") => { return createNode(DIV, {}, { innerHTML: content }); }; diff --git a/src/components/Personalization/dom-actions/dom/util.js b/src/components/Personalization/dom-actions/dom/util.js index 223ef787a..33b180ee2 100644 --- a/src/components/Personalization/dom-actions/dom/util.js +++ b/src/components/Personalization/dom-actions/dom/util.js @@ -11,7 +11,7 @@ governing permissions and limitations under the License. */ export const addPxIfMissing = (value) => { - const hasPx = ("" + value).endsWith("px"); + const hasPx = `${value}`.endsWith("px"); return hasPx ? value : `${value}px`; }; diff --git a/src/components/StreamingMedia/createTrackMediaSession.js b/src/components/StreamingMedia/createTrackMediaSession.js index 22f9f713c..f82aca490 100644 --- a/src/components/StreamingMedia/createTrackMediaSession.js +++ b/src/components/StreamingMedia/createTrackMediaSession.js @@ -38,7 +38,7 @@ export default ({ getPlayerDetails, legacy, }, - edgeConfigOverrides + edgeConfigOverrides, }); mediaSessionCacheManager.storeSession({ diff --git a/src/components/StreamingMedia/validateMediaSessionOptions.js b/src/components/StreamingMedia/validateMediaSessionOptions.js index 08f61b3fd..89c608d87 100644 --- a/src/components/StreamingMedia/validateMediaSessionOptions.js +++ b/src/components/StreamingMedia/validateMediaSessionOptions.js @@ -30,7 +30,7 @@ export default ({ options }) => { sessionDetails: objectOf(anything()).required(), }), }), - edgeConfigOverrides: objectOf({}) + edgeConfigOverrides: objectOf({}), }).required(), objectOf({ @@ -40,7 +40,7 @@ export default ({ options }) => { sessionDetails: objectOf(anything()).required(), }), }), - edgeConfigOverrides: objectOf({}) + edgeConfigOverrides: objectOf({}), }).required(), ], diff --git a/src/utils/request/createRequestParams.js b/src/utils/request/createRequestParams.js index 6c091a9e3..aed49132d 100644 --- a/src/utils/request/createRequestParams.js +++ b/src/utils/request/createRequestParams.js @@ -9,7 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -import {isEmptyObject} from "../index.js"; +import { isEmptyObject } from "../index.js"; /** * @typedef {{ datastreamId: string, [k: string]: Object }} Override @@ -33,7 +33,10 @@ export default ({ localConfigOverrides, globalConfigOverrides, payload }) => { payload.mergeConfigOverride(globalConfigOverrides); } - if (localConfigOverridesWithoutDatastreamId && !isEmptyObject(localConfigOverridesWithoutDatastreamId)) { + if ( + localConfigOverridesWithoutDatastreamId && + !isEmptyObject(localConfigOverridesWithoutDatastreamId) + ) { payload.mergeConfigOverride(localConfigOverridesWithoutDatastreamId); } return requestParams; diff --git a/test/unit/helpers/assertFunctionCallOrder.js b/test/unit/helpers/assertFunctionCallOrder.js index 9135c7b94..84cd323c3 100644 --- a/test/unit/helpers/assertFunctionCallOrder.js +++ b/test/unit/helpers/assertFunctionCallOrder.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { expect } from "vitest"; /** * Asserts that functions were called in a particular order. @@ -17,8 +18,8 @@ governing permissions and limitations under the License. */ export default (orderedFunctions) => { for (let i = 0; i < orderedFunctions.length - 1; i += 1) { - const fn = orderedFunctions[i]; - const nextFn = orderedFunctions[i + 1]; - expect(fn).toHaveBeenCalledBefore(nextFn); + const callOrder1 = orderedFunctions[i].mock.invocationCallOrder[0]; + const callOrder2 = orderedFunctions[i + 1].mock.invocationCallOrder[0]; + expect(callOrder1).toBeLessThan(callOrder2); } }; diff --git a/test/unit/helpers/createDecoratePropositionForTest.js b/test/unit/helpers/createDecoratePropositionForTest.js index 43528d0d9..418baa23a 100644 --- a/test/unit/helpers/createDecoratePropositionForTest.js +++ b/test/unit/helpers/createDecoratePropositionForTest.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + import { ADOBE_JOURNEY_OPTIMIZER, ADOBE_TARGET, diff --git a/test/unit/helpers/createMockProposition.js b/test/unit/helpers/createMockProposition.js index dafab212f..eb59cc1cc 100644 --- a/test/unit/helpers/createMockProposition.js +++ b/test/unit/helpers/createMockProposition.js @@ -9,13 +9,13 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + import injectCreateProposition from "../../../src/components/Personalization/handlers/injectCreateProposition.js"; const createProposition = injectCreateProposition({ preprocess: (data) => data, isPageWideSurface: () => false, }); - export default (item, scopeDetails = {}) => { return createProposition({ id: "id", diff --git a/test/unit/specs/components/Personalization/dom-actions/remapHeadOffers.spec.js b/test/unit/helpers/createResponse.js similarity index 81% rename from test/unit/specs/components/Personalization/dom-actions/remapHeadOffers.spec.js rename to test/unit/helpers/createResponse.js index d2e9c9d56..1523b9eba 100644 --- a/test/unit/specs/components/Personalization/dom-actions/remapHeadOffers.spec.js +++ b/test/unit/helpers/createResponse.js @@ -10,4 +10,6 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ -// TODO +import injectCreateResponse from "../../../src/core/injectCreateResponse.js"; + +export default injectCreateResponse({ logger: console }); diff --git a/test/unit/helpers/describeRequest.js b/test/unit/helpers/describeRequest.js index 34193403a..78d202a3a 100644 --- a/test/unit/helpers/describeRequest.js +++ b/test/unit/helpers/describeRequest.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import uuidV4Regex from "../constants/uuidV4Regex.js"; /** @@ -19,10 +20,11 @@ export default (createRequest) => { describe("base request functionality", () => { let payload; let request; - beforeEach(() => { payload = {}; - request = createRequest({ payload }); + request = createRequest({ + payload, + }); }); // getAction and getUseSendBeacon will be covered in the tests @@ -31,23 +33,20 @@ export default (createRequest) => { it("provides an ID", () => { expect(request.getId()).toMatch(uuidV4Regex); }); - it("provides payload", () => { expect(request.getPayload()).toBe(payload); }); - it("provides useThirdPartyDomain", () => { - expect(request.getUseIdThirdPartyDomain()).toBeFalse(); + expect(request.getUseIdThirdPartyDomain()).toBe(false); request.setUseIdThirdPartyDomain(); - expect(request.getUseIdThirdPartyDomain()).toBeTrue(); + expect(request.getUseIdThirdPartyDomain()).toBe(true); }); - it("sets isIdentityEstablished", () => { // We only test that isIdentityEstablished is a function. // It sets an internal variable that's passed into // getAction and getUseSendBeacon. This part will be covered in the tests // for the request modules that leverage this base request. - expect(request.setIsIdentityEstablished).toEqual(jasmine.any(Function)); + expect(request.setIsIdentityEstablished).toEqual(expect.any(Function)); }); }); }; diff --git a/test/unit/helpers/describeRequestPayload.js b/test/unit/helpers/describeRequestPayload.js index 98e066424..030e8b36c 100644 --- a/test/unit/helpers/describeRequestPayload.js +++ b/test/unit/helpers/describeRequestPayload.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; /** * Tests the base methods that all types of request payloads share. @@ -16,11 +17,9 @@ governing permissions and limitations under the License. export default (createPayload) => { describe("base request payload functionality", () => { let payload; - beforeEach(() => { payload = createPayload(); }); - it("merges state", () => { payload.mergeState({ fruit: { @@ -54,7 +53,6 @@ export default (createPayload) => { calories: 25, }); }); - it("merges query", () => { payload.mergeQuery({ fruit: { diff --git a/test/unit/helpers/describeValidation.js b/test/unit/helpers/describeValidation.js index 19e5f69d6..f17f04997 100644 --- a/test/unit/helpers/describeValidation.js +++ b/test/unit/helpers/describeValidation.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; export default (description, validator, specObjects) => { describe(description, () => { @@ -16,12 +17,18 @@ export default (description, validator, specObjects) => { ({ value, expected = value, error = false, warning = false }) => { if (error) { it(`rejects ${JSON.stringify(value)}`, () => { - const logger = jasmine.createSpyObj("logger", ["warn"]); + const logger = { + warn: vi.fn(), + }; expect(() => - validator.call({ logger }, value, "mykey"), - ).toThrowMatching((e) => { - return /'mykey[^']*'(:| is)/.test(e.message); - }); + validator.call( + { + logger, + }, + value, + "mykey", + ), + ).toThrowError(/'mykey[^']*'(:| is)/); if (warning) { expect(logger.warn).toHaveBeenCalled(); } else { @@ -29,13 +36,19 @@ export default (description, validator, specObjects) => { } }); } else { - it(`transforms \`${JSON.stringify(value)}\` to \`${JSON.stringify( - expected, - )}\``, () => { - const logger = jasmine.createSpyObj("logger", ["warn"]); - expect(validator.call({ logger }, value, "mykey")).toEqual( - expected, - ); + it(`transforms \`${JSON.stringify(value)}\` to \`${JSON.stringify(expected)}\``, () => { + const logger = { + warn: vi.fn(), + }; + expect( + validator.call( + { + logger, + }, + value, + "mykey", + ), + ).toEqual(expected); if (warning) { expect(logger.warn).toHaveBeenCalled(); } else { diff --git a/test/unit/helpers/flushPromiseChains.js b/test/unit/helpers/flushPromiseChains.js index aeb6eea8b..7e05a6b18 100644 --- a/test/unit/helpers/flushPromiseChains.js +++ b/test/unit/helpers/flushPromiseChains.js @@ -19,12 +19,10 @@ governing permissions and limitations under the License. */ export default () => { let promise; - for (let i = 0; i < 10; i += 1) { promise = promise ? promise.then(() => Promise.resolve()) : Promise.resolve(); } - return promise; }; diff --git a/test/unit/helpers/pause.js b/test/unit/helpers/pause.js index 11156a675..d28f841bb 100644 --- a/test/unit/helpers/pause.js +++ b/test/unit/helpers/pause.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + export default (ms) => new Promise((resolve) => { setTimeout(resolve, ms); diff --git a/test/unit/helpers/testConfigValidators.js b/test/unit/helpers/testConfigValidators.js index 05ef4fb32..b573fef58 100644 --- a/test/unit/helpers/testConfigValidators.js +++ b/test/unit/helpers/testConfigValidators.js @@ -9,6 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, it, expect } from "vitest"; + export default ({ configValidators, validConfigurations, @@ -21,7 +23,6 @@ export default ({ configValidators(cfg); }); }); - invalidConfigurations.forEach((cfg, i) => { it(`invalidates configuration (${i})`, () => { expect(() => { @@ -29,18 +30,23 @@ export default ({ }).toThrowError(); }); }); - it("provides default values", () => { const config = configValidators({}); Object.keys(defaultValues).forEach((key) => { expect(config[key]).toBe(defaultValues[key]); }); }); - deprecatedConfigurations.forEach((cfg, i) => { it(`outputs messages for deprecated fields (${i})`, () => { - const logger = jasmine.createSpyObj("logger", ["warn"]); - configValidators.call({ logger }, cfg); + const logger = { + warn: vi.fn(), + }; + configValidators.call( + { + logger, + }, + cfg, + ); expect(logger.warn).toHaveBeenCalled(); }); }); diff --git a/test/unit/specs/components/ActivityCollector/attachClickActivityCollector.spec.js b/test/unit/specs/components/ActivityCollector/attachClickActivityCollector.spec.js index 52637f8fb..d5fc9346f 100644 --- a/test/unit/specs/components/ActivityCollector/attachClickActivityCollector.spec.js +++ b/test/unit/specs/components/ActivityCollector/attachClickActivityCollector.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import attachClickActivityCollector from "../../../../../src/components/ActivityCollector/attachClickActivityCollector.js"; import flushPromiseChains from "../../../helpers/flushPromiseChains.js"; @@ -21,23 +22,24 @@ describe("ActivityCollector::attachClickActivityCollector", () => { let handleError; beforeEach(() => { config.clickCollectionEnabled = true; - eventManager = jasmine.createSpyObj("eventManager", { - createEvent: { + eventManager = { + createEvent: vi.fn().mockReturnValue({ isEmpty: () => false, documentMayUnload: () => false, - }, - sendEvent: Promise.resolve(), - }); - lifecycle = jasmine.createSpyObj("lifecycle", { - onClick: Promise.resolve(), - }); + }), + sendEvent: vi.fn().mockReturnValue(Promise.resolve()), + }; + lifecycle = { + onClick: vi.fn().mockReturnValue(Promise.resolve()), + }; // eslint-disable-next-line no-unused-vars - spyOn(document, "addEventListener").and.callFake((name, handler, type) => { - clickHandler = handler; - }); - handleError = jasmine.createSpy("handleError"); + vi.spyOn(document, "addEventListener").mockImplementation( + (name, handler) => { + clickHandler = handler; + }, + ); + handleError = vi.fn(); }); - const build = () => { attachClickActivityCollector({ config, @@ -46,24 +48,20 @@ describe("ActivityCollector::attachClickActivityCollector", () => { handleError, }); }; - it("Attaches click handler if clickCollectionEnabled is set to true", () => { build(); expect(document.addEventListener).toHaveBeenCalled(); }); - it("Attaches click handler if clickCollectionEnabled is set to false", () => { config.clickCollectionEnabled = false; build(); expect(document.addEventListener).toHaveBeenCalled(); }); - it("Publishes onClick lifecycle events at clicks when clickCollectionEnabled is set to true", () => { build(); clickHandler({}); expect(lifecycle.onClick).toHaveBeenCalled(); }); - it("Does not publish onClick lifecycle events for AppMeasurement repropagated click-events", () => { build(); const clickEvent = { @@ -72,10 +70,9 @@ describe("ActivityCollector::attachClickActivityCollector", () => { clickHandler(clickEvent); expect(lifecycle.onClick).not.toHaveBeenCalled(); }); - it("Handles errors inside onClick lifecycle", () => { const error = new Error("Bad thing happened."); - lifecycle.onClick.and.returnValue(Promise.reject(error)); + lifecycle.onClick.mockReturnValue(Promise.reject(error)); build(); return clickHandler({}) .then(() => { @@ -85,7 +82,6 @@ describe("ActivityCollector::attachClickActivityCollector", () => { expect(handleError).toHaveBeenCalledWith(error, "click collection"); }); }); - it("Sends populated events", () => { build(); return clickHandler({}) @@ -96,9 +92,8 @@ describe("ActivityCollector::attachClickActivityCollector", () => { expect(eventManager.sendEvent).toHaveBeenCalled(); }); }); - it("Does not send empty events", () => { - eventManager.createEvent.and.returnValue({ + eventManager.createEvent.mockReturnValue({ isEmpty: () => true, documentMayUnload: () => false, }); @@ -111,10 +106,9 @@ describe("ActivityCollector::attachClickActivityCollector", () => { expect(eventManager.sendEvent).not.toHaveBeenCalled(); }); }); - it("handles errors thrown in sendEvent", () => { const error = new Error("Network Error"); - eventManager.sendEvent.and.returnValue(Promise.reject(error)); + eventManager.sendEvent.mockReturnValue(Promise.reject(error)); build(); return clickHandler({}) .then(() => { diff --git a/test/unit/specs/components/ActivityCollector/configValidators.spec.js b/test/unit/specs/components/ActivityCollector/configValidators.spec.js index bce60ec05..6736cb31a 100644 --- a/test/unit/specs/components/ActivityCollector/configValidators.spec.js +++ b/test/unit/specs/components/ActivityCollector/configValidators.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import configValidators from "../../../../../src/components/ActivityCollector/configValidators.js"; import testConfigValidators from "../../../helpers/testConfigValidators.js"; @@ -27,7 +28,9 @@ describe("ActivityCollector config validators", () => { }, ], invalidConfigurations: [ - { clickCollectionEnabled: "" }, + { + clickCollectionEnabled: "", + }, { clickCollectionEnabled: true, downloadLinkQualifier: "[", diff --git a/test/unit/specs/components/ActivityCollector/createClickActivityStorage.spec.js b/test/unit/specs/components/ActivityCollector/createClickActivityStorage.spec.js index 9706ec871..ea9951f67 100644 --- a/test/unit/specs/components/ActivityCollector/createClickActivityStorage.spec.js +++ b/test/unit/specs/components/ActivityCollector/createClickActivityStorage.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createClickActivityStorage from "../../../../../src/components/ActivityCollector/createClickActivityStorage.js"; import { CLICK_ACTIVITY_DATA } from "../../../../../src/constants/sessionDataKeys.js"; @@ -17,33 +18,35 @@ describe("ActivityCollector::createClickActivityStorage", () => { let storage; let clickActivityStorage; beforeEach(() => { - storage = jasmine.createSpyObj("storage", [ - "getItem", - "setItem", - "removeItem", - ]); - clickActivityStorage = createClickActivityStorage({ storage }); + storage = { + getItem: vi.fn(), + setItem: vi.fn(), + removeItem: vi.fn(), + }; + clickActivityStorage = createClickActivityStorage({ + storage, + }); }); - it("saves data", () => { - clickActivityStorage.save({ key: "value" }); + clickActivityStorage.save({ + key: "value", + }); expect(storage.setItem).toHaveBeenCalledWith( CLICK_ACTIVITY_DATA, '{"key":"value"}', ); }); - it("loads data", () => { - storage.getItem.and.returnValue('{"key":"value"}'); + storage.getItem.mockReturnValue('{"key":"value"}'); const data = clickActivityStorage.load(); - expect(data).toEqual({ key: "value" }); + expect(data).toEqual({ + key: "value", + }); }); - it("loads null when no data is present", () => { const data = clickActivityStorage.load(); expect(data).toBeNull(); }); - it("removes data", () => { clickActivityStorage.remove(); expect(storage.removeItem).toHaveBeenCalledWith(CLICK_ACTIVITY_DATA); diff --git a/test/unit/specs/components/ActivityCollector/createClickedElementProperties.spec.js b/test/unit/specs/components/ActivityCollector/createClickedElementProperties.spec.js index 6e4720367..f27876067 100644 --- a/test/unit/specs/components/ActivityCollector/createClickedElementProperties.spec.js +++ b/test/unit/specs/components/ActivityCollector/createClickedElementProperties.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createClickedElementProperties from "../../../../../src/components/ActivityCollector/createClickedElementProperties.js"; describe("ActivityCollector::createClickedElementProperties", () => { @@ -25,34 +26,46 @@ describe("ActivityCollector::createClickedElementProperties", () => { }; }); it("Should return object with the init properties", () => { - const props = createClickedElementProperties({ properties }); + const props = createClickedElementProperties({ + properties, + }); expect(props.properties).toEqual(properties); }); it("Can determine it holds valid link properties", () => { - const props = createClickedElementProperties({ properties }); + const props = createClickedElementProperties({ + properties, + }); expect(props.isValidLink()).toBe(true); }); it("Can determine it holds invalid link properties", () => { let props = createClickedElementProperties({}); expect(props.isValidLink()).toBe(false); - props = createClickedElementProperties({ properties }); + props = createClickedElementProperties({ + properties, + }); props.linkName = ""; expect(props.isValidLink()).toBe(false); }); it("Can determine it holds internal link properties", () => { - const props = createClickedElementProperties({ properties }); + const props = createClickedElementProperties({ + properties, + }); expect(props.isInternalLink()).toBe(false); props.linkType = "other"; expect(props.isInternalLink()).toBe(true); }); it("Can determine it holds valid ActivityMap properties", () => { - const props = createClickedElementProperties({ properties }); + const props = createClickedElementProperties({ + properties, + }); expect(props.isValidActivityMapData()).toBe(true); props.pageName = ""; expect(props.isValidActivityMapData()).toBe(false); }); it("Can convert properties to a populated DATA Analytics schema with ActivityMap data", () => { - const props = createClickedElementProperties({ properties }); + const props = createClickedElementProperties({ + properties, + }); const data = props.data; expect(data).toEqual({ __adobe: { @@ -72,7 +85,9 @@ describe("ActivityCollector::createClickedElementProperties", () => { }); }); it("Can convert properties to a populated XDM Analytics schema with ActivityMap data", () => { - const props = createClickedElementProperties({ properties }); + const props = createClickedElementProperties({ + properties, + }); const data = props.xdm; expect(data).toEqual({ eventType: "web.webinteraction.linkClicks", @@ -135,7 +150,9 @@ describe("ActivityCollector::createClickedElementProperties", () => { }); }); it("Can apply a property filter", () => { - const props = createClickedElementProperties({ properties }); + const props = createClickedElementProperties({ + properties, + }); // Need a clickedElement for the filter to be executed props.clickedElement = {}; const filter = (p) => { @@ -145,8 +162,13 @@ describe("ActivityCollector::createClickedElementProperties", () => { expect(props.linkType).toBe("filtered"); }); it("Prints message when filter rejects properties", () => { - const logger = jasmine.createSpyObj("logger", ["info"]); - const props = createClickedElementProperties({ properties, logger }); + const logger = { + info: vi.fn(), + }; + const props = createClickedElementProperties({ + properties, + logger, + }); // Need a clickedElement for the filter to be executed props.clickedElement = {}; const filter = (p) => { @@ -155,13 +177,15 @@ describe("ActivityCollector::createClickedElementProperties", () => { }; props.applyPropertyFilter(filter); expect(logger.info).toHaveBeenCalledWith( - jasmine.stringMatching( + expect.stringMatching( /^Clicked element properties were rejected by filter function/, ), ); }); it("Can apply a property filter for all properties", () => { - const props = createClickedElementProperties({ properties }); + const props = createClickedElementProperties({ + properties, + }); props.clickedElement = {}; const filter = (p) => { p.pageName = "filtered"; @@ -176,7 +200,9 @@ describe("ActivityCollector::createClickedElementProperties", () => { expect(props.pageName).toBe("filtered"); }); it("Can apply an options property filter", () => { - const props = createClickedElementProperties({ properties }); + const props = createClickedElementProperties({ + properties, + }); // Need a clickedElement for the filter to be executed props.clickedElement = {}; const filter = (options) => { @@ -186,7 +212,9 @@ describe("ActivityCollector::createClickedElementProperties", () => { expect(props.linkType).toBe("filtered"); }); it("Can apply an options property filter for all properties", () => { - const props = createClickedElementProperties({ properties }); + const props = createClickedElementProperties({ + properties, + }); props.clickedElement = {}; const filter = (options) => { if ( diff --git a/test/unit/specs/components/ActivityCollector/createGetClickedElementProperties.spec.js b/test/unit/specs/components/ActivityCollector/createGetClickedElementProperties.spec.js index cc5628e83..370e5707f 100644 --- a/test/unit/specs/components/ActivityCollector/createGetClickedElementProperties.spec.js +++ b/test/unit/specs/components/ActivityCollector/createGetClickedElementProperties.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createGetClickedElementProperties from "../../../../../src/components/ActivityCollector/createGetClickedElementProperties.js"; import createClickActivityStorage from "../../../../../src/components/ActivityCollector/createClickActivityStorage.js"; @@ -28,7 +29,6 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { href: "index.html", nodeType: 1, }; - let getLinkName; let getLinkRegion; let getAbsoluteUrlFromAnchorElement; @@ -37,14 +37,14 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { let logger; let clickActivityStorage; beforeEach(() => { - getLinkName = jasmine.createSpy("getLinkName"); - getLinkRegion = jasmine.createSpy("getLinkRegion"); - getAbsoluteUrlFromAnchorElement = jasmine.createSpy( - "getAbsoluteUrlFromAnchorElement", - ); - findClickableElement = jasmine.createSpy("findClickableElement"); - determineLinkType = jasmine.createSpy("determineLinkType"); - logger = jasmine.createSpyObj("logger", ["info"]); + getLinkName = vi.fn(); + getLinkRegion = vi.fn(); + getAbsoluteUrlFromAnchorElement = vi.fn(); + findClickableElement = vi.fn(); + determineLinkType = vi.fn(); + logger = { + info: vi.fn(), + }; clickActivityStorage = createClickActivityStorage({ storage: { getItem: () => {}, @@ -53,7 +53,6 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { }, }); }); - it("Returns complete linkDetails when it is a supported anchor element", () => { const config = { onBeforeLinkClickSend: (options) => { @@ -64,12 +63,11 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { externalLink: true, }, }; - getLinkRegion.and.returnValue("root"); - getLinkName.and.returnValue("Go to cart"); - getAbsoluteUrlFromAnchorElement.and.returnValue("http://blah.com"); - findClickableElement.and.returnValue(supportedLinkElement); - determineLinkType.and.returnValue("exit"); - + getLinkRegion.mockReturnValue("root"); + getLinkName.mockReturnValue("Go to cart"); + getAbsoluteUrlFromAnchorElement.mockReturnValue("http://blah.com"); + findClickableElement.mockReturnValue(supportedLinkElement); + determineLinkType.mockReturnValue("exit"); const getClickedElementProperties = createGetClickedElementProperties({ getLinkRegion, getLinkName, @@ -78,7 +76,6 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { determineLinkType, window: mockWindow, }); - const result = getClickedElementProperties({ clickedElement: {}, config, @@ -87,7 +84,6 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { }); // I have to set this manually because of passing in {} as the clickedElement result.pageIDType = 0; - expect(result.options).toEqual({ xdm: { eventType: "web.webinteraction.linkClicks", @@ -123,7 +119,6 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { clickedElement: {}, }); }); - it("Returns undefined when the customer callback returns false", () => { const config = { onBeforeLinkClickSend: () => { @@ -133,12 +128,11 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { externalLink: true, }, }; - getLinkRegion.and.returnValue("root"); - getLinkName.and.returnValue("Go to cart"); - getAbsoluteUrlFromAnchorElement.and.returnValue("http://blah.com"); - findClickableElement.and.returnValue(supportedLinkElement); - determineLinkType.and.returnValue("exit"); - + getLinkRegion.mockReturnValue("root"); + getLinkName.mockReturnValue("Go to cart"); + getAbsoluteUrlFromAnchorElement.mockReturnValue("http://blah.com"); + findClickableElement.mockReturnValue(supportedLinkElement); + determineLinkType.mockReturnValue("exit"); const getClickedElementProperties = createGetClickedElementProperties({ getLinkRegion, getLinkName, @@ -147,7 +141,6 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { determineLinkType, window: mockWindow, }); - const result = getClickedElementProperties({ clickedElement: {}, config, @@ -156,7 +149,6 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { }); expect(result.options).toEqual(undefined); }); - it("Returns undefined when not supported anchor element", () => { const config = { onBeforeLinkClickSend: () => { @@ -166,12 +158,11 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { externalLink: true, }, }; - getLinkRegion.and.returnValue(undefined); - getLinkName.and.returnValue("Go to cart"); - getAbsoluteUrlFromAnchorElement.and.returnValue("http://blah.com"); - findClickableElement.and.returnValue(undefined); - determineLinkType.and.returnValue("exit"); - + getLinkRegion.mockReturnValue(undefined); + getLinkName.mockReturnValue("Go to cart"); + getAbsoluteUrlFromAnchorElement.mockReturnValue("http://blah.com"); + findClickableElement.mockReturnValue(undefined); + determineLinkType.mockReturnValue("exit"); const getClickedElementProperties = createGetClickedElementProperties({ getLinkRegion, getLinkName, @@ -180,7 +171,6 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { determineLinkType, window: mockWindow, }); - const result = getClickedElementProperties({ clickedElement: {}, config, @@ -189,7 +179,6 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { }); expect(result.options).toEqual(undefined); }); - it("Returns only options with data element if clickable element is missing href", () => { const config = { onBeforeLinkClickSend: () => { @@ -199,12 +188,11 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { externalLink: true, }, }; - getLinkRegion.and.returnValue("root"); - getLinkName.and.returnValue("Go to cart"); - getAbsoluteUrlFromAnchorElement.and.returnValue(undefined); - findClickableElement.and.returnValue(supportedLinkElement); - determineLinkType.and.returnValue("exit"); - + getLinkRegion.mockReturnValue("root"); + getLinkName.mockReturnValue("Go to cart"); + getAbsoluteUrlFromAnchorElement.mockReturnValue(undefined); + findClickableElement.mockReturnValue(supportedLinkElement); + determineLinkType.mockReturnValue("exit"); const getClickedElementProperties = createGetClickedElementProperties({ getLinkRegion, getLinkName, @@ -213,7 +201,6 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { determineLinkType, window: mockWindow, }); - const result = getClickedElementProperties({ clickedElement: {}, config, @@ -242,7 +229,6 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { clickedElement: {}, }); }); - it("Returns the object with link details when callback does not return explicit false ", () => { const config = { onBeforeLinkClickSend: () => {}, @@ -250,12 +236,11 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { externalLink: true, }, }; - getLinkRegion.and.returnValue("root"); - getLinkName.and.returnValue("Go to cart"); - getAbsoluteUrlFromAnchorElement.and.returnValue("http://blah.com"); - findClickableElement.and.returnValue(supportedLinkElement); - determineLinkType.and.returnValue("exit"); - + getLinkRegion.mockReturnValue("root"); + getLinkName.mockReturnValue("Go to cart"); + getAbsoluteUrlFromAnchorElement.mockReturnValue("http://blah.com"); + findClickableElement.mockReturnValue(supportedLinkElement); + determineLinkType.mockReturnValue("exit"); const getClickedElementProperties = createGetClickedElementProperties({ getLinkRegion, getLinkName, @@ -264,7 +249,6 @@ describe("ActivityCollector::createGetClickedElementProperties", () => { determineLinkType, window: mockWindow, }); - const result = getClickedElementProperties({ clickedElement: {}, config, diff --git a/test/unit/specs/components/ActivityCollector/createInjectClickedElementProperties.spec.js b/test/unit/specs/components/ActivityCollector/createInjectClickedElementProperties.spec.js index 1fd528766..b909d7b8e 100644 --- a/test/unit/specs/components/ActivityCollector/createInjectClickedElementProperties.spec.js +++ b/test/unit/specs/components/ActivityCollector/createInjectClickedElementProperties.spec.js @@ -10,19 +10,17 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import createInjectClickedElementProperties from "../../../../../src/components/ActivityCollector/createInjectClickedElementProperties.js"; import createEvent from "../../../../../src/core/createEvent.js"; import { downloadLinkQualifier as dlwValidator } from "../../../../../src/components/ActivityCollector/configValidators.js"; describe("ActivityCollector::createInjectClickedElementProperties", () => { - const getClickedElementProperties = jasmine.createSpy( - "getClickedElementProperties", - ); - const clickActivityStorage = jasmine.createSpyObj("clickActivityStorage", [ - "save", - ]); + const getClickedElementProperties = vi.fn(); + const clickActivityStorage = { + save: vi.fn(), + }; const downloadLinkQualifier = dlwValidator(); - it("Extends event XDM data with link information for supported anchor elements when clickCollectionEnabled", () => { const config = { downloadLinkQualifier, @@ -30,10 +28,14 @@ describe("ActivityCollector::createInjectClickedElementProperties", () => { clickCollection: {}, }; const injectClickedElementProperties = createInjectClickedElementProperties( - { getClickedElementProperties, clickActivityStorage, config }, + { + getClickedElementProperties, + clickActivityStorage, + config, + }, ); const event = createEvent(); - getClickedElementProperties.and.returnValue({ + getClickedElementProperties.mockReturnValue({ xdm: { web: { webInteraction: { @@ -46,10 +48,12 @@ describe("ActivityCollector::createInjectClickedElementProperties", () => { isInternalLink: () => false, isValidActivityMapData: () => true, }); - injectClickedElementProperties({ event, clickedElement: {} }); + injectClickedElementProperties({ + event, + clickedElement: {}, + }); expect(event.isEmpty()).toBe(false); }); - it("Does not extend event XDM data when clickCollectionEnabled is false", () => { const event = createEvent(); const config = { @@ -62,7 +66,7 @@ describe("ActivityCollector::createInjectClickedElementProperties", () => { config, }, ); - getClickedElementProperties.and.returnValue({ + getClickedElementProperties.mockReturnValue({ xdm: { web: { webInteraction: { @@ -72,10 +76,12 @@ describe("ActivityCollector::createInjectClickedElementProperties", () => { }, data: {}, }); - injectClickedElementProperties({ clickedElement: {}, event }); + injectClickedElementProperties({ + clickedElement: {}, + event, + }); expect(event.isEmpty()).toBe(true); }); - it("Does not extend event XDM data with link information for unsupported anchor elements", () => { const event = createEvent(); const config = { @@ -90,16 +96,18 @@ describe("ActivityCollector::createInjectClickedElementProperties", () => { config, }, ); - getClickedElementProperties.and.returnValue({ + getClickedElementProperties.mockReturnValue({ data: {}, isValidLink: () => false, isInternalLink: () => false, isValidActivityMapData: () => true, }); - injectClickedElementProperties({ clickedElement: {}, event }); + injectClickedElementProperties({ + clickedElement: {}, + event, + }); expect(event.isEmpty()).toBe(true); }); - it("Does not save click data to storage if onBeforeLinkClickSend is defined", () => { const config = { clickCollectionEnabled: true, @@ -109,8 +117,10 @@ describe("ActivityCollector::createInjectClickedElementProperties", () => { }, onBeforeLinkClickSend: () => {}, }; - const logger = jasmine.createSpyObj("logger", ["info"]); - getClickedElementProperties.and.returnValue({ + const logger = { + info: vi.fn(), + }; + getClickedElementProperties.mockReturnValue({ isValidLink: () => true, isInternalLink: () => true, pageName: "testPage", @@ -126,8 +136,14 @@ describe("ActivityCollector::createInjectClickedElementProperties", () => { clickActivityStorage, }, ); - const event = jasmine.createSpyObj("event", ["mergeXdm", "mergeData"]); - injectClickedElementProperties({ clickedElement: {}, event }); + const event = { + mergeXdm: vi.fn(), + mergeData: vi.fn(), + }; + injectClickedElementProperties({ + clickedElement: {}, + event, + }); // No click data should be saved to storage, only the page data. expect(clickActivityStorage.save).toHaveBeenCalledWith({ pageName: "testPage", diff --git a/test/unit/specs/components/ActivityCollector/createRecallAndInjectClickedElementProperties.spec.js b/test/unit/specs/components/ActivityCollector/createRecallAndInjectClickedElementProperties.spec.js index 20428cdd4..f9da1e4cc 100644 --- a/test/unit/specs/components/ActivityCollector/createRecallAndInjectClickedElementProperties.spec.js +++ b/test/unit/specs/components/ActivityCollector/createRecallAndInjectClickedElementProperties.spec.js @@ -10,36 +10,38 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createRecallAndInjectClickedElementProperties from "../../../../../src/components/ActivityCollector/createRecallAndInjectClickedElementProperties.js"; describe("ActivityCollector::createRecallAndInjectClickedElementProperties", () => { let props; let clickActivityStorage; let event; - beforeEach(() => { props = {}; clickActivityStorage = { - load: jasmine.createSpy().and.returnValue(props), - save: jasmine.createSpy(), + load: vi.fn().mockReturnValue(props), + save: vi.fn(), }; event = { - mergeXdm: jasmine.createSpy(), - mergeData: jasmine.createSpy(), + mergeXdm: vi.fn(), + mergeData: vi.fn(), }; }); - it("should return a function", () => { const recallAndInjectClickedElementProperties = - createRecallAndInjectClickedElementProperties({ clickActivityStorage }); + createRecallAndInjectClickedElementProperties({ + clickActivityStorage, + }); expect(recallAndInjectClickedElementProperties).toEqual( - jasmine.any(Function), + expect.any(Function), ); }); - it("should merge stored clicked element properties to event XDM and DATA", () => { const recallClickElementProperties = - createRecallAndInjectClickedElementProperties({ clickActivityStorage }); + createRecallAndInjectClickedElementProperties({ + clickActivityStorage, + }); props.pageName = "examplePage"; props.linkName = "example"; props.linkRegion = "exampleRegion"; diff --git a/test/unit/specs/components/ActivityCollector/createStorePageViewProperties.spec.js b/test/unit/specs/components/ActivityCollector/createStorePageViewProperties.spec.js index fac787e2e..b163d5f6d 100644 --- a/test/unit/specs/components/ActivityCollector/createStorePageViewProperties.spec.js +++ b/test/unit/specs/components/ActivityCollector/createStorePageViewProperties.spec.js @@ -10,23 +10,22 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createStorePageViewProperties from "../../../../../src/components/ActivityCollector/createStorePageViewProperties.js"; describe("ActivityCollector::createStorePageViewProperties", () => { let clickActivityStorage; beforeEach(() => { clickActivityStorage = { - save: jasmine.createSpy(), + save: vi.fn(), }; }); - it("should return a function", () => { const storePageViewProperties = createStorePageViewProperties({ clickActivityStorage, }); - expect(storePageViewProperties).toEqual(jasmine.any(Function)); + expect(storePageViewProperties).toEqual(expect.any(Function)); }); - it("stores page view properties when available in event", () => { const storePageViewProperties = createStorePageViewProperties({ clickActivityStorage, diff --git a/test/unit/specs/components/ActivityCollector/getLinkName.spec.js b/test/unit/specs/components/ActivityCollector/getLinkName.spec.js index ba9c492b1..44a1bbaef 100644 --- a/test/unit/specs/components/ActivityCollector/getLinkName.spec.js +++ b/test/unit/specs/components/ActivityCollector/getLinkName.spec.js @@ -9,6 +9,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import getLinkName from "../../../../../src/components/ActivityCollector/getLinkName.js"; const createNodeWithAttribute = (nodeName, attributeName, attributeValue) => { @@ -24,12 +25,10 @@ const createNodeWithAttribute = (nodeName, attributeName, attributeValue) => { node[attributeName] = attributeValue; return node; }; - describe("ActivityCollector::getLinkName", () => { it("Returns empty string if no link-name can be constructed", () => { expect(getLinkName({})).toBe(""); }); - it("Prioritizes node innerText over textContent", () => { // The innerText always takes priority when determining the link-name // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText @@ -86,7 +85,6 @@ describe("ActivityCollector::getLinkName", () => { }), ).toBe("Click Here"); }); - it("Select link-name based on a property hierarchy", () => { expect( getLinkName({ @@ -125,7 +123,6 @@ describe("ActivityCollector::getLinkName", () => { }), ).toBe("image.jpg"); }); - it("Truncates excess whitespace in link-name", () => { expect( getLinkName({ @@ -136,7 +133,6 @@ describe("ActivityCollector::getLinkName", () => { ).toBe("ab c"); }); }); - it("Ignores the spaces attributes", () => { expect( getLinkName({ diff --git a/test/unit/specs/components/ActivityCollector/getLinkRegion.spec.js b/test/unit/specs/components/ActivityCollector/getLinkRegion.spec.js index dc8e3f13a..025877f52 100644 --- a/test/unit/specs/components/ActivityCollector/getLinkRegion.spec.js +++ b/test/unit/specs/components/ActivityCollector/getLinkRegion.spec.js @@ -9,6 +9,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import getLinkRegion from "../../../../../src/components/ActivityCollector/getLinkRegion.js"; const createChildElement = (element) => { @@ -16,12 +17,10 @@ const createChildElement = (element) => { parentNode: element, }; }; - describe("ActivityCollector::getLinkRegion", () => { it("Returns BODY if no region is found", () => { expect(getLinkRegion({})).toBe("BODY"); }); - it("Picks region properties based on priority", () => { const tests = [ { @@ -54,7 +53,6 @@ describe("ActivityCollector::getLinkRegion", () => { }); expect(getLinkRegion({})).toBe("BODY"); }); - it("Traverses up the DOM to find a region", () => { const element = { id: "3-levels", @@ -62,7 +60,6 @@ describe("ActivityCollector::getLinkRegion", () => { const anchor = createChildElement(createChildElement(element)); expect(getLinkRegion(anchor)).toBe("3-levels"); }); - it("Supports setting region as semantic element name for supported elements", () => { const tests = [ { @@ -102,7 +99,6 @@ describe("ActivityCollector::getLinkRegion", () => { }); expect(getLinkRegion({})).toBe("BODY"); }); - it("Truncates excess whitespace in region", () => { const element = { id: " ab c", diff --git a/test/unit/specs/components/ActivityCollector/utils/activityMapExtensionEnabled.spec.js b/test/unit/specs/components/ActivityCollector/utils/activityMapExtensionEnabled.spec.js index 9b35a233c..48e107827 100644 --- a/test/unit/specs/components/ActivityCollector/utils/activityMapExtensionEnabled.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/activityMapExtensionEnabled.spec.js @@ -10,26 +10,25 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import activityMapExtensionEnabled from "../../../../../../src/components/ActivityCollector/utils/activityMapExtensionEnabled.js"; const ACTIVITY_MAP_EXTENSION_ID = "cppXYctnr"; - describe("ActivityCollector::activityMapExtensionEnabled", () => { it("should return true if the activity map extension is enabled", () => { const context = { - getElementById: jasmine.createSpy().and.returnValue({}), + getElementById: vi.fn().mockReturnValue({}), }; - expect(activityMapExtensionEnabled(context)).toBeTrue(); + expect(activityMapExtensionEnabled(context)).toBe(true); expect(context.getElementById).toHaveBeenCalledWith( ACTIVITY_MAP_EXTENSION_ID, ); }); - it("should return false if the activity map extension is not enabled", () => { const context = { - getElementById: jasmine.createSpy().and.returnValue(null), + getElementById: vi.fn().mockReturnValue(null), }; - expect(activityMapExtensionEnabled(context)).toBeFalse(); + expect(activityMapExtensionEnabled(context)).toBe(false); expect(context.getElementById).toHaveBeenCalledWith( ACTIVITY_MAP_EXTENSION_ID, ); diff --git a/test/unit/specs/components/ActivityCollector/utils/createTransientStorage.spec.js b/test/unit/specs/components/ActivityCollector/utils/createTransientStorage.spec.js index 0010f8576..dca47d510 100644 --- a/test/unit/specs/components/ActivityCollector/utils/createTransientStorage.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/createTransientStorage.spec.js @@ -10,18 +10,18 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import createTransientStorage from "../../../../../../src/components/ActivityCollector/utils/createTransientStorage.js"; describe("ActivityCollector::createTransientStorage", () => { it("should return an object with the expected methods", () => { const transientStorage = createTransientStorage(window); expect(transientStorage).toEqual({ - setItem: jasmine.any(Function), - getItem: jasmine.any(Function), - removeItem: jasmine.any(Function), + setItem: expect.any(Function), + getItem: expect.any(Function), + removeItem: expect.any(Function), }); }); - it("should support storing and retrieving values", () => { const transientStorage = createTransientStorage(window); transientStorage.setItem("key1", "value1"); @@ -29,7 +29,6 @@ describe("ActivityCollector::createTransientStorage", () => { expect(transientStorage.getItem("key1")).toBe("value1"); expect(transientStorage.getItem("key2")).toBe("value2"); }); - it("should support removing values", () => { const transientStorage = createTransientStorage(window); transientStorage.setItem("key1", "value1"); diff --git a/test/unit/specs/components/ActivityCollector/utils/determineLinkType.spec.js b/test/unit/specs/components/ActivityCollector/utils/determineLinkType.spec.js index a1d5926fc..e7d61123f 100644 --- a/test/unit/specs/components/ActivityCollector/utils/determineLinkType.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/determineLinkType.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import determineLinkType from "../../../../../../src/components/ActivityCollector/utils/determineLinkType.js"; describe("ActivityCollector::determineLinkType", () => { @@ -17,26 +18,22 @@ describe("ActivityCollector::determineLinkType", () => { let config; let linkUrl; let clickedObj; - beforeEach(() => { window = {}; config = {}; linkUrl = ""; clickedObj = {}; }); - it("returns 'other' if linkUrl is an empty string", () => { const result = determineLinkType(window, config, linkUrl, clickedObj); expect(result).toBe("other"); }); - it("returns 'download' if linkUrl qualify as download link", () => { linkUrl = "https://example.com/download.pdf"; config.downloadLinkQualifier = /\.pdf$/; const result = determineLinkType(window, config, linkUrl, clickedObj); expect(result).toBe("download"); }); - it("returns 'exit' if linkUrl is an exit link", () => { linkUrl = "https://adobe.com"; window.location = { @@ -45,7 +42,6 @@ describe("ActivityCollector::determineLinkType", () => { const result = determineLinkType(window, config, linkUrl, clickedObj); expect(result).toBe("exit"); }); - it("returns 'other' if linkUrl is not a download or exit link", () => { linkUrl = "https://example.com"; window.location = { diff --git a/test/unit/specs/components/ActivityCollector/utils/dom/elementHasClickHandler.spec.js b/test/unit/specs/components/ActivityCollector/utils/dom/elementHasClickHandler.spec.js index 1dd04feb8..d30695a73 100644 --- a/test/unit/specs/components/ActivityCollector/utils/dom/elementHasClickHandler.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/dom/elementHasClickHandler.spec.js @@ -10,26 +10,48 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import elementHasClickHandler from "../../../../../../../src/components/ActivityCollector/utils/dom/elementHasClickHandler.js"; describe("ActivityCollector::elementHasClickHandler", () => { it("should handle invalid elements", () => { const invalidElements = [ - { element: null }, - { element: undefined }, - { element: {} }, - { element: { onclick: null } }, - { element: { onclick: undefined } }, + { + element: null, + }, + { + element: undefined, + }, + { + element: {}, + }, + { + element: { + onclick: null, + }, + }, + { + element: { + onclick: undefined, + }, + }, ]; invalidElements.forEach(({ element }) => { expect(elementHasClickHandler(element)).toBe(false); }); }); - it("should handle elements with click handlers", () => { const clickHandlerElements = [ - { element: { onclick: () => {} } }, - { element: { onclick() {} } }, + { + element: { + onclick: () => {}, + }, + }, + { + element: { + onclick() {}, + }, + }, ]; clickHandlerElements.forEach(({ element }) => { expect(elementHasClickHandler(element)).toBe(true); diff --git a/test/unit/specs/components/ActivityCollector/utils/dom/extractDomain.spec.js b/test/unit/specs/components/ActivityCollector/utils/dom/extractDomain.spec.js index 7ed0ee0c6..4dd3e0428 100644 --- a/test/unit/specs/components/ActivityCollector/utils/dom/extractDomain.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/dom/extractDomain.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import extractDomain from "../../../../../../../src/components/ActivityCollector/utils/dom/extractDomain.js"; describe("ActivityCollector::extractDomain", () => { @@ -22,7 +23,6 @@ describe("ActivityCollector::extractDomain", () => { "www.example.com", ); }); - it("should handle URLs without a protocol", () => { expect(extractDomain("example.com")).toBe("example.com"); expect(extractDomain("www.example.com")).toBe("www.example.com"); diff --git a/test/unit/specs/components/ActivityCollector/utils/dom/findClickableElement.spec.js b/test/unit/specs/components/ActivityCollector/utils/dom/findClickableElement.spec.js index 6ed8c86d6..11d43aff3 100644 --- a/test/unit/specs/components/ActivityCollector/utils/dom/findClickableElement.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/dom/findClickableElement.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import findClickableElement from "../../../../../../../src/components/ActivityCollector/utils/dom/findClickableElement.js"; describe("ActivityCollector::findClickableElement", () => { @@ -19,13 +20,11 @@ describe("ActivityCollector::findClickableElement", () => { parentElement.appendChild(element); expect(findClickableElement(element)).toBeNull(); }); - it("returns the target element if it is clickable", () => { const element = document.createElement("a"); element.href = "http://www.example.com"; expect(findClickableElement(element)).toBe(element); }); - it("returns the target element's parent if it is not clickable", () => { const element = document.createElement("div"); const parentElement = document.createElement("a"); diff --git a/test/unit/specs/components/ActivityCollector/utils/dom/getAbsoluteUrlFromAnchorElement.spec.js b/test/unit/specs/components/ActivityCollector/utils/dom/getAbsoluteUrlFromAnchorElement.spec.js index 8796c4773..fcd4777b5 100644 --- a/test/unit/specs/components/ActivityCollector/utils/dom/getAbsoluteUrlFromAnchorElement.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/dom/getAbsoluteUrlFromAnchorElement.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import getAbsoluteUrlFromAnchorElement from "../../../../../../../src/components/ActivityCollector/utils/dom/getAbsoluteUrlFromAnchorElement.js"; const initAnchorState = (window, element, anchorState) => { @@ -20,7 +21,6 @@ const initAnchorState = (window, element, anchorState) => { window.location.host = anchorState["window.location.host"]; window.location.pathname = anchorState["window.location.pathname"]; }; - describe("ActivityCollector::getAbsoluteUrlFromAnchorElement", () => { it("Makes best attempt to constructs absolute URLs", () => { const window = { diff --git a/test/unit/specs/components/ActivityCollector/utils/dom/isButtonSubmitElement.spec.js b/test/unit/specs/components/ActivityCollector/utils/dom/isButtonSubmitElement.spec.js index 86e4d310a..ea2092211 100644 --- a/test/unit/specs/components/ActivityCollector/utils/dom/isButtonSubmitElement.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/dom/isButtonSubmitElement.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isButtonSubmitElement from "../../../../../../../src/components/ActivityCollector/utils/dom/isButtonSubmitElement.js"; describe("ActivityCollector::isButtonSubmitElement", () => { @@ -18,25 +19,21 @@ describe("ActivityCollector::isButtonSubmitElement", () => { button.type = "submit"; expect(isButtonSubmitElement(button)).toBe(true); }); - it("should return true for button with no type", () => { // This is the default type for a button element const button = document.createElement("button"); expect(isButtonSubmitElement(button)).toBe(true); }); - it("should return false for non-submit button", () => { const button = document.createElement("button"); button.type = "button"; expect(isButtonSubmitElement(button)).toBe(false); }); - it("should return false for input element", () => { const input = document.createElement("input"); input.type = "submit"; expect(isButtonSubmitElement(input)).toBe(false); }); - it("should return false for non-button element", () => { const div = document.createElement("div"); expect(isButtonSubmitElement(div)).toBe(false); diff --git a/test/unit/specs/components/ActivityCollector/utils/dom/isDownloadLink.spec.js b/test/unit/specs/components/ActivityCollector/utils/dom/isDownloadLink.spec.js index d597fa7e8..dc2107ef7 100644 --- a/test/unit/specs/components/ActivityCollector/utils/dom/isDownloadLink.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/dom/isDownloadLink.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isDownloadLink from "../../../../../../../src/components/ActivityCollector/utils/dom/isDownloadLink.js"; import { downloadLinkQualifier } from "../../../../../../../src/components/ActivityCollector/configValidators.js"; diff --git a/test/unit/specs/components/ActivityCollector/utils/dom/isExitLink.spec.js b/test/unit/specs/components/ActivityCollector/utils/dom/isExitLink.spec.js index 19e3029d1..ed3b19ee1 100644 --- a/test/unit/specs/components/ActivityCollector/utils/dom/isExitLink.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/dom/isExitLink.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isExitLink from "../../../../../../../src/components/ActivityCollector/utils/dom/isExitLink.js"; describe("ActivityCollector::isExitLink", () => { diff --git a/test/unit/specs/components/ActivityCollector/utils/dom/isInputSubmitElement.spec.js b/test/unit/specs/components/ActivityCollector/utils/dom/isInputSubmitElement.spec.js index 64749d054..0b4b36af5 100644 --- a/test/unit/specs/components/ActivityCollector/utils/dom/isInputSubmitElement.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/dom/isInputSubmitElement.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isInputSubmitElement from "../../../../../../../src/components/ActivityCollector/utils/dom/isInputSubmitElement.js"; describe("ActivityCollector::isInputSubmitElement", () => { @@ -18,20 +19,17 @@ describe("ActivityCollector::isInputSubmitElement", () => { input.type = "submit"; expect(isInputSubmitElement(input)).toBe(true); }); - it("should return true for image input", () => { const input = document.createElement("input"); input.type = "image"; input.src = "https://example.com/image.png"; expect(isInputSubmitElement(input)).toBe(true); }); - it("should return false for non-submit input", () => { const input = document.createElement("input"); input.type = "text"; expect(isInputSubmitElement(input)).toBe(false); }); - it("should return false for non-input element", () => { const div = document.createElement("div"); expect(isInputSubmitElement(div)).toBe(false); diff --git a/test/unit/specs/components/ActivityCollector/utils/dom/isSupportedAnchorElement.spec.js b/test/unit/specs/components/ActivityCollector/utils/dom/isSupportedAnchorElement.spec.js index 19136fae0..95cc2ba93 100644 --- a/test/unit/specs/components/ActivityCollector/utils/dom/isSupportedAnchorElement.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/dom/isSupportedAnchorElement.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isSupportedAnchorElement from "../../../../../../../src/components/ActivityCollector/utils/dom/isSupportedAnchorElement.js"; describe("ActivityCollector::isSupportedAnchorElement", () => { diff --git a/test/unit/specs/components/ActivityCollector/utils/dom/isSupportedTextNode.spec.js b/test/unit/specs/components/ActivityCollector/utils/dom/isSupportedTextNode.spec.js index d523a1cff..656e15a3e 100644 --- a/test/unit/specs/components/ActivityCollector/utils/dom/isSupportedTextNode.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/dom/isSupportedTextNode.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isSupportedTextNode from "../../../../../../../src/components/ActivityCollector/utils/dom/isSupportedTextNode.js"; describe("ActivityCollector::isSupportedTextNode", () => { @@ -17,27 +18,22 @@ describe("ActivityCollector::isSupportedTextNode", () => { const textNode = document.createTextNode("text"); expect(isSupportedTextNode(textNode)).toBe(true); }); - it("should return false for comment node", () => { const commentNode = document.createComment("comment"); expect(isSupportedTextNode(commentNode)).toBe(false); }); - it("should return true for a paragraph node", () => { const paragraphNode = document.createElement("p"); expect(isSupportedTextNode(paragraphNode)).toBe(true); }); - it("should return false for a script node", () => { const scriptNode = document.createElement("script"); expect(isSupportedTextNode(scriptNode)).toBe(false); }); - it("should return false for a style node", () => { const styleNode = document.createElement("style"); expect(isSupportedTextNode(styleNode)).toBe(false); }); - it("should return false for a link node", () => { const linkNode = document.createElement("link"); expect(isSupportedTextNode(linkNode)).toBe(false); diff --git a/test/unit/specs/components/ActivityCollector/utils/hasPageName.spec.js b/test/unit/specs/components/ActivityCollector/utils/hasPageName.spec.js index ae535ebbb..f20cca6bc 100644 --- a/test/unit/specs/components/ActivityCollector/utils/hasPageName.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/hasPageName.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import hasPageName from "../../../../../../src/components/ActivityCollector/utils/hasPageName.js"; describe("ActivityCollector::hasPageName", () => { @@ -27,7 +28,6 @@ describe("ActivityCollector::hasPageName", () => { }; expect(hasPageName(event)).toBe(true); }); - it("should return false if event does not have page name", () => { const event = { getContent: () => ({ diff --git a/test/unit/specs/components/ActivityCollector/utils/isDifferentDomains.spec.js b/test/unit/specs/components/ActivityCollector/utils/isDifferentDomains.spec.js index 94a8470f6..c3f06868f 100644 --- a/test/unit/specs/components/ActivityCollector/utils/isDifferentDomains.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/isDifferentDomains.spec.js @@ -10,13 +10,13 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isDifferentDomains from "../../../../../../src/components/ActivityCollector/utils/isDifferentDomains.js"; describe("ActivityCollector::isDifferentDomains", () => { it("should return true if the domains are different", () => { expect(isDifferentDomains("www.example.com", "www.example.org")).toBe(true); }); - it("should return false if the domains are the same", () => { expect( isDifferentDomains("https://www.example.com", "www.example.com"), diff --git a/test/unit/specs/components/ActivityCollector/utils/trimQueryFromUrl.spec.js b/test/unit/specs/components/ActivityCollector/utils/trimQueryFromUrl.spec.js index 01198eb9b..6c336f88e 100644 --- a/test/unit/specs/components/ActivityCollector/utils/trimQueryFromUrl.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/trimQueryFromUrl.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import trimQueryFromUrl from "../../../../../../src/components/ActivityCollector/utils/trimQueryFromUrl.js"; describe("ActivityCollector::trimQueryFromUrl", () => { diff --git a/test/unit/specs/components/ActivityCollector/utils/truncateWhiteSpace.spec.js b/test/unit/specs/components/ActivityCollector/utils/truncateWhiteSpace.spec.js index ba82f9554..b383cda90 100644 --- a/test/unit/specs/components/ActivityCollector/utils/truncateWhiteSpace.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/truncateWhiteSpace.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import truncateWhiteSpace from "../../../../../../src/components/ActivityCollector/utils/truncateWhiteSpace.js"; describe("ActivityCollector::truncateWhiteSpace", () => { diff --git a/test/unit/specs/components/ActivityCollector/utils/urlStartsWithScheme.spec.js b/test/unit/specs/components/ActivityCollector/utils/urlStartsWithScheme.spec.js index 43943bf06..269ac718b 100644 --- a/test/unit/specs/components/ActivityCollector/utils/urlStartsWithScheme.spec.js +++ b/test/unit/specs/components/ActivityCollector/utils/urlStartsWithScheme.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import urlStartsWithScheme from "../../../../../../src/components/ActivityCollector/utils/urlStartsWithScheme.js"; describe("ActivityCollector::urlStartsWithScheme", () => { diff --git a/test/unit/specs/components/Audiences/injectProcessDestinations.spec.js b/test/unit/specs/components/Audiences/injectProcessDestinations.spec.js index dd0503c9a..24d9baf12 100644 --- a/test/unit/specs/components/Audiences/injectProcessDestinations.spec.js +++ b/test/unit/specs/components/Audiences/injectProcessDestinations.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectProcessDestinations from "../../../../../src/components/Audiences/injectProcessDestinations.js"; describe("Audiences::injectProcessDestinations", () => { @@ -17,16 +18,17 @@ describe("Audiences::injectProcessDestinations", () => { let logger; let isPageSsl; let processDestinations; - beforeEach(() => { - fireReferrerHideableImage = jasmine - .createSpy() - .and.returnValue(Promise.resolve()); - logger = jasmine.createSpyObj("logger", ["info", "error"]); - cookieJar = jasmine.createSpyObj("cookieJar", ["set"]); + fireReferrerHideableImage = vi.fn().mockReturnValue(Promise.resolve()); + logger = { + info: vi.fn(), + error: vi.fn(), + }; + cookieJar = { + set: vi.fn(), + }; isPageSsl = true; }); - const inject = () => { processDestinations = injectProcessDestinations({ fireReferrerHideableImage, @@ -35,7 +37,6 @@ describe("Audiences::injectProcessDestinations", () => { isPageSsl, }); }; - const SAMPLE_DESTINATIONS1 = [ { type: "url", @@ -62,7 +63,6 @@ describe("Audiences::injectProcessDestinations", () => { }, }, ]; - it("sets cookie destinations", () => { inject(); return processDestinations(SAMPLE_DESTINATIONS1).then(() => { @@ -88,7 +88,6 @@ describe("Audiences::injectProcessDestinations", () => { ); }); }); - it("sets cookie destinations without sameSite flag", () => { isPageSsl = false; inject(); @@ -111,10 +110,9 @@ describe("Audiences::injectProcessDestinations", () => { ); }); }); - it("calls fireReferrerHideableImage for all destinations of type URL and logs results", () => { inject(); - fireReferrerHideableImage.and.callFake(({ url }) => { + fireReferrerHideableImage.mockImplementation(({ url }) => { return url === "http://test.zyx" ? Promise.resolve() : Promise.reject(); }); return processDestinations([ @@ -169,8 +167,6 @@ describe("Audiences::injectProcessDestinations", () => { }, }, ]; - return expectAsync(processDestinations(destinations)).toBeResolvedTo( - undefined, - ); + return expect(processDestinations(destinations)).resolves.toBe(undefined); }); }); diff --git a/test/unit/specs/components/Audiences/injectProcessResponse.spec.js b/test/unit/specs/components/Audiences/injectProcessResponse.spec.js index 004f6ecbc..afb0e1343 100644 --- a/test/unit/specs/components/Audiences/injectProcessResponse.spec.js +++ b/test/unit/specs/components/Audiences/injectProcessResponse.spec.js @@ -9,43 +9,42 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectProcessResponse from "../../../../../src/components/Audiences/injectProcessResponse.js"; describe("injectProcessResponse", () => { let response; let processResponse; let processDestinations; - beforeEach(() => { - processDestinations = jasmine - .createSpy("processDestinations") - .and.returnValue(Promise.resolve()); - processResponse = injectProcessResponse({ processDestinations }); - - response = jasmine.createSpyObj("response", { - getPayloadsByType: ["An Edge Destination"], + processDestinations = vi.fn().mockReturnValue(Promise.resolve()); + processResponse = injectProcessResponse({ + processDestinations, }); + response = { + getPayloadsByType: vi.fn().mockReturnValue(["An Edge Destination"]), + }; }); - it("fetches destinations from the response", () => { - return processResponse({ response }).then((result) => { + return processResponse({ + response, + }).then((result) => { expect(processDestinations).toHaveBeenCalled(); expect(result).toEqual({ destinations: ["An Edge Destination"], }); }); }); - it("returns [] if no destinations were found", () => { - const responseWithNoDestinations = jasmine.createSpyObj("response", { - getPayloadsByType: [], + const responseWithNoDestinations = { + getPayloadsByType: vi.fn().mockReturnValue([]), + }; + return processResponse({ + response: responseWithNoDestinations, + }).then((result) => { + expect(result).toEqual({ + destinations: [], + }); }); - return processResponse({ response: responseWithNoDestinations }).then( - (result) => { - expect(result).toEqual({ - destinations: [], - }); - }, - ); }); }); diff --git a/test/unit/specs/components/Consent/computeConsentHash.spec.js b/test/unit/specs/components/Consent/computeConsentHash.spec.js index 06701ea5b..bb0e034d2 100644 --- a/test/unit/specs/components/Consent/computeConsentHash.spec.js +++ b/test/unit/specs/components/Consent/computeConsentHash.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import computeConsentHash from "../../../../../src/components/Consent/computeConsentHash.js"; describe("computeConsentHash", () => { @@ -26,33 +27,88 @@ describe("computeConsentHash", () => { ]), ).toBe(2905535662); }); - [ [ - { a: 1, b: 2 }, - { b: 2, a: 1 }, + { + a: 1, + b: 2, + }, + { + b: 2, + a: 1, + }, + ], + [ + [ + { + a: 1, + b: 2, + }, + ], + [ + { + b: 2, + a: 1, + }, + ], + ], + [ + { + a: { + b: 2, + c: 3, + }, + }, + { + a: { + c: 3, + b: 2, + }, + }, ], - [[{ a: 1, b: 2 }], [{ b: 2, a: 1 }]], - [{ a: { b: 2, c: 3 } }, { a: { c: 3, b: 2 } }], [ - { a: [1], b: [2] }, - { b: [2], a: [1] }, + { + a: [1], + b: [2], + }, + { + b: [2], + a: [1], + }, + ], + [ + { + a: undefined, + }, + {}, ], - [{ a: undefined }, {}], ].forEach(([a, b], index) => { it(`computes the same hash ${index}`, () => { expect(computeConsentHash(a)).toBe(computeConsentHash(b)); }); }); - [ [ [1, 2], [2, 1], ], ["1", 1], - [{ a: null }, { a: undefined }], - [{ "xdm:key": "value" }, { xdm: "key:value" }], + [ + { + a: null, + }, + { + a: undefined, + }, + ], + [ + { + "xdm:key": "value", + }, + { + xdm: "key:value", + }, + ], [null, {}], ].forEach(([a, b], index) => { it(`computes a different hash ${index}`, () => { diff --git a/test/unit/specs/components/Consent/configValidators.spec.js b/test/unit/specs/components/Consent/configValidators.spec.js index 12b3b689f..f9f477387 100644 --- a/test/unit/specs/components/Consent/configValidators.spec.js +++ b/test/unit/specs/components/Consent/configValidators.spec.js @@ -1,3 +1,16 @@ +/* +Copyright 2020 Adobe. All rights reserved. +This file is licensed to you 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 REPRESENTATIONS +OF ANY KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. +*/ + +import { describe, it, expect } from "vitest"; import configValidators from "../../../../../src/components/Consent/configValidators.js"; describe("defaultConsent", () => { @@ -26,7 +39,9 @@ describe("defaultConsent", () => { }); it("validates defaultConsent=123", () => { expect(() => { - configValidators({ defaultConsent: 123 }); + configValidators({ + defaultConsent: 123, + }); }).toThrowError(); }); it("validates defaultConsent='out'", () => { diff --git a/test/unit/specs/components/Consent/createComponent.spec.js b/test/unit/specs/components/Consent/createComponent.spec.js index 88c27be0e..cba7c13c2 100644 --- a/test/unit/specs/components/Consent/createComponent.spec.js +++ b/test/unit/specs/components/Consent/createComponent.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createComponent from "../../../../../src/components/Consent/createComponent.js"; import { createTaskQueue, defer } from "../../../../../src/utils/index.js"; import flushPromiseChains from "../../../helpers/flushPromiseChains.js"; @@ -27,7 +28,6 @@ const createConsent = (generalConsent) => ({ }); const CONSENT_IN = createConsent("in"); const CONSENT_OUT = createConsent("out"); - describe("consent:createComponent", () => { let storedConsent; let taskQueue; @@ -41,43 +41,45 @@ describe("consent:createComponent", () => { let requestFailureError; let component; let config; - const setIdentityCookie = () => { - doesIdentityCookieExist.and.returnValue(true); + doesIdentityCookieExist.mockReturnValue(true); }; - const clearIdentityCookie = () => { - doesIdentityCookieExist.and.returnValue(false); + doesIdentityCookieExist.mockReturnValue(false); }; - beforeEach(() => { - storedConsent = jasmine.createSpyObj("storedConsent", ["read", "clear"]); + storedConsent = { + read: vi.fn(), + clear: vi.fn(), + }; taskQueue = createTaskQueue(); defaultConsent = "in"; - consent = jasmine.createSpyObj("consent", [ - "initializeConsent", - "setConsent", - "suspend", - ]); - sendSetConsentRequest = jasmine.createSpy("sendSetConsentRequest"); - validateSetConsentOptions = jasmine - .createSpy("validateSetConsentOptions") - .and.callFake((options) => options); - consentHashStore = jasmine.createSpyObj("consentHashStore", [ - "clear", - "lookup", - ]); - consentHashes = jasmine.createSpyObj("consentHashes", ["isNew", "save"]); - doesIdentityCookieExist = jasmine.createSpy("doesIdentityCookieExist"); - consentHashStore.lookup.and.returnValue(consentHashes); + consent = { + initializeConsent: vi.fn(), + setConsent: vi.fn(), + suspend: vi.fn(), + }; + sendSetConsentRequest = vi.fn(); + validateSetConsentOptions = vi + .fn() + .mockImplementation((options) => options); + consentHashStore = { + clear: vi.fn(), + lookup: vi.fn(), + }; + consentHashes = { + isNew: vi.fn(), + save: vi.fn(), + }; + doesIdentityCookieExist = vi.fn(); + consentHashStore.lookup.mockReturnValue(consentHashes); setIdentityCookie(); - consentHashes.isNew.and.returnValue(true); + consentHashes.isNew.mockReturnValue(true); requestFailureError = new Error("Request for setting test consent failed."); config = { edgeConfigOverrides: {}, }; }); - const build = () => { component = createComponent({ storedConsent, @@ -91,22 +93,22 @@ describe("consent:createComponent", () => { config, }); }; - const clearConsentCookie = function clearConsentCookie() { - storedConsent.read.and.returnValue({}); + storedConsent.read.mockReturnValue({}); }; - const setConsentCookieIn = function setConsentCookieIn() { - storedConsent.read.and.returnValue({ general: "in" }); + storedConsent.read.mockReturnValue({ + general: "in", + }); }; - const setConsentCookieOut = function setConsentCookieOut() { - storedConsent.read.and.returnValue({ general: "out" }); + storedConsent.read.mockReturnValue({ + general: "out", + }); }; - const mockSetConsent = () => { const deferred = defer(); - sendSetConsentRequest.and.returnValue(deferred.promise); + sendSetConsentRequest.mockReturnValue(deferred.promise); // ensure that there will be no uncaught promise rejections deferred.promise.catch(() => {}); return { @@ -126,49 +128,63 @@ describe("consent:createComponent", () => { }, }; }; - it("initializes consent", () => { defaultConsent = "mydefaultconsent"; - storedConsent.read.and.returnValue({ general: "myinitialconsent" }); + storedConsent.read.mockReturnValue({ + general: "myinitialconsent", + }); build(); expect(consent.initializeConsent).toHaveBeenCalledWith( - { general: "mydefaultconsent" }, - { general: "myinitialconsent" }, + { + general: "mydefaultconsent", + }, + { + general: "myinitialconsent", + }, ); }); - it("handles the setConsent command", () => { defaultConsent = "pending"; clearConsentCookie(); build(); const setConsentMock = mockSetConsent(); - const onResolved = jasmine.createSpy("onResolved"); + const onResolved = vi.fn(); component.commands.setConsent - .run({ identityMap: { my: "map" }, ...CONSENT_IN }) + .run({ + identityMap: { + my: "map", + }, + ...CONSENT_IN, + }) .then(onResolved); expect(consent.suspend).toHaveBeenCalled(); setConsentMock.respondWithIn(); return flushPromiseChains().then(() => { expect(sendSetConsentRequest).toHaveBeenCalledWith( - jasmine.objectContaining({ + expect.objectContaining({ consentOptions: CONSENT_IN.consent, - identityMap: { my: "map" }, + identityMap: { + my: "map", + }, }), ); - expect(consent.setConsent).toHaveBeenCalledWith({ general: "in" }); + expect(consent.setConsent).toHaveBeenCalledWith({ + general: "in", + }); expect(onResolved).toHaveBeenCalledWith(undefined); }); }); - it("handles the setConsent command with overrides, if provided", () => { defaultConsent = "pending"; clearConsentCookie(); build(); const setConsentMock = mockSetConsent(); - const onResolved = jasmine.createSpy("onResolved"); + const onResolved = vi.fn(); component.commands.setConsent .run({ - identityMap: { my: "map" }, + identityMap: { + my: "map", + }, edgeConfigOverrides: { com_adobe_identity: { idSyncContainerId: "1234", @@ -182,33 +198,37 @@ describe("consent:createComponent", () => { return flushPromiseChains().then(() => { expect(sendSetConsentRequest).toHaveBeenCalledWith({ consentOptions: CONSENT_IN.consent, - identityMap: { my: "map" }, + identityMap: { + my: "map", + }, edgeConfigOverrides: { com_adobe_identity: { idSyncContainerId: "1234", }, }, }); - expect(consent.setConsent).toHaveBeenCalledWith({ general: "in" }); + expect(consent.setConsent).toHaveBeenCalledWith({ + general: "in", + }); expect(onResolved).toHaveBeenCalledWith(undefined); }); }); - it("updates the consent object even after a request failure", () => { defaultConsent = "pending"; clearConsentCookie(); build(); const setConsentMock = mockSetConsent(); - const onRejected = jasmine.createSpy("onRejected"); + const onRejected = vi.fn(); component.commands.setConsent.run(CONSENT_IN).catch(onRejected); setConsentCookieIn(); setConsentMock.respondWithError(); return flushPromiseChains().then(() => { - expect(consent.setConsent).toHaveBeenCalledWith({ general: "in" }); + expect(consent.setConsent).toHaveBeenCalledWith({ + general: "in", + }); expect(onRejected).toHaveBeenCalledWith(requestFailureError); }); }); - it("only updates the consent object after the response returns", () => { defaultConsent = "pending"; clearConsentCookie(); @@ -218,23 +238,26 @@ describe("consent:createComponent", () => { return flushPromiseChains() .then(() => { expect(sendSetConsentRequest).toHaveBeenCalledWith( - jasmine.objectContaining({ + expect.objectContaining({ consentOptions: CONSENT_IN.consent, }), ); - expect(consent.setConsent).not.toHaveBeenCalledWith({ general: "in" }); + expect(consent.setConsent).not.toHaveBeenCalledWith({ + general: "in", + }); setConsentMock.respondWithIn(); return flushPromiseChains(); }) .then(() => { - expect(consent.setConsent).toHaveBeenCalledWith({ general: "in" }); + expect(consent.setConsent).toHaveBeenCalledWith({ + general: "in", + }); }); }); - it("only calls setConsent once with multiple consent requests", () => { defaultConsent = "pending"; clearConsentCookie(); - consentHashes.isNew.and.returnValue(true); + consentHashes.isNew.mockReturnValue(true); build(); const setConsentMock1 = mockSetConsent(); let setConsentMock2; @@ -242,7 +265,7 @@ describe("consent:createComponent", () => { return flushPromiseChains() .then(() => { expect(sendSetConsentRequest).toHaveBeenCalledWith( - jasmine.objectContaining({ + expect.objectContaining({ consentOptions: CONSENT_IN.consent, }), ); @@ -253,7 +276,7 @@ describe("consent:createComponent", () => { }) .then(() => { expect(sendSetConsentRequest).toHaveBeenCalledWith( - jasmine.objectContaining({ + expect.objectContaining({ consentOptions: CONSENT_OUT.consent, }), ); @@ -261,28 +284,33 @@ describe("consent:createComponent", () => { return flushPromiseChains(); }) .then(() => { - expect(consent.setConsent).not.toHaveBeenCalledWith({ general: "in" }); + expect(consent.setConsent).not.toHaveBeenCalledWith({ + general: "in", + }); expect(consent.setConsent).toHaveBeenCalledTimes(1); - expect(consent.setConsent).toHaveBeenCalledWith({ general: "out" }); + expect(consent.setConsent).toHaveBeenCalledWith({ + general: "out", + }); }); }); - it("checks the cookie after an event", () => { clearConsentCookie(); build(); setConsentCookieOut(); component.lifecycle.onResponse(); - expect(consent.setConsent).toHaveBeenCalledWith({ general: "out" }); + expect(consent.setConsent).toHaveBeenCalledWith({ + general: "out", + }); }); - it("checks the cookie after an error response", () => { clearConsentCookie(); build(); setConsentCookieOut(); component.lifecycle.onRequestFailure(); - expect(consent.setConsent).toHaveBeenCalledWith({ general: "out" }); + expect(consent.setConsent).toHaveBeenCalledWith({ + general: "out", + }); }); - it("clears storage when the identity cookie is missing", () => { setConsentCookieIn(); clearIdentityCookie(); @@ -290,11 +318,12 @@ describe("consent:createComponent", () => { expect(consentHashStore.clear).toHaveBeenCalled(); expect(storedConsent.clear).toHaveBeenCalled(); expect(consent.initializeConsent).toHaveBeenCalledWith( - { general: "in" }, + { + general: "in", + }, {}, ); }); - it("clears storage when the consent cookie is missing", () => { clearConsentCookie(); setIdentityCookie(); @@ -302,14 +331,12 @@ describe("consent:createComponent", () => { expect(consentHashStore.clear).toHaveBeenCalled(); expect(storedConsent.clear).not.toHaveBeenCalled(); }); - it("doesn't call setConsent when there is no cookie after onResponse", () => { clearConsentCookie(); build(); component.lifecycle.onResponse(); expect(consent.setConsent).not.toHaveBeenCalled(); }); - it("doesn't call setConsent when there is no cookie after onRequestFailure", () => { clearConsentCookie(); build(); diff --git a/test/unit/specs/components/Consent/createConsentHashStore.spec.js b/test/unit/specs/components/Consent/createConsentHashStore.spec.js index 833623787..1e8b374e2 100644 --- a/test/unit/specs/components/Consent/createConsentHashStore.spec.js +++ b/test/unit/specs/components/Consent/createConsentHashStore.spec.js @@ -10,54 +10,58 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createConsentHashStore from "../../../../../src/components/Consent/createConsentHashStore.js"; const CONSENT_IN = { standard: "Adobe", version: "1.0", - value: { general: "in" }, + value: { + general: "in", + }, }; - const CONSENT_OUT = { standard: "Adobe", version: "1.0", - value: { general: "out" }, + value: { + general: "out", + }, }; - describe("createConsentHashStore", () => { let storage; let subject; beforeEach(() => { - storage = jasmine.createSpyObj("storage", ["getItem", "setItem", "clear"]); - subject = createConsentHashStore({ storage }); + storage = { + getItem: vi.fn(), + setItem: vi.fn(), + clear: vi.fn(), + }; + subject = createConsentHashStore({ + storage, + }); }); - it("clears", () => { subject.clear(); expect(storage.clear).toHaveBeenCalled(); }); - it("is new when storage is empty", () => { - storage.getItem.and.returnValue(null); + storage.getItem.mockReturnValue(null); const consentHashes = subject.lookup([CONSENT_IN]); expect(consentHashes.isNew()).toBe(true); }); - it("saves the hash", () => { const consentHashes = subject.lookup([CONSENT_IN]); consentHashes.save(); expect(storage.setItem).toHaveBeenCalledWith("Adobe.1.0", "3165644325"); }); - it("is not new when lookup is the same", () => { - storage.getItem.and.returnValue("3165644325"); + storage.getItem.mockReturnValue("3165644325"); const consentHashes = subject.lookup([CONSENT_IN]); expect(consentHashes.isNew()).toBe(false); expect(storage.getItem).toHaveBeenCalledWith("Adobe.1.0"); }); - it("is new when lookup is different", () => { - storage.getItem.and.returnValue("3165644325"); + storage.getItem.mockReturnValue("3165644325"); const consentHashes = subject.lookup([CONSENT_OUT]); expect(consentHashes.isNew()).toBe(true); expect(storage.getItem).toHaveBeenCalledWith("Adobe.1.0"); diff --git a/test/unit/specs/components/Consent/createConsentRequest.spec.js b/test/unit/specs/components/Consent/createConsentRequest.spec.js index 940b2166c..bba62e842 100644 --- a/test/unit/specs/components/Consent/createConsentRequest.spec.js +++ b/test/unit/specs/components/Consent/createConsentRequest.spec.js @@ -10,24 +10,26 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import describeRequest from "../../../helpers/describeRequest.js"; import createConsentRequest from "../../../../../src/components/Consent/createConsentRequest.js"; describe("createConsentRequest", () => { describeRequest(createConsentRequest); - it("provides the appropriate action", () => { const payload = {}; - const request = createConsentRequest({ payload }); + const request = createConsentRequest({ + payload, + }); expect(request.getAction()).toBe("privacy/set-consent"); }); - it("never uses sendBeacon", () => { const payload = {}; - const request = createConsentRequest({ payload }); - expect(request.getUseSendBeacon()).toBeFalse(); + const request = createConsentRequest({ + payload, + }); + expect(request.getUseSendBeacon()).toBe(false); }); - it("passes the datastreamIdOverride to the request", () => { const payload = {}; const datastreamIdOverride = "my-edge-config-id-override"; diff --git a/test/unit/specs/components/Consent/createConsentRequestPayload.spec.js b/test/unit/specs/components/Consent/createConsentRequestPayload.spec.js index d794e09bd..82001fc5a 100644 --- a/test/unit/specs/components/Consent/createConsentRequestPayload.spec.js +++ b/test/unit/specs/components/Consent/createConsentRequestPayload.spec.js @@ -10,12 +10,12 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import createConsentRequestPayload from "../../../../../src/components/Consent/createConsentRequestPayload.js"; import describeRequestPayload from "../../../helpers/describeRequestPayload.js"; describe("createConsentRequestPayload", () => { describeRequestPayload(createConsentRequestPayload); - it("adds an identity", () => { const payload = createConsentRequestPayload(); payload.addIdentity("IDNS", { @@ -37,7 +37,6 @@ describe("createConsentRequestPayload", () => { }, }); }); - it("sets consent", () => { const payload = createConsentRequestPayload(); payload.setConsent([ diff --git a/test/unit/specs/components/Consent/createStoredConsent.spec.js b/test/unit/specs/components/Consent/createStoredConsent.spec.js index 508acd50b..449177989 100644 --- a/test/unit/specs/components/Consent/createStoredConsent.spec.js +++ b/test/unit/specs/components/Consent/createStoredConsent.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createStoredConsent from "../../../../../src/components/Consent/createStoredConsent.js"; describe("Consent:createStoredConsent", () => { @@ -16,37 +17,35 @@ describe("Consent:createStoredConsent", () => { const orgId = "myorgid@mycompany"; let cookieJar; let storedConsent; - beforeEach(() => { - parseConsentCookie = jasmine.createSpy("parseConsentCookie"); - cookieJar = jasmine.createSpyObj("cookieJar", ["get", "remove"]); + parseConsentCookie = vi.fn(); + cookieJar = { + get: vi.fn(), + remove: vi.fn(), + }; storedConsent = createStoredConsent({ parseConsentCookie, orgId, cookieJar, }); }); - it("gets the cookie", () => { - cookieJar.get.and.returnValue("cookieValue"); - parseConsentCookie.and.returnValue("parsedConsentValue"); + cookieJar.get.mockReturnValue("cookieValue"); + parseConsentCookie.mockReturnValue("parsedConsentValue"); expect(storedConsent.read()).toEqual("parsedConsentValue"); expect(parseConsentCookie).toHaveBeenCalledWith("cookieValue"); }); - it("returns empty object if the cookie is not there", () => { - cookieJar.get.and.returnValue(undefined); + cookieJar.get.mockReturnValue(undefined); expect(storedConsent.read()).toEqual({}); expect(parseConsentCookie).not.toHaveBeenCalled(); }); - it("uses the correct cookie name", () => { storedConsent.read(); expect(cookieJar.get).toHaveBeenCalledWith( "kndctr_myorgid_mycompany_consent", ); }); - it("removes the cookie", () => { storedConsent.clear(); expect(cookieJar.remove).toHaveBeenCalledWith( diff --git a/test/unit/specs/components/Consent/injectSendSetConsentRequest.spec.js b/test/unit/specs/components/Consent/injectSendSetConsentRequest.spec.js index 4cbd86bd5..3223e3628 100644 --- a/test/unit/specs/components/Consent/injectSendSetConsentRequest.spec.js +++ b/test/unit/specs/components/Consent/injectSendSetConsentRequest.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectSendSetConsentRequest from "../../../../../src/components/Consent/injectSendSetConsentRequest.js"; describe("Consent:injectSendSetConsentRequest", () => { @@ -19,25 +20,20 @@ describe("Consent:injectSendSetConsentRequest", () => { let createConsentRequest; let sendSetConsentRequest; let globalEdgeConfigOverrides; - beforeEach(() => { - sendEdgeNetworkRequest = jasmine.createSpy("sendEdgeNetworkRequest"); - requestPayload = jasmine.createSpyObj("requestPayload", [ - "setConsent", - "addIdentity", - "mergeConfigOverride", - ]); - createConsentRequestPayload = jasmine - .createSpy("createConsentRequestPayload") - .and.returnValue(requestPayload); + sendEdgeNetworkRequest = vi.fn(); + requestPayload = { + setConsent: vi.fn(), + addIdentity: vi.fn(), + mergeConfigOverride: vi.fn(), + }; + createConsentRequestPayload = vi.fn().mockReturnValue(requestPayload); request = { getPayload() { return requestPayload; }, }; - createConsentRequest = jasmine - .createSpy("createConsentRequest") - .and.returnValue(request); + createConsentRequest = vi.fn().mockReturnValue(request); globalEdgeConfigOverrides = {}; sendSetConsentRequest = injectSendSetConsentRequest({ createConsentRequestPayload, @@ -46,14 +42,24 @@ describe("Consent:injectSendSetConsentRequest", () => { edgeConfigOverrides: globalEdgeConfigOverrides, }); }); - it("sets consent level and on requestPayload and sends the request", () => { - sendEdgeNetworkRequest.and.returnValue(Promise.resolve()); + sendEdgeNetworkRequest.mockReturnValue(Promise.resolve()); return sendSetConsentRequest({ consentOptions: "anything", identityMap: { - a: [{ id: "1" }, { id: "2" }], - b: [{ id: "3" }], + a: [ + { + id: "1", + }, + { + id: "2", + }, + ], + b: [ + { + id: "3", + }, + ], }, }).then((resolvedValue) => { expect(requestPayload.setConsent).toHaveBeenCalledWith("anything"); @@ -61,19 +67,35 @@ describe("Consent:injectSendSetConsentRequest", () => { request, }); expect(resolvedValue).toBeUndefined(); - expect(requestPayload.addIdentity).toHaveBeenCalledWith("a", { id: "1" }); - expect(requestPayload.addIdentity).toHaveBeenCalledWith("a", { id: "2" }); - expect(requestPayload.addIdentity).toHaveBeenCalledWith("b", { id: "3" }); + expect(requestPayload.addIdentity).toHaveBeenCalledWith("a", { + id: "1", + }); + expect(requestPayload.addIdentity).toHaveBeenCalledWith("a", { + id: "2", + }); + expect(requestPayload.addIdentity).toHaveBeenCalledWith("b", { + id: "3", + }); }); }); - it("sets the configuration overrides on the payload, if provided", () => { - sendEdgeNetworkRequest.and.returnValue(Promise.resolve()); + sendEdgeNetworkRequest.mockReturnValue(Promise.resolve()); return sendSetConsentRequest({ consentOptions: "anything", identityMap: { - a: [{ id: "1" }, { id: "2" }], - b: [{ id: "3" }], + a: [ + { + id: "1", + }, + { + id: "2", + }, + ], + b: [ + { + id: "3", + }, + ], }, edgeConfigOverrides: { com_adobe_identity: { @@ -89,17 +111,27 @@ describe("Consent:injectSendSetConsentRequest", () => { }); }); }); - it("sets the configuration overrides on the payload, if provided, from the global config", () => { - sendEdgeNetworkRequest.and.returnValue(Promise.resolve()); + sendEdgeNetworkRequest.mockReturnValue(Promise.resolve()); globalEdgeConfigOverrides.com_adobe_identity = { idSyncContainerId: "123", }; return sendSetConsentRequest({ consentOptions: "anything", identityMap: { - a: [{ id: "1" }, { id: "2" }], - b: [{ id: "3" }], + a: [ + { + id: "1", + }, + { + id: "2", + }, + ], + b: [ + { + id: "3", + }, + ], }, }).then(() => { expect(requestPayload.setConsent).toHaveBeenCalledWith("anything"); @@ -110,14 +142,24 @@ describe("Consent:injectSendSetConsentRequest", () => { }); }); }); - it("sets the override for the datastreamId, if provided", () => { - sendEdgeNetworkRequest.and.returnValue(Promise.resolve()); + sendEdgeNetworkRequest.mockReturnValue(Promise.resolve()); return sendSetConsentRequest({ consentOptions: "anything", identityMap: { - a: [{ id: "1" }, { id: "2" }], - b: [{ id: "3" }], + a: [ + { + id: "1", + }, + { + id: "2", + }, + ], + b: [ + { + id: "3", + }, + ], }, edgeConfigOverrides: { datastreamId: "123", @@ -125,7 +167,7 @@ describe("Consent:injectSendSetConsentRequest", () => { }).then(() => { expect(requestPayload.setConsent).toHaveBeenCalledWith("anything"); expect(createConsentRequest).toHaveBeenCalledWith({ - payload: jasmine.any(Object), + payload: expect.any(Object), datastreamIdOverride: "123", }); }); diff --git a/test/unit/specs/components/Consent/parseConsentCookie.spec.js b/test/unit/specs/components/Consent/parseConsentCookie.spec.js index c0d6def50..e0b479ab4 100644 --- a/test/unit/specs/components/Consent/parseConsentCookie.spec.js +++ b/test/unit/specs/components/Consent/parseConsentCookie.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import parseConsentCookie from "../../../../../src/components/Consent/parseConsentCookie.js"; describe("parseConsentCookie", () => { diff --git a/test/unit/specs/components/Consent/validateSetConsentOptions.spec.js b/test/unit/specs/components/Consent/validateSetConsentOptions.spec.js index f82ffb38a..f6238b56f 100644 --- a/test/unit/specs/components/Consent/validateSetConsentOptions.spec.js +++ b/test/unit/specs/components/Consent/validateSetConsentOptions.spec.js @@ -9,13 +9,19 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + import validateSetConsentOptions from "../../../../../src/components/Consent/validateSetConsentOptions.js"; import describeValidation from "../../../helpers/describeValidation.js"; const validGeneralConsent = [ - { standard: "Adobe", version: "1.0", value: { general: "in" } }, + { + standard: "Adobe", + version: "1.0", + value: { + general: "in", + }, + }, ]; - describeValidation( "Consent:validateSetConsentOptions", validateSetConsentOptions, @@ -23,16 +29,46 @@ describeValidation( { value: { consent: [ - { standard: "Adobe", version: "1.0", value: { general: "in" } }, + { + standard: "Adobe", + version: "1.0", + value: { + general: "in", + }, + }, ], }, }, - { value: { consent: [] }, error: true }, - { value: { consent: null }, error: true }, - { value: { consent: undefined }, error: true }, - { value: "in", error: true }, - { value: undefined, error: true }, - { value: null, error: true }, + { + value: { + consent: [], + }, + error: true, + }, + { + value: { + consent: null, + }, + error: true, + }, + { + value: { + consent: undefined, + }, + error: true, + }, + { + value: "in", + error: true, + }, + { + value: undefined, + error: true, + }, + { + value: null, + error: true, + }, { value: { consent: [ @@ -54,7 +90,13 @@ describeValidation( value: "1234abcd", gdprApplies: true, }, - { standard: "Adobe", version: "1.0", value: { general: "in" } }, + { + standard: "Adobe", + version: "1.0", + value: { + general: "in", + }, + }, ], }, }, @@ -126,6 +168,11 @@ describeValidation( }, }, }, - { value: { consent: validGeneralConsent, edgeConfigOverrides: {} } }, + { + value: { + consent: validGeneralConsent, + edgeConfigOverrides: {}, + }, + }, ], ); diff --git a/test/unit/specs/components/Context/createComponent.spec.js b/test/unit/specs/components/Context/createComponent.spec.js index b24eb48a0..261a7bc20 100644 --- a/test/unit/specs/components/Context/createComponent.spec.js +++ b/test/unit/specs/components/Context/createComponent.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createComponent from "../../../../../src/components/Context/createComponent.js"; import createConfig from "../../../../../src/core/config/createConfig.js"; @@ -27,39 +28,59 @@ describe("Context::createComponent", () => { const requiredContext = (xdm) => { xdm.c = "3"; }; - const availableContexts = { context1, context2 }; + const availableContexts = { + context1, + context2, + }; let event; - beforeEach(() => { - event = jasmine.createSpyObj("event", ["mergeXdm"]); + event = { + mergeXdm: vi.fn(), + }; }); - it("enables the configured contexts", async () => { - const config = createConfig({ context: ["context1", "context2"] }); + const config = createConfig({ + context: ["context1", "context2"], + }); const component = createComponent(config, logger, availableContexts, [ requiredContext, ]); - await component.lifecycle.onBeforeEvent({ event }); - - expect(event.mergeXdm).toHaveBeenCalledWith({ a: "1", b: "2", c: "3" }); + await component.lifecycle.onBeforeEvent({ + event, + }); + expect(event.mergeXdm).toHaveBeenCalledWith({ + a: "1", + b: "2", + c: "3", + }); }); it("ignores unknown contexts", async () => { - const config = createConfig({ context: ["unknowncontext", "context1"] }); + const config = createConfig({ + context: ["unknowncontext", "context1"], + }); const component = createComponent(config, logger, availableContexts, [ requiredContext, ]); - await component.lifecycle.onBeforeEvent({ event }); - - expect(event.mergeXdm).toHaveBeenCalledWith({ a: "1", c: "3" }); + await component.lifecycle.onBeforeEvent({ + event, + }); + expect(event.mergeXdm).toHaveBeenCalledWith({ + a: "1", + c: "3", + }); }); - it("can disable non-required contexts", async () => { - const config = createConfig({ context: [] }); + const config = createConfig({ + context: [], + }); const component = createComponent(config, logger, availableContexts, [ requiredContext, ]); - await component.lifecycle.onBeforeEvent({ event }); - - expect(event.mergeXdm).toHaveBeenCalledWith({ c: "3" }); + await component.lifecycle.onBeforeEvent({ + event, + }); + expect(event.mergeXdm).toHaveBeenCalledWith({ + c: "3", + }); }); }); diff --git a/test/unit/specs/components/Context/implementationDetails.spec.js b/test/unit/specs/components/Context/implementationDetails.spec.js index 4a1d4d912..2bd0b2c41 100644 --- a/test/unit/specs/components/Context/implementationDetails.spec.js +++ b/test/unit/specs/components/Context/implementationDetails.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import implementationDetails from "../../../../../src/components/Context/implementationDetails.js"; describe("Context::implementationDetails", () => { diff --git a/test/unit/specs/components/Context/injectDevice.spec.js b/test/unit/specs/components/Context/injectDevice.spec.js index 5d82c4441..6d3ca5155 100644 --- a/test/unit/specs/components/Context/injectDevice.spec.js +++ b/test/unit/specs/components/Context/injectDevice.spec.js @@ -9,11 +9,11 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import injectDevice from "../../../../../src/components/Context/injectDevice.js"; describe("Context::injectDevice", () => { let window; - beforeEach(() => { window = { screen: { @@ -22,15 +22,15 @@ describe("Context::injectDevice", () => { }, }; }); - const run = () => { const xdm = {}; injectDevice(window)(xdm); return xdm; }; - it("handles the happy path", () => { - window.screen.orientation = { type: "landscape-primary" }; + window.screen.orientation = { + type: "landscape-primary", + }; expect(run()).toEqual({ device: { screenHeight: 800, @@ -39,9 +39,10 @@ describe("Context::injectDevice", () => { }, }); }); - it("handles portrait orientation type", () => { - window.screen.orientation = { type: "portrait-secondary" }; + window.screen.orientation = { + type: "portrait-secondary", + }; expect(run()).toEqual({ device: { screenHeight: 800, @@ -50,7 +51,6 @@ describe("Context::injectDevice", () => { }, }); }); - it("handles matchMedia queries: portrait", () => { window.matchMedia = (query) => ({ matches: query === "(orientation: portrait)", @@ -63,7 +63,6 @@ describe("Context::injectDevice", () => { }, }); }); - it("handles matchMedia queries: landscape", () => { window.matchMedia = (query) => ({ matches: query === "(orientation: landscape)", @@ -76,7 +75,6 @@ describe("Context::injectDevice", () => { }, }); }); - it("handles string values for the height and width", () => { window = { screen: { @@ -100,22 +98,27 @@ describe("Context::injectDevice", () => { }; expect(run()).toEqual({}); }); - [ undefined, null, {}, - { type: "foo" }, - { type: "a-b" }, - { type: null }, + { + type: "foo", + }, + { + type: "a-b", + }, + { + type: null, + }, ].forEach((orientation) => { - it(`handles a bad screen orientation: ${JSON.stringify( - orientation, - )}`, () => { + it(`handles a bad screen orientation: ${JSON.stringify(orientation)}`, () => { if (orientation !== undefined) { window.screen.orientation = orientation; } - window.matchMedia = () => ({ matches: false }); + window.matchMedia = () => ({ + matches: false, + }); expect(run()).toEqual({ device: { screenHeight: 800, diff --git a/test/unit/specs/components/Context/injectEnvironment.spec.js b/test/unit/specs/components/Context/injectEnvironment.spec.js index 137a097e8..c873b6365 100644 --- a/test/unit/specs/components/Context/injectEnvironment.spec.js +++ b/test/unit/specs/components/Context/injectEnvironment.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import injectEnvironment from "../../../../../src/components/Context/injectEnvironment.js"; describe("Context::injectEnvironment", () => { @@ -19,11 +20,13 @@ describe("Context::injectEnvironment", () => { expect(xdm).toEqual(expectedXdm); }); }; - run( "uses the correct width and height", { - screen: { width: 1001, height: 1002 }, + screen: { + width: 1001, + height: 1002, + }, innerWidth: 1003, innerHeight: 1004, document: { @@ -43,7 +46,6 @@ describe("Context::injectEnvironment", () => { }, }, ); - run( "handles negative width and height", { @@ -60,7 +62,6 @@ describe("Context::injectEnvironment", () => { }, }, ); - run( "handles negative width", { @@ -77,7 +78,6 @@ describe("Context::injectEnvironment", () => { }, }, ); - run( "handles missing width and height", { @@ -91,7 +91,6 @@ describe("Context::injectEnvironment", () => { }, }, ); - run( "handles missing documentElement", { @@ -103,7 +102,6 @@ describe("Context::injectEnvironment", () => { }, }, ); - run( "handles 0 height and width", { @@ -144,7 +142,6 @@ describe("Context::injectEnvironment", () => { }, }, ); - run( "handles null values", { @@ -161,7 +158,6 @@ describe("Context::injectEnvironment", () => { }, }, ); - run( "handles only width", { @@ -180,7 +176,6 @@ describe("Context::injectEnvironment", () => { }, }, ); - run( "handles only height", { diff --git a/test/unit/specs/components/Context/injectHighEntropyUserAgentHints.spec.js b/test/unit/specs/components/Context/injectHighEntropyUserAgentHints.spec.js index 66dde9e2b..b39715666 100644 --- a/test/unit/specs/components/Context/injectHighEntropyUserAgentHints.spec.js +++ b/test/unit/specs/components/Context/injectHighEntropyUserAgentHints.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import injectHighEntropyUserAgentHints from "../../../../../src/components/Context/injectHighEntropyUserAgentHints.js"; describe("Context::injectHighEntropyUserAgentHints", () => { @@ -27,8 +28,7 @@ describe("Context::injectHighEntropyUserAgentHints", () => { }, }, }; - - it("works", (done) => { + it("works", () => { const xdm = {}; injectHighEntropyUserAgentHints(navigator)(xdm, console).then(() => { expect(xdm).toEqual({ @@ -44,7 +44,6 @@ describe("Context::injectHighEntropyUserAgentHints", () => { }, }, }); - done(); }); }); }); diff --git a/test/unit/specs/components/Context/injectPlaceContext.spec.js b/test/unit/specs/components/Context/injectPlaceContext.spec.js index 931f8bc70..633d64ac2 100644 --- a/test/unit/specs/components/Context/injectPlaceContext.spec.js +++ b/test/unit/specs/components/Context/injectPlaceContext.spec.js @@ -10,12 +10,13 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import injectPlaceContext from "../../../../../src/components/Context/injectPlaceContext.js"; describe("Context::injectPlaceContext", () => { it("adds placeContext", () => { const date = new Date("March 25, 2019 21:56:18"); - spyOn(date, "getTimezoneOffset").and.returnValue(7 * 60); + vi.spyOn(date, "getTimezoneOffset").mockReturnValue(7 * 60); const xdm = {}; injectPlaceContext(() => date)(xdm); expect(xdm).toEqual({ @@ -25,10 +26,9 @@ describe("Context::injectPlaceContext", () => { }, }); }); - it("handles string values from timezoneOffset", () => { const date = new Date("May 19, 2022 13:43:42"); - spyOn(date, "getTimezoneOffset").and.returnValue("55.1"); + vi.spyOn(date, "getTimezoneOffset").mockReturnValue("55.1"); const xdm = {}; injectPlaceContext(() => date)(xdm); expect(xdm).toEqual({ @@ -38,10 +38,9 @@ describe("Context::injectPlaceContext", () => { }, }); }); - it("handles NaN timezoneOffsets", () => { const date = new Date("May 19, 2022 13:43:42"); - spyOn(date, "getTimezoneOffset").and.returnValue("foo"); + vi.spyOn(date, "getTimezoneOffset").mockReturnValue("foo"); const xdm = {}; injectPlaceContext(() => date)(xdm); expect(xdm).toEqual({ @@ -50,10 +49,9 @@ describe("Context::injectPlaceContext", () => { }, }); }); - it("handles large timezoneOffsets 1", () => { const date = new Date("October 28, 2022 11:57:42"); - spyOn(date, "getTimezoneOffset").and.returnValue(-5999); + vi.spyOn(date, "getTimezoneOffset").mockReturnValue(-5999); const xdm = {}; injectPlaceContext(() => date)(xdm); expect(xdm).toEqual({ @@ -63,10 +61,9 @@ describe("Context::injectPlaceContext", () => { }, }); }); - it("handles large timezoneOffsets 2", () => { const date = new Date("October 28, 2022 11:57:42"); - spyOn(date, "getTimezoneOffset").and.returnValue(-6000); + vi.spyOn(date, "getTimezoneOffset").mockReturnValue(-6000); const xdm = {}; injectPlaceContext(() => date)(xdm); expect(xdm).toEqual({ diff --git a/test/unit/specs/components/Context/injectTimestamp.spec.js b/test/unit/specs/components/Context/injectTimestamp.spec.js index be06b6ba7..51b221152 100644 --- a/test/unit/specs/components/Context/injectTimestamp.spec.js +++ b/test/unit/specs/components/Context/injectTimestamp.spec.js @@ -10,18 +10,17 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import injectTimestamp from "../../../../../src/components/Context/injectTimestamp.js"; describe("Context::injectTimestamp", () => { let dateProvider; const date = new Date("November 25, 2019 10:09:42 UTC"); - beforeEach(() => { dateProvider = () => { return date; }; }); - it("adds timestamp", () => { const xdm = {}; injectTimestamp(dateProvider)(xdm); diff --git a/test/unit/specs/components/Context/injectWeb.spec.js b/test/unit/specs/components/Context/injectWeb.spec.js index e4b42d506..963033e29 100644 --- a/test/unit/specs/components/Context/injectWeb.spec.js +++ b/test/unit/specs/components/Context/injectWeb.spec.js @@ -9,16 +9,18 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import injectWeb from "../../../../../src/components/Context/injectWeb.js"; describe("Context::injectWeb", () => { const window = { - location: { href: "http://mylocation.com" }, + location: { + href: "http://mylocation.com", + }, document: { referrer: "http://myreferrer.com", }, }; - it("works", () => { const xdm = {}; injectWeb(window)(xdm); diff --git a/test/unit/specs/components/DataCollector/index.spec.js b/test/unit/specs/components/DataCollector/index.spec.js index 5f1ec5215..fc823f25c 100644 --- a/test/unit/specs/components/DataCollector/index.spec.js +++ b/test/unit/specs/components/DataCollector/index.spec.js @@ -9,6 +9,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createDataCollector from "../../../../../src/components/DataCollector/index.js"; import { noop } from "../../../../../src/utils/index.js"; @@ -18,38 +19,41 @@ describe("Event Command", () => { let logger; let sendEventCommand; beforeEach(() => { - event = jasmine.createSpyObj("event", [ - "documentMayUnload", - "setUserData", - "setUserXdm", - "mergeXdm", - "mergeMeta", - "mergeConfigOverride", - ]); - logger = jasmine.createSpyObj("logger", ["warn"]); - + event = { + documentMayUnload: vi.fn(), + setUserData: vi.fn(), + setUserXdm: vi.fn(), + mergeXdm: vi.fn(), + mergeMeta: vi.fn(), + mergeConfigOverride: vi.fn(), + }; + logger = { + warn: vi.fn(), + }; eventManager = { createEvent() { return event; }, - sendEvent: jasmine - .createSpy() - .and.callFake((_event, { applyUserProvidedData = noop }) => { + sendEvent: vi + .fn() + .mockImplementation((_event, { applyUserProvidedData = noop }) => { applyUserProvidedData(); return Promise.resolve("sendEventResult"); }), }; - const dataCollector = createDataCollector({ eventManager, logger, }); sendEventCommand = dataCollector.commands.sendEvent; }); - it("sends event", () => { - const xdm = { a: "b" }; - const data = { c: "d" }; + const xdm = { + a: "b", + }; + const data = { + c: "d", + }; const options = { otherSetting: "foo", type: "test", @@ -57,7 +61,6 @@ describe("Event Command", () => { data, documentUnloading: true, }; - return sendEventCommand.run(options).then((result) => { expect(event.documentMayUnload).toHaveBeenCalled(); expect(event.setUserXdm).toHaveBeenCalledWith(xdm); @@ -68,7 +71,6 @@ describe("Event Command", () => { expect(result).toEqual("sendEventResult"); }); }); - it("sends event with decisionScopes parameter when decisionScopes is not empty", () => { const options = { renderDecisions: true, @@ -77,7 +79,6 @@ describe("Event Command", () => { decisionScopes: ["Foo2"], }, }; - return sendEventCommand.run(options).then((result) => { expect(eventManager.sendEvent).toHaveBeenCalledWith(event, { renderDecisions: true, @@ -89,7 +90,6 @@ describe("Event Command", () => { expect(result).toEqual("sendEventResult"); }); }); - it("sends event with surfaces parameter when surfaces is not empty", () => { const options = { renderDecisions: true, @@ -97,7 +97,6 @@ describe("Event Command", () => { surfaces: ["Foo1", "Foo2"], }, }; - return sendEventCommand.run(options).then((result) => { expect(eventManager.sendEvent).toHaveBeenCalledWith(event, { renderDecisions: true, @@ -108,13 +107,11 @@ describe("Event Command", () => { expect(result).toEqual("sendEventResult"); }); }); - it("does not call documentMayUnload if documentUnloading is not defined", () => { return sendEventCommand.run({}).then(() => { expect(event.documentMayUnload).not.toHaveBeenCalled(); }); }); - it("merges eventType", () => { return sendEventCommand .run({ @@ -126,7 +123,6 @@ describe("Event Command", () => { }); }); }); - it("merges eventMergeID", () => { return sendEventCommand .run({ @@ -138,7 +134,6 @@ describe("Event Command", () => { }); }); }); - it("merges datasetId into the override configuration", () => { const datasetId = "mydatasetId"; return sendEventCommand @@ -147,12 +142,14 @@ describe("Event Command", () => { }) .then(() => { expect(eventManager.sendEvent).toHaveBeenCalledWith( - jasmine.any(Object), + expect.any(Object), { edgeConfigOverrides: { com_adobe_experience_platform: { datasets: { - event: { datasetId }, + event: { + datasetId, + }, }, }, }, @@ -161,7 +158,6 @@ describe("Event Command", () => { expect(logger.warn).toHaveBeenCalled(); }); }); - it("includes configuration if provided", () => { return sendEventCommand .run({ @@ -174,7 +170,7 @@ describe("Event Command", () => { }) .then(() => { expect(eventManager.sendEvent).toHaveBeenCalledWith( - jasmine.any(Object), + expect.any(Object), { renderDecisions: true, edgeConfigOverrides: { diff --git a/test/unit/specs/components/DataCollector/validateApplyResponse.spec.js b/test/unit/specs/components/DataCollector/validateApplyResponse.spec.js index 7a5112536..771dd44c6 100644 --- a/test/unit/specs/components/DataCollector/validateApplyResponse.spec.js +++ b/test/unit/specs/components/DataCollector/validateApplyResponse.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import validateApplyResponse from "../../../../../src/components/DataCollector/validateApplyResponse.js"; describe("DataCollector::validateApplyResponse", () => { @@ -28,7 +29,6 @@ describe("DataCollector::validateApplyResponse", () => { }); }).not.toThrowError(); }); - it("throws error for invalid options", () => { expect(() => { validateApplyResponse({ diff --git a/test/unit/specs/components/DataCollector/validateUserEventOptions.spec.js b/test/unit/specs/components/DataCollector/validateUserEventOptions.spec.js index ddbc1a4f0..5a04b9253 100644 --- a/test/unit/specs/components/DataCollector/validateUserEventOptions.spec.js +++ b/test/unit/specs/components/DataCollector/validateUserEventOptions.spec.js @@ -9,6 +9,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import validateUserEventOptions from "../../../../../src/components/DataCollector/validateUserEventOptions.js"; describe("DataCollector::validateUserEventOptions", () => { @@ -24,7 +25,10 @@ describe("DataCollector::validateUserEventOptions", () => { xdm: { eventType: "test", identityMap: { - namespace1: { id: "123", primary: true }, + namespace1: { + id: "123", + primary: true, + }, }, }, }, @@ -55,7 +59,9 @@ describe("DataCollector::validateUserEventOptions", () => { }, ].forEach((options) => { expect(() => { - validateUserEventOptions({ options }); + validateUserEventOptions({ + options, + }); }).toThrowError(); }); }); diff --git a/test/unit/specs/components/EventMerge/createComponent.spec.js b/test/unit/specs/components/EventMerge/createComponent.spec.js index 8aa85e220..b87b00c89 100644 --- a/test/unit/specs/components/EventMerge/createComponent.spec.js +++ b/test/unit/specs/components/EventMerge/createComponent.spec.js @@ -10,12 +10,17 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import createComponent from "../../../../../src/components/EventMerge/createComponent.js"; describe("EventMerge:createComponent", () => { it("creates a component", () => { const createEventMergeId = () => undefined; - expect(createComponent({ createEventMergeId })).toEqual({ + expect( + createComponent({ + createEventMergeId, + }), + ).toEqual({ commands: { createEventMergeId: { run: createEventMergeId, diff --git a/test/unit/specs/components/EventMerge/createEventMergeId.spec.js b/test/unit/specs/components/EventMerge/createEventMergeId.spec.js index f4a49ba98..9e95287f2 100644 --- a/test/unit/specs/components/EventMerge/createEventMergeId.spec.js +++ b/test/unit/specs/components/EventMerge/createEventMergeId.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import createEventMergeId from "../../../../../src/components/EventMerge/createEventMergeId.js"; import uuidV4Regex from "../../../constants/uuidV4Regex.js"; @@ -17,7 +18,6 @@ describe("EventMerge:createEventMergeId", () => { it("returns a UUID v4-compliant Id", () => { expect(uuidV4Regex.test(createEventMergeId().eventMergeId)).toBe(true); }); - it("doesn't return any other fields in the response", () => { expect(Object.keys(createEventMergeId())).toEqual(["eventMergeId"]); }); diff --git a/test/unit/specs/components/Identity/addEcidToPayload.spec.js b/test/unit/specs/components/Identity/addEcidToPayload.spec.js index 469d0b51b..aebab901c 100644 --- a/test/unit/specs/components/Identity/addEcidToPayload.spec.js +++ b/test/unit/specs/components/Identity/addEcidToPayload.spec.js @@ -10,11 +10,14 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import addEcidToPayload from "../../../../../src/components/Identity/addEcidToPayload.js"; describe("Identity:addEcidToPayload", () => { it("adds ECID to payload", () => { - const payload = jasmine.createSpyObj("payload", ["addIdentity"]); + const payload = { + addIdentity: vi.fn(), + }; addEcidToPayload(payload, "user@adobe"); expect(payload.addIdentity).toHaveBeenCalledWith("ECID", { id: "user@adobe", diff --git a/test/unit/specs/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.spec.js b/test/unit/specs/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.spec.js index f4a51ea9c..95df29eb0 100644 --- a/test/unit/specs/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.spec.js +++ b/test/unit/specs/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import appendIdentityToUrlOptionsValidator from "../../../../../../src/components/Identity/appendIdentityToUrl/appendIdentityToUrlOptionsValidator.js"; describe("Identity::appendIdentityToUrlOptionsValidator", () => { @@ -16,8 +17,13 @@ describe("Identity::appendIdentityToUrlOptionsValidator", () => { undefined, "myurl", {}, - { url: "" }, - { url: "hello", other: "goodbye" }, + { + url: "", + }, + { + url: "hello", + other: "goodbye", + }, ].forEach((param) => { it(`should throw an error when ${JSON.stringify(param)} is passed`, () => { expect(() => { @@ -25,18 +31,24 @@ describe("Identity::appendIdentityToUrlOptionsValidator", () => { }).toThrowError(); }); }); - it("should accept a url", () => { expect( - appendIdentityToUrlOptionsValidator({ url: "http://google.com" }), - ).toEqual({ url: "http://google.com" }); + appendIdentityToUrlOptionsValidator({ + url: "http://google.com", + }), + ).toEqual({ + url: "http://google.com", + }); }); - it("should accept override configuration", () => { expect(() => { appendIdentityToUrlOptionsValidator({ url: "http://google.com", - edgeConfigOverrides: { identity: { idSyncContainerId: "123" } }, + edgeConfigOverrides: { + identity: { + idSyncContainerId: "123", + }, + }, }); }).not.toThrowError(); expect(() => { diff --git a/test/unit/specs/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.spec.js b/test/unit/specs/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.spec.js index e6a3ef35d..9e6a2879d 100644 --- a/test/unit/specs/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.spec.js +++ b/test/unit/specs/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import injectAppendIdentityToUrl from "../../../../../../src/components/Identity/appendIdentityToUrl/injectAppendIdentityToUrl.js"; describe("appendIdentityToUrl", () => { @@ -21,13 +22,11 @@ describe("appendIdentityToUrl", () => { }); const ecid = "1234"; const qsp = "adobe_mc=TS%3D1%7CMCMID%3D1234%7CMCORGID%3Dmyorg%2540adobe"; - const test = (original, expected) => { it(`appends to "${original}"`, () => { expect(appendIdentityToUrl(ecid, original)).toBe(expected); }); }; - test("", `?${qsp}`); test("/", `/?${qsp}`); test("?", `?${qsp}`); diff --git a/test/unit/specs/components/Identity/configValidators.spec.js b/test/unit/specs/components/Identity/configValidators.spec.js index fa55ff801..25d44005c 100644 --- a/test/unit/specs/components/Identity/configValidators.spec.js +++ b/test/unit/specs/components/Identity/configValidators.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import configValidators from "../../../../../src/components/Identity/configValidators.js"; import testConfigValidators from "../../../helpers/testConfigValidators.js"; diff --git a/test/unit/specs/components/Identity/createComponent.spec.js b/test/unit/specs/components/Identity/createComponent.spec.js index b50a3195c..76bbf1df0 100644 --- a/test/unit/specs/components/Identity/createComponent.spec.js +++ b/test/unit/specs/components/Identity/createComponent.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createComponent from "../../../../../src/components/Identity/createComponent.js"; import { defer } from "../../../../../src/utils/index.js"; import flushPromiseChains from "../../../helpers/flushPromiseChains.js"; @@ -31,28 +32,25 @@ describe("Identity::createComponent", () => { let getIdentityDeferred; let response; let component; - beforeEach(() => { - ensureSingleIdentity = jasmine.createSpy("ensureSingleIdentity"); - addEcidQueryToPayload = jasmine.createSpy("addEcidQueryToPayload"); - addQueryStringIdentityToPayload = jasmine.createSpy( - "addQueryStringIdentityToPayload", - ); - setLegacyEcid = jasmine.createSpy("setLegacyEcid"); - handleResponseForIdSyncs = jasmine.createSpy("handleResponseForIdSyncs"); - getNamespacesFromResponse = jasmine.createSpy("getNamespacesFromResponse"); + ensureSingleIdentity = vi.fn(); + addEcidQueryToPayload = vi.fn(); + addQueryStringIdentityToPayload = vi.fn(); + setLegacyEcid = vi.fn(); + handleResponseForIdSyncs = vi.fn(); + getNamespacesFromResponse = vi.fn(); getIdentityDeferred = defer(); awaitConsentDeferred = defer(); withConsentDeferred = defer(); - consent = jasmine.createSpyObj("consent", { - awaitConsent: awaitConsentDeferred.promise, - withConsent: withConsentDeferred.promise, - }); - appendIdentityToUrl = jasmine.createSpy("appendIdentityToUrl"); - logger = jasmine.createSpyObj("logger", ["warn"]); - getIdentity = jasmine - .createSpy("getIdentity") - .and.returnValue(getIdentityDeferred.promise); + consent = { + awaitConsent: vi.fn().mockReturnValue(awaitConsentDeferred.promise), + withConsent: vi.fn().mockReturnValue(withConsentDeferred.promise), + }; + appendIdentityToUrl = vi.fn(); + logger = { + warn: vi.fn(), + }; + getIdentity = vi.fn().mockReturnValue(getIdentityDeferred.promise); getIdentityOptionsValidator = (options) => options; component = createComponent({ ensureSingleIdentity, @@ -67,43 +65,53 @@ describe("Identity::createComponent", () => { logger, getIdentityOptionsValidator, }); - response = jasmine.createSpyObj("response", ["getEdge"]); + response = { + getEdge: vi.fn(), + }; }); - it("adds ECID query to event", () => { - const payload = { type: "payload" }; + const payload = { + type: "payload", + }; const request = { getPayload() { return payload; }, }; - const onResponse = jasmine.createSpy("onResponse"); - component.lifecycle.onBeforeRequest({ request, onResponse }); + const onResponse = vi.fn(); + component.lifecycle.onBeforeRequest({ + request, + onResponse, + }); expect(addEcidQueryToPayload).toHaveBeenCalledWith(payload); }); - it("adds the query string identity to the payload", () => { - const payload = { type: "payload" }; + const payload = { + type: "payload", + }; const request = { getPayload() { return payload; }, }; - component.lifecycle.onBeforeRequest({ request }); - expect(addQueryStringIdentityToPayload).toHaveBeenCalledOnceWith(payload); + component.lifecycle.onBeforeRequest({ + request, + }); + expect(addQueryStringIdentityToPayload).toHaveBeenNthCalledWith(1, payload); }); - it("ensures request has identity", () => { - const payload = { type: "payload" }; + const payload = { + type: "payload", + }; const request = { getPayload() { return payload; }, }; - const onResponse = jasmine.createSpy("onResponse"); - const onRequestFailure = jasmine.createSpy("onRequestFailure"); + const onResponse = vi.fn(); + const onRequestFailure = vi.fn(); const ensureSingleIdentityPromise = Promise.resolve(); - ensureSingleIdentity.and.returnValue(ensureSingleIdentityPromise); + ensureSingleIdentity.mockReturnValue(ensureSingleIdentityPromise); const result = component.lifecycle.onBeforeRequest({ request, onResponse, @@ -116,46 +124,54 @@ describe("Identity::createComponent", () => { }); expect(result).toBe(ensureSingleIdentityPromise); }); - it("does not create legacy identity cookie if response does not contain ECID", () => { const idSyncsPromise = Promise.resolve(); - handleResponseForIdSyncs.and.returnValue(idSyncsPromise); - component.lifecycle.onResponse({ response }); + handleResponseForIdSyncs.mockReturnValue(idSyncsPromise); + component.lifecycle.onResponse({ + response, + }); expect(getNamespacesFromResponse).toHaveBeenCalledWith(response); expect(setLegacyEcid).not.toHaveBeenCalled(); }); - it("creates legacy identity cookie if response contains ECID", () => { const idSyncsPromise = Promise.resolve(); - handleResponseForIdSyncs.and.returnValue(idSyncsPromise); - getNamespacesFromResponse.and.returnValue({ ECID: "user@adobe" }); - component.lifecycle.onResponse({ response }); + handleResponseForIdSyncs.mockReturnValue(idSyncsPromise); + getNamespacesFromResponse.mockReturnValue({ + ECID: "user@adobe", + }); + component.lifecycle.onResponse({ + response, + }); expect(getNamespacesFromResponse).toHaveBeenCalledWith(response); expect(setLegacyEcid).toHaveBeenCalledWith("user@adobe"); - - component.lifecycle.onResponse({ response }); + component.lifecycle.onResponse({ + response, + }); expect(getNamespacesFromResponse).toHaveBeenCalledTimes(2); expect(setLegacyEcid).toHaveBeenCalledTimes(1); }); - it("handles ID syncs", () => { const idSyncsPromise = Promise.resolve(); - handleResponseForIdSyncs.and.returnValue(idSyncsPromise); - const result = component.lifecycle.onResponse({ response }); + handleResponseForIdSyncs.mockReturnValue(idSyncsPromise); + const result = component.lifecycle.onResponse({ + response, + }); expect(handleResponseForIdSyncs).toHaveBeenCalledWith(response); - return expectAsync(result).toBeResolvedTo(undefined); + return expect(result).resolves.toBe(undefined); }); - it("getIdentity command should make a request when ecid is not available", () => { const idSyncsPromise = Promise.resolve(); - handleResponseForIdSyncs.and.returnValue(idSyncsPromise); - const onResolved = jasmine.createSpy("onResolved"); - const onResolved2 = jasmine.createSpy("onResolved2"); - response.getEdge.and.returnValue({ regionId: 42 }); + handleResponseForIdSyncs.mockReturnValue(idSyncsPromise); + const onResolved = vi.fn(); + const onResolved2 = vi.fn(); + response.getEdge.mockReturnValue({ + regionId: 42, + }); component.commands.getIdentity - .run({ namespaces: ["ECID"] }) + .run({ + namespaces: ["ECID"], + }) .then(onResolved); - return flushPromiseChains() .then(() => { expect(getIdentity).not.toHaveBeenCalled(); @@ -166,11 +182,13 @@ describe("Identity::createComponent", () => { .then(() => { expect(getIdentity).toHaveBeenCalled(); // ECID and CORE are requested regardless of the namespaces passed in. - getNamespacesFromResponse.and.returnValue({ + getNamespacesFromResponse.mockReturnValue({ ECID: "user@adobe", CORE: "mycoreid", }); - component.lifecycle.onResponse({ response }); + component.lifecycle.onResponse({ + response, + }); getIdentityDeferred.resolve(); return flushPromiseChains(); }) @@ -183,9 +201,13 @@ describe("Identity::createComponent", () => { regionId: 42, }, }); - getNamespacesFromResponse.and.returnValue({ CORE: "mycoreid" }); + getNamespacesFromResponse.mockReturnValue({ + CORE: "mycoreid", + }); component.commands.getIdentity - .run({ namespaces: ["CORE"] }) + .run({ + namespaces: ["CORE"], + }) .then(onResolved2); return flushPromiseChains(); }) @@ -204,16 +226,23 @@ describe("Identity::createComponent", () => { }); }); }); - it("getIdentity command should not make a request when ecid is available", () => { const idSyncsPromise = Promise.resolve(); - handleResponseForIdSyncs.and.returnValue(idSyncsPromise); - getNamespacesFromResponse.and.returnValue({ ECID: "user@adobe" }); - response.getEdge.and.returnValue({ regionId: 7 }); - component.lifecycle.onResponse({ response }); - const onResolved = jasmine.createSpy("onResolved"); + handleResponseForIdSyncs.mockReturnValue(idSyncsPromise); + getNamespacesFromResponse.mockReturnValue({ + ECID: "user@adobe", + }); + response.getEdge.mockReturnValue({ + regionId: 7, + }); + component.lifecycle.onResponse({ + response, + }); + const onResolved = vi.fn(); component.commands.getIdentity - .run({ namespaces: ["ECID"] }) + .run({ + namespaces: ["ECID"], + }) .then(onResolved); return flushPromiseChains() .then(() => { @@ -234,19 +263,24 @@ describe("Identity::createComponent", () => { }); }); }); - it("getIdentity command should not make a request when CORE is available", () => { const idSyncsPromise = Promise.resolve(); - handleResponseForIdSyncs.and.returnValue(idSyncsPromise); - getNamespacesFromResponse.and.returnValue({ + handleResponseForIdSyncs.mockReturnValue(idSyncsPromise); + getNamespacesFromResponse.mockReturnValue({ ECID: "user@adobe", CORE: "mycoreid", }); - response.getEdge.and.returnValue({ regionId: 7 }); - component.lifecycle.onResponse({ response }); - const onResolved = jasmine.createSpy("onResolved"); + response.getEdge.mockReturnValue({ + regionId: 7, + }); + component.lifecycle.onResponse({ + response, + }); + const onResolved = vi.fn(); component.commands.getIdentity - .run({ namespaces: ["CORE"] }) + .run({ + namespaces: ["CORE"], + }) .then(onResolved); return flushPromiseChains() .then(() => { @@ -267,12 +301,13 @@ describe("Identity::createComponent", () => { }); }); }); - it("getIdentity command is called with configuration overrides, when provided", () => { const idSyncsPromise = Promise.resolve(); - handleResponseForIdSyncs.and.returnValue(idSyncsPromise); - const onResolved = jasmine.createSpy("onResolved"); - response.getEdge.and.returnValue({ regionId: 42 }); + handleResponseForIdSyncs.mockReturnValue(idSyncsPromise); + const onResolved = vi.fn(); + response.getEdge.mockReturnValue({ + regionId: 42, + }); const getIdentityOptions = { namespaces: ["ECID"], edgeConfigOverrides: { @@ -282,7 +317,6 @@ describe("Identity::createComponent", () => { }, }; component.commands.getIdentity.run(getIdentityOptions).then(onResolved); - return flushPromiseChains() .then(() => { expect(getIdentity).not.toHaveBeenCalled(); @@ -292,8 +326,12 @@ describe("Identity::createComponent", () => { }) .then(() => { expect(getIdentity).toHaveBeenCalledWith(getIdentityOptions); - getNamespacesFromResponse.and.returnValue({ ECID: "user@adobe" }); - component.lifecycle.onResponse({ response }); + getNamespacesFromResponse.mockReturnValue({ + ECID: "user@adobe", + }); + component.lifecycle.onResponse({ + response, + }); getIdentityDeferred.resolve(); return flushPromiseChains(); }) @@ -308,14 +346,15 @@ describe("Identity::createComponent", () => { }); }); }); - it("appendIdentityToUrl should return the unmodified url when consent is not given.", () => { const commandPromise = component.commands.appendIdentityToUrl.run({ url: "myurl", }); withConsentDeferred.reject(new Error("My consent error.")); - return expectAsync(commandPromise) - .toBeResolvedTo({ url: "myurl" }) + return expect(commandPromise) + .resolves.toStrictEqual({ + url: "myurl", + }) .then(() => { expect(logger.warn).toHaveBeenCalledWith( "Unable to append identity to url. My consent error.", @@ -324,33 +363,38 @@ describe("Identity::createComponent", () => { expect(appendIdentityToUrl).not.toHaveBeenCalled(); }); }); - it("appendIdentityToUrl should return the unmodified url when getIdentity returns an error.", () => { const commandPromise = component.commands.appendIdentityToUrl.run({ url: "myurl", }); withConsentDeferred.resolve(); getIdentityDeferred.reject(new Error("My getIdentity error.")); - return expectAsync(commandPromise) - .toBeResolvedTo({ url: "myurl" }) + return expect(commandPromise) + .resolves.toStrictEqual({ + url: "myurl", + }) .then(() => { - expect(logger.warn).toHaveBeenCalledOnceWith( + expect(logger.warn).toHaveBeenNthCalledWith( + 1, "Unable to append identity to url. My getIdentity error.", ); expect(appendIdentityToUrl).not.toHaveBeenCalled(); }); }); - it("appendIdentityToUrl should getIdentity when there isn't one.", () => { const idSyncsPromise = Promise.resolve(); - handleResponseForIdSyncs.and.returnValue(idSyncsPromise); - appendIdentityToUrl.and.returnValue("modifiedUrl"); - const onResolved = jasmine.createSpy("onResolved"); - response.getEdge.and.returnValue({ regionId: 42 }); + handleResponseForIdSyncs.mockReturnValue(idSyncsPromise); + appendIdentityToUrl.mockReturnValue("modifiedUrl"); + const onResolved = vi.fn(); + response.getEdge.mockReturnValue({ + regionId: 42, + }); component.commands.appendIdentityToUrl - .run({ namespaces: ["ECID"], url: "myurl" }) + .run({ + namespaces: ["ECID"], + url: "myurl", + }) .then(onResolved); - return flushPromiseChains() .then(() => { expect(getIdentity).not.toHaveBeenCalled(); @@ -360,54 +404,70 @@ describe("Identity::createComponent", () => { }) .then(() => { expect(getIdentity).toHaveBeenCalledWith( - jasmine.objectContaining({ namespaces: ["ECID"] }), + expect.objectContaining({ + namespaces: ["ECID"], + }), ); - getNamespacesFromResponse.and.returnValue({ ECID: "user@adobe" }); - component.lifecycle.onResponse({ response }); + getNamespacesFromResponse.mockReturnValue({ + ECID: "user@adobe", + }); + component.lifecycle.onResponse({ + response, + }); getIdentityDeferred.resolve(); return flushPromiseChains(); }) .then(() => { expect(logger.warn).not.toHaveBeenCalled(); - expect(appendIdentityToUrl).toHaveBeenCalledOnceWith( + expect(appendIdentityToUrl).toHaveBeenNthCalledWith( + 1, "user@adobe", "myurl", ); }); }); - it("appendIdentityToUrl should append the identity to a url when there is already an identity", () => { // set the ECID const idSyncsPromise = Promise.resolve(); - handleResponseForIdSyncs.and.returnValue(idSyncsPromise); - getNamespacesFromResponse.and.returnValue({ ECID: "user@adobe" }); - response.getEdge.and.returnValue({ regionId: 7 }); - component.lifecycle.onResponse({ response }); - - appendIdentityToUrl.and.returnValue("modifiedUrl"); + handleResponseForIdSyncs.mockReturnValue(idSyncsPromise); + getNamespacesFromResponse.mockReturnValue({ + ECID: "user@adobe", + }); + response.getEdge.mockReturnValue({ + regionId: 7, + }); + component.lifecycle.onResponse({ + response, + }); + appendIdentityToUrl.mockReturnValue("modifiedUrl"); const commandPromise = component.commands.appendIdentityToUrl.run({ url: "myurl", }); withConsentDeferred.resolve(); - - return expectAsync(commandPromise).toBeResolvedTo({ url: "modifiedUrl" }); + return expect(commandPromise).resolves.toStrictEqual({ + url: "modifiedUrl", + }); }); - it("appendIdentityToUrl should call getIdentity with configuration overrides, if provided", () => { const idSyncsPromise = Promise.resolve(); - handleResponseForIdSyncs.and.returnValue(idSyncsPromise); - appendIdentityToUrl.and.returnValue("modifiedUrl"); - const onResolved = jasmine.createSpy("onResolved"); - response.getEdge.and.returnValue({ regionId: 42 }); + handleResponseForIdSyncs.mockReturnValue(idSyncsPromise); + appendIdentityToUrl.mockReturnValue("modifiedUrl"); + const onResolved = vi.fn(); + response.getEdge.mockReturnValue({ + regionId: 42, + }); const edgeConfigOverrides = { com_adobe_identity: { idSyncContainerId: "123", }, }; component.commands.appendIdentityToUrl - .run({ namespaces: ["ECID"], url: "myurl", edgeConfigOverrides }) + .run({ + namespaces: ["ECID"], + url: "myurl", + edgeConfigOverrides, + }) .then(onResolved); - return flushPromiseChains() .then(() => { expect(getIdentity).not.toHaveBeenCalled(); @@ -417,19 +477,24 @@ describe("Identity::createComponent", () => { }) .then(() => { expect(getIdentity).toHaveBeenCalledWith( - jasmine.objectContaining({ + expect.objectContaining({ namespaces: ["ECID"], edgeConfigOverrides, }), ); - getNamespacesFromResponse.and.returnValue({ ECID: "user@adobe" }); - component.lifecycle.onResponse({ response }); + getNamespacesFromResponse.mockReturnValue({ + ECID: "user@adobe", + }); + component.lifecycle.onResponse({ + response, + }); getIdentityDeferred.resolve(); return flushPromiseChains(); }) .then(() => { expect(logger.warn).not.toHaveBeenCalled(); - expect(appendIdentityToUrl).toHaveBeenCalledOnceWith( + expect(appendIdentityToUrl).toHaveBeenNthCalledWith( + 1, "user@adobe", "myurl", ); diff --git a/test/unit/specs/components/Identity/createLegacyIdentity.spec.js b/test/unit/specs/components/Identity/createLegacyIdentity.spec.js index 97fd2398c..1c3487573 100644 --- a/test/unit/specs/components/Identity/createLegacyIdentity.spec.js +++ b/test/unit/specs/components/Identity/createLegacyIdentity.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createLegacyIdentity from "../../../../../src/components/Identity/createLegacyIdentity.js"; describe("Identity::createLegacyIdentity", () => { @@ -19,22 +20,19 @@ describe("Identity::createLegacyIdentity", () => { let apexDomain; let isPageSsl; let cookieJar; - let legacyIdentity; - beforeEach(() => { idMigrationEnabled = true; orgId = "TEST_ORG"; - getEcidFromVisitor = jasmine - .createSpy("getEcidFromVisitor") - .and.returnValue(Promise.resolve()); + getEcidFromVisitor = vi.fn().mockReturnValue(Promise.resolve()); apexDomain = "mydomain"; isPageSsl = true; - cookieJar = jasmine.createSpyObj("cookieJar", ["get", "set"]); - + cookieJar = { + get: vi.fn(), + set: vi.fn(), + }; legacyIdentity = undefined; }); - const build = () => { legacyIdentity = createLegacyIdentity({ config: { @@ -47,7 +45,6 @@ describe("Identity::createLegacyIdentity", () => { cookieJar, }); }; - describe("getEcid", () => { it("should return a promise resolved with undefined if ID migration disabled", async () => { idMigrationEnabled = false; @@ -56,13 +53,11 @@ describe("Identity::createLegacyIdentity", () => { expect(result).toBeUndefined(); expect(cookieJar.get).not.toHaveBeenCalled(); }); - it("should return promise resolved with undefined if no AMCV cookie or s_ecid cookie is present", async () => { build(); const result = await legacyIdentity.getEcid(); expect(result).toBeUndefined(); }); - [ "random|string|MCMID|1234|random|random", "MCMID|1234|random|random", @@ -70,36 +65,32 @@ describe("Identity::createLegacyIdentity", () => { "MCMID|1234", ].forEach((cookieValue) => { it(`should return promise resolved with ECID if AMCV cookie is ${cookieValue}`, async () => { - cookieJar.get.and.callFake((cookieName) => + cookieJar.get.mockImplementation((cookieName) => cookieName === "AMCV_TEST_ORG" ? cookieValue : undefined, ); build(); expect(await legacyIdentity.getEcid()).toEqual("1234"); }); - it(`should return promise resolved with ECID if s_ecid cookie is ${cookieValue}`, async () => { - cookieJar.get.and.callFake((cookieName) => + cookieJar.get.mockImplementation((cookieName) => cookieName === "s_ecid" ? cookieValue : undefined, ); build(); expect(await legacyIdentity.getEcid()).toEqual("1234"); }); }); - it("should return promise resolved with undefined cookie does not contain MCMID", async () => { const cookieValue = "version|0.0.4"; - cookieJar.get.and.returnValue(cookieValue); + cookieJar.get.mockReturnValue(cookieValue); build(); expect(await legacyIdentity.getEcid()).toBeUndefined(); }); - it("should request ECID from visitor ID Service if legacy ECID cookies are missing", async () => { - getEcidFromVisitor.and.returnValue(Promise.resolve("visitor_ecid")); + getEcidFromVisitor.mockReturnValue(Promise.resolve("visitor_ecid")); build(); expect(await legacyIdentity.getEcid()).toEqual("visitor_ecid"); }); }); - describe("setEcid", () => { it("should not write AMCV cookie if ID migration disabled", () => { idMigrationEnabled = false; @@ -107,11 +98,11 @@ describe("Identity::createLegacyIdentity", () => { legacyIdentity.setEcid("1234"); expect(cookieJar.set).not.toHaveBeenCalled(); }); - it("writes a secure AMCV cookie", () => { build(); legacyIdentity.setEcid("1234"); - expect(cookieJar.set).toHaveBeenCalledOnceWith( + expect(cookieJar.set).toHaveBeenNthCalledWith( + 1, "AMCV_TEST_ORG", "MCMID|1234", { @@ -122,12 +113,12 @@ describe("Identity::createLegacyIdentity", () => { }, ); }); - it("writes an insecure AMCV cookie", () => { isPageSsl = false; build(); legacyIdentity.setEcid("1234"); - expect(cookieJar.set).toHaveBeenCalledOnceWith( + expect(cookieJar.set).toHaveBeenNthCalledWith( + 1, "AMCV_TEST_ORG", "MCMID|1234", { @@ -136,9 +127,8 @@ describe("Identity::createLegacyIdentity", () => { }, ); }); - it("should not write AMCV cookie if already present", () => { - cookieJar.get.and.returnValue("MCMID|1234|otherstuff"); + cookieJar.get.mockReturnValue("MCMID|1234|otherstuff"); build(); legacyIdentity.setEcid("1234"); expect(cookieJar.set).not.toHaveBeenCalled(); diff --git a/test/unit/specs/components/Identity/getIdentity/createGetIdentity.spec.js b/test/unit/specs/components/Identity/getIdentity/createGetIdentity.spec.js index b56b9027a..e34ceabe8 100644 --- a/test/unit/specs/components/Identity/getIdentity/createGetIdentity.spec.js +++ b/test/unit/specs/components/Identity/getIdentity/createGetIdentity.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createGetIdentity from "../../../../../../src/components/Identity/getIdentity/createGetIdentity.js"; describe("Identity::createGetIdentity", () => { @@ -17,29 +18,20 @@ describe("Identity::createGetIdentity", () => { let createIdentityRequest; let requestPayload; let request; - beforeEach(() => { - sendEdgeNetworkRequest = jasmine.createSpy("sendEdgeNetworkRequest"); - requestPayload = jasmine.createSpyObj( - "requestPayload", - ["mergeConfigOverride"], - { - type: "payload", - }, - ); - createIdentityRequestPayload = jasmine - .createSpy("createIdentityRequestPayload") - .and.returnValue(requestPayload); + sendEdgeNetworkRequest = vi.fn(); + requestPayload = { + mergeConfigOverride: vi.fn(), + type: vi.fn().mockReturnValue("payload"), + }; + createIdentityRequestPayload = vi.fn().mockReturnValue(requestPayload); request = { getPayload() { return requestPayload; }, }; - createIdentityRequest = jasmine - .createSpy("createIdentityRequest") - .and.returnValue(request); + createIdentityRequest = vi.fn().mockReturnValue(request); }); - it("should return a function which calls sendEdgeNetworkRequest", () => { const getIdentity = createGetIdentity({ sendEdgeNetworkRequest, @@ -51,32 +43,35 @@ describe("Identity::createGetIdentity", () => { request, }); }); - it("each getIdentity call should create new payloads and requests", () => { - const payload1 = jasmine.createSpyObj( - "requestPayload", - ["mergeConfigOverride"], - { - type: "payload1", - }, - ); - const payload2 = jasmine.createSpyObj( - "requestPayload", - ["mergeConfigOverride"], - { - type: "payload2", - }, - ); - const request1 = { type: "request1" }; - const request2 = { type: "request2" }; - createIdentityRequestPayload.and.returnValues(payload1, payload2); - createIdentityRequest.and.returnValues(request1, request2); + const payload1 = { + mergeConfigOverride: vi.fn(), + type: vi.fn().mockReturnValue("payload1"), + }; + const payload2 = { + mergeConfigOverride: vi.fn(), + type: vi.fn().mockReturnValue("payload2"), + }; + const request1 = { + type: "request1", + }; + const request2 = { + type: "request2", + }; + createIdentityRequestPayload + .mockReturnValueOnce(payload1) + .mockReturnValueOnce(payload2); + createIdentityRequest + .mockReturnValueOnce(request1) + .mockReturnValueOnce(request2); const getIdentity = createGetIdentity({ sendEdgeNetworkRequest, createIdentityRequestPayload, createIdentityRequest, }); - getIdentity({ namespaces: ["namespace1", "namespace2"] }); + getIdentity({ + namespaces: ["namespace1", "namespace2"], + }); expect(createIdentityRequestPayload).toHaveBeenCalledWith([ "namespace1", "namespace2", @@ -95,11 +90,12 @@ describe("Identity::createGetIdentity", () => { request: request2, }); }); - it("send override configuration, when provided", () => { - const request1 = { type: "request1" }; - createIdentityRequestPayload.and.returnValues(requestPayload); - createIdentityRequest.and.returnValues(request1); + const request1 = { + type: "request1", + }; + createIdentityRequestPayload.mockReturnValueOnce(requestPayload); + createIdentityRequest.mockReturnValueOnce(request1); const getIdentity = createGetIdentity({ sendEdgeNetworkRequest, createIdentityRequestPayload, @@ -127,11 +123,12 @@ describe("Identity::createGetIdentity", () => { }, }); }); - it("send global override configuration, when provided", () => { - const request1 = { type: "request1" }; - createIdentityRequestPayload.and.returnValues(requestPayload); - createIdentityRequest.and.returnValues(request1); + const request1 = { + type: "request1", + }; + createIdentityRequestPayload.mockReturnValueOnce(requestPayload); + createIdentityRequest.mockReturnValueOnce(request1); const configuration = { com_adobe_identity: { idSyncContainerId: "123", @@ -159,11 +156,12 @@ describe("Identity::createGetIdentity", () => { }, }); }); - it("send edge config id override, when provided", () => { - const request1 = { type: "request1" }; - createIdentityRequestPayload.and.returnValues(requestPayload); - createIdentityRequest.and.returnValues(request1); + const request1 = { + type: "request1", + }; + createIdentityRequestPayload.mockReturnValueOnce(requestPayload); + createIdentityRequest.mockReturnValueOnce(request1); const getIdentity = createGetIdentity({ sendEdgeNetworkRequest, createIdentityRequestPayload, diff --git a/test/unit/specs/components/Identity/getIdentity/createGetIdentityOptionsValidator.spec.js b/test/unit/specs/components/Identity/getIdentity/createGetIdentityOptionsValidator.spec.js index 4407814a5..c63695c6b 100644 --- a/test/unit/specs/components/Identity/getIdentity/createGetIdentityOptionsValidator.spec.js +++ b/test/unit/specs/components/Identity/getIdentity/createGetIdentityOptionsValidator.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import createGetIdentityOptionsValidator from "../../../../../../src/components/Identity/getIdentity/createGetIdentityOptionsValidator.js"; describe("Identity::getIdentityOptionsValidator", () => { @@ -19,65 +20,72 @@ describe("Identity::getIdentityOptionsValidator", () => { const firstPartyValidator = createGetIdentityOptionsValidator({ thirdPartyCookiesEnabled: false, }); - it("should throw an error when invalid options are passed", () => { expect(() => { - thirdPartyValidator({ key: ["item1", "item2"] }); + thirdPartyValidator({ + key: ["item1", "item2"], + }); }).toThrow(new Error("'key': Unknown field.")); - expect(() => { thirdPartyValidator({ key1: ["item1", "item2"], key2: ["item1", "item2"], }); }).toThrow(new Error("'key1': Unknown field.\n'key2': Unknown field.")); - expect(() => { - thirdPartyValidator({ namespaces: [] }); + thirdPartyValidator({ + namespaces: [], + }); }).toThrow( new Error("'namespaces': Expected a non-empty array, but got []."), ); - expect(() => { - thirdPartyValidator({ namespaces: ["ECID", "ECID"] }); + thirdPartyValidator({ + namespaces: ["ECID", "ECID"], + }); }).toThrow( new Error( `'namespaces': Expected array values to be unique, but got ["ECID","ECID"].`, ), ); - expect(() => { - thirdPartyValidator({ namespaces: ["ACD"] }); + thirdPartyValidator({ + namespaces: ["ACD"], + }); }).toThrow( new Error( `'namespaces[0]': Expected one of these values: ["ECID","CORE"], but got "ACD".`, ), ); }); - it("should return valid options when no options are passed", () => { expect(() => { thirdPartyValidator(); }).not.toThrow(); const validatedIdentityOptions = thirdPartyValidator(); - expect(validatedIdentityOptions).toEqual({ namespaces: ["ECID"] }); + expect(validatedIdentityOptions).toEqual({ + namespaces: ["ECID"], + }); }); - it("should not throw when supported namespace options are passed", () => { const ECID = "ECID"; expect(() => { - thirdPartyValidator({ namespaces: [ECID] }); + thirdPartyValidator({ + namespaces: [ECID], + }); }).not.toThrow(); }); - it("should return valid options when configuration is passed", () => { expect(() => { thirdPartyValidator({ - edgeConfigOverrides: { identity: { idSyncContainerId: "123" } }, + edgeConfigOverrides: { + identity: { + idSyncContainerId: "123", + }, + }, }); }).not.toThrow(); }); - it("should return valid options when an empty configuration is passed", () => { expect(() => { thirdPartyValidator({ @@ -85,20 +93,22 @@ describe("Identity::getIdentityOptionsValidator", () => { }); }).not.toThrow(); }); - it("should throw an error when CORE is passed with third party cookies disabled", () => { expect(() => { - firstPartyValidator({ namespaces: ["CORE"] }); + firstPartyValidator({ + namespaces: ["CORE"], + }); }).toThrow( new Error( `namespaces: The CORE namespace cannot be requested when third-party cookies are disabled.`, ), ); }); - it("should not throw when CORE is passed with third party cookies enabled", () => { expect(() => { - thirdPartyValidator({ namespaces: ["CORE"] }); + thirdPartyValidator({ + namespaces: ["CORE"], + }); }).not.toThrow(); }); }); diff --git a/test/unit/specs/components/Identity/getIdentity/createIdentityRequest.spec.js b/test/unit/specs/components/Identity/getIdentity/createIdentityRequest.spec.js index f921f3bb1..689dd0e98 100644 --- a/test/unit/specs/components/Identity/getIdentity/createIdentityRequest.spec.js +++ b/test/unit/specs/components/Identity/getIdentity/createIdentityRequest.spec.js @@ -10,24 +10,26 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import describeRequest from "../../../../helpers/describeRequest.js"; import createIdentityRequest from "../../../../../../src/components/Identity/getIdentity/createIdentityRequest.js"; describe("createIdentityRequest", () => { describeRequest(createIdentityRequest); - it("provides the appropriate action", () => { const payload = {}; - const request = createIdentityRequest({ payload }); + const request = createIdentityRequest({ + payload, + }); expect(request.getAction()).toBe("identity/acquire"); }); - it("never uses sendBeacon", () => { const payload = {}; - const request = createIdentityRequest({ payload }); - expect(request.getUseSendBeacon()).toBeFalse(); + const request = createIdentityRequest({ + payload, + }); + expect(request.getUseSendBeacon()).toBe(false); }); - it("passes the datastreamIdOverride to the request", () => { const payload = {}; const datastreamIdOverride = "my-edge-config-id-override"; diff --git a/test/unit/specs/components/Identity/getIdentity/createIdentityRequestPayload.spec.js b/test/unit/specs/components/Identity/getIdentity/createIdentityRequestPayload.spec.js index 5271ef83e..ea336adcd 100644 --- a/test/unit/specs/components/Identity/getIdentity/createIdentityRequestPayload.spec.js +++ b/test/unit/specs/components/Identity/getIdentity/createIdentityRequestPayload.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import createIdentityPayload from "../../../../../../src/components/Identity/getIdentity/createIdentityRequestPayload.js"; import describeRequestPayload from "../../../../helpers/describeRequestPayload.js"; @@ -17,7 +18,6 @@ describe("createIdentityRequestPayload", () => { describeRequestPayload(() => { return createIdentityPayload(["NS1", "NS2", "NS3"]); }); - it("adds identities", () => { const payload = createIdentityPayload(["NS1", "NS2", "NS3"]); payload.addIdentity("IDNS", { @@ -39,7 +39,11 @@ describe("createIdentityRequestPayload", () => { ], }, }, - query: { identity: { fetch: ["NS1", "NS2", "NS3"] } }, + query: { + identity: { + fetch: ["NS1", "NS2", "NS3"], + }, + }, }); }); }); diff --git a/test/unit/specs/components/Identity/getNamespacesFromResponse.spec.js b/test/unit/specs/components/Identity/getNamespacesFromResponse.spec.js index b0ba97354..c279c0c3f 100644 --- a/test/unit/specs/components/Identity/getNamespacesFromResponse.spec.js +++ b/test/unit/specs/components/Identity/getNamespacesFromResponse.spec.js @@ -10,28 +10,29 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import getNamespacesFromResponse from "../../../../../src/components/Identity/getNamespacesFromResponse.js"; describe("Identity::getEcidFromResponse", () => { it("does not return ECID if ECID does not exist in response", () => { - const response = jasmine.createSpyObj("response", { - getPayloadsByType: [ + const response = { + getPayloadsByType: vi.fn().mockReturnValue([ { namespace: { code: "other", }, id: "user123", }, - ], + ]), + }; + expect(getNamespacesFromResponse(response)).toEqual({ + other: "user123", }); - - expect(getNamespacesFromResponse(response)).toEqual({ other: "user123" }); expect(response.getPayloadsByType).toHaveBeenCalledWith("identity:result"); }); - it("returns ECID if ECID exists in response", () => { - const response = jasmine.createSpyObj("response", { - getPayloadsByType: [ + const response = { + getPayloadsByType: vi.fn().mockReturnValue([ { namespace: { code: "other", @@ -44,9 +45,8 @@ describe("Identity::getEcidFromResponse", () => { }, id: "user@adobe", }, - ], - }); - + ]), + }; expect(getNamespacesFromResponse(response)).toEqual({ other: "user123", ECID: "user@adobe", diff --git a/test/unit/specs/components/Identity/injectAddEcidQueryToPayload.spec.js b/test/unit/specs/components/Identity/injectAddEcidQueryToPayload.spec.js index 4daaa8358..211e5f3d4 100644 --- a/test/unit/specs/components/Identity/injectAddEcidQueryToPayload.spec.js +++ b/test/unit/specs/components/Identity/injectAddEcidQueryToPayload.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import injectAddEcidQueryToPayload from "../../../../../src/components/Identity/injectAddEcidQueryToPayload.js"; describe("Identity::addEcidQueryToPayload", () => { @@ -18,7 +19,9 @@ describe("Identity::addEcidQueryToPayload", () => { thirdPartyCookiesEnabled: true, areThirdPartyCookiesSupportedByDefault: () => true, }); - const payload = jasmine.createSpyObj("payload", ["mergeQuery"]); + const payload = { + mergeQuery: vi.fn(), + }; addEcidQueryToPayload(payload); expect(payload.mergeQuery).toHaveBeenCalledWith({ identity: { @@ -31,7 +34,9 @@ describe("Identity::addEcidQueryToPayload", () => { thirdPartyCookiesEnabled: true, areThirdPartyCookiesSupportedByDefault: () => false, }); - const payload = jasmine.createSpyObj("payload", ["mergeQuery"]); + const payload = { + mergeQuery: vi.fn(), + }; addEcidQueryToPayload(payload); expect(payload.mergeQuery).toHaveBeenCalledWith({ identity: { @@ -44,7 +49,9 @@ describe("Identity::addEcidQueryToPayload", () => { thirdPartyCookiesEnabled: false, areThirdPartyCookiesSupportedByDefault: () => true, }); - const payload = jasmine.createSpyObj("payload", ["mergeQuery"]); + const payload = { + mergeQuery: vi.fn(), + }; addEcidQueryToPayload(payload); expect(payload.mergeQuery).toHaveBeenCalledWith({ identity: { diff --git a/test/unit/specs/components/Identity/injectAddLegacyEcidToPayload.spec.js b/test/unit/specs/components/Identity/injectAddLegacyEcidToPayload.spec.js index e59df27e8..9faf0cfed 100644 --- a/test/unit/specs/components/Identity/injectAddLegacyEcidToPayload.spec.js +++ b/test/unit/specs/components/Identity/injectAddLegacyEcidToPayload.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectAddLegacyEcidToPayload from "../../../../../src/components/Identity/injectAddLegacyEcidToPayload.js"; describe("Identity::injectAddLegacyEcidToPayload", () => { @@ -17,36 +18,32 @@ describe("Identity::injectAddLegacyEcidToPayload", () => { let addEcidToPayload; let payload; let addLegacyEcidToPayload; - beforeEach(() => { - getLegacyEcid = jasmine - .createSpy("getEcidFromLegacy") - .and.returnValue(Promise.resolve("legacy@adobe")); - addEcidToPayload = jasmine.createSpy("addEcidToPayload"); + getLegacyEcid = vi.fn().mockReturnValue(Promise.resolve("legacy@adobe")); + addEcidToPayload = vi.fn(); addLegacyEcidToPayload = injectAddLegacyEcidToPayload({ getLegacyEcid, addEcidToPayload, }); - payload = jasmine.createSpyObj("payload", ["hasIdentity"]); + payload = { + hasIdentity: vi.fn(), + }; }); - it("does not add legacy ECID to payload if legacy ECID does not exist", () => { - payload.hasIdentity.and.returnValue(false); - getLegacyEcid.and.returnValue(Promise.resolve()); + payload.hasIdentity.mockReturnValue(false); + getLegacyEcid.mockReturnValue(Promise.resolve()); return addLegacyEcidToPayload(payload).then(() => { expect(addEcidToPayload).not.toHaveBeenCalled(); }); }); - it("adds legacy ECID to payload if legacy ECID exists", () => { - payload.hasIdentity.and.returnValue(false); + payload.hasIdentity.mockReturnValue(false); return addLegacyEcidToPayload(payload).then(() => { expect(addEcidToPayload).toHaveBeenCalledWith(payload, "legacy@adobe"); }); }); - it("does not add legacy ECID to payload if the payload already has an ecid", async () => { - payload.hasIdentity.and.returnValue(true); + payload.hasIdentity.mockReturnValue(true); const response = await addLegacyEcidToPayload(payload); expect(getLegacyEcid).not.toHaveBeenCalled(); expect(response).toBeUndefined(); diff --git a/test/unit/specs/components/Identity/injectAddQueryStringIdentityToPayload.spec.js b/test/unit/specs/components/Identity/injectAddQueryStringIdentityToPayload.spec.js index fa4e4ccd9..d3cc35bd4 100644 --- a/test/unit/specs/components/Identity/injectAddQueryStringIdentityToPayload.spec.js +++ b/test/unit/specs/components/Identity/injectAddQueryStringIdentityToPayload.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectAddQueryStringIdentityToPayload from "../../../../../src/components/Identity/injectAddQueryStringIdentityToPayload.js"; import createDataCollectionRequestPayload from "../../../../../src/utils/request/createDataCollectionRequestPayload.js"; import createIdentityRequestPayload from "../../../../../src/components/Identity/getIdentity/createIdentityRequestPayload.js"; @@ -22,16 +23,17 @@ describe("Identity::injectAddQueryStringIdentityToPayload", () => { let logger; let date; let payload; - beforeEach(() => { dateProvider = () => date; locationSearch = "?foo=bar&adobe_mc=TS%3D1641432103%7CMCMID%3D77094828402023918047117570965393734545%7CMCORGID%3DFAF554945B90342F0A495E2C%40AdobeOrg&a=b"; date = new Date(1641432103 * 1000); orgId = "FAF554945B90342F0A495E2C@AdobeOrg"; - logger = jasmine.createSpyObj("logger", ["info", "warn"]); + logger = { + info: vi.fn(), + warn: vi.fn(), + }; }); - const run = () => { injectAddQueryStringIdentityToPayload({ locationSearch, @@ -40,7 +42,6 @@ describe("Identity::injectAddQueryStringIdentityToPayload", () => { logger, })(payload); }; - [ [ "DataCollection", @@ -54,7 +55,6 @@ describe("Identity::injectAddQueryStringIdentityToPayload", () => { beforeEach(() => { payload = createPayload(); }); - it("adds the identity", () => { run(); expect(getIdentityMap(payload.toJSON())).toEqual({ @@ -65,9 +65,10 @@ describe("Identity::injectAddQueryStringIdentityToPayload", () => { ], }); }); - it("doesn't overwrite an existing identity in the identityMap", () => { - payload.addIdentity("ECID", { id: "1234" }); + payload.addIdentity("ECID", { + id: "1234", + }); run(); expect(getIdentityMap(payload.toJSON())).toEqual({ ECID: [ @@ -79,103 +80,89 @@ describe("Identity::injectAddQueryStringIdentityToPayload", () => { }); }); }); - describe("with mock payload", () => { beforeEach(() => { - payload = jasmine.createSpyObj("payload", ["addIdentity", "hasIdentity"]); - payload.hasIdentity.and.returnValue(false); + payload = { + addIdentity: vi.fn(), + hasIdentity: vi.fn(), + }; + payload.hasIdentity.mockReturnValue(false); }); - it("doesn't do anything when there is no query string", () => { locationSearch = ""; run(); expect(payload.addIdentity).not.toHaveBeenCalled(); }); - it("doesn't do anything when there is no TS parameter", () => { - locationSearch = `?adobe_mc=${encodeURIComponent( - "MCMID=myid|MCORG=myorg", - )}`; + locationSearch = `?adobe_mc=${encodeURIComponent("MCMID=myid|MCORG=myorg")}`; run(); expect(payload.addIdentity).not.toHaveBeenCalled(); }); - it("doesn't do anything when there is no MCMID parameter", () => { locationSearch = `?adobe_mc=${encodeURIComponent("TS=1000|MCORG=myorg")}`; run(); expect(payload.addIdentity).not.toHaveBeenCalled(); }); - it("doesn't do anything when there is no MCORG parameter", () => { locationSearch = `?adobe_mc=${encodeURIComponent("TS=1000|MCMID=myid")}`; run(); expect(payload.addIdentity).not.toHaveBeenCalled(); }); - it("doesn't do anything with an expired link", () => { date = new Date((1641432103 + 301) * 1000); run(); expect(payload.addIdentity).not.toHaveBeenCalled(); }); - it("adds the identity for an exactly 5 minute old link", () => { date = new Date((1641432103 + 300) * 1000); run(); expect(payload.addIdentity).toHaveBeenCalled(); }); - it("doesn't do anything when the orgs don't match", () => { orgId = "myotherorg"; run(); expect(payload.addIdentity).not.toHaveBeenCalled(); }); - [ "adobe_mc=", "adobe_mc=a", "adobe_mc=a%3Db", "adobe_mc=%7C%7C", - `adobe_mc=${encodeURIComponent( - "TS=foo|MCMID=12345|MCORGID=FAF554945B90342F0A495E2C@AdobeOrg", - )}`, - `adobe_mc=${encodeURIComponent( - "TS=1641432103|MCMID=|MCORGID=FAF554945B90342F0A495E2C@AdobeOrg", - )}`, + `adobe_mc=${encodeURIComponent("TS=foo|MCMID=12345|MCORGID=FAF554945B90342F0A495E2C@AdobeOrg")}`, + `adobe_mc=${encodeURIComponent("TS=1641432103|MCMID=|MCORGID=FAF554945B90342F0A495E2C@AdobeOrg")}`, `adobe_mc=${encodeURIComponent("TS|MCMID")}`, ].forEach((value) => { it(`handles garbage parameter value: ${value}`, () => { locationSearch = `?${value}`; run(); expect(payload.addIdentity).not.toHaveBeenCalled(); - expect(logger.info).toHaveBeenCalledOnceWith( - jasmine.stringMatching(/invalid/), + expect(logger.info).toHaveBeenNthCalledWith( + 1, + expect.stringMatching(/invalid/), ); }); }); - it("reads an identity from visitor", () => { locationSearch = "?adobe_mc=MCMID%3D06387190804794960331430905673364101813%7CMCORGID%3D5BFE274A5F6980A50A495C08%2540AdobeOrg%7CTS%3D1653516560"; orgId = "5BFE274A5F6980A50A495C08@AdobeOrg"; date = new Date(1653516560 * 1000); run(); - expect(payload.addIdentity).toHaveBeenCalledOnceWith("ECID", { + expect(payload.addIdentity).toHaveBeenNthCalledWith(1, "ECID", { id: "06387190804794960331430905673364101813", }); }); - it("handles multiple copies of the adobe_mc param", () => { locationSearch = "?adobe_mc=MCMID%3Dfirst%7CMCORGID%3Dabc%7CTS%3D1653516560&adobe_mc=MCMID%3Dsecond%7CMCORGID%3Dabc%7CTS%3D1653516560"; orgId = "abc"; date = new Date(1653516560 * 1000); run(); - expect(payload.addIdentity).toHaveBeenCalledOnceWith("ECID", { + expect(payload.addIdentity).toHaveBeenNthCalledWith(1, "ECID", { id: "second", }); expect(logger.warn).toHaveBeenCalled(); }); - it("handles multiple copies of the adobe_mc param with empty param", () => { locationSearch = "?adobe_mc=MCMID%3Dfirst%7CMCORGID%3Dabc%7CTS%3D1653516560&adobe_mc="; diff --git a/test/unit/specs/components/Identity/injectAwaitIdentityCookie.spec.js b/test/unit/specs/components/Identity/injectAwaitIdentityCookie.spec.js index 222ea54d4..3e4b58ef2 100644 --- a/test/unit/specs/components/Identity/injectAwaitIdentityCookie.spec.js +++ b/test/unit/specs/components/Identity/injectAwaitIdentityCookie.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectAwaitIdentityCookie from "../../../../../src/components/Identity/injectAwaitIdentityCookie.js"; describe("Identity::injectAwaitIdentityCookie", () => { @@ -20,7 +21,6 @@ describe("Identity::injectAwaitIdentityCookie", () => { let onResponse; let onRequestFailure; let logger; - beforeEach(() => { identityCookieExists = true; const onResponseCallbacks = []; @@ -37,45 +37,51 @@ describe("Identity::injectAwaitIdentityCookie", () => { }); }; onRequestFailure = (callback) => onRequestFailureCallbacks.push(callback); - logger = jasmine.createSpyObj("logger", ["warn"]); + logger = { + warn: vi.fn(), + }; awaitIdentityCookie = injectAwaitIdentityCookie({ orgId: "org@adobe", doesIdentityCookieExist: () => identityCookieExists, logger, }); }); - it("resolves promise if identity cookie exists after response", () => { - const promise = awaitIdentityCookie({ onResponse, onRequestFailure }); + const promise = awaitIdentityCookie({ + onResponse, + onRequestFailure, + }); runOnResponseCallbacks(); expect(logger.warn).not.toHaveBeenCalled(); return promise; }); - it("rejects promise if identity cookie does not exist after response and logs warning", () => { identityCookieExists = false; - const promise = awaitIdentityCookie({ onResponse, onRequestFailure }); + const promise = awaitIdentityCookie({ + onResponse, + onRequestFailure, + }); runOnResponseCallbacks(); expect(logger.warn).toHaveBeenCalled(); - return expectAsync(promise).toBeRejectedWithError( - /Identity cookie not found/i, - ); + return expect(promise).rejects.toThrowError(/Identity cookie not found/i); }); - it("resolves promise if identity cookie exists after request failure", () => { - const promise = awaitIdentityCookie({ onResponse, onRequestFailure }); + const promise = awaitIdentityCookie({ + onResponse, + onRequestFailure, + }); runOnRequestFailureCallbacks(); expect(logger.warn).not.toHaveBeenCalled(); return promise; }); - it("rejects promise if identity cookie does not exist after request failure", () => { identityCookieExists = false; - const promise = awaitIdentityCookie({ onResponse, onRequestFailure }); + const promise = awaitIdentityCookie({ + onResponse, + onRequestFailure, + }); runOnRequestFailureCallbacks(); expect(logger.warn).not.toHaveBeenCalled(); - return expectAsync(promise).toBeRejectedWithError( - /Identity cookie not found/i, - ); + return expect(promise).rejects.toThrowError(/Identity cookie not found/i); }); }); diff --git a/test/unit/specs/components/Identity/injectEnsureSingleIdentity.spec.js b/test/unit/specs/components/Identity/injectEnsureSingleIdentity.spec.js index d0ced378c..dfa986a89 100644 --- a/test/unit/specs/components/Identity/injectEnsureSingleIdentity.spec.js +++ b/test/unit/specs/components/Identity/injectEnsureSingleIdentity.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectEnsureSingleIdentity from "../../../../../src/components/Identity/injectEnsureSingleIdentity.js"; import { defer } from "../../../../../src/utils/index.js"; import flushPromiseChains from "../../../helpers/flushPromiseChains.js"; @@ -21,7 +22,6 @@ describe("Identity::injectEnsureSingleIdentity", () => { let awaitIdentityCookie; let logger; let ensureSingleIdentity; - let sentIndex; let receivedIndex; let requests; @@ -30,22 +30,23 @@ describe("Identity::injectEnsureSingleIdentity", () => { let onResponse; let onRequestFailure; let doesIdentityCookieExistBoolean; - beforeEach(() => { - logger = jasmine.createSpyObj("logger", ["info"]); - + logger = { + info: vi.fn(), + }; sentIndex = 0; receivedIndex = 0; requests = []; requestSentStatusByIndex = []; awaitIdentityDeferreds = []; doesIdentityCookieExistBoolean = false; - setDomainForInitialIdentityPayload = (request) => { request.setUseIdThirdPartyDomain(); }; addLegacyEcidToPayload = (payload) => { - payload.addIdentity("ECID", { id: "ABC123" }); + payload.addIdentity("ECID", { + id: "ABC123", + }); return Promise.resolve(); }; awaitIdentityCookie = () => { @@ -55,7 +56,6 @@ describe("Identity::injectEnsureSingleIdentity", () => { }; doesIdentityCookieExist = () => doesIdentityCookieExistBoolean; }); - const setup = () => { ensureSingleIdentity = injectEnsureSingleIdentity({ doesIdentityCookieExist, @@ -65,19 +65,18 @@ describe("Identity::injectEnsureSingleIdentity", () => { logger, }); }; - const sendRequest = () => { - const requestPayload = jasmine.createSpyObj("requestPayload", [ - "addIdentity", - ]); - const request = jasmine.createSpyObj("request", { - getPayload: requestPayload, - setIsIdentityEstablished: undefined, - setUseIdThirdPartyDomain: undefined, - }); + const requestPayload = { + addIdentity: vi.fn(), + }; + const request = { + getPayload: vi.fn().mockReturnValue(requestPayload), + setIsIdentityEstablished: vi.fn().mockReturnValue(undefined), + setUseIdThirdPartyDomain: vi.fn().mockReturnValue(undefined), + }; requests.push(request); - onResponse = jasmine.createSpy("onResponse"); - onRequestFailure = jasmine.createSpy("onRequestFailure"); + onResponse = vi.fn(); + onRequestFailure = vi.fn(); const i = sentIndex; requestSentStatusByIndex.push(false); ensureSingleIdentity({ @@ -87,7 +86,6 @@ describe("Identity::injectEnsureSingleIdentity", () => { }).then(() => { requestSentStatusByIndex[i] = true; }); - sentIndex += 1; }; const simulateResponseWithIdentity = () => { @@ -99,7 +97,6 @@ describe("Identity::injectEnsureSingleIdentity", () => { awaitIdentityDeferreds[receivedIndex].reject(); receivedIndex += 1; }; - it("allows first request to proceed and pauses subsequent requests until identity cookie exists", () => { setup(); return Promise.resolve() @@ -131,7 +128,6 @@ describe("Identity::injectEnsureSingleIdentity", () => { expect(requestSentStatusByIndex[3]).toEqual(true); }); }); - it("allows the second request to be called if the first doesn't set the cookie, but still holds up the third", () => { setup(); return Promise.resolve() @@ -164,7 +160,6 @@ describe("Identity::injectEnsureSingleIdentity", () => { expect(requests[3].getPayload().addIdentity).not.toHaveBeenCalled(); }); }); - it("logs messages", () => { setup(); return Promise.resolve() @@ -190,7 +185,6 @@ describe("Identity::injectEnsureSingleIdentity", () => { ); }); }); - it("sends a request without third-party domain or legacy ECID if we have an identity cookie", () => { doesIdentityCookieExistBoolean = true; setup(); @@ -205,10 +199,9 @@ describe("Identity::injectEnsureSingleIdentity", () => { expect(requests[0].getPayload().addIdentity).not.toHaveBeenCalled(); }); }); - it("calls awaitIdentityCookie with the correct parameters", () => { - awaitIdentityCookie = jasmine.createSpy("awaitIdentityCookie"); - awaitIdentityCookie.and.returnValue(Promise.resolve()); + awaitIdentityCookie = vi.fn(); + awaitIdentityCookie.mockReturnValue(Promise.resolve()); setup(); sendRequest(); expect(awaitIdentityCookie).toHaveBeenCalledWith({ diff --git a/test/unit/specs/components/Identity/injectHandleResponseForIdSyncs.spec.js b/test/unit/specs/components/Identity/injectHandleResponseForIdSyncs.spec.js index 3d6e6ce26..f0cfa9dd5 100644 --- a/test/unit/specs/components/Identity/injectHandleResponseForIdSyncs.spec.js +++ b/test/unit/specs/components/Identity/injectHandleResponseForIdSyncs.spec.js @@ -10,22 +10,21 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import injectHandleResponseForIdSyncs from "../../../../../src/components/Identity/injectHandleResponseForIdSyncs.js"; describe("Identity::injectHandleResponseForIdSyncs", () => { it("processes ID syncs", () => { const processIdSyncsPromise = Promise.resolve(); - const processIdSyncs = jasmine - .createSpy("processIdSyncs") - .and.returnValue(processIdSyncsPromise); + const processIdSyncs = vi.fn().mockReturnValue(processIdSyncsPromise); const idSyncPayloads = [ { type: "idSync", }, ]; - const response = jasmine.createSpyObj("response", { - getPayloadsByType: idSyncPayloads, - }); + const response = { + getPayloadsByType: vi.fn().mockReturnValue(idSyncPayloads), + }; const handleResponseForIdSyncs = injectHandleResponseForIdSyncs({ processIdSyncs, }); diff --git a/test/unit/specs/components/Identity/injectProcessIdSyncs.spec.js b/test/unit/specs/components/Identity/injectProcessIdSyncs.spec.js index cc9cf18ef..64f2db146 100644 --- a/test/unit/specs/components/Identity/injectProcessIdSyncs.spec.js +++ b/test/unit/specs/components/Identity/injectProcessIdSyncs.spec.js @@ -9,35 +9,33 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectProcessIdSyncs from "../../../../../src/components/Identity/injectProcessIdSyncs.js"; describe("Identity::injectProcessIdSyncs", () => { let fireReferrerHideableImage; let logger; let processIdSyncs; - beforeEach(() => { - fireReferrerHideableImage = jasmine - .createSpy() - .and.returnValue(Promise.resolve()); - logger = jasmine.createSpyObj("logger", ["info", "error"]); + fireReferrerHideableImage = vi.fn().mockReturnValue(Promise.resolve()); + logger = { + info: vi.fn(), + error: vi.fn(), + }; processIdSyncs = injectProcessIdSyncs({ fireReferrerHideableImage, logger, }); }); - it("handles no ID syncs", () => { return processIdSyncs([]).then(() => { expect(fireReferrerHideableImage).not.toHaveBeenCalled(); }); }); - it("calls fireReferrerHideableImage for all ID syncs of type URL, and logs results", () => { - fireReferrerHideableImage.and.callFake(({ url }) => { + fireReferrerHideableImage.mockImplementation(({ url }) => { return url === "http://test.zyx" ? Promise.resolve() : Promise.reject(); }); - const identities = [ { type: "url", @@ -65,7 +63,6 @@ describe("Identity::injectProcessIdSyncs", () => { }, }, ]; - return processIdSyncs(identities).then(() => { expect(fireReferrerHideableImage).toHaveBeenCalledWith({ url: "http://test.abc", diff --git a/test/unit/specs/components/Identity/injectSetDomainForInitialIdentityPayload.spec.js b/test/unit/specs/components/Identity/injectSetDomainForInitialIdentityPayload.spec.js index 5f8d30820..ce5d71324 100644 --- a/test/unit/specs/components/Identity/injectSetDomainForInitialIdentityPayload.spec.js +++ b/test/unit/specs/components/Identity/injectSetDomainForInitialIdentityPayload.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectSetDomainForInitialIdentityPayload from "../../../../../src/components/Identity/injectSetDomainForInitialIdentityPayload.js"; describe("Identity::injectSetDomainForInitialIdentityPayload", () => { @@ -17,7 +18,6 @@ describe("Identity::injectSetDomainForInitialIdentityPayload", () => { let thirdPartyCookiesEnabled; let areThirdPartyCookiesSupportedByDefault; let setDomainForInitialIdentityPayload; - const build = () => { setDomainForInitialIdentityPayload = injectSetDomainForInitialIdentityPayload({ @@ -25,34 +25,30 @@ describe("Identity::injectSetDomainForInitialIdentityPayload", () => { areThirdPartyCookiesSupportedByDefault, }); }; - beforeEach(() => { - request = jasmine.createSpyObj("request", ["setUseIdThirdPartyDomain"]); - areThirdPartyCookiesSupportedByDefault = jasmine.createSpy( - "areThirdPartyCookiesSupportedByDefault", - ); + request = { + setUseIdThirdPartyDomain: vi.fn(), + }; + areThirdPartyCookiesSupportedByDefault = vi.fn(); }); - it("does not use third-party domain if third-party cookies are disabled", () => { thirdPartyCookiesEnabled = false; - areThirdPartyCookiesSupportedByDefault.and.returnValue(true); + areThirdPartyCookiesSupportedByDefault.mockReturnValue(true); build(); setDomainForInitialIdentityPayload(request); expect(request.setUseIdThirdPartyDomain).not.toHaveBeenCalled(); }); - it("does not use third-party domain if third-party cookies are not supported by the browser by default", () => { thirdPartyCookiesEnabled = true; - areThirdPartyCookiesSupportedByDefault.and.returnValue(false); + areThirdPartyCookiesSupportedByDefault.mockReturnValue(false); build(); setDomainForInitialIdentityPayload(request); expect(areThirdPartyCookiesSupportedByDefault).toHaveBeenCalledWith(); expect(request.setUseIdThirdPartyDomain).not.toHaveBeenCalled(); }); - it("uses third-party domain if third-party cookies are enabled and supported by the browser by default", () => { thirdPartyCookiesEnabled = true; - areThirdPartyCookiesSupportedByDefault.and.returnValue(true); + areThirdPartyCookiesSupportedByDefault.mockReturnValue(true); build(); setDomainForInitialIdentityPayload(request); expect(areThirdPartyCookiesSupportedByDefault).toHaveBeenCalledWith(); diff --git a/test/unit/specs/components/Identity/visitorService/awaitVisitorOptIn.spec.js b/test/unit/specs/components/Identity/visitorService/awaitVisitorOptIn.spec.js index 3887a32ff..6507d621e 100644 --- a/test/unit/specs/components/Identity/visitorService/awaitVisitorOptIn.spec.js +++ b/test/unit/specs/components/Identity/visitorService/awaitVisitorOptIn.spec.js @@ -10,27 +10,28 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, afterAll, describe, it, expect } from "vitest"; import awaitVisitorOptIn from "../../../../../../src/components/Identity/visitorService/awaitVisitorOptIn.js"; -const logger = jasmine.createSpyObj(["info"]); - +const logger = { + info: vi.fn(), +}; describe("awaitVisitorOptIn", () => { beforeEach(() => { window.adobe = undefined; }); - afterAll(() => { window.adobe = undefined; }); - describe("No legacy opt in object is present", () => { it("should return promise resolved with undefined", () => { - return expectAsync(awaitVisitorOptIn({ logger })).toBeResolvedTo( - undefined, - ); + return expect( + awaitVisitorOptIn({ + logger, + }), + ).resolves.toBe(undefined); }); }); - describe("Legacy opt in object is present and gives approval", () => { it("should return promise resolved with undefined", () => { window.adobe = { @@ -46,13 +47,13 @@ describe("awaitVisitorOptIn", () => { }, }, }; - - return expectAsync(awaitVisitorOptIn({ logger })).toBeResolvedTo( - undefined, - ); + return expect( + awaitVisitorOptIn({ + logger, + }), + ).resolves.toBe(undefined); }); }); - describe("Legacy opt in object is present and gives denial", () => { it('should return promise rejected with new Error("Legacy opt-in was declined.")', () => { window.adobe = { @@ -68,10 +69,11 @@ describe("awaitVisitorOptIn", () => { }, }, }; - - return expectAsync(awaitVisitorOptIn({ logger })).toBeRejectedWithError( - "Legacy opt-in was declined.", - ); + return expect( + awaitVisitorOptIn({ + logger, + }), + ).rejects.toThrowError("Legacy opt-in was declined."); }); }); }); diff --git a/test/unit/specs/components/Identity/visitorService/getVisitor.spec.js b/test/unit/specs/components/Identity/visitorService/getVisitor.spec.js index 5bd76bd88..09f03b6f1 100644 --- a/test/unit/specs/components/Identity/visitorService/getVisitor.spec.js +++ b/test/unit/specs/components/Identity/visitorService/getVisitor.spec.js @@ -10,22 +10,21 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import getVisitor from "../../../../../../src/components/Identity/visitorService/getVisitor.js"; describe("getVisitor", () => { let mockWindow; - beforeEach(() => { mockWindow = {}; }); - it("Returns Visitor function if Visitor is available and valid", () => { - mockWindow.Visitor = jasmine.createSpy(); - mockWindow.Visitor.getInstance = jasmine.createSpy(); + mockWindow.Visitor = vi.fn(); + mockWindow.Visitor.getInstance = vi.fn(); expect(getVisitor(mockWindow)).toEqual(mockWindow.Visitor); }); it("Returns false if Visitor is available but does not support getInstance", () => { - mockWindow.Visitor = jasmine.createSpy(); + mockWindow.Visitor = vi.fn(); expect(getVisitor(mockWindow)).toBe(false); }); it("Returns false if Visitor is not available", () => { diff --git a/test/unit/specs/components/Identity/visitorService/injectGetEcidFromVisitor.spec.js b/test/unit/specs/components/Identity/visitorService/injectGetEcidFromVisitor.spec.js index 3f3c13c15..daa613a55 100644 --- a/test/unit/specs/components/Identity/visitorService/injectGetEcidFromVisitor.spec.js +++ b/test/unit/specs/components/Identity/visitorService/injectGetEcidFromVisitor.spec.js @@ -10,10 +10,12 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, afterAll, describe, it, expect } from "vitest"; import injectGetEcidFromVisitor from "../../../../../../src/components/Identity/visitorService/injectGetEcidFromVisitor.js"; -const logger = jasmine.createSpyObj(["info"]); - +const logger = { + info: vi.fn(), +}; const Visitor = () => {}; Visitor.getInstance = () => { return { @@ -24,68 +26,61 @@ Visitor.getInstance = () => { }, }; }; - const orgId = "456org"; - describe("getEcidFromVisitor", () => { beforeEach(() => { window.Visitor = undefined; }); - afterAll(() => { window.Visitor = undefined; }); - describe("Visitor does not exist", () => { it("should return promise resolved with undefined", () => { - const getEcidFromVisitor = injectGetEcidFromVisitor({ logger, orgId }); - return expectAsync(getEcidFromVisitor()).toBeResolvedTo(undefined); + const getEcidFromVisitor = injectGetEcidFromVisitor({ + logger, + orgId, + }); + return expect(getEcidFromVisitor()).resolves.toBe(undefined); }); }); - describe("Visitor exists; awaitVisitorOptIn resolves the promise", () => { it("should return promise resolved with ecid123", () => { window.Visitor = Visitor; const awaitVisitorOptIn = () => { return Promise.resolve(); }; - const getEcidFromVisitor = injectGetEcidFromVisitor({ logger, orgId, awaitVisitorOptIn, }); - return expectAsync(getEcidFromVisitor()).toBeResolvedTo("ecid123"); + return expect(getEcidFromVisitor()).resolves.toBe("ecid123"); }); }); - describe("Visitor exists; awaitVisitorOptIn rejects the promise", () => { it("should return promise resolved with undefined", () => { window.Visitor = Visitor; const awaitVisitorOptIn = () => { return Promise.reject(); }; - const getEcidFromVisitor = injectGetEcidFromVisitor({ logger, orgId, awaitVisitorOptIn, }); - return expectAsync(getEcidFromVisitor()).toBeResolvedTo(undefined); + return expect(getEcidFromVisitor()).resolves.toBe(undefined); }); }); - it("should find Visitor if it was defined after Web SDK initialization.", () => { const awaitVisitorOptIn = () => { return Promise.resolve(); }; - const getEcidFromVisitor = injectGetEcidFromVisitor({ logger, orgId, awaitVisitorOptIn, }); window.Visitor = Visitor; - return expectAsync(getEcidFromVisitor()).toBeResolvedTo("ecid123"); + return expect(getEcidFromVisitor()).resolves.toBe("ecid123"); }); }); diff --git a/test/unit/specs/components/LibraryInfo/index.spec.js b/test/unit/specs/components/LibraryInfo/index.spec.js index 14e18b877..5cba3f75e 100644 --- a/test/unit/specs/components/LibraryInfo/index.spec.js +++ b/test/unit/specs/components/LibraryInfo/index.spec.js @@ -9,11 +9,11 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import createLibraryInfo from "../../../../../src/components/LibraryInfo/index.js"; describe("LibraryInfo", () => { let toolsMock; - beforeEach(() => { toolsMock = { config: { @@ -25,12 +25,13 @@ describe("LibraryInfo", () => { }, }; }); - it("returns library, command, and config information", () => { expect(createLibraryInfo(toolsMock).commands.getLibraryInfo.run()).toEqual({ libraryInfo: { version: `__VERSION__`, - configs: { foo: "bar" }, + configs: { + foo: "bar", + }, commands: ["bar", "configure", "setDebug"], components: ["ComponentA", "ComponentB"], }, diff --git a/test/unit/specs/components/MediaAnalyticsBridge/createGetInstance.spec.js b/test/unit/specs/components/MediaAnalyticsBridge/createGetInstance.spec.js index 26e268788..d91683a55 100644 --- a/test/unit/specs/components/MediaAnalyticsBridge/createGetInstance.spec.js +++ b/test/unit/specs/components/MediaAnalyticsBridge/createGetInstance.spec.js @@ -9,22 +9,21 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -const createGetInstance = require("../../../../../src/components/MediaAnalyticsBridge/createGetInstance.js"); +import { vi, beforeEach, describe, it, expect } from "vitest"; +import createGetInstance from "../../../../../src/components/MediaAnalyticsBridge/createGetInstance.js"; describe("createGetInstance", () => { const logger = { - warn: jasmine.createSpy(), + warn: vi.fn(), }; let trackMediaSession; let trackMediaEvent; let uuid; - beforeEach(() => { - trackMediaSession = jasmine.createSpy(); - trackMediaEvent = jasmine.createSpy(); - uuid = jasmine.createSpy().and.returnValue("1234-5678-9101-1121"); + trackMediaSession = vi.fn(); + trackMediaEvent = vi.fn(); + uuid = vi.fn().mockReturnValue("1234-5678-9101-1121"); }); - it("should return an object", () => { const result = createGetInstance({ logger, @@ -44,7 +43,6 @@ describe("createGetInstance", () => { expect(typeof result.updateQoEObject).toBe("function"); expect(typeof result.destroy).toBe("function"); }); - it("when play is called", () => { const result = createGetInstance({ logger, @@ -52,12 +50,16 @@ describe("createGetInstance", () => { trackMediaEvent, uuid, }); - result.trackSessionStart({ sessionDetails: {} }); + result.trackSessionStart({ + sessionDetails: {}, + }); result.trackPlay(); - expect(trackMediaEvent).toHaveBeenCalledWith({ playerId: "1234-5678-9101-1121", - xdm: { eventType: "media.play", mediaCollection: {} }, + xdm: { + eventType: "media.play", + mediaCollection: {}, + }, }); }); it("when pause is called", () => { @@ -67,15 +69,18 @@ describe("createGetInstance", () => { trackMediaEvent, uuid, }); - result.trackSessionStart({ sessionDetails: {} }); + result.trackSessionStart({ + sessionDetails: {}, + }); result.trackPause(); - expect(trackMediaEvent).toHaveBeenCalledWith({ playerId: "1234-5678-9101-1121", - xdm: { eventType: "media.pauseStart", mediaCollection: {} }, + xdm: { + eventType: "media.pauseStart", + mediaCollection: {}, + }, }); }); - it("when sessionStart is called", () => { const result = createGetInstance({ logger, @@ -90,7 +95,6 @@ describe("createGetInstance", () => { streamType: "vod", contentType: "video/mp4", }; - const meta = { isUserLoggedIn: "false", tvStation: "Sample TV station", @@ -98,10 +102,15 @@ describe("createGetInstance", () => { assetID: "/uri-reference", "a.media.episode": "episode1", }; - result.trackSessionStart({ sessionDetails }, meta); + result.trackSessionStart( + { + sessionDetails, + }, + meta, + ); expect(trackMediaSession).toHaveBeenCalledWith({ playerId: "1234-5678-9101-1121", - getPlayerDetails: jasmine.any(Function), + getPlayerDetails: expect.any(Function), xdm: { eventType: "media.sessionStart", mediaCollection: { @@ -114,16 +123,27 @@ describe("createGetInstance", () => { episode: "episode1", }, customMetadata: [ - { name: "isUserLoggedIn", value: "false" }, - { name: "tvStation", value: "Sample TV station" }, - { name: "programmer", value: "Sample programmer" }, - { name: "assetID", value: "/uri-reference" }, + { + name: "isUserLoggedIn", + value: "false", + }, + { + name: "tvStation", + value: "Sample TV station", + }, + { + name: "programmer", + value: "Sample programmer", + }, + { + name: "assetID", + value: "/uri-reference", + }, ], }, }, }); }); - it("when trackError is called", () => { const result = createGetInstance({ logger, @@ -131,21 +151,24 @@ describe("createGetInstance", () => { trackMediaEvent, uuid, }); - result.trackSessionStart({ sessionDetails: {} }); + result.trackSessionStart({ + sessionDetails: {}, + }); result.trackError("error"); - expect(trackMediaEvent).toHaveBeenCalledWith({ playerId: "1234-5678-9101-1121", xdm: { eventType: "media.error", mediaCollection: { - errorDetails: { name: "error", source: "player" }, + errorDetails: { + name: "error", + source: "player", + }, }, }, }); expect(logger.warn).toHaveBeenCalled(); }); - it("when trackComplete is called", () => { const result = createGetInstance({ logger, @@ -153,9 +176,10 @@ describe("createGetInstance", () => { trackMediaEvent, uuid, }); - result.trackSessionStart({ sessionDetails: {} }); + result.trackSessionStart({ + sessionDetails: {}, + }); result.trackComplete(); - expect(trackMediaEvent).toHaveBeenCalledWith({ playerId: "1234-5678-9101-1121", xdm: { @@ -171,9 +195,10 @@ describe("createGetInstance", () => { trackMediaEvent, uuid, }); - result.trackSessionStart({ sessionDetails: {} }); + result.trackSessionStart({ + sessionDetails: {}, + }); result.trackSessionEnd(); - expect(trackMediaEvent).toHaveBeenCalledWith({ playerId: "1234-5678-9101-1121", xdm: { @@ -192,15 +217,20 @@ describe("createGetInstance", () => { const state = { name: "muted", }; - result.trackSessionStart({ sessionDetails: {} }); + result.trackSessionStart({ + sessionDetails: {}, + }); result.trackEvent("stateStart", state); - expect(trackMediaEvent).toHaveBeenCalledWith({ playerId: "1234-5678-9101-1121", xdm: { eventType: "media.statesUpdate", mediaCollection: { - statesStart: [{ name: "muted" }], + statesStart: [ + { + name: "muted", + }, + ], }, }, }); @@ -215,15 +245,20 @@ describe("createGetInstance", () => { const state = { name: "muted", }; - result.trackSessionStart({ sessionDetails: {} }); + result.trackSessionStart({ + sessionDetails: {}, + }); result.trackEvent("stateEnd", state); - expect(trackMediaEvent).toHaveBeenCalledWith({ playerId: "1234-5678-9101-1121", xdm: { eventType: "media.statesUpdate", mediaCollection: { - statesEnd: [{ name: "muted" }], + statesEnd: [ + { + name: "muted", + }, + ], }, }, }); @@ -241,16 +276,22 @@ describe("createGetInstance", () => { podPosition: 2, length: 100, }; - const adContextData = { affiliate: "Sample affiliate 2", campaign: "Sample ad campaign 2", "a.media.ad.advertiser": "Sample Advertiser 2", "a.media.ad.campaign": "csmpaign2", }; - result.trackSessionStart({ sessionDetails: {} }); - result.trackEvent("adStart", { advertisingDetails }, adContextData); - + result.trackSessionStart({ + sessionDetails: {}, + }); + result.trackEvent( + "adStart", + { + advertisingDetails, + }, + adContextData, + ); expect(trackMediaEvent).toHaveBeenCalledWith({ playerId: "1234-5678-9101-1121", xdm: { @@ -265,8 +306,14 @@ describe("createGetInstance", () => { campaignID: "csmpaign2", }, customMetadata: [ - { name: "affiliate", value: "Sample affiliate 2" }, - { name: "campaign", value: "Sample ad campaign 2" }, + { + name: "affiliate", + value: "Sample affiliate 2", + }, + { + name: "campaign", + value: "Sample ad campaign 2", + }, ], }, }, diff --git a/test/unit/specs/components/MediaAnalyticsBridge/createMediaAnalyticsBridgeComponent.spec.js b/test/unit/specs/components/MediaAnalyticsBridge/createMediaAnalyticsBridgeComponent.spec.js index e60cbc281..7defbba0b 100644 --- a/test/unit/specs/components/MediaAnalyticsBridge/createMediaAnalyticsBridgeComponent.spec.js +++ b/test/unit/specs/components/MediaAnalyticsBridge/createMediaAnalyticsBridgeComponent.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createMediaAnalyticsBridgeComponent from "../../../../../src/components/MediaAnalyticsBridge/createMediaAnalyticsBridgeComponent.js"; describe("MediaAnalyticsBridge::createMediaAnalyticsBridgeComponent", () => { @@ -27,7 +28,6 @@ describe("MediaAnalyticsBridge::createMediaAnalyticsBridgeComponent", () => { let trackMediaSession; let createMediaHelper; let createGetInstance; - const build = (configs) => { mediaAnalyticsBridgeComponent = createMediaAnalyticsBridgeComponent({ config: configs, @@ -39,34 +39,30 @@ describe("MediaAnalyticsBridge::createMediaAnalyticsBridgeComponent", () => { createGetInstance, }); }; - beforeEach(() => { - logger = jasmine.createSpyObj("logger", ["info"]); - mediaResponseHandler = jasmine.createSpy(); - trackMediaEvent = jasmine.createSpy(); - trackMediaSession = jasmine.createSpy(); - createMediaHelper = jasmine.createSpy(); - createGetInstance = jasmine.createSpy(); + logger = { + info: vi.fn(), + }; + mediaResponseHandler = vi.fn(); + trackMediaEvent = vi.fn(); + trackMediaSession = vi.fn(); + createMediaHelper = vi.fn(); + createGetInstance = vi.fn(); build(config); }); - it("should reject promise when called with invalid config", async () => { build({}); const getMediaAnalyticsTracker = mediaAnalyticsBridgeComponent.commands.getMediaAnalyticsTracker; - - return expectAsync(getMediaAnalyticsTracker.run()).toBeRejected(); + return expect(getMediaAnalyticsTracker.run()).rejects.toThrowError(); }); - it("should call createGetInstance when getInstance Media API is called", async () => { build(config); - const { getMediaAnalyticsTracker } = mediaAnalyticsBridgeComponent.commands; const mediaApi = await getMediaAnalyticsTracker.run(); mediaApi.getInstance(); expect(createGetInstance).toHaveBeenCalled(); }); - it("should call onBeforeMediaEvent when onBeforeEvent is called with legacy flag", async () => { build(config); const getPlayerDetails = () => {}; @@ -77,16 +73,20 @@ describe("MediaAnalyticsBridge::createMediaAnalyticsBridgeComponent", () => { getPlayerDetails, }; const onResponseHandler = (onResponse) => { - onResponse({ response: {} }); + onResponse({ + response: {}, + }); }; - onBeforeEvent({ mediaOptions, onResponse: onResponseHandler }); + onBeforeEvent({ + mediaOptions, + onResponse: onResponseHandler, + }); expect(mediaResponseHandler).toHaveBeenCalledWith({ getPlayerDetails, playerId: "testPlayerId", response: {}, }); }); - it("should not call onBeforeMediaEvent when onBeforeEvent is called without legacy flag", async () => { build(config); const getPlayerDetails = () => {}; @@ -97,9 +97,14 @@ describe("MediaAnalyticsBridge::createMediaAnalyticsBridgeComponent", () => { getPlayerDetails, }; const onResponseHandler = (onResponse) => { - onResponse({ response: {} }); + onResponse({ + response: {}, + }); }; - onBeforeEvent({ mediaOptions, onResponse: onResponseHandler }); + onBeforeEvent({ + mediaOptions, + onResponse: onResponseHandler, + }); expect(mediaResponseHandler).not.toHaveBeenCalled(); }); }); diff --git a/test/unit/specs/components/MediaAnalyticsBridge/createMediaHelper.spec.js b/test/unit/specs/components/MediaAnalyticsBridge/createMediaHelper.spec.js index b0f2d151c..79ba7268a 100644 --- a/test/unit/specs/components/MediaAnalyticsBridge/createMediaHelper.spec.js +++ b/test/unit/specs/components/MediaAnalyticsBridge/createMediaHelper.spec.js @@ -9,19 +9,20 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createMediaHelper from "../../../../../src/components/MediaAnalyticsBridge/createMediaHelper.js"; describe("createMediaHelper", () => { let logger; let mediaHelper; - beforeEach(() => { logger = { - warn: jasmine.createSpy("warn"), + warn: vi.fn(), }; - mediaHelper = createMediaHelper({ logger }); + mediaHelper = createMediaHelper({ + logger, + }); }); - describe("createMediaObject", () => { it("should return a valid media object when called with valid arguments", () => { const friendlyName = "testFriendlyName"; @@ -29,7 +30,6 @@ describe("createMediaHelper", () => { const length = 120; const contentType = "video/mp4"; const streamType = "VOD"; - const expectedResult = { sessionDetails: { friendlyName, @@ -39,7 +39,6 @@ describe("createMediaHelper", () => { streamType, }, }; - const result = mediaHelper.createMediaObject( friendlyName, name, @@ -47,19 +46,15 @@ describe("createMediaHelper", () => { contentType, streamType, ); - expect(result).toEqual(expectedResult); }); - it("should log a warning and return an empty object when validation fails", () => { const friendlyName = ""; const name = ""; const length = "invalid"; const contentType = ""; const streamType = ""; - const expectedResult = {}; - const result = mediaHelper.createMediaObject( friendlyName, name, @@ -67,18 +62,15 @@ describe("createMediaHelper", () => { contentType, streamType, ); - expect(result).toEqual(expectedResult); expect(logger.warn).toHaveBeenCalled(); }); }); - describe("createAdBreakObject", () => { it("should return a valid ad break object when called with valid arguments", () => { const name = "testAdBreak"; const position = 1; const startTime = 120; - const expectedResult = { advertisingPodDetails: { friendlyName: name, @@ -86,33 +78,25 @@ describe("createMediaHelper", () => { index: startTime, }, }; - const result = mediaHelper.createAdBreakObject(name, position, startTime); - expect(result).toEqual(expectedResult); }); - it("should log a warning and return an empty object when validation fails", () => { const name = ""; const position = "invalid"; const startTime = "invalid"; - const expectedResult = {}; - const result = mediaHelper.createAdBreakObject(name, position, startTime); - expect(result).toEqual(expectedResult); expect(logger.warn).toHaveBeenCalled(); }); }); - describe("createAdObject", () => { it("should return a valid ad object when called with valid arguments", () => { const name = "testAd"; const id = "testId"; const position = 1; const length = 30; - const expectedResult = { advertisingDetails: { friendlyName: name, @@ -121,34 +105,26 @@ describe("createMediaHelper", () => { length, }, }; - const result = mediaHelper.createAdObject(name, id, position, length); - expect(result).toEqual(expectedResult); }); - it("should log a warning and return an empty object when validation fails", () => { const name = ""; const id = ""; const position = "invalid"; const length = "invalid"; - const expectedResult = {}; - const result = mediaHelper.createAdObject(name, id, position, length); - expect(result).toEqual(expectedResult); expect(logger.warn).toHaveBeenCalled(); }); }); - describe("createChapterObject", () => { it("should return a valid chapter object when called with valid arguments", () => { const name = "testChapter"; const position = 1; const length = 30; const startTime = 120; - const expectedResult = { chapterDetails: { friendlyName: name, @@ -157,101 +133,79 @@ describe("createMediaHelper", () => { index: startTime, }, }; - const result = mediaHelper.createChapterObject( name, position, length, startTime, ); - expect(result).toEqual(expectedResult); }); - it("should log a warning and return an empty object when validation fails", () => { const name = ""; const position = "invalid"; const length = "invalid"; const startTime = "invalid"; - const expectedResult = {}; - const result = mediaHelper.createChapterObject( name, position, length, startTime, ); - expect(result).toEqual(expectedResult); expect(logger.warn).toHaveBeenCalled(); }); }); - describe("createStateObject", () => { it("should return a valid state object when called with valid arguments", () => { const stateName = "testState"; - const expectedResult = { name: stateName, }; - const result = mediaHelper.createStateObject(stateName); - expect(result).toEqual(expectedResult); }); - it("should log a warning and return an empty object when validation fails", () => { const stateName = "invalid state name"; - const expectedResult = {}; - const result = mediaHelper.createStateObject(stateName); - expect(result).toEqual(expectedResult); expect(logger.warn).toHaveBeenCalled(); }); }); - describe("createQoEObject", () => { it("should return a valid QOE object when called with valid arguments", () => { const bitrate = 5000; const droppedFrames = 10; const framesPerSecond = 30; const timeToStart = 2; - const expectedResult = { bitrate, droppedFrames, framesPerSecond, timeToStart, }; - const result = mediaHelper.createQoEObject( bitrate, droppedFrames, framesPerSecond, timeToStart, ); - expect(result).toEqual(expectedResult); }); - it("should log a warning and return an empty object when validation fails", () => { const bitrate = "invalid"; const droppedFrames = "invalid"; const fps = "invalid"; const startupTime = "invalid"; - const expectedResult = {}; - const result = mediaHelper.createQoEObject( bitrate, droppedFrames, fps, startupTime, ); - expect(result).toEqual(expectedResult); expect(logger.warn).toHaveBeenCalled(); }); diff --git a/test/unit/specs/components/Personalization/createApplyPropositions.spec.js b/test/unit/specs/components/Personalization/createApplyPropositions.spec.js index 70e54dc7e..306754f79 100644 --- a/test/unit/specs/components/Personalization/createApplyPropositions.spec.js +++ b/test/unit/specs/components/Personalization/createApplyPropositions.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import { MIXED_PROPOSITIONS, PAGE_WIDE_SCOPE_DECISIONS, @@ -30,7 +31,6 @@ const METADATA = { actionType: "setHtml", }, }; - describe("Personalization::createApplyPropositions", () => { let processPropositions; let createProposition; @@ -38,28 +38,31 @@ describe("Personalization::createApplyPropositions", () => { let viewCache; let applyPropositions; let render; - beforeEach(() => { - processPropositions = jasmine.createSpy("processPropositions"); - processPropositions.and.callFake((propositions) => { + processPropositions = vi.fn(); + processPropositions.mockImplementation((propositions) => { const returnedPropositions = propositions.map((proposition) => ({ ...proposition.toJSON(), renderAttempted: true, })); - return { returnedPropositions, render }; + return { + returnedPropositions, + render, + }; }); - render = jasmine.createSpy("render"); - render.and.callFake(() => Promise.resolve("notifications")); + render = vi.fn(); + render.mockImplementation(() => Promise.resolve("notifications")); createProposition = injectCreateProposition({ preprocess: (data) => data, isPageWideSurface: () => false, }); - - renderedPropositions = jasmine.createSpyObj("renderedPropositions", [ - "concat", - ]); - viewCache = jasmine.createSpyObj("viewCache", ["getView"]); - viewCache.getView.and.returnValue(Promise.resolve([])); + renderedPropositions = { + concat: vi.fn(), + }; + viewCache = { + getView: vi.fn(), + }; + viewCache.getView.mockReturnValue(Promise.resolve([])); applyPropositions = createApplyPropositions({ processPropositions, createProposition, @@ -67,15 +70,15 @@ describe("Personalization::createApplyPropositions", () => { viewCache, }); }); - it("it should return an empty propositions promise if propositions is empty array", async () => { const result = await applyPropositions({ propositions: [], }); - expect(result).toEqual({ propositions: [] }); - expect(processPropositions).toHaveBeenCalledOnceWith([]); + expect(result).toEqual({ + propositions: [], + }); + expect(processPropositions).toHaveBeenNthCalledWith(1, []); }); - it("it should apply user-provided dom-action/default-content schema propositions", async () => { const expectedExecuteDecisionsPropositions = clone( PAGE_WIDE_SCOPE_DECISIONS, @@ -83,32 +86,27 @@ describe("Personalization::createApplyPropositions", () => { proposition.items = proposition.items.slice(0, 2); return proposition; }); - const result = await applyPropositions({ propositions: PAGE_WIDE_SCOPE_DECISIONS, }); - expect(processPropositions).toHaveBeenCalledTimes(1); - const expectedScopes = expectedExecuteDecisionsPropositions.map( (proposition) => proposition.scope, ); result.propositions.forEach((proposition) => { - expect(proposition.renderAttempted).toBeTrue(); + expect(proposition.renderAttempted).toBe(true); expect(expectedScopes).toContain(proposition.scope); expect(proposition.items).toEqual( - jasmine.arrayContaining([jasmine.any(Object)]), + expect.arrayContaining([expect.any(Object)]), ); expect(proposition.items.length).toEqual(3); }); }); - it("it should merge metadata with propositions that have html-content-item schema", async () => { const { propositions } = await applyPropositions({ propositions: MIXED_PROPOSITIONS, metadata: METADATA, }); - expect(propositions.length).toEqual(4); propositions.forEach((proposition) => { expect(proposition.items.length).toEqual(1); @@ -123,7 +121,6 @@ describe("Personalization::createApplyPropositions", () => { }); expect(processPropositions).toHaveBeenCalledTimes(1); }); - it("it should drop items with html-content-item schema when there is no metadata", async () => { const propositions = [ { @@ -151,37 +148,32 @@ describe("Personalization::createApplyPropositions", () => { ], }, ]; - const result = await applyPropositions({ propositions, }); - expect(result.propositions.length).toEqual(1); expect(result.propositions[0].items.length).toEqual(1); expect(result.propositions[0].items[0].id).toEqual("442358"); - expect(result.propositions[0].renderAttempted).toBeTrue(); + expect(result.propositions[0].renderAttempted).toBe(true); }); - it("it should return renderAttempted = true on resulting propositions", async () => { const result = await applyPropositions({ propositions: MIXED_PROPOSITIONS, }); expect(result.propositions.length).toEqual(3); result.propositions.forEach((proposition) => { - expect(proposition.renderAttempted).toBeTrue(); + expect(proposition.renderAttempted).toBe(true); }); }); - it("it should ignore propositions with __view__ scope that have already been rendered", async () => { const propositions = JSON.parse(JSON.stringify(MIXED_PROPOSITIONS)); propositions[4].renderAttempted = true; - const result = await applyPropositions({ propositions, }); expect(result.propositions.length).toEqual(2); result.propositions.forEach((proposition) => { - expect(proposition.renderAttempted).toBeTrue(); + expect(proposition.renderAttempted).toBe(true); if (proposition.scope === "__view__") { expect(proposition.items[0].id).not.toEqual("442358"); } else { @@ -189,10 +181,8 @@ describe("Personalization::createApplyPropositions", () => { } }); }); - it("it should ignore items with unsupported schemas", async () => { const expectedItemIds = ["442358", "442359"]; - const { propositions } = await applyPropositions({ propositions: MIXED_PROPOSITIONS, }); @@ -204,14 +194,12 @@ describe("Personalization::createApplyPropositions", () => { }); }); }); - it("it should not mutate original propositions", async () => { const originalPropositions = clone(MIXED_PROPOSITIONS); const result = await applyPropositions({ propositions: originalPropositions, metadata: METADATA, }); - let numReturnedPropositions = 0; expect(originalPropositions).toEqual(MIXED_PROPOSITIONS); result.propositions.forEach((proposition) => { @@ -225,11 +213,13 @@ describe("Personalization::createApplyPropositions", () => { }); expect(numReturnedPropositions).toEqual(4); }); - it("concats viewName propositions", async () => { - viewCache.getView.and.returnValue( + viewCache.getView.mockReturnValue( Promise.resolve([ - createProposition({ id: "myViewNameProp1", items: [{}] }), + createProposition({ + id: "myViewNameProp1", + items: [{}], + }), ]), ); const result = await applyPropositions({ @@ -245,16 +235,15 @@ describe("Personalization::createApplyPropositions", () => { ], }); }); - it("handles track actions for json-content-item", async () => { const testElementId = "superfluous123"; - const proposition = createMockProposition({ id: "abc", schema: JSON_CONTENT_ITEM, - data: { isGood: true }, + data: { + isGood: true, + }, }); - const expectedProposition = { id: "id", scope: "scope", @@ -273,7 +262,6 @@ describe("Personalization::createApplyPropositions", () => { }, ], }; - const result = await applyPropositions({ propositions: [proposition.toJSON()], metadata: { @@ -283,13 +271,16 @@ describe("Personalization::createApplyPropositions", () => { }, }, }); - expect(result).toEqual({ - propositions: [{ ...expectedProposition, renderAttempted: true }], + propositions: [ + { + ...expectedProposition, + renderAttempted: true, + }, + ], }); expect(processPropositions).toHaveBeenCalledTimes(1); - - expect(processPropositions.calls.first().args[0][0].toJSON()).toEqual( + expect(processPropositions.mock.calls[0][0][0].toJSON()).toEqual( expectedProposition, ); }); diff --git a/test/unit/specs/components/Personalization/createClickStorage.spec.js b/test/unit/specs/components/Personalization/createClickStorage.spec.js index 50017cbe0..7dcddcef4 100644 --- a/test/unit/specs/components/Personalization/createClickStorage.spec.js +++ b/test/unit/specs/components/Personalization/createClickStorage.spec.js @@ -9,11 +9,11 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import createClickStorage from "../../../../../src/components/Personalization/createClickStorage.js"; describe("Personalization::createClickStorage", () => { let clickStorage; - const FIRST_CLICK = { selector: "div:123:h2", meta: { @@ -85,36 +85,31 @@ describe("Personalization::createClickStorage", () => { beforeEach(() => { clickStorage = createClickStorage(); }); - it("returns empty array if empty storage", () => { expect(clickStorage.getClickSelectors()).toEqual([]); }); - it("returns empty object when no metadata for this selector", () => { expect(clickStorage.getClickMetas("123")).toEqual({}); }); - it("stores clicks as a map in the click storage and returns the selectors and metadata", () => { clickStorage.storeClickMeta(FIRST_CLICK); clickStorage.storeClickMeta(SECOND_CLICK); clickStorage.storeClickMeta(THIRD_CLICK); clickStorage.storeClickMeta(FORTH_CLICK); - expect(clickStorage.getClickSelectors().length).toEqual(2); expect(clickStorage.getClickMetas("div:123:h2").length).toEqual(2); }); - it("getClickMetas returns the id, scopeDetails, scope, trackingLabel, and scopeType", () => { clickStorage.storeClickMeta(FIRST_CLICK); - const meta = clickStorage.getClickMetas("div:123:h2"); - expect(clickStorage.getClickSelectors().length).toEqual(1); expect(meta.length).toEqual(1); expect(meta[0]).toEqual({ id: "AT:123", scope: "__view__", - scopeDetails: { test: "blah1" }, + scopeDetails: { + test: "blah1", + }, trackingLabel: "mylabel", scopeType: "myscopetype", }); diff --git a/test/unit/specs/components/Personalization/createComponent.spec.js b/test/unit/specs/components/Personalization/createComponent.spec.js index d8162ab4f..e1e4c25b8 100644 --- a/test/unit/specs/components/Personalization/createComponent.spec.js +++ b/test/unit/specs/components/Personalization/createComponent.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createComponent from "../../../../../src/components/Personalization/createComponent.js"; describe("Personalization", () => { @@ -27,7 +28,6 @@ describe("Personalization", () => { let mergeDecisionsMeta; let renderedPropositions; let cacheUpdate; - const build = () => { personalizationComponent = createComponent({ logger, @@ -43,40 +43,41 @@ describe("Personalization", () => { renderedPropositions, }); }; - beforeEach(() => { - event = jasmine.createSpyObj("event", ["mergeQuery", "getViewName"]); - event.getViewName.and.returnValue({}); + event = { + mergeQuery: vi.fn(), + getViewName: vi.fn(), + }; + event.getViewName.mockReturnValue({}); logger = { - info: jasmine.createSpy("logger.info"), - warn: jasmine.createSpy("logger.warn"), + info: vi.fn(), + warn: vi.fn(), + }; + isAuthoringModeEnabled = vi.fn().mockReturnValue(false); + fetchDataHandler = vi.fn(); + viewChangeHandler = vi.fn(); + onClickHandler = vi.fn(); + showContainers = vi.fn(); + mergeQuery = vi.fn(); + viewCache = { + isInitialized: vi.fn(), + createCacheUpdate: vi.fn(), + }; + cacheUpdate = { + update: vi.fn(), + cancel: vi.fn(), + }; + viewCache.createCacheUpdate.mockReturnValue(cacheUpdate); + setTargetMigration = vi.fn(); + mergeDecisionsMeta = vi.fn(); + renderedPropositions = { + clear: vi.fn(), }; - isAuthoringModeEnabled = jasmine - .createSpy("isAuthoringModeEnabled") - .and.returnValue(false); - fetchDataHandler = jasmine.createSpy("fetchDataHandler"); - viewChangeHandler = jasmine.createSpy("viewChangeHandler"); - onClickHandler = jasmine.createSpy("onClickHandler"); - showContainers = jasmine.createSpy("showContainers"); - mergeQuery = jasmine.createSpy("mergeQuery"); - viewCache = jasmine.createSpyObj("viewCache", [ - "isInitialized", - "createCacheUpdate", - ]); - cacheUpdate = jasmine.createSpyObj("cacheUpdate", ["update", "cancel"]); - viewCache.createCacheUpdate.and.returnValue(cacheUpdate); - setTargetMigration = jasmine.createSpy("setTargetMigration"); - mergeDecisionsMeta = jasmine.createSpy("mergeDecisionsMeta"); - renderedPropositions = jasmine.createSpyObj("renderedPropositions", [ - "clear", - ]); - build(); }); - describe("onBeforeEvent", () => { it("shouldn't do anything since authoringMode is enabled", () => { - isAuthoringModeEnabled.and.returnValue(true); + isAuthoringModeEnabled.mockReturnValue(true); const renderDecisions = true; const personalization = { decisionScopes: ["foo"], @@ -86,19 +87,19 @@ describe("Personalization", () => { renderDecisions, personalization, }); - expect(logger.warn).toHaveBeenCalledWith( "Rendering is disabled for authoring mode.", ); expect(isAuthoringModeEnabled).toHaveBeenCalled(); - expect(mergeQuery).toHaveBeenCalledWith(event, { enabled: false }); + expect(mergeQuery).toHaveBeenCalledWith(event, { + enabled: false, + }); expect(fetchDataHandler).not.toHaveBeenCalled(); expect(viewChangeHandler).not.toHaveBeenCalled(); expect(onClickHandler).not.toHaveBeenCalled(); expect(showContainers).not.toHaveBeenCalled(); expect(viewCache.createCacheUpdate).not.toHaveBeenCalled(); }); - it("should trigger pageLoad if there are decisionScopes", () => { const renderDecisions = false; const personalization = { @@ -109,7 +110,6 @@ describe("Personalization", () => { renderDecisions, personalization, }); - expect(isAuthoringModeEnabled).toHaveBeenCalled(); expect(fetchDataHandler).toHaveBeenCalled(); expect(viewChangeHandler).not.toHaveBeenCalled(); @@ -122,14 +122,12 @@ describe("Personalization", () => { const personalization = { decisionScopes: [], }; - viewCache.isInitialized.and.returnValue(false); - + viewCache.isInitialized.mockReturnValue(false); personalizationComponent.lifecycle.onBeforeEvent({ event, renderDecisions, personalization, }); - expect(isAuthoringModeEnabled).toHaveBeenCalled(); expect(fetchDataHandler).toHaveBeenCalled(); expect(viewChangeHandler).not.toHaveBeenCalled(); @@ -142,15 +140,13 @@ describe("Personalization", () => { const personalization = { decisionScopes: [], }; - viewCache.isInitialized.and.returnValue(true); - event.getViewName.and.returnValue("cart"); - + viewCache.isInitialized.mockReturnValue(true); + event.getViewName.mockReturnValue("cart"); personalizationComponent.lifecycle.onBeforeEvent({ event, renderDecisions, personalization, }); - expect(isAuthoringModeEnabled).toHaveBeenCalled(); expect(fetchDataHandler).not.toHaveBeenCalled(); expect(viewChangeHandler).toHaveBeenCalled(); @@ -159,34 +155,31 @@ describe("Personalization", () => { expect(viewCache.createCacheUpdate).not.toHaveBeenCalled(); }); it("should trigger onClickHandler at onClick", () => { - personalizationComponent.lifecycle.onClick({ event }); - + personalizationComponent.lifecycle.onClick({ + event, + }); expect(onClickHandler).toHaveBeenCalled(); }); it("should call showContainers() when a request fails", () => { - viewCache.isInitialized.and.returnValue(true); - const onRequestFailure = jasmine - .createSpy("onRequestFailure") - .and.callFake((func) => func()); - + viewCache.isInitialized.mockReturnValue(true); + const onRequestFailure = vi.fn().mockImplementation((func) => func()); personalizationComponent.lifecycle.onBeforeEvent({ event, onRequestFailure, }); - expect(onRequestFailure).toHaveBeenCalled(); expect(showContainers).toHaveBeenCalled(); }); }); - describe("onBeforeRequest", () => { it("should always call setTargetMigration during onBeforeRequest", () => { - const request = jasmine.createSpyObj("request", ["getPayload"]); + const request = { + getPayload: vi.fn(), + }; personalizationComponent.lifecycle.onBeforeRequest({ request, }); - - expect(setTargetMigration).toHaveBeenCalledOnceWith(request); + expect(setTargetMigration).toHaveBeenNthCalledWith(1, request); }); }); }); diff --git a/test/unit/specs/components/Personalization/createFetchDataHandler.spec.js b/test/unit/specs/components/Personalization/createFetchDataHandler.spec.js index 594be012c..bc3063040 100644 --- a/test/unit/specs/components/Personalization/createFetchDataHandler.spec.js +++ b/test/unit/specs/components/Personalization/createFetchDataHandler.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createFetchDataHandler from "../../../../../src/components/Personalization/createFetchDataHandler.js"; import injectCreateProposition from "../../../../../src/components/Personalization/handlers/injectCreateProposition.js"; import flushPromiseChains from "../../../helpers/flushPromiseChains.js"; @@ -32,45 +33,52 @@ describe("Personalization::createFetchDataHandler", () => { let personalizationDetails; let event; let onResponse; - let response; - beforeEach(() => { - logger = jasmine.createSpyObj("logger", ["logOnContentRendering"]); + logger = { + logOnContentRendering: vi.fn(), + }; prehidingStyle = "myprehidingstyle"; - showContainers = jasmine.createSpy("showContainers"); - hideContainers = jasmine.createSpy("hideContainers"); - mergeQuery = jasmine.createSpy("mergeQuery"); - collect = jasmine.createSpy("collect"); - processPropositions = jasmine.createSpy("processPropositions"); + showContainers = vi.fn(); + hideContainers = vi.fn(); + mergeQuery = vi.fn(); + collect = vi.fn(); + processPropositions = vi.fn(); createProposition = injectCreateProposition({ preprocess: (data) => data, isPageWideSurface: () => false, }); - renderedPropositions = jasmine.createSpyObj("renderedPropositions", [ - "concat", - ]); + renderedPropositions = { + concat: vi.fn(), + }; notificationHandler = createNotificationHandler( collect, renderedPropositions, ); - consent = jasmine.createSpyObj("consent", ["current"]); - consent.current.and.returnValue({ state: "in", wasSet: false }); - - cacheUpdate = jasmine.createSpyObj("cacheUpdate", ["update"]); - personalizationDetails = jasmine.createSpyObj("personalizationDetails", [ - "isRenderDecisions", - "createQueryDetails", - "getViewName", - "isSendDisplayEvent", - ]); - personalizationDetails.createQueryDetails.and.returnValue("myquerydetails"); - personalizationDetails.isSendDisplayEvent.and.returnValue(true); + consent = { + current: vi.fn(), + }; + consent.current.mockReturnValue({ + state: "in", + wasSet: false, + }); + cacheUpdate = { + update: vi.fn(), + }; + personalizationDetails = { + isRenderDecisions: vi.fn(), + createQueryDetails: vi.fn(), + getViewName: vi.fn(), + isSendDisplayEvent: vi.fn(), + }; + personalizationDetails.createQueryDetails.mockReturnValue("myquerydetails"); + personalizationDetails.isSendDisplayEvent.mockReturnValue(true); event = "myevent"; - onResponse = jasmine.createSpy(); - response = jasmine.createSpyObj("response", ["getPayloadsByType"]); + onResponse = vi.fn(); + response = { + getPayloadsByType: vi.fn(), + }; }); - const run = () => { const fetchDataHandler = createFetchDataHandler({ prehidingStyle, @@ -90,38 +98,38 @@ describe("Personalization::createFetchDataHandler", () => { onResponse, }); }; - const returnResponse = () => { expect(onResponse).toHaveBeenCalledTimes(1); - const callback = onResponse.calls.argsFor(0)[0]; - return callback({ response }); + const callback = onResponse.mock.calls[0][0]; + return callback({ + response, + }); }; - it("should hide containers if renderDecisions is true", () => { - personalizationDetails.isRenderDecisions.and.returnValue(true); + personalizationDetails.isRenderDecisions.mockReturnValue(true); run(); expect(hideContainers).toHaveBeenCalled(); }); - it("shouldn't hide containers if renderDecisions is false", () => { - personalizationDetails.isRenderDecisions.and.returnValue(false); + personalizationDetails.isRenderDecisions.mockReturnValue(false); run(); expect(hideContainers).not.toHaveBeenCalled(); }); - it("shouldn't hide containers if we have out consent cookie", () => { - consent.current.and.returnValue({ state: "out", wasSet: true }); - personalizationDetails.isRenderDecisions.and.returnValue(true); + consent.current.mockReturnValue({ + state: "out", + wasSet: true, + }); + personalizationDetails.isRenderDecisions.mockReturnValue(true); run(); expect(hideContainers).not.toHaveBeenCalled(); }); - it("should trigger responseHandler at onResponse", () => { - personalizationDetails.isRenderDecisions.and.returnValue(false); + personalizationDetails.isRenderDecisions.mockReturnValue(false); run(); - response.getPayloadsByType.and.returnValue([]); - cacheUpdate.update.and.returnValue([]); - processPropositions.and.returnValue({ + response.getPayloadsByType.mockReturnValue([]); + cacheUpdate.update.mockReturnValue([]); + processPropositions.mockReturnValue({ returnedPropositions: [], returnedDecisions: [], }); @@ -131,45 +139,70 @@ describe("Personalization::createFetchDataHandler", () => { decisions: [], }); }); - it("should render decisions", async () => { - personalizationDetails.isRenderDecisions.and.returnValue(true); - personalizationDetails.getViewName.and.returnValue("myviewname"); + personalizationDetails.isRenderDecisions.mockReturnValue(true); + personalizationDetails.getViewName.mockReturnValue("myviewname"); processPropositions = () => { return { - render: () => Promise.resolve([{ id: "handle1" }]), + render: () => + Promise.resolve([ + { + id: "handle1", + }, + ]), returnedPropositions: [ - { id: "handle1", items: ["item1"], renderAttempted: true }, + { + id: "handle1", + items: ["item1"], + renderAttempted: true, + }, ], returnedDecisions: [], }; }; run(); - response.getPayloadsByType.and.returnValue([ + response.getPayloadsByType.mockReturnValue([ { id: "handle1", - scopeDetails: { characteristics: { scopeType: "view" } }, + scopeDetails: { + characteristics: { + scopeType: "view", + }, + }, + }, + { + id: "handle2", }, - { id: "handle2" }, ]); - cacheUpdate.update.and.returnValue([createProposition({ id: "handle1" })]); + cacheUpdate.update.mockReturnValue([ + createProposition({ + id: "handle1", + }), + ]); const result = returnResponse(); expect(result).toEqual({ propositions: [ - { id: "handle1", items: ["item1"], renderAttempted: true }, + { + id: "handle1", + items: ["item1"], + renderAttempted: true, + }, ], decisions: [], }); await flushPromiseChains(); expect(showContainers).toHaveBeenCalled(); - expect(collect).toHaveBeenCalledOnceWith({ - decisionsMeta: [{ id: "handle1" }], + expect(collect).toHaveBeenNthCalledWith(1, { + decisionsMeta: [ + { + id: "handle1", + }, + ], viewName: "myviewname", }); }); - it("should show containers immediately", async () => { - personalizationDetails.isRenderDecisions.and.returnValue(true); + personalizationDetails.isRenderDecisions.mockReturnValue(true); const renderDeferred = defer(); processPropositions = () => { return { @@ -186,22 +219,30 @@ describe("Personalization::createFetchDataHandler", () => { }; }; run(); - response.getPayloadsByType.and.returnValue([ + response.getPayloadsByType.mockReturnValue([ { id: "handle2", scope: "__view__", items: ["item1"], }, ]); - cacheUpdate.update.and.returnValue([]); + cacheUpdate.update.mockReturnValue([]); expect(showContainers).not.toHaveBeenCalled(); returnResponse(); expect(showContainers).toHaveBeenCalled(); expect(collect).not.toHaveBeenCalled(); - renderDeferred.resolve([{ id: "handle2" }]); + renderDeferred.resolve([ + { + id: "handle2", + }, + ]); await flushPromiseChains(); - expect(collect).toHaveBeenCalledOnceWith({ - decisionsMeta: [{ id: "handle2" }], + expect(collect).toHaveBeenNthCalledWith(1, { + decisionsMeta: [ + { + id: "handle2", + }, + ], viewName: undefined, }); }); diff --git a/test/unit/specs/components/Personalization/createGetPageLocation.spec.js b/test/unit/specs/components/Personalization/createGetPageLocation.spec.js index a740f81f6..648e58279 100644 --- a/test/unit/specs/components/Personalization/createGetPageLocation.spec.js +++ b/test/unit/specs/components/Personalization/createGetPageLocation.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import createGetPageLocation from "../../../../../src/components/Personalization/createGetPageLocation.js"; describe("Personalization::createGetPageLocation", () => { @@ -21,9 +22,10 @@ describe("Personalization::createGetPageLocation", () => { pathname: "/test/page/1/", }, }; - const getPageLocation = createGetPageLocation({ window: win }); + const getPageLocation = createGetPageLocation({ + window: win, + }); const location = getPageLocation(); - expect(location).toEqual(win.location); }); }); diff --git a/test/unit/specs/components/Personalization/createHandleConsentFlicker.spec.js b/test/unit/specs/components/Personalization/createHandleConsentFlicker.spec.js index 2b9a342e3..6be72607f 100644 --- a/test/unit/specs/components/Personalization/createHandleConsentFlicker.spec.js +++ b/test/unit/specs/components/Personalization/createHandleConsentFlicker.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createHandleConsentFlicker from "../../../../../src/components/Personalization/createHandleConsentFlicker.js"; import flushPromiseChains from "../../../helpers/flushPromiseChains.js"; @@ -16,38 +17,46 @@ describe("Personalization::createHandleConsentFlicker", () => { let showContainers; let consent; let handleConsentFlicker; - beforeEach(() => { - showContainers = jasmine.createSpy("showContainers"); - consent = jasmine.createSpyObj("consent", ["current", "awaitConsent"]); + showContainers = vi.fn(); + consent = { + current: vi.fn(), + awaitConsent: vi.fn(), + }; handleConsentFlicker = createHandleConsentFlicker({ showContainers, consent, }); }); - it("shows containers when consent is out and was set", () => { - consent.current.and.returnValue({ state: "out", wasSet: true }); + consent.current.mockReturnValue({ + state: "out", + wasSet: true, + }); handleConsentFlicker(); expect(showContainers).toHaveBeenCalled(); return flushPromiseChains().then(() => { expect(consent.awaitConsent).not.toHaveBeenCalled(); }); }); - it("shows containers after consent is rejected", () => { - consent.current.and.returnValue({ state: "out", wasSet: false }); - consent.awaitConsent.and.returnValue(Promise.reject()); + consent.current.mockReturnValue({ + state: "out", + wasSet: false, + }); + consent.awaitConsent.mockReturnValue(Promise.reject()); handleConsentFlicker(); expect(consent.awaitConsent).toHaveBeenCalled(); return flushPromiseChains().then(() => { expect(showContainers).toHaveBeenCalled(); }); }); - it("does not show containers after consent is given", () => { - consent.current.and.returnValue({ state: "out", wasSet: false }); - consent.awaitConsent.and.returnValue(Promise.resolve()); + consent.current.mockReturnValue({ + state: "out", + wasSet: false, + }); + consent.awaitConsent.mockReturnValue(Promise.resolve()); handleConsentFlicker(); expect(consent.awaitConsent).toHaveBeenCalled(); return flushPromiseChains().then(() => { diff --git a/test/unit/specs/components/Personalization/createInteractionStorage.spec.js b/test/unit/specs/components/Personalization/createInteractionStorage.spec.js index 89dab8931..3105eced6 100644 --- a/test/unit/specs/components/Personalization/createInteractionStorage.spec.js +++ b/test/unit/specs/components/Personalization/createInteractionStorage.spec.js @@ -9,25 +9,21 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import createInteractionStorage from "../../../../../src/components/Personalization/createInteractionStorage.js"; describe("Personalization::createInteractionStorage", () => { let storeInteractionMeta; let getInteractionMetas; - let PROPOSITIONS = []; - let interactIDs = {}; - beforeEach(() => { ({ storeInteractionMeta, getInteractionMetas } = createInteractionStorage()); - interactIDs = { "div:123:h2": [1], "div:123:h1": [2], }; - PROPOSITIONS = [ { id: "AT:123", @@ -114,11 +110,9 @@ describe("Personalization::createInteractionStorage", () => { }, ]; }); - it("returns empty array when no metadata for this selector", () => { expect(getInteractionMetas([1])).toEqual([]); }); - it("stores clicks as a map in the click storage and returns the metadata", () => { PROPOSITIONS.forEach((proposition) => { const { id, scope, scopeDetails } = proposition; @@ -127,19 +121,20 @@ describe("Personalization::createInteractionStorage", () => { proposition.id, item.id, proposition.scopeDetails.characteristics.scopeType, - { id, scope, scopeDetails }, + { + id, + scope, + scopeDetails, + }, interactIDs[item.data.selector], ), ); }); - expect(getInteractionMetas(interactIDs["div:123:h2"]).length).toEqual(2); expect(getInteractionMetas(interactIDs["div:123:h1"]).length).toEqual(1); }); - it("getInteractionMetas returns the id, scopeDetails, scope, trackingLabel, and scopeType", () => { const proposition = PROPOSITIONS[0]; - proposition.items.forEach((item) => storeInteractionMeta( proposition.id, @@ -153,11 +148,8 @@ describe("Personalization::createInteractionStorage", () => { interactIDs[item.data.selector], ), ); - const meta = getInteractionMetas(interactIDs["div:123:h2"]); - expect(meta.length).toEqual(1); - expect(meta[0]).toEqual({ id: "AT:123", scope: "__view__", diff --git a/test/unit/specs/components/Personalization/createNotificationHandler.spec.js b/test/unit/specs/components/Personalization/createNotificationHandler.spec.js index 356ca02f1..106eb6e05 100644 --- a/test/unit/specs/components/Personalization/createNotificationHandler.spec.js +++ b/test/unit/specs/components/Personalization/createNotificationHandler.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createNotificationHandler from "../../../../../src/components/Personalization/createNotificationHandler.js"; describe("Personalization::createNotificationHandler", () => { @@ -26,37 +27,30 @@ describe("Personalization::createNotificationHandler", () => { }, }, ]; - beforeEach(() => { - collect = jasmine.createSpy("collect").and.returnValue(Promise.resolve()); - - renderedPropositions = jasmine.createSpyObj("renderedPropositions", [ - "concat", - ]); - + collect = vi.fn().mockReturnValue(Promise.resolve()); + renderedPropositions = { + concat: vi.fn(), + }; notificationHandler = createNotificationHandler( collect, renderedPropositions, ); }); - it("emits a notification immediately", () => { const handleNotifications = notificationHandler(true, true, "foo"); handleNotifications(NOTIFICATIONS); - expect(collect).toHaveBeenCalledOnceWith({ + expect(collect).toHaveBeenNthCalledWith(1, { decisionsMeta: NOTIFICATIONS, viewName: "foo", }); }); - it("defers the notification", () => { const handleNotifications = notificationHandler(true, false, undefined); handleNotifications(NOTIFICATIONS); - expect(collect).not.toHaveBeenCalled(); expect(renderedPropositions.concat).toHaveBeenCalledTimes(1); }); - it("doesn't do anything if renderDecisions is false", () => { notificationHandler(false, true, undefined); expect(renderedPropositions.concat).not.toHaveBeenCalled(); diff --git a/test/unit/specs/components/Personalization/createOnClickHandler.spec.js b/test/unit/specs/components/Personalization/createOnClickHandler.spec.js index f9709015a..a980ea79a 100644 --- a/test/unit/specs/components/Personalization/createOnClickHandler.spec.js +++ b/test/unit/specs/components/Personalization/createOnClickHandler.spec.js @@ -9,11 +9,11 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createOnClickHandler from "../../../../../src/components/Personalization/createOnClickHandler.js"; import { mergeDecisionsMeta } from "../../../../../src/utils/event.js"; import createEvent from "../../../../../src/core/createEvent.js"; import { createNode } from "../../../../../src/utils/dom/index.js"; - import { ALWAYS, NEVER, @@ -26,12 +26,9 @@ import { describe("Personalization::createOnClickHandler", () => { let collectInteractions; let collectClicks; - let getInteractionMetas; let getClickMetas; - let getClickSelectors; - let event; const decisionsMeta = [ { @@ -45,36 +42,30 @@ describe("Personalization::createOnClickHandler", () => { scope: "bar", }, ]; - let autoCollectPropositionInteractions; - beforeEach(() => { - collectInteractions = jasmine.createSpy("collectInteractions"); - collectClicks = jasmine.createSpy("collectClicks"); - - getInteractionMetas = jasmine.createSpy("getInteractionMetas"); - getClickMetas = jasmine.createSpy("getInteractionMetas"); - - getClickSelectors = jasmine.createSpy("getClickSelectors"); - + collectInteractions = vi.fn(); + collectClicks = vi.fn(); + getInteractionMetas = vi.fn(); + getClickMetas = vi.fn(); + getClickSelectors = vi.fn(); event = createEvent(); - spyOn(event, "mergeXdm").and.callThrough(); - + vi.spyOn(event, "mergeXdm"); autoCollectPropositionInteractions = { [ADOBE_JOURNEY_OPTIMIZER]: ALWAYS, [ADOBE_TARGET]: NEVER, }; }); - it("collects clicks", () => { const selectors = ["foo", "foo2"]; - collectInteractions.and.returnValue({ decisionsMeta: [] }); - collectClicks.and.returnValue({ + collectInteractions.mockReturnValue({ + decisionsMeta: [], + }); + collectClicks.mockReturnValue({ decisionsMeta, eventLabel: "", }); - - getClickSelectors.and.returnValue(selectors); + getClickSelectors.mockReturnValue(selectors); const handleOnClick = createOnClickHandler({ mergeDecisionsMeta, collectInteractions, @@ -84,11 +75,11 @@ describe("Personalization::createOnClickHandler", () => { getClickSelectors, autoCollectPropositionInteractions, }); - const clickedElement = "foo"; - - handleOnClick({ event, clickedElement }); - + handleOnClick({ + event, + clickedElement, + }); const expectedXdm = { eventType: "decisioning.propositionInteract", _experience: { @@ -105,7 +96,6 @@ describe("Personalization::createOnClickHandler", () => { }, }, }; - expect(event.mergeXdm).toHaveBeenCalledWith(expectedXdm); expect(collectClicks).toHaveBeenCalledWith( clickedElement, @@ -117,14 +107,14 @@ describe("Personalization::createOnClickHandler", () => { xdm: expectedXdm, }); }); - it("collects interactions", () => { - collectClicks.and.returnValue({ decisionsMeta: [] }); - collectInteractions.and.returnValue({ + collectClicks.mockReturnValue({ + decisionsMeta: [], + }); + collectInteractions.mockReturnValue({ decisionsMeta, propositionActionLabel: "", }); - const handleOnClick = createOnClickHandler({ mergeDecisionsMeta, collectInteractions, @@ -134,10 +124,13 @@ describe("Personalization::createOnClickHandler", () => { getClickSelectors, autoCollectPropositionInteractions, }); - const clickedElement = createNode("div", { class: "clicked-element" }); - - handleOnClick({ event, clickedElement }); - + const clickedElement = createNode("div", { + class: "clicked-element", + }); + handleOnClick({ + event, + clickedElement, + }); const expectedXdm = { eventType: "decisioning.propositionInteract", _experience: { @@ -154,7 +147,6 @@ describe("Personalization::createOnClickHandler", () => { }, }, }; - expect(event.mergeXdm).toHaveBeenCalledWith(expectedXdm); expect(collectInteractions).toHaveBeenCalledWith( clickedElement, @@ -166,15 +158,16 @@ describe("Personalization::createOnClickHandler", () => { xdm: expectedXdm, }); }); - it("collects clicks with label", () => { const selectors = ["foo", "foo2"]; - collectInteractions.and.returnValue({ decisionsMeta: [] }); - collectClicks.and.returnValue({ + collectInteractions.mockReturnValue({ + decisionsMeta: [], + }); + collectClicks.mockReturnValue({ decisionsMeta, propositionActionLabel: "click-label", }); - getClickSelectors.and.returnValue(selectors); + getClickSelectors.mockReturnValue(selectors); const handleOnClick = createOnClickHandler({ mergeDecisionsMeta, collectInteractions, @@ -185,9 +178,10 @@ describe("Personalization::createOnClickHandler", () => { autoCollectPropositionInteractions, }); const clickedElement = "foo"; - - handleOnClick({ event, clickedElement }); - + handleOnClick({ + event, + clickedElement, + }); const expectedXdm = { eventType: "decisioning.propositionInteract", _experience: { @@ -207,7 +201,6 @@ describe("Personalization::createOnClickHandler", () => { }, }, }; - expect(event.mergeXdm).toHaveBeenCalledWith(expectedXdm); expect(collectClicks).toHaveBeenCalledWith( clickedElement, @@ -219,14 +212,14 @@ describe("Personalization::createOnClickHandler", () => { xdm: expectedXdm, }); }); - it("collects interactions with label", () => { - collectClicks.and.returnValue({ decisionsMeta: [] }); - collectInteractions.and.returnValue({ + collectClicks.mockReturnValue({ + decisionsMeta: [], + }); + collectInteractions.mockReturnValue({ decisionsMeta, propositionActionLabel: "click-label", }); - const handleOnClick = createOnClickHandler({ mergeDecisionsMeta, collectInteractions, @@ -236,10 +229,13 @@ describe("Personalization::createOnClickHandler", () => { getClickSelectors, autoCollectPropositionInteractions, }); - const clickedElement = createNode("div", { class: "clicked-element" }); - - handleOnClick({ event, clickedElement }); - + const clickedElement = createNode("div", { + class: "clicked-element", + }); + handleOnClick({ + event, + clickedElement, + }); const expectedXdm = { eventType: "decisioning.propositionInteract", _experience: { @@ -259,7 +255,6 @@ describe("Personalization::createOnClickHandler", () => { }, }, }; - expect(event.mergeXdm).toHaveBeenCalledWith(expectedXdm); expect(collectInteractions).toHaveBeenCalledWith( clickedElement, @@ -275,12 +270,13 @@ describe("Personalization::createOnClickHandler", () => { // TODO collect clicks with token ?? it("collects interactions with token", () => { - collectClicks.and.returnValue({ decisionsMeta: [] }); - collectInteractions.and.returnValue({ + collectClicks.mockReturnValue({ + decisionsMeta: [], + }); + collectInteractions.mockReturnValue({ decisionsMeta, propositionActionToken: "click-token", }); - const handleOnClick = createOnClickHandler({ mergeDecisionsMeta, collectInteractions, @@ -290,10 +286,13 @@ describe("Personalization::createOnClickHandler", () => { getClickSelectors, autoCollectPropositionInteractions, }); - const clickedElement = createNode("div", { class: "clicked-element" }); - - handleOnClick({ event, clickedElement }); - + const clickedElement = createNode("div", { + class: "clicked-element", + }); + handleOnClick({ + event, + clickedElement, + }); const expectedXdm = { eventType: "decisioning.propositionInteract", _experience: { @@ -313,7 +312,6 @@ describe("Personalization::createOnClickHandler", () => { }, }, }; - expect(event.mergeXdm).toHaveBeenCalledWith(expectedXdm); expect(collectInteractions).toHaveBeenCalledWith( clickedElement, @@ -325,11 +323,13 @@ describe("Personalization::createOnClickHandler", () => { xdm: expectedXdm, }); }); - it("shouldn't be called when clickStorage and interactionStorage are empty", () => { - collectInteractions.and.returnValue({ decisionsMeta: [] }); - collectClicks.and.returnValue({ decisionsMeta: [] }); - + collectInteractions.mockReturnValue({ + decisionsMeta: [], + }); + collectClicks.mockReturnValue({ + decisionsMeta: [], + }); const handleOnClick = createOnClickHandler({ mergeDecisionsMeta, collectInteractions, @@ -339,16 +339,20 @@ describe("Personalization::createOnClickHandler", () => { getClickSelectors, autoCollectPropositionInteractions, }); - const clickedElement = createNode("div", { class: "clicked-element" }); - - handleOnClick({ event, clickedElement }); - + const clickedElement = createNode("div", { + class: "clicked-element", + }); + handleOnClick({ + event, + clickedElement, + }); expect(event.mergeXdm).not.toHaveBeenCalled(); }); - it("for interactions, adds a viewName to the response", () => { - collectClicks.and.returnValue({ decisionsMeta: [] }); - collectInteractions.and.returnValue({ + collectClicks.mockReturnValue({ + decisionsMeta: [], + }); + collectInteractions.mockReturnValue({ decisionsMeta, viewName: "myview", }); @@ -361,10 +365,13 @@ describe("Personalization::createOnClickHandler", () => { getClickSelectors, autoCollectPropositionInteractions, }); - const clickedElement = createNode("div", { class: "clicked-element" }); - - handleOnClick({ event, clickedElement }); - + const clickedElement = createNode("div", { + class: "clicked-element", + }); + handleOnClick({ + event, + clickedElement, + }); const expectedXdm = { eventType: "decisioning.propositionInteract", web: { @@ -386,7 +393,6 @@ describe("Personalization::createOnClickHandler", () => { }, }, }; - expect(event.mergeXdm).toHaveBeenCalledWith(expectedXdm); expect(collectInteractions).toHaveBeenCalledWith( clickedElement, @@ -398,15 +404,16 @@ describe("Personalization::createOnClickHandler", () => { xdm: expectedXdm, }); }); - it("for clicks, adds a viewName to the response", () => { const selectors = ["foo", "foo2"]; - collectInteractions.and.returnValue({ decisionsMeta: [] }); - collectClicks.and.returnValue({ + collectInteractions.mockReturnValue({ + decisionsMeta: [], + }); + collectClicks.mockReturnValue({ decisionsMeta, viewName: "myview", }); - getClickSelectors.and.returnValue(selectors); + getClickSelectors.mockReturnValue(selectors); const handleOnClick = createOnClickHandler({ mergeDecisionsMeta, collectInteractions, @@ -417,9 +424,10 @@ describe("Personalization::createOnClickHandler", () => { autoCollectPropositionInteractions, }); const clickedElement = "foo"; - - handleOnClick({ event, clickedElement }); - + handleOnClick({ + event, + clickedElement, + }); const expectedXdm = { eventType: "decisioning.propositionInteract", web: { @@ -441,7 +449,6 @@ describe("Personalization::createOnClickHandler", () => { }, }, }; - expect(event.mergeXdm).toHaveBeenCalledWith(expectedXdm); expect(collectClicks).toHaveBeenCalledWith( clickedElement, @@ -453,16 +460,13 @@ describe("Personalization::createOnClickHandler", () => { xdm: expectedXdm, }); }); - it("gets metas for both click and interact", () => { - collectInteractions.and.returnValue({ + collectInteractions.mockReturnValue({ decisionsMeta, }); - - collectClicks.and.returnValue({ + collectClicks.mockReturnValue({ decisionsMeta: decisionsMeta2, }); - const handleOnClick = createOnClickHandler({ mergeDecisionsMeta, collectInteractions, @@ -472,13 +476,15 @@ describe("Personalization::createOnClickHandler", () => { getClickSelectors, autoCollectPropositionInteractions, }); - const clickedElement = createNode("div", { class: "clicked-element" }); - - handleOnClick({ event, clickedElement }); - + const clickedElement = createNode("div", { + class: "clicked-element", + }); + handleOnClick({ + event, + clickedElement, + }); expect(collectInteractions).toHaveBeenCalled(); expect(collectClicks).toHaveBeenCalled(); - const expectedXdm = { eventType: "decisioning.propositionInteract", _experience: { @@ -499,7 +505,6 @@ describe("Personalization::createOnClickHandler", () => { }, }, }; - expect(event.mergeXdm).toHaveBeenCalledWith(expectedXdm); expect(collectInteractions).toHaveBeenCalledWith( clickedElement, diff --git a/test/unit/specs/components/Personalization/createOnDecisionHandler.spec.js b/test/unit/specs/components/Personalization/createOnDecisionHandler.spec.js index ca4d37308..808a8ca0d 100644 --- a/test/unit/specs/components/Personalization/createOnDecisionHandler.spec.js +++ b/test/unit/specs/components/Personalization/createOnDecisionHandler.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createOnDecisionHandler from "../../../../../src/components/Personalization/createOnDecisionHandler.js"; import { MESSAGE_CONTENT_CARD } from "../../../../../src/constants/schema.js"; import injectCreateProposition from "../../../../../src/components/Personalization/handlers/injectCreateProposition.js"; @@ -79,7 +80,6 @@ describe("Personalization::createOnDecisionHandler", () => { data: { expiryDate: 1712190456, publishedDate: 1677839040000, - meta: { surface: "web://mywebsite.com/my-cards", }, @@ -182,81 +182,79 @@ describe("Personalization::createOnDecisionHandler", () => { let onDecisionHandler; let renderedPropositions; let notificationHandler; - beforeEach(() => { - render = jasmine - .createSpy("render") - .and.returnValue( - Promise.resolve([ - { id: "1a3d874f-39ee-4310-bfa9-6559a10041a4", hi: true }, - ]), - ); - collect = jasmine.createSpy("collect").and.returnValue(Promise.resolve()); - processPropositions = jasmine - .createSpy("processPropositions") - .and.returnValue({ render, returnedPropositions: PROPOSITIONS }); - + render = vi.fn().mockReturnValue( + Promise.resolve([ + { + id: "1a3d874f-39ee-4310-bfa9-6559a10041a4", + hi: true, + }, + ]), + ); + collect = vi.fn().mockReturnValue(Promise.resolve()); + processPropositions = vi.fn().mockReturnValue({ + render, + returnedPropositions: PROPOSITIONS, + }); createProposition = injectCreateProposition({ preprocess: (data) => data, isPageWideSurface: () => false, }); - - renderedPropositions = jasmine.createSpyObj("renderedPropositions", [ - "concat", - ]); - + renderedPropositions = { + concat: vi.fn(), + }; notificationHandler = createNotificationHandler( collect, renderedPropositions, ); - onDecisionHandler = createOnDecisionHandler({ processPropositions, createProposition, notificationHandler, }); }); - it("does not call render if renderDecisions=false", () => { onDecisionHandler({ viewName: "blippi", renderDecisions: false, propositions: PROPOSITIONS, }); - expect(render).not.toHaveBeenCalled(); }); - it("calls render if renderDecisions=true", async () => { - const mockEvent = { getViewName: () => "blippi" }; + const mockEvent = { + getViewName: () => "blippi", + }; const { propositions } = await onDecisionHandler({ event: mockEvent, personalization: {}, renderDecisions: true, propositions: PROPOSITIONS, }); - expect(propositions).toEqual(PROPOSITIONS); - expect(render).toHaveBeenCalledTimes(1); - - expect(collect).toHaveBeenCalledOnceWith({ - decisionsMeta: [{ id: "1a3d874f-39ee-4310-bfa9-6559a10041a4", hi: true }], + expect(collect).toHaveBeenNthCalledWith(1, { + decisionsMeta: [ + { + id: "1a3d874f-39ee-4310-bfa9-6559a10041a4", + hi: true, + }, + ], viewName: "blippi", }); expect(renderedPropositions.concat).not.toHaveBeenCalled(); }); - it("defers sending display notification when sendDisplayEvent=false", async () => { await onDecisionHandler({ renderDecisions: true, propositions: PROPOSITIONS, - event: { getViewName: () => "blippi" }, + event: { + getViewName: () => "blippi", + }, personalization: { sendDisplayEvent: false, }, }); - expect(collect).not.toHaveBeenCalled(); expect(renderedPropositions.concat).toHaveBeenCalledTimes(1); }); diff --git a/test/unit/specs/components/Personalization/createPersonalizationDetails.spec.js b/test/unit/specs/components/Personalization/createPersonalizationDetails.spec.js index 0be23a184..21bbad23c 100644 --- a/test/unit/specs/components/Personalization/createPersonalizationDetails.spec.js +++ b/test/unit/specs/components/Personalization/createPersonalizationDetails.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import PAGE_WIDE_SCOPE from "../../../../../src/constants/pageWideScope.js"; import createPersonalizationDetails from "../../../../../src/components/Personalization/createPersonalizationDetails.js"; import createGetPageLocation from "../../../../../src/components/Personalization/createGetPageLocation.js"; @@ -31,14 +32,20 @@ describe("Personalization::createPersonalizationDetails", () => { pathname: "/test/page/1/", }, }; - const getPageLocation = createGetPageLocation({ window }); - + const getPageLocation = createGetPageLocation({ + window, + }); let event; let logger; - beforeEach(() => { - event = jasmine.createSpyObj("event", ["getViewName"]); - logger = jasmine.createSpyObj("logger", ["info", "warn", "error"]); + event = { + getViewName: vi.fn(), + }; + logger = { + info: vi.fn(), + warn: vi.fn(), + error: vi.fn(), + }; }); // s - has scopes or surfaces @@ -46,26 +53,76 @@ describe("Personalization::createPersonalizationDetails", () => { // dp - defaultPersonalizationEnabled flag // fetch - should fetch data [ - { s: false, i: false, dp: false, fetch: false }, - { s: true, i: false, dp: false, fetch: true }, - { s: false, i: true, dp: false, fetch: false }, - { s: true, i: true, dp: false, fetch: true }, - - { s: false, i: false, dp: true, fetch: true }, - { s: true, i: false, dp: true, fetch: true }, - { s: false, i: true, dp: true, fetch: true }, - { s: true, i: true, dp: true, fetch: true }, - - { s: false, i: false, fetch: true }, - { s: true, i: false, fetch: true }, - { s: false, i: true, fetch: false }, - { s: true, i: true, fetch: true }, + { + s: false, + i: false, + dp: false, + fetch: false, + }, + { + s: true, + i: false, + dp: false, + fetch: true, + }, + { + s: false, + i: true, + dp: false, + fetch: false, + }, + { + s: true, + i: true, + dp: false, + fetch: true, + }, + { + s: false, + i: false, + dp: true, + fetch: true, + }, + { + s: true, + i: false, + dp: true, + fetch: true, + }, + { + s: false, + i: true, + dp: true, + fetch: true, + }, + { + s: true, + i: true, + dp: true, + fetch: true, + }, + { + s: false, + i: false, + fetch: true, + }, + { + s: true, + i: false, + fetch: true, + }, + { + s: false, + i: true, + fetch: false, + }, + { + s: true, + i: true, + fetch: true, + }, ].forEach(({ s, i, dp, fetch }) => { - it(`should ${fetch ? "" : "not "}fetch data when ${ - s ? "" : "no " - }scopes, the cache is ${ - i ? "" : "not " - }initialized, and initializePersonalization is '${dp}'`, () => { + it(`should ${fetch ? "" : "not "}fetch data when ${s ? "" : "no "}scopes, the cache is ${i ? "" : "not "}initialized, and initializePersonalization is '${dp}'`, () => { const personalizationDetails = createPersonalizationDetails({ getPageLocation, renderDecisions: true, @@ -81,12 +138,11 @@ describe("Personalization::createPersonalizationDetails", () => { expect(personalizationDetails.shouldFetchData()).toEqual(fetch); }); }); - it("should fetch data when no cache, renderDecisions is true, no viewName and decisionScopes/surfaces (in non SPA world)", () => { const decisionScopes = []; const personalization = {}; const renderDecisions = true; - event.getViewName.and.returnValue(undefined); + event.getViewName.mockReturnValue(undefined); const personalizationDetails = createPersonalizationDetails({ getPageLocation, renderDecisions, @@ -112,7 +168,6 @@ describe("Personalization::createPersonalizationDetails", () => { surfaces: [TEST_SURFACE], }; const queryDetails = personalizationDetails.createQueryDetails(); - expect(personalizationDetails.isRenderDecisions()).toEqual(true); expect(personalizationDetails.hasScopes()).toEqual(false); expect(personalizationDetails.hasSurfaces()).toEqual(false); @@ -126,7 +181,7 @@ describe("Personalization::createPersonalizationDetails", () => { const decisionScopes = []; const personalization = {}; const renderDecisions = false; - event.getViewName.and.returnValue(undefined); + event.getViewName.mockReturnValue(undefined); const personalizationDetails = createPersonalizationDetails({ getPageLocation, renderDecisions, @@ -152,7 +207,6 @@ describe("Personalization::createPersonalizationDetails", () => { surfaces: [TEST_SURFACE], }; const queryDetails = personalizationDetails.createQueryDetails(); - expect(personalizationDetails.isRenderDecisions()).toEqual(false); expect(personalizationDetails.hasScopes()).toEqual(false); expect(personalizationDetails.hasSurfaces()).toEqual(false); @@ -166,7 +220,7 @@ describe("Personalization::createPersonalizationDetails", () => { const decisionScopes = ["test1"]; const personalization = {}; const renderDecisions = false; - event.getViewName.and.returnValue(undefined); + event.getViewName.mockReturnValue(undefined); const personalizationDetails = createPersonalizationDetails({ getPageLocation, renderDecisions, @@ -192,7 +246,6 @@ describe("Personalization::createPersonalizationDetails", () => { surfaces: [TEST_SURFACE], }; const queryDetails = personalizationDetails.createQueryDetails(); - expect(personalizationDetails.isRenderDecisions()).toEqual(false); expect(personalizationDetails.hasScopes()).toEqual(true); expect(personalizationDetails.hasSurfaces()).toEqual(false); @@ -206,7 +259,7 @@ describe("Personalization::createPersonalizationDetails", () => { const decisionScopes = ["test1"]; const personalization = {}; const renderDecisions = false; - event.getViewName.and.returnValue(undefined); + event.getViewName.mockReturnValue(undefined); const personalizationDetails = createPersonalizationDetails({ getPageLocation, renderDecisions, @@ -231,7 +284,6 @@ describe("Personalization::createPersonalizationDetails", () => { surfaces: [], }; const queryDetails = personalizationDetails.createQueryDetails(); - expect(personalizationDetails.isRenderDecisions()).toEqual(false); expect(personalizationDetails.hasScopes()).toEqual(true); expect(personalizationDetails.hasSurfaces()).toEqual(false); @@ -247,7 +299,7 @@ describe("Personalization::createPersonalizationDetails", () => { surfaces: ["web://test1.com"], }; const renderDecisions = false; - event.getViewName.and.returnValue(undefined); + event.getViewName.mockReturnValue(undefined); const personalizationDetails = createPersonalizationDetails({ getPageLocation, renderDecisions, @@ -272,7 +324,6 @@ describe("Personalization::createPersonalizationDetails", () => { surfaces: ["web://test1.com/"], }; const queryDetails = personalizationDetails.createQueryDetails(); - expect(personalizationDetails.isRenderDecisions()).toEqual(false); expect(personalizationDetails.hasScopes()).toEqual(false); expect(personalizationDetails.hasSurfaces()).toEqual(true); @@ -283,7 +334,7 @@ describe("Personalization::createPersonalizationDetails", () => { expect(personalizationDetails.shouldUseCachedData()).toEqual(false); }); it("should fetch data when cache initialized, renderDecisions is true and decisionScopes is not empty and viewName exist", () => { - event.getViewName.and.returnValue("cart"); + event.getViewName.mockReturnValue("cart"); const decisionScopes = ["test1"]; const personalization = { decisionScopes: ["test2"], @@ -299,7 +350,6 @@ describe("Personalization::createPersonalizationDetails", () => { isCacheInitialized: true, logger, }); - const expectedDecisionScopes = ["test1", "test2"]; const expectedQueryDetails = { schemas: [ @@ -315,7 +365,6 @@ describe("Personalization::createPersonalizationDetails", () => { surfaces: ["web://test1.com/"], }; const queryDetails = personalizationDetails.createQueryDetails(); - expect(personalizationDetails.isRenderDecisions()).toEqual(true); expect(personalizationDetails.hasScopes()).toEqual(true); expect(personalizationDetails.hasSurfaces()).toEqual(true); @@ -325,7 +374,7 @@ describe("Personalization::createPersonalizationDetails", () => { expect(personalizationDetails.hasViewName()).toEqual(true); }); it("should do nothing when cache is initialized, renderDecisions true, no viewName and decisionScopes is empty", () => { - event.getViewName.and.returnValue(undefined); + event.getViewName.mockReturnValue(undefined); const decisionScopes = []; const personalization = {}; const renderDecisions = true; @@ -338,7 +387,6 @@ describe("Personalization::createPersonalizationDetails", () => { isCacheInitialized: true, logger, }); - expect(personalizationDetails.isRenderDecisions()).toEqual(true); expect(personalizationDetails.hasScopes()).toEqual(false); expect(personalizationDetails.hasSurfaces()).toEqual(false); @@ -348,7 +396,7 @@ describe("Personalization::createPersonalizationDetails", () => { expect(personalizationDetails.shouldUseCachedData()).toEqual(false); }); it("should do nothing when cache is initialized, renderDecisions false, no viewName and decisionScopes is empty", () => { - event.getViewName.and.returnValue(undefined); + event.getViewName.mockReturnValue(undefined); const decisionScopes = []; const personalization = {}; const renderDecisions = false; @@ -361,7 +409,6 @@ describe("Personalization::createPersonalizationDetails", () => { isCacheInitialized: true, logger, }); - expect(personalizationDetails.isRenderDecisions()).toEqual(false); expect(personalizationDetails.hasScopes()).toEqual(false); expect(personalizationDetails.hasSurfaces()).toEqual(false); @@ -371,7 +418,7 @@ describe("Personalization::createPersonalizationDetails", () => { expect(personalizationDetails.shouldUseCachedData()).toEqual(false); }); it("should use cache when cache initialized, renderDecisions is true and decisionScopes is empty and viewName exist", () => { - event.getViewName.and.returnValue("cart"); + event.getViewName.mockReturnValue("cart"); const decisionScopes = []; const personalization = {}; const renderDecisions = true; @@ -384,7 +431,6 @@ describe("Personalization::createPersonalizationDetails", () => { isCacheInitialized: true, logger, }); - expect(personalizationDetails.isRenderDecisions()).toEqual(true); expect(personalizationDetails.hasScopes()).toEqual(false); expect(personalizationDetails.hasSurfaces()).toEqual(false); @@ -394,7 +440,7 @@ describe("Personalization::createPersonalizationDetails", () => { expect(personalizationDetails.shouldUseCachedData()).toEqual(true); }); it("should use cache when cache initialized, renderDecisions is false and decisionScopes is empty and viewName exist", () => { - event.getViewName.and.returnValue("cart"); + event.getViewName.mockReturnValue("cart"); const decisionScopes = []; const personalization = {}; const renderDecisions = false; @@ -407,7 +453,6 @@ describe("Personalization::createPersonalizationDetails", () => { isCacheInitialized: true, logger, }); - expect(personalizationDetails.isRenderDecisions()).toEqual(false); expect(personalizationDetails.hasScopes()).toEqual(false); expect(personalizationDetails.hasSurfaces()).toEqual(false); @@ -417,7 +462,7 @@ describe("Personalization::createPersonalizationDetails", () => { expect(personalizationDetails.shouldUseCachedData()).toEqual(true); }); it("should fetch data when cache initialized, renderDecisions is true and decisionScopes has __view__ and viewName exist", () => { - event.getViewName.and.returnValue("cart"); + event.getViewName.mockReturnValue("cart"); const decisionScopes = ["__view__"]; const personalization = { surfaces: [TEST_SURFACE], @@ -432,7 +477,6 @@ describe("Personalization::createPersonalizationDetails", () => { isCacheInitialized: true, logger, }); - const expectedDecisionScopes = ["__view__"]; const expectedQueryDetails = { schemas: [ @@ -449,7 +493,6 @@ describe("Personalization::createPersonalizationDetails", () => { surfaces: [TEST_SURFACE], }; const queryDetails = personalizationDetails.createQueryDetails(); - expect(personalizationDetails.isRenderDecisions()).toEqual(true); expect(personalizationDetails.hasScopes()).toEqual(true); expect(personalizationDetails.hasSurfaces()).toEqual(true); @@ -462,7 +505,7 @@ describe("Personalization::createPersonalizationDetails", () => { const decisionScopes = []; const personalization = {}; const renderDecisions = true; - event.getViewName.and.returnValue(""); + event.getViewName.mockReturnValue(""); const personalizationDetails = createPersonalizationDetails({ getPageLocation, renderDecisions, diff --git a/test/unit/specs/components/Personalization/createSetTargetMigration.spec.js b/test/unit/specs/components/Personalization/createSetTargetMigration.spec.js index deafa7b15..1e47b7036 100644 --- a/test/unit/specs/components/Personalization/createSetTargetMigration.spec.js +++ b/test/unit/specs/components/Personalization/createSetTargetMigration.spec.js @@ -10,28 +10,32 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createSetTargetMigration from "../../../../../src/components/Personalization/createSetTargetMigration.js"; describe("Personalization::createSetTargetMigration", () => { let request; let payload; - beforeEach(() => { - request = jasmine.createSpyObj("request", ["getPayload"]); - payload = jasmine.createSpyObj("payload", ["mergeMeta"]); - request.getPayload.and.returnValue(payload); + request = { + getPayload: vi.fn(), + }; + payload = { + mergeMeta: vi.fn(), + }; + request.getPayload.mockReturnValue(payload); }); - it("adds to request meta if targetMigrationEnabled=true is configured", () => { const setTargetMigration = createSetTargetMigration({ targetMigrationEnabled: true, }); setTargetMigration(request); - expect(payload.mergeMeta).toHaveBeenCalledOnceWith({ - target: { migration: true }, + expect(payload.mergeMeta).toHaveBeenNthCalledWith(1, { + target: { + migration: true, + }, }); }); - it("does not add to request meta if targetMigrationEnabled is not configured", () => { const setTargetMigration = createSetTargetMigration({ targetMigrationEnabled: false, diff --git a/test/unit/specs/components/Personalization/createViewCacheManager.spec.js b/test/unit/specs/components/Personalization/createViewCacheManager.spec.js index 75e8cfe15..8f44706a7 100644 --- a/test/unit/specs/components/Personalization/createViewCacheManager.spec.js +++ b/test/unit/specs/components/Personalization/createViewCacheManager.spec.js @@ -10,12 +10,12 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import { DEFAULT_CONTENT_ITEM } from "../../../../../src/constants/schema.js"; import createViewCacheManager from "../../../../../src/components/Personalization/createViewCacheManager.js"; import flushPromiseChains from "../../../helpers/flushPromiseChains.js"; const propsToJSON = (props) => props.map((p) => p.toJSON()); - describe("Personalization::createViewCacheManager", () => { const viewHandles = [ { @@ -35,10 +35,8 @@ describe("Personalization::createViewCacheManager", () => { scope: "other", }, ]; - let createProposition; let propositions; - beforeEach(() => { createProposition = (viewHandle) => { const { scope } = viewHandle; @@ -53,29 +51,26 @@ describe("Personalization::createViewCacheManager", () => { }; propositions = viewHandles.map(createProposition); }); - it("stores and gets the decisions based on a viewName", async () => { - const viewCacheManager = createViewCacheManager({ createProposition }); - + const viewCacheManager = createViewCacheManager({ + createProposition, + }); const cacheUpdate = viewCacheManager.createCacheUpdate("home"); const resultingHandles = cacheUpdate.update(propositions); expect(resultingHandles).toEqual([propositions[0], propositions[1]]); - const homeViews = await viewCacheManager.getView("home"); expect(homeViews).toEqual([propositions[0], propositions[1]]); - const cartViews = await viewCacheManager.getView("cart"); expect(cartViews).toEqual([propositions[2]]); - const otherViews = await viewCacheManager.getView("other"); expect(otherViews).toEqual([propositions[3]]); }); - it("should be no views when decisions deferred is rejected", async () => { - const viewCacheManager = createViewCacheManager({ createProposition }); + const viewCacheManager = createViewCacheManager({ + createProposition, + }); const cacheUpdate = viewCacheManager.createCacheUpdate("home"); cacheUpdate.cancel(); - const homeViews = await viewCacheManager.getView("home"); expect(homeViews.map((h) => h.toJSON())).toEqual([ { @@ -93,30 +88,38 @@ describe("Personalization::createViewCacheManager", () => { }, ]); }); - it("should not be initialized when first created", () => { - const viewCacheManager = createViewCacheManager({ createProposition }); + const viewCacheManager = createViewCacheManager({ + createProposition, + }); expect(viewCacheManager.isInitialized()).toBe(false); }); - it("should be initialized when first cache update is created", () => { - const viewCacheManager = createViewCacheManager({ createProposition }); + const viewCacheManager = createViewCacheManager({ + createProposition, + }); viewCacheManager.createCacheUpdate("home"); expect(viewCacheManager.isInitialized()).toBe(true); }); - it("allows you to store the views multiple times", async () => { - const viewCacheManager = createViewCacheManager({ createProposition }); - + const viewCacheManager = createViewCacheManager({ + createProposition, + }); const cacheUpdate1 = viewCacheManager.createCacheUpdate("cart"); const cartProps = await cacheUpdate1.update(propositions); - expect(cartProps).toEqual([propositions[2]]); - const cacheUpdate2 = viewCacheManager.createCacheUpdate(); const cartViewPromise = viewCacheManager.getView("cart"); await flushPromiseChains(); - await expectAsync(cartViewPromise).toBePending(); + // await expectAsync(cartViewPromise).toBePending(); + + const cartPromiseIsPending = await Promise.race([ + cartViewPromise.then(() => false), + new Promise((resolve) => { + setTimeout(() => resolve(true), 0); + }), + ]); + expect(cartPromiseIsPending).toBe(true); cacheUpdate2.update([ createProposition({ id: "foo4", @@ -124,7 +127,6 @@ describe("Personalization::createViewCacheManager", () => { scope: "about", }), ]); - expect(await cartViewPromise).toEqual([propositions[2]]); expect(await viewCacheManager.getView("about").then(propsToJSON)).toEqual([ { @@ -134,27 +136,26 @@ describe("Personalization::createViewCacheManager", () => { }, ]); }); - it("is initialized after the first storeViews call", () => { - const viewCacheManager = createViewCacheManager({ createProposition }); - + const viewCacheManager = createViewCacheManager({ + createProposition, + }); viewCacheManager.createCacheUpdate(); - - expect(viewCacheManager.isInitialized()).toBeTrue(); + expect(viewCacheManager.isInitialized()).toBe(true); }); - it("is initialized even after a failure", async () => { - const viewCacheManager = createViewCacheManager({ createProposition }); - + const viewCacheManager = createViewCacheManager({ + createProposition, + }); const update1 = viewCacheManager.createCacheUpdate(); update1.cancel(); await flushPromiseChains(); - - expect(viewCacheManager.isInitialized()).toBeTrue(); + expect(viewCacheManager.isInitialized()).toBe(true); }); - it("reverts to old storage after a failure", async () => { - const viewCacheManager = createViewCacheManager({ createProposition }); + const viewCacheManager = createViewCacheManager({ + createProposition, + }); const update1 = viewCacheManager.createCacheUpdate(); update1.update(propositions); const update2 = viewCacheManager.createCacheUpdate(); @@ -167,23 +168,19 @@ describe("Personalization::createViewCacheManager", () => { /* it("applies the decisions in the order they were requested", async () => { const viewCacheManager = createViewCacheManager({ createProposition }); - - const update1 = viewCacheManager.createCacheUpdate(); + const update1 = viewCacheManager.createCacheUpdate(); const viewPromise1 = viewCacheManager.getView(cartView).then(props => props.map(p => p.toJSON())); const update2 = viewCacheManager.createCacheUpdate(); const viewPromise2 = viewCacheManager.getView(cartView).then(props => props.map(p => p.toJSON())); - - update2.update([ + update2.update([ createProposition({ id: "foo4", items: [], scope: "cart" }) ]); - - update1.update(viewHandles); - - await expectAsync(viewPromise2).toBeResolvedTo([ + update1.update(viewHandles); + await expectAsync(viewPromise2).toBeResolvedTo([ { id: "foo4", items: [], diff --git a/test/unit/specs/components/Personalization/createViewChangeHandler.spec.js b/test/unit/specs/components/Personalization/createViewChangeHandler.spec.js index b06cc1347..588d0cc67 100644 --- a/test/unit/specs/components/Personalization/createViewChangeHandler.spec.js +++ b/test/unit/specs/components/Personalization/createViewChangeHandler.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createViewChangeHandler from "../../../../../src/components/Personalization/createViewChangeHandler.js"; import { CART_VIEW_DECISIONS } from "./responsesMock/eventResponses.js"; import injectCreateProposition from "../../../../../src/components/Personalization/handlers/injectCreateProposition.js"; @@ -17,31 +18,30 @@ import injectCreateProposition from "../../../../../src/components/Personalizati describe("Personalization::createViewChangeHandler", () => { let processPropositions; let viewCache; - let personalizationDetails; let event; let onResponse; let logger; let createProposition; - beforeEach(() => { - logger = jasmine.createSpyObj("logger", ["logOnContentRendering"]); - processPropositions = jasmine.createSpy("processPropositions"); - viewCache = jasmine.createSpyObj("viewCache", ["getView"]); - - personalizationDetails = jasmine.createSpyObj("personalizationDetails", [ - "isRenderDecisions", - "getViewName", - ]); + logger = { + logOnContentRendering: vi.fn(), + }; + processPropositions = vi.fn(); + viewCache = { + getView: vi.fn(), + }; + personalizationDetails = { + isRenderDecisions: vi.fn(), + getViewName: vi.fn(), + }; event = "myevent"; - onResponse = jasmine.createSpy(); - + onResponse = vi.fn(); createProposition = injectCreateProposition({ preprocess: (data) => data, isPageWideSurface: () => false, }); }); - const run = async () => { const viewChangeHandler = createViewChangeHandler({ logger, @@ -53,28 +53,27 @@ describe("Personalization::createViewChangeHandler", () => { personalizationDetails, onResponse, }); - const result = onResponse.calls.argsFor(0)[0](); - return { decisionsMeta, result }; + const result = onResponse.mock.calls[0][0](); + return { + decisionsMeta, + result, + }; }; - it("should trigger render if renderDecisions is true", async () => { - viewCache.getView.and.returnValue( + viewCache.getView.mockReturnValue( Promise.resolve(CART_VIEW_DECISIONS.map((p) => createProposition(p))), ); - personalizationDetails.isRenderDecisions.and.returnValue(true); - personalizationDetails.getViewName.and.returnValue("cart"); - processPropositions.and.returnValue({ + personalizationDetails.isRenderDecisions.mockReturnValue(true); + personalizationDetails.getViewName.mockReturnValue("cart"); + processPropositions.mockReturnValue({ render: () => Promise.resolve("decisionMeta"), returnedPropositions: [], returnedDecisions: CART_VIEW_DECISIONS, }); - const { decisionsMeta, result } = await run(); - expect(logger.logOnContentRendering).toHaveBeenCalledTimes(1); expect(processPropositions).toHaveBeenCalledTimes(1); expect(decisionsMeta).toEqual("decisionMeta"); - expect(result.decisions).toEqual(CART_VIEW_DECISIONS); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/action.spec.js b/test/unit/specs/components/Personalization/dom-actions/action.spec.js deleted file mode 100644 index 26ef92385..000000000 --- a/test/unit/specs/components/Personalization/dom-actions/action.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -/* -Copyright 2023 Adobe. All rights reserved. -This file is licensed to you 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 REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ diff --git a/test/unit/specs/components/Personalization/dom-actions/addNonceToInlineStyleElements.spec.js b/test/unit/specs/components/Personalization/dom-actions/addNonceToInlineStyleElements.spec.js index 5f8b89ce8..5ff331e5b 100644 --- a/test/unit/specs/components/Personalization/dom-actions/addNonceToInlineStyleElements.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/addNonceToInlineStyleElements.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { afterEach, describe, it, expect } from "vitest"; import addNonceToInlineStyleElements from "../../../../../../src/components/Personalization/dom-actions/addNonceToInlineStyleElements.js"; import { testResetCachedNonce } from "../../../../../../src/components/Personalization/dom-actions/dom/getNonce.js"; import { createFragment } from "../../../../../../src/components/Personalization/dom-actions/dom/index.js"; @@ -25,13 +26,15 @@ describe("Personalization::dom-actions::addNonceToInlineStyleElements", () => { afterEach(() => { selectNodes("#fooById").forEach(removeNode); }); - it("should add nonce to inline style elements if available", () => { testResetCachedNonce(); // Make sure a nonce is available to alloy appendNode( document.head, - createNode("script", { id: "fooById", nonce: "123" }), + createNode("script", { + id: "fooById", + nonce: "123", + }), ); const fragmentHtml = ""; const fragment = createFragment(fragmentHtml); diff --git a/test/unit/specs/components/Personalization/dom-actions/appendHtml.spec.js b/test/unit/specs/components/Personalization/dom-actions/appendHtml.spec.js index 1749641e0..a0445fffa 100644 --- a/test/unit/specs/components/Personalization/dom-actions/appendHtml.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/appendHtml.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -26,44 +27,42 @@ import { DOM_ACTION_APPEND_HTML } from "../../../../../../src/components/Persona describe("Personalization::actions::appendHtml", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("appendHtml"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_APPEND_HTML, }); }); - afterEach(() => { cleanUpDomChanges("appendHtml"); }); - it("should append personalized content", () => { const modules = initDomActionsModules(); const { appendHtml } = modules; const element = createNode( "ul", - { id: "appendHtml" }, - { innerHTML: "
  • 1
  • " }, + { + id: "appendHtml", + }, + { + innerHTML: "
  • 1
  • ", + }, ); - appendNode(document.body, element); - const settings = { selector: "#appendHtml", prehidingSelector: "#appendHtml", content: `
  • 2
  • 3
  • `, - meta: { a: 1 }, + meta: { + a: 1, + }, }; - return appendHtml(settings, decorateProposition).then(() => { const result = selectNodes("ul#appendHtml li"); - expect(result.length).toEqual(3); expect(result[0].innerHTML).toEqual("1"); expect(result[1].innerHTML).toEqual("2"); expect(result[2].innerHTML).toEqual("3"); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", ); diff --git a/test/unit/specs/components/Personalization/dom-actions/clicks/collectClicks.spec.js b/test/unit/specs/components/Personalization/dom-actions/clicks/collectClicks.spec.js index 3e02bafe4..99758665e 100644 --- a/test/unit/specs/components/Personalization/dom-actions/clicks/collectClicks.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/clicks/collectClicks.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, afterEach, describe, it, expect } from "vitest"; import { createNode, appendNode, @@ -22,7 +23,6 @@ describe("Personalization::tracking::clicks", () => { afterEach(() => { selectNodes(".eq").forEach(removeNode); }); - it("should collect clicks", () => { const meta = [ { @@ -30,9 +30,7 @@ describe("Personalization::tracking::clicks", () => { scope: "example_scope", }, ]; - const getClickMetas = jasmine - .createSpy("getClickMetas") - .and.returnValue(meta); + const getClickMetas = vi.fn().mockReturnValue(meta); const content = `
    first
    @@ -44,25 +42,25 @@ describe("Personalization::tracking::clicks", () => { `; const node = createNode( "DIV", - { id: "abc", class: "eq" }, - { innerHTML: content }, + { + id: "abc", + class: "eq", + }, + { + innerHTML: content, + }, ); - appendNode(document.body, node); - const selectors = ["#abc:eq(0) > div.b:eq(0) > div.c"]; - const element = document.getElementById("one"); const { decisionsMeta, propositionActionLabel } = collectClicks( element, selectors, getClickMetas, ); - expect(decisionsMeta).toEqual(meta); expect(propositionActionLabel).toEqual(""); }); - it("should collect and dedupe clicks with labels", () => { const metaOuter = [ { @@ -96,12 +94,17 @@ describe("Personalization::tracking::clicks", () => { trackingLabel: "inner-label-3", }, ]; - const getClickMetas = jasmine - .createSpy("getClickMetas") - .withArgs("#abc:eq(0) > div.b:eq(0)") - .and.returnValue(metaOuter) - .withArgs("#abc:eq(0) > div.b:eq(0) > div.c") - .and.returnValue(metaInner); + const getClickMetas = vi.fn((...args) => { + if (args[0] === "#abc:eq(0) > div.b:eq(0)") { + return metaOuter; + } + if (args[0] === "#abc:eq(0) > div.b:eq(0) > div.c") { + return metaInner; + } + + return undefined; + }); + const content = `
    first
    @@ -113,24 +116,25 @@ describe("Personalization::tracking::clicks", () => { `; const node = createNode( "DIV", - { id: "abc", class: "eq" }, - { innerHTML: content }, + { + id: "abc", + class: "eq", + }, + { + innerHTML: content, + }, ); - appendNode(document.body, node); - const selectors = [ "#abc:eq(0) > div.b:eq(0)", "#abc:eq(0) > div.b:eq(0) > div.c", ]; - const element = document.getElementById("one"); const { decisionsMeta, propositionActionLabel } = collectClicks( element, selectors, getClickMetas, ); - expect(decisionsMeta).toEqual([ { id: "AT:outer-id-1", diff --git a/test/unit/specs/components/Personalization/dom-actions/clicks/collectInteractions.spec.js b/test/unit/specs/components/Personalization/dom-actions/clicks/collectInteractions.spec.js index 72da21f68..7d9ac74f3 100644 --- a/test/unit/specs/components/Personalization/dom-actions/clicks/collectInteractions.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/clicks/collectInteractions.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import createInteractionStorage from "../../../../../../../src/components/Personalization/createInteractionStorage.js"; import { appendNode, @@ -33,24 +34,21 @@ describe("Personalization::tracking::interactions", () => { let getInteractionMetas; let autoCollectPropositionInteractions; let scopeDetails; - beforeEach(() => { selectNodes(".eq").forEach(removeNode); ({ storeInteractionMeta, getInteractionMetas } = createInteractionStorage()); - autoCollectPropositionInteractions = { [ADOBE_JOURNEY_OPTIMIZER]: ALWAYS, [ADOBE_TARGET]: NEVER, }; - - scopeDetails = { decisionProvider: ADOBE_JOURNEY_OPTIMIZER }; + scopeDetails = { + decisionProvider: ADOBE_JOURNEY_OPTIMIZER, + }; }); - afterEach(() => { selectNodes(".eq").forEach(removeNode); }); - it("should collect interactions with interact-id, label and token", () => { storeInteractionMeta( "AT:1234", @@ -63,7 +61,6 @@ describe("Personalization::tracking::interactions", () => { }, 99, ); - const content = `
    first
    @@ -73,12 +70,15 @@ describe("Personalization::tracking::interactions", () => { `; const node = createNode( "DIV", - { id: "abc", class: "eq" }, - { innerHTML: content }, + { + id: "abc", + class: "eq", + }, + { + innerHTML: content, + }, ); - appendNode(document.body, node); - [ { elementId: "one", @@ -103,7 +103,6 @@ describe("Personalization::tracking::interactions", () => { getInteractionMetas, autoCollectPropositionInteractions, ); - expect(decisionsMeta).toEqual([ { id: "AT:1234", @@ -120,13 +119,11 @@ describe("Personalization::tracking::interactions", () => { expect(propositionActionToken).toEqual(definition.expectedToken); }); }); - it("should collect interactions for elements decorated with label when configured for 'decoratedElementsOnly'", () => { autoCollectPropositionInteractions = { [ADOBE_JOURNEY_OPTIMIZER]: DECORATED_ELEMENTS_ONLY, [ADOBE_TARGET]: NEVER, }; - storeInteractionMeta( "AT:1234", "063", @@ -138,7 +135,6 @@ describe("Personalization::tracking::interactions", () => { }, 99, ); - const content = `
    first
    @@ -148,12 +144,15 @@ describe("Personalization::tracking::interactions", () => { `; const node = createNode( "DIV", - { id: "abc", class: "eq" }, - { innerHTML: content }, + { + id: "abc", + class: "eq", + }, + { + innerHTML: content, + }, ); - appendNode(document.body, node); - [ { elementId: "one", @@ -178,7 +177,6 @@ describe("Personalization::tracking::interactions", () => { getInteractionMetas, autoCollectPropositionInteractions, ); - expect(decisionsMeta).toEqual([ { id: "AT:1234", @@ -195,13 +193,11 @@ describe("Personalization::tracking::interactions", () => { expect(propositionActionToken).toEqual(definition.expectedToken); }); }); - it("should NOT collect interactions for elements NOT decorated with label when configured for 'decoratedElementsOnly'", () => { autoCollectPropositionInteractions = { [ADOBE_JOURNEY_OPTIMIZER]: DECORATED_ELEMENTS_ONLY, [ADOBE_TARGET]: NEVER, }; - storeInteractionMeta( "AT:1234", "063", @@ -213,7 +209,6 @@ describe("Personalization::tracking::interactions", () => { }, 99, ); - const content = `
    first
    @@ -223,12 +218,15 @@ describe("Personalization::tracking::interactions", () => { `; const node = createNode( "DIV", - { id: "abc", class: "eq" }, - { innerHTML: content }, + { + id: "abc", + class: "eq", + }, + { + innerHTML: content, + }, ); - appendNode(document.body, node); - [ { elementId: "one", @@ -253,13 +251,11 @@ describe("Personalization::tracking::interactions", () => { getInteractionMetas, autoCollectPropositionInteractions, ); - expect(decisionsMeta).toEqual([]); expect(propositionActionLabel).toBeNull(); expect(propositionActionToken).toBeNull(); }); }); - it("should find closest label and token", () => { storeInteractionMeta( "AT:1234", @@ -272,7 +268,6 @@ describe("Personalization::tracking::interactions", () => { }, 99, ); - const content = `
    first
    @@ -282,11 +277,15 @@ describe("Personalization::tracking::interactions", () => { `; const node = createNode( "DIV", - { id: "abc", class: "eq" }, - { innerHTML: content }, + { + id: "abc", + class: "eq", + }, + { + innerHTML: content, + }, ); appendNode(document.body, node); - [ { elementId: "one", @@ -311,7 +310,6 @@ describe("Personalization::tracking::interactions", () => { getInteractionMetas, autoCollectPropositionInteractions, ); - expect(decisionsMeta).toEqual([ { id: "AT:1234", @@ -328,7 +326,6 @@ describe("Personalization::tracking::interactions", () => { expect(propositionActionToken).toEqual(definition.expectedToken); }); }); - it("should find closest label and token (nesting)", () => { storeInteractionMeta( "AT:1234", @@ -341,7 +338,6 @@ describe("Personalization::tracking::interactions", () => { }, 99, ); - const content = `
    @@ -355,11 +351,15 @@ describe("Personalization::tracking::interactions", () => { `; const node = createNode( "DIV", - { id: "abc", class: "eq" }, - { innerHTML: content }, + { + id: "abc", + class: "eq", + }, + { + innerHTML: content, + }, ); appendNode(document.body, node); - [ { elementId: "onegreatgrandchild", @@ -384,7 +384,6 @@ describe("Personalization::tracking::interactions", () => { getInteractionMetas, autoCollectPropositionInteractions, ); - expect(decisionsMeta).toEqual([ { id: "AT:1234", @@ -401,7 +400,6 @@ describe("Personalization::tracking::interactions", () => { expect(propositionActionToken).toEqual(definition.expectedToken); }); }); - it("handles case where no interact-id exists", () => { storeInteractionMeta( "AT:1234", @@ -414,7 +412,6 @@ describe("Personalization::tracking::interactions", () => { }, 99, ); - const content = `
    @@ -428,11 +425,15 @@ describe("Personalization::tracking::interactions", () => { `; const node = createNode( "DIV", - { id: "abc", class: "eq" }, - { innerHTML: content }, + { + id: "abc", + class: "eq", + }, + { + innerHTML: content, + }, ); appendNode(document.body, node); - const element = document.getElementById("onegreatgrandchild"); expect( collectInteractions( @@ -442,7 +443,6 @@ describe("Personalization::tracking::interactions", () => { ), ).toEqual({}); }); - it("should collect and dedupe interactions with labels", () => { // outer storeInteractionMeta( @@ -528,7 +528,6 @@ describe("Personalization::tracking::interactions", () => { }, 11, ); - const content = `
    first
    @@ -538,12 +537,15 @@ describe("Personalization::tracking::interactions", () => { `; const node = createNode( "DIV", - { id: "abc", class: "eq" }, - { innerHTML: content }, + { + id: "abc", + class: "eq", + }, + { + innerHTML: content, + }, ); - appendNode(document.body, node); - const element = document.getElementById("one"); const { decisionsMeta, propositionActionLabel, propositionActionToken } = collectInteractions( @@ -551,9 +553,8 @@ describe("Personalization::tracking::interactions", () => { getInteractionMetas, autoCollectPropositionInteractions, ); - expect(decisionsMeta).toEqual( - jasmine.arrayContaining([ + expect.arrayContaining([ { id: "AJO:inner-id-2", scope: "inner-scope2", diff --git a/test/unit/specs/components/Personalization/dom-actions/collectInteractions.spec.js b/test/unit/specs/components/Personalization/dom-actions/collectInteractions.spec.js index e8ffa7df9..6520c5895 100644 --- a/test/unit/specs/components/Personalization/dom-actions/collectInteractions.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/collectInteractions.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -22,34 +23,29 @@ import { DOM_ACTION_COLLECT_INTERACTIONS } from "../../../../../../src/component describe("Personalization::actions::collectInteractions", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("something"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_COLLECT_INTERACTIONS, }); }); - afterEach(() => { cleanUpDomChanges("something"); }); - it("should decorate element", async () => { const itemData = { isCool: true, selector: "#something", }; - const modules = initDomActionsModules(); - - const element = createNode("div", { id: "something" }); + const element = createNode("div", { + id: "something", + }); appendNode(document.body, element); - await modules[DOM_ACTION_COLLECT_INTERACTIONS]( itemData, decorateProposition, ); - expect(getAttribute(element, INTERACT_ID_DATA_ATTRIBUTE)).not.toBeNull(); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/createPreprocess.spec.js b/test/unit/specs/components/Personalization/dom-actions/createPreprocess.spec.js index bb509dc04..7a938265d 100644 --- a/test/unit/specs/components/Personalization/dom-actions/createPreprocess.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/createPreprocess.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createPreprocess from "../../../../../../src/components/Personalization/dom-actions/createPreprocess.js"; describe("Personalization::dom-actions::createPreprocess", () => { @@ -16,36 +17,77 @@ describe("Personalization::dom-actions::createPreprocess", () => { let preprocessor2; let preprocess; beforeEach(() => { - preprocessor1 = jasmine.createSpy("preprocessor1"); - preprocessor2 = jasmine.createSpy("preprocessor2"); + preprocessor1 = vi.fn(); + preprocessor2 = vi.fn(); preprocess = createPreprocess([preprocessor1, preprocessor2]); }); - it("handles an empty action", () => { expect(preprocess({})).toEqual({}); }); - it("passes the data through", () => { - preprocessor1.and.callFake((data) => data); - preprocessor2.and.callFake((data) => data); - expect(preprocess({ a: 1, b: 2 })).toEqual({ a: 1, b: 2 }); + preprocessor1.mockImplementation((data) => data); + preprocessor2.mockImplementation((data) => data); + expect( + preprocess({ + a: 1, + b: 2, + }), + ).toEqual({ + a: 1, + b: 2, + }); }); - it("passes the data through when the preprocessor returns undefined", () => { - preprocessor1.and.callFake(() => undefined); - preprocessor2.and.callFake(() => undefined); - expect(preprocess({ a: 1, b: 2 })).toEqual({ a: 1, b: 2 }); + preprocessor1.mockImplementation(() => undefined); + preprocessor2.mockImplementation(() => undefined); + expect( + preprocess({ + a: 1, + b: 2, + }), + ).toEqual({ + a: 1, + b: 2, + }); }); - it("updates the data", () => { - preprocessor1.and.callFake(() => ({ c: 3 })); - preprocessor2.and.callFake(() => ({ d: 4 })); - expect(preprocess({ a: 1, b: 2 })).toEqual({ a: 1, b: 2, c: 3, d: 4 }); + preprocessor1.mockImplementation(() => ({ + c: 3, + })); + preprocessor2.mockImplementation(() => ({ + d: 4, + })); + expect( + preprocess({ + a: 1, + b: 2, + }), + ).toEqual({ + a: 1, + b: 2, + c: 3, + d: 4, + }); }); - it("updates the data2", () => { - preprocessor1.and.callFake((data) => ({ ...data, c: 3 })); - preprocessor2.and.callFake((data) => ({ ...data, d: 4 })); - expect(preprocess({ a: 1, b: 2 })).toEqual({ a: 1, b: 2, c: 3, d: 4 }); + preprocessor1.mockImplementation((data) => ({ + ...data, + c: 3, + })); + preprocessor2.mockImplementation((data) => ({ + ...data, + d: 4, + })); + expect( + preprocess({ + a: 1, + b: 2, + }), + ).toEqual({ + a: 1, + b: 2, + c: 3, + d: 4, + }); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/createRedirect.spec.js b/test/unit/specs/components/Personalization/dom-actions/createRedirect.spec.js index 606f5a791..39ed4a22c 100644 --- a/test/unit/specs/components/Personalization/dom-actions/createRedirect.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/createRedirect.spec.js @@ -9,14 +9,15 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import createRedirect from "../../../../../../src/components/Personalization/dom-actions/createRedirect.js"; describe("createRedirect", () => { it("redirects", () => { const window = { location: { - replace: jasmine.createSpy(), - href: jasmine.createSpy(), + replace: vi.fn(), + href: vi.fn(), }, }; const redirect = createRedirect(window); @@ -24,12 +25,11 @@ describe("createRedirect", () => { expect(window.location.replace).toHaveBeenCalledWith("myurl"); expect(window.location.href).not.toHaveBeenCalled(); }); - it("redirects using window.location.href when preserveHistory is true", () => { const window = { location: { - href: jasmine.createSpy(), - replace: jasmine.createSpy(), + href: vi.fn(), + replace: vi.fn(), }, }; const redirectUrl = "https://www.adobe.com"; diff --git a/test/unit/specs/components/Personalization/dom-actions/customCode.spec.js b/test/unit/specs/components/Personalization/dom-actions/customCode.spec.js index 51b1b2718..09335e518 100644 --- a/test/unit/specs/components/Personalization/dom-actions/customCode.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/customCode.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -22,53 +23,53 @@ describe("Personalization::actions::customCode", () => { let decorateProposition; let customCode; let element; - beforeEach(() => { cleanUpDomChanges("customCode"); delete window.someEvar123; - decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_CUSTOM_CODE, }); - const modules = initDomActionsModules(); ({ customCode } = modules); }); - afterEach(() => { cleanUpDomChanges("customCode"); delete window.someEvar123; }); - it("should set content in container that has children", async () => { - element = createNode("div", { id: "customCode", class: "customCode" }); + element = createNode("div", { + id: "customCode", + class: "customCode", + }); element.innerHTML = `
    `; appendNode(document.body, element); - const settings = { selector: ".customCode", prehidingSelector: ".customCode", content: "

    Hola!

    ", - meta: { a: 1 }, + meta: { + a: 1, + }, }; - await customCode(settings, decorateProposition); expect(element.innerHTML).toMatch( /

    Hola!<\/p>

    <\/div>
    <\/div>/, ); }); - it("should set content in container that has NO children", async () => { - element = createNode("div", { id: "customCode", class: "customCode" }); + element = createNode("div", { + id: "customCode", + class: "customCode", + }); appendNode(document.body, element); - const settings = { selector: ".customCode", prehidingSelector: ".customCode", content: "

    Hola!

    Hello
    ", - meta: { a: 1 }, + meta: { + a: 1, + }, }; - await customCode(settings, decorateProposition); expect(element.innerHTML).toMatch( /

    Hola!<\/p>

    Hello<\/div>/, diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/createFragment.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/createFragment.spec.js index 2e76dd568..d2ecaccbe 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/createFragment.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/createFragment.spec.js @@ -10,12 +10,12 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import createFragment from "../../../../../../../src/components/Personalization/dom-actions/dom/createFragment.js"; describe("Personalization::helper", () => { it("createFragmentTest", () => { const result = createFragment(`
    foo
    `); - expect(result.firstElementChild.id).toEqual("foo"); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/getAttribute.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/getAttribute.spec.js index d7f63cd25..8eefe945d 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/getAttribute.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/getAttribute.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import getAttribute from "../../../../../../../src/components/Personalization/dom-actions/dom/getAttribute.js"; import createFragment from "../../../../../../../src/components/Personalization/dom-actions/dom/createFragment.js"; @@ -18,15 +19,12 @@ describe("Personalization::helper::dom::getAttribute", () => { const element = createFragment(`
    foo
    `); const name = "id"; const result = getAttribute(element.firstElementChild, name); - expect(result).toEqual("foo"); }); - it("returns null if element doesn't have this attribute", () => { const element = createFragment(`
    foo
    `); const name = "title"; const result = getAttribute(element.firstElementChild, name); - expect(result).toBeNull(); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/getChildNodes.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/getChildNodes.spec.js index 9ec5e87fb..222bf6f4e 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/getChildNodes.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/getChildNodes.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import getChildNodes from "../../../../../../../src/components/Personalization/dom-actions/dom/getChildNodes.js"; import createFragment from "../../../../../../../src/components/Personalization/dom-actions/dom/createFragment.js"; @@ -19,7 +20,6 @@ describe("Personalization::helper::dom::getChildNodes", () => { `
    foo

    hello there

    `, ); const result = getChildNodes(element); - expect(result.length).toEqual(3); expect(result[0].tagName).toEqual("DIV"); expect(result[1].tagName).toEqual("H1"); @@ -29,7 +29,6 @@ describe("Personalization::helper::dom::getChildNodes", () => { it("returns undefined when there are no children", () => { const element = createFragment(); const result = getChildNodes(element); - expect(result.length).toEqual(1); expect(result[0].tagName).toBeUndefined(); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/getChildren.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/getChildren.spec.js index 4f8c62841..1db630a4d 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/getChildren.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/getChildren.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import getChildren from "../../../../../../../src/components/Personalization/dom-actions/dom/getChildren.js"; import createFragment from "../../../../../../../src/components/Personalization/dom-actions/dom/createFragment.js"; @@ -19,16 +20,13 @@ describe("Personalization::helper::dom::getChildren", () => { `
    foo

    hello there

    `, ); const result = getChildren(element); - expect(result.length).toEqual(2); expect(result[0].tagName).toEqual("DIV"); expect(result[1].tagName).toEqual("H1"); }); - it("returns empty array if there are not children", () => { const element = createFragment(); const result = getChildren(element); - expect(result.length).toEqual(0); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/getElementById.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/getElementById.spec.js index 79fce87d2..5f7bf39ba 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/getElementById.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/getElementById.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { afterEach, describe, it, expect } from "vitest"; import { selectNodes, removeNode, @@ -22,13 +23,15 @@ describe("Personalization::DOM::getElementById", () => { afterEach(() => { selectNodes("#fooById").forEach(removeNode); }); - it("should return the node if exists", () => { - appendNode(document.head, createNode("style", { id: "fooById" })); - + appendNode( + document.head, + createNode("style", { + id: "fooById", + }), + ); expect(getElementById("fooById")).not.toBeNull(); }); - it("should return array when nodes are NOT present", () => { expect(getElementById("fooById")).toBeNull(); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/getFirstChild.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/getFirstChild.spec.js index f8ff3c270..200b31d79 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/getFirstChild.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/getFirstChild.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import getFirstChild from "../../../../../../../src/components/Personalization/dom-actions/dom/getFirstChild.js"; import createFragment from "../../../../../../../src/components/Personalization/dom-actions/dom/createFragment.js"; @@ -19,14 +20,11 @@ describe("Personalization::helper::dom::getFirstChild", () => { `

    hello there

    foo
    `, ); const result = getFirstChild(element); - expect(result.tagName).toEqual("H1"); }); - it("returns null if there are no child elements", () => { const element = createFragment(); const result = getFirstChild(element); - expect(result).toBeNull(); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/getNextSibling.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/getNextSibling.spec.js index 307a7bd02..38a933066 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/getNextSibling.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/getNextSibling.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import getNextSibling from "../../../../../../../src/components/Personalization/dom-actions/dom/getNextSibling.js"; import createFragment from "../../../../../../../src/components/Personalization/dom-actions/dom/createFragment.js"; import getFirstChild from "../../../../../../../src/components/Personalization/dom-actions/dom/getFirstChild.js"; @@ -21,15 +22,12 @@ describe("Personalization::helper::dom::getNextSibling", () => { ); const firstElement = getFirstChild(element); const nextSibling = getNextSibling(firstElement); - expect(nextSibling.tagName).toEqual("H1"); }); - it("returns null if the element doesn't have a sibling node", () => { const element = createFragment(`
    foo
    `); const firstElement = getFirstChild(element); const nextSibling = getNextSibling(firstElement); - expect(nextSibling).toBeNull(); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/getNonce.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/getNonce.spec.js index d47c991ce..0fb947a33 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/getNonce.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/getNonce.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { afterEach, describe, it, expect } from "vitest"; import { testResetCachedNonce } from "../../../../../../../src/components/Personalization/dom-actions/dom/getNonce.js"; import { selectNodes, @@ -23,12 +24,14 @@ describe("Personalization::DOM::getNonce", () => { afterEach(() => { selectNodes("#fooById").forEach(removeNode); }); - it("should return the nonce if defined", () => { testResetCachedNonce(); appendNode( document.head, - createNode("script", { id: "fooById", nonce: "123" }), + createNode("script", { + id: "fooById", + nonce: "123", + }), ); expect(getNonce()).toEqual("123"); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/getParent.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/getParent.spec.js index 41f64f9aa..61d15b720 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/getParent.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/getParent.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { afterEach, describe, it, expect } from "vitest"; import getParent from "../../../../../../../src/components/Personalization/dom-actions/dom/getParent.js"; import { selectNodes, @@ -24,16 +25,16 @@ describe("Personalization::DOM::getParent", () => { selectNodes("#parentId").forEach(removeNode); selectNodes("#childId").forEach(removeNode); }); - it("returns the parent node if exists", () => { - const parentNode = createNode("div", { id: "parentId" }); - const childNode = createNode("div", { id: "childId" }); - + const parentNode = createNode("div", { + id: "parentId", + }); + const childNode = createNode("div", { + id: "childId", + }); appendNode(parentNode, childNode); appendNode(document.head, parentNode); - const result = getParent(getElementById("childId")); - expect(result.tagName).toEqual("DIV"); expect(result.id).toEqual("parentId"); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/helperForEq.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/helperForEq.spec.js index 6147c03e3..686eac8ef 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/helperForEq.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/helperForEq.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { isNotEqSelector, splitWithEq, @@ -18,27 +19,20 @@ import { describe("Personalization::DOM::helperForEq::isNotEqSelector", () => { it("should match when no eq", () => { const selector = "#id"; - expect(isNotEqSelector(selector)).toEqual(true); }); - it("should not match when eq", () => { const selector = "#id:eq(0)"; - expect(isNotEqSelector(selector)).toEqual(false); }); }); - describe("Personalization::DOM::helperForEq::splitWithEq", () => { it("should split when no eq", () => { const selector = "#id"; - expect(splitWithEq(selector)).toEqual(["#id"]); }); - it("should split when eq", () => { const selector = "#id:eq(0)"; - expect(splitWithEq(selector)).toEqual(["#id", "0"]); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/insertAfter.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/insertAfter.spec.js index e7a89fc37..16dee8692 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/insertAfter.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/insertAfter.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { afterEach, describe, it, expect } from "vitest"; import insertAfter from "../../../../../../../src/components/Personalization/dom-actions/dom/insertAfter.js"; import { selectNodes, @@ -27,16 +28,17 @@ describe("Personalization::DOM::insertAfter", () => { selectNodes("#style1").forEach(removeNode); selectNodes("#style2").forEach(removeNode); }); - it("inserts a node after an element", () => { - const element1 = createNode("style", { id: "style1" }); - const element2 = createNode("style", { id: "style2" }); + const element1 = createNode("style", { + id: "style1", + }); + const element2 = createNode("style", { + id: "style2", + }); appendNode(document.head, element1); insertAfter(element1, element2); - const node1 = getElementById("style1"); const node2 = getNextSibling(node1); - expect(node2.id).toEqual("style2"); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/insertBefore.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/insertBefore.spec.js deleted file mode 100644 index d855f7fdf..000000000 --- a/test/unit/specs/components/Personalization/dom-actions/dom/insertBefore.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -/* -Copyright 2019 Adobe. All rights reserved. -This file is licensed to you 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 REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ - -// eslint-disable-next-line no-unused-vars -import insertBefore from "../../../../../../../src/components/Personalization/dom-actions/dom/insertBefore.js"; diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/isDomElement.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/isDomElement.spec.js index 24d1b08fa..23bff3ef1 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/isDomElement.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/isDomElement.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -19,7 +20,6 @@ import isDomElement from "../../../../../../../src/components/Personalization/do describe("Personalization::DOM::isDomElement", () => { const testElementId = "superfluous123"; - beforeEach(() => { const element = createNode("div", { id: testElementId, @@ -28,15 +28,12 @@ describe("Personalization::DOM::isDomElement", () => { element.innerHTML = "test element"; appendNode(document.body, element); }); - afterEach(() => { cleanUpDomChanges(testElementId); }); - it("validates dom element", () => { - expect(isDomElement(document.getElementById(testElementId))).toBeTrue(); + expect(isDomElement(document.getElementById(testElementId))).toBe(true); }); - it("validates not a dom element", () => { expect(isDomElement({}).toBeFalse); expect(isDomElement([]).toBeFalse); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/matchesSelectorWithEq.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/matchesSelectorWithEq.spec.js index f55ad1a5a..19ece12c8 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/matchesSelectorWithEq.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/matchesSelectorWithEq.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { afterEach, describe, it, expect } from "vitest"; import { createNode, appendNode, @@ -22,70 +23,68 @@ describe("Personalization::DOM::matchesSelectorWithEq", () => { afterEach(() => { selectNodes(".eq").forEach(removeNode); }); - it("should match when no eq", () => { - const node = createNode("DIV", { id: "noEq", class: "eq" }); - + const node = createNode("DIV", { + id: "noEq", + class: "eq", + }); appendNode(document.body, node); - const selector = "#noEq"; const element = document.getElementById("noEq"); const result = matchesSelectorWithEq(selector, element); - expect(result).toEqual(true); }); - it("should match when eq and just one element", () => { const content = `
    first
    second
    - +
    third
    `; const node = createNode( "DIV", - { id: "abc", class: "eq" }, + { + id: "abc", + class: "eq", + }, { innerHTML: content, }, ); - appendNode(document.body, node); - const selector = "#abc:eq(0) > div.b:eq(0) > div.c:eq(0)"; const element = document.getElementById("one"); const result = matchesSelectorWithEq(selector, element); - expect(result).toEqual(true); }); - it("should match when eq and multiple elements", () => { const content = `
    first
    second
    - +
    third
    `; - const node = createNode( "DIV", - { id: "abc", class: "eq" }, - { innerHTML: content }, + { + id: "abc", + class: "eq", + }, + { + innerHTML: content, + }, ); - appendNode(document.body, node); - const selector = "#abc:eq(0) > div.b:eq(0) > div.c"; const one = document.getElementById("one"); const two = document.getElementById("two"); const three = document.getElementById("three"); - expect(matchesSelectorWithEq(selector, one)).toEqual(true); expect(matchesSelectorWithEq(selector, two)).toEqual(true); expect(matchesSelectorWithEq(selector, three)).toEqual(true); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/removeAttribute.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/removeAttribute.spec.js index f895a417c..d39bd75a1 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/removeAttribute.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/removeAttribute.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { afterEach, describe, it, expect } from "vitest"; import removeAttribute from "../../../../../../../src/components/Personalization/dom-actions/dom/removeAttribute.js"; import { createNode, @@ -25,17 +26,15 @@ describe("Personalization::DOM::removeAttribute", () => { afterEach(() => { selectNodes("#fooId").forEach(removeNode); }); - it("should remove the element's attribute", () => { - const element = createNode("div", { id: "fooId" }); + const element = createNode("div", { + id: "fooId", + }); setAttribute(element, "data-foo", "dummyValue"); - const attr = getAttribute(element, "data-foo"); expect(attr).toEqual("dummyValue"); - removeAttribute(element, "data-foo"); const removedAttr = getAttribute(element, "data-foo"); - expect(removedAttr).toBeNull(); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/selectNodesWithEq.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/selectNodesWithEq.spec.js index 0839a6f6f..48afcd9ac 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/selectNodesWithEq.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/selectNodesWithEq.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { afterEach, describe, it, expect } from "vitest"; import { createNode, appendNode, @@ -25,66 +26,69 @@ import { describe("Personalization::DOM::escapeIdentifiersInSelector", () => { it("should escape when digits only for ID selector", () => { const result = escapeIdentifiersInSelector("#123 > #foo div.345"); - expect(result).toEqual("#\\31 23 > #foo div.\\33 45"); expect(document.querySelector(result)).toEqual(null); }); - it("should escape when digits only for class selector", () => { const result = escapeIdentifiersInSelector(".123"); - expect(result).toEqual(".\\31 23"); expect(document.querySelector(result)).toEqual(null); }); - it("should escape when hyphen and digits ID selector", () => { const result = escapeIdentifiersInSelector("#-123"); - expect(result).toEqual("#-\\31 23"); expect(document.querySelector(result)).toEqual(null); }); - it("should escape when hyphen and digits class selector", () => { const result = escapeIdentifiersInSelector(".-123"); - expect(result).toEqual(".-\\31 23"); expect(document.querySelector(result)).toEqual(null); }); }); - describe("Personalization::DOM::parseSelector", () => { it("should parse selector when no eq", () => { const result = parseSelector("#test"); - - expect(result[0]).toEqual({ sel: "#test" }); + expect(result[0]).toEqual({ + sel: "#test", + }); }); - it("should parse selector when eq", () => { const result = parseSelector( "HTML > BODY > DIV.wrapper:eq(0) > HEADER.header:eq(0) > DIV.pagehead:eq(0) > P:nth-of-type(1)", ); - - expect(result[0]).toEqual({ sel: "HTML > BODY > DIV.wrapper", eq: 0 }); - expect(result[1]).toEqual({ sel: " > HEADER.header", eq: 0 }); - expect(result[2]).toEqual({ sel: " > DIV.pagehead", eq: 0 }); - expect(result[3]).toEqual({ sel: " > P:nth-of-type(1)" }); + expect(result[0]).toEqual({ + sel: "HTML > BODY > DIV.wrapper", + eq: 0, + }); + expect(result[1]).toEqual({ + sel: " > HEADER.header", + eq: 0, + }); + expect(result[2]).toEqual({ + sel: " > DIV.pagehead", + eq: 0, + }); + expect(result[3]).toEqual({ + sel: " > P:nth-of-type(1)", + }); }); }); - describe("Personalization::DOM::selectNodesWithEq", () => { afterEach(() => { selectNodes(".eq").forEach(removeNode); }); - it("should select when no eq", () => { - appendNode(document.body, createNode("DIV", { id: "noEq", class: "eq" })); - + appendNode( + document.body, + createNode("DIV", { + id: "noEq", + class: "eq", + }), + ); const result = selectNodesWithEq("#noEq"); - expect(result[0].tagName).toEqual("DIV"); expect(result[0].id).toEqual("noEq"); }); - it("should select when eq and just one element", () => { const content = `
    @@ -95,18 +99,23 @@ describe("Personalization::DOM::selectNodesWithEq", () => {
    third
    `; - appendNode( document.body, - createNode("DIV", { id: "abc", class: "eq" }, { innerHTML: content }), + createNode( + "DIV", + { + id: "abc", + class: "eq", + }, + { + innerHTML: content, + }, + ), ); - const result = selectNodesWithEq("#abc:eq(0) > div.b:eq(0) > div.c:eq(0)"); - expect(result[0].tagName).toEqual("DIV"); expect(result[0].textContent).toEqual("first"); }); - it("should select when eq and multiple elements", () => { const content = `
    @@ -117,14 +126,20 @@ describe("Personalization::DOM::selectNodesWithEq", () => {
    third
    `; - appendNode( document.body, - createNode("DIV", { id: "abc", class: "eq" }, { innerHTML: content }), + createNode( + "DIV", + { + id: "abc", + class: "eq", + }, + { + innerHTML: content, + }, + ), ); - const result = selectNodesWithEq("#abc:eq(0) > div.b:eq(0) > div.c"); - expect(result[0].tagName).toEqual("DIV"); expect(result[0].textContent).toEqual("first"); expect(result[1].tagName).toEqual("DIV"); @@ -134,18 +149,26 @@ describe("Personalization::DOM::selectNodesWithEq", () => { }); it("should select when eq and no elements", () => { - appendNode(document.body, createNode("DIV", { id: "abc", class: "eq" })); - + appendNode( + document.body, + createNode("DIV", { + id: "abc", + class: "eq", + }), + ); const result = selectNodesWithEq("#abc:eq(0) > div.foo"); - expect(result.length).toEqual(0); }); it("should select when eq and eq greater than number of nodes", () => { - appendNode(document.body, createNode("DIV", { id: "abc", class: "eq" })); - + appendNode( + document.body, + createNode("DIV", { + id: "abc", + class: "eq", + }), + ); const result = selectNodesWithEq("#abc:eq(1)"); - expect(result.length).toEqual(0); }); @@ -158,22 +181,35 @@ describe("Personalization::DOM::selectNodesWithEq", () => {

    second

    `; - appendNode( document.body, - createNode("DIV", { id: "abc", class: "eq" }, { innerHTML: content }), + createNode( + "DIV", + { + id: "abc", + class: "eq", + }, + { + innerHTML: content, + }, + ), ); // NOTE: eq has zero based index, while nth-child index starts at 1 const resultWithEq = selectNodesWithEq("#abc > div p:eq(0)"); const resultWitNthChild = selectNodesWithEq("#abc > div :nth-child(1)"); - expect(resultWithEq.length).toEqual(1); expect(resultWitNthChild.length).toEqual(2); }); it("should show throw errors", () => { - appendNode(document.body, createNode("DIV", { id: "abc", class: "eq" })); + appendNode( + document.body, + createNode("DIV", { + id: "abc", + class: "eq", + }), + ); const selectors = [ "#abc:eq(bad)", diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/setAttribute.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/setAttribute.spec.js index c6130675a..9659540fd 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/setAttribute.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/setAttribute.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { afterEach, describe, it, expect } from "vitest"; import setAttribute from "../../../../../../../src/components/Personalization/dom-actions/dom/setAttribute.js"; import { createNode, @@ -22,13 +23,12 @@ describe("Personalization::DOM::setAttribute", () => { afterEach(() => { selectNodes("#fooId").forEach(removeNode); }); - it("should set the attribute for the element", () => { - const element = createNode("div", { id: "fooId" }); + const element = createNode("div", { + id: "fooId", + }); setAttribute(element, "foo-data", "dummyValue"); - const attr = getAttribute(element, "foo-data"); - expect(attr).toEqual("dummyValue"); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/setStyle.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/setStyle.spec.js index 5a352eda7..ab7b416e5 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/setStyle.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/setStyle.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { afterEach, describe, it, expect } from "vitest"; import setStyle from "../../../../../../../src/components/Personalization/dom-actions/dom/setStyle.js"; import { selectNodes, @@ -22,22 +23,20 @@ describe("Personalization::DOM::setStyle", () => { afterEach(() => { selectNodes("#fooDivId").forEach(removeNode); }); - it("sets style with priority to the element", () => { - const element = createNode("div", { id: "fooDivId" }); + const element = createNode("div", { + id: "fooDivId", + }); setStyle(element, "padding", "15px", "important"); - const style = getAttribute(element, "style"); - expect(style).toEqual("padding: 15px !important;"); }); - it("sets style to the element, without priority", () => { - const element = createNode("div", { id: "fooDivId" }); + const element = createNode("div", { + id: "fooDivId", + }); setStyle(element, "padding", "15px"); - const style = getAttribute(element, "style"); - expect(style).toEqual("padding: 15px;"); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/dom/util.spec.js b/test/unit/specs/components/Personalization/dom-actions/dom/util.spec.js index 35ed66f8e..84d7ca73b 100644 --- a/test/unit/specs/components/Personalization/dom-actions/dom/util.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/dom/util.spec.js @@ -10,20 +10,18 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { addPxIfMissing } from "../../../../../../../src/components/Personalization/dom-actions/dom/util.js"; describe("Personalization::DOM::util", () => { it("appends 'px' string if missing", () => { const value = "400"; const result = addPxIfMissing(value); - expect(result).toEqual("400px"); }); - it("does not append 'px' string if already present", () => { const value = "400px"; const result = addPxIfMissing(value); - expect(result).toEqual("400px"); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/images.spec.js b/test/unit/specs/components/Personalization/dom-actions/images.spec.js index 72ee289ac..62fc11ce8 100644 --- a/test/unit/specs/components/Personalization/dom-actions/images.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/images.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import cleanUpDomChanges from "../../../../helpers/cleanUpDomChanges.js"; import { createFragment, @@ -26,24 +27,21 @@ describe("Personalization::helper::images", () => { beforeEach(() => { cleanUpDomChanges("fooImage"); }); - afterEach(() => { cleanUpDomChanges("fooImage"); }); - it("should verify if it is an image", () => { const fragmentHTML = ""; const fragment = createFragment(fragmentHTML); const imageNode = getChildNodes(fragment)[0]; - - expect(isImage(fragment)).toBeFalse(); - expect(isImage(imageNode)).toBeTrue(); + expect(isImage(fragment)).toBe(false); + expect(isImage(imageNode)).toBe(true); }); - it("should create an image node", () => { const result = loadImage("http://foo.com"); - const image = createNode(IMG, { src: "http://foo.com" }); - + const image = createNode(IMG, { + src: "http://foo.com", + }); expect(result).toEqual(image); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/initDomActionsModules.spec.js b/test/unit/specs/components/Personalization/dom-actions/initDomActionsModules.spec.js index 18c1cb860..c7d813897 100644 --- a/test/unit/specs/components/Personalization/dom-actions/initDomActionsModules.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/initDomActionsModules.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import initDomActionsModules, { DOM_ACTION_APPEND_HTML, DOM_ACTION_CUSTOM_CODE, @@ -49,19 +50,14 @@ const buildSet = () => { result.add(DOM_ACTION_PREPEND_HTML); result.add(DOM_ACTION_APPEND_HTML); result.add(DOM_ACTION_COLLECT_INTERACTIONS); - return result; }; - const STANDARD_MODULES = buildSet(); - describe("Personalization::turbine::initDomActionsModules", () => { it("should have all the required modules", () => { const result = initDomActionsModules(() => {}); const keys = Object.keys(result); - expect(keys.length).toEqual(STANDARD_MODULES.size); - Object.keys(result).forEach((key) => { expect(STANDARD_MODULES.has(key)).toEqual(true); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/insertHtmlAfter.spec.js b/test/unit/specs/components/Personalization/dom-actions/insertHtmlAfter.spec.js index 5704cc9ef..725e3c8f1 100644 --- a/test/unit/specs/components/Personalization/dom-actions/insertHtmlAfter.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/insertHtmlAfter.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -26,44 +27,50 @@ import { DOM_ACTION_INSERT_AFTER } from "../../../../../../src/components/Person describe("Personalization::actions::insertAfter", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("insertAfter"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_INSERT_AFTER, }); }); - afterEach(() => { cleanUpDomChanges("insertAfter"); }); - it("should insert after personalized content", () => { const modules = initDomActionsModules(); const { insertAfter } = modules; const child = createNode( "div", - { id: "a", class: "ia" }, - { innerHTML: "AAA" }, + { + id: "a", + class: "ia", + }, + { + innerHTML: "AAA", + }, + ); + const element = createNode( + "div", + { + id: "insertAfter", + }, + {}, + [child], ); - const element = createNode("div", { id: "insertAfter" }, {}, [child]); - appendNode(document.body, element); - const settings = { selector: "#a", prehidingSelector: "#a", content: `
    BBB
    CCC
    `, - meta: { a: 1 }, + meta: { + a: 1, + }, }; - return insertAfter(settings, decorateProposition).then(() => { const result = selectNodes("div#insertAfter .ia"); - expect(result[0].innerHTML).toEqual("AAA"); expect(result[1].innerHTML).toEqual("BBB"); expect(result[2].innerHTML).toEqual("CCC"); - expect(getAttribute(result[1], CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", ); diff --git a/test/unit/specs/components/Personalization/dom-actions/insertHtmlBefore.spec.js b/test/unit/specs/components/Personalization/dom-actions/insertHtmlBefore.spec.js index 78421706b..2fbd245dd 100644 --- a/test/unit/specs/components/Personalization/dom-actions/insertHtmlBefore.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/insertHtmlBefore.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -26,42 +27,49 @@ import { DOM_ACTION_INSERT_BEFORE } from "../../../../../../src/components/Perso describe("Personalization::actions::insertBefore", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("insertBefore"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_INSERT_BEFORE, }); }); - afterEach(() => { cleanUpDomChanges("insertBefore"); }); - it("should insert before personalized content", () => { const modules = initDomActionsModules(); const { insertBefore } = modules; const child = createNode( "div", - { id: "a", class: "ib" }, - { innerHTML: "AAA" }, + { + id: "a", + class: "ib", + }, + { + innerHTML: "AAA", + }, + ); + const element = createNode( + "div", + { + id: "insertBefore", + }, + {}, + [child], ); - const element = createNode("div", { id: "insertBefore" }, {}, [child]); - appendNode(document.body, element); - const settings = { selector: "#a", prehidingSelector: "#a", content: `
    BBB
    `, - meta: { a: 1 }, + meta: { + a: 1, + }, }; - return insertBefore(settings, decorateProposition).then(() => { const [insertedElement, existingElement] = selectNodes( "div#insertBefore .ib", ); - expect(insertedElement.innerHTML).toEqual("BBB"); expect(getAttribute(insertedElement, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", @@ -69,7 +77,6 @@ describe("Personalization::actions::insertBefore", () => { expect( getAttribute(insertedElement, INTERACT_ID_DATA_ATTRIBUTE), ).not.toBeNull(); - expect(existingElement.innerHTML).toEqual("AAA"); expect( getAttribute(existingElement, INTERACT_ID_DATA_ATTRIBUTE), diff --git a/test/unit/specs/components/Personalization/dom-actions/move.spec.js b/test/unit/specs/components/Personalization/dom-actions/move.spec.js index 7547427c0..0bc901b6c 100644 --- a/test/unit/specs/components/Personalization/dom-actions/move.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/move.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -25,61 +26,63 @@ import { DOM_ACTION_MOVE } from "../../../../../../src/components/Personalizatio describe("Personalization::actions::move", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("move"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_MOVE, }); }); - afterEach(() => { cleanUpDomChanges("move"); }); - it("should move personalized content", () => { const modules = initDomActionsModules(); const { move } = modules; - const element = createNode("div", { id: "move" }); - + const element = createNode("div", { + id: "move", + }); appendNode(document.body, element); - const settings = { selector: "#move", prehidingSelector: "#move", - content: { left: "100px", top: "100px" }, - meta: { a: 1 }, + content: { + left: "100px", + top: "100px", + }, + meta: { + a: 1, + }, }; - move(settings, decorateProposition).then(() => { expect(element.style.left).toEqual("100px"); expect(element.style.top).toEqual("100px"); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", ); expect(getAttribute(element, INTERACT_ID_DATA_ATTRIBUTE)).not.toBeNull(); }); }); - it("should move personalized content even if coordinates are not properly formatted", () => { const modules = initDomActionsModules(); const { move } = modules; - const element = createNode("div", { id: "move" }); - + const element = createNode("div", { + id: "move", + }); appendNode(document.body, element); - const settings = { selector: "#move", prehidingSelector: "#move", - content: { left: "100", top: "100" }, - meta: { a: 1 }, + content: { + left: "100", + top: "100", + }, + meta: { + a: 1, + }, }; - move(settings, decorateProposition).then(() => { expect(element.style.left).toEqual("100px"); expect(element.style.top).toEqual("100px"); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", ); diff --git a/test/unit/specs/components/Personalization/dom-actions/prependHtml.spec.js b/test/unit/specs/components/Personalization/dom-actions/prependHtml.spec.js index d4ebcd260..61df8a2f0 100644 --- a/test/unit/specs/components/Personalization/dom-actions/prependHtml.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/prependHtml.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -26,40 +27,39 @@ import { DOM_ACTION_PREPEND_HTML } from "../../../../../../src/components/Person describe("Personalization::actions::prependHtml", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("prependHtml"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_PREPEND_HTML, }); }); - afterEach(() => { cleanUpDomChanges("prependHtml"); }); - it("should prepend personalized content", () => { const modules = initDomActionsModules(); const { prependHtml } = modules; const content = `
  • 3
  • `; const element = createNode( "ul", - { id: "prependHtml" }, - { innerHTML: content }, + { + id: "prependHtml", + }, + { + innerHTML: content, + }, ); - appendNode(document.body, element); - const settings = { selector: "#prependHtml", prehidingSelector: "#prependHtml", content: `
  • 1
  • 2
  • `, - meta: { a: 1 }, + meta: { + a: 1, + }, }; - return prependHtml(settings, decorateProposition).then(() => { const result = selectNodes("ul#prependHtml li"); - expect(result.length).toEqual(3); // first li (prepended) expect(result[0].innerHTML).toEqual("1"); diff --git a/test/unit/specs/components/Personalization/dom-actions/rearrangeChildren.spec.js b/test/unit/specs/components/Personalization/dom-actions/rearrangeChildren.spec.js index c85e09587..6fbe07a85 100644 --- a/test/unit/specs/components/Personalization/dom-actions/rearrangeChildren.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/rearrangeChildren.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -26,18 +27,15 @@ import { DOM_ACTION_REARRANGE } from "../../../../../../src/components/Personali describe("Personalization::actions::rearrange", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("rearrange"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_REARRANGE, }); }); - afterEach(() => { cleanUpDomChanges("rearrange"); }); - it("should rearrange elements when from < to", () => { const modules = initDomActionsModules(); const { rearrange } = modules; @@ -48,26 +46,30 @@ describe("Personalization::actions::rearrange", () => { `; const element = createNode( "ul", - { id: "rearrange" }, - { innerHTML: content }, + { + id: "rearrange", + }, + { + innerHTML: content, + }, ); - appendNode(document.body, element); - const settings = { selector: "#rearrange", prehidingSelector: "#rearrange", - content: { from: 0, to: 2 }, - meta: { a: 1 }, + content: { + from: 0, + to: 2, + }, + meta: { + a: 1, + }, }; - return rearrange(settings, decorateProposition).then(() => { const result = selectNodes("li"); - expect(result[0].textContent).toEqual("2"); expect(getAttribute(result[0], CLICK_LABEL_DATA_ATTRIBUTE)).toBeNull(); expect(getAttribute(result[0], INTERACT_ID_DATA_ATTRIBUTE)).toBeNull(); - expect(result[1].textContent).toEqual("3"); expect(getAttribute(result[1], CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", @@ -75,7 +77,6 @@ describe("Personalization::actions::rearrange", () => { expect( getAttribute(result[1], INTERACT_ID_DATA_ATTRIBUTE), ).not.toBeNull(); - expect(result[2].textContent).toEqual("1"); expect(getAttribute(result[2], CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", @@ -85,7 +86,6 @@ describe("Personalization::actions::rearrange", () => { ).not.toBeNull(); }); }); - it("should rearrange elements when from > to", () => { const modules = initDomActionsModules(); const { rearrange } = modules; @@ -96,22 +96,27 @@ describe("Personalization::actions::rearrange", () => { `; const element = createNode( "ul", - { id: "rearrange" }, - { innerHTML: content }, + { + id: "rearrange", + }, + { + innerHTML: content, + }, ); - appendNode(document.body, element); - const settings = { selector: "#rearrange", prehidingSelector: "#rearrange", - content: { from: 2, to: 0 }, - meta: { a: 1 }, + content: { + from: 2, + to: 0, + }, + meta: { + a: 1, + }, }; - return rearrange(settings, decorateProposition).then(() => { const result = selectNodes("li"); - expect(result[0].textContent).toEqual("3"); expect(result[1].textContent).toEqual("1"); expect(result[2].textContent).toEqual("2"); diff --git a/test/unit/specs/components/Personalization/dom-actions/remapCustomCodeOffers.spec.js b/test/unit/specs/components/Personalization/dom-actions/remapCustomCodeOffers.spec.js index f4a1a210c..fa8ce9189 100644 --- a/test/unit/specs/components/Personalization/dom-actions/remapCustomCodeOffers.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/remapCustomCodeOffers.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import remapCustomCodeOffers from "../../../../../../src/components/Personalization/dom-actions/remapCustomCodeOffers.js"; describe("remapCustomCodeOffers", () => { @@ -26,7 +27,6 @@ describe("remapCustomCodeOffers", () => { selector: "BODY", }); }); - it("does not change selector if non-standard", () => { expect( remapCustomCodeOffers({ @@ -40,7 +40,6 @@ describe("remapCustomCodeOffers", () => { selector: ".whoopie", }); }); - it("only handles customCode type", () => { expect( remapCustomCodeOffers({ diff --git a/test/unit/specs/components/Personalization/dom-actions/remove.spec.js b/test/unit/specs/components/Personalization/dom-actions/remove.spec.js index ccb2dbfb9..ccc057869 100644 --- a/test/unit/specs/components/Personalization/dom-actions/remove.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/remove.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -21,35 +22,38 @@ import { DOM_ACTION_REMOVE } from "../../../../../../src/components/Personalizat describe("Personalization::actions::remove", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("remove"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_REMOVE, }); }); - afterEach(() => { cleanUpDomChanges("remove"); }); - it("should remove element", () => { const modules = initDomActionsModules(); const { remove } = modules; const content = `
    `; - const element = createNode("div", { id: "remove" }, { innerHTML: content }); - + const element = createNode( + "div", + { + id: "remove", + }, + { + innerHTML: content, + }, + ); appendNode(document.body, element); - const settings = { selector: "#remove", prehidingSelector: "#remove", - meta: { a: 1 }, + meta: { + a: 1, + }, }; - return remove(settings, decorateProposition).then(() => { const result = selectNodes("#child"); - expect(result.length).toEqual(0); }); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/replaceHtml.spec.js b/test/unit/specs/components/Personalization/dom-actions/replaceHtml.spec.js index bdd6b1e9c..d0ba848da 100644 --- a/test/unit/specs/components/Personalization/dom-actions/replaceHtml.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/replaceHtml.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -26,43 +27,49 @@ import { DOM_ACTION_REPLACE_HTML } from "../../../../../../src/components/Person describe("Personalization::actions::replaceHtml", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("replaceHtml"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_REPLACE_HTML, }); }); - afterEach(() => { cleanUpDomChanges("replaceHtml"); }); - it("should replace element with personalized content", () => { const modules = initDomActionsModules(); const { replaceHtml } = modules; const child = createNode( "div", - { id: "a", class: "rh" }, - { innerHTML: "AAA" }, + { + id: "a", + class: "rh", + }, + { + innerHTML: "AAA", + }, + ); + const element = createNode( + "div", + { + id: "replaceHtml", + }, + {}, + [child], ); - const element = createNode("div", { id: "replaceHtml" }, {}, [child]); - appendNode(document.body, element); - const settings = { selector: "#a", prehidingSelector: "#a", content: `
    BBB
    `, - meta: { a: 1 }, + meta: { + a: 1, + }, }; - return replaceHtml(settings, decorateProposition).then(() => { const result = selectNodes("div#replaceHtml .rh"); - expect(result.length).toEqual(1); expect(result[0].innerHTML).toEqual("BBB"); - expect(getAttribute(result[0], CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", ); diff --git a/test/unit/specs/components/Personalization/dom-actions/resize.spec.js b/test/unit/specs/components/Personalization/dom-actions/resize.spec.js index f212bd18b..80cf9d001 100644 --- a/test/unit/specs/components/Personalization/dom-actions/resize.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/resize.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -25,61 +26,63 @@ import { DOM_ACTION_RESIZE } from "../../../../../../src/components/Personalizat describe("Personalization::actions::resize", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("resize"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_RESIZE, }); }); - afterEach(() => { cleanUpDomChanges("resize"); }); - it("should resize personalized content", () => { const modules = initDomActionsModules(); const { resize } = modules; - const element = createNode("div", { id: "resize" }); - + const element = createNode("div", { + id: "resize", + }); appendNode(document.body, element); - const settings = { selector: "#resize", prehidingSelector: "#resize", - content: { width: "100px", height: "100px" }, - meta: { a: 1 }, + content: { + width: "100px", + height: "100px", + }, + meta: { + a: 1, + }, }; - return resize(settings, decorateProposition).then(() => { expect(element.style.width).toEqual("100px"); expect(element.style.height).toEqual("100px"); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", ); expect(getAttribute(element, INTERACT_ID_DATA_ATTRIBUTE)).not.toBeNull(); }); }); - it("should resize personalized content even if dimensions are not properly formatted", () => { const modules = initDomActionsModules(); const { resize } = modules; - const element = createNode("div", { id: "resize" }); - + const element = createNode("div", { + id: "resize", + }); appendNode(document.body, element); - const settings = { selector: "#resize", prehidingSelector: "#resize", - content: { width: "100", height: "100" }, - meta: { a: 1 }, + content: { + width: "100", + height: "100", + }, + meta: { + a: 1, + }, }; - return resize(settings, decorateProposition).then(() => { expect(element.style.width).toEqual("100px"); expect(element.style.height).toEqual("100px"); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", ); diff --git a/test/unit/specs/components/Personalization/dom-actions/scripts.spec.js b/test/unit/specs/components/Personalization/dom-actions/scripts.spec.js index 3e5b83235..1f3578d7d 100644 --- a/test/unit/specs/components/Personalization/dom-actions/scripts.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/scripts.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, afterEach, describe, it, expect } from "vitest"; import { getInlineScripts, getRemoteScriptsUrls, @@ -24,59 +25,47 @@ describe("Personalization::helper::scripts", () => { beforeEach(() => { cleanUpDomChanges("fooDiv"); }); - afterEach(() => { cleanUpDomChanges("fooDiv"); }); - it("should get an inline script", () => { const fragmentHTML = ""; const fragment = createFragment(fragmentHTML); - const inlineScripts = getInlineScripts(fragment); expect(inlineScripts.length).toEqual(1); }); - it("should return null if inlineScript doesn't have text code", () => { const fragmentHTML = ""; const fragment = createFragment(fragmentHTML); - const inlineScripts = getInlineScripts(fragment); expect(inlineScripts.length).toEqual(0); }); - it("should get a remote script", () => { const fragmentHTML = "
    "; const fragment = createFragment(fragmentHTML); const remoteScripts = getRemoteScriptsUrls(fragment); - expect(remoteScripts.length).toEqual(1); expect(remoteScripts[0]).toEqual("http://foo.com"); }); - it("should get a empty array if remote script doesn't have url attr", () => { const fragmentHTML = "
    "; const fragment = createFragment(fragmentHTML); const remoteScripts = getRemoteScriptsUrls(fragment); - expect(remoteScripts.length).toEqual(0); }); - it("should execute inline script", () => { const fragmentHTML = ""; const fragment = createFragment(fragmentHTML); const inlineScripts = getInlineScripts(fragment); const container = createNode(DIV); - spyOn(container, "appendChild").and.callThrough(); - spyOn(container, "removeChild").and.callThrough(); - + vi.spyOn(container, "appendChild"); + vi.spyOn(container, "removeChild"); executeInlineScripts(container, inlineScripts); - expect(container.appendChild).toHaveBeenCalledWith(inlineScripts[0]); expect(container.removeChild).toHaveBeenCalledWith(inlineScripts[0]); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/setAttributes.spec.js b/test/unit/specs/components/Personalization/dom-actions/setAttributes.spec.js index 94305b318..36d66cc06 100644 --- a/test/unit/specs/components/Personalization/dom-actions/setAttributes.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/setAttributes.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -25,35 +26,34 @@ import { DOM_ACTION_SET_ATTRIBUTE } from "../../../../../../src/components/Perso describe("Personalization::actions::setAttribute", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("setAttribute"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_SET_ATTRIBUTE, }); }); - afterEach(() => { cleanUpDomChanges("setAttribute"); }); - it("should set element attribute", () => { const modules = initDomActionsModules(); const { setAttribute } = modules; - const element = createNode("div", { id: "setAttribute" }); - + const element = createNode("div", { + id: "setAttribute", + }); appendNode(document.body, element); - const settings = { selector: "#setAttribute", prehidingSelector: "#setAttribute", - content: { "data-test": "bar" }, - meta: { a: 1 }, + content: { + "data-test": "bar", + }, + meta: { + a: 1, + }, }; - return setAttribute(settings, decorateProposition).then(() => { expect(element.getAttribute("data-test")).toEqual("bar"); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", ); diff --git a/test/unit/specs/components/Personalization/dom-actions/setHtml.spec.js b/test/unit/specs/components/Personalization/dom-actions/setHtml.spec.js index 186e73da6..855361b01 100644 --- a/test/unit/specs/components/Personalization/dom-actions/setHtml.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/setHtml.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -26,81 +27,76 @@ import { DOM_ACTION_SET_HTML } from "../../../../../../src/components/Personaliz describe("Personalization::actions::setHtml", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("setHtml"); delete window.someEvar123; - decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_SET_HTML, }); }); - afterEach(() => { cleanUpDomChanges("setHtml"); cleanUpDomChanges("btn"); delete window.someEvar123; }); - it("should set personalized content", async () => { const modules = initDomActionsModules(); const { setHtml } = modules; - const element = createNode("div", { id: "setHtml" }); + const element = createNode("div", { + id: "setHtml", + }); element.innerHTML = "foo"; - appendNode(document.body, element); - const settings = { selector: "#setHtml", prehidingSelector: "#setHtml", content: "bar", - meta: { a: 1 }, + meta: { + a: 1, + }, }; - await setHtml(settings, decorateProposition); expect(element.innerHTML).toEqual("bar"); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", ); expect(getAttribute(element, INTERACT_ID_DATA_ATTRIBUTE)).not.toBeNull(); }); - it("should execute inline JavaScript", async () => { const modules = initDomActionsModules(); const { setHtml } = modules; - const element = createNode("div", { id: "setHtml" }); + const element = createNode("div", { + id: "setHtml", + }); element.innerHTML = "foo"; - appendNode(document.body, element); - const settings = { selector: "#setHtml", prehidingSelector: "#setHtml", content: "", - meta: { a: 1 }, + meta: { + a: 1, + }, }; - await setHtml(settings, decorateProposition); await pause(501); - expect(window.someEvar123).toEqual(1); - const scriptElements = document.querySelectorAll("#evar123"); expect(scriptElements.length).toEqual(1); }); - it("should execute inline JavaScript with event listeners", async () => { const modules = initDomActionsModules(); const { setHtml } = modules; - const button = createNode("button", { id: "btn" }); - const element = createNode("div", { id: "setHtml" }); + const button = createNode("button", { + id: "btn", + }); + const element = createNode("div", { + id: "setHtml", + }); element.innerHTML = "foo"; - appendNode(document.body, button); appendNode(document.body, element); - const settings = { selector: "#setHtml", prehidingSelector: "#setHtml", @@ -108,11 +104,11 @@ describe("Personalization::actions::setHtml", () => { var btn = document.getElementById('btn'); btn.addEventListener('click', function onEvent() { window.someEvar123 = 2; }); `, - meta: { a: 1 }, + meta: { + a: 1, + }, }; - await setHtml(settings, decorateProposition); - button.click(); expect(window.someEvar123).toEqual(2); }); diff --git a/test/unit/specs/components/Personalization/dom-actions/setImageSource.spec.js b/test/unit/specs/components/Personalization/dom-actions/setImageSource.spec.js index e07c83045..01bb7f649 100644 --- a/test/unit/specs/components/Personalization/dom-actions/setImageSource.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/setImageSource.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -25,36 +26,34 @@ import { DOM_ACTION_SET_IMAGE_SOURCE } from "../../../../../../src/components/Pe describe("Personalization::actions::setImageSource", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("setImageSource"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_SET_IMAGE_SOURCE, }); }); - afterEach(() => { cleanUpDomChanges("setImageSource"); }); - it("should swap image", () => { const url = "http://foo.com/a.png"; const modules = initDomActionsModules(); const { setImageSource } = modules; - const element = createNode("img", { id: "setImageSource", src: url }); - + const element = createNode("img", { + id: "setImageSource", + src: url, + }); appendNode(document.body, element); - const settings = { selector: "#setImageSource", prehidingSelector: "#setImageSource", content: "http://foo.com/b.png", - meta: { a: 1 }, + meta: { + a: 1, + }, }; - return setImageSource(settings, decorateProposition).then(() => { expect(element.getAttribute("src")).toEqual("http://foo.com/b.png"); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", ); diff --git a/test/unit/specs/components/Personalization/dom-actions/setStyles.spec.js b/test/unit/specs/components/Personalization/dom-actions/setStyles.spec.js index d2ae0ce65..d6596f4af 100644 --- a/test/unit/specs/components/Personalization/dom-actions/setStyles.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/setStyles.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -25,35 +26,35 @@ import { DOM_ACTION_SET_STYLE } from "../../../../../../src/components/Personali describe("Personalization::actions::setStyle", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("setStyle"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_SET_STYLE, }); }); - afterEach(() => { cleanUpDomChanges("setStyle"); }); - it("should set styles", () => { const modules = initDomActionsModules(); const { setStyle } = modules; - const element = createNode("div", { id: "setStyle" }); - + const element = createNode("div", { + id: "setStyle", + }); appendNode(document.body, element); - const settings = { selector: "#setStyle", prehidingSelector: "#setStyle", - content: { "font-size": "33px", priority: "important" }, - meta: { a: 1 }, + content: { + "font-size": "33px", + priority: "important", + }, + meta: { + a: 1, + }, }; - return setStyle(settings, decorateProposition).then(() => { expect(element.style.getPropertyValue("font-size")).toEqual("33px"); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", ); diff --git a/test/unit/specs/components/Personalization/dom-actions/setText.spec.js b/test/unit/specs/components/Personalization/dom-actions/setText.spec.js index 55d2a8aa5..5cdf688b6 100644 --- a/test/unit/specs/components/Personalization/dom-actions/setText.spec.js +++ b/test/unit/specs/components/Personalization/dom-actions/setText.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -25,35 +26,33 @@ import { DOM_ACTION_SET_TEXT } from "../../../../../../src/components/Personaliz describe("Personalization::actions::setText", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("setText"); decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_SET_TEXT, }); }); - afterEach(() => { cleanUpDomChanges("setText"); }); - it("should set personalized text", async () => { const itemData = { type: "setText", selector: "#setText", prehidingSelector: "#setText", content: "bar", - meta: { a: 1 }, + meta: { + a: 1, + }, }; - const modules = initDomActionsModules(); const { setText } = modules; - const element = createNode("div", { id: "setText" }); + const element = createNode("div", { + id: "setText", + }); element.textContent = "foo"; appendNode(document.body, element); - await setText(itemData, decorateProposition); - expect(element.textContent).toEqual("bar"); expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "trackingLabel", diff --git a/test/unit/specs/components/Personalization/dom-actions/swapImage.spec.js b/test/unit/specs/components/Personalization/dom-actions/swapImage.spec.js deleted file mode 100644 index ed8e3500c..000000000 --- a/test/unit/specs/components/Personalization/dom-actions/swapImage.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -/* -Copyright 2019 Adobe. All rights reserved. -This file is licensed to you 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 REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ - -// eslint-disable-next-line no-unused-vars -import swapImage from "../../../../../../src/components/Personalization/dom-actions/swapImage.js"; diff --git a/test/unit/specs/components/Personalization/flicker/index.spec.js b/test/unit/specs/components/Personalization/flicker/index.spec.js index cb4709e05..63172c304 100644 --- a/test/unit/specs/components/Personalization/flicker/index.spec.js +++ b/test/unit/specs/components/Personalization/flicker/index.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { selectNodes, removeNode, @@ -22,35 +23,24 @@ describe("Personalization::flicker", () => { beforeEach(() => { selectNodes("style").forEach(removeNode); }); - afterEach(() => { selectNodes("style").forEach(removeNode); }); - it("should add prehiding style tags", () => { const prehidingSelector = ".add"; - hideElements(prehidingSelector); - const styles = selectNodes("style"); - expect(styles.length).toEqual(1); - const styleDefinition = styles[0].textContent; - expect(styleDefinition).toEqual( `${prehidingSelector} { visibility: hidden }`, ); }); - it("should remove prehiding style tags", () => { const prehidingSelector = ".remove"; - hideElements(prehidingSelector); showElements(prehidingSelector); - const styles = selectNodes("style"); - expect(styles.length).toEqual(0); }); }); diff --git a/test/unit/specs/components/Personalization/handlers/createDecorateProposition.spec.js b/test/unit/specs/components/Personalization/handlers/createDecorateProposition.spec.js index 5aa6ca1b5..a3de34c1b 100644 --- a/test/unit/specs/components/Personalization/handlers/createDecorateProposition.spec.js +++ b/test/unit/specs/components/Personalization/handlers/createDecorateProposition.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { CLICK_LABEL_DATA_ATTRIBUTE, INTERACT_ID_DATA_ATTRIBUTE, @@ -35,36 +36,33 @@ import { describe("Personalization::createDecorateProposition", () => { let decorateProposition; - beforeEach(() => { cleanUpDomChanges("something"); }); - afterEach(() => { cleanUpDomChanges("something"); }); - it("sets a data-attribute for interact id and label", () => { decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_CLICK, trackingLabel: "myTrackingLabel", }); - const element = createNode( "div", - { id: "something" }, - { innerText: "superfluous" }, + { + id: "something", + }, + { + innerText: "superfluous", + }, ); appendNode(document.body, element); - decorateProposition(element); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "myTrackingLabel", ); expect(getAttribute(element, INTERACT_ID_DATA_ATTRIBUTE)).not.toBeNull(); }); - it("sets a data-attribute for interact id and label when autoCollectPropositionInteractions=decoratedElementsOnly", () => { decorateProposition = createDecoratePropositionForTest({ autoCollectPropositionInteractions: { @@ -74,62 +72,63 @@ describe("Personalization::createDecorateProposition", () => { type: DOM_ACTION_CLICK, trackingLabel: "myTrackingLabel", }); - const element = createNode( "div", - { id: "something" }, - { innerText: "superfluous" }, + { + id: "something", + }, + { + innerText: "superfluous", + }, ); appendNode(document.body, element); - decorateProposition(element); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "myTrackingLabel", ); expect(getAttribute(element, INTERACT_ID_DATA_ATTRIBUTE)).not.toBeNull(); }); - it("does not set a data-attribute for label if no label is specified", () => { decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_CLICK, trackingLabel: null, }); - const element = createNode( "div", - { id: "something" }, - { innerText: "superfluous" }, + { + id: "something", + }, + { + innerText: "superfluous", + }, ); appendNode(document.body, element); - decorateProposition(element); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toBeNull(); expect(getAttribute(element, INTERACT_ID_DATA_ATTRIBUTE)).not.toBeNull(); }); - it("reuses interact ids when one is already present on an element", () => { const element = createNode( "div", - { id: "something" }, - { innerText: "superfluous" }, + { + id: "something", + }, + { + innerText: "superfluous", + }, ); appendNode(document.body, element); - decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_CLICK, itemId: "itemId1", trackingLabel: "myTrackingLabel", }); decorateProposition(element); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "myTrackingLabel", ); const interactId = getAttribute(element, INTERACT_ID_DATA_ATTRIBUTE); expect(interactId).not.toBeNull(); - decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_CLICK, itemId: "itemId2", @@ -141,25 +140,23 @@ describe("Personalization::createDecorateProposition", () => { expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "myTrackingLabel", ); - expect(getAttribute(element, INTERACT_ID_DATA_ATTRIBUTE)).toEqual( interactId, ); }); - it("provides a unique interact id for each element", () => { const element = createNode( "div", - { id: "something" }, + { + id: "something", + }, { innerHTML: "
  • one
  • two
  • three
  • ", }, ); appendNode(document.body, element); - const interactIds = new Set(); - ["one", "two", "three"].forEach((value, idx) => { decorateProposition = createDecoratePropositionForTest({ type: DOM_ACTION_CLICK, @@ -169,43 +166,42 @@ describe("Personalization::createDecorateProposition", () => { notification: { id: `notifyId${idx}`, scope: "web://mywebsite.com", - scopeDetails: { something: true }, + scopeDetails: { + something: true, + }, }, }); const li = document.querySelector(`#something .${value}`); decorateProposition(li); - expect(getAttribute(li, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( `trackingLabel${value}`, ); const interactId = getAttribute(li, INTERACT_ID_DATA_ATTRIBUTE); expect(interactId).not.toBeNull(); - interactIds.add(interactId); }); expect(interactIds.size).toEqual(3); }); - it("does not set data-attribute for interact id and label if autoCollectPropositionInteractions does not include the appropriate decisionProvider and dom action is not 'click'", () => { decorateProposition = createDecoratePropositionForTest({ autoCollectPropositionInteractions: {}, type: DOM_ACTION_SET_HTML, trackingLabel: "myTrackingLabel", }); - const element = createNode( "div", - { id: "something" }, - { innerText: "superfluous" }, + { + id: "something", + }, + { + innerText: "superfluous", + }, ); appendNode(document.body, element); - decorateProposition(element); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toBeNull(); expect(getAttribute(element, INTERACT_ID_DATA_ATTRIBUTE)).toBeNull(); }); - it("does not set data-attribute for interact id and label if autoCollectPropositionInteractions does not include the appropriate decisionProvider and dom action is not 'click'", () => { decorateProposition = createDecoratePropositionForTest({ autoCollectPropositionInteractions: { @@ -215,36 +211,37 @@ describe("Personalization::createDecorateProposition", () => { type: DOM_ACTION_SET_HTML, trackingLabel: "myTrackingLabel", }); - const element = createNode( "div", - { id: "something" }, - { innerText: "superfluous" }, + { + id: "something", + }, + { + innerText: "superfluous", + }, ); appendNode(document.body, element); - decorateProposition(element); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toBeNull(); expect(getAttribute(element, INTERACT_ID_DATA_ATTRIBUTE)).toBeNull(); }); - it("sets data-attribute for interact id and label for all 'click' dom actions, regardless of autoCollectPropositionInteractions", () => { decorateProposition = createDecoratePropositionForTest({ autoCollectPropositionInteractions: {}, type: DOM_ACTION_CLICK, trackingLabel: "myTrackingLabel", }); - const element = createNode( "div", - { id: "something" }, - { innerText: "superfluous" }, + { + id: "something", + }, + { + innerText: "superfluous", + }, ); appendNode(document.body, element); - decorateProposition(element); - expect(getAttribute(element, CLICK_LABEL_DATA_ATTRIBUTE)).toEqual( "myTrackingLabel", ); diff --git a/test/unit/specs/components/Personalization/handlers/createProcessDomAction.spec.js b/test/unit/specs/components/Personalization/handlers/createProcessDomAction.spec.js index d39d8c3b6..27a3baba7 100644 --- a/test/unit/specs/components/Personalization/handlers/createProcessDomAction.spec.js +++ b/test/unit/specs/components/Personalization/handlers/createProcessDomAction.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, afterEach, describe, it, expect } from "vitest"; import createProcessDomAction from "../../../../../../src/components/Personalization/handlers/createProcessDomAction.js"; import cleanUpDomChanges from "../../../../helpers/cleanUpDomChanges.js"; import { @@ -32,18 +33,17 @@ describe("createProcessDomAction", () => { let storeInteractionMeta; let storeClickMeta; let processDomAction; - beforeEach(() => { cleanUpDomChanges("click-element"); - modules = { - typeA: jasmine.createSpy("typeA"), - typeB: jasmine.createSpy("typeB"), + typeA: vi.fn(), + typeB: vi.fn(), }; - logger = jasmine.createSpyObj("logger", ["warn"]); - storeInteractionMeta = jasmine.createSpy("storeInteractionMeta"); - storeClickMeta = jasmine.createSpy("storeClickMeta"); - + logger = { + warn: vi.fn(), + }; + storeInteractionMeta = vi.fn(); + storeClickMeta = vi.fn(); processDomAction = createProcessDomAction({ modules, logger, @@ -55,17 +55,14 @@ describe("createProcessDomAction", () => { }, }); }); - afterEach(() => { cleanUpDomChanges("click-element"); }); - it("returns an empty object if the item has no data, and logs missing type", () => { const proposition = createMockProposition({ schema: DOM_ACTION, data: undefined, }); - expect(processDomAction(proposition.getItems()[0])).toEqual({ setRenderAttempted: false, includeInNotification: false, @@ -75,7 +72,6 @@ describe("createProcessDomAction", () => { undefined, ); }); - it("returns an empty object if the item has no type, and logs missing type", () => { const proposition = createMockProposition({ schema: DOM_ACTION, @@ -90,11 +86,12 @@ describe("createProcessDomAction", () => { {}, ); }); - it("returns an empty object if the item has an unknown type, and logs unknown type", () => { const proposition = createMockProposition({ schema: DOM_ACTION, - data: { type: "typeC" }, + data: { + type: "typeC", + }, }); expect(processDomAction(proposition.getItems()[0])).toEqual({ setRenderAttempted: false, @@ -107,11 +104,12 @@ describe("createProcessDomAction", () => { }, ); }); - it("returns an empty object if the item has no selector for a click type, and logs missing selector", () => { const proposition = createMockProposition({ schema: DOM_ACTION, - data: { type: "click" }, + data: { + type: "click", + }, }); expect(processDomAction(proposition.getItems()[0])).toEqual({ setRenderAttempted: false, @@ -124,7 +122,6 @@ describe("createProcessDomAction", () => { }, ); }); - it("handles a click type", async () => { const element = createNode("div", { id: "click-element", @@ -132,12 +129,14 @@ describe("createProcessDomAction", () => { }); element.innerHTML = "click element"; appendNode(document.body, element); - const proposition = createMockProposition( { id: "itemId", schema: DOM_ACTION, - data: { type: "click", selector: ".click-element" }, + data: { + type: "click", + selector: ".click-element", + }, characteristics: { trackingLabel: "mytrackinglabel", }, @@ -150,12 +149,10 @@ describe("createProcessDomAction", () => { }, ); const clickAction = processDomAction(proposition.getItems()[0]); - expect(clickAction).toEqual({ setRenderAttempted: true, includeInNotification: false, }); - expect(storeInteractionMeta).not.toHaveBeenCalled(); expect(storeClickMeta).toHaveBeenCalledWith({ selector: ".click-element", @@ -174,23 +171,28 @@ describe("createProcessDomAction", () => { }, }); }); - it("handles a non-click known type", () => { const proposition = createMockProposition({ schema: DOM_ACTION, - data: { type: "typeA", a: "b" }, + data: { + type: "typeA", + a: "b", + }, }); const result = processDomAction(proposition.getItems()[0]); expect(result).toEqual({ - render: jasmine.any(Function), + render: expect.any(Function), setRenderAttempted: true, includeInNotification: true, }); expect(modules.typeA).not.toHaveBeenCalled(); result.render(); expect(modules.typeA).toHaveBeenCalledWith( - { type: "typeA", a: "b" }, - jasmine.any(Function), + { + type: "typeA", + a: "b", + }, + expect.any(Function), ); }); }); diff --git a/test/unit/specs/components/Personalization/handlers/createProcessHtmlContent.spec.js b/test/unit/specs/components/Personalization/handlers/createProcessHtmlContent.spec.js index c0da602d8..2ffd7f873 100644 --- a/test/unit/specs/components/Personalization/handlers/createProcessHtmlContent.spec.js +++ b/test/unit/specs/components/Personalization/handlers/createProcessHtmlContent.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import { ADOBE_JOURNEY_OPTIMIZER, ADOBE_TARGET, @@ -26,16 +27,15 @@ describe("createProcessHtmlContent", () => { let modules; let logger; let processHtmlContent; - beforeEach(() => { const { storeInteractionMeta } = createInteractionStorage(); - modules = { - typeA: jasmine.createSpy("typeA"), - typeB: jasmine.createSpy("typeB"), + typeA: vi.fn(), + typeB: vi.fn(), + }; + logger = { + warn: vi.fn(), }; - logger = jasmine.createSpyObj("logger", ["warn"]); - processHtmlContent = createProcessHtmlContent({ modules, logger, @@ -46,46 +46,43 @@ describe("createProcessHtmlContent", () => { }, }); }); - it("returns an empty object if the item has no data", () => { const proposition = createMockProposition({ schema: HTML_CONTENT_ITEM, data: undefined, }); - expect(processHtmlContent(proposition.getItems()[0])).toEqual({ setRenderAttempted: false, includeInNotification: false, }); expect(logger.warn).not.toHaveBeenCalled(); }); - it("returns an empty object if the item has no type", () => { const proposition = createMockProposition({ schema: HTML_CONTENT_ITEM, - data: { selector: ".myselector" }, + data: { + selector: ".myselector", + }, }); - expect(processHtmlContent(proposition.getItems()[0])).toEqual({ setRenderAttempted: false, includeInNotification: false, }); expect(logger.warn).not.toHaveBeenCalled(); }); - it("returns an empty object if the item has no selector", () => { const proposition = createMockProposition({ schema: HTML_CONTENT_ITEM, - data: { type: "mytype" }, + data: { + type: "mytype", + }, }); - expect(processHtmlContent(proposition.getItems()[0])).toEqual({ setRenderAttempted: false, includeInNotification: false, }); expect(logger.warn).not.toHaveBeenCalled(); }); - it("returns an empty object if the item has an unknown type, and logs unknown type", () => { const proposition = createMockProposition({ schema: HTML_CONTENT_ITEM, @@ -95,7 +92,6 @@ describe("createProcessHtmlContent", () => { content: "mycontent", }, }); - expect(processHtmlContent(proposition.getItems()[0])).toEqual({ setRenderAttempted: false, includeInNotification: false, @@ -106,7 +102,6 @@ describe("createProcessHtmlContent", () => { content: "mycontent", }); }); - it("handles a known type", () => { const proposition = createMockProposition({ schema: HTML_CONTENT_ITEM, @@ -116,10 +111,9 @@ describe("createProcessHtmlContent", () => { content: "mycontent", }, }); - const result = processHtmlContent(proposition.getItems()[0]); expect(result).toEqual({ - render: jasmine.any(Function), + render: expect.any(Function), setRenderAttempted: true, includeInNotification: true, }); @@ -131,7 +125,7 @@ describe("createProcessHtmlContent", () => { selector: ".myselector", content: "mycontent", }, - jasmine.any(Function), + expect.any(Function), ); }); }); diff --git a/test/unit/specs/components/Personalization/handlers/createProcessInAppMessage.spec.js b/test/unit/specs/components/Personalization/handlers/createProcessInAppMessage.spec.js index eb6445e25..7db4b5242 100644 --- a/test/unit/specs/components/Personalization/handlers/createProcessInAppMessage.spec.js +++ b/test/unit/specs/components/Personalization/handlers/createProcessInAppMessage.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createProcessInAppMessage from "../../../../../../src/components/Personalization/handlers/createProcessInAppMessage.js"; describe("Personalization::handlers::createProcessInAppMessage", () => { @@ -18,7 +19,6 @@ describe("Personalization::handlers::createProcessInAppMessage", () => { let modules; let logger; let processInAppMessage; - beforeEach(() => { item = { getData() { @@ -32,16 +32,16 @@ describe("Personalization::handlers::createProcessInAppMessage", () => { }, }; modules = { - defaultContent: jasmine.createSpy("defaultContent"), + defaultContent: vi.fn(), + }; + logger = { + warn: vi.fn(), }; - logger = jasmine.createSpyObj("logger", ["warn"]); - processInAppMessage = createProcessInAppMessage({ modules, logger, }); }); - it("returns an empty object if the item has no data, and logs missing type", () => { data = undefined; expect(processInAppMessage(item)).toEqual({}); @@ -50,16 +50,16 @@ describe("Personalization::handlers::createProcessInAppMessage", () => { undefined, ); }); - it("returns an empty object if the item has an unknown type, and logs unknown type", () => { - data = { type: "wtf" }; + data = { + type: "wtf", + }; expect(processInAppMessage(item)).toEqual({}); expect(logger.warn).toHaveBeenCalledWith( "Invalid in-app message data: unknown type.", data, ); }); - it("handles a valid in app message type", () => { meta = { id: "abc", @@ -89,18 +89,19 @@ describe("Personalization::handlers::createProcessInAppMessage", () => { contentType: "text/html", qualifiedDate: 1694731987996, }; - const result = processInAppMessage(item); expect(result).toEqual({ - render: jasmine.any(Function), + render: expect.any(Function), setRenderAttempted: true, includeInNotification: true, }); expect(modules.defaultContent).not.toHaveBeenCalled(); result.render(); - expect(modules.defaultContent).toHaveBeenCalledWith({ ...data, meta }); + expect(modules.defaultContent).toHaveBeenCalledWith({ + ...data, + meta, + }); }); - it("handles an invalid in app message type, and logs", () => { meta = { id: "abc", @@ -129,7 +130,6 @@ describe("Personalization::handlers::createProcessInAppMessage", () => { contentType: "text/html", qualifiedDate: 1694731987996, }; - expect(processInAppMessage(item)).toEqual({}); expect(logger.warn).toHaveBeenCalledWith( "Invalid in-app message data: missing property 'content'.", diff --git a/test/unit/specs/components/Personalization/handlers/createProcessPropositions.spec.js b/test/unit/specs/components/Personalization/handlers/createProcessPropositions.spec.js index 88183414b..4d8cfef5d 100644 --- a/test/unit/specs/components/Personalization/handlers/createProcessPropositions.spec.js +++ b/test/unit/specs/components/Personalization/handlers/createProcessPropositions.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createProcessPropositions from "../../../../../../src/components/Personalization/handlers/createProcessPropositions.js"; import injectCreateProposition from "../../../../../../src/components/Personalization/handlers/injectCreateProposition.js"; @@ -17,16 +18,14 @@ describe("createProcessPropositions", () => { let logger; let createProposition; let processPropositions; - let render; let always; let noNotification; let never; let noRender; let redirect; - beforeEach(() => { - render = jasmine.createSpy("render").and.returnValue(Promise.resolve()); + render = vi.fn().mockReturnValue(Promise.resolve()); always = (item) => ({ render: () => render(item.getData()), setRenderAttempted: true, @@ -47,13 +46,18 @@ describe("createProcessPropositions", () => { setRenderAttempted: true, onlyRenderThis: true, }); - - schemaProcessors = { always, noNotification, never, noRender, redirect }; - logger = jasmine.createSpyObj("logger", [ - "info", - "error", - "logOnContentRendering", - ]); + schemaProcessors = { + always, + noNotification, + never, + noRender, + redirect, + }; + logger = { + info: vi.fn(), + error: vi.fn(), + logOnContentRendering: vi.fn(), + }; processPropositions = createProcessPropositions({ schemaProcessors, logger, @@ -63,34 +67,46 @@ describe("createProcessPropositions", () => { isPageWideSurface: () => false, }); }); - it("handles no propositions", async () => { const result = processPropositions([]); expect(result).toEqual({ - render: jasmine.any(Function), + render: expect.any(Function), returnedPropositions: [], returnedDecisions: [], }); await expect(logger.logOnContentRendering).not.toHaveBeenCalled(); - await expectAsync(result.render()).toBeResolvedTo([]); + await expect(result.render()).resolves.toStrictEqual([]); }); - it("processes a proposition with an always item", async () => { const prop1 = createProposition({ id: "always1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "always", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "always", + data: "mydata", + }, + ], }); const result = processPropositions([prop1]); expect(result).toEqual({ - render: jasmine.any(Function), + render: expect.any(Function), returnedPropositions: [ { id: "always1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "always", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "always", + data: "mydata", + }, + ], renderAttempted: true, }, ], @@ -98,32 +114,47 @@ describe("createProcessPropositions", () => { }); await expect(logger.logOnContentRendering).not.toHaveBeenCalled(); expect(render).not.toHaveBeenCalled(); - await expectAsync(result.render()).toBeResolvedTo([ + await expect(result.render()).resolves.toStrictEqual([ { id: "always1", scope: "myscope", - scopeDetails: { a: 1 }, + scopeDetails: { + a: 1, + }, }, ]); expect(render).toHaveBeenCalledWith("mydata"); }); - it("processes a proposition with a noNotification item", async () => { const prop1 = createProposition({ id: "noNotification1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "noNotification", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "noNotification", + data: "mydata", + }, + ], }); const result = processPropositions([prop1]); expect(result).toEqual({ - render: jasmine.any(Function), + render: expect.any(Function), returnedPropositions: [ { id: "noNotification1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "noNotification", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "noNotification", + data: "mydata", + }, + ], renderAttempted: true, }, ], @@ -131,26 +162,39 @@ describe("createProcessPropositions", () => { }); await expect(logger.logOnContentRendering).not.toHaveBeenCalled(); expect(render).not.toHaveBeenCalled(); - await expectAsync(result.render()).toBeResolvedTo([]); + await expect(result.render()).resolves.toStrictEqual([]); expect(render).toHaveBeenCalledWith("mydata"); }); - it("processes a proposition with a never item", async () => { const prop1 = createProposition({ id: "never1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "never", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "never", + data: "mydata", + }, + ], }); const result = processPropositions([prop1]); expect(result).toEqual({ - render: jasmine.any(Function), + render: expect.any(Function), returnedPropositions: [ { id: "never1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "never", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "never", + data: "mydata", + }, + ], renderAttempted: false, }, ], @@ -158,64 +202,99 @@ describe("createProcessPropositions", () => { { id: "never1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "never", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "never", + data: "mydata", + }, + ], }, ], }); await expect(logger.logOnContentRendering).not.toHaveBeenCalled(); - await expectAsync(result.render()).toBeResolvedTo([]); + await expect(result.render()).resolves.toStrictEqual([]); expect(render).not.toHaveBeenCalled(); }); - it("processes a proposition with a noRender item", async () => { const prop1 = createProposition({ id: "noRender1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "noRender", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "noRender", + data: "mydata", + }, + ], }); const result = processPropositions([prop1]); expect(result).toEqual({ - render: jasmine.any(Function), + render: expect.any(Function), returnedPropositions: [ { id: "noRender1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "noRender", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "noRender", + data: "mydata", + }, + ], renderAttempted: true, }, ], returnedDecisions: [], }); await expect(logger.logOnContentRendering).not.toHaveBeenCalled(); - await expectAsync(result.render()).toBeResolvedTo([ + await expect(result.render()).resolves.toStrictEqual([ { id: "noRender1", scope: "myscope", - scopeDetails: { a: 1 }, + scopeDetails: { + a: 1, + }, }, ]); expect(render).not.toHaveBeenCalled(); }); - it("processes a proposition with a redirect item", async () => { const prop1 = createProposition({ id: "redirect1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "redirect", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "redirect", + data: "mydata", + }, + ], }); const result = processPropositions([prop1]); expect(result).toEqual({ - render: jasmine.any(Function), + render: expect.any(Function), returnedPropositions: [ { id: "redirect1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "redirect", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "redirect", + data: "mydata", + }, + ], renderAttempted: true, }, ], @@ -223,53 +302,93 @@ describe("createProcessPropositions", () => { }); await expect(logger.logOnContentRendering).not.toHaveBeenCalled(); expect(render).not.toHaveBeenCalled(); - await expectAsync(result.render()).toBeResolvedTo([]); + await expect(result.render()).resolves.toStrictEqual([]); expect(render).toHaveBeenCalledWith("mydata"); }); - it("doesn't render other propositions if one has a redirect", async () => { const prop1 = createProposition({ id: "always1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "always", data: "mydata1" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "always", + data: "mydata1", + }, + ], }); const prop2 = createProposition({ id: "redirect2", scope: "myscope", - scopeDetails: { a: 2 }, - items: [{ schema: "redirect", data: "mydata2" }], + scopeDetails: { + a: 2, + }, + items: [ + { + schema: "redirect", + data: "mydata2", + }, + ], }); const prop3 = createProposition({ id: "always3", scope: "myscope", - scopeDetails: { a: 3 }, - items: [{ schema: "always", data: "mydata3" }], + scopeDetails: { + a: 3, + }, + items: [ + { + schema: "always", + data: "mydata3", + }, + ], }); const result = processPropositions([prop1, prop2, prop3]); - expect(result).toEqual({ - render: jasmine.any(Function), + render: expect.any(Function), returnedPropositions: [ { id: "redirect2", scope: "myscope", - scopeDetails: { a: 2 }, - items: [{ schema: "redirect", data: "mydata2" }], + scopeDetails: { + a: 2, + }, + items: [ + { + schema: "redirect", + data: "mydata2", + }, + ], renderAttempted: true, }, { id: "always1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "always", data: "mydata1" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "always", + data: "mydata1", + }, + ], renderAttempted: false, }, { id: "always3", scope: "myscope", - scopeDetails: { a: 3 }, - items: [{ schema: "always", data: "mydata3" }], + scopeDetails: { + a: 3, + }, + items: [ + { + schema: "always", + data: "mydata3", + }, + ], renderAttempted: false, }, ], @@ -277,39 +396,66 @@ describe("createProcessPropositions", () => { { id: "always1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "always", data: "mydata1" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "always", + data: "mydata1", + }, + ], }, { id: "always3", scope: "myscope", - scopeDetails: { a: 3 }, - items: [{ schema: "always", data: "mydata3" }], + scopeDetails: { + a: 3, + }, + items: [ + { + schema: "always", + data: "mydata3", + }, + ], }, ], }); await expect(logger.logOnContentRendering).not.toHaveBeenCalled(); expect(render).not.toHaveBeenCalled(); - await expectAsync(result.render()).toBeResolvedTo([]); + await expect(result.render()).resolves.toStrictEqual([]); expect(render).toHaveBeenCalledWith("mydata2"); }); - it("processes nonRenderPropositions", async () => { const prop1 = createProposition({ id: "always1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "always", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "always", + data: "mydata", + }, + ], }); const result = processPropositions([], [prop1]); expect(result).toEqual({ - render: jasmine.any(Function), + render: expect.any(Function), returnedPropositions: [ { id: "always1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "always", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "always", + data: "mydata", + }, + ], renderAttempted: false, }, ], @@ -317,13 +463,20 @@ describe("createProcessPropositions", () => { { id: "always1", scope: "myscope", - scopeDetails: { a: 1 }, - items: [{ schema: "always", data: "mydata" }], + scopeDetails: { + a: 1, + }, + items: [ + { + schema: "always", + data: "mydata", + }, + ], }, ], }); - await expect(logger.logOnContentRendering).not.toHaveBeenCalled(); - await expectAsync(result.render()).toBeResolvedTo([]); + expect(logger.logOnContentRendering).not.toHaveBeenCalled(); + await expect(result.render()).resolves.toStrictEqual([]); expect(render).not.toHaveBeenCalled(); }); }); diff --git a/test/unit/specs/components/Personalization/handlers/createProcessRedirect.spec.js b/test/unit/specs/components/Personalization/handlers/createProcessRedirect.spec.js index 31436d704..57225aee1 100644 --- a/test/unit/specs/components/Personalization/handlers/createProcessRedirect.spec.js +++ b/test/unit/specs/components/Personalization/handlers/createProcessRedirect.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import { defer } from "../../../../../../src/utils/index.js"; import flushPromiseChains from "../../../../helpers/flushPromiseChains.js"; import createProcessRedirect from "../../../../../../src/components/Personalization/handlers/createProcessRedirect.js"; @@ -22,16 +23,15 @@ describe("createProcessRedirect", () => { let data; let proposition; let meta; - let processRedirect; - beforeEach(() => { - logger = jasmine.createSpyObj("logger", ["warn", "logOnContentRendering"]); - executeRedirect = jasmine.createSpy("executeRedirect"); + logger = { + warn: vi.fn(), + logOnContentRendering: vi.fn(), + }; + executeRedirect = vi.fn(); collectDefer = defer(); - collect = jasmine - .createSpy("collect") - .and.returnValue(collectDefer.promise); + collect = vi.fn().mockReturnValue(collectDefer.promise); proposition = { getNotification() { return meta; @@ -45,14 +45,12 @@ describe("createProcessRedirect", () => { return proposition; }, }; - processRedirect = createProcessRedirect({ logger, executeRedirect, collect, }); }); - it("returns an empty object if the item has no data", () => { data = undefined; expect(processRedirect(item)).toEqual({}); @@ -61,20 +59,24 @@ describe("createProcessRedirect", () => { undefined, ); }); - it("returns an empty object if the item has no content", () => { - data = { a: 1 }; + data = { + a: 1, + }; expect(processRedirect(item)).toEqual({}); expect(logger.logOnContentRendering).not.toHaveBeenCalled(); - expect(logger.warn).toHaveBeenCalledWith("Invalid Redirect data", { a: 1 }); + expect(logger.warn).toHaveBeenCalledWith("Invalid Redirect data", { + a: 1, + }); }); - it("redirects", async () => { - data = { content: "mycontent" }; + data = { + content: "mycontent", + }; meta = "mymetavalue"; const result = processRedirect(item); expect(result).toEqual({ - render: jasmine.any(Function), + render: expect.any(Function), setRenderAttempted: true, onlyRenderThis: true, }); @@ -93,14 +95,15 @@ describe("createProcessRedirect", () => { expect(executeRedirect).toHaveBeenCalledWith("mycontent"); expect(await renderPromise).toBeUndefined(); }); - it("doesn't eat the exception", async () => { - data = { content: "mycontent" }; + data = { + content: "mycontent", + }; meta = "mymetavalue"; const result = processRedirect(item); const renderPromise = result.render(); collectDefer.reject("myerror"); expect(logger.logOnContentRendering).not.toHaveBeenCalled(); - await expectAsync(renderPromise).toBeRejectedWith("myerror"); + await expect(renderPromise).rejects.toThrowError("myerror"); }); }); diff --git a/test/unit/specs/components/Personalization/handlers/injectCreateProposition.spec.js b/test/unit/specs/components/Personalization/handlers/injectCreateProposition.spec.js index ba06288a7..9acb42322 100644 --- a/test/unit/specs/components/Personalization/handlers/injectCreateProposition.spec.js +++ b/test/unit/specs/components/Personalization/handlers/injectCreateProposition.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import injectCreateProposition from "../../../../../../src/components/Personalization/handlers/injectCreateProposition.js"; describe("injectCreateProposition", () => { @@ -18,10 +19,8 @@ describe("injectCreateProposition", () => { preprocess, isPageWideSurface, }); - it("creates a proposition from nothing", () => { const proposition = createProposition({}); - expect(proposition.getScope()).toBeUndefined(); expect(proposition.getScopeType()).toEqual("proposition"); expect(proposition.getItems()).toEqual([]); @@ -32,21 +31,25 @@ describe("injectCreateProposition", () => { }); expect(proposition.toJSON()).toEqual({}); }); - it("creates a full proposition", () => { const proposition = createProposition({ id: "id", scope: "scope", - scopeDetails: { characteristics: { scopeType: "view" } }, + scopeDetails: { + characteristics: { + scopeType: "view", + }, + }, items: [ { schema: "schema", data: "data", - characteristics: { trackingLabel: "trackingLabel" }, + characteristics: { + trackingLabel: "trackingLabel", + }, }, ], }); - expect(proposition.getScope()).toEqual("scope"); expect(proposition.getScopeType()).toEqual("view"); const item = proposition.getItems()[0]; @@ -57,22 +60,26 @@ describe("injectCreateProposition", () => { expect(item.getOriginalItem()).toEqual({ schema: "schema", data: "data", - characteristics: { trackingLabel: "trackingLabel" }, + characteristics: { + trackingLabel: "trackingLabel", + }, }); expect(proposition.getNotification()).toEqual({ id: "id", scope: "scope", - scopeDetails: { characteristics: { scopeType: "view" } }, + scopeDetails: { + characteristics: { + scopeType: "view", + }, + }, }); }); - it("creates a page wide surface proposition", () => { const proposition = createProposition({ scope: "__surface__", }); expect(proposition.getScopeType()).toEqual("page"); }); - it("creates a page wide scope proposition", () => { const proposition = createProposition({ scope: "__view__", diff --git a/test/unit/specs/components/Personalization/handlers/processDefaultContent.spec.js b/test/unit/specs/components/Personalization/handlers/processDefaultContent.spec.js index 99aa61302..5f506352f 100644 --- a/test/unit/specs/components/Personalization/handlers/processDefaultContent.spec.js +++ b/test/unit/specs/components/Personalization/handlers/processDefaultContent.spec.js @@ -9,13 +9,14 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import processDefaultContent from "../../../../../../src/components/Personalization/handlers/processDefaultContent.js"; describe("processDefaultContent", () => { it("always renders the default content", () => { const result = processDefaultContent(); expect(result).toEqual({ - render: jasmine.any(Function), + render: expect.any(Function), setRenderAttempted: true, includeInNotification: true, }); diff --git a/test/unit/specs/components/Personalization/in-app-message-actions/actions/displayIframeContent.spec.js b/test/unit/specs/components/Personalization/in-app-message-actions/actions/displayIframeContent.spec.js index 3fc871fe7..9adb2ccd4 100644 --- a/test/unit/specs/components/Personalization/in-app-message-actions/actions/displayIframeContent.spec.js +++ b/test/unit/specs/components/Personalization/in-app-message-actions/actions/displayIframeContent.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, afterEach, describe, it, expect } from "vitest"; import { buildStyleFromMobileParameters, createIframe, @@ -26,7 +27,6 @@ describe("DOM Actions on Iframe", () => { cleanUpDomChanges("alloy-overlay-container"); cleanUpDomChanges("alloy-content-iframe"); }); - afterEach(() => { cleanUpDomChanges("alloy-messaging-container"); cleanUpDomChanges("alloy-overlay-container"); @@ -56,19 +56,16 @@ describe("DOM Actions on Iframe", () => { expect(style.height).toBe("60vh"); }); }); - describe("createIframe function", () => { it("should create an iframe element with specified properties", () => { const mockHtmlContent = '\u003c!doctype html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n \u003ctitle\u003eBumper Sale!\u003c/title\u003e\\n \u003cstyle\u003e\\n body {\\n margin: 0;\\n padding: 0;\\n font-family: Arial, sans-serif;\\n }\\n\\n #announcement {\\n position: fixed;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n background-color: rgba(0, 0, 0, 0.8);\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n color: #fff;\\n }\\n\\n #announcement img {\\n max-width: 80%;\\n height: auto;\\n margin-bottom: 20px;\\n }\\n\\n #cross {\\n position: absolute;\\n top: 10px;\\n right: 10px;\\n cursor: pointer;\\n font-size: 24px;\\n color: #fff;\\n }\\n\\n #buttons {\\n display: flex;\\n justify-content: center;\\n margin-top: 20px;\\n }\\n\\n #buttons a {\\n margin: 0 10px;\\n padding: 10px 20px;\\n background-color: #ff5500;\\n color: #fff;\\n text-decoration: none;\\n border-radius: 4px;\\n font-weight: bold;\\n transition: background-color 0.3s ease;\\n }\\n\\n #buttons a:hover {\\n background-color: #ff3300;\\n }\\n \u003c/style\u003e\\n\u003c/head\u003e\\n\u003cbody\u003e\\n\u003cdiv id\u003d"announcement" class\u003d"fullscreen"\u003e\\n \u003cspan id\u003d"cross" class\u003d"dismiss"\u003e✕\u003c/span\u003e\\n \u003ch2\u003eBlack Friday Sale!\u003c/h2\u003e\\n \u003cimg src\u003d"https://source.unsplash.com/800x600/?technology,gadget" alt\u003d"Technology Image"\u003e\\n \u003cp\u003eDon\u0027t miss out on our incredible discounts and deals at our gadgets!\u003c/p\u003e\\n \u003cdiv id\u003d"buttons"\u003e\\n \u003ca class\u003d"forward" href\u003d"http://localhost:3000/"\u003eShop\u003c/a\u003e\\n \u003ca class\u003d"dismiss"\u003eDismiss\u003c/a\u003e\\n \u003c/div\u003e\\n\u003c/div\u003e\\n\\n\u003c/body\u003e\u003c/html\u003e\\n'; - const mockClickHandler = jasmine.createSpy("clickHandler"); - + const mockClickHandler = vi.fn(); const iframe = createIframe(mockHtmlContent, mockClickHandler); expect(iframe).toBeDefined(); expect(iframe instanceof HTMLIFrameElement).toBe(true); expect(iframe.src).toContain("blob:"); }); - it("should set 'nonce' attribute on script tag if it exists", async () => { const mockHtmlContentWithScript = "\n" + @@ -103,41 +100,32 @@ describe("DOM Actions on Iframe", () => { "\n" + "\n" + "\n"; - testResetCachedNonce(); - const childElement = document.createElement("div"); childElement.setAttribute("nonce", "12345"); const parentElement = document.createElement("div"); parentElement.appendChild(childElement); const originalGetNonce = getNonce(parentElement); - - const mockClickHandler = jasmine.createSpy("clickHandler"); + const mockClickHandler = vi.fn(); const iframe = createIframe(mockHtmlContentWithScript, mockClickHandler); - const blob = await fetch(iframe.src).then((r) => r.blob()); const text = await blob.text(); const parser = new DOMParser(); const iframeDocument = parser.parseFromString(text, TEXT_HTML); - const scriptTag = iframeDocument.querySelector("script"); expect(scriptTag).toBeDefined(); expect(scriptTag.getAttribute("nonce")).toEqual(originalGetNonce); }); }); - describe("createIframeClickHandler", () => { let container; let mockedInteract; let mobileParameters; - beforeEach(() => { container = document.createElement("div"); container.setAttribute("id", "alloy-messaging-container"); document.body.appendChild(container); - - mockedInteract = jasmine.createSpy("interact"); - + mockedInteract = vi.fn(); mobileParameters = { verticalAlign: "center", width: 80, @@ -149,17 +137,14 @@ describe("DOM Actions on Iframe", () => { verticalInset: 10, }; }); - it("should remove display message when dismiss is clicked and UI takeover is false", () => { Object.assign(mobileParameters, { uiTakeover: false, }); - const anchor = document.createElement("a"); anchor.setAttribute("data-uuid", "12345"); anchor.href = "adbinapp://dismiss?interaction=cancel"; anchor.innerText = "Cancel"; - const mockEvent = { target: anchor, preventDefault: () => {}, @@ -170,7 +155,7 @@ describe("DOM Actions on Iframe", () => { const alloyMessagingContainer = document.getElementById( "alloy-messaging-container", ); - expect(mockedInteract).toHaveBeenCalledOnceWith("dismiss", { + expect(mockedInteract).toHaveBeenNthCalledWith(1, "dismiss", { label: "Cancel", id: "cancel", uuid: "12345", @@ -178,22 +163,17 @@ describe("DOM Actions on Iframe", () => { }); expect(alloyMessagingContainer).toBeNull(); }); - it("should remove display message when dismiss is clicked and Ui takeover is true", () => { Object.assign(mobileParameters, { uiTakeover: true, }); - const overlayContainer = document.createElement("div"); overlayContainer.setAttribute("id", "alloy-overlay-container"); - document.body.appendChild(overlayContainer); - const anchor = document.createElement("a"); anchor.setAttribute("data-uuid", "54321"); anchor.href = "adbinapp://dismiss?interaction=cancel"; anchor.innerText = "Aloha"; - const mockEvent = { target: anchor, preventDefault: () => {}, @@ -204,28 +184,24 @@ describe("DOM Actions on Iframe", () => { const overlayContainerAfterDismissal = document.getElementById( "alloy-overlay-container", ); - expect(mockedInteract).toHaveBeenCalledOnceWith("dismiss", { + expect(mockedInteract).toHaveBeenNthCalledWith(1, "dismiss", { label: "Aloha", id: "cancel", uuid: "54321", link: "", }); - expect(overlayContainerAfterDismissal).toBeNull(); }); - it("extracts propositionAction details from anchor tag and sends to interact()", () => { - const mockNavigateToUrl = jasmine.createSpy("mockNavigateToUrl"); + const mockNavigateToUrl = vi.fn(); Object.assign(mobileParameters, { uiTakeover: true, }); - const anchor = document.createElement("a"); anchor.setAttribute("data-uuid", "blippi"); anchor.href = "adbinapp://dismiss?interaction=accept&link=https%3A%2F%2Fwww.google.com"; anchor.innerText = "Woof"; - const mockEvent = { target: anchor, preventDefault: () => {}, @@ -239,54 +215,50 @@ describe("DOM Actions on Iframe", () => { const overlayContainerAfterDismissal = document.getElementById( "alloy-overlay-container", ); - expect(mockedInteract).toHaveBeenCalledOnceWith("dismiss", { + expect(mockedInteract).toHaveBeenNthCalledWith(1, "dismiss", { label: "Woof", id: "accept", uuid: "blippi", link: "https://www.google.com", }); - expect(mockNavigateToUrl).toHaveBeenCalledOnceWith( + expect(mockNavigateToUrl).toHaveBeenNthCalledWith( + 1, "https://www.google.com", true, ); expect(overlayContainerAfterDismissal).toBeNull(); }); }); - describe("displayHTMLContentInIframe", () => { let originalAppendChild; let originalBodyStyle; let mockCollect; let originalCreateIframe; - beforeEach(() => { - mockCollect = jasmine.createSpy("collect"); + mockCollect = vi.fn(); originalAppendChild = document.body.appendChild; - document.body.appendChild = jasmine.createSpy("appendChild"); + document.body.appendChild = vi.fn(); originalBodyStyle = document.body.style; document.body.style = {}; originalCreateIframe = window.createIframe; - - window.createIframe = jasmine - .createSpy("createIframe") - .and.callFake(() => { - const element = document.createElement("iframe"); - element.id = "alloy-content-iframe"; - return element; - }); + window.createIframe = vi.fn().mockImplementation(() => { + const element = document.createElement("iframe"); + element.id = "alloy-content-iframe"; + return element; + }); }); - afterEach(() => { document.body.appendChild = originalAppendChild; document.body.style = originalBodyStyle; document.body.innerHTML = ""; window.createIframe = originalCreateIframe; }); - it("should display HTML content in iframe with overlay using mobile parameters", () => { const settings = { type: "custom", - webParameters: { info: "this is a placeholder" }, + webParameters: { + info: "this is a placeholder", + }, mobileParameters: { verticalAlign: "center", dismissAnimation: "bottom", @@ -322,12 +294,9 @@ describe("DOM Actions on Iframe", () => { }, }, }; - displayHTMLContentInIframe(settings, mockCollect); - expect(document.body.appendChild).toHaveBeenCalledTimes(2); }); - it("should display HTML content in iframe with overlay using web parameters", () => { const settings = { webParameters: { @@ -387,7 +356,6 @@ describe("DOM Actions on Iframe", () => { contentType: TEXT_HTML, schema: "https://ns.adobe.com/personalization/message/in-app", }; - displayHTMLContentInIframe(settings, mockCollect); expect(document.body.appendChild).toHaveBeenCalledTimes(2); }); @@ -450,7 +418,6 @@ describe("DOM Actions on Iframe", () => { contentType: TEXT_HTML, schema: "https://ns.adobe.com/personalization/message/in-app", }; - displayHTMLContentInIframe(settings, mockCollect); expect(document.body.appendChild).toHaveBeenCalledTimes(1); }); diff --git a/test/unit/specs/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.spec.js b/test/unit/specs/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.spec.js index 0767a148b..e761018ff 100644 --- a/test/unit/specs/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.spec.js +++ b/test/unit/specs/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.spec.js @@ -10,18 +10,16 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import initInAppMessageActionsModules from "../../../../../../src/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js"; describe("Personalization::turbine::initInAppMessageActionsModules", () => { const noop = () => undefined; - it("should have all the required modules", () => { const messagingActionsModules = initInAppMessageActionsModules(noop); - expect(Object.keys(messagingActionsModules).length).toEqual(1); - expect(messagingActionsModules.defaultContent).toEqual( - jasmine.any(Function), + expect.any(Function), ); }); }); diff --git a/test/unit/specs/components/Personalization/in-app-message-actions/utils.spec.js b/test/unit/specs/components/Personalization/in-app-message-actions/utils.spec.js index 485d2a645..82100afa3 100644 --- a/test/unit/specs/components/Personalization/in-app-message-actions/utils.spec.js +++ b/test/unit/specs/components/Personalization/in-app-message-actions/utils.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import { removeElementById } from "../../../../../../src/components/Personalization/in-app-message-actions/utils.js"; describe("removeElementById", () => { @@ -18,23 +19,16 @@ describe("removeElementById", () => {
    `; }); - it("should remove an element when it exists", () => { const elementId = "test-element"; const element = document.getElementById(elementId); - expect(element).toBeTruthy(); - removeElementById(elementId); - expect(document.getElementById(elementId)).toBeNull(); }); - it("should do nothing when the element does not exist", () => { const nonExistentId = "non-existent-element"; - removeElementById(nonExistentId); - expect(document.getElementById(nonExistentId)).toBeNull(); }); }); diff --git a/test/unit/specs/components/Personalization/responsesMock/eventResponses.js b/test/unit/specs/components/Personalization/responsesMock/eventResponses.js index d056d6e40..b27f2a59a 100644 --- a/test/unit/specs/components/Personalization/responsesMock/eventResponses.js +++ b/test/unit/specs/components/Personalization/responsesMock/eventResponses.js @@ -58,7 +58,6 @@ export const SCOPES_FOO1_FOO2_DECISIONS = [ ], }, ]; - export const PAGE_WIDE_SCOPE_DECISIONS = [ { id: "TNT:activity1:experience1", @@ -156,7 +155,6 @@ export const PAGE_WIDE_SCOPE_DECISIONS_WITHOUT_DOM_ACTION_SCHEMA_ITEMS = [ ], }, ]; - export const PAGE_WIDE_DECISIONS_WITH_DOM_ACTION_SCHEMA_ITEMS = [ { id: "TNT:activity1:experience1", @@ -215,7 +213,6 @@ export const PAGE_WIDE_DECISIONS_WITH_DOM_ACTION_SCHEMA_ITEMS = [ ], }, ]; - export const CART_VIEW_DECISIONS = [ { id: "TNT:activity4:experience9", @@ -330,7 +327,6 @@ export const MERGED_METRIC_DECISIONS = [ ], }, ]; - export const MIXED_PROPOSITIONS = [ { id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn0=", diff --git a/test/unit/specs/components/Personalization/topLevel/buildAlloy.js b/test/unit/specs/components/Personalization/topLevel/buildAlloy.js index 81a8554b0..7f2cb38e7 100644 --- a/test/unit/specs/components/Personalization/topLevel/buildAlloy.js +++ b/test/unit/specs/components/Personalization/topLevel/buildAlloy.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi } from "vitest"; import createEvent from "../../../../../../src/core/createEvent.js"; import flushPromiseChains from "../../../../helpers/flushPromiseChains.js"; import createComponent from "../../../../../../src/components/Personalization/createComponent.js"; @@ -67,7 +68,6 @@ const createAction = } return renderFunc(selector, content); }; - const buildComponent = ({ actions, config, @@ -98,29 +98,28 @@ const buildComponent = ({ [DOM_ACTION_CLICK]: createAction(actions.click), }; }; - const { targetMigrationEnabled, prehidingStyle, autoCollectPropositionInteractions, } = config; - const collect = createCollect({ eventManager, mergeDecisionsMeta }); - + const collect = createCollect({ + eventManager, + mergeDecisionsMeta, + }); const { storeInteractionMeta, getInteractionMetas } = createInteractionStorage(); - const { storeClickMeta, getClickSelectors, getClickMetas } = createClickStorage(); - const preprocess = (action) => action; const createProposition = injectCreateProposition({ preprocess, isPageWideSurface, }); - - const viewCache = createViewCacheManager({ createProposition }); + const viewCache = createViewCacheManager({ + createProposition, + }); const modules = initDomActionsModulesMocks(); - const schemaProcessors = { [schema.DEFAULT_CONTENT_ITEM]: processDefaultContent, [schema.DOM_ACTION]: createProcessDomAction({ @@ -142,21 +141,22 @@ const buildComponent = ({ collect, }), }; - const processPropositions = createProcessPropositions({ schemaProcessors, logger, }); - const renderedPropositions = createAsyncArray(); const notificationHandler = createNotificationHandler( collect, renderedPropositions, ); - - const consent = jasmine.createSpyObj("consent", ["current"]); - consent.current.and.returnValue({ state: "in", wasSet: false }); - + const consent = { + current: vi.fn(), + }; + consent.current.mockReturnValue({ + state: "in", + wasSet: false, + }); const fetchDataHandler = createFetchDataHandler({ logger, prehidingStyle, @@ -176,7 +176,6 @@ const buildComponent = ({ getClickMetas, getClickSelectors, }); - const viewChangeHandler = createViewChangeHandler({ logger, processPropositions, @@ -191,13 +190,11 @@ const buildComponent = ({ const setTargetMigration = createSetTargetMigration({ targetMigrationEnabled, }); - const onDecisionHandler = createOnDecisionHandler({ processPropositions, createProposition, notificationHandler, }); - return createComponent({ getPageLocation, logger, @@ -215,7 +212,6 @@ const buildComponent = ({ onDecisionHandler, }); }; - export default (mocks) => { const component = buildComponent(mocks); const { response } = mocks; @@ -235,14 +231,21 @@ export default (mocks) => { event, renderDecisions, decisionScopes, - personalization: personalization || { sendDisplayEvent: true }, + personalization: personalization || { + sendDisplayEvent: true, + }, onResponse: callbacks.add, }); - const results = await callbacks.call({ response }); + const results = await callbacks.call({ + response, + }); const result = Object.assign({}, ...results); await flushPromiseChains(); event.finalize(); - return { event, result }; + return { + event, + result, + }; }, applyPropositions(args) { return component.commands.applyPropositions.run(args); diff --git a/test/unit/specs/components/Personalization/topLevel/buildMocks.js b/test/unit/specs/components/Personalization/topLevel/buildMocks.js index 0101e85ce..35ec4495a 100644 --- a/test/unit/specs/components/Personalization/topLevel/buildMocks.js +++ b/test/unit/specs/components/Personalization/topLevel/buildMocks.js @@ -9,8 +9,9 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi } from "vitest"; import createEvent from "../../../../../../src/core/createEvent.js"; -import createResponse from "../../../../../functional/helpers/createResponse.js"; +import createResponse from "../../../../helpers/createResponse.js"; import { ADOBE_JOURNEY_OPTIMIZER, ADOBE_TARGET, @@ -29,23 +30,21 @@ export default (decisions) => { })), }, }); - - const actions = jasmine.createSpyObj("actions", { - setHtml: () => Promise.resolve(), - setText: () => Promise.resolve(), - setAttributes: () => Promise.resolve(), - swapImage: () => Promise.resolve(), - setStyles: () => Promise.resolve(), - rearrangeChildren: () => Promise.resolve(), - removeNode: () => Promise.resolve(), - replaceHtml: () => Promise.resolve(), - appendHtml: () => Promise.resolve(), - prependHtml: () => Promise.resolve(), - insertHtmlAfter: () => Promise.resolve(), - insertHtmlBefore: () => Promise.resolve(), - click: () => Promise.resolve(), - }); - + const actions = { + setHtml: vi.fn().mockReturnValue(() => Promise.resolve()), + setText: vi.fn().mockReturnValue(() => Promise.resolve()), + setAttributes: vi.fn().mockReturnValue(() => Promise.resolve()), + swapImage: vi.fn().mockReturnValue(() => Promise.resolve()), + setStyles: vi.fn().mockReturnValue(() => Promise.resolve()), + rearrangeChildren: vi.fn().mockReturnValue(() => Promise.resolve()), + removeNode: vi.fn().mockReturnValue(() => Promise.resolve()), + replaceHtml: vi.fn().mockReturnValue(() => Promise.resolve()), + appendHtml: vi.fn().mockReturnValue(() => Promise.resolve()), + prependHtml: vi.fn().mockReturnValue(() => Promise.resolve()), + insertHtmlAfter: vi.fn().mockReturnValue(() => Promise.resolve()), + insertHtmlBefore: vi.fn().mockReturnValue(() => Promise.resolve()), + click: vi.fn().mockReturnValue(() => Promise.resolve()), + }; const config = { targetMigrationEnabled: true, prehidingStyle: "myprehidingstyle", @@ -55,16 +54,12 @@ export default (decisions) => { }, }; const logger = { - warn: spyOn(console, "warn").and.callThrough(), - error: spyOn(console, "error").and.callThrough(), - logOnContentRendering: jasmine - .createSpy("logOnContentRendering") - .and.callThrough(), - logOnContentHiding: jasmine - .createSpy("logOnContentHiding") - .and.callThrough(), + warn: vi.spyOn(console, "warn"), + error: vi.spyOn(console, "error"), + logOnContentRendering: vi.fn(), + logOnContentHiding: vi.fn(), }; - const sendEvent = jasmine.createSpy("sendEvent"); + const sendEvent = vi.fn(); const eventManager = { createEvent, async sendEvent(event) { @@ -75,11 +70,12 @@ export default (decisions) => { }; const getPageLocation = () => new URL("http://example.com/home"); const window = { - location: jasmine.createSpyObj("location", ["replace"]), + location: { + replace: vi.fn(), + }, }; - const hideContainers = jasmine.createSpy("hideContainers"); - const showContainers = jasmine.createSpy("showContainers"); - + const hideContainers = vi.fn(); + const showContainers = vi.fn(); return { actions, config, diff --git a/test/unit/specs/components/Personalization/topLevel/cartViewDecisions.spec.js b/test/unit/specs/components/Personalization/topLevel/cartViewDecisions.spec.js index a3292d45f..c0795fa41 100644 --- a/test/unit/specs/components/Personalization/topLevel/cartViewDecisions.spec.js +++ b/test/unit/specs/components/Personalization/topLevel/cartViewDecisions.spec.js @@ -9,8 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { CART_VIEW_DECISIONS } from "../responsesMock/eventResponses.js"; - import buildMocks from "./buildMocks.js"; import buildAlloy from "./buildAlloy.js"; import resetMocks from "./resetMocks.js"; @@ -49,10 +49,8 @@ describe("PersonalizationComponent", () => { decisions: [], }); expect(mocks.sendEvent).not.toHaveBeenCalled(); - expect(mocks.logger.warn).not.toHaveBeenCalled(); expect(mocks.logger.error).not.toHaveBeenCalled(); - resetMocks(mocks); ({ event, result } = await alloy.sendEvent( { @@ -67,7 +65,6 @@ describe("PersonalizationComponent", () => { }, [], )); - expect(event.toJSON()).toEqual({ xdm: { _experience: { @@ -147,7 +144,6 @@ describe("PersonalizationComponent", () => { expect(mocks.logger.warn).not.toHaveBeenCalled(); expect(mocks.logger.error).not.toHaveBeenCalled(); }); - it("CART_VIEW_DECISIONS 2", async () => { const mocks = buildMocks(CART_VIEW_DECISIONS); const alloy = buildAlloy(mocks); @@ -164,9 +160,7 @@ describe("PersonalizationComponent", () => { }, CART_VIEW_DECISIONS, ); - await flushPromiseChains(); - expect(event.toJSON()).toEqual({ query: { personalization: { diff --git a/test/unit/specs/components/Personalization/topLevel/mergedMetricDecisions.spec.js b/test/unit/specs/components/Personalization/topLevel/mergedMetricDecisions.spec.js index 7d1a32d67..b1e631360 100644 --- a/test/unit/specs/components/Personalization/topLevel/mergedMetricDecisions.spec.js +++ b/test/unit/specs/components/Personalization/topLevel/mergedMetricDecisions.spec.js @@ -9,8 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { MERGED_METRIC_DECISIONS } from "../responsesMock/eventResponses.js"; - import buildMocks from "./buildMocks.js"; import buildAlloy from "./buildAlloy.js"; @@ -114,7 +114,6 @@ describe("PersonalizationComponent", () => { ], }); expect(mocks.sendEvent).not.toHaveBeenCalled(); - expect(mocks.logger.warn).not.toHaveBeenCalled(); expect(mocks.logger.error).not.toHaveBeenCalled(); }); diff --git a/test/unit/specs/components/Personalization/topLevel/mixedPropositions.spec.js b/test/unit/specs/components/Personalization/topLevel/mixedPropositions.spec.js index 1c3edf37d..95c0ffb2a 100644 --- a/test/unit/specs/components/Personalization/topLevel/mixedPropositions.spec.js +++ b/test/unit/specs/components/Personalization/topLevel/mixedPropositions.spec.js @@ -9,8 +9,9 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -import { MIXED_PROPOSITIONS } from "../responsesMock/eventResponses.js"; +import { describe, it, expect } from "vitest"; +import { MIXED_PROPOSITIONS } from "../responsesMock/eventResponses.js"; import buildMocks from "./buildMocks.js"; import buildAlloy from "./buildAlloy.js"; import resetMocks from "./resetMocks.js"; @@ -44,197 +45,188 @@ describe("PersonalizationComponent", () => { }, }, }); - expect(result.propositions).toEqual( - jasmine.arrayWithExactContents([ - { - renderAttempted: true, - id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn1=", - scope: "__view__", - scopeDetails: { decisionProvider: "AJO" }, - items: [ - { - id: "442358", - schema: "https://ns.adobe.com/personalization/dom-action", - data: { - type: "click", - format: "application/vnd.adobe.target.dom-action", - selector: "#root", - }, + expect(result.propositions).toEqual([ + { + id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn1=", + scope: "__view__", + scopeDetails: { decisionProvider: "AJO" }, + items: [ + { + id: "442358", + schema: "https://ns.adobe.com/personalization/dom-action", + data: { + type: "click", + format: "application/vnd.adobe.target.dom-action", + selector: "#root", }, - ], - }, - { - renderAttempted: true, - id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn2=", - scope: "__view__", - scopeDetails: { decisionProvider: "AJO" }, - items: [ - { - id: "442379", - schema: "https://ns.adobe.com/personalization/dom-action", - data: { - type: "click", - format: "application/vnd.adobe.target.dom-action", - selector: "#root", - }, + }, + ], + renderAttempted: true, + }, + { + id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn2=", + scope: "__view__", + scopeDetails: { decisionProvider: "AJO" }, + items: [ + { + id: "442379", + schema: "https://ns.adobe.com/personalization/dom-action", + data: { + type: "click", + format: "application/vnd.adobe.target.dom-action", + selector: "#root", }, - ], - }, - { - renderAttempted: false, - id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn1=", - scope: "home", - scopeDetails: { decisionProvider: "AJO" }, - items: [ - { - id: "442359", - schema: "https://ns.adobe.com/personalization/html-content-item", - data: { - content: "

    Some custom content for the home page

    ", - format: "text/html", - id: "1202448", - }, + }, + ], + renderAttempted: true, + }, + { + id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn0=", + scope: "home", + scopeDetails: { decisionProvider: "AJO" }, + items: [ + { + id: "442358", + schema: "https://ns.adobe.com/personalization/dom-action", + data: { + type: "click", + format: "application/vnd.adobe.target.dom-action", + selector: "#root", }, - ], - }, - { - renderAttempted: false, - id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn1=", - scope: "home", - scopeDetails: { decisionProvider: "AJO" }, - items: [ - { - id: "442360", - schema: "https://ns.adobe.com/personalization/json-content-item", - data: { - content: "{'field1': 'custom content'}", - format: "text/javascript", - id: "1202449", - }, + }, + ], + renderAttempted: false, + }, + { + id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn1=", + scope: "home", + scopeDetails: { decisionProvider: "AJO" }, + items: [ + { + id: "442359", + schema: "https://ns.adobe.com/personalization/html-content-item", + data: { + content: "

    Some custom content for the home page

    ", + format: "text/html", + id: "1202448", }, - ], - }, - { - renderAttempted: false, - id: "AT:eyJhY3Rpdml0eUlkIjoiMTQxNjY0IiwiZXhwZXJpZW5jZUlkIjoiMCJ9", - scope: "home", - scopeDetails: { decisionProvider: "AJO" }, - items: [ - { + }, + ], + renderAttempted: false, + }, + { + id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn1=", + scope: "home", + scopeDetails: { decisionProvider: "AJO" }, + items: [ + { + id: "442360", + schema: "https://ns.adobe.com/personalization/json-content-item", + data: { + content: "{'field1': 'custom content'}", + format: "text/javascript", + id: "1202449", + }, + }, + ], + renderAttempted: false, + }, + { + id: "AT:eyJhY3Rpdml0eUlkIjoiMTQxNjY0IiwiZXhwZXJpZW5jZUlkIjoiMCJ9", + scope: "home", + scopeDetails: { decisionProvider: "AJO" }, + items: [ + { + id: "xcore:personalized-offer:134ce877e13a04ca", + etag: "4", + schema: + "https://ns.adobe.com/experience/offer-management/content-component-html", + data: { id: "xcore:personalized-offer:134ce877e13a04ca", - etag: "4", - schema: - "https://ns.adobe.com/experience/offer-management/content-component-html", - data: { - id: "xcore:personalized-offer:134ce877e13a04ca", - format: "text/html", - language: ["en-us"], - content: "

    An html offer from Offer Decisioning

    ", - characteristics: { - testing: "true", - }, - }, + format: "text/html", + language: ["en-us"], + content: "

    An html offer from Offer Decisioning

    ", + characteristics: { testing: "true" }, }, - ], - }, - { - renderAttempted: false, - id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn0=", - scope: "home", - scopeDetails: { decisionProvider: "AJO" }, - items: [ - { - id: "442358", - schema: "https://ns.adobe.com/personalization/dom-action", - data: { - type: "click", - format: "application/vnd.adobe.target.dom-action", - selector: "#root", - }, + }, + ], + renderAttempted: false, + }, + ]); + + expect(result.decisions).toEqual([ + { + id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn0=", + scope: "home", + scopeDetails: { decisionProvider: "AJO" }, + items: [ + { + id: "442358", + schema: "https://ns.adobe.com/personalization/dom-action", + data: { + type: "click", + format: "application/vnd.adobe.target.dom-action", + selector: "#root", }, - ], - }, - ]), - ); - expect(result.decisions).toEqual( - jasmine.arrayWithExactContents([ - { - id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn1=", - scope: "home", - scopeDetails: { decisionProvider: "AJO" }, - items: [ - { - id: "442359", - schema: "https://ns.adobe.com/personalization/html-content-item", - data: { - content: "

    Some custom content for the home page

    ", - format: "text/html", - id: "1202448", - }, + }, + ], + }, + { + id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn1=", + scope: "home", + scopeDetails: { decisionProvider: "AJO" }, + items: [ + { + id: "442359", + schema: "https://ns.adobe.com/personalization/html-content-item", + data: { + content: "

    Some custom content for the home page

    ", + format: "text/html", + id: "1202448", }, - ], - }, - { - id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn1=", - scope: "home", - scopeDetails: { decisionProvider: "AJO" }, - items: [ - { - id: "442360", - schema: "https://ns.adobe.com/personalization/json-content-item", - data: { - content: "{'field1': 'custom content'}", - format: "text/javascript", - id: "1202449", - }, + }, + ], + }, + { + id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn1=", + scope: "home", + scopeDetails: { decisionProvider: "AJO" }, + items: [ + { + id: "442360", + schema: "https://ns.adobe.com/personalization/json-content-item", + data: { + content: "{'field1': 'custom content'}", + format: "text/javascript", + id: "1202449", }, - ], - }, - { - id: "AT:eyJhY3Rpdml0eUlkIjoiMTQxNjY0IiwiZXhwZXJpZW5jZUlkIjoiMCJ9", - scope: "home", - scopeDetails: { decisionProvider: "AJO" }, - items: [ - { + }, + ], + }, + { + id: "AT:eyJhY3Rpdml0eUlkIjoiMTQxNjY0IiwiZXhwZXJpZW5jZUlkIjoiMCJ9", + scope: "home", + scopeDetails: { decisionProvider: "AJO" }, + items: [ + { + id: "xcore:personalized-offer:134ce877e13a04ca", + etag: "4", + schema: + "https://ns.adobe.com/experience/offer-management/content-component-html", + data: { id: "xcore:personalized-offer:134ce877e13a04ca", - etag: "4", - schema: - "https://ns.adobe.com/experience/offer-management/content-component-html", - data: { - id: "xcore:personalized-offer:134ce877e13a04ca", - format: "text/html", - language: ["en-us"], - content: "

    An html offer from Offer Decisioning

    ", - characteristics: { - testing: "true", - }, - }, - }, - ], - }, - { - id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn0=", - scope: "home", - scopeDetails: { decisionProvider: "AJO" }, - items: [ - { - id: "442358", - schema: "https://ns.adobe.com/personalization/dom-action", - data: { - type: "click", - format: "application/vnd.adobe.target.dom-action", - selector: "#root", - }, + format: "text/html", + language: ["en-us"], + content: "

    An html offer from Offer Decisioning

    ", + characteristics: { testing: "true" }, }, - ], - }, - ]), - ); + }, + ], + }, + ]); expect(mocks.sendEvent).not.toHaveBeenCalled(); - expect(mocks.logger.warn).not.toHaveBeenCalled(); expect(mocks.logger.error).not.toHaveBeenCalled(); - resetMocks(mocks); const applyPropositionsResult = await alloy.applyPropositions({ propositions: result.propositions, @@ -261,7 +253,9 @@ describe("PersonalizationComponent", () => { }, ], renderAttempted: true, - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, { id: "AT:eyJhY3Rpdml0eUlkIjoiNDQyMzU4IiwiZXhwZXJpZW5jZUlkIjoiIn1=", @@ -280,14 +274,16 @@ describe("PersonalizationComponent", () => { }, ], renderAttempted: true, - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, ]); expect(applyPropositionsResult.decisions).toBeUndefined(); - await flushPromiseChains(); expect(mocks.sendEvent).not.toHaveBeenCalled(); - expect(mocks.actions.appendHtml).toHaveBeenCalledOnceWith( + expect(mocks.actions.appendHtml).toHaveBeenNthCalledWith( + 1, "#myhomeselector", "

    Some custom content for the home page

    ", ); diff --git a/test/unit/specs/components/Personalization/topLevel/pageWideDecisionsWithDomActionSchemaItems.spec.js b/test/unit/specs/components/Personalization/topLevel/pageWideDecisionsWithDomActionSchemaItems.spec.js index 4bcc74e9b..5093dbd5f 100644 --- a/test/unit/specs/components/Personalization/topLevel/pageWideDecisionsWithDomActionSchemaItems.spec.js +++ b/test/unit/specs/components/Personalization/topLevel/pageWideDecisionsWithDomActionSchemaItems.spec.js @@ -9,8 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { PAGE_WIDE_DECISIONS_WITH_DOM_ACTION_SCHEMA_ITEMS } from "../responsesMock/eventResponses.js"; - import buildMocks from "./buildMocks.js"; import buildAlloy from "./buildAlloy.js"; import pause from "../../../../helpers/pause.js"; @@ -108,7 +108,6 @@ describe("PersonalizationComponent", () => { ], decisions: [], }); - expect(mocks.actions.setHtml).toHaveBeenCalledWith( "#foo", "
    Hola Mundo
    ", @@ -128,9 +127,7 @@ describe("PersonalizationComponent", () => { expect(mocks.actions.setHtml).toHaveBeenCalledTimes(4); expect(mocks.logger.warn).not.toHaveBeenCalled(); expect(mocks.logger.error).not.toHaveBeenCalled(); - await pause(100); - expect(mocks.sendEvent).toHaveBeenCalledWith({ xdm: { _experience: { diff --git a/test/unit/specs/components/Personalization/topLevel/pageWideScopeDecisions.spec.js b/test/unit/specs/components/Personalization/topLevel/pageWideScopeDecisions.spec.js index 215591abb..a2623925b 100644 --- a/test/unit/specs/components/Personalization/topLevel/pageWideScopeDecisions.spec.js +++ b/test/unit/specs/components/Personalization/topLevel/pageWideScopeDecisions.spec.js @@ -9,8 +9,9 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -import { PAGE_WIDE_SCOPE_DECISIONS } from "../responsesMock/eventResponses.js"; +import { describe, it, expect } from "vitest"; +import { PAGE_WIDE_SCOPE_DECISIONS } from "../responsesMock/eventResponses.js"; import buildMocks from "./buildMocks.js"; import buildAlloy from "./buildAlloy.js"; import pause from "../../../../helpers/pause.js"; @@ -43,122 +44,97 @@ describe("PersonalizationComponent", () => { }, }, }); - expect(result.propositions).toEqual( - jasmine.arrayWithExactContents([ - { - renderAttempted: true, - id: "TNT:activity1:experience1", - scope: "__view__", - items: [ - { - schema: "https://ns.adobe.com/personalization/dom-action", - data: { - type: "setHtml", - selector: "#foo", - content: "
    Hola Mundo
    ", - }, - }, - { - schema: "https://ns.adobe.com/personalization/dom-action", - data: { - type: "setHtml", - selector: "#foo2", - content: "
    here is a target activity
    ", - }, - }, - { - schema: - "https://ns.adobe.com/personalization/default-content-item", + + expect(result.propositions).toEqual([ + { + id: "TNT:activity1:experience1", + scope: "__view__", + scopeDetails: { blah: "test" }, + items: [ + { + schema: "https://ns.adobe.com/personalization/dom-action", + data: { + type: "setHtml", + selector: "#foo", + content: "
    Hola Mundo
    ", }, - ], - scopeDetails: { - blah: "test", }, - }, - { - renderAttempted: true, - id: "AJO:campaign1:message1", - scope: "web://alloy.test.com/test/page/1", - items: [ - { - schema: "https://ns.adobe.com/personalization/dom-action", - data: { - type: "setHtml", - selector: "#foo", - content: "
    Hola Mundo
    ", - }, + { + schema: "https://ns.adobe.com/personalization/dom-action", + data: { + type: "setHtml", + selector: "#foo2", + content: "
    here is a target activity
    ", }, - { - schema: "https://ns.adobe.com/personalization/dom-action", - data: { - type: "setHtml", - selector: "#foo2", - content: "
    here is a target activity
    ", - }, - }, - { - schema: - "https://ns.adobe.com/personalization/default-content-item", - }, - ], - scopeDetails: { - decisionProvider: "AJO", }, - }, - { - renderAttempted: false, - id: "TNT:activity1:experience1", - scope: "__view__", - items: [ - { - schema: "https://ns.adove.com/experience/item", - data: { - id: "A", - content: "Banner A ....", - }, - }, - { - schema: "https://ns.adove.com/experience/item", - data: { - id: "B", - content: "Banner B ....", - }, - }, - ], - scopeDetails: { - blah: "test", + { + schema: "https://ns.adobe.com/personalization/default-content-item", }, - }, - ]), - ); - expect(result.decisions).toEqual( - jasmine.arrayWithExactContents([ - { - id: "TNT:activity1:experience1", - scope: "__view__", - items: [ - { - schema: "https://ns.adove.com/experience/item", - data: { - id: "A", - content: "Banner A ....", - }, + ], + renderAttempted: true, + }, + { + id: "TNT:activity1:experience1", + scope: "__view__", + scopeDetails: { blah: "test" }, + items: [ + { + schema: "https://ns.adove.com/experience/item", + data: { id: "A", content: "Banner A ...." }, + }, + { + schema: "https://ns.adove.com/experience/item", + data: { id: "B", content: "Banner B ...." }, + }, + ], + renderAttempted: false, + }, + { + id: "AJO:campaign1:message1", + scope: "web://alloy.test.com/test/page/1", + scopeDetails: { decisionProvider: "AJO" }, + items: [ + { + schema: "https://ns.adobe.com/personalization/dom-action", + data: { + type: "setHtml", + selector: "#foo", + content: "
    Hola Mundo
    ", }, - { - schema: "https://ns.adove.com/experience/item", - data: { - id: "B", - content: "Banner B ....", - }, + }, + { + schema: "https://ns.adobe.com/personalization/dom-action", + data: { + type: "setHtml", + selector: "#foo2", + content: "
    here is a target activity
    ", }, - ], - scopeDetails: { - blah: "test", }, - }, - ]), - ); + { + schema: "https://ns.adobe.com/personalization/default-content-item", + }, + ], + renderAttempted: true, + }, + ]); + expect(result.decisions).toEqual([ + { + id: "TNT:activity1:experience1", + scope: "__view__", + scopeDetails: { blah: "test" }, + items: [ + { + schema: "https://ns.adove.com/experience/item", + data: { id: "A", content: "Banner A ...." }, + }, + { + schema: "https://ns.adove.com/experience/item", + data: { id: "B", content: "Banner B ...." }, + }, + ], + }, + ]); expect(mocks.actions.setHtml).toHaveBeenCalledWith( "#foo", "
    Hola Mundo
    ", @@ -178,9 +154,7 @@ describe("PersonalizationComponent", () => { expect(mocks.actions.setHtml).toHaveBeenCalledTimes(4); expect(mocks.logger.warn).not.toHaveBeenCalled(); expect(mocks.logger.error).not.toHaveBeenCalled(); - await pause(100); - expect(mocks.sendEvent).toHaveBeenCalledWith({ xdm: { _experience: { diff --git a/test/unit/specs/components/Personalization/topLevel/pageWideScopeDecisionsWithoutDomActionSchemaItems.spec.js b/test/unit/specs/components/Personalization/topLevel/pageWideScopeDecisionsWithoutDomActionSchemaItems.spec.js index 809c6832b..e4c644292 100644 --- a/test/unit/specs/components/Personalization/topLevel/pageWideScopeDecisionsWithoutDomActionSchemaItems.spec.js +++ b/test/unit/specs/components/Personalization/topLevel/pageWideScopeDecisionsWithoutDomActionSchemaItems.spec.js @@ -9,8 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { PAGE_WIDE_SCOPE_DECISIONS_WITHOUT_DOM_ACTION_SCHEMA_ITEMS } from "../responsesMock/eventResponses.js"; - import buildMocks from "./buildMocks.js"; import buildAlloy from "./buildAlloy.js"; @@ -98,7 +98,6 @@ describe("PersonalizationComponent", () => { ], }); expect(mocks.sendEvent).not.toHaveBeenCalled(); - expect(mocks.logger.warn).not.toHaveBeenCalled(); expect(mocks.logger.error).not.toHaveBeenCalled(); }); diff --git a/test/unit/specs/components/Personalization/topLevel/productsViewDecisions.spec.js b/test/unit/specs/components/Personalization/topLevel/productsViewDecisions.spec.js index 32dae9496..666dafa24 100644 --- a/test/unit/specs/components/Personalization/topLevel/productsViewDecisions.spec.js +++ b/test/unit/specs/components/Personalization/topLevel/productsViewDecisions.spec.js @@ -9,8 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { PRODUCTS_VIEW_DECISIONS } from "../responsesMock/eventResponses.js"; - import buildMocks from "./buildMocks.js"; import buildAlloy from "./buildAlloy.js"; @@ -47,7 +47,6 @@ describe("PersonalizationComponent", () => { decisions: [], }); expect(mocks.sendEvent).not.toHaveBeenCalled(); - expect(mocks.logger.warn).not.toHaveBeenCalled(); expect(mocks.logger.error).not.toHaveBeenCalled(); }); diff --git a/test/unit/specs/components/Personalization/topLevel/redirectPageWideScopeDecision.spec.js b/test/unit/specs/components/Personalization/topLevel/redirectPageWideScopeDecision.spec.js index e8d702c05..8f9bddc91 100644 --- a/test/unit/specs/components/Personalization/topLevel/redirectPageWideScopeDecision.spec.js +++ b/test/unit/specs/components/Personalization/topLevel/redirectPageWideScopeDecision.spec.js @@ -9,8 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { REDIRECT_PAGE_WIDE_SCOPE_DECISION } from "../responsesMock/eventResponses.js"; - import buildMocks from "./buildMocks.js"; import buildAlloy from "./buildAlloy.js"; @@ -64,7 +64,6 @@ describe("PersonalizationComponent", () => { eventType: "decisioning.propositionDisplay", }, }); - expect(mocks.logger.warn).not.toHaveBeenCalled(); expect(mocks.logger.error).not.toHaveBeenCalled(); }); diff --git a/test/unit/specs/components/Personalization/topLevel/resetMocks.js b/test/unit/specs/components/Personalization/topLevel/resetMocks.js index ca044175f..155a64ae0 100644 --- a/test/unit/specs/components/Personalization/topLevel/resetMocks.js +++ b/test/unit/specs/components/Personalization/topLevel/resetMocks.js @@ -18,12 +18,12 @@ export default ({ showContainers, }) => { Object.keys(actions).forEach((key) => { - actions[key].calls.reset(); + actions[key].mockClear(); }); - logger.warn.calls.reset(); - logger.error.calls.reset(); - sendEvent.calls.reset(); - window.location.replace.calls.reset(); - hideContainers.calls.reset(); - showContainers.calls.reset(); + logger.warn.mockClear(); + logger.error.mockClear(); + sendEvent.mockClear(); + window.location.replace.mockClear(); + hideContainers.mockClear(); + showContainers.mockClear(); }; diff --git a/test/unit/specs/components/Personalization/topLevel/scopesFoo1Foo2Decisions.spec.js b/test/unit/specs/components/Personalization/topLevel/scopesFoo1Foo2Decisions.spec.js index 91865536e..44d91ab9c 100644 --- a/test/unit/specs/components/Personalization/topLevel/scopesFoo1Foo2Decisions.spec.js +++ b/test/unit/specs/components/Personalization/topLevel/scopesFoo1Foo2Decisions.spec.js @@ -9,8 +9,8 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { SCOPES_FOO1_FOO2_DECISIONS } from "../responsesMock/eventResponses.js"; - import buildMocks from "./buildMocks.js"; import buildAlloy from "./buildAlloy.js"; @@ -42,7 +42,6 @@ describe("PersonalizationComponent", () => { }, }, }); - expect(result).toEqual({ propositions: [ { @@ -144,7 +143,6 @@ describe("PersonalizationComponent", () => { ], }); expect(mocks.sendEvent).not.toHaveBeenCalled(); - expect(mocks.logger.warn).not.toHaveBeenCalled(); expect(mocks.logger.error).not.toHaveBeenCalled(); }); diff --git a/test/unit/specs/components/Personalization/utils/addRenderAttemptedToDecisions.spec.js b/test/unit/specs/components/Personalization/utils/addRenderAttemptedToDecisions.spec.js index bf1df1a0b..a82353289 100644 --- a/test/unit/specs/components/Personalization/utils/addRenderAttemptedToDecisions.spec.js +++ b/test/unit/specs/components/Personalization/utils/addRenderAttemptedToDecisions.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import addRenderAttemptedToDecisions from "../../../../../../src/components/Personalization/utils/addRenderAttemptedToDecisions.js"; describe("Personalization::addRenderAttemptedToDecisions", () => { diff --git a/test/unit/specs/components/Personalization/utils/createAsyncArray.spec.js b/test/unit/specs/components/Personalization/utils/createAsyncArray.spec.js index 8b12f9236..abfeaaada 100644 --- a/test/unit/specs/components/Personalization/utils/createAsyncArray.spec.js +++ b/test/unit/specs/components/Personalization/utils/createAsyncArray.spec.js @@ -9,41 +9,45 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import createAsyncArray from "../../../../../../src/components/Personalization/utils/createAsyncArray.js"; import { defer } from "../../../../../../src/utils/index.js"; import flushPromiseChains from "../../../../helpers/flushPromiseChains.js"; +const isPending = (promise) => { + const t = {}; + return Promise.race([promise, t]).then((v) => v === t); +}; + describe("Personalization::utils::createAsyncArray", () => { it("should start with an empty array", async () => { const asyncArray = createAsyncArray(); expect(await asyncArray.clear()).toEqual([]); }); - it("should add items to the array, and clear the items", async () => { const asyncArray = createAsyncArray(); asyncArray.concat(Promise.resolve(["myitem1"])); expect(await asyncArray.clear()).toEqual(["myitem1"]); expect(await asyncArray.clear()).toEqual([]); }); - it("should add multiple arrays", async () => { const asyncArray = createAsyncArray(); asyncArray.concat(Promise.resolve(["myitem1"])); asyncArray.concat(Promise.resolve(["myitem2"])); expect(await asyncArray.clear()).toEqual(["myitem1", "myitem2"]); }); - it("should wait for items while clearing the array", async () => { const asyncArray = createAsyncArray(); const deferred = defer(); asyncArray.concat(deferred.promise); const clearPromise = asyncArray.clear(); await flushPromiseChains(); - expectAsync(clearPromise).toBePending(); + + expect(await isPending(clearPromise)).toBe(true); + deferred.resolve(["myitem1"]); expect(await clearPromise).toEqual(["myitem1"]); }); - it("should handle rejected promises", async () => { const asyncArray = createAsyncArray(); asyncArray.concat(Promise.resolve([1, 2])); diff --git a/test/unit/specs/components/Personalization/utils/isAuthoringModeEnabled.spec.js b/test/unit/specs/components/Personalization/utils/isAuthoringModeEnabled.spec.js index 4f2ea01a4..b6fc8221d 100644 --- a/test/unit/specs/components/Personalization/utils/isAuthoringModeEnabled.spec.js +++ b/test/unit/specs/components/Personalization/utils/isAuthoringModeEnabled.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isAuthoringModeEnabled from "../../../../../../src/components/Personalization/utils/isAuthoringModeEnabled.js"; describe("Personalization::isAuthoringModeEnabled", () => { @@ -21,7 +22,6 @@ describe("Personalization::isAuthoringModeEnabled", () => { }; expect(isAuthoringModeEnabled(doc)).toEqual(true); }); - it("returns false if authoring mode is disabled", () => { const doc = { location: { diff --git a/test/unit/specs/components/Personalization/utils/metaUtils.spec.js b/test/unit/specs/components/Personalization/utils/metaUtils.spec.js index f97d1aa76..fe290c67f 100644 --- a/test/unit/specs/components/Personalization/utils/metaUtils.spec.js +++ b/test/unit/specs/components/Personalization/utils/metaUtils.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { cleanMetas, dedupeMetas, @@ -84,7 +85,6 @@ describe("Personalization::metaUtils", () => { }, ]); }); - it("dedupeMetas", () => { expect( dedupeMetas([ diff --git a/test/unit/specs/components/Personalization/utils/surfaceUtils.spec.js b/test/unit/specs/components/Personalization/utils/surfaceUtils.spec.js index 3a74e3be7..91415dc49 100644 --- a/test/unit/specs/components/Personalization/utils/surfaceUtils.spec.js +++ b/test/unit/specs/components/Personalization/utils/surfaceUtils.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import { buildPageSurface, isPageWideSurface, @@ -18,18 +19,18 @@ import { let pageLocation; let logger; - const getPageLocation = () => pageLocation; - describe("Personalization::surfaceUtils", () => { beforeEach(() => { - logger = jasmine.createSpyObj("logger", ["error", "warn"]); + logger = { + error: vi.fn(), + warn: vi.fn(), + }; pageLocation = { host: "domain.com", pathname: "/products/test/", }; }); - it("builds page-wide surface from location", () => { expect(buildPageSurface(getPageLocation)).toEqual( "web://domain.com/products/test", @@ -55,17 +56,15 @@ describe("Personalization::surfaceUtils", () => { }; expect(buildPageSurface(getPageLocation)).toEqual("web://domain.com/a"); }); - it("checks for a page-wide surface", () => { - expect(isPageWideSurface("__view__")).toBeFalse(); - expect(isPageWideSurface("name")).toBeFalse(); - expect(isPageWideSurface("web://domain.com")).toBeTrue(); - expect(isPageWideSurface("web://domain.com/path/page.html")).toBeTrue(); - expect(isPageWideSurface("web://domain.com#fragment")).toBeFalse(); - expect(isPageWideSurface("webapp://domain.com")).toBeFalse(); - expect(isPageWideSurface("webapp://domain.com#view")).toBeFalse(); + expect(isPageWideSurface("__view__")).toBe(false); + expect(isPageWideSurface("name")).toBe(false); + expect(isPageWideSurface("web://domain.com")).toBe(true); + expect(isPageWideSurface("web://domain.com/path/page.html")).toBe(true); + expect(isPageWideSurface("web://domain.com#fragment")).toBe(false); + expect(isPageWideSurface("webapp://domain.com")).toBe(false); + expect(isPageWideSurface("webapp://domain.com#view")).toBe(false); }); - it("expands fragment surfaces", () => { let result = normalizeSurfaces([], getPageLocation, logger); expect(result).toEqual([]); @@ -78,9 +77,8 @@ describe("Personalization::surfaceUtils", () => { "web://custom.surface.com/", "web://domain.com/products/test#fragment1", ]); - expect(logger.warn).toHaveBeenCalledOnceWith("Invalid surface: test"); + expect(logger.warn).toHaveBeenNthCalledWith(1, "Invalid surface: test"); }); - it("validates & normalizes surface type", () => { const result = normalizeSurfaces( [ @@ -103,7 +101,6 @@ describe("Personalization::surfaceUtils", () => { ]); expect(logger.warn).toHaveBeenCalledTimes(5); }); - it("validates & normalizes surface authority", () => { let result = normalizeSurfaces( [ @@ -156,7 +153,6 @@ describe("Personalization::surfaceUtils", () => { "web://[ff11:af21:::1]:3000/", ]); expect(logger.warn).not.toHaveBeenCalled(); - result = normalizeSurfaces( [ "web://foo?.com", @@ -173,7 +169,6 @@ describe("Personalization::surfaceUtils", () => { expect(result).toEqual([]); expect(logger.warn).toHaveBeenCalledTimes(7); }); - it("validates & normalizes surface path", () => { let result = normalizeSurfaces( [ @@ -196,7 +191,6 @@ describe("Personalization::surfaceUtils", () => { "web://domain6.com/a/%D0%B6%D0%BE%D1%80%D0%B0%D1%82%D0%B5%D1%81%D1%82", ]); expect(logger.warn).not.toHaveBeenCalled(); - result = normalizeSurfaces( [ "web://domain1.com/pr od", @@ -213,7 +207,6 @@ describe("Personalization::surfaceUtils", () => { expect(result).toEqual([]); expect(logger.warn).toHaveBeenCalledTimes(7); }); - it("validates surface fragment", () => { let result = normalizeSurfaces( [ @@ -236,7 +229,6 @@ describe("Personalization::surfaceUtils", () => { "web://domain6.com/#my-%D0%B6%D0%BE%D1%80%D0%B0%D1%82%D0%B5%D1%81%D1%82", ]); expect(logger.warn).not.toHaveBeenCalled(); - result = normalizeSurfaces( [ "web://domain1.com/#pr od", diff --git a/test/unit/specs/components/Personalization/validateApplyPropositionsOptions.spec.js b/test/unit/specs/components/Personalization/validateApplyPropositionsOptions.spec.js index e11bec5da..504968b80 100644 --- a/test/unit/specs/components/Personalization/validateApplyPropositionsOptions.spec.js +++ b/test/unit/specs/components/Personalization/validateApplyPropositionsOptions.spec.js @@ -10,8 +10,8 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ -import "jasmine-expect"; -import { DOM_ACTION } from "@adobe/alloy/libEs5/constants/schema.js"; +import { vi, beforeEach, describe, it, expect } from "vitest"; +import { DOM_ACTION } from "@adobe/alloy/libEs6/constants/schema.js"; import validateApplyPropositionsOptions, { EMPTY_PROPOSITIONS, } from "../../../../../src/components/Personalization/validateApplyPropositionsOptions.js"; @@ -20,7 +20,9 @@ const PROPOSITIONS = [ { id: "abc", scope: "web://aepdemo.com/", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, items: [ { id: "abc", @@ -60,52 +62,42 @@ const PROPOSITIONS = [ }, }, ]; - const METADATA = { scope1: { selector: "#home-item1", actionType: "setHtml", }, }; - describe("Personalization::validateApplyPropositionsOptions", () => { let loggerSpy; let logger; - const resetLogger = () => { - loggerSpy = jasmine.createSpy("logger.warn"); + loggerSpy = vi.fn(); logger = { warn: loggerSpy, }; }; - beforeEach(() => { resetLogger(); }); - it("it should log a warning when no options are present", () => { const result = validateApplyPropositionsOptions({ logger, }); - expect(loggerSpy).toHaveBeenCalled(); expect(result).toEqual(EMPTY_PROPOSITIONS); }); - it("it should log a warning when propositions array is missing from options", () => { const result = validateApplyPropositionsOptions({ logger, options: {}, }); - expect(loggerSpy).toHaveBeenCalled(); - expect(loggerSpy.calls.first().args[1].message).toEqual( + expect(loggerSpy.mock.calls[0][1].message).toEqual( "'propositions' is a required option", ); - expect(result).toEqual(EMPTY_PROPOSITIONS); }); - it("it should log a warning when propositions is empty array", () => { const result = validateApplyPropositionsOptions({ logger, @@ -113,18 +105,16 @@ describe("Personalization::validateApplyPropositionsOptions", () => { propositions: [], }, }); - expect(loggerSpy).toHaveBeenCalled(); - expect(loggerSpy.calls.first().args[1].message).toEqual( + expect(loggerSpy.mock.calls[0][1].message).toEqual( "'propositions': Expected a non-empty array, but got [].", ); - expect(result).toEqual(EMPTY_PROPOSITIONS); }); - it("it should log a warning when propositions are missing required values", () => { - const scopeDetails = { decisionProvider: "AJO" }; - + const scopeDetails = { + decisionProvider: "AJO", + }; const tests = [ { propositions: [{}], @@ -135,21 +125,34 @@ describe("Personalization::validateApplyPropositionsOptions", () => { "'propositions[0].items' is a required option", }, { - propositions: [{ id: "abc" }], + propositions: [ + { + id: "abc", + }, + ], errorMessage: "'propositions[0].scope' is a required option\n" + "'propositions[0].scopeDetails' is a required option\n" + "'propositions[0].items' is a required option", }, { - propositions: [{ id: "abc", scope: "web://aepdemo.com/" }], + propositions: [ + { + id: "abc", + scope: "web://aepdemo.com/", + }, + ], errorMessage: "'propositions[0].scopeDetails' is a required option\n" + "'propositions[0].items' is a required option", }, { propositions: [ - { id: "abc", scope: "web://aepdemo.com/", scopeDetails }, + { + id: "abc", + scope: "web://aepdemo.com/", + scopeDetails, + }, ], errorMessage: "'propositions[0].items' is a required option", }, @@ -184,32 +187,30 @@ describe("Personalization::validateApplyPropositionsOptions", () => { id: "abc", scope: "web://aepdemo.com/", scopeDetails, - items: [{ id: "abc" }], + items: [ + { + id: "abc", + }, + ], }, ], errorMessage: "'propositions[0].items[0].schema' is a required option", }, ]; - for (let i = 0; i < tests.length; i += 1) { const { propositions, errorMessage } = tests[i]; resetLogger(); - const result = validateApplyPropositionsOptions({ logger, options: { propositions, }, }); - expect(loggerSpy).toHaveBeenCalled(); - - expect(loggerSpy.calls.first().args[1].message).toEqual(errorMessage); - + expect(loggerSpy.mock.calls[0][1].message).toEqual(errorMessage); expect(result).toEqual(EMPTY_PROPOSITIONS); } }); - it("it should not log a warning when extra options are present", () => { const result = validateApplyPropositionsOptions({ logger, @@ -218,11 +219,9 @@ describe("Personalization::validateApplyPropositionsOptions", () => { propositions: PROPOSITIONS, }, }); - expect(loggerSpy).not.toHaveBeenCalled(); expect(result).not.toEqual(EMPTY_PROPOSITIONS); }); - it("it should log a warning when metadata is not an object", () => { const result = validateApplyPropositionsOptions({ logger, @@ -231,15 +230,12 @@ describe("Personalization::validateApplyPropositionsOptions", () => { metadata: [], }, }); - expect(loggerSpy).toHaveBeenCalled(); - expect(loggerSpy.calls.first().args[1].message).toEqual( + expect(loggerSpy.mock.calls[0][1].message).toEqual( "'metadata': Expected an object, but got [].", ); - expect(result).toEqual(EMPTY_PROPOSITIONS); }); - it("it should not log a warning when propositions and metadata are present", () => { const result = validateApplyPropositionsOptions({ logger, @@ -248,7 +244,6 @@ describe("Personalization::validateApplyPropositionsOptions", () => { metadata: METADATA, }, }); - expect(loggerSpy).not.toHaveBeenCalled(); expect(result).not.toEqual(EMPTY_PROPOSITIONS); }); diff --git a/test/unit/specs/components/RulesEngine/consequenceAdapters/inAppMessageConsequenceAdapter.spec.js b/test/unit/specs/components/RulesEngine/consequenceAdapters/inAppMessageConsequenceAdapter.spec.js index 9df10f791..18fcae2e4 100644 --- a/test/unit/specs/components/RulesEngine/consequenceAdapters/inAppMessageConsequenceAdapter.spec.js +++ b/test/unit/specs/components/RulesEngine/consequenceAdapters/inAppMessageConsequenceAdapter.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import inAppMessageConsequenceAdapter from "../../../../../../src/components/RulesEngine/consequenceAdapters/inAppMessageConsequenceAdapter.js"; import { TEXT_HTML } from "../../../../../../src/constants/contentType.js"; @@ -53,7 +54,7 @@ describe("RulesEngine:inAppMessageConsequenceAdapter", () => { backdropColor: "#000000", height: 60, }, - webParameters: jasmine.any(Object), + webParameters: expect.any(Object), content: "", contentType: TEXT_HTML, }, diff --git a/test/unit/specs/components/RulesEngine/consequenceAdapters/schemaTypeConsequenceAdapter.spec.js b/test/unit/specs/components/RulesEngine/consequenceAdapters/schemaTypeConsequenceAdapter.spec.js index de2c542d4..9630470ab 100644 --- a/test/unit/specs/components/RulesEngine/consequenceAdapters/schemaTypeConsequenceAdapter.spec.js +++ b/test/unit/specs/components/RulesEngine/consequenceAdapters/schemaTypeConsequenceAdapter.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import schemaTypeConsequenceAdapter from "../../../../../../src/components/RulesEngine/consequenceAdapters/schemaTypeConsequenceAdapter.js"; import { TEXT_HTML } from "../../../../../../src/constants/contentType.js"; @@ -36,7 +37,7 @@ describe("RulesEngine:schemaTypeConsequenceAdapter", () => { backdropColor: "#000000", height: 60, }, - webParameters: jasmine.any(Object), + webParameters: expect.any(Object), content: "", contentType: TEXT_HTML, }, @@ -60,7 +61,7 @@ describe("RulesEngine:schemaTypeConsequenceAdapter", () => { backdropColor: "#000000", height: 60, }, - webParameters: jasmine.any(Object), + webParameters: expect.any(Object), content: "", contentType: TEXT_HTML, }, diff --git a/test/unit/specs/components/RulesEngine/constants.spec.js b/test/unit/specs/components/RulesEngine/constants.spec.js deleted file mode 100644 index 26ef92385..000000000 --- a/test/unit/specs/components/RulesEngine/constants.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -/* -Copyright 2023 Adobe. All rights reserved. -This file is licensed to you 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 REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ diff --git a/test/unit/specs/components/RulesEngine/contextTestUtils.js b/test/unit/specs/components/RulesEngine/contextTestUtils.js index 84d11fcc4..f4b81973b 100644 --- a/test/unit/specs/components/RulesEngine/contextTestUtils.js +++ b/test/unit/specs/components/RulesEngine/contextTestUtils.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, expect } from "vitest"; import createContextProvider from "../../../../../src/components/RulesEngine/createContextProvider.js"; import createOnResponseHandler from "../../../../../src/components/RulesEngine/createOnResponseHandler.js"; import createEventRegistry from "../../../../../src/components/RulesEngine/createEventRegistry.js"; @@ -27,7 +28,7 @@ export const proposition = { schema: "https://ns.adobe.com/personalization/mock-action", data: { hello: "kitty", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "79129ecf-6430-4fbd-955a-b4f1dfdaa6fe", @@ -35,7 +36,6 @@ export const proposition = { ], scope: "web://mywebsite.com", }; - export const mockWindow = ({ title = "My awesome website", referrer = "https://www.google.com/search?q=adobe+journey+optimizer&oq=adobe+journey+optimizer", @@ -57,7 +57,6 @@ export const mockWindow = ({ userAgent, }, }); - export const payloadWithCondition = (condition) => { return { id: "2e4c7b28-b3e7-4d5b-ae6a-9ab0b44af87e", @@ -115,21 +114,25 @@ export const mockRulesetResponseWithCondition = (condition) => { ], }; }; - const mockEvent = { - getContent: () => ({ query: {} }), + getContent: () => ({ + query: {}, + }), hasQuery: () => true, getViewName: () => undefined, }; - export const setupResponseHandler = (applyResponse, window, condition) => { - const storage = jasmine.createSpyObj("storage", [ - "getItem", - "setItem", - "clear", - ]); - const eventRegistry = createEventRegistry({ storage }); - const decisionProvider = createDecisionProvider({ eventRegistry }); + const storage = { + getItem: vi.fn(), + setItem: vi.fn(), + clear: vi.fn(), + }; + const eventRegistry = createEventRegistry({ + storage, + }); + const decisionProvider = createDecisionProvider({ + eventRegistry, + }); const getBrowser = injectGetBrowser({ userAgent: window.navigator.userAgent, }); @@ -138,7 +141,6 @@ export const setupResponseHandler = (applyResponse, window, condition) => { window, getBrowser, }); - const onResponseHandler = createOnResponseHandler({ renderDecisions: true, decisionProvider, @@ -146,7 +148,6 @@ export const setupResponseHandler = (applyResponse, window, condition) => { event: mockEvent, decisionContext: contextProvider.getContext(), }); - onResponseHandler({ response: mockRulesetResponseWithCondition(condition), }); diff --git a/test/unit/specs/components/RulesEngine/createApplyResponse.spec.js b/test/unit/specs/components/RulesEngine/createApplyResponse.spec.js index 7c0668ece..5fb667834 100644 --- a/test/unit/specs/components/RulesEngine/createApplyResponse.spec.js +++ b/test/unit/specs/components/RulesEngine/createApplyResponse.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import createApplyResponse from "../../../../../src/components/RulesEngine/createApplyResponse.js"; describe("RulesEngine:createApplyResponse", () => { @@ -17,23 +18,20 @@ describe("RulesEngine:createApplyResponse", () => { scope: "__view__", items: [], }; - it("calls lifecycle.onDecision with propositions", () => { - const lifecycle = jasmine.createSpyObj("lifecycle", { - onDecision: Promise.resolve(), - }); - + const lifecycle = { + onDecision: vi.fn().mockReturnValue(Promise.resolve()), + }; const applyResponse = createApplyResponse(lifecycle); - - const mockEvent = { getViewName: () => undefined }; + const mockEvent = { + getViewName: () => undefined, + }; const personalization = {}; - applyResponse({ propositions: [proposition], event: mockEvent, personalization, }); - expect(lifecycle.onDecision).toHaveBeenCalledWith({ renderDecisions: false, propositions: [proposition], @@ -41,22 +39,20 @@ describe("RulesEngine:createApplyResponse", () => { personalization: {}, }); }); - it("calls lifecycle.onDecision with viewName", () => { - const lifecycle = jasmine.createSpyObj("lifecycle", { - onDecision: Promise.resolve(), - }); - + const lifecycle = { + onDecision: vi.fn().mockReturnValue(Promise.resolve()), + }; const applyResponse = createApplyResponse(lifecycle); - const mockEvent = { getViewName: () => "oh hai" }; - + const mockEvent = { + getViewName: () => "oh hai", + }; applyResponse({ renderDecisions: true, event: mockEvent, personalization: {}, propositions: [proposition], }); - expect(lifecycle.onDecision).toHaveBeenCalledWith({ renderDecisions: true, propositions: [proposition], @@ -64,23 +60,21 @@ describe("RulesEngine:createApplyResponse", () => { personalization: {}, }); }); - it("call lifecycle.onDecision even if no propositions", () => { // this use case is necessary for content cards with no items - const lifecycle = jasmine.createSpyObj("lifecycle", { - onDecision: Promise.resolve(), - }); - + const lifecycle = { + onDecision: vi.fn().mockReturnValue(Promise.resolve()), + }; const applyResponse = createApplyResponse(lifecycle); - const mockEvent = { getViewName: () => undefined }; - + const mockEvent = { + getViewName: () => undefined, + }; applyResponse({ renderDecisions: true, propositions: [], event: mockEvent, personalization: {}, }); - expect(lifecycle.onDecision).toHaveBeenCalledWith({ renderDecisions: true, propositions: [], diff --git a/test/unit/specs/components/RulesEngine/createConsequenceAdapter.spec.js b/test/unit/specs/components/RulesEngine/createConsequenceAdapter.spec.js index d96381cea..4ab2f03b0 100644 --- a/test/unit/specs/components/RulesEngine/createConsequenceAdapter.spec.js +++ b/test/unit/specs/components/RulesEngine/createConsequenceAdapter.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import createConsequenceAdapter from "../../../../../src/components/RulesEngine/createConsequenceAdapter.js"; import { TEXT_HTML } from "../../../../../src/constants/contentType.js"; @@ -30,16 +31,14 @@ describe("RulesEngine:createConsequenceAdapter", () => { backdropColor: "#000000", height: 60, }, - webParameters: jasmine.any(Object), + webParameters: expect.any(Object), content: "", contentType: TEXT_HTML, }, id: "72042c7c-4e34-44f6-af95-1072ae117424", }; - it("handles cjmiam", () => { const consequenceAdapter = createConsequenceAdapter(); - const adaptedConsequence = consequenceAdapter({ id: "72042c7c-4e34-44f6-af95-1072ae117424", type: "cjmiam", @@ -61,13 +60,10 @@ describe("RulesEngine:createConsequenceAdapter", () => { html: "", }, }); - expect(adaptedConsequence).toEqual(ADAPTED_CONSEQUENCE); }); - it("handles schema", () => { const consequenceAdapter = createConsequenceAdapter(); - const adaptedConsequence = consequenceAdapter({ id: "72042c7c-4e34-44f6-af95-1072ae117424", type: "schema", @@ -75,7 +71,6 @@ describe("RulesEngine:createConsequenceAdapter", () => { ...ADAPTED_CONSEQUENCE, }, }); - expect(adaptedConsequence).toEqual(ADAPTED_CONSEQUENCE); }); }); diff --git a/test/unit/specs/components/RulesEngine/createContextProvider.spec.js b/test/unit/specs/components/RulesEngine/createContextProvider.spec.js index a6a3ef349..7b7034756 100644 --- a/test/unit/specs/components/RulesEngine/createContextProvider.spec.js +++ b/test/unit/specs/components/RulesEngine/createContextProvider.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, afterEach, describe, it, expect } from "vitest"; import createContextProvider from "../../../../../src/components/RulesEngine/createContextProvider.js"; import createEventRegistry from "../../../../../src/components/RulesEngine/createEventRegistry.js"; @@ -19,9 +20,12 @@ describe("RulesEngine:createContextProvider", () => { let window; let mockedTimestamp; let getBrowser; - beforeEach(() => { - storage = jasmine.createSpyObj("storage", ["getItem", "setItem", "clear"]); + storage = { + getItem: vi.fn(), + setItem: vi.fn(), + clear: vi.fn(), + }; window = { title: "My awesome website", referrer: "https://stage.applookout.net/", @@ -36,24 +40,24 @@ describe("RulesEngine:createContextProvider", () => { }, }; mockedTimestamp = new Date(Date.UTC(2023, 4, 11, 12, 34, 56)); - jasmine.clock().install(); - jasmine.clock().mockDate(mockedTimestamp); - getBrowser = jasmine.createSpy().and.returnValue("Chrome"); + vi.useFakeTimers(); + vi.setSystemTime(mockedTimestamp); + getBrowser = vi.fn().mockReturnValue("Chrome"); }); - afterEach(() => { - jasmine.clock().uninstall(); + vi.useRealTimers(); }); it("returns page context", () => { - eventRegistry = createEventRegistry({ storage }); + eventRegistry = createEventRegistry({ + storage, + }); contextProvider = createContextProvider({ eventRegistry, window, getBrowser, }); - expect(contextProvider.getContext()).toEqual( - jasmine.objectContaining({ + expect.objectContaining({ "page.title": "My awesome website", "page.url": "https://my.web-site.net:8080/about?m=1&t=5&name=jimmy#home", @@ -67,15 +71,16 @@ describe("RulesEngine:createContextProvider", () => { ); }); it("returns referring page context", () => { - eventRegistry = createEventRegistry({ storage }); + eventRegistry = createEventRegistry({ + storage, + }); contextProvider = createContextProvider({ eventRegistry, window, getBrowser, }); - expect(contextProvider.getContext()).toEqual( - jasmine.objectContaining({ + expect.objectContaining({ "referringPage.url": "https://stage.applookout.net/", "referringPage.path": "/", "referringPage.query": "", @@ -87,29 +92,31 @@ describe("RulesEngine:createContextProvider", () => { ); }); it("returns browser context", () => { - eventRegistry = createEventRegistry({ storage }); + eventRegistry = createEventRegistry({ + storage, + }); contextProvider = createContextProvider({ eventRegistry, window, getBrowser, }); - expect(contextProvider.getContext()).toEqual( - jasmine.objectContaining({ + expect.objectContaining({ "browser.name": "Chrome", }), ); }); it("returns windows context", () => { - eventRegistry = createEventRegistry({ storage }); + eventRegistry = createEventRegistry({ + storage, + }); contextProvider = createContextProvider({ eventRegistry, window, getBrowser, }); - expect(contextProvider.getContext()).toEqual( - jasmine.objectContaining({ + expect.objectContaining({ "window.height": 100, "window.width": 100, "window.scrollY": 10, @@ -118,24 +125,31 @@ describe("RulesEngine:createContextProvider", () => { ); }); it("includes provided context passed in", () => { - eventRegistry = createEventRegistry({ storage }); + eventRegistry = createEventRegistry({ + storage, + }); contextProvider = createContextProvider({ eventRegistry, window, getBrowser, }); - - expect(contextProvider.getContext({ cool: "beans" })).toEqual( - jasmine.objectContaining({ + expect( + contextProvider.getContext({ + cool: "beans", + }), + ).toEqual( + expect.objectContaining({ cool: "beans", }), ); }); - it("includes events context", () => { const events = { abc: { - event: { id: "abc", type: "display" }, + event: { + id: "abc", + type: "display", + }, timestamp: new Date().getTime(), count: 1, }, @@ -148,9 +162,10 @@ describe("RulesEngine:createContextProvider", () => { window, getBrowser, }); - - expect(contextProvider.getContext({ cool: "beans" }).events).toEqual( - events, - ); + expect( + contextProvider.getContext({ + cool: "beans", + }).events, + ).toEqual(events); }); }); diff --git a/test/unit/specs/components/RulesEngine/createDecisionHistory.spec.js b/test/unit/specs/components/RulesEngine/createDecisionHistory.spec.js index 6da185a03..931a35a75 100644 --- a/test/unit/specs/components/RulesEngine/createDecisionHistory.spec.js +++ b/test/unit/specs/components/RulesEngine/createDecisionHistory.spec.js @@ -9,55 +9,71 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, afterEach, describe, it, expect } from "vitest"; import createDecisionHistory from "../../../../../src/components/RulesEngine/createDecisionHistory.js"; import createEventRegistry from "../../../../../src/components/RulesEngine/createEventRegistry.js"; describe("RulesEngine:decisionHistory", () => { let storage; let history; - + let mockedTimestamp; beforeEach(() => { - storage = jasmine.createSpyObj("storage", ["getItem", "setItem", "clear"]); - + storage = { + getItem: vi.fn(), + setItem: vi.fn(), + clear: vi.fn(), + }; history = createDecisionHistory({ - eventRegistry: createEventRegistry({ storage }), + eventRegistry: createEventRegistry({ + storage, + }), }); + + mockedTimestamp = new Date("2023-05-24T08:00:00Z"); + vi.useFakeTimers(); + vi.setSystemTime(mockedTimestamp); }); - it("records decision time", () => { - const decision = history.recordQualified({ id: "abc" }); + afterEach(() => { + vi.useRealTimers(); + }); + it("records decision time", () => { + const decision = history.recordQualified({ + id: "abc", + }); expect(Object.getPrototypeOf(decision)).toEqual(Object.prototype); - expect(decision.timestamp).toEqual(jasmine.any(Number)); + expect(decision.timestamp).toEqual(expect.any(Number)); }); + it("preserves first decision time, if decision already recorded", () => { + const firstDecision = history.recordQualified({ + id: "abc", + }); - it("preserves first decision time, if decision already recorded", (done) => { - const firstDecision = history.recordQualified({ id: "abc" }); - - setTimeout(() => { - expect(history.recordQualified({ id: "abc" }).firstTimestamp).toEqual( - firstDecision.firstTimestamp, - ); - expect(history.recordQualified({ id: "abc" }).firstTimestamp).toEqual( - firstDecision.timestamp, - ); - done(); - }, 20); - }); + vi.advanceTimersByTime(60); + expect( + history.recordQualified({ + id: "abc", + }).firstTimestamp, + ).toEqual(firstDecision.firstTimestamp); + + expect( + history.recordQualified({ + id: "abc", + }).firstTimestamp, + ).toEqual(firstDecision.timestamp); + }); it("restores history from event storage", () => { expect(storage.getItem).toHaveBeenCalledWith("events"); }); + it("saves history to event storage", () => { + history.recordQualified({ + id: "abc", + }); - it("saves history to event storage", (done) => { - history.recordQualified({ id: "abc" }); + vi.advanceTimersByTime(60); - setTimeout(() => { - expect(storage.setItem).toHaveBeenCalledWith( - "events", - jasmine.any(String), - ); - done(); - }, 20); + expect(storage.setItem).toHaveBeenCalledWith("events", expect.any(String)); }); }); diff --git a/test/unit/specs/components/RulesEngine/createDecisionProvider.spec.js b/test/unit/specs/components/RulesEngine/createDecisionProvider.spec.js index 25c51b2ce..faac9d7d1 100644 --- a/test/unit/specs/components/RulesEngine/createDecisionProvider.spec.js +++ b/test/unit/specs/components/RulesEngine/createDecisionProvider.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createDecisionProvider from "../../../../../src/components/RulesEngine/createDecisionProvider.js"; import createEventRegistry from "../../../../../src/components/RulesEngine/createEventRegistry.js"; @@ -16,11 +17,18 @@ describe("RulesEngine:createDecisionProvider", () => { let decisionProvider; let storage; let eventRegistry; - beforeEach(() => { - storage = jasmine.createSpyObj("storage", ["getItem", "setItem", "clear"]); - eventRegistry = createEventRegistry({ storage }); - decisionProvider = createDecisionProvider({ eventRegistry }); + storage = { + getItem: vi.fn(), + setItem: vi.fn(), + clear: vi.fn(), + }; + eventRegistry = createEventRegistry({ + storage, + }); + decisionProvider = createDecisionProvider({ + eventRegistry, + }); decisionProvider.addPayloads([ { id: "2e4c7b28-b3e7-4d5b-ae6a-9ab0b44af87e", @@ -218,7 +226,10 @@ describe("RulesEngine:createDecisionProvider", () => { }); it("returns a single payload with items that qualify", () => { expect( - decisionProvider.evaluate({ color: "blue", action: "lipstick" }), + decisionProvider.evaluate({ + color: "blue", + action: "lipstick", + }), ).toEqual([ { id: "2e4c7b28-b3e7-4d5b-ae6a-9ab0b44af87e", @@ -250,7 +261,7 @@ describe("RulesEngine:createDecisionProvider", () => { }, prehidingSelector: "HTML > BODY > DIV:nth-of-type(2) > IMG:nth-of-type(1)", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "79129ecf-6430-4fbd-955a-b4f1dfdaa6fe", @@ -263,7 +274,7 @@ describe("RulesEngine:createDecisionProvider", () => { content: "Hello Treatment A!", prehidingSelector: "HTML > BODY > DIV:nth-of-type(1) > H1:nth-of-type(1)", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "10da709c-aa1a-40e5-84dd-966e2e8a1d5f", @@ -274,7 +285,9 @@ describe("RulesEngine:createDecisionProvider", () => { }); it("returns a different single payload with items that qualify", () => { expect( - decisionProvider.evaluate({ "xdm.web.webPageDetails.viewName": "home" }), + decisionProvider.evaluate({ + "xdm.web.webPageDetails.viewName": "home", + }), ).toEqual([ { scopeDetails: { @@ -302,7 +315,7 @@ describe("RulesEngine:createDecisionProvider", () => { type: "setHtml", content: "i can haz?", prehidingSelector: "div#spa #spa-content h3", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "8a0d7a45-70fb-4845-a093-2133b5744c8d", @@ -314,7 +327,7 @@ describe("RulesEngine:createDecisionProvider", () => { type: "setHtml", content: "ALL YOUR BASE ARE BELONG TO US", prehidingSelector: "div#spa #spa-content p", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "a44af51a-e073-4e8c-92e1-84ac28210043", @@ -361,7 +374,7 @@ describe("RulesEngine:createDecisionProvider", () => { }, prehidingSelector: "HTML > BODY > DIV:nth-of-type(2) > IMG:nth-of-type(1)", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "79129ecf-6430-4fbd-955a-b4f1dfdaa6fe", @@ -374,7 +387,7 @@ describe("RulesEngine:createDecisionProvider", () => { content: "Hello Treatment A!", prehidingSelector: "HTML > BODY > DIV:nth-of-type(1) > H1:nth-of-type(1)", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "10da709c-aa1a-40e5-84dd-966e2e8a1d5f", @@ -408,7 +421,7 @@ describe("RulesEngine:createDecisionProvider", () => { type: "setHtml", content: "i can haz?", prehidingSelector: "div#spa #spa-content h3", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "8a0d7a45-70fb-4845-a093-2133b5744c8d", @@ -420,7 +433,7 @@ describe("RulesEngine:createDecisionProvider", () => { type: "setHtml", content: "ALL YOUR BASE ARE BELONG TO US", prehidingSelector: "div#spa #spa-content p", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "a44af51a-e073-4e8c-92e1-84ac28210043", @@ -430,7 +443,6 @@ describe("RulesEngine:createDecisionProvider", () => { }, ]); }); - it("ignores payloads that aren't json-ruleset type", () => { decisionProvider.addPayload({ id: "AT:eyJhY3Rpdml0eUlkIjoiMTQxMDY0IiwiZXhwZXJpZW5jZUlkIjoiMCJ9", @@ -468,7 +480,6 @@ describe("RulesEngine:createDecisionProvider", () => { }, ], }); - expect(decisionProvider.evaluate()).toEqual([]); }); }); diff --git a/test/unit/specs/components/RulesEngine/createEvaluableRulesetPayload.spec.js b/test/unit/specs/components/RulesEngine/createEvaluableRulesetPayload.spec.js index 05de49c2a..c303a8b72 100644 --- a/test/unit/specs/components/RulesEngine/createEvaluableRulesetPayload.spec.js +++ b/test/unit/specs/components/RulesEngine/createEvaluableRulesetPayload.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createEvaluableRulesetPayload from "../../../../../src/components/RulesEngine/createEvaluableRulesetPayload.js"; import createEventRegistry from "../../../../../src/components/RulesEngine/createEventRegistry.js"; import createDecisionHistory from "../../../../../src/components/RulesEngine/createDecisionHistory.js"; @@ -17,13 +18,19 @@ describe("RulesEngine:createEvaluableRulesetPayload", () => { let storage; let eventRegistry; let decisionHistory; - beforeEach(() => { - storage = jasmine.createSpyObj("storage", ["getItem", "setItem", "clear"]); - eventRegistry = createEventRegistry({ storage }); - decisionHistory = createDecisionHistory({ eventRegistry }); + storage = { + getItem: vi.fn(), + setItem: vi.fn(), + clear: vi.fn(), + }; + eventRegistry = createEventRegistry({ + storage, + }); + decisionHistory = createDecisionHistory({ + eventRegistry, + }); }); - it("consumes ruleset-items", () => { const evaluableRulesetPayload = createEvaluableRulesetPayload( { @@ -132,9 +139,11 @@ describe("RulesEngine:createEvaluableRulesetPayload", () => { eventRegistry, decisionHistory, ); - expect( - evaluableRulesetPayload.evaluate({ color: "orange", action: "lipstick" }), + evaluableRulesetPayload.evaluate({ + color: "orange", + action: "lipstick", + }), ).toEqual({ scopeDetails: { decisionProvider: "AJO", @@ -164,7 +173,7 @@ describe("RulesEngine:createEvaluableRulesetPayload", () => { }, prehidingSelector: "HTML > BODY > DIV:nth-of-type(2) > IMG:nth-of-type(1)", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "79129ecf-6430-4fbd-955a-b4f1dfdaa6fe", @@ -177,7 +186,7 @@ describe("RulesEngine:createEvaluableRulesetPayload", () => { content: "Hello Treatment A!", prehidingSelector: "HTML > BODY > DIV:nth-of-type(1) > H1:nth-of-type(1)", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "10da709c-aa1a-40e5-84dd-966e2e8a1d5f", @@ -186,7 +195,6 @@ describe("RulesEngine:createEvaluableRulesetPayload", () => { scope: "web://mywebsite.com", }); }); - it("consumes json-content-items", () => { const evaluableRulesetPayload = createEvaluableRulesetPayload( { @@ -297,9 +305,11 @@ describe("RulesEngine:createEvaluableRulesetPayload", () => { eventRegistry, decisionHistory, ); - expect( - evaluableRulesetPayload.evaluate({ color: "orange", action: "lipstick" }), + evaluableRulesetPayload.evaluate({ + color: "orange", + action: "lipstick", + }), ).toEqual({ scopeDetails: { decisionProvider: "AJO", @@ -329,7 +339,7 @@ describe("RulesEngine:createEvaluableRulesetPayload", () => { }, prehidingSelector: "HTML > BODY > DIV:nth-of-type(2) > IMG:nth-of-type(1)", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "79129ecf-6430-4fbd-955a-b4f1dfdaa6fe", @@ -342,7 +352,7 @@ describe("RulesEngine:createEvaluableRulesetPayload", () => { content: "Hello Treatment A!", prehidingSelector: "HTML > BODY > DIV:nth-of-type(1) > H1:nth-of-type(1)", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "10da709c-aa1a-40e5-84dd-966e2e8a1d5f", diff --git a/test/unit/specs/components/RulesEngine/createEvaluateRulesetsCommand.spec.js b/test/unit/specs/components/RulesEngine/createEvaluateRulesetsCommand.spec.js index eb0aad99b..ae1b3225f 100644 --- a/test/unit/specs/components/RulesEngine/createEvaluateRulesetsCommand.spec.js +++ b/test/unit/specs/components/RulesEngine/createEvaluateRulesetsCommand.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createEvaluateRulesetsCommand from "../../../../../src/components/RulesEngine/createEvaluateRulesetsCommand.js"; import createContextProvider from "../../../../../src/components/RulesEngine/createContextProvider.js"; import createEventRegistry from "../../../../../src/components/RulesEngine/createEventRegistry.js"; @@ -25,21 +26,30 @@ describe("RulesEngine:evaluateRulesetsCommand", () => { let contextProvider; let decisionProvider; let evaluateRulesetsCommand; - beforeEach(() => { - onDecision = jasmine.createSpy(); - applyResponse = createApplyResponse({ onDecision }); - - storage = jasmine.createSpyObj("storage", ["getItem", "setItem", "clear"]); - eventRegistry = createEventRegistry({ storage }); - getBrowser = injectGetBrowser({ userAgent: window.navigator.userAgent }); + onDecision = vi.fn(); + applyResponse = createApplyResponse({ + onDecision, + }); + storage = { + getItem: vi.fn(), + setItem: vi.fn(), + clear: vi.fn(), + }; + eventRegistry = createEventRegistry({ + storage, + }); + getBrowser = injectGetBrowser({ + userAgent: window.navigator.userAgent, + }); contextProvider = createContextProvider({ eventRegistry, window, getBrowser, }); - decisionProvider = createDecisionProvider({ eventRegistry }); - + decisionProvider = createDecisionProvider({ + eventRegistry, + }); decisionProvider.addPayload({ id: "2e4c7b28-b3e7-4d5b-ae6a-9ab0b44af87e", scopeDetails: { @@ -114,20 +124,20 @@ describe("RulesEngine:evaluateRulesetsCommand", () => { ], scope: "web://mywebsite.com", }); - evaluateRulesetsCommand = createEvaluateRulesetsCommand({ contextProvider, decisionProvider, }); }); - it("onDecisions receives renderDecisions=true", () => { const result = evaluateRulesetsCommand.run({ renderDecisions: true, - decisionContext: { color: "orange", action: "greet" }, + decisionContext: { + color: "orange", + action: "greet", + }, applyResponse, }); - const expectedResult = { propositions: [ { @@ -148,7 +158,7 @@ describe("RulesEngine:evaluateRulesetsCommand", () => { }, prehidingSelector: "HTML > BODY > DIV:nth-of-type(2) > IMG:nth-of-type(1)", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "79129ecf-6430-4fbd-955a-b4f1dfdaa6fe", @@ -158,22 +168,22 @@ describe("RulesEngine:evaluateRulesetsCommand", () => { }, ], }; - expect(result).toEqual(expectedResult); - expect(onDecision).toHaveBeenCalledOnceWith({ + expect(onDecision).toHaveBeenNthCalledWith(1, { renderDecisions: true, event: undefined, personalization: undefined, ...expectedResult, }); }); - it("onDecisions receives renderDecisions=false", () => { const result = evaluateRulesetsCommand.run({ - decisionContext: { color: "orange", action: "greet" }, + decisionContext: { + color: "orange", + action: "greet", + }, applyResponse, }); - const expectedResult = { propositions: [ { @@ -194,7 +204,7 @@ describe("RulesEngine:evaluateRulesetsCommand", () => { }, prehidingSelector: "HTML > BODY > DIV:nth-of-type(2) > IMG:nth-of-type(1)", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "79129ecf-6430-4fbd-955a-b4f1dfdaa6fe", @@ -204,9 +214,8 @@ describe("RulesEngine:evaluateRulesetsCommand", () => { }, ], }; - expect(result).toEqual(expectedResult); - expect(onDecision).toHaveBeenCalledOnceWith({ + expect(onDecision).toHaveBeenNthCalledWith(1, { renderDecisions: false, event: undefined, personalization: undefined, diff --git a/test/unit/specs/components/RulesEngine/createEventRegistry.spec.js b/test/unit/specs/components/RulesEngine/createEventRegistry.spec.js index beb8a6e7a..2a6ece033 100644 --- a/test/unit/specs/components/RulesEngine/createEventRegistry.spec.js +++ b/test/unit/specs/components/RulesEngine/createEventRegistry.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, afterEach, describe, it, expect } from "vitest"; import createEventRegistry, { createEventPruner, } from "../../../../../src/components/RulesEngine/createEventRegistry.js"; @@ -17,19 +18,22 @@ describe("RulesEngine:createEventRegistry", () => { let storage; let mockedTimestamp; beforeEach(() => { - storage = jasmine.createSpyObj("storage", ["getItem", "setItem", "clear"]); + storage = { + getItem: vi.fn(), + setItem: vi.fn(), + clear: vi.fn(), + }; mockedTimestamp = new Date("2023-05-24T08:00:00Z"); - jasmine.clock().install(); - jasmine.clock().mockDate(mockedTimestamp); + vi.useFakeTimers(); + vi.setSystemTime(mockedTimestamp); }); - afterEach(() => { - jasmine.clock().uninstall(); + vi.useRealTimers(); }); - it("registers events", () => { - const eventRegistry = createEventRegistry({ storage }); - + const eventRegistry = createEventRegistry({ + storage, + }); const getContent = () => ({ xdm: { eventType: "decisioning.propositionDisplay", @@ -77,39 +81,37 @@ describe("RulesEngine:createEventRegistry", () => { }, }, }); - const event = { getContent, }; - eventRegistry.addExperienceEdgeEvent(event); expect(eventRegistry.toJSON()).toEqual({ display: { "111#aaa": { - event: jasmine.objectContaining({ + event: expect.objectContaining({ "iam.id": "111#aaa", "iam.eventType": "display", }), - firstTimestamp: jasmine.any(Number), - timestamp: jasmine.any(Number), + firstTimestamp: expect.any(Number), + timestamp: expect.any(Number), count: 1, }, "222#bbb": { - event: jasmine.objectContaining({ + event: expect.objectContaining({ "iam.id": "222#bbb", "iam.eventType": "display", }), - firstTimestamp: jasmine.any(Number), - timestamp: jasmine.any(Number), + firstTimestamp: expect.any(Number), + timestamp: expect.any(Number), count: 1, }, }, }); }); - it("does not register invalid events", () => { - const eventRegistry = createEventRegistry({ storage }); - + const eventRegistry = createEventRegistry({ + storage, + }); eventRegistry.addExperienceEdgeEvent({ getContent: () => ({ xdm: { @@ -138,21 +140,24 @@ describe("RulesEngine:createEventRegistry", () => { eventRegistry.addExperienceEdgeEvent({ getContent: () => ({}), }); - expect(eventRegistry.toJSON()).toEqual({}); }); - it("does not register events without type and id", () => { - const eventRegistry = createEventRegistry({ storage }); - + const eventRegistry = createEventRegistry({ + storage, + }); expect(eventRegistry.addEvent({}, "trigger")).toBeUndefined(); expect(eventRegistry.addEvent({}, "trigger", undefined)).toBeUndefined(); expect(eventRegistry.addEvent({})).toBeUndefined(); - expect(eventRegistry.toJSON()).toEqual({}); - expect( - eventRegistry.addEvent({ something: "special" }, "display", "abc#123"), + eventRegistry.addEvent( + { + something: "special", + }, + "display", + "abc#123", + ), ).toEqual({ event: { "iam.id": "abc#123", @@ -160,11 +165,10 @@ describe("RulesEngine:createEventRegistry", () => { "iam.action": undefined, something: "special", }, - firstTimestamp: jasmine.any(Number), - timestamp: jasmine.any(Number), + firstTimestamp: expect.any(Number), + timestamp: expect.any(Number), count: 1, }); - expect(eventRegistry.toJSON()).toEqual({ display: { "abc#123": { @@ -174,17 +178,17 @@ describe("RulesEngine:createEventRegistry", () => { "iam.action": undefined, something: "special", }, - firstTimestamp: jasmine.any(Number), - timestamp: jasmine.any(Number), + firstTimestamp: expect.any(Number), + timestamp: expect.any(Number), count: 1, }, }, }); }); - - it("increments count and sets timestamp", (done) => { - const eventRegistry = createEventRegistry({ storage }); - + it("increments count and sets timestamp", () => { + const eventRegistry = createEventRegistry({ + storage, + }); const getContent = () => ({ xdm: { eventType: "decisioning.propositionDisplay", @@ -210,54 +214,47 @@ describe("RulesEngine:createEventRegistry", () => { }, }, }); - const event = { getContent, }; let lastEventTime = 0; eventRegistry.addExperienceEdgeEvent(event); expect(eventRegistry.getEvent("display", "111#aaa")).toEqual({ - event: jasmine.objectContaining({ + event: expect.objectContaining({ "iam.id": "111#aaa", "iam.eventType": "display", }), - firstTimestamp: jasmine.any(Number), - timestamp: jasmine.any(Number), + firstTimestamp: expect.any(Number), + timestamp: expect.any(Number), count: 1, }); expect( eventRegistry.getEvent("display", "111#aaa").timestamp, ).toBeGreaterThan(lastEventTime); - lastEventTime = eventRegistry.getEvent("display", "111#aaa").timestamp; - setTimeout(() => { eventRegistry.addExperienceEdgeEvent(event); // again expect(eventRegistry.getEvent("display", "111#aaa")).toEqual({ - event: jasmine.objectContaining({ + event: expect.objectContaining({ "iam.id": "111#aaa", "iam.eventType": "display", }), - firstTimestamp: jasmine.any(Number), - timestamp: jasmine.any(Number), + firstTimestamp: expect.any(Number), + timestamp: expect.any(Number), count: 2, }); expect( eventRegistry.getEvent("display", "111#aaa").timestamp, ).toBeGreaterThan(lastEventTime); - done(); }, 50); - - jasmine.clock().tick(60); + vi.advanceTimersByTime(60); }); - it("limits events to 1000 events", () => { const prune = createEventPruner(); const events = {}; events["decisioning.propositionDisplay"] = {}; events["decisioning.propositionInteract"] = {}; - for (let i = 0; i < 2000; i += 1) { events["decisioning.propositionDisplay"][i] = { event: { @@ -268,7 +265,6 @@ describe("RulesEngine:createEventRegistry", () => { timestamp: mockedTimestamp, count: 1, }; - events["decisioning.propositionInteract"][i] = { event: { "iam.id": i, @@ -278,23 +274,19 @@ describe("RulesEngine:createEventRegistry", () => { timestamp: mockedTimestamp, count: 1, }; - const pruned = prune(events); const interactEvents = Object.values( pruned["decisioning.propositionInteract"], ); - const displayEvents = Object.values( pruned["decisioning.propositionDisplay"], ); expect(interactEvents.length).not.toBeGreaterThan(1000); expect(displayEvents.length).not.toBeGreaterThan(1000); - if (i > 1000) { expect(interactEvents[0].event["iam.id"]).toEqual(i - 999); expect(displayEvents[0].event["iam.id"]).toEqual(i - 999); } - if (i > 0) { expect( interactEvents[0].timestamp < @@ -307,13 +299,10 @@ describe("RulesEngine:createEventRegistry", () => { } } }); - it("has configurable limits", () => { const prune = createEventPruner(10); - const events = {}; events["decisioning.propositionDisplay"] = {}; - for (let i = 0; i < 20; i += 1) { events["decisioning.propositionDisplay"][i] = { event: { @@ -324,20 +313,15 @@ describe("RulesEngine:createEventRegistry", () => { timestamp: 1, count: 1, }; - const pruned = prune(events); - const displayEvents = Object.values( pruned["decisioning.propositionDisplay"], ); - expect(displayEvents.length).not.toBeGreaterThan(10); } }); - it("should filter events based on expiration date", () => { const pruner = createEventPruner(4, 2); - const events = {}; events["decisioning.propositionDisplay"] = { 1: { @@ -379,7 +363,6 @@ describe("RulesEngine:createEventRegistry", () => { count: 1, }, }; - const prunedEvents = pruner(events); expect(prunedEvents).toEqual({ "decisioning.propositionDisplay": { diff --git a/test/unit/specs/components/RulesEngine/createOnResponseHandler.spec.js b/test/unit/specs/components/RulesEngine/createOnResponseHandler.spec.js index ba3075834..65893c439 100644 --- a/test/unit/specs/components/RulesEngine/createOnResponseHandler.spec.js +++ b/test/unit/specs/components/RulesEngine/createOnResponseHandler.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createOnResponseHandler from "../../../../../src/components/RulesEngine/createOnResponseHandler.js"; import createDecisionProvider from "../../../../../src/components/RulesEngine/createDecisionProvider.js"; import createApplyResponse from "../../../../../src/components/RulesEngine/createApplyResponse.js"; @@ -20,18 +21,23 @@ describe("RulesEngine:createOnResponseHandler", () => { let eventRegistry; let decisionProvider; let applyResponse; - beforeEach(() => { - lifecycle = jasmine.createSpyObj("lifecycle", { - onDecision: Promise.resolve(), + lifecycle = { + onDecision: vi.fn().mockReturnValue(Promise.resolve()), + }; + storage = { + getItem: vi.fn(), + setItem: vi.fn(), + clear: vi.fn(), + }; + eventRegistry = createEventRegistry({ + storage, + }); + decisionProvider = createDecisionProvider({ + eventRegistry, }); - - storage = jasmine.createSpyObj("storage", ["getItem", "setItem", "clear"]); - eventRegistry = createEventRegistry({ storage }); - decisionProvider = createDecisionProvider({ eventRegistry }); applyResponse = createApplyResponse(lifecycle); }); - it("calls lifecycle.onDecision with propositions based on decisionContext", () => { const event = { getViewName: () => undefined, @@ -60,13 +66,13 @@ describe("RulesEngine:createOnResponseHandler", () => { }, }), }; - const decisionContext = { color: "orange", action: "lipstick", }; - const personalization = { surfaces: ["#woof"] }; - + const personalization = { + surfaces: ["#woof"], + }; const responseHandler = createOnResponseHandler({ renderDecisions: true, decisionProvider, @@ -75,7 +81,6 @@ describe("RulesEngine:createOnResponseHandler", () => { personalization, decisionContext, }); - const response = { getPayloadsByType: () => [ { @@ -172,11 +177,9 @@ describe("RulesEngine:createOnResponseHandler", () => { }, ], }; - responseHandler({ response, }); - expect(lifecycle.onDecision).toHaveBeenCalledWith({ event, personalization, @@ -200,7 +203,7 @@ describe("RulesEngine:createOnResponseHandler", () => { }, prehidingSelector: "HTML > BODY > DIV:nth-of-type(2) > IMG:nth-of-type(1)", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "79129ecf-6430-4fbd-955a-b4f1dfdaa6fe", @@ -214,7 +217,7 @@ describe("RulesEngine:createOnResponseHandler", () => { content: "Hello Treatment A!", prehidingSelector: "HTML > BODY > DIV:nth-of-type(1) > H1:nth-of-type(1)", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "10da709c-aa1a-40e5-84dd-966e2e8a1d5f", @@ -225,7 +228,6 @@ describe("RulesEngine:createOnResponseHandler", () => { ], }); }); - it("calls lifecycle.onDecision with propositions based on xdm and event data", () => { const event = { getViewName: () => "home", @@ -254,11 +256,8 @@ describe("RulesEngine:createOnResponseHandler", () => { }, }), }; - const decisionContext = {}; - const personalization = {}; - const responseHandler = createOnResponseHandler({ renderDecisions: true, decisionProvider, @@ -267,7 +266,6 @@ describe("RulesEngine:createOnResponseHandler", () => { personalization, decisionContext, }); - const response = { getPayloadsByType: () => [ { @@ -353,11 +351,9 @@ describe("RulesEngine:createOnResponseHandler", () => { }, ], }; - responseHandler({ response, }); - expect(lifecycle.onDecision).toHaveBeenCalledWith({ renderDecisions: true, propositions: [ @@ -378,7 +374,7 @@ describe("RulesEngine:createOnResponseHandler", () => { content: "Hello Treatment A!", prehidingSelector: "HTML > BODY > DIV:nth-of-type(1) > H1:nth-of-type(1)", - qualifiedDate: jasmine.any(Number), + qualifiedDate: expect.any(Number), displayedDate: undefined, }, id: "10da709c-aa1a-40e5-84dd-966e2e8a1d5f", diff --git a/test/unit/specs/components/RulesEngine/createSubscribeRulesetItems.spec.js b/test/unit/specs/components/RulesEngine/createSubscribeRulesetItems.spec.js index b14c4cb0f..1c51b43bf 100644 --- a/test/unit/specs/components/RulesEngine/createSubscribeRulesetItems.spec.js +++ b/test/unit/specs/components/RulesEngine/createSubscribeRulesetItems.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import { DOM_ACTION, MESSAGE_CONTENT_CARD, @@ -19,7 +20,6 @@ import { PropositionEventType } from "../../../../../src/constants/propositionEv describe("RulesEngine:subscribeRulesetItems", () => { let collect; let subscribeRulesetItems; - const PROPOSITIONS = [ { id: "abc", @@ -110,7 +110,6 @@ describe("RulesEngine:subscribeRulesetItems", () => { data: { expiryDate: 1712190456, publishedDate: 1677839040000, - meta: { surface: "web://mywebsite.com/my-cards", }, @@ -194,25 +193,22 @@ describe("RulesEngine:subscribeRulesetItems", () => { }, }, ]; - beforeEach(() => { - collect = jasmine.createSpy().and.returnValue(Promise.resolve()); - subscribeRulesetItems = createSubscribeRulesetItems({ collect }); + collect = vi.fn().mockReturnValue(Promise.resolve()); + subscribeRulesetItems = createSubscribeRulesetItems({ + collect, + }); }); - it("has a command defined", () => { const { command } = subscribeRulesetItems; - expect(command).toEqual({ - optionsValidator: jasmine.any(Function), - run: jasmine.any(Function), + optionsValidator: expect.any(Function), + run: expect.any(Function), }); }); - it("calls the callback with list of content cards", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy("callback"); + const callback = vi.fn(); // register a subscription. equivalent to alloy("subscribeRulesetItems", ... command.run({ @@ -220,9 +216,9 @@ describe("RulesEngine:subscribeRulesetItems", () => { schemas: [MESSAGE_CONTENT_CARD], callback, }); - refresh(PROPOSITIONS); - expect(callback).toHaveBeenCalledOnceWith( + expect(callback).toHaveBeenNthCalledWith( + 1, { propositions: [ { @@ -342,23 +338,20 @@ describe("RulesEngine:subscribeRulesetItems", () => { }, ], }, - jasmine.any(Function), + expect.any(Function), ); }); - it("calls the callback with list of content cards at time of subscription (when there are existing propositions)", () => { const { command, refresh } = subscribeRulesetItems; refresh(PROPOSITIONS); - - const callback = jasmine.createSpy("callback"); - + const callback = vi.fn(); command.run({ surfaces: ["web://mywebsite.com/my-cards"], schemas: [MESSAGE_CONTENT_CARD], callback, }); - - expect(callback).toHaveBeenCalledOnceWith( + expect(callback).toHaveBeenNthCalledWith( + 1, { propositions: [ { @@ -478,14 +471,12 @@ describe("RulesEngine:subscribeRulesetItems", () => { }, ], }, - jasmine.any(Function), + expect.any(Function), ); }); - it("calls the callback with list of dom action items", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); + const callback = vi.fn(); // register a subscription. equivalent to alloy("subscribeRulesetItems", ... command.run({ @@ -493,9 +484,9 @@ describe("RulesEngine:subscribeRulesetItems", () => { schemas: [DOM_ACTION], callback, }); - refresh(PROPOSITIONS); - expect(callback).toHaveBeenCalledOnceWith( + expect(callback).toHaveBeenNthCalledWith( + 1, { propositions: [ { @@ -539,23 +530,20 @@ describe("RulesEngine:subscribeRulesetItems", () => { }, ], }, - jasmine.any(Function), + expect.any(Function), ); }); - it("calls the callback with list of dom action items at time of subscription (when there are existing propositions)", () => { const { command, refresh } = subscribeRulesetItems; refresh(PROPOSITIONS); - - const callback = jasmine.createSpy("callback"); - + const callback = vi.fn(); command.run({ surfaces: ["web://mywebsite.com/my-cards"], schemas: [DOM_ACTION], callback, }); - - expect(callback).toHaveBeenCalledOnceWith( + expect(callback).toHaveBeenNthCalledWith( + 1, { propositions: [ { @@ -599,23 +587,21 @@ describe("RulesEngine:subscribeRulesetItems", () => { }, ], }, - jasmine.any(Function), + expect.any(Function), ); }); - it("calls the callback with list of all schema-based items for single schema", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); + const callback = vi.fn(); // register a subscription. equivalent to alloy("subscribeRulesetItems", ... command.run({ surfaces: ["web://mywebsite.com/my-cards"], callback, }); - refresh(PROPOSITIONS); - expect(callback).toHaveBeenCalledOnceWith( + expect(callback).toHaveBeenNthCalledWith( + 1, { propositions: [ { @@ -774,14 +760,12 @@ describe("RulesEngine:subscribeRulesetItems", () => { }, ], }, - jasmine.any(Function), + expect.any(Function), ); }); - it("filters out all surfaces", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy("callback"); + const callback = vi.fn(); // register a subscription. equivalent to alloy("subscribeRulesetItems", ... command.run({ @@ -789,33 +773,33 @@ describe("RulesEngine:subscribeRulesetItems", () => { schemas: [MESSAGE_CONTENT_CARD], callback, }); - refresh(PROPOSITIONS); - expect(callback).toHaveBeenCalledOnceWith( - { propositions: [] }, - jasmine.any(Function), + expect(callback).toHaveBeenNthCalledWith( + 1, + { + propositions: [], + }, + expect.any(Function), ); }); - it("filters on surface", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); + const callback = vi.fn(); // register a subscription. equivalent to alloy("subscribeRulesetItems", ... command.run({ surfaces: ["web://something.com"], callback, }); - refresh(PROPOSITIONS); - expect(callback).toHaveBeenCalledOnceWith( + expect(callback).toHaveBeenNthCalledWith( + 1, { propositions: [ { id: "abc", items: [ - jasmine.objectContaining({ + expect.objectContaining({ schema: DOM_ACTION, data: { selector: "a", @@ -837,22 +821,20 @@ describe("RulesEngine:subscribeRulesetItems", () => { }, ], }, - jasmine.any(Function), + expect.any(Function), ); }); - it("returns all surfaces and schemas", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); + const callback = vi.fn(); // register a subscription. equivalent to alloy("subscribeRulesetItems", ... command.run({ callback, }); - refresh(PROPOSITIONS); - expect(callback).toHaveBeenCalledOnceWith( + expect(callback).toHaveBeenNthCalledWith( + 1, { propositions: [ { @@ -1034,147 +1016,134 @@ describe("RulesEngine:subscribeRulesetItems", () => { }, ], }, - jasmine.any(Function), + expect.any(Function), ); }); - it("does not invoke callback if unsubscribed", async () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy("callback"); + const callback = vi.fn(); // register a subscription. equivalent to alloy("subscribeRulesetItems", ... const { unsubscribe } = await command.run({ callback, }); - - expect(unsubscribe instanceof Function).toBeTrue(); + expect(unsubscribe instanceof Function).toBe(true); unsubscribe(); - refresh(PROPOSITIONS); expect(callback).not.toHaveBeenCalled(); }); - it("collects interact events", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); - - command.run({ surface: "web://mywebsite.com/my-cards", callback }); - + const callback = vi.fn(); + command.run({ + surface: "web://mywebsite.com/my-cards", + callback, + }); refresh(PROPOSITIONS); - - const [{ propositions = [] }, collectEvent] = callback.calls.first().args; - + const [{ propositions = [] }, collectEvent] = callback.mock.calls[0]; collectEvent(PropositionEventType.INTERACT, [propositions[0]]); - expect(collect).toHaveBeenCalledWith({ decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, ], eventType: "decisioning.propositionInteract", documentMayUnload: true, }); }); - it("collects only one interact event per proposition", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); - - command.run({ surface: "web://mywebsite.com/my-cards", callback }); - + const callback = vi.fn(); + command.run({ + surface: "web://mywebsite.com/my-cards", + callback, + }); refresh(PROPOSITIONS); - - const [{ propositions = [] }, collectEvent] = callback.calls.first().args; - + const [{ propositions = [] }, collectEvent] = callback.mock.calls[0]; collectEvent(PropositionEventType.INTERACT, [ propositions[0], propositions[0], propositions[0], ]); - expect(collect).toHaveBeenCalledWith({ decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, ], eventType: "decisioning.propositionInteract", documentMayUnload: true, }); }); - it("collects separate interact events for each distinct proposition", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); - - command.run({ surface: "web://mywebsite.com/my-cards", callback }); - + const callback = vi.fn(); + command.run({ + surface: "web://mywebsite.com/my-cards", + callback, + }); refresh(PROPOSITIONS); - - const [{ propositions = [] }, collectEvent] = callback.calls.first().args; - + const [{ propositions = [] }, collectEvent] = callback.mock.calls[0]; collectEvent(PropositionEventType.INTERACT, [propositions[0]]); - expect(collect).toHaveBeenCalledWith({ decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, ], eventType: "decisioning.propositionInteract", documentMayUnload: true, }); - collectEvent(PropositionEventType.INTERACT, [propositions[0]]); - expect(collect).toHaveBeenCalledWith({ decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, ], eventType: "decisioning.propositionInteract", documentMayUnload: true, }); - expect(collect).toHaveBeenCalledTimes(2); }); - it("collects multiple interact events for distinct propositions", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); - - command.run({ surface: "web://mywebsite.com/my-cards", callback }); - + const callback = vi.fn(); + command.run({ + surface: "web://mywebsite.com/my-cards", + callback, + }); refresh(PROPOSITIONS); - - const [{ propositions = [] }, collectEvent] = callback.calls.first().args; - + const [{ propositions = [] }, collectEvent] = callback.mock.calls[0]; collectEvent(PropositionEventType.INTERACT, [ propositions[0], propositions[1], ]); - - expect(collect).toHaveBeenCalledOnceWith({ + expect(collect).toHaveBeenNthCalledWith(1, { decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, { id: "2e4c7b28-b3e7-4d5b-ae6a-9ab0b44af87e", @@ -1188,85 +1157,79 @@ describe("RulesEngine:subscribeRulesetItems", () => { documentMayUnload: true, }); }); - it("collects display events", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); - - command.run({ surface: "web://mywebsite.com/my-cards", callback }); - + const callback = vi.fn(); + command.run({ + surface: "web://mywebsite.com/my-cards", + callback, + }); refresh(PROPOSITIONS); - - const [{ propositions = [] }, collectEvent] = callback.calls.first().args; - + const [{ propositions = [] }, collectEvent] = callback.mock.calls[0]; collectEvent(PropositionEventType.DISPLAY, [propositions[0]]); - expect(collect).toHaveBeenCalledWith({ decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, ], eventType: "decisioning.propositionDisplay", documentMayUnload: true, }); }); - it("collects only one display event per proposition", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); - - command.run({ surface: "web://mywebsite.com/my-cards", callback }); - + const callback = vi.fn(); + command.run({ + surface: "web://mywebsite.com/my-cards", + callback, + }); refresh(PROPOSITIONS); - - const [{ propositions = [] }, collectEvent] = callback.calls.first().args; - + const [{ propositions = [] }, collectEvent] = callback.mock.calls[0]; collectEvent(PropositionEventType.DISPLAY, [propositions[0]]); collectEvent(PropositionEventType.DISPLAY, [ propositions[0], propositions[0], ]); - - expect(collect).toHaveBeenCalledOnceWith({ + expect(collect).toHaveBeenNthCalledWith(1, { decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, ], eventType: "decisioning.propositionDisplay", documentMayUnload: true, }); }); - it("collects multiple display events for distinct propositions", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); - - command.run({ surface: "web://mywebsite.com/my-cards", callback }); - + const callback = vi.fn(); + command.run({ + surface: "web://mywebsite.com/my-cards", + callback, + }); refresh(PROPOSITIONS); - - const [{ propositions = [] }, collectEvent] = callback.calls.first().args; - + const [{ propositions = [] }, collectEvent] = callback.mock.calls[0]; collectEvent(PropositionEventType.DISPLAY, [ propositions[0], propositions[1], ]); - - expect(collect).toHaveBeenCalledOnceWith({ + expect(collect).toHaveBeenNthCalledWith(1, { decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, { id: "2e4c7b28-b3e7-4d5b-ae6a-9ab0b44af87e", @@ -1280,38 +1243,33 @@ describe("RulesEngine:subscribeRulesetItems", () => { documentMayUnload: true, }); }); - it("collects display events only once per session", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); - - command.run({ surface: "web://mywebsite.com/my-cards", callback }); - + const callback = vi.fn(); + command.run({ + surface: "web://mywebsite.com/my-cards", + callback, + }); refresh(PROPOSITIONS); - - const [{ propositions = [] }, collectEvent] = callback.calls.first().args; - + const [{ propositions = [] }, collectEvent] = callback.mock.calls[0]; collectEvent(PropositionEventType.DISPLAY, [ propositions[0], propositions[1], ]); - collectEvent(PropositionEventType.DISPLAY, [ propositions[0], propositions[1], ]); - collectEvent(PropositionEventType.DISPLAY, [propositions[2]]); - expect(collect).toHaveBeenCalledTimes(2); - expect(collect).toHaveBeenCalledWith({ decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, { id: "2e4c7b28-b3e7-4d5b-ae6a-9ab0b44af87e", @@ -1324,140 +1282,132 @@ describe("RulesEngine:subscribeRulesetItems", () => { eventType: "decisioning.propositionDisplay", documentMayUnload: true, }); - expect(collect).toHaveBeenCalledWith({ decisionsMeta: [ { id: "1a3d874f-39ee-4310-bfa9-6559a10041a4", scope: "web://mywebsite.com/my-cards", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, ], eventType: "decisioning.propositionDisplay", documentMayUnload: true, }); }); - it("collects dismiss events", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); - - command.run({ surface: "web://mywebsite.com/my-cards", callback }); - + const callback = vi.fn(); + command.run({ + surface: "web://mywebsite.com/my-cards", + callback, + }); refresh(PROPOSITIONS); - - const [{ propositions = [] }, collectEvent] = callback.calls.first().args; - + const [{ propositions = [] }, collectEvent] = callback.mock.calls[0]; collectEvent(PropositionEventType.DISMISS, [propositions[0]]); - expect(collect).toHaveBeenCalledWith({ decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, ], documentMayUnload: true, eventType: "decisioning.propositionDismiss", }); }); - it("collects only one dismiss event per proposition", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); - - command.run({ surface: "web://mywebsite.com/my-cards", callback }); - + const callback = vi.fn(); + command.run({ + surface: "web://mywebsite.com/my-cards", + callback, + }); refresh(PROPOSITIONS); - - const [{ propositions = [] }, collectEvent] = callback.calls.first().args; - + const [{ propositions = [] }, collectEvent] = callback.mock.calls[0]; collectEvent(PropositionEventType.DISMISS, [ propositions[0], propositions[0], propositions[0], ]); - - expect(collect).toHaveBeenCalledOnceWith({ + expect(collect).toHaveBeenNthCalledWith(1, { decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, ], eventType: "decisioning.propositionDismiss", documentMayUnload: true, }); }); - it("collects separate dismiss events for each distinct proposition", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); - - command.run({ surface: "web://mywebsite.com/my-cards", callback }); - + const callback = vi.fn(); + command.run({ + surface: "web://mywebsite.com/my-cards", + callback, + }); refresh(PROPOSITIONS); - - const [{ propositions = [] }, collectEvent] = callback.calls.first().args; - + const [{ propositions = [] }, collectEvent] = callback.mock.calls[0]; collectEvent(PropositionEventType.DISMISS, [propositions[0]]); - expect(collect).toHaveBeenCalledWith({ decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, ], eventType: "decisioning.propositionDismiss", documentMayUnload: true, }); - collectEvent(PropositionEventType.DISMISS, [propositions[0]]); - expect(collect).toHaveBeenCalledWith({ decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, ], eventType: "decisioning.propositionDismiss", documentMayUnload: true, }); - expect(collect).toHaveBeenCalledTimes(2); }); - it("collects multiple dismiss events for distinct propositions", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy(); - - command.run({ surface: "web://mywebsite.com/my-cards", callback }); - + const callback = vi.fn(); + command.run({ + surface: "web://mywebsite.com/my-cards", + callback, + }); refresh(PROPOSITIONS); - - const [{ propositions = [] }, collectEvent] = callback.calls.first().args; - + const [{ propositions = [] }, collectEvent] = callback.mock.calls[0]; collectEvent(PropositionEventType.DISMISS, [ propositions[0], propositions[1], ]); - - expect(collect).toHaveBeenCalledOnceWith({ + expect(collect).toHaveBeenNthCalledWith(1, { decisionsMeta: [ { id: "abc", scope: "web://something.com", - scopeDetails: { decisionProvider: "AJO" }, + scopeDetails: { + decisionProvider: "AJO", + }, }, { id: "2e4c7b28-b3e7-4d5b-ae6a-9ab0b44af87e", @@ -1471,24 +1421,17 @@ describe("RulesEngine:subscribeRulesetItems", () => { documentMayUnload: true, }); }); - it("does not call collect event when there are no propositions", () => { const { command, refresh } = subscribeRulesetItems; - - const callback = jasmine.createSpy("callback"); - + const callback = vi.fn(); command.run({ surfaces: ["web://mywebsite.com/my-cards"], schemas: [MESSAGE_CONTENT_CARD], callback, }); - refresh([]); - - const [{ propositions = [] }, collectEvent] = callback.calls.first().args; - + const [{ propositions = [] }, collectEvent] = callback.mock.calls[0]; collectEvent(PropositionEventType.DISPLAY, propositions); - expect(collect).not.toHaveBeenCalled(); }); }); diff --git a/test/unit/specs/components/RulesEngine/decisioningContext.browser.spec.js b/test/unit/specs/components/RulesEngine/decisioningContext.browser.spec.js index b87da1c8d..8965d8ed7 100644 --- a/test/unit/specs/components/RulesEngine/decisioningContext.browser.spec.js +++ b/test/unit/specs/components/RulesEngine/decisioningContext.browser.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import { mockWindow, setupResponseHandler, @@ -18,7 +19,7 @@ import { describe("RulesEngine:globalContext:browser", () => { let applyResponse; beforeEach(() => { - applyResponse = jasmine.createSpy(); + applyResponse = vi.fn(); }); it("satisfies rule based on matched browser", () => { setupResponseHandler(applyResponse, mockWindow({}), { @@ -29,14 +30,13 @@ describe("RulesEngine:globalContext:browser", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched browser", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -46,9 +46,9 @@ describe("RulesEngine:globalContext:browser", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); diff --git a/test/unit/specs/components/RulesEngine/decisioningContext.page.spec.js b/test/unit/specs/components/RulesEngine/decisioningContext.page.spec.js index 7bc89133d..1131b7f71 100644 --- a/test/unit/specs/components/RulesEngine/decisioningContext.page.spec.js +++ b/test/unit/specs/components/RulesEngine/decisioningContext.page.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import { mockWindow, setupResponseHandler, @@ -18,9 +19,8 @@ import { describe("RulesEngine:globalContext:page", () => { let applyResponse; beforeEach(() => { - applyResponse = jasmine.createSpy(); + applyResponse = vi.fn(); }); - it("satisfies rule based on matched page url", () => { setupResponseHandler( applyResponse, @@ -38,14 +38,13 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched page url", () => { setupResponseHandler( applyResponse, @@ -63,14 +62,13 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfy rule based on matched domain", () => { setupResponseHandler( applyResponse, @@ -86,14 +84,13 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched domain", () => { setupResponseHandler( applyResponse, @@ -109,14 +106,13 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfied rule based on matched page subdomain", () => { setupResponseHandler( applyResponse, @@ -132,9 +128,9 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); @@ -155,14 +151,13 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched page topLevelDomain", () => { setupResponseHandler( applyResponse, @@ -178,14 +173,13 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched page topLevelDomain", () => { setupResponseHandler( applyResponse, @@ -201,14 +195,13 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched page path", () => { setupResponseHandler( applyResponse, @@ -224,14 +217,13 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched page path", () => { setupResponseHandler( applyResponse, @@ -247,14 +239,13 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched page query", () => { setupResponseHandler( applyResponse, @@ -270,14 +261,13 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched page query", () => { setupResponseHandler( applyResponse, @@ -293,14 +283,13 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched page fragment", () => { setupResponseHandler( applyResponse, @@ -316,14 +305,13 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched page fragment", () => { setupResponseHandler( applyResponse, @@ -339,9 +327,9 @@ describe("RulesEngine:globalContext:page", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); diff --git a/test/unit/specs/components/RulesEngine/decisioningContext.referringPage.spec.js b/test/unit/specs/components/RulesEngine/decisioningContext.referringPage.spec.js index da0df74df..14228ea22 100644 --- a/test/unit/specs/components/RulesEngine/decisioningContext.referringPage.spec.js +++ b/test/unit/specs/components/RulesEngine/decisioningContext.referringPage.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import { mockWindow, setupResponseHandler, @@ -18,9 +19,8 @@ import { describe("RulesEngine:globalContext:referringPage", () => { let applyResponse; beforeEach(() => { - applyResponse = jasmine.createSpy(); + applyResponse = vi.fn(); }); - it("satisfies rule based on matched domain", () => { setupResponseHandler( applyResponse, @@ -37,14 +37,13 @@ describe("RulesEngine:globalContext:referringPage", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched domain", () => { setupResponseHandler( applyResponse, @@ -61,14 +60,13 @@ describe("RulesEngine:globalContext:referringPage", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched referringPage subdomain", () => { setupResponseHandler( applyResponse, @@ -85,14 +83,13 @@ describe("RulesEngine:globalContext:referringPage", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched subdomain", () => { setupResponseHandler( applyResponse, @@ -109,14 +106,13 @@ describe("RulesEngine:globalContext:referringPage", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched referringPage topLevelDomain", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -126,14 +122,13 @@ describe("RulesEngine:globalContext:referringPage", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched topLevelDomain", () => { setupResponseHandler( applyResponse, @@ -150,14 +145,13 @@ describe("RulesEngine:globalContext:referringPage", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched referringPage path", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -167,14 +161,13 @@ describe("RulesEngine:globalContext:referringPage", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched referringPage path", () => { setupResponseHandler( applyResponse, @@ -191,14 +184,13 @@ describe("RulesEngine:globalContext:referringPage", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched referringPage query", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -208,14 +200,13 @@ describe("RulesEngine:globalContext:referringPage", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched referringPage query", () => { setupResponseHandler( applyResponse, @@ -232,14 +223,13 @@ describe("RulesEngine:globalContext:referringPage", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched referringPage fragment", () => { setupResponseHandler( applyResponse, @@ -256,14 +246,13 @@ describe("RulesEngine:globalContext:referringPage", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule based on unmatched referringPage fragment", () => { setupResponseHandler( applyResponse, @@ -279,8 +268,9 @@ describe("RulesEngine:globalContext:referringPage", () => { type: "matcher", }, ); - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); diff --git a/test/unit/specs/components/RulesEngine/decisioningContext.sdkVersion.spec.js b/test/unit/specs/components/RulesEngine/decisioningContext.sdkVersion.spec.js index b4c8ddc26..8b88b55e4 100644 --- a/test/unit/specs/components/RulesEngine/decisioningContext.sdkVersion.spec.js +++ b/test/unit/specs/components/RulesEngine/decisioningContext.sdkVersion.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import libraryVersion from "../../../../../src/constants/libraryVersion.js"; import { mockWindow, @@ -20,9 +21,8 @@ describe("RulesEngine:globalContext:sdkVersion", () => { let applyResponse; const currentVersion = libraryVersion; beforeEach(() => { - applyResponse = jasmine.createSpy(); + applyResponse = vi.fn(); }); - it("satisfies rule based on matched alloy sdk version", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -32,14 +32,13 @@ describe("RulesEngine:globalContext:sdkVersion", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched dk version", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -49,9 +48,9 @@ describe("RulesEngine:globalContext:sdkVersion", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); diff --git a/test/unit/specs/components/RulesEngine/decisioningContext.timestamp.spec.js b/test/unit/specs/components/RulesEngine/decisioningContext.timestamp.spec.js index 5fa4a6017..47e559dd9 100644 --- a/test/unit/specs/components/RulesEngine/decisioningContext.timestamp.spec.js +++ b/test/unit/specs/components/RulesEngine/decisioningContext.timestamp.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, afterEach, describe, it, expect } from "vitest"; import { mockWindow, setupResponseHandler, @@ -19,13 +20,14 @@ let mockedTimestamp; describe("RulesEngine:globalContext:timeContext", () => { let applyResponse; beforeEach(() => { - applyResponse = jasmine.createSpy(); + applyResponse = vi.fn(); mockedTimestamp = new Date(Date.UTC(2023, 4, 11, 13, 34, 56)); - jasmine.clock().install(); - jasmine.clock().mockDate(mockedTimestamp); + vi.useFakeTimers(); + vi.setSystemTime(mockedTimestamp); }); + afterEach(() => { - jasmine.clock().uninstall(); + vi.useRealTimers(); }); it("satisfies rule based on matched pageLoadTimestamp", () => { @@ -37,14 +39,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched pageLoadTimestamp", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -54,14 +55,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched currentTimestamp", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -71,14 +71,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched currentTimestamp", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -88,14 +87,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched currentDate", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -105,14 +103,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched currentDate", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -122,14 +119,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched currentDay", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -139,14 +135,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched currentDay", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -156,14 +151,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched currentHour", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -173,14 +167,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched currentHour", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -190,14 +183,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched currentMinute", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -207,14 +199,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched currentMinute", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -224,14 +215,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched currentMonth", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -241,14 +231,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched currentMonth", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -258,14 +247,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched currentYear", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -275,14 +263,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched currentYear", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -292,14 +279,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched pageVisitDuration", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -309,13 +295,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched pageVisitDuration", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -325,8 +311,9 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); @@ -340,14 +327,13 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("satisfies rule based on matched ~timestampz", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -357,9 +343,9 @@ describe("RulesEngine:globalContext:timeContext", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); diff --git a/test/unit/specs/components/RulesEngine/decisioningContext.window.spec.js b/test/unit/specs/components/RulesEngine/decisioningContext.window.spec.js index 9c032e78a..fc6eb8983 100644 --- a/test/unit/specs/components/RulesEngine/decisioningContext.window.spec.js +++ b/test/unit/specs/components/RulesEngine/decisioningContext.window.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import { mockWindow, setupResponseHandler, @@ -18,9 +19,8 @@ import { describe("RulesEngine:globalContext:window", () => { let applyResponse; beforeEach(() => { - applyResponse = jasmine.createSpy(); + applyResponse = vi.fn(); }); - it("satisfies rule based on matched window height", () => { setupResponseHandler(applyResponse, mockWindow({}), { definition: { @@ -30,14 +30,13 @@ describe("RulesEngine:globalContext:window", () => { }, type: "matcher", }); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched window height", () => { setupResponseHandler( applyResponse, @@ -53,14 +52,13 @@ describe("RulesEngine:globalContext:window", () => { type: "matcher", }, ); - - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched window width", () => { setupResponseHandler( applyResponse, @@ -76,13 +74,13 @@ describe("RulesEngine:globalContext:window", () => { type: "matcher", }, ); - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched window width", () => { setupResponseHandler( applyResponse, @@ -98,13 +96,13 @@ describe("RulesEngine:globalContext:window", () => { type: "matcher", }, ); - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched window scrollX", () => { setupResponseHandler( applyResponse, @@ -120,13 +118,13 @@ describe("RulesEngine:globalContext:window", () => { type: "matcher", }, ); - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [proposition], }), ); }); - it("does not satisfy rule due to unmatched window scrollX", () => { setupResponseHandler( applyResponse, @@ -142,13 +140,13 @@ describe("RulesEngine:globalContext:window", () => { type: "matcher", }, ); - expect(applyResponse).toHaveBeenCalledOnceWith( - jasmine.objectContaining({ + expect(applyResponse).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ propositions: [], }), ); }); - it("satisfies rule based on matched window scrollY", () => { setupResponseHandler( applyResponse, @@ -165,7 +163,6 @@ describe("RulesEngine:globalContext:window", () => { }, ); }); - it("does not satisfy rule due to unmatched window scrollY", () => { setupResponseHandler( applyResponse, diff --git a/test/unit/specs/components/RulesEngine/index.spec.js b/test/unit/specs/components/RulesEngine/index.spec.js index 59945682d..1719604d9 100644 --- a/test/unit/specs/components/RulesEngine/index.spec.js +++ b/test/unit/specs/components/RulesEngine/index.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createRulesEngine from "../../../../../src/components/RulesEngine/index.js"; import { defer } from "../../../../../src/utils/index.js"; import { @@ -25,22 +26,21 @@ describe("createRulesEngine:commands:evaluateRulesets", () => { let getBrowser; let persistentStorage; let createNamespacedStorage; - beforeEach(() => { - mergeData = jasmine.createSpy(); + mergeData = vi.fn(); awaitConsentDeferred = defer(); - consent = jasmine.createSpyObj("consent", { - awaitConsent: awaitConsentDeferred.promise, - }); - getBrowser = jasmine.createSpy().and.returnValue("foo"); + consent = { + awaitConsent: vi.fn().mockReturnValue(awaitConsentDeferred.promise), + }; + getBrowser = vi.fn().mockReturnValue("foo"); window.referrer = "https://www.google.com/search?q=adobe+journey+optimizer&oq=adobe+journey+optimizer"; - persistentStorage = jasmine.createSpyObj("persistentStorage", [ - "getItem", - "setItem", - "clear", - ]); - createNamespacedStorage = jasmine.createSpy().and.returnValue({ + persistentStorage = { + getItem: vi.fn(), + setItem: vi.fn(), + clear: vi.fn(), + }; + createNamespacedStorage = vi.fn().mockReturnValue({ persistent: persistentStorage, }); mockEvent = { @@ -50,7 +50,6 @@ describe("createRulesEngine:commands:evaluateRulesets", () => { mergeData, }; }); - const setUpDecisionEngine = ({ personalizationStorageEnabled }) => { const config = { orgId: "exampleOrgId", @@ -65,7 +64,6 @@ describe("createRulesEngine:commands:evaluateRulesets", () => { rulesEngine.lifecycle.onComponentsRegistered(() => {}); return rulesEngine; }; - it("should run the evaluateRulesets command and satisfy the rule based on global context", async () => { const rulesEngine = setUpDecisionEngine({ personalizationStorageEnabled: true, @@ -86,7 +84,9 @@ describe("createRulesEngine:commands:evaluateRulesets", () => { rulesEngine.lifecycle.onBeforeEvent({ event: mockEvent, renderDecisions: true, - personalization: { decisionContext: {} }, + personalization: { + decisionContext: {}, + }, onResponse: onResponseHandler, }); const result = rulesEngine.commands.evaluateRulesets.run({}); @@ -94,7 +94,6 @@ describe("createRulesEngine:commands:evaluateRulesets", () => { propositions: [proposition], }); }); - it("should run the evaluateRulesets command and does not satisfy rule due to unmatched global context", async () => { const rulesEngine = setUpDecisionEngine({ personalizationStorageEnabled: true, @@ -115,7 +114,9 @@ describe("createRulesEngine:commands:evaluateRulesets", () => { rulesEngine.lifecycle.onBeforeEvent({ event: mockEvent, renderDecisions: true, - personalization: { decisionContext: {} }, + personalization: { + decisionContext: {}, + }, onResponse: onResponseHandler, }); const result = rulesEngine.commands.evaluateRulesets.run({}); @@ -123,7 +124,6 @@ describe("createRulesEngine:commands:evaluateRulesets", () => { propositions: [], }); }); - it("should run the evaluateRulesets command and return propositions with renderDecisions true", async () => { const rulesEngine = setUpDecisionEngine({ personalizationStorageEnabled: true, @@ -144,7 +144,9 @@ describe("createRulesEngine:commands:evaluateRulesets", () => { rulesEngine.lifecycle.onBeforeEvent({ event: mockEvent, renderDecisions: true, - personalization: { decisionContext: {} }, + personalization: { + decisionContext: {}, + }, onResponse: onResponseHandler, }); const result = rulesEngine.commands.evaluateRulesets.run({}); @@ -152,7 +154,6 @@ describe("createRulesEngine:commands:evaluateRulesets", () => { propositions: [proposition], }); }); - it("should run the evaluateRulesets command returns propositions with renderDecisions false", async () => { const rulesEngine = setUpDecisionEngine({ personalizationStorageEnabled: true, @@ -173,7 +174,9 @@ describe("createRulesEngine:commands:evaluateRulesets", () => { rulesEngine.lifecycle.onBeforeEvent({ event: mockEvent, renderDecisions: false, - personalization: { decisionContext: {} }, + personalization: { + decisionContext: {}, + }, onResponse: onResponseHandler, }); const result = rulesEngine.commands.evaluateRulesets.run({}); @@ -182,22 +185,26 @@ describe("createRulesEngine:commands:evaluateRulesets", () => { }); }); it("should clear the local storage when personalizationStorageEnabled is false", async () => { - setUpDecisionEngine({ personalizationStorageEnabled: false }); + setUpDecisionEngine({ + personalizationStorageEnabled: false, + }); await awaitConsentDeferred.resolve(); expect(persistentStorage.clear).toHaveBeenCalled(); }); - it("should set eventRegistry storage when consent is obtained", async () => { - setUpDecisionEngine({ personalizationStorageEnabled: true }); + setUpDecisionEngine({ + personalizationStorageEnabled: true, + }); await awaitConsentDeferred.resolve(); - await expectAsync(awaitConsentDeferred.promise).toBeResolved(); + await expect(awaitConsentDeferred.promise).resolves.toBe(undefined); expect(persistentStorage.getItem).toHaveBeenCalled(); }); - it("should clear the local storage when consent is not obtained", async () => { - setUpDecisionEngine({ personalizationStorageEnabled: true }); + setUpDecisionEngine({ + personalizationStorageEnabled: true, + }); await awaitConsentDeferred.reject(); - await expectAsync(awaitConsentDeferred.promise).toBeRejected(); + await expect(awaitConsentDeferred.promise).rejects.toBe(undefined); expect(persistentStorage.clear).toHaveBeenCalled(); }); }); diff --git a/test/unit/specs/components/RulesEngine/utils.spec.js b/test/unit/specs/components/RulesEngine/utils.spec.js index 01ce8b8d5..600b63df2 100644 --- a/test/unit/specs/components/RulesEngine/utils.spec.js +++ b/test/unit/specs/components/RulesEngine/utils.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import { createInMemoryStorage, createRestoreStorage, @@ -20,67 +21,82 @@ import { describe("RulesEngine:utils", () => { let storage; let inMemoryStorage; - beforeEach(() => { - storage = jasmine.createSpyObj("storage", ["getItem", "setItem", "clear"]); + storage = { + getItem: vi.fn(), + setItem: vi.fn(), + clear: vi.fn(), + }; inMemoryStorage = createInMemoryStorage(); }); - it("restores from storage", () => { - storage.getItem.and.returnValue( + storage.getItem.mockReturnValue( '{ "something": true, "color": "orange", "person": { "height": 5.83 } }', ); const restore = createRestoreStorage(storage, "zoink"); - - expect(restore({ good: true })).toEqual({ + expect( + restore({ + good: true, + }), + ).toEqual({ something: true, color: "orange", - person: { height: 5.83 }, + person: { + height: 5.83, + }, }); - expect(storage.getItem).toHaveBeenCalledWith("zoink"); }); - it("uses default value if storage unavailable", () => { - storage.getItem.and.returnValue(undefined); + storage.getItem.mockReturnValue(undefined); const restore = createRestoreStorage(storage, "zoink"); - - expect(restore({ good: true })).toEqual({ good: true }); - + expect( + restore({ + good: true, + }), + ).toEqual({ + good: true, + }); expect(storage.getItem).toHaveBeenCalledWith("zoink"); }); + it("saves to storage", () => { + const mockedTimestamp = new Date(Date.UTC(2023, 8, 2, 13, 34, 56)); + vi.useFakeTimers(); + vi.setSystemTime(mockedTimestamp); - it("saves to storage", (done) => { - storage.getItem.and.returnValue( + storage.getItem.mockReturnValue( '{ "something": true, "color": "orange", "person": { "height": 5.83 } }', ); const save = createSaveStorage(storage, "zoink"); - save({ something: true, color: "orange", - person: { height: 5.83 }, + person: { + height: 5.83, + }, }); - setTimeout(() => { - expect(storage.setItem).toHaveBeenCalledWith( - "zoink", - '{"something":true,"color":"orange","person":{"height":5.83}}', - ); + vi.advanceTimersByTime(60); + + expect(storage.setItem).toHaveBeenCalledWith( + "zoink", + '{"something":true,"color":"orange","person":{"height":5.83}}', + ); - done(); - }, 20); + vi.useRealTimers(); }); it("should return the date of expiration", () => { const mockedTimestamp = new Date(Date.UTC(2023, 8, 2, 13, 34, 56)); - jasmine.clock().install(); - jasmine.clock().mockDate(mockedTimestamp); + vi.useFakeTimers(); + vi.setSystemTime(mockedTimestamp); + const retentionPeriod = 10; const expectedDate = new Date(mockedTimestamp); expectedDate.setDate(expectedDate.getDate() - retentionPeriod); const result = getExpirationDate(retentionPeriod); expect(result).toEqual(expectedDate); - jasmine.clock().uninstall(); + + vi.useRealTimers(); }); it("should return the activityId", () => { const proposition = { @@ -172,7 +188,6 @@ describe("RulesEngine:utils", () => { "39ae8d4b-b55e-43dc-a143-77f50195b487#b47fde8b-57c1-4bbe-ae22-64d5b782d183", ); }); - it("should return the activityId as undefined", () => { const proposition = { id: "2e4c7b28-b3e7-4d5b-ae6a-9ab0b44af87e", @@ -200,13 +215,11 @@ describe("RulesEngine:utils", () => { const retrievedValue = inMemoryStorage.getItem(key); expect(retrievedValue).toEqual(value); }); - it("should return null for a non-existent item", () => { const key = "nonExistentKey"; const retrievedValue = inMemoryStorage.getItem(key); expect(retrievedValue).toBeNull(); }); - it("should overwrite the value for an existing key", () => { const key = "existingKey"; const originalValue = "originalValue"; diff --git a/test/unit/specs/components/StreamingMedia/configValidators.spec.js b/test/unit/specs/components/StreamingMedia/configValidators.spec.js index 5f76adc61..488a053a6 100644 --- a/test/unit/specs/components/StreamingMedia/configValidators.spec.js +++ b/test/unit/specs/components/StreamingMedia/configValidators.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import configValidators from "../../../../../src/components/StreamingMedia/configValidators.js"; import testConfigValidators from "../../../helpers/testConfigValidators.js"; @@ -42,14 +43,25 @@ describe("Streaming Media config validators", () => { }, ], invalidConfigurations: [ - { streamingMedia: "" }, - { streamingMedia: {} }, - { streamingMedia: { channel: "test-channel" } }, - { streamingMedia: { playerName: "test-player-name" } }, + { + streamingMedia: "", + }, + { + streamingMedia: {}, + }, + { + streamingMedia: { + channel: "test-channel", + }, + }, + { + streamingMedia: { + playerName: "test-player-name", + }, + }, ], defaultValues: {}, }); - it("provides default values when Streaming media configured", () => { const config = configValidators({ streamingMedia: { diff --git a/test/unit/specs/components/StreamingMedia/createMediaEventManager.spec.js b/test/unit/specs/components/StreamingMedia/createMediaEventManager.spec.js index b560bdf0c..5675569c2 100644 --- a/test/unit/specs/components/StreamingMedia/createMediaEventManager.spec.js +++ b/test/unit/specs/components/StreamingMedia/createMediaEventManager.spec.js @@ -12,6 +12,7 @@ governing permissions and limitations under the License. // tests for createMediaEventManager.js +import { vi, beforeEach, describe, it, expect } from "vitest"; import createMediaEventManager from "../../../../../src/components/StreamingMedia/createMediaEventManager.js"; describe("StreamingMedia::createMediaEventManager", () => { @@ -21,7 +22,6 @@ describe("StreamingMedia::createMediaEventManager", () => { let sendEdgeNetworkRequest; let mediaEventManager; let setTimestamp; - beforeEach(() => { config = { streamingMedia: { @@ -30,15 +30,15 @@ describe("StreamingMedia::createMediaEventManager", () => { version: "1.0.0", }, }; - eventManager = jasmine.createSpyObj("eventManager", [ - "createEvent", - "sendEvent", - ]); - consent = jasmine.createSpyObj("consent", ["awaitConsent"]); - sendEdgeNetworkRequest = jasmine - .createSpy("sendEdgeNetworkRequest") - .and.returnValue(Promise.resolve()); - setTimestamp = jasmine.createSpy("setTimestamp"); + eventManager = { + createEvent: vi.fn(), + sendEvent: vi.fn(), + }; + consent = { + awaitConsent: vi.fn(), + }; + sendEdgeNetworkRequest = vi.fn().mockReturnValue(Promise.resolve()); + setTimestamp = vi.fn(); mediaEventManager = createMediaEventManager({ config, eventManager, @@ -47,21 +47,22 @@ describe("StreamingMedia::createMediaEventManager", () => { setTimestamp, }); }); - it("should create a media event with user xdm", () => { - const options = { xdm: {} }; + const options = { + xdm: {}, + }; const event = { - setUserXdm: jasmine.createSpy("setUserXdm"), - toJSON: () => ({ a: 1 }), + setUserXdm: vi.fn(), + toJSON: () => ({ + a: 1, + }), }; - - eventManager.createEvent.and.returnValue(event); - - const result = mediaEventManager.createMediaEvent({ options }); - + eventManager.createEvent.mockReturnValue(event); + const result = mediaEventManager.createMediaEvent({ + options, + }); expect(result.toJSON()).toEqual(event.toJSON()); }); - it("should create a media session with player name, channel, and version", () => { const options = { xdm: { @@ -73,57 +74,58 @@ describe("StreamingMedia::createMediaEventManager", () => { }, }, }; - const event = { - setUserXdm: jasmine.createSpy("setUserXdm"), - mergeXdm: jasmine.createSpy("mergeXdm"), - toJSON: () => ({ a: 1 }), + setUserXdm: vi.fn(), + mergeXdm: vi.fn(), + toJSON: () => ({ + a: 1, + }), }; - - eventManager.createEvent.and.returnValue(event); - + eventManager.createEvent.mockReturnValue(event); const result = mediaEventManager.createMediaSession(options); - expect(result.toJSON()).toEqual(event.toJSON()); }); - it("should augment media event with playhead, qoeDataDetails, and sessionID", () => { const event = { - mergeXdm: jasmine.createSpy("mergeXdm"), + mergeXdm: vi.fn(), }; const playerId = "player1"; - const getPlayerDetails = jasmine - .createSpy("getPlayerDetails") - .and.returnValue({ - playhead: 10, - qoeDataDetails: { duration: 60 }, - }); + const getPlayerDetails = vi.fn().mockReturnValue({ + playhead: 10, + qoeDataDetails: { + duration: 60, + }, + }); const sessionID = "session1"; - const result = mediaEventManager.augmentMediaEvent({ event, playerId, getPlayerDetails, sessionID, }); - expect(result).toBe(event); - expect(getPlayerDetails).toHaveBeenCalledWith({ playerId }); + expect(getPlayerDetails).toHaveBeenCalledWith({ + playerId, + }); expect(event.mergeXdm).toHaveBeenCalledWith({ mediaCollection: { playhead: 10, - qoeDataDetails: { duration: 60 }, + qoeDataDetails: { + duration: 60, + }, sessionID: "session1", }, }); }); - it("should track media session with event, playerId, and getPlayerDetails", () => { const event = {}; const playerId = "player1"; const getPlayerDetails = () => {}; - const mediaOptions = { playerId, getPlayerDetails, legacy: false }; - + const mediaOptions = { + playerId, + getPlayerDetails, + legacy: false, + }; mediaEventManager.trackMediaSession({ event, mediaOptions, @@ -133,15 +135,16 @@ describe("StreamingMedia::createMediaEventManager", () => { edgeConfigOverrides: undefined, }); }); - it("should track media event with action and send request to Edge Network", async () => { - const event = jasmine.createSpyObj("event", ["finalize"]); + const event = { + finalize: vi.fn(), + }; const action = "play"; - - consent.awaitConsent.and.returnValue(Promise.resolve()); - - await mediaEventManager.trackMediaEvent({ event, action }); - + consent.awaitConsent.mockReturnValue(Promise.resolve()); + await mediaEventManager.trackMediaEvent({ + event, + action, + }); expect(event.finalize).toHaveBeenCalled(); expect(sendEdgeNetworkRequest).toHaveBeenCalled(); }); diff --git a/test/unit/specs/components/StreamingMedia/createMediaRequest.spec.js b/test/unit/specs/components/StreamingMedia/createMediaRequest.spec.js index d3bd65995..403701f5d 100644 --- a/test/unit/specs/components/StreamingMedia/createMediaRequest.spec.js +++ b/test/unit/specs/components/StreamingMedia/createMediaRequest.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import createMediaRequest from "../../../../../src/components/StreamingMedia/createMediaRequest.js"; describe("StreamingMedia::createMediaRequest", () => { @@ -17,8 +18,10 @@ describe("StreamingMedia::createMediaRequest", () => { const mediaRequestPayload = {}; // replace with valid payload const action = "testAction"; const edgeSubPath = "/va"; - const result = createMediaRequest({ mediaRequestPayload, action }); - + const result = createMediaRequest({ + mediaRequestPayload, + action, + }); expect(result.getAction()).toEqual(action); expect(result.getEdgeSubPath()).toEqual(edgeSubPath); expect(result.getUseSendBeacon()).toEqual(false); diff --git a/test/unit/specs/components/StreamingMedia/createMediaResponseHandler.spec.js b/test/unit/specs/components/StreamingMedia/createMediaResponseHandler.spec.js index e071c3ec0..46bbffaf8 100644 --- a/test/unit/specs/components/StreamingMedia/createMediaResponseHandler.spec.js +++ b/test/unit/specs/components/StreamingMedia/createMediaResponseHandler.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createMediaResponseHandler from "../../../../../src/components/StreamingMedia/createMediaResponseHandler.js"; describe("createMediaResponseHandler", () => { @@ -19,18 +20,19 @@ describe("createMediaResponseHandler", () => { let mediaResponseHandler; let response; const getPlayerDetails = () => {}; - beforeEach(() => { response = { - getPayloadsByType: jasmine.createSpy(), + getPayloadsByType: vi.fn(), }; mediaSessionCacheManager = { - getSession: jasmine.createSpy().and.returnValue({ - getPlayerDetails: jasmine.createSpy(), - sessionPromise: Promise.resolve({ sessionId: "123" }), + getSession: vi.fn().mockReturnValue({ + getPlayerDetails: vi.fn(), + sessionPromise: Promise.resolve({ + sessionId: "123", + }), }), - stopPing: jasmine.createSpy(), - savePing: jasmine.createSpy(), + stopPing: vi.fn(), + savePing: vi.fn(), }; config = { streamingMedia: { @@ -39,9 +41,9 @@ describe("createMediaResponseHandler", () => { }, }; logger = { - info: jasmine.createSpy(), + info: vi.fn(), }; - trackMediaEvent = jasmine.createSpy(); + trackMediaEvent = vi.fn(); mediaResponseHandler = createMediaResponseHandler({ mediaSessionCacheManager, logger, @@ -49,10 +51,8 @@ describe("createMediaResponseHandler", () => { trackMediaEvent, }); }); - it("should return empty object when no media payload", async () => { - response.getPayloadsByType.and.returnValue([]); - + response.getPayloadsByType.mockReturnValue([]); const result = await mediaResponseHandler({ response, playerId: "player1", @@ -61,26 +61,34 @@ describe("createMediaResponseHandler", () => { await expect(result).toEqual({}); await expect(mediaSessionCacheManager.savePing).not.toHaveBeenCalled(); }); - it("should return session id", async () => { - response.getPayloadsByType.and.returnValue([{ sessionId: "123" }]); - + response.getPayloadsByType.mockReturnValue([ + { + sessionId: "123", + }, + ]); const result = await mediaResponseHandler({ response, playerId: "player1", getPlayerDetails, }); - await expect(result).toEqual({ sessionId: "123" }); + await expect(result).toEqual({ + sessionId: "123", + }); await expect(mediaSessionCacheManager.savePing).toHaveBeenCalled(); }); - it("should return sessionId when no player or getPlayerDetails function", async () => { - response.getPayloadsByType.and.returnValue([{ sessionId: "123" }]); - + response.getPayloadsByType.mockReturnValue([ + { + sessionId: "123", + }, + ]); const result = await mediaResponseHandler({ response, }); - await expect(result).toEqual({ sessionId: "123" }); + await expect(result).toEqual({ + sessionId: "123", + }); await expect(mediaSessionCacheManager.savePing).not.toHaveBeenCalled(); }); }); diff --git a/test/unit/specs/components/StreamingMedia/createMediaSessionCacheManager.spec.js b/test/unit/specs/components/StreamingMedia/createMediaSessionCacheManager.spec.js index 9c2aecf0b..cf4cb69a0 100644 --- a/test/unit/specs/components/StreamingMedia/createMediaSessionCacheManager.spec.js +++ b/test/unit/specs/components/StreamingMedia/createMediaSessionCacheManager.spec.js @@ -10,56 +10,68 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import createMediaSessionCacheManager from "../../../../../src/components/StreamingMedia/createMediaSessionCacheManager.js"; describe("StreamingMedia::createMediaSessionCacheManager", () => { let mediaSessionCacheManager; - beforeEach(() => { mediaSessionCacheManager = createMediaSessionCacheManager(); }); - it("getSession should return correct session", () => { const playerId = "player1"; - const sessionDetails = { id: "session1" }; - mediaSessionCacheManager.storeSession({ playerId, sessionDetails }); - + const sessionDetails = { + id: "session1", + }; + mediaSessionCacheManager.storeSession({ + playerId, + sessionDetails, + }); const result = mediaSessionCacheManager.getSession(playerId); - expect(result).toEqual(sessionDetails); }); - it("stopPing should stop the Ping", () => { const playerId = "player1"; - const sessionDetails = { id: "session1", pingId: 1 }; - - mediaSessionCacheManager.storeSession({ playerId, sessionDetails }); - + const sessionDetails = { + id: "session1", + pingId: 1, + }; + mediaSessionCacheManager.storeSession({ + playerId, + sessionDetails, + }); const result = mediaSessionCacheManager.getSession(playerId); - - mediaSessionCacheManager.stopPing({ playerId }); - + mediaSessionCacheManager.stopPing({ + playerId, + }); expect(result.pingId).toEqual(null); }); - it("storeSession should store the session", () => { const playerId = "player1"; - const sessionDetails = { id: "session1" }; - mediaSessionCacheManager.storeSession({ playerId, sessionDetails }); - + const sessionDetails = { + id: "session1", + }; + mediaSessionCacheManager.storeSession({ + playerId, + sessionDetails, + }); const session = mediaSessionCacheManager.getSession(playerId); - expect(session).toEqual(sessionDetails); }); - it("savePing should save the Ping", () => { const playerId = "player1"; - const sessionDetails = { id: "session1" }; - mediaSessionCacheManager.storeSession({ playerId, sessionDetails }); - mediaSessionCacheManager.savePing({ playerId, pingId: 1 }); - + const sessionDetails = { + id: "session1", + }; + mediaSessionCacheManager.storeSession({ + playerId, + sessionDetails, + }); + mediaSessionCacheManager.savePing({ + playerId, + pingId: 1, + }); const session = mediaSessionCacheManager.getSession(playerId); - expect(session.pingId).toEqual(1); }); }); diff --git a/test/unit/specs/components/StreamingMedia/createStreamingMediaComponent.spec.js b/test/unit/specs/components/StreamingMedia/createStreamingMediaComponent.spec.js index 7b03c89df..b89ecc329 100644 --- a/test/unit/specs/components/StreamingMedia/createStreamingMediaComponent.spec.js +++ b/test/unit/specs/components/StreamingMedia/createStreamingMediaComponent.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createStreamingMediaComponent from "../../../../../src/components/StreamingMedia/createStreamingMediaComponent.js"; describe("StreamingMedia::createComponent", () => { @@ -25,7 +26,6 @@ describe("StreamingMedia::createComponent", () => { let trackMediaEvent; let mediaResponseHandler; let trackMediaSession; - const build = (configs) => { mediaComponent = createStreamingMediaComponent({ config: configs, @@ -35,15 +35,15 @@ describe("StreamingMedia::createComponent", () => { trackMediaSession, }); }; - beforeEach(() => { - logger = jasmine.createSpyObj("logger", ["warn"]); - mediaResponseHandler = jasmine.createSpy(); - trackMediaEvent = jasmine.createSpy(); - trackMediaSession = jasmine.createSpy(); + logger = { + warn: vi.fn(), + }; + mediaResponseHandler = vi.fn(); + trackMediaEvent = vi.fn(); + trackMediaSession = vi.fn(); build(config); }); - it("should call trackSession when with invalid config", async () => { build({}); const options = { @@ -57,12 +57,10 @@ describe("StreamingMedia::createComponent", () => { }, }, }; - const createMediaSession = mediaComponent.commands.createMediaSession; await createMediaSession.run(options); expect(trackMediaSession).toHaveBeenCalled(); }); - it("should not send media event if no valid configs", async () => { build({}); const options = { @@ -71,8 +69,7 @@ describe("StreamingMedia::createComponent", () => { mediaCollection: {}, }, }; - const { sendMediaEvent } = mediaComponent.commands; - return expectAsync(sendMediaEvent.run(options)).toBeRejected(); + return expect(sendMediaEvent.run(options)).rejects.toThrowError(); }); }); diff --git a/test/unit/specs/components/StreamingMedia/createTrackMediaEvent.spec.js b/test/unit/specs/components/StreamingMedia/createTrackMediaEvent.spec.js index a850cd78f..f25094675 100644 --- a/test/unit/specs/components/StreamingMedia/createTrackMediaEvent.spec.js +++ b/test/unit/specs/components/StreamingMedia/createTrackMediaEvent.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createTrackMediaEvent from "../../../../../src/components/StreamingMedia/createTrackMediaEvent.js"; import MediaEvents from "../../../../../src/components/StreamingMedia/constants/eventTypes.js"; @@ -17,20 +18,21 @@ describe("createTrackMediaEvent", () => { let mediaEventManager; let mediaSessionCacheManager; let config; - beforeEach(() => { mediaEventManager = { - createMediaEvent: jasmine.createSpy(), - augmentMediaEvent: jasmine.createSpy(), - trackMediaEvent: jasmine.createSpy().and.returnValue(Promise.resolve()), + createMediaEvent: vi.fn(), + augmentMediaEvent: vi.fn(), + trackMediaEvent: vi.fn().mockReturnValue(Promise.resolve()), }; mediaSessionCacheManager = { - getSession: jasmine.createSpy().and.returnValue({ - getPlayerDetails: jasmine.createSpy(), - sessionPromise: Promise.resolve({ sessionId: "123" }), + getSession: vi.fn().mockReturnValue({ + getPlayerDetails: vi.fn(), + sessionPromise: Promise.resolve({ + sessionId: "123", + }), }), - stopPing: jasmine.createSpy(), - savePing: jasmine.createSpy(), + stopPing: vi.fn(), + savePing: vi.fn(), }; config = { streamingMedia: { @@ -44,7 +46,6 @@ describe("createTrackMediaEvent", () => { config, }); }); - it("should send a media event", async () => { const options = { playerId: "player1", @@ -52,9 +53,7 @@ describe("createTrackMediaEvent", () => { eventType: "media.play", }, }; - await trackMediaEvent(options); - expect(mediaEventManager.createMediaEvent).toHaveBeenCalledWith({ options, }); @@ -64,7 +63,6 @@ describe("createTrackMediaEvent", () => { expect(mediaEventManager.augmentMediaEvent).toHaveBeenCalled(); expect(mediaEventManager.trackMediaEvent).toHaveBeenCalled(); }); - it("should stop the Ping for session complete event", async () => { const options = { playerId: "player1", @@ -72,14 +70,11 @@ describe("createTrackMediaEvent", () => { eventType: MediaEvents.SESSION_COMPLETE, }, }; - await trackMediaEvent(options); - expect(mediaSessionCacheManager.stopPing).toHaveBeenCalledWith({ playerId: options.playerId, }); }); - it("should save the Ping for non-session complete event", async () => { const options = { playerId: "player1", @@ -87,9 +82,7 @@ describe("createTrackMediaEvent", () => { eventType: "media.play", }, }; - await trackMediaEvent(options); - expect(mediaSessionCacheManager.savePing).toHaveBeenCalled(); }); }); diff --git a/test/unit/specs/components/StreamingMedia/createTrackMediaSession.spec.js b/test/unit/specs/components/StreamingMedia/createTrackMediaSession.spec.js index 86e642120..0867b2616 100644 --- a/test/unit/specs/components/StreamingMedia/createTrackMediaSession.spec.js +++ b/test/unit/specs/components/StreamingMedia/createTrackMediaSession.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createTrackMediaSession from "../../../../../src/components/StreamingMedia/createTrackMediaSession.js"; import PlaybackState from "../../../../../src/components/StreamingMedia/constants/playbackState.js"; @@ -18,18 +19,17 @@ describe("createTrackMediaSession", () => { let mediaSessionCacheManager; let config; let logger; - beforeEach(() => { logger = { - warn: jasmine.createSpy(), + warn: vi.fn(), }; mediaEventManager = { - createMediaSession: jasmine.createSpy(), - augmentMediaEvent: jasmine.createSpy(), - trackMediaSession: jasmine.createSpy().and.returnValue(Promise.resolve()), + createMediaSession: vi.fn(), + augmentMediaEvent: vi.fn(), + trackMediaSession: vi.fn().mockReturnValue(Promise.resolve()), }; mediaSessionCacheManager = { - storeSession: jasmine.createSpy(), + storeSession: vi.fn(), }; config = { streamingMedia: { @@ -51,9 +51,10 @@ describe("createTrackMediaSession", () => { const playerId = "testPlayerId"; const playerName = "testPlayerName"; const eventType = "media.sessionStart"; - const event = { eventType }; + const event = { + eventType, + }; const getPlayerDetails = () => {}; - const options = { playerId, getPlayerDetails, @@ -65,8 +66,10 @@ describe("createTrackMediaSession", () => { }, }, }; - mediaEventManager.createMediaSession.and.returnValue({ eventType }); - mediaEventManager.augmentMediaEvent.and.returnValue({ + mediaEventManager.createMediaSession.mockReturnValue({ + eventType, + }); + mediaEventManager.augmentMediaEvent.mockReturnValue({ eventType, xdm: { mediaCollection: { @@ -77,18 +80,14 @@ describe("createTrackMediaSession", () => { }, }, }); - mediaEventManager.trackMediaSession.and.returnValue(sessionPromise); - + mediaEventManager.trackMediaSession.mockReturnValue(sessionPromise); await trackMediaSession(options); - expect(mediaEventManager.createMediaSession).toHaveBeenCalledWith(options); - expect(mediaEventManager.augmentMediaEvent).toHaveBeenCalledWith({ event, playerId, getPlayerDetails, }); - expect(mediaEventManager.trackMediaSession).toHaveBeenCalledWith({ event, mediaOptions: { @@ -98,7 +97,6 @@ describe("createTrackMediaSession", () => { }, edgeConfigOverrides: undefined, }); - expect(mediaSessionCacheManager.storeSession).toHaveBeenCalledWith({ playerId, sessionDetails: { @@ -122,6 +120,6 @@ describe("createTrackMediaSession", () => { }, getPlayerDetails: "", }; - return expectAsync(trackMediaSession(options)).toBeRejected(); + return expect(trackMediaSession(options)).rejects.toThrowError(); }); }); diff --git a/test/unit/specs/components/StreamingMedia/validateMediaEventOptions.spec.js b/test/unit/specs/components/StreamingMedia/validateMediaEventOptions.spec.js index 9296f8f34..7aae1cfc3 100644 --- a/test/unit/specs/components/StreamingMedia/validateMediaEventOptions.spec.js +++ b/test/unit/specs/components/StreamingMedia/validateMediaEventOptions.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import validateMediaEventOptions from "../../../../../src/components/StreamingMedia/validateMediaEventOptions.js"; describe("StreamingMedia::validateMediaEventOptions", () => { @@ -24,12 +25,12 @@ describe("StreamingMedia::validateMediaEventOptions", () => { }, }, }; - expect(() => { - validateMediaEventOptions({ options }); + validateMediaEventOptions({ + options, + }); }).not.toThrowError(); }); - it("should not fail when xdm with playhead is used", () => { const options = { xdm: { @@ -40,12 +41,12 @@ describe("StreamingMedia::validateMediaEventOptions", () => { }, }, }; - expect(() => { - validateMediaEventOptions({ options }); + validateMediaEventOptions({ + options, + }); }).not.toThrowError(); }); - it("should throw an error when invalid options are passed", () => { const options = { xdm: { @@ -56,9 +57,10 @@ describe("StreamingMedia::validateMediaEventOptions", () => { }, }, }; - expect(() => { - validateMediaEventOptions({ options }); + validateMediaEventOptions({ + options, + }); }).toThrowError(); }); }); diff --git a/test/unit/specs/components/StreamingMedia/validateMediaSessionOptions.spec.js b/test/unit/specs/components/StreamingMedia/validateMediaSessionOptions.spec.js index f11ab351f..2d5e2cc60 100644 --- a/test/unit/specs/components/StreamingMedia/validateMediaSessionOptions.spec.js +++ b/test/unit/specs/components/StreamingMedia/validateMediaSessionOptions.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import validateMediaSessionOptions from "../../../../../src/components/StreamingMedia/validateMediaSessionOptions.js"; describe("StreamingMedia::validateMediaSessionOptions", () => { @@ -24,12 +25,12 @@ describe("StreamingMedia::validateMediaSessionOptions", () => { }, }, }; - expect(() => { - validateMediaSessionOptions({ options }); + validateMediaSessionOptions({ + options, + }); }).not.toThrowError(); }); - it("should not fail when playerId, callback and xdm are used", () => { const options = { xdm: { @@ -40,12 +41,12 @@ describe("StreamingMedia::validateMediaSessionOptions", () => { }, }, }; - expect(() => { - validateMediaSessionOptions({ options }); + validateMediaSessionOptions({ + options, + }); }).not.toThrowError(); }); - it("should throw an error when invalid options are passed", () => { const options = { xdm: { @@ -56,9 +57,10 @@ describe("StreamingMedia::validateMediaSessionOptions", () => { }, }, }; - expect(() => { - validateMediaSessionOptions({ options }); + validateMediaSessionOptions({ + options, + }); }).toThrowError(); }); }); diff --git a/test/unit/specs/core/buildAndValidateConfig.spec.js b/test/unit/specs/core/buildAndValidateConfig.spec.js index 291243b39..182b23e98 100644 --- a/test/unit/specs/core/buildAndValidateConfig.spec.js +++ b/test/unit/specs/core/buildAndValidateConfig.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import buildAndValidateConfig from "../../../../src/core/buildAndValidateConfig.js"; import createConfig from "../../../../src/core/config/createConfig.js"; import { boolean, objectOf } from "../../../../src/utils/validation/index.js"; @@ -20,7 +21,6 @@ describe("buildAndValidateConfig", () => { let coreConfigValidators; let logger; let setDebugEnabled; - beforeEach(() => { options = {}; const componentCreator = () => {}; @@ -36,17 +36,18 @@ describe("buildAndValidateConfig", () => { .required(); logger = { enabled: false, - info: jasmine.createSpy(), - logOnBeforeCommand: jasmine.createSpy(), - logOnInstanceConfigured: jasmine.createSpy(), + info: vi.fn(), + logOnBeforeCommand: vi.fn(), + logOnInstanceConfigured: vi.fn(), }; - setDebugEnabled = jasmine.createSpy(); + setDebugEnabled = vi.fn(); }); - it("adds validators and validates options", () => { expect(() => { buildAndValidateConfig({ - options: { idSyncEnabled: "invalid value" }, + options: { + idSyncEnabled: "invalid value", + }, componentCreators, coreConfigValidators, createConfig, @@ -55,7 +56,6 @@ describe("buildAndValidateConfig", () => { }); }).toThrowError(); }); - it("sets debug enabled based on config", () => { options.debugEnabled = true; buildAndValidateConfig({ @@ -66,9 +66,10 @@ describe("buildAndValidateConfig", () => { logger, setDebugEnabled, }); - expect(setDebugEnabled).toHaveBeenCalledWith(true, { fromConfig: true }); + expect(setDebugEnabled).toHaveBeenCalledWith(true, { + fromConfig: true, + }); }); - it("logs and returns computed configuration", () => { logger.enabled = true; buildAndValidateConfig({ @@ -86,7 +87,6 @@ describe("buildAndValidateConfig", () => { }, }); }); - it("throws an error for unknown fields", () => { logger.enabled = true; options.foo = "bar"; @@ -101,7 +101,6 @@ describe("buildAndValidateConfig", () => { }), ).toThrowError(); }); - it("returns config", () => { const result = buildAndValidateConfig({ options, @@ -111,6 +110,9 @@ describe("buildAndValidateConfig", () => { logger, setDebugEnabled, }); - expect(result).toEqual({ idSyncEnabled: true, debugEnabled: false }); + expect(result).toEqual({ + idSyncEnabled: true, + debugEnabled: false, + }); }); }); diff --git a/test/unit/specs/core/componentCreators.spec.js b/test/unit/specs/core/componentCreators.spec.js index fff06b535..7f916d072 100644 --- a/test/unit/specs/core/componentCreators.spec.js +++ b/test/unit/specs/core/componentCreators.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import * as componentCreators from "../../../../src/core/componentCreators.js"; describe("componentCreators", () => { @@ -18,18 +19,13 @@ describe("componentCreators", () => { acc.push(componentCreators[key]); return acc; }, []); - - expect(c).toEqual(jasmine.any(Array)); - + expect(c).toEqual(expect.any(Array)); c.forEach((componentCreator) => { - expect(componentCreator).toEqual(jasmine.any(Function)); - expect(componentCreator.namespace).toEqual(jasmine.any(String)); - + expect(componentCreator).toEqual(expect.any(Function)); + expect(componentCreator.namespace).toEqual(expect.any(String)); if (componentCreator.configValidators) { // should export a validator function - expect(componentCreator.configValidators).toEqual( - jasmine.any(Function), - ); + expect(componentCreator.configValidators).toEqual(expect.any(Function)); } }); }); diff --git a/test/unit/specs/core/config/createConfig.spec.js b/test/unit/specs/core/config/createConfig.spec.js index e969ef1e3..3a6fe2cda 100644 --- a/test/unit/specs/core/config/createConfig.spec.js +++ b/test/unit/specs/core/config/createConfig.spec.js @@ -10,10 +10,10 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import createConfig from "../../../../../src/core/config/createConfig.js"; let testConfig = {}; - describe("createConfig", () => { beforeEach(() => { testConfig = { @@ -44,7 +44,6 @@ describe("createConfig", () => { cfg.d = "ABC"; expect(cfg.d).toEqual("ABC"); }); - describe("changing config", () => { it("does not change the provided options", () => { const cfg = createConfig(testConfig); @@ -52,7 +51,6 @@ describe("createConfig", () => { expect(testConfig.d).toBe(undefined); }); }); - describe("changing provided options", () => { it("does not change the config", () => { const cfg = createConfig(testConfig); diff --git a/test/unit/specs/core/config/createCoreConfigs.spec.js b/test/unit/specs/core/config/createCoreConfigs.spec.js index 2c6669964..6f1677ee4 100644 --- a/test/unit/specs/core/config/createCoreConfigs.spec.js +++ b/test/unit/specs/core/config/createCoreConfigs.spec.js @@ -10,22 +10,23 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import createCoreConfigs from "../../../../../src/core/config/createCoreConfigs.js"; describe("createCoreConfigs", () => { let validator; - const baseConfig = { datastreamId: "1234", orgId: "org1" }; - + const baseConfig = { + datastreamId: "1234", + orgId: "org1", + }; beforeEach(() => { validator = createCoreConfigs(); }); - describe("debugEnabled", () => { it("validates debugEnabled=undefined", () => { const config = validator(baseConfig); expect(config.debugEnabled).toBe(false); }); - it("validates debugEnabled=true", () => { const config = validator({ debugEnabled: true, @@ -40,17 +41,24 @@ describe("createCoreConfigs", () => { }); expect(config.debugEnabled).toBe(false); }); - it("validates debugEnabled=123", () => { expect(() => { - validator({ debugEnabled: 123, ...baseConfig }); + validator({ + debugEnabled: 123, + ...baseConfig, + }); }).toThrowError(); }); }); - [ - { datastreamId: "asdfasdf", orgId: "" }, - { datastreamId: "asdfasdf", orgId: "" }, + { + datastreamId: "asdfasdf", + orgId: "", + }, + { + datastreamId: "asdfasdf", + orgId: "", + }, { datastreamId: "myproperty1", orgId: "53A16ACB5CC1D3760A495C99@AdobeOrg", @@ -92,11 +100,16 @@ describe("createCoreConfigs", () => { validator(cfg); }); }); - [ {}, - { datastreamId: "myproperty1", edgeDomain: "" }, - { datastreamId: "myproperty1", edgeDomain: "stats firstparty.com" }, + { + datastreamId: "myproperty1", + edgeDomain: "", + }, + { + datastreamId: "myproperty1", + edgeDomain: "stats firstparty.com", + }, { datastreamId: "myproperty1", edgeDomain: "stats firstparty.com", @@ -111,22 +124,36 @@ describe("createCoreConfigs", () => { expect(() => validator(cfg)).toThrowError(); }); }); - it("invalidates duplicate configIds", () => { - const config1 = { datastreamId: "property1", orgId: "ims1" }; - const config2 = { datastreamId: "property2", orgId: "ims2" }; - const config3 = { datastreamId: "property1", orgId: "ims3" }; - + const config1 = { + datastreamId: "property1", + orgId: "ims1", + }; + const config2 = { + datastreamId: "property2", + orgId: "ims2", + }; + const config3 = { + datastreamId: "property1", + orgId: "ims3", + }; validator(config1); validator(config2); expect(() => validator("", config3)).toThrowError(); }); - it("invalidates duplicate orgIds", () => { - const config1 = { datastreamId: "a", orgId: "a" }; - const config2 = { datastreamId: "b", orgId: "b" }; - const config3 = { datastreamId: "c", orgId: "a" }; - + const config1 = { + datastreamId: "a", + orgId: "a", + }; + const config2 = { + datastreamId: "b", + orgId: "b", + }; + const config3 = { + datastreamId: "c", + orgId: "a", + }; validator(config1); validator(config2); expect(() => validator("", config3)).toThrowError(); diff --git a/test/unit/specs/core/consent/createConsent.spec.js b/test/unit/specs/core/consent/createConsent.spec.js index cc97e269b..b7d9263aa 100644 --- a/test/unit/specs/core/consent/createConsent.spec.js +++ b/test/unit/specs/core/consent/createConsent.spec.js @@ -10,48 +10,60 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createConsent from "../../../../../src/core/consent/createConsent.js"; describe("createConsent", () => { let state; let subject; let logger; - beforeEach(() => { - state = jasmine.createSpyObj("state", [ - "in", - "out", - "pending", - "awaitConsent", - "withConsent", - ]); - logger = jasmine.createSpyObj("logger", ["warn"]); - subject = createConsent({ generalConsentState: state, logger }); + state = { + in: vi.fn(), + out: vi.fn(), + pending: vi.fn(), + awaitConsent: vi.fn(), + withConsent: vi.fn(), + }; + logger = { + warn: vi.fn(), + }; + subject = createConsent({ + generalConsentState: state, + logger, + }); }); - it("sets consent to in", () => { - subject.setConsent({ general: "in" }); + subject.setConsent({ + general: "in", + }); expect(state.in).toHaveBeenCalled(); expect(state.out).not.toHaveBeenCalled(); expect(state.pending).not.toHaveBeenCalled(); expect(logger.warn).not.toHaveBeenCalled(); }); it("sets consent to out", () => { - subject.setConsent({ general: "out" }); + subject.setConsent({ + general: "out", + }); expect(state.in).not.toHaveBeenCalled(); expect(state.out).toHaveBeenCalled(); expect(state.pending).not.toHaveBeenCalled(); expect(logger.warn).not.toHaveBeenCalled(); }); it("sets consent to pending", () => { - subject.setConsent({ general: "pending" }); + subject.setConsent({ + general: "pending", + }); expect(state.in).not.toHaveBeenCalled(); expect(state.out).not.toHaveBeenCalled(); expect(state.pending).toHaveBeenCalled(); expect(logger.warn).not.toHaveBeenCalled(); }); it("logs unknown consent values", () => { - subject.setConsent({ general: "foo" }); + subject.setConsent({ + general: "foo", + }); expect(state.in).not.toHaveBeenCalled(); expect(state.out).not.toHaveBeenCalled(); expect(state.pending).not.toHaveBeenCalled(); @@ -65,11 +77,11 @@ describe("createConsent", () => { expect(logger.warn).not.toHaveBeenCalled(); }); it("calls await consent", () => { - state.awaitConsent.and.returnValue("mypromise"); + state.awaitConsent.mockReturnValue("mypromise"); expect(subject.awaitConsent()).toEqual("mypromise"); }); it("calls with consent", () => { - state.withConsent.and.returnValue("mypromise"); + state.withConsent.mockReturnValue("mypromise"); expect(subject.withConsent()).toEqual("mypromise"); }); }); diff --git a/test/unit/specs/core/consent/createConsentStateMachine.spec.js b/test/unit/specs/core/consent/createConsentStateMachine.spec.js index 3b7b02b04..40199eb07 100644 --- a/test/unit/specs/core/consent/createConsentStateMachine.spec.js +++ b/test/unit/specs/core/consent/createConsentStateMachine.spec.js @@ -10,40 +10,39 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createConsentStateMachine from "../../../../../src/core/consent/createConsentStateMachine.js"; import flushPromiseChains from "../../../helpers/flushPromiseChains.js"; const DECLINED_CONSENT_ERROR_CODE = "declinedConsent"; - describe("createConsentStateMachine", () => { let logger; let subject; - beforeEach(() => { - logger = jasmine.createSpyObj("logger", ["info", "warn"]); - subject = createConsentStateMachine({ logger }); + logger = { + info: vi.fn(), + warn: vi.fn(), + }; + subject = createConsentStateMachine({ + logger, + }); }); - it("does not resolve promise if consent is pending", () => { subject.pending(); - const onFulfilled = jasmine.createSpy("onFulfilled"); + const onFulfilled = vi.fn(); subject.awaitConsent().then(onFulfilled); - return flushPromiseChains().then(() => { expect(onFulfilled).not.toHaveBeenCalled(); }); }); - it("resolves promise if user consented to all purposes", () => { subject.in(); - const onFulfilled = jasmine.createSpy("onFulfilled"); + const onFulfilled = vi.fn(); subject.awaitConsent().then(onFulfilled); - return flushPromiseChains().then(() => { expect(onFulfilled).toHaveBeenCalled(); }); }); - [ ["default", "No consent preferences have been set."], ["initial", "The user declined consent."], @@ -51,22 +50,19 @@ describe("createConsentStateMachine", () => { ].forEach(([source, expectedMessage]) => { it("rejects promise if user consented to no purposes", () => { subject.out(source); - const onRejected = jasmine.createSpy("onRejected"); + const onRejected = vi.fn(); subject.awaitConsent().catch(onRejected); - return flushPromiseChains().then(() => { - const error = onRejected.calls.argsFor(0)[0]; + const error = onRejected.mock.calls[0][0]; expect(error.code).toBe(DECLINED_CONSENT_ERROR_CODE); expect(error.message).toBe(expectedMessage); }); }); }); - it("resolves queued promises when consent set to in", () => { subject.pending(); - const onFulfilled = jasmine.createSpy("onFulfilled"); + const onFulfilled = vi.fn(); subject.awaitConsent().then(onFulfilled); - return flushPromiseChains() .then(() => { expect(onFulfilled).not.toHaveBeenCalled(); @@ -77,12 +73,10 @@ describe("createConsentStateMachine", () => { expect(onFulfilled).toHaveBeenCalled(); }); }); - it("rejects queued promises when consent set to out", () => { subject.pending(); - const onRejected = jasmine.createSpy("onRejected"); + const onRejected = vi.fn(); subject.awaitConsent().catch(onRejected); - return flushPromiseChains() .then(() => { expect(onRejected).not.toHaveBeenCalled(); @@ -90,7 +84,7 @@ describe("createConsentStateMachine", () => { return flushPromiseChains(); }) .then(() => { - const error = onRejected.calls.argsFor(0)[0]; + const error = onRejected.mock.calls[0][0]; expect(error.code).toBe(DECLINED_CONSENT_ERROR_CODE); expect(error.message).toBe("The user declined consent."); }); @@ -98,14 +92,12 @@ describe("createConsentStateMachine", () => { // This is what would happen when the consent component is not included it("resolves promises when it is not initialized", () => { - const onFulfilled = jasmine.createSpy("onFulfilled"); + const onFulfilled = vi.fn(); subject.awaitConsent().then(onFulfilled); - return flushPromiseChains().then(() => { expect(onFulfilled).toHaveBeenCalled(); }); }); - [ ["in", "default"], [ @@ -144,7 +136,6 @@ describe("createConsentStateMachine", () => { } }); }); - [ ["in", "User consented.", "info"], ["out", "User declined consent.", "warn"], @@ -164,28 +155,27 @@ describe("createConsentStateMachine", () => { }); it(`doesn't log a message when a request returns or fails. (${action})`, () => { subject[action]("initial"); - logger.info.calls.reset(); - logger.warn.calls.reset(); + logger.info.mockReset(); + logger.warn.mockReset(); subject[action]("new"); subject[action]("new"); expect(logger.info).not.toHaveBeenCalled(); expect(logger.warn).not.toHaveBeenCalled(); }); }); - describe("withConsent", () => { ["default", "initial", "new"].forEach((source) => { it(`returns immediately when ${source} consent is set to "in"`, () => { subject.in(source); - return expectAsync(subject.withConsent()).toBeResolvedTo(); + return expect(subject.withConsent()).resolves.toBe(); }); it(`rejects when ${source} consent is set to "out"`, () => { subject.out(source); - return expectAsync(subject.withConsent()).toBeRejected(); + return expect(subject.withConsent()).rejects.toThrowError(); }); it(`rejects when ${source} consent is set to "pending"`, () => { subject.pending(source); - return expectAsync(subject.withConsent()).toBeRejected(); + return expect(subject.withConsent()).rejects.toThrowError(); }); }); }); diff --git a/test/unit/specs/core/createComponentRegistry.spec.js b/test/unit/specs/core/createComponentRegistry.spec.js index 9a1747c5a..4db8a84a7 100644 --- a/test/unit/specs/core/createComponentRegistry.spec.js +++ b/test/unit/specs/core/createComponentRegistry.spec.js @@ -10,13 +10,13 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import createComponentRegistry from "../../../../src/core/createComponentRegistry.js"; const commandErrorRegex = /\[CompOne\] An error occurred while executing the perform command./; const lifecycleErrorRegex = /\[CompOne\] An error occurred while executing the onBeforeEvent lifecycle hook./; - describe("createComponentRegistry", () => { describe("register", () => { it("should not register components with existing commands", () => { @@ -41,13 +41,12 @@ describe("createComponentRegistry", () => { ); }); }); - describe("getCommand", () => { it("handles a command that returns a non-promise", () => { const registry = createComponentRegistry(); const component = { commands: { - perform: jasmine.createSpy().and.returnValue("nonPromiseValue"), + perform: vi.fn().mockReturnValue("nonPromiseValue"), }, }; registry.register("CompOne", component); @@ -56,14 +55,13 @@ describe("createComponentRegistry", () => { expect(component.commands.perform).toHaveBeenCalledWith("arg1", "arg2"); expect(result).toBe("nonPromiseValue"); }); - it("handles a command that returns a promise that gets resolved", () => { const registry = createComponentRegistry(); const component = { commands: { - perform: jasmine - .createSpy() - .and.returnValue(Promise.resolve("resolvedPromiseValue")), + perform: vi + .fn() + .mockReturnValue(Promise.resolve("resolvedPromiseValue")), }, }; registry.register("CompOne", component); @@ -74,10 +72,11 @@ describe("createComponentRegistry", () => { expect(value).toBe("resolvedPromiseValue"); }); }); - it("handles a command that throws an error", () => { const registry = createComponentRegistry(); - const runSpy = jasmine.createSpy().and.throwError("thrownError"); + const runSpy = vi.fn().mockImplementation(() => { + throw new Error("thrownError"); + }); const component = { commands: { perform: { @@ -92,12 +91,11 @@ describe("createComponentRegistry", () => { }).toThrowError(commandErrorRegex); expect(runSpy).toHaveBeenCalledWith("arg1", "arg2"); }); - - it("handles a command that returns a promise that gets rejected", () => { + it("handles a command that returns a promise that gets rejected", async () => { const registry = createComponentRegistry(); - const runSpy = jasmine - .createSpy() - .and.returnValue(Promise.reject(new Error("rejectedPromiseError"))); + const runSpy = vi + .fn() + .mockReturnValue(Promise.reject(new Error("rejectedPromiseError"))); const component = { commands: { perform: { @@ -109,25 +107,20 @@ describe("createComponentRegistry", () => { const command = registry.getCommand("perform"); const result = command.run("arg1", "arg2"); expect(runSpy).toHaveBeenCalledWith("arg1", "arg2"); - return result.then(fail).catch((error) => { - expect(error).toEqual(jasmine.any(Error)); - expect(error.message).toMatch(commandErrorRegex); - }); + await expect(result).rejects.toThrow(commandErrorRegex); }); - it("should return undefined if command does not exist", () => { const registry = createComponentRegistry(); const command = registry.getCommand("bogus"); expect(command).toBeUndefined(); }); }); - describe("getLifecycleCallbacks", () => { it("handles a callback that returns a non-promise", () => { const registry = createComponentRegistry(); const component = { lifecycle: { - onBeforeEvent: jasmine.createSpy().and.returnValue("nonPromiseValue"), + onBeforeEvent: vi.fn().mockReturnValue("nonPromiseValue"), }, }; registry.register("CompOne", component); @@ -139,14 +132,13 @@ describe("createComponentRegistry", () => { ); expect(result).toBe("nonPromiseValue"); }); - - it("handles a callback that returns a promise that gets resolved", () => { + it("handles a callback that returns a promise that gets resolved", async () => { const registry = createComponentRegistry(); const component = { lifecycle: { - onBeforeEvent: jasmine - .createSpy() - .and.returnValue(Promise.resolve("resolvedPromiseValue")), + onBeforeEvent: vi + .fn() + .mockReturnValue(Promise.resolve("resolvedPromiseValue")), }, }; registry.register("CompOne", component); @@ -156,16 +148,15 @@ describe("createComponentRegistry", () => { "arg1", "arg2", ); - return result.then((value) => { - expect(value).toBe("resolvedPromiseValue"); - }); + await expect(result).resolves.toBe("resolvedPromiseValue"); }); - it("handles a callback that throws an error", () => { const registry = createComponentRegistry(); const component = { lifecycle: { - onBeforeEvent: jasmine.createSpy().and.throwError("thrownError"), + onBeforeEvent: vi.fn().mockImplementation(() => { + throw new Error("thrownError"); + }), }, }; registry.register("CompOne", component); @@ -178,14 +169,13 @@ describe("createComponentRegistry", () => { "arg2", ); }); - - it("handles a callback that returns a promise that gets rejected", () => { + it("handles a callback that returns a promise that gets rejected", async () => { const registry = createComponentRegistry(); const component = { lifecycle: { - onBeforeEvent: jasmine - .createSpy() - .and.returnValue(Promise.reject(new Error("rejectedPromiseError"))), + onBeforeEvent: vi + .fn() + .mockReturnValue(Promise.reject(new Error("rejectedPromiseError"))), }, }; registry.register("CompOne", component); @@ -195,12 +185,8 @@ describe("createComponentRegistry", () => { "arg1", "arg2", ); - return result.then(fail).catch((error) => { - expect(error).toEqual(jasmine.any(Error)); - expect(error.message).toMatch(lifecycleErrorRegex); - }); + await expect(result).rejects.toThrow(lifecycleErrorRegex); }); - it("should return all registered lifecycle callbacks", () => { const registry = createComponentRegistry(); registry.register("CompOne", { diff --git a/test/unit/specs/core/createCookieTransfer.spec.js b/test/unit/specs/core/createCookieTransfer.spec.js index 1c3285eb3..67d9bb25f 100644 --- a/test/unit/specs/core/createCookieTransfer.spec.js +++ b/test/unit/specs/core/createCookieTransfer.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createCookieTransfer from "../../../../src/core/createCookieTransfer.js"; describe("createCookieTransfer", () => { @@ -21,15 +22,18 @@ describe("createCookieTransfer", () => { let cookieTransfer; const date = new Date(); const dateProvider = () => date; - beforeEach(() => { apexDomain = "example.com"; - shouldTransferCookie = jasmine.createSpy("shouldTransferCookie"); - shouldTransferCookie.and.returnValue(false); - payload = jasmine.createSpyObj("payload", ["mergeState"]); - cookieJar = jasmine.createSpyObj("cookieJar", ["get", "set"]); + shouldTransferCookie = vi.fn(); + shouldTransferCookie.mockReturnValue(false); + payload = { + mergeState: vi.fn(), + }; + cookieJar = { + get: vi.fn(), + set: vi.fn(), + }; }); - const build = () => { cookieTransfer = createCookieTransfer({ cookieJar, @@ -38,7 +42,6 @@ describe("createCookieTransfer", () => { dateProvider, }); }; - describe("cookiesToPayload", () => { it("does not transfer cookies to payload if endpoint is first-party", () => { build(); @@ -48,9 +51,8 @@ describe("createCookieTransfer", () => { cookiesEnabled: true, }); }); - it("does not set state.entries if there are no qualifying cookies", () => { - cookieJar.get.and.returnValue({}); + cookieJar.get.mockReturnValue({}); build(); cookieTransfer.cookiesToPayload(payload, endpointDomain); expect(payload.mergeState).toHaveBeenCalledWith({ @@ -58,19 +60,22 @@ describe("createCookieTransfer", () => { cookiesEnabled: true, }); }); - ["example.com", ""].forEach((domain) => { it(`transfers eligible cookies to payload with domain ${domain}`, () => { apexDomain = domain; build(); - cookieJar.get.and.returnValue({ + cookieJar.get.mockReturnValue({ kndctr_ABC_CustomOrg_identity: "XYZ@CustomOrg", ineligible_cookie: "foo", kndctr_ABC_CustomOrg_optIn: "all", at_qa_mode: '{"token":"QATokenString","listedActivitiesOnly":true,"evaluateAsTrueAudienceIds":["2480042"],"previewIndexes":[{"activityIndex":1,"experienceIndex":1}]}', }); - shouldTransferCookie.and.returnValues(true, false, true, true); + shouldTransferCookie + .mockReturnValueOnce(true) + .mockReturnValueOnce(false) + .mockReturnValueOnce(true) + .mockReturnValueOnce(true); cookieTransfer.cookiesToPayload(payload, endpointDomain); expect(payload.mergeState).toHaveBeenCalledWith({ domain: apexDomain, @@ -94,30 +99,29 @@ describe("createCookieTransfer", () => { }); }); }); - describe("responseToCookies", () => { let response; beforeEach(() => { - response = jasmine.createSpyObj("response", ["getPayloadsByType"]); + response = { + getPayloadsByType: vi.fn(), + }; }); - it("adds a cookie with the correct domain", () => { build(); - response.getPayloadsByType.and.returnValue([ + response.getPayloadsByType.mockReturnValue([ { key: "mykey", value: "myvalue", }, ]); cookieTransfer.responseToCookies(response); - expect(cookieJar.set).toHaveBeenCalledOnceWith("mykey", "myvalue", { + expect(cookieJar.set).toHaveBeenNthCalledWith(1, "mykey", "myvalue", { domain: "example.com", }); }); - it("adds multiple cookies", () => { build(); - response.getPayloadsByType.and.returnValue([ + response.getPayloadsByType.mockReturnValue([ { key: "mykey1", value: "myvalue1", @@ -131,18 +135,17 @@ describe("createCookieTransfer", () => { expect(cookieJar.set).toHaveBeenCalledWith( "mykey1", "myvalue1", - jasmine.any(Object), + expect.any(Object), ); expect(cookieJar.set).toHaveBeenCalledWith( "mykey2", "myvalue2", - jasmine.any(Object), + expect.any(Object), ); }); - it("sets the expires attribute", () => { build(); - response.getPayloadsByType.and.returnValue([ + response.getPayloadsByType.mockReturnValue([ { key: "mykey", value: "myvalue", @@ -150,37 +153,39 @@ describe("createCookieTransfer", () => { }, ]); cookieTransfer.responseToCookies(response); - expect(cookieJar.set.calls.argsFor(0)[2].expires.getTime()).toEqual( + expect(cookieJar.set.mock.calls[0][2].expires.getTime()).toEqual( date.getTime() + 172800 * 1000, ); }); - it("adds a sameSite=none cookie with secure attribute", () => { build(); - response.getPayloadsByType.and.returnValue([ + response.getPayloadsByType.mockReturnValue([ { key: "mykey", value: "myvalue", - attrs: { SameSite: "None" }, + attrs: { + SameSite: "None", + }, }, ]); cookieTransfer.responseToCookies(response); - expect(cookieJar.set.calls.argsFor(0)[2].sameSite).toEqual("none"); - expect(cookieJar.set.calls.argsFor(0)[2].secure).toEqual(true); + expect(cookieJar.set.mock.calls[0][2].sameSite).toEqual("none"); + expect(cookieJar.set.mock.calls[0][2].secure).toEqual(true); }); - it("adds a sameSite=strict cookie", () => { build(); - response.getPayloadsByType.and.returnValue([ + response.getPayloadsByType.mockReturnValue([ { key: "mykey", value: "myvalue", - attrs: { SameSite: "Strict" }, + attrs: { + SameSite: "Strict", + }, }, ]); cookieTransfer.responseToCookies(response); - expect(cookieJar.set.calls.argsFor(0)[2].sameSite).toEqual("strict"); - expect(cookieJar.set.calls.argsFor(0)[2].secure).toBeUndefined(); + expect(cookieJar.set.mock.calls[0][2].sameSite).toEqual("strict"); + expect(cookieJar.set.mock.calls[0][2].secure).toBeUndefined(); }); }); }); diff --git a/test/unit/specs/core/createEvent.spec.js b/test/unit/specs/core/createEvent.spec.js index 49dd20ba6..77a968397 100644 --- a/test/unit/specs/core/createEvent.spec.js +++ b/test/unit/specs/core/createEvent.spec.js @@ -10,15 +10,14 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import createEvent from "../../../../src/core/createEvent.js"; describe("createEvent", () => { let event; - beforeEach(() => { event = createEvent(); }); - it("deeply merges XDM with user-provided XDM merged last", () => { event.setUserXdm({ fruit: { @@ -64,7 +63,6 @@ describe("createEvent", () => { }, }); }); - it("does not modify the original user XDM object", () => { const dataLayer = { fruit: { @@ -92,7 +90,6 @@ describe("createEvent", () => { }, }); }); - it("handles undefined user XDM", () => { event.setUserXdm(undefined); event.mergeXdm({ @@ -105,10 +102,13 @@ describe("createEvent", () => { }, }); }); - it("sets user data", () => { - event.setUserData({ fruit: "apple" }); - event.setUserData({ veggie: "carrot" }); + event.setUserData({ + fruit: "apple", + }); + event.setUserData({ + veggie: "carrot", + }); event.finalize(); expect(event.toJSON()).toEqual({ data: { @@ -116,13 +116,11 @@ describe("createEvent", () => { }, }); }); - it("handles undefined user data", () => { event.setUserData(undefined); event.finalize(); expect(event.toJSON()).toEqual({}); }); - it("deeply merges meta", () => { event.mergeMeta({ fruit: { @@ -157,7 +155,6 @@ describe("createEvent", () => { }, }); }); - it("deeply merges query", () => { event.mergeQuery({ fruit: { @@ -192,40 +189,56 @@ describe("createEvent", () => { }, }); }); - it("sets documentUnloading", () => { - expect(event.getDocumentMayUnload()).toBeFalse(); + expect(event.getDocumentMayUnload()).toBe(false); event.documentMayUnload(); - expect(event.getDocumentMayUnload()).toBeTrue(); + expect(event.getDocumentMayUnload()).toBe(true); }); - it("throws error when mergeXdm called after finalize", () => { - event.setUserXdm({ web: {} }); + event.setUserXdm({ + web: {}, + }); event.finalize(); - expect(() => event.mergeXdm({ a: "b" })).toThrowError( - "mergeXdm cannot be called after event is finalized.", - ); + expect(() => + event.mergeXdm({ + a: "b", + }), + ).toThrowError("mergeXdm cannot be called after event is finalized."); }); - it("throws error when toJSON called before finalize", () => { - event.setUserXdm({ web: {} }); + event.setUserXdm({ + web: {}, + }); expect(() => event.toJSON()).toThrowError("toJSON called before finalize"); }); - it("reports whether the event is empty", () => { - expect(event.isEmpty()).toBeTrue(); - event.setUserData({ foo: "bar" }); - expect(event.isEmpty()).toBeFalse(); + expect(event.isEmpty()).toBe(true); + event.setUserData({ + foo: "bar", + }); + expect(event.isEmpty()).toBe(false); }); it("returns undefined when no viewName exists", () => { expect(event.getViewName()).toBe(undefined); - event.setUserXdm({ web: {} }); + event.setUserXdm({ + web: {}, + }); expect(event.getViewName()).toBe(undefined); - event.setUserXdm({ web: { webPageDetails: {} } }); + event.setUserXdm({ + web: { + webPageDetails: {}, + }, + }); expect(event.getViewName()).toBe(undefined); }); it("returns viewName when viewName exists", () => { - event.setUserXdm({ web: { webPageDetails: { viewName: "cart" } } }); + event.setUserXdm({ + web: { + webPageDetails: { + viewName: "cart", + }, + }, + }); expect(event.getViewName()).toBe("cart"); }); describe("applyCallback", () => { @@ -236,60 +249,97 @@ describe("createEvent", () => { }; const subject = createEvent(); subject.finalize(callback); - expect(subject.toJSON()).toEqual({ xdm: { a: "1" }, data: { b: "2" } }); + expect(subject.toJSON()).toEqual({ + xdm: { + a: "1", + }, + data: { + b: "2", + }, + }); }); - it("can add fields to an existing xdm", () => { const callback = ({ xdm, data }) => { xdm.b = "2"; data.b = "2"; }; const subject = createEvent(); - subject.setUserData({ a: "1" }); - subject.setUserXdm({ a: "1" }); + subject.setUserData({ + a: "1", + }); + subject.setUserXdm({ + a: "1", + }); subject.finalize(callback); expect(subject.toJSON()).toEqual({ - xdm: { a: "1", b: "2" }, - data: { a: "1", b: "2" }, + xdm: { + a: "1", + b: "2", + }, + data: { + a: "1", + b: "2", + }, }); }); - it("can remove fields", () => { const callback = ({ xdm, data }) => { delete xdm.a; delete data.a; }; const subject = createEvent(); - subject.setUserXdm({ a: "1", b: "2" }); - subject.setUserData({ a: "1", b: "2" }); + subject.setUserXdm({ + a: "1", + b: "2", + }); + subject.setUserData({ + a: "1", + b: "2", + }); subject.finalize(callback); - expect(subject.toJSON()).toEqual({ xdm: { b: "2" }, data: { b: "2" } }); + expect(subject.toJSON()).toEqual({ + xdm: { + b: "2", + }, + data: { + b: "2", + }, + }); }); - it("can set xdm or data to empty objects", () => { const callback = (content) => { content.xdm = {}; content.data = {}; }; const subject = createEvent(); - subject.setUserXdm({ a: "1", b: "2" }); - subject.setUserData({ a: "1", b: "2" }); + subject.setUserXdm({ + a: "1", + b: "2", + }); + subject.setUserData({ + a: "1", + b: "2", + }); subject.finalize(callback); expect(subject.toJSON()).toEqual({}); }); - it("can delete xdm or data objects", () => { const callback = (content) => { delete content.xdm; delete content.data; }; const subject = createEvent(); - subject.setUserXdm({ a: "1", b: "2" }); - subject.setUserData({ a: "1", b: "2" }); + subject.setUserXdm({ + a: "1", + b: "2", + }); + subject.setUserData({ + a: "1", + b: "2", + }); subject.finalize(callback); expect(subject.toJSON()).toEqual({}); }); - it("event merges when there is an error", () => { const callback = ({ xdm, data }) => { delete xdm.a; @@ -299,76 +349,99 @@ describe("createEvent", () => { throw new Error("Expected Error"); }; const subject = createEvent(); - subject.setUserXdm({ a: "1", b: "2" }); - subject.setUserData({ a: "1", b: "2" }); + subject.setUserXdm({ + a: "1", + b: "2", + }); + subject.setUserData({ + a: "1", + b: "2", + }); expect(() => subject.finalize(callback)).toThrowError("Expected Error"); expect(subject.toJSON()).toEqual({ - xdm: { b: "2", c: "3" }, - data: { b: "2", c: "3" }, + xdm: { + b: "2", + c: "3", + }, + data: { + b: "2", + c: "3", + }, }); }); - it("event shouldSend should be true when callback returns undefined", () => { const callback = () => { return undefined; }; const subject = createEvent(); subject.finalize(callback); - expect(subject.shouldSend()).toBeTrue(); + expect(subject.shouldSend()).toBe(true); }); - it("event shouldSend should be true when callback returns true", () => { const callback = () => { return true; }; const subject = createEvent(); subject.finalize(callback); - expect(subject.shouldSend()).toBeTrue(); + expect(subject.shouldSend()).toBe(true); }); - it("event shouldSend should be false when callback throws error", () => { const callback = () => { throw new Error("Expected Error"); }; const subject = createEvent(); expect(() => subject.finalize(callback)).toThrowError("Expected Error"); - expect(subject.shouldSend()).toBeFalse(); + expect(subject.shouldSend()).toBe(false); }); - it("event shouldSend should be false when callback returns false", () => { const callback = () => { return false; }; const subject = createEvent(); subject.finalize(callback); - expect(subject.shouldSend()).toBeFalse(); + expect(subject.shouldSend()).toBe(false); }); - it("can replace xdm or data", () => { const callback = (content) => { - content.xdm = { a: "1" }; - content.data = { b: "2" }; + content.xdm = { + a: "1", + }; + content.data = { + b: "2", + }; }; - const subject = createEvent(); - subject.setUserXdm({ c: "3" }); - subject.setUserData({ d: "4" }); + subject.setUserXdm({ + c: "3", + }); + subject.setUserData({ + d: "4", + }); subject.finalize(callback); expect(subject.toJSON()).toEqual({ - xdm: { a: "1" }, - data: { b: "2" }, + xdm: { + a: "1", + }, + data: { + b: "2", + }, }); }); }); - it("deduplicates propositions by id", () => { const subject = createEvent(); subject.mergeXdm({ _experience: { decisioning: { propositions: [ - { id: "1", scope: "a" }, - { id: "2", scope: "a" }, + { + id: "1", + scope: "a", + }, + { + id: "2", + scope: "a", + }, ], }, }, @@ -377,9 +450,18 @@ describe("createEvent", () => { _experience: { decisioning: { propositions: [ - { id: "2", scope: "a" }, - { id: "3", scope: "a" }, - { id: "3", scope: "a" }, + { + id: "2", + scope: "a", + }, + { + id: "3", + scope: "a", + }, + { + id: "3", + scope: "a", + }, ], }, }, @@ -390,9 +472,18 @@ describe("createEvent", () => { _experience: { decisioning: { propositions: [ - { id: "2", scope: "a" }, - { id: "3", scope: "a" }, - { id: "1", scope: "a" }, + { + id: "2", + scope: "a", + }, + { + id: "3", + scope: "a", + }, + { + id: "1", + scope: "a", + }, ], }, }, diff --git a/test/unit/specs/core/createEventManager.spec.js b/test/unit/specs/core/createEventManager.spec.js index d609d9389..934a3e40b 100644 --- a/test/unit/specs/core/createEventManager.spec.js +++ b/test/unit/specs/core/createEventManager.spec.js @@ -10,13 +10,13 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createEventManager from "../../../../src/core/createEventManager.js"; import createConfig from "../../../../src/core/config/createConfig.js"; import { defer } from "../../../../src/utils/index.js"; import flushPromiseChains from "../../helpers/flushPromiseChains.js"; const CANCELLATION_MESSAGE_REGEX = /Event was canceled/; - describe("createEventManager", () => { let config; let logger; @@ -34,26 +34,26 @@ describe("createEventManager", () => { beforeEach(() => { config = createConfig({ orgId: "ABC123", - onBeforeEventSend: jasmine.createSpy(), + onBeforeEventSend: vi.fn(), debugEnabled: true, edgeConfigOverrides: {}, }); - logger = jasmine.createSpyObj("logger", ["info"]); - lifecycle = jasmine.createSpyObj("lifecycle", { - onBeforeEvent: Promise.resolve(), - onBeforeDataCollectionRequest: Promise.resolve(), - onRequestFailure: Promise.resolve(), - }); - consent = jasmine.createSpyObj("consent", { - awaitConsent: Promise.resolve(), - }); - event = jasmine.createSpyObj("event", { - finalize: undefined, - shouldSend: true, - }); - onRequestFailureForOnBeforeEvent = jasmine.createSpy( - "onRequestFailureForOnBeforeEvent", - ); + logger = { + info: vi.fn(), + }; + lifecycle = { + onBeforeEvent: vi.fn().mockReturnValue(Promise.resolve()), + onBeforeDataCollectionRequest: vi.fn().mockReturnValue(Promise.resolve()), + onRequestFailure: vi.fn().mockReturnValue(Promise.resolve()), + }; + consent = { + awaitConsent: vi.fn().mockReturnValue(Promise.resolve()), + }; + event = { + finalize: vi.fn().mockReturnValue(undefined), + shouldSend: vi.fn().mockReturnValue(true), + }; + onRequestFailureForOnBeforeEvent = vi.fn(); fakeOnRequestFailure = ({ onRequestFailure }) => { onRequestFailure(onRequestFailureForOnBeforeEvent); return Promise.resolve(); @@ -61,10 +61,10 @@ describe("createEventManager", () => { const createEvent = () => { return event; }; - requestPayload = jasmine.createSpyObj("requestPayload", [ - "addEvent", - "mergeConfigOverride", - ]); + requestPayload = { + addEvent: vi.fn(), + mergeConfigOverride: vi.fn(), + }; const createDataCollectionRequestPayload = () => { return requestPayload; }; @@ -73,15 +73,9 @@ describe("createEventManager", () => { return requestPayload; }, }; - createDataCollectionRequest = jasmine - .createSpy("createDataCollectionRequest") - .and.returnValue(request); - sendEdgeNetworkRequest = jasmine - .createSpy("sendEdgeNetworkRequest") - .and.returnValue(Promise.resolve()); - applyResponse = jasmine - .createSpy("applyResponse") - .and.returnValue(Promise.resolve()); + createDataCollectionRequest = vi.fn().mockReturnValue(request); + sendEdgeNetworkRequest = vi.fn().mockReturnValue(Promise.resolve()); + applyResponse = vi.fn().mockReturnValue(Promise.resolve()); eventManager = createEventManager({ config, logger, @@ -94,34 +88,31 @@ describe("createEventManager", () => { applyResponse, }); }); - describe("createEvent", () => { it("creates an event object", () => { expect(eventManager.createEvent()).toBe(event); }); }); - describe("sendEvent", () => { it("creates the payload and adds event and meta", () => { return eventManager.sendEvent(event).then(() => { expect(requestPayload.addEvent).toHaveBeenCalledWith(event); }); }); - it("allows other components to access event and pause the lifecycle", () => { const deferred = defer(); const options = { renderDecisions: true, }; - lifecycle.onBeforeEvent.and.returnValue(deferred.promise); + lifecycle.onBeforeEvent.mockReturnValue(deferred.promise); eventManager.sendEvent(event, options); return flushPromiseChains() .then(() => { expect(lifecycle.onBeforeEvent).toHaveBeenCalledWith({ event, renderDecisions: true, - onResponse: jasmine.any(Function), - onRequestFailure: jasmine.any(Function), + onResponse: expect.any(Function), + onRequestFailure: expect.any(Function), }); expect(consent.awaitConsent).not.toHaveBeenCalled(); deferred.resolve(); @@ -131,62 +122,59 @@ describe("createEventManager", () => { expect(sendEdgeNetworkRequest).toHaveBeenCalled(); }); }); - - it("events call finalize with onBeforeEventSend callback", () => { - return eventManager.sendEvent(event).then(() => { - expect(event.finalize).toHaveBeenCalledWith(config.onBeforeEventSend); - }); + it("events call finalize with onBeforeEventSend callback", async () => { + await eventManager.sendEvent(event); + expect(event.finalize).toHaveBeenCalledWith(config.onBeforeEventSend); }); - it("does not send event when event.shouldSend returns false", () => { - lifecycle.onBeforeEvent.and.callFake(fakeOnRequestFailure); - event.shouldSend.and.returnValue(false); + lifecycle.onBeforeEvent.mockImplementation(fakeOnRequestFailure); + event.shouldSend.mockReturnValue(false); return eventManager.sendEvent(event).then((result) => { expect(result).toBeUndefined(); expect(onRequestFailureForOnBeforeEvent).toHaveBeenCalled(); expect( - onRequestFailureForOnBeforeEvent.calls.mostRecent().args[0].error - .message, + onRequestFailureForOnBeforeEvent.mock.calls[0][0].error.message, ).toMatch(CANCELLATION_MESSAGE_REGEX); expect(logger.info).toHaveBeenCalledWith( - jasmine.stringMatching(CANCELLATION_MESSAGE_REGEX), + expect.stringMatching(CANCELLATION_MESSAGE_REGEX), ); expect(sendEdgeNetworkRequest).not.toHaveBeenCalled(); }); }); - it("sends event when event.shouldSend returns true", () => { - lifecycle.onBeforeEvent.and.callFake(fakeOnRequestFailure); + lifecycle.onBeforeEvent.mockImplementation(fakeOnRequestFailure); return eventManager.sendEvent(event).then((result) => { expect(result).toBeUndefined(); expect(onRequestFailureForOnBeforeEvent).not.toHaveBeenCalled(); expect(sendEdgeNetworkRequest).toHaveBeenCalled(); }); }); - - it("throws an error on event finalize and event should not be sent", () => { - lifecycle.onBeforeEvent.and.callFake(fakeOnRequestFailure); + it("throws an error on event finalize and event should not be sent", async () => { + lifecycle.onBeforeEvent.mockImplementation(fakeOnRequestFailure); const errorMsg = "Expected Error"; - event.finalize.and.throwError(errorMsg); - return eventManager - .sendEvent(event) - .then(() => { + const error = new Error(errorMsg); + + event.finalize.mockImplementation(() => { + throw error; + }); + + await expect( + eventManager.sendEvent(event).then(() => { throw new Error("Should not have resolved."); - }) - .catch((error) => { - expect(error.message).toEqual(errorMsg); - expect(onRequestFailureForOnBeforeEvent).toHaveBeenCalledWith({ - error, - }); - expect(sendEdgeNetworkRequest).not.toHaveBeenCalled(); - }); - }); + }), + ).rejects.toThrowError(errorMsg); + + expect(onRequestFailureForOnBeforeEvent).toHaveBeenCalledWith({ + error, + }); + expect(sendEdgeNetworkRequest).not.toHaveBeenCalled(); + }); it("allows components and consent to pause the lifecycle", () => { const onBeforeEventDeferred = defer(); const consentDeferred = defer(); - lifecycle.onBeforeEvent.and.returnValue(onBeforeEventDeferred.promise); - consent.awaitConsent.and.returnValue(consentDeferred.promise); + lifecycle.onBeforeEvent.mockReturnValue(onBeforeEventDeferred.promise); + consent.awaitConsent.mockReturnValue(consentDeferred.promise); eventManager.sendEvent(event); expect(lifecycle.onBeforeEvent).toHaveBeenCalled(); return flushPromiseChains() @@ -206,64 +194,60 @@ describe("createEventManager", () => { expect(sendEdgeNetworkRequest).toHaveBeenCalled(); }); }); - - it("calls onResponse callbacks on response", () => { - const onResponseForOnBeforeEvent = jasmine.createSpy( - "onResponseForOnBeforeEvent", - ); - lifecycle.onBeforeEvent.and.callFake(({ onResponse }) => { + it("calls onResponse callbacks on response", async () => { + const onResponseForOnBeforeEvent = vi.fn(); + lifecycle.onBeforeEvent.mockImplementation(({ onResponse }) => { onResponse(onResponseForOnBeforeEvent); return Promise.resolve(); }); - const response = { type: "response" }; - sendEdgeNetworkRequest.and.callFake(({ runOnResponseCallbacks }) => { - runOnResponseCallbacks({ response }); - return Promise.resolve(); - }); - return eventManager.sendEvent(event).then(() => { - expect(onResponseForOnBeforeEvent).toHaveBeenCalledWith({ response }); + const response = { + type: "response", + }; + sendEdgeNetworkRequest.mockImplementation( + ({ runOnResponseCallbacks }) => { + runOnResponseCallbacks({ + response, + }); + return Promise.resolve(); + }, + ); + + await eventManager.sendEvent(event); + expect(onResponseForOnBeforeEvent).toHaveBeenCalledWith({ + response, }); }); - - it("calls onRequestFailure callbacks on request failure", () => { - lifecycle.onBeforeEvent.and.callFake(fakeOnRequestFailure); - sendEdgeNetworkRequest.and.callFake( + it("calls onRequestFailure callbacks on request failure", async () => { + lifecycle.onBeforeEvent.mockImplementation(fakeOnRequestFailure); + const error = new Error(); + sendEdgeNetworkRequest.mockImplementation( ({ runOnRequestFailureCallbacks }) => { - const error = new Error(); runOnRequestFailureCallbacks({ error }); throw error; }, ); - return eventManager - .sendEvent(event) - .then(fail) - .catch((error) => { - expect(onRequestFailureForOnBeforeEvent).toHaveBeenCalledWith({ - error, - }); - }); - }); + await expect(eventManager.sendEvent(event)).rejects.toThrow(error); + expect(onRequestFailureForOnBeforeEvent).toHaveBeenCalledWith({ error }); + }); it("sends network request", () => { return eventManager.sendEvent(event).then(() => { expect(sendEdgeNetworkRequest).toHaveBeenCalledWith({ request, - runOnResponseCallbacks: jasmine.any(Function), - runOnRequestFailureCallbacks: jasmine.any(Function), + runOnResponseCallbacks: expect.any(Function), + runOnRequestFailureCallbacks: expect.any(Function), }); }); }); - it("fails returned promise if request fails", () => { - sendEdgeNetworkRequest.and.returnValue( + sendEdgeNetworkRequest.mockReturnValue( Promise.reject(new Error("no connection")), ); - return expectAsync(eventManager.sendEvent(event)).toBeRejectedWithError( + return expect(eventManager.sendEvent(event)).rejects.toThrowError( "no connection", ); }); }); - describe("applyResponse", () => { const responseHeaders = { "x-request-id": "474ec8af-6326-4cb5-952a-4b7dc6be5749", @@ -272,62 +256,59 @@ describe("createEventManager", () => { requestId: "474ec8af-6326-4cb5-952a-4b7dc6be5749", handle: [], }; - const options = { renderDecisions: false, responseHeaders, responseBody, }; - it("creates the payload and adds event and meta", () => { return eventManager.applyResponse(event, options).then(() => { expect(requestPayload.addEvent).toHaveBeenCalledWith(event); }); }); - it("events no not call finalize with onBeforeEventSend callback", () => { return eventManager.applyResponse(event, options).then(() => { expect(event.finalize).not.toHaveBeenCalled(); }); }); - it("calls onResponse callbacks", () => { - const onResponseForOnBeforeEvent = jasmine.createSpy( - "onResponseForOnBeforeEvent", - ); - lifecycle.onBeforeEvent.and.callFake(({ onResponse }) => { + const onResponseForOnBeforeEvent = vi.fn(); + lifecycle.onBeforeEvent.mockImplementation(({ onResponse }) => { onResponse(onResponseForOnBeforeEvent); return Promise.resolve(); }); - const response = { type: "response" }; - - applyResponse.and.callFake(({ runOnResponseCallbacks }) => { - runOnResponseCallbacks({ response }); + const response = { + type: "response", + }; + applyResponse.mockImplementation(({ runOnResponseCallbacks }) => { + runOnResponseCallbacks({ + response, + }); return Promise.resolve(); }); - return eventManager.applyResponse(event, options).then(() => { - expect(onResponseForOnBeforeEvent).toHaveBeenCalledWith({ response }); + expect(onResponseForOnBeforeEvent).toHaveBeenCalledWith({ + response, + }); }); }); - it("applies AEP edge response headers and body and returns result", () => { - const mockResult = { response: "yep" }; - applyResponse.and.returnValue(mockResult); - + const mockResult = { + response: "yep", + }; + applyResponse.mockReturnValue(mockResult); return eventManager.applyResponse(event, options).then((result) => { expect(sendEdgeNetworkRequest).not.toHaveBeenCalled(); expect(applyResponse).toHaveBeenCalledWith({ request, responseHeaders, responseBody, - runOnResponseCallbacks: jasmine.any(Function), + runOnResponseCallbacks: expect.any(Function), }); expect(result).toEqual(mockResult); }); }); - - it("includes override configuration, if provided", (done) => { + it("includes override configuration, if provided", () => { eventManager .sendEvent(event, { edgeConfigOverrides: { @@ -352,15 +333,12 @@ describe("createEventManager", () => { }, }, }); - done(); }); }); - - it("includes global override configuration, if provided", (done) => { + it("includes global override configuration, if provided", () => { config.edgeConfigOverrides.com_adobe_identity = { idSyncContainerId: "123", }; - eventManager .sendEvent(event, { edgeConfigOverrides: {}, @@ -371,10 +349,9 @@ describe("createEventManager", () => { idSyncContainerId: "123", }, }); - done(); }); }); - it("includes the datastreamId override, if provided", (done) => { + it("includes the datastreamId override, if provided", () => { eventManager .sendEvent(event, { edgeConfigOverrides: { @@ -383,10 +360,9 @@ describe("createEventManager", () => { }) .then(() => { expect(createDataCollectionRequest).toHaveBeenCalledWith({ - payload: jasmine.any(Object), + payload: expect.any(Object), datastreamIdOverride: "456", }); - done(); }); }); }); diff --git a/test/unit/specs/core/createInstanceFunction.spec.js b/test/unit/specs/core/createInstanceFunction.spec.js index b92a2d865..1097727ae 100644 --- a/test/unit/specs/core/createInstanceFunction.spec.js +++ b/test/unit/specs/core/createInstanceFunction.spec.js @@ -10,43 +10,59 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import createInstanceFunction from "../../../../src/core/createInstanceFunction.js"; import flushPromiseChains from "../../helpers/flushPromiseChains.js"; describe("createInstance", () => { it("successfully executes command", () => { - const executeCommand = jasmine - .createSpy() - .and.returnValue(Promise.resolve("commandresult")); - const resolve = jasmine.createSpy(); - const reject = jasmine.createSpy(); + const executeCommand = vi + .fn() + .mockReturnValue(Promise.resolve("commandresult")); + const resolve = vi.fn(); + const reject = vi.fn(); const instance = createInstanceFunction(executeCommand); - - instance([resolve, reject, ["event", { foo: "bar" }]]); - - expect(executeCommand).toHaveBeenCalledWith("event", { foo: "bar" }); - + instance([ + resolve, + reject, + [ + "event", + { + foo: "bar", + }, + ], + ]); + expect(executeCommand).toHaveBeenCalledWith("event", { + foo: "bar", + }); return flushPromiseChains().then(() => { expect(resolve).toHaveBeenCalledWith("commandresult"); expect(reject).not.toHaveBeenCalled(); }); }); - it("unsuccessfully execute command", () => { - const executeCommand = jasmine - .createSpy() - .and.returnValue(Promise.reject(new Error("error occurred"))); - const resolve = jasmine.createSpy(); - const reject = jasmine.createSpy(); + const executeCommand = vi + .fn() + .mockReturnValue(Promise.reject(new Error("error occurred"))); + const resolve = vi.fn(); + const reject = vi.fn(); const instance = createInstanceFunction(executeCommand); - - instance([resolve, reject, ["event", { foo: "bar" }]]); - - expect(executeCommand).toHaveBeenCalledWith("event", { foo: "bar" }); - + instance([ + resolve, + reject, + [ + "event", + { + foo: "bar", + }, + ], + ]); + expect(executeCommand).toHaveBeenCalledWith("event", { + foo: "bar", + }); return flushPromiseChains().then(() => { expect(resolve).not.toHaveBeenCalled(); - expect(reject).toHaveBeenCalledWith(jasmine.any(Error)); + expect(reject).toHaveBeenCalledWith(expect.any(Error)); }); }); }); diff --git a/test/unit/specs/core/createLifecycle.spec.js b/test/unit/specs/core/createLifecycle.spec.js index 209ce2eed..7b1843e4b 100644 --- a/test/unit/specs/core/createLifecycle.spec.js +++ b/test/unit/specs/core/createLifecycle.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import createLifecycle from "../../../../src/core/createLifecycle.js"; describe("createLifecycle", () => { @@ -28,20 +29,19 @@ describe("createLifecycle", () => { "onRequestFailure", "onClick", ].forEach((methodName) => { - expect(lifecycle[methodName]()).toEqual(jasmine.any(Promise)); + expect(lifecycle[methodName]()).toEqual(expect.any(Promise)); }); }); - it("calls all callbacks for a given lifecycle method", () => { const callbacks = [ - jasmine - .createSpy() - .and.returnValue({ returnValue1: "valueFromCallback1" }), - jasmine - .createSpy() - .and.returnValue( - Promise.resolve({ returnValue2: "valueFromCallback2" }), - ), + vi.fn().mockReturnValue({ + returnValue1: "valueFromCallback1", + }), + vi.fn().mockReturnValue( + Promise.resolve({ + returnValue2: "valueFromCallback2", + }), + ), ]; const componentRegistry = { getLifecycleCallbacks(hookName) { @@ -58,17 +58,16 @@ describe("createLifecycle", () => { expect(result[1].returnValue2).toEqual("valueFromCallback2"); }); }); - - it("ensures all callbacks for one method are called before any callbacks from a different method", () => { + it("ensures all callbacks for one method are called before any callbacks from a different method", async () => { let lifecycle; const callbacksByHookName = { onComponentsRegistered: [ - jasmine.createSpy().and.callFake(() => { + vi.fn().mockImplementation(() => { lifecycle.onBeforeEvent(); }), - jasmine.createSpy(), + vi.fn(), ], - onBeforeEvent: [jasmine.createSpy()], + onBeforeEvent: [vi.fn()], }; const componentRegistry = { getLifecycleCallbacks(hookName) { @@ -76,13 +75,17 @@ describe("createLifecycle", () => { }, }; lifecycle = createLifecycle(componentRegistry); - return lifecycle.onComponentsRegistered().then(() => { - expect( - callbacksByHookName.onComponentsRegistered[0], - ).toHaveBeenCalledBefore(callbacksByHookName.onComponentsRegistered[1]); - expect( - callbacksByHookName.onComponentsRegistered[1], - ).toHaveBeenCalledBefore(callbacksByHookName.onBeforeEvent[0]); - }); + + await lifecycle.onComponentsRegistered(); + + const callOrder1 = + callbacksByHookName.onComponentsRegistered[0].mock.invocationCallOrder[0]; + const callOrder2 = + callbacksByHookName.onComponentsRegistered[1].mock.invocationCallOrder[0]; + const callOrder3 = + callbacksByHookName.onBeforeEvent[0].mock.invocationCallOrder[0]; + + expect(callOrder1).toBeLessThan(callOrder2); + expect(callOrder2).toBeLessThan(callOrder3); }); }); diff --git a/test/unit/specs/core/createLogController.spec.js b/test/unit/specs/core/createLogController.spec.js index e0bed5d18..62f8597fc 100644 --- a/test/unit/specs/core/createLogController.spec.js +++ b/test/unit/specs/core/createLogController.spec.js @@ -10,10 +10,10 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createLogController from "../../../../src/core/createLogController.js"; const instanceName = "alloy123"; - describe("createLogController", () => { let console; let locationSearch; @@ -23,27 +23,29 @@ describe("createLogController", () => { let sessionStorage; let createNamespacedStorage; let getMonitors; - beforeEach(() => { - console = { log() {} }; + console = { + log() {}, + }; locationSearch = ""; - logger = { log() {} }; - createLogger = jasmine - .createSpy() - .and.callFake(({ getDebugEnabled: _getDebugEnabled }) => { + logger = { + log() {}, + }; + createLogger = vi + .fn() + .mockImplementation(({ getDebugEnabled: _getDebugEnabled }) => { getDebugEnabled = _getDebugEnabled; return logger; }); sessionStorage = { - getItem: jasmine.createSpy().and.returnValue(null), - setItem: jasmine.createSpy(), + getItem: vi.fn().mockReturnValue(null), + setItem: vi.fn(), }; - createNamespacedStorage = jasmine.createSpy().and.returnValue({ + createNamespacedStorage = vi.fn().mockReturnValue({ session: sessionStorage, }); getMonitors = () => []; }); - it("creates a namespaced storage", () => { createLogController({ console, @@ -55,7 +57,6 @@ describe("createLogController", () => { }); expect(createNamespacedStorage).toHaveBeenCalledWith("instance.alloy123."); }); - it("returns false for getDebugEnabled if storage item is not found", () => { createLogController({ console, @@ -67,7 +68,6 @@ describe("createLogController", () => { }); expect(getDebugEnabled()).toBe(false); }); - it("returns false for getDebugEnabled if storage item is false", () => { sessionStorage.getItem = () => "false"; createLogController({ @@ -80,7 +80,6 @@ describe("createLogController", () => { }); expect(getDebugEnabled()).toBe(false); }); - it("returns true for getDebugEnabled if storage item is true", () => { sessionStorage.getItem = () => "true"; createLogController({ @@ -93,7 +92,6 @@ describe("createLogController", () => { }); expect(getDebugEnabled()).toBe(true); }); - it("persists changes to debugEnabled if not set from config", () => { const logController = createLogController({ console, @@ -103,12 +101,12 @@ describe("createLogController", () => { createNamespacedStorage, getMonitors, }); - - logController.setDebugEnabled(true, { fromConfig: false }); + logController.setDebugEnabled(true, { + fromConfig: false, + }); expect(sessionStorage.setItem).toHaveBeenCalledWith("debug", "true"); expect(getDebugEnabled()).toBe(true); }); - it("does not persist changes to debugEnabled if set from config", () => { const logController = createLogController({ console, @@ -118,12 +116,12 @@ describe("createLogController", () => { createNamespacedStorage, getMonitors, }); - - logController.setDebugEnabled(true, { fromConfig: true }); + logController.setDebugEnabled(true, { + fromConfig: true, + }); expect(sessionStorage.setItem).not.toHaveBeenCalled(); expect(getDebugEnabled()).toBe(true); }); - it("does not change debugEnabled from config if previously changed from something other than config on same page load", () => { const logController = createLogController({ console, @@ -133,14 +131,16 @@ describe("createLogController", () => { createNamespacedStorage, getMonitors, }); - - logController.setDebugEnabled(true, { fromConfig: false }); - logController.setDebugEnabled(false, { fromConfig: true }); + logController.setDebugEnabled(true, { + fromConfig: false, + }); + logController.setDebugEnabled(false, { + fromConfig: true, + }); expect(sessionStorage.setItem).toHaveBeenCalledWith("debug", "true"); expect(sessionStorage.setItem).not.toHaveBeenCalledWith("debug", "false"); expect(getDebugEnabled()).toBe(true); }); - it("does not change debugEnabled from config if previously changed from something other than config on previous page load", () => { sessionStorage.getItem = () => "true"; const logController = createLogController({ @@ -151,12 +151,12 @@ describe("createLogController", () => { createNamespacedStorage, getMonitors, }); - - logController.setDebugEnabled(false, { fromConfig: true }); + logController.setDebugEnabled(false, { + fromConfig: true, + }); expect(sessionStorage.setItem).not.toHaveBeenCalled(); expect(getDebugEnabled()).toBe(true); }); - it("sets debugEnabled to true if query string parameter set to true", () => { locationSearch = "?alloy_debug=true"; const logController = createLogController({ @@ -169,12 +169,13 @@ describe("createLogController", () => { }); // Make sure setting debugEnabled from config can't override it. - logController.setDebugEnabled(false, { fromConfig: true }); + logController.setDebugEnabled(false, { + fromConfig: true, + }); expect(sessionStorage.setItem).toHaveBeenCalledWith("debug", "true"); - expect(sessionStorage.setItem.calls.count()).toBe(1); + expect(sessionStorage.setItem.mock.calls.length).toBe(1); expect(getDebugEnabled()).toBe(true); }); - it("sets debugEnabled to false if query string parameter set to false", () => { locationSearch = "?alloy_debug=false"; const logController = createLogController({ @@ -187,12 +188,13 @@ describe("createLogController", () => { }); // Make sure setting debugEnabled from config can't override it. - logController.setDebugEnabled(true, { fromConfig: true }); + logController.setDebugEnabled(true, { + fromConfig: true, + }); expect(sessionStorage.setItem).toHaveBeenCalledWith("debug", "false"); - expect(sessionStorage.setItem.calls.count()).toBe(1); + expect(sessionStorage.setItem.mock.calls.length).toBe(1); expect(getDebugEnabled()).toBe(false); }); - it("creates a logger", () => { const logController = createLogController({ console, @@ -202,16 +204,16 @@ describe("createLogController", () => { createNamespacedStorage, getMonitors, }); - expect(createLogger).toHaveBeenCalledWith({ getDebugEnabled, console, getMonitors, - context: { instanceName: "alloy123" }, + context: { + instanceName: "alloy123", + }, }); expect(logController.logger).toBe(logger); }); - it("creates a component logger", () => { const logController = createLogController({ console, @@ -222,9 +224,8 @@ describe("createLogController", () => { getMonitors, }); const componentLogger = {}; - createLogger.and.returnValue(componentLogger); + createLogger.mockReturnValue(componentLogger); const result = logController.createComponentLogger("Personalization"); - expect(createLogger).toHaveBeenCalledWith({ getDebugEnabled, console, diff --git a/test/unit/specs/core/createLogger.spec.js b/test/unit/specs/core/createLogger.spec.js index ec9584ad2..d99e6aa42 100644 --- a/test/unit/specs/core/createLogger.spec.js +++ b/test/unit/specs/core/createLogger.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createLogger from "../../../../src/core/createLogger.js"; const logMethods = ["info", "warn", "error"]; @@ -23,25 +24,25 @@ const monitorMethods = [ "onNetworkResponse", "onNetworkError", ]; - const message = "test message"; - describe("createLogger", () => { let logEnabled; let logger; - let console; let getDebugEnabled; let context; let getMonitors; - beforeEach(() => { - console = jasmine.createSpyObj("console", logMethods); + console = logMethods.reduce((acc, logMethod) => { + acc[logMethod] = vi.fn(); + return acc; + }, {}); getDebugEnabled = () => logEnabled; - context = { instanceName: "myinstance" }; + context = { + instanceName: "myinstance", + }; getMonitors = () => []; }); - const build = () => { logger = createLogger({ console, @@ -50,7 +51,6 @@ describe("createLogger", () => { getMonitors, }); }; - logMethods.forEach((logMethod) => { it(`logs message if debugging is enabled and ${logMethod} is called`, () => { logEnabled = true; @@ -58,7 +58,6 @@ describe("createLogger", () => { logger[logMethod](message); expect(console[logMethod]).toHaveBeenCalledWith("[myinstance]", message); }); - it(`does not log a message if debugging is disabled and ${logMethod} is called`, () => { logEnabled = false; build(); @@ -66,54 +65,61 @@ describe("createLogger", () => { expect(console[logMethod]).not.toHaveBeenCalled(); }); }); - it("is enabled if logEnabled", () => { logEnabled = true; getMonitors = () => []; build(); - expect(logger.enabled).toBeTrue(); + expect(logger.enabled).toBe(true); }); - it("is enabled if there are monitors", () => { logEnabled = false; getMonitors = () => [{}]; build(); - expect(logger.enabled).toBeTrue(); + expect(logger.enabled).toBe(true); }); - it("is not enabled if no logEnabled and no monitors", () => { logEnabled = false; getMonitors = () => []; build(); - expect(logger.enabled).toBeFalse(); + expect(logger.enabled).toBe(false); }); - it("is ok for a monitor to only implement some of the methods", () => { getMonitors = () => [{}]; build(); - logger.logOnInstanceCreated({ b: "2" }); + logger.logOnInstanceCreated({ + b: "2", + }); }); - monitorMethods.forEach((monitorMethod) => { it(`calls the monitor method ${monitorMethod}`, () => { - const loggerMethod = `log${monitorMethod - .charAt(0) - .toUpperCase()}${monitorMethod.slice(1)}`; - context = { a: "1" }; - const monitor1 = jasmine.createSpyObj("monitor1", [ - monitorMethod, - "onBeforeLog", - ]); - const monitor2 = jasmine.createSpyObj("monitor2", [monitorMethod]); + const loggerMethod = `log${monitorMethod.charAt(0).toUpperCase()}${monitorMethod.slice(1)}`; + context = { + a: "1", + }; + const monitor1 = { + [monitorMethod]: vi.fn(), + onBeforeLog: vi.fn(), + }; + + const monitor2 = { + [monitorMethod]: vi.fn(), + }; getMonitors = () => [monitor1, monitor2]; build(); - logger[loggerMethod]({ b: "2" }); - expect(monitor1[monitorMethod]).toHaveBeenCalledWith({ a: "1", b: "2" }); + logger[loggerMethod]({ + b: "2", + }); + expect(monitor1[monitorMethod]).toHaveBeenCalledWith({ + a: "1", + b: "2", + }); expect(monitor1.onBeforeLog).toHaveBeenCalled(); - expect(monitor2[monitorMethod]).toHaveBeenCalledWith({ a: "1", b: "2" }); + expect(monitor2[monitorMethod]).toHaveBeenCalledWith({ + a: "1", + b: "2", + }); }); }); - it("logs onInstanceCreated", () => { logEnabled = true; build(); @@ -123,54 +129,68 @@ describe("createLogger", () => { "Instance initialized.", ); }); - it("logs onInstanceConfigured", () => { logEnabled = true; build(); - logger.logOnInstanceConfigured({ config: { a: "1" } }); + logger.logOnInstanceConfigured({ + config: { + a: "1", + }, + }); expect(console.info).toHaveBeenCalledWith( "[myinstance]", "Instance configured. Computed configuration:", - { a: "1" }, + { + a: "1", + }, ); }); - it("logs onBeforeCommand", () => { logEnabled = true; build(); logger.logOnBeforeCommand({ commandName: "mycommand", - options: { a: "1" }, + options: { + a: "1", + }, }); expect(console.info).toHaveBeenCalledWith( "[myinstance]", "Executing mycommand command. Options:", - { a: "1" }, + { + a: "1", + }, ); }); - it("logs onCommandResolved", () => { logEnabled = true; build(); logger.logOnCommandResolved({ commandName: "mycommand", - options: { a: "1" }, - result: { b: "2" }, + options: { + a: "1", + }, + result: { + b: "2", + }, }); expect(console.info).toHaveBeenCalledWith( "[myinstance]", "mycommand command resolved. Result:", - { b: "2" }, + { + b: "2", + }, ); }); - it("logs onCommandRejected", () => { logEnabled = true; build(); const error = Error("myerror"); logger.logOnCommandRejected({ commandName: "mycommand", - options: { a: "1" }, + options: { + a: "1", + }, error, }); expect(console.error).toHaveBeenCalledWith( @@ -179,26 +199,30 @@ describe("createLogger", () => { error, ); }); - it("logs onBeforeNetworkRequest", () => { logEnabled = true; build(); logger.logOnBeforeNetworkRequest({ requestId: "abc123", - payload: { a: "1" }, + payload: { + a: "1", + }, }); expect(console.info).toHaveBeenCalledWith( "[myinstance]", "Request abc123: Sending request.", - { a: "1" }, + { + a: "1", + }, ); }); - it("logs onNetworkResponse with parsedBody", () => { logEnabled = true; build(); logger.logOnNetworkResponse({ - parsedBody: { a: "1" }, + parsedBody: { + a: "1", + }, body: "thebody", requestId: "abc123", statusCode: 200, @@ -206,10 +230,11 @@ describe("createLogger", () => { expect(console.info).toHaveBeenCalledWith( "[myinstance]", "Request abc123: Received response with status code 200 and response body:", - { a: "1" }, + { + a: "1", + }, ); }); - it("logs onNetworkResponse with no parsedBody", () => { logEnabled = true; build(); @@ -224,7 +249,6 @@ describe("createLogger", () => { "thebody", ); }); - it("logs onNetworkResponse with no response body", () => { logEnabled = true; build(); @@ -239,11 +263,13 @@ describe("createLogger", () => { "", ); }); - it("logs onNetworkError", () => { logEnabled = true; build(); - logger.logOnNetworkError({ requestId: "abc123", error: "myerror" }); + logger.logOnNetworkError({ + requestId: "abc123", + error: "myerror", + }); expect(console.error).toHaveBeenCalledWith( "[myinstance]", "Request abc123: Network request failed.", diff --git a/test/unit/specs/core/edgeNetwork/handleRequestFailure.spec.js b/test/unit/specs/core/edgeNetwork/handleRequestFailure.spec.js index 569a289d3..4da51285c 100644 --- a/test/unit/specs/core/edgeNetwork/handleRequestFailure.spec.js +++ b/test/unit/specs/core/edgeNetwork/handleRequestFailure.spec.js @@ -9,19 +9,17 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import handleRequestFailure from "../../../../../src/core/edgeNetwork/handleRequestFailure.js"; describe("handleRequestFailure", () => { it("works", () => { - const onRequestFailureCallbackAggregator = jasmine.createSpyObj( - "onRequestFailureCallbackAggregator", - ["add", "call"], - ); - - onRequestFailureCallbackAggregator.call.and.returnValue(Promise.resolve()); - + const onRequestFailureCallbackAggregator = { + add: vi.fn(), + call: vi.fn(), + }; + onRequestFailureCallbackAggregator.call.mockReturnValue(Promise.resolve()); const error = new Error("woopsie"); - handleRequestFailure(onRequestFailureCallbackAggregator)(error).catch( (err) => { expect(onRequestFailureCallbackAggregator.call).toHaveBeenCalledWith({ diff --git a/test/unit/specs/core/edgeNetwork/injectApplyResponse.spec.js b/test/unit/specs/core/edgeNetwork/injectApplyResponse.spec.js index 2065b801e..06c071ad1 100644 --- a/test/unit/specs/core/edgeNetwork/injectApplyResponse.spec.js +++ b/test/unit/specs/core/edgeNetwork/injectApplyResponse.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectApplyResponse from "../../../../../src/core/edgeNetwork/injectApplyResponse.js"; import assertFunctionCallOrder from "../../../helpers/assertFunctionCallOrder.js"; import { defer } from "../../../../../src/utils/index.js"; @@ -24,12 +25,11 @@ describe("injectApplyResponse", () => { let response; let responseHeaders; let responseBody; - const testApplyResponseSuccess = ({ runOnResponseCallbacks, assertLifecycleCall, }) => { - const successHandler = jasmine.createSpy("successHandler"); + const successHandler = vi.fn(); applyResponse({ request, responseHeaders, @@ -40,46 +40,45 @@ describe("injectApplyResponse", () => { .then(() => { expect(successHandler).not.toHaveBeenCalled(); assertLifecycleCall(); - expect(lifecycle.onResponse).toHaveBeenCalledWith({ response }); + expect(lifecycle.onResponse).toHaveBeenCalledWith({ + response, + }); return flushPromiseChains(); }) .then(() => { expect(successHandler).toHaveBeenCalled(); }); }; - beforeEach(() => { - lifecycle = jasmine.createSpyObj("lifecycle", { - onBeforeRequest: Promise.resolve(), - onRequestFailure: Promise.resolve(), - onResponse: Promise.resolve(), - }); - cookieTransfer = jasmine.createSpyObj("cookieTransfer", [ - "cookiesToPayload", - "responseToCookies", - ]); - - processWarningsAndErrors = jasmine.createSpy("processWarningsAndErrors"); - - request = jasmine.createSpyObj("request", { - getId: "RID123", - getAction: "test-action", - getPayload: { + lifecycle = { + onBeforeRequest: vi.fn().mockReturnValue(Promise.resolve()), + onRequestFailure: vi.fn().mockReturnValue(Promise.resolve()), + onResponse: vi.fn().mockReturnValue(Promise.resolve()), + }; + cookieTransfer = { + cookiesToPayload: vi.fn(), + responseToCookies: vi.fn(), + }; + processWarningsAndErrors = vi.fn(); + request = { + getId: vi.fn().mockReturnValue("RID123"), + getAction: vi.fn().mockReturnValue("test-action"), + getPayload: vi.fn().mockReturnValue({ type: "payload", - }, - getUseIdThirdPartyDomain: false, - getUseSendBeacon: false, - }); - - responseHeaders = { "x-hello": "yep" }; - responseBody = { handle: [] }; - - response = { type: "response" }; - - createResponse = jasmine - .createSpy("createResponse") - .and.returnValue(response); - + }), + getUseIdThirdPartyDomain: vi.fn().mockReturnValue(false), + getUseSendBeacon: vi.fn().mockReturnValue(false), + }; + responseHeaders = { + "x-hello": "yep", + }; + responseBody = { + handle: [], + }; + response = { + type: "response", + }; + createResponse = vi.fn().mockReturnValue(response); applyResponse = injectApplyResponse({ cookieTransfer, lifecycle, @@ -87,49 +86,47 @@ describe("injectApplyResponse", () => { processWarningsAndErrors, }); }); - it("calls lifecycle.onResponse, waits for it to complete, then resolves promise", () => { const deferred = defer(); - lifecycle.onResponse.and.returnValue(deferred.promise); + lifecycle.onResponse.mockReturnValue(deferred.promise); return testApplyResponseSuccess({ assertLifecycleCall() { - expect(lifecycle.onResponse).toHaveBeenCalledWith({ response }); + expect(lifecycle.onResponse).toHaveBeenCalledWith({ + response, + }); deferred.resolve(); }, }); }); - it("calls lifecycle.onBeforeRequest's responseCallback callback, waits for it to complete, then resolves promise", () => { const deferred = defer(); - const responseCallback = jasmine - .createSpy("responseCallback") - .and.returnValue(deferred.promise); - lifecycle.onBeforeRequest.and.callFake(({ onResponse }) => { + const responseCallback = vi.fn().mockReturnValue(deferred.promise); + lifecycle.onBeforeRequest.mockImplementation(({ onResponse }) => { onResponse(responseCallback); return Promise.resolve(); }); return testApplyResponseSuccess({ assertLifecycleCall() { - expect(responseCallback).toHaveBeenCalledWith({ response }); + expect(responseCallback).toHaveBeenCalledWith({ + response, + }); deferred.resolve(); }, }); }); - it("calls runOnResponseCallbacks, waits for it to complete, then resolves promise", () => { const deferred = defer(); - const runOnResponseCallbacks = jasmine - .createSpy("runOnResponseCallbacks") - .and.returnValue(deferred.promise); + const runOnResponseCallbacks = vi.fn().mockReturnValue(deferred.promise); return testApplyResponseSuccess({ runOnResponseCallbacks, assertLifecycleCall() { - expect(runOnResponseCallbacks).toHaveBeenCalledWith({ response }); + expect(runOnResponseCallbacks).toHaveBeenCalledWith({ + response, + }); deferred.resolve(); }, }); }); - it("transfers cookies from response before lifecycle.onResponse", () => { return applyResponse({ request, @@ -143,43 +140,73 @@ describe("injectApplyResponse", () => { ]); }); }); - it("returns the merged object from lifecycle::onResponse and runOnResponseCallbacks", () => { - const runOnResponseCallbacks = jasmine - .createSpy("runOnResponseCallbacks") - .and.returnValue(Promise.resolve([{ c: 2 }, { h: 9 }, undefined])); - - lifecycle.onResponse.and.returnValue( - Promise.resolve([{ a: 2 }, { b: 8 }, undefined]), + const runOnResponseCallbacks = vi.fn().mockReturnValue( + Promise.resolve([ + { + c: 2, + }, + { + h: 9, + }, + undefined, + ]), ); - - return expectAsync( + lifecycle.onResponse.mockReturnValue( + Promise.resolve([ + { + a: 2, + }, + { + b: 8, + }, + undefined, + ]), + ); + return expect( applyResponse({ request, responseHeaders, responseBody, runOnResponseCallbacks, }), - ).toBeResolvedTo({ c: 2, h: 9, a: 2, b: 8 }); + ).resolves.toStrictEqual({ + c: 2, + h: 9, + a: 2, + b: 8, + }); }); - it("returns the merged object from lifecycle::onBeforeRequest & lifecycle::onResponse", () => { - lifecycle.onBeforeRequest.and.callFake(({ onResponse }) => { - onResponse(() => ({ a: 1 })); - onResponse(() => ({ b: 1 })); + lifecycle.onBeforeRequest.mockImplementation(({ onResponse }) => { + onResponse(() => ({ + a: 1, + })); + onResponse(() => ({ + b: 1, + })); onResponse(() => undefined); return Promise.resolve(); }); - lifecycle.onResponse.and.returnValue(Promise.resolve([{ c: 2 }])); - return expectAsync( - applyResponse({ request, responseHeaders, responseBody }), - ).toBeResolvedTo({ + lifecycle.onResponse.mockReturnValue( + Promise.resolve([ + { + c: 2, + }, + ]), + ); + return expect( + applyResponse({ + request, + responseHeaders, + responseBody, + }), + ).resolves.toStrictEqual({ a: 1, b: 1, c: 2, }); }); - it("creates the response with the correct parameters", () => { return applyResponse({ request, @@ -188,29 +215,23 @@ describe("injectApplyResponse", () => { }).then(() => { expect(createResponse).toHaveBeenCalledWith({ content: responseBody, - getHeader: jasmine.any(Function), + getHeader: expect.any(Function), }); }); }); - it("catches when warnings and errors in response", () => { const error = new Error("whoopsie"); - processWarningsAndErrors = jasmine - .createSpy("processWarningsAndErrors") - .and.throwError(error); - + processWarningsAndErrors = vi.fn().mockImplementation(() => { + throw error; + }); applyResponse = injectApplyResponse({ cookieTransfer, lifecycle, createResponse, processWarningsAndErrors, }); - - const runOnResponseCallbacks = jasmine.createSpy("runOnResponseCallbacks"); - const runOnRequestFailureCallbacks = jasmine.createSpy( - "runOnRequestFailureCallbacks", - ); - + const runOnResponseCallbacks = vi.fn(); + const runOnRequestFailureCallbacks = vi.fn(); return applyResponse({ request, responseHeaders, @@ -226,25 +247,36 @@ describe("injectApplyResponse", () => { }) .then(() => {}); }); - it("returns combined result", () => { - const runOnResponseCallbacks = jasmine - .createSpy("runOnResponseCallbacks") - .and.returnValue(Promise.resolve([{ c: 2 }, { h: 9 }, undefined])); - + const runOnResponseCallbacks = vi.fn().mockReturnValue( + Promise.resolve([ + { + c: 2, + }, + { + h: 9, + }, + undefined, + ]), + ); return applyResponse({ request, responseHeaders, responseBody, runOnResponseCallbacks, }).then((result) => { - expect(runOnResponseCallbacks).toHaveBeenCalledWith({ response }); + expect(runOnResponseCallbacks).toHaveBeenCalledWith({ + response, + }); assertFunctionCallOrder([ cookieTransfer.responseToCookies, lifecycle.onResponse, ]); expect(result).not.toBeNull(); - expect(result).toEqual({ c: 2, h: 9 }); + expect(result).toEqual({ + c: 2, + h: 9, + }); }); }); }); diff --git a/test/unit/specs/core/edgeNetwork/injectExtractEdgeInfo.spec.js b/test/unit/specs/core/edgeNetwork/injectExtractEdgeInfo.spec.js index 8d216abe8..0148f5be1 100644 --- a/test/unit/specs/core/edgeNetwork/injectExtractEdgeInfo.spec.js +++ b/test/unit/specs/core/edgeNetwork/injectExtractEdgeInfo.spec.js @@ -10,35 +10,57 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectExtractEdgeInfo from "../../../../../src/core/edgeNetwork/injectExtractEdgeInfo.js"; describe("extractEdgeInfo", () => { let logger; let extractEdgeInfo; beforeEach(() => { - logger = jasmine.createSpyObj("logger", ["warn"]); - extractEdgeInfo = injectExtractEdgeInfo({ logger }); + logger = { + warn: vi.fn(), + }; + extractEdgeInfo = injectExtractEdgeInfo({ + logger, + }); }); - [undefined, ""].forEach((input) => { it(`doesn't log for missing header "${input}"`, () => { expect(extractEdgeInfo(input)).toEqual({}); expect(logger.warn).not.toHaveBeenCalled(); }); }); - ["OR2", "VA6;", "VA6;bad"].forEach((input) => { it(`handles invalid header "${input}"`, () => { expect(extractEdgeInfo(input)).toEqual({}); expect(logger.warn).toHaveBeenCalled(); }); }); - [ - ["OR2;9", { regionId: 9 }], - ["OR2;9;other info", { regionId: 9 }], - ["OR2;011", { regionId: 11 }], - ["VA7;-1", { regionId: -1 }], + [ + "OR2;9", + { + regionId: 9, + }, + ], + [ + "OR2;9;other info", + { + regionId: 9, + }, + ], + [ + "OR2;011", + { + regionId: 11, + }, + ], + [ + "VA7;-1", + { + regionId: -1, + }, + ], ].forEach(([input, expectedOutput]) => { it(`parses "${input}" correctly`, () => { expect(extractEdgeInfo(input)).toEqual(expectedOutput); diff --git a/test/unit/specs/core/edgeNetwork/injectGetLocationHint.spec.js b/test/unit/specs/core/edgeNetwork/injectGetLocationHint.spec.js index f08bf6814..bbd426140 100644 --- a/test/unit/specs/core/edgeNetwork/injectGetLocationHint.spec.js +++ b/test/unit/specs/core/edgeNetwork/injectGetLocationHint.spec.js @@ -9,43 +9,46 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectGetLocationHint from "../../../../../src/core/edgeNetwork/injectGetLocationHint.js"; describe("injectGetLocationHint", () => { let cookieJar; let orgId; let getLocationHint; - beforeEach(() => { - cookieJar = jasmine.createSpyObj("cookieJar", ["get"]); + cookieJar = { + get: vi.fn(), + }; orgId = "myorg@AdobeOrg"; - getLocationHint = injectGetLocationHint({ orgId, cookieJar }); + getLocationHint = injectGetLocationHint({ + orgId, + cookieJar, + }); }); - it("returns the cluster cookie", () => { - cookieJar.get.and.returnValue("mycluster"); + cookieJar.get.mockReturnValue("mycluster"); expect(getLocationHint()).toEqual("mycluster"); }); - it("generates the correct cookie name", () => { - cookieJar.get.and.returnValue("mycluster"); + cookieJar.get.mockReturnValue("mycluster"); getLocationHint(); - expect(cookieJar.get).toHaveBeenCalledOnceWith( + expect(cookieJar.get).toHaveBeenNthCalledWith( + 1, "kndctr_myorg_AdobeOrg_cluster", ); }); - it("doesn't cache the result", () => { - cookieJar.get.and.returnValues("cluster1", "cluster2"); + cookieJar.get + .mockReturnValueOnce("cluster1") + .mockReturnValueOnce("cluster2"); expect(getLocationHint()).toEqual("cluster1"); expect(getLocationHint()).toEqual("cluster2"); }); - it("returns mbox edge cluster cookie", () => { - cookieJar.get.and.returnValues(undefined, "35"); + cookieJar.get.mockReturnValueOnce(undefined).mockReturnValueOnce("35"); expect(getLocationHint()).toEqual("t35"); }); - it("returns undefined", () => { expect(getLocationHint()).toBeUndefined(); }); diff --git a/test/unit/specs/core/edgeNetwork/injectProcessWarningsAndErrors.spec.js b/test/unit/specs/core/edgeNetwork/injectProcessWarningsAndErrors.spec.js index 15fdb1a44..01002527f 100644 --- a/test/unit/specs/core/edgeNetwork/injectProcessWarningsAndErrors.spec.js +++ b/test/unit/specs/core/edgeNetwork/injectProcessWarningsAndErrors.spec.js @@ -10,17 +10,21 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectProcessWarningsAndErrors from "../../../../../src/core/edgeNetwork/injectProcessWarningsAndErrors.js"; describe("processWarningsAndErrors", () => { let logger; let processWarningsAndErrors; - beforeEach(() => { - logger = jasmine.createSpyObj("logger", ["warn", "error"]); - processWarningsAndErrors = injectProcessWarningsAndErrors({ logger }); + logger = { + warn: vi.fn(), + error: vi.fn(), + }; + processWarningsAndErrors = injectProcessWarningsAndErrors({ + logger, + }); }); - it("throws error if status code is below 2xx", () => { expect(() => { processWarningsAndErrors({ @@ -30,7 +34,6 @@ describe("processWarningsAndErrors", () => { "The server responded with a status code 199 and no response body.", ); }); - it("throws error if status code is above 2xx", () => { expect(() => { processWarningsAndErrors({ @@ -40,7 +43,6 @@ describe("processWarningsAndErrors", () => { "The server responded with a status code 300 and no response body.", ); }); - it("throws error if no parsed body and HTTP status code is not 204", () => { expect(() => { processWarningsAndErrors({ @@ -50,19 +52,19 @@ describe("processWarningsAndErrors", () => { "The server responded with a status code 200 and no response body.", ); }); - it("throws an error if parsed body does not have handle array", () => { expect(() => { processWarningsAndErrors({ statusCode: 200, body: '{"foo":"bar"}', - parsedBody: { foo: "bar" }, + parsedBody: { + foo: "bar", + }, }); }).toThrowError( 'The server responded with a status code 200 and response body:\n{\n "foo": "bar"\n}', ); }); - it("logs warnings", () => { const warnings = [ { @@ -74,7 +76,6 @@ describe("processWarningsAndErrors", () => { detail: "Personalization warning detail", }, ]; - processWarningsAndErrors({ statusCode: 200, parsedBody: { @@ -82,7 +83,6 @@ describe("processWarningsAndErrors", () => { warnings, }, }); - expect(logger.warn).toHaveBeenCalledWith( "The server responded with a warning:", warnings[0], @@ -92,7 +92,6 @@ describe("processWarningsAndErrors", () => { warnings[1], ); }); - it("logs non-fatal errors", () => { const errors = [ { @@ -104,7 +103,6 @@ describe("processWarningsAndErrors", () => { detail: "Personalization warning detail", }, ]; - processWarningsAndErrors({ statusCode: 207, parsedBody: { @@ -112,7 +110,6 @@ describe("processWarningsAndErrors", () => { errors, }, }); - expect(logger.error).toHaveBeenCalledWith( "The server responded with a non-fatal error:", errors[0], diff --git a/test/unit/specs/core/edgeNetwork/injectSendEdgeNetworkRequest.spec.js b/test/unit/specs/core/edgeNetwork/injectSendEdgeNetworkRequest.spec.js index 3581c221a..d21f3573f 100644 --- a/test/unit/specs/core/edgeNetwork/injectSendEdgeNetworkRequest.spec.js +++ b/test/unit/specs/core/edgeNetwork/injectSendEdgeNetworkRequest.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectSendEdgeNetworkRequest from "../../../../../src/core/edgeNetwork/injectSendEdgeNetworkRequest.js"; import createConfig from "../../../../../src/core/config/createConfig.js"; import { defer } from "../../../../../src/utils/index.js"; @@ -39,11 +40,12 @@ describe("injectSendEdgeNetworkRequest", () => { assertLifecycleCall, }) => { const error = new Error("no connection"); - sendNetworkRequest.and.returnValue(Promise.reject(error)); - const errorHandler = jasmine.createSpy("errorHandler"); - sendEdgeNetworkRequest({ request, runOnRequestFailureCallbacks }) - .then(fail) - .catch(errorHandler); + sendNetworkRequest.mockReturnValue(Promise.reject(error)); + const errorHandler = vi.fn(); + sendEdgeNetworkRequest({ + request, + runOnRequestFailureCallbacks, + }).catch(errorHandler); return flushPromiseChains() .then(() => { expect(errorHandler).not.toHaveBeenCalled(); @@ -63,11 +65,16 @@ describe("injectSendEdgeNetworkRequest", () => { assertLifecycleCall, }) => { const error = new Error("Unexpected response."); - processWarningsAndErrors.and.throwError(error); - const errorHandler = jasmine.createSpy("errorHandler"); - sendEdgeNetworkRequest({ request, runOnRequestFailureCallbacks }) - .then(fail) - .catch(errorHandler); + processWarningsAndErrors.mockImplementation(() => { + throw error; + }); + const errorHandler = vi.fn(); + + sendEdgeNetworkRequest({ + request, + runOnRequestFailureCallbacks, + }).catch(errorHandler); + return flushPromiseChains() .then(() => { expect(errorHandler).not.toHaveBeenCalled(); @@ -85,66 +92,71 @@ describe("injectSendEdgeNetworkRequest", () => { runOnResponseCallbacks, assertLifecycleCall, }) => { - const successHandler = jasmine.createSpy("successHandler"); - sendEdgeNetworkRequest({ request, runOnResponseCallbacks }).then( - successHandler, - ); + const successHandler = vi.fn(); + sendEdgeNetworkRequest({ + request, + runOnResponseCallbacks, + }).then(successHandler); return flushPromiseChains() .then(() => { expect(successHandler).not.toHaveBeenCalled(); assertLifecycleCall(); - expect(lifecycle.onResponse).toHaveBeenCalledWith({ response }); + expect(lifecycle.onResponse).toHaveBeenCalledWith({ + response, + }); return flushPromiseChains(); }) .then(() => { expect(successHandler).toHaveBeenCalled(); }); }; - beforeEach(() => { config = createConfig({ edgeDomain: "edge.example.com", edgeBasePath: "ee", datastreamId: "myconfigId", }); - payload = jasmine.createSpyObj("payload", ["mergeMeta"], { - type: "payload", - }); - request = jasmine.createSpyObj("request", { - getId: "RID123", - getAction: "test-action", - getPayload: payload, - getUseIdThirdPartyDomain: false, - getUseSendBeacon: false, - getDatastreamIdOverride: "", - getEdgeSubPath: "", - }); - logger = jasmine.createSpyObj("logger", ["info"]); - lifecycle = jasmine.createSpyObj("lifecycle", { - onBeforeRequest: Promise.resolve(), - onRequestFailure: Promise.resolve(), - onResponse: Promise.resolve(), - }); - cookieTransfer = jasmine.createSpyObj("cookieTransfer", [ - "cookiesToPayload", - "responseToCookies", - ]); + payload = { + mergeMeta: vi.fn(), + type: vi.fn().mockReturnValue("payload"), + }; + request = { + getId: vi.fn().mockReturnValue("RID123"), + getAction: vi.fn().mockReturnValue("test-action"), + getPayload: vi.fn().mockReturnValue(payload), + getUseIdThirdPartyDomain: vi.fn().mockReturnValue(false), + getUseSendBeacon: vi.fn().mockReturnValue(false), + getDatastreamIdOverride: vi.fn().mockReturnValue(""), + getEdgeSubPath: vi.fn().mockReturnValue(""), + }; + logger = { + info: vi.fn(), + }; + lifecycle = { + onBeforeRequest: vi.fn().mockReturnValue(Promise.resolve()), + onRequestFailure: vi.fn().mockReturnValue(Promise.resolve()), + onResponse: vi.fn().mockReturnValue(Promise.resolve()), + }; + cookieTransfer = { + cookiesToPayload: vi.fn(), + responseToCookies: vi.fn(), + }; networkResult = { - parsedBody: { my: "parsedBody" }, + parsedBody: { + my: "parsedBody", + }, getHeader: () => "myheader", }; - sendNetworkRequest = jasmine - .createSpy("sendNetworkRequest") - .and.returnValue(Promise.resolve(networkResult)); - response = { type: "response" }; - createResponse = jasmine - .createSpy("createResponse") - .and.returnValue(response); - processWarningsAndErrors = jasmine.createSpy("processWarningsAndErrors"); - getLocationHint = jasmine.createSpy("getLocationHint"); - getAssuranceValidationTokenParams = jasmine - .createSpy("getAssuranceValidationTokenParams") - .and.returnValue(""); + sendNetworkRequest = vi + .fn() + .mockReturnValue(Promise.resolve(networkResult)); + response = { + type: "response", + }; + createResponse = vi.fn().mockReturnValue(response); + processWarningsAndErrors = vi.fn(); + getLocationHint = vi.fn(); + getAssuranceValidationTokenParams = vi.fn().mockReturnValue(""); sendEdgeNetworkRequest = injectSendEdgeNetworkRequest({ config, logger, @@ -157,33 +169,36 @@ describe("injectSendEdgeNetworkRequest", () => { getAssuranceValidationTokenParams, }); }); - it("transfers cookies to payload when sending to first-party domain", () => { - return sendEdgeNetworkRequest({ request }).then(() => { + return sendEdgeNetworkRequest({ + request, + }).then(() => { expect(cookieTransfer.cookiesToPayload).toHaveBeenCalledWith( payload, "edge.example.com", ); }); }); - it("transfers cookies to payload when sending to third-party domain", () => { // Ensure that sendEdgeNetworkRequest waits until after // lifecycle.onBeforeRequest to determine the endpoint domain. - lifecycle.onBeforeRequest.and.callFake(() => { - request.getUseIdThirdPartyDomain.and.returnValue(true); + lifecycle.onBeforeRequest.mockImplementation(() => { + request.getUseIdThirdPartyDomain.mockReturnValue(true); return Promise.resolve(); }); - return sendEdgeNetworkRequest({ request }).then(() => { + return sendEdgeNetworkRequest({ + request, + }).then(() => { expect(cookieTransfer.cookiesToPayload).toHaveBeenCalledWith( payload, "adobedc.demdex.net", ); }); }); - it("sends request to first-party domain", () => { - return sendEdgeNetworkRequest({ request }).then(() => { + return sendEdgeNetworkRequest({ + request, + }).then(() => { expect(sendNetworkRequest).toHaveBeenCalledWith({ requestId: "RID123", url: "https://edge.example.com/ee/v1/test-action?configId=myconfigId&requestId=RID123", @@ -192,15 +207,16 @@ describe("injectSendEdgeNetworkRequest", () => { }); }); }); - it("sends request to third-party domain", () => { // Ensure that sendEdgeNetworkRequest waits until after // lifecycle.onBeforeRequest to determine the endpoint domain. - lifecycle.onBeforeRequest.and.callFake(() => { - request.getUseIdThirdPartyDomain.and.returnValue(true); + lifecycle.onBeforeRequest.mockImplementation(() => { + request.getUseIdThirdPartyDomain.mockReturnValue(true); return Promise.resolve(); }); - return sendEdgeNetworkRequest({ request }).then(() => { + return sendEdgeNetworkRequest({ + request, + }).then(() => { expect(sendNetworkRequest).toHaveBeenCalledWith({ requestId: "RID123", url: "https://adobedc.demdex.net/ee/v1/test-action?configId=myconfigId&requestId=RID123", @@ -209,15 +225,16 @@ describe("injectSendEdgeNetworkRequest", () => { }); }); }); - it("sends request using sendBeacon", () => { // Ensure that sendEdgeNetworkRequest waits until after // lifecycle.onBeforeRequest to determine whether to use sendBeacon. - lifecycle.onBeforeRequest.and.callFake(() => { - request.getUseSendBeacon.and.returnValue(true); + lifecycle.onBeforeRequest.mockImplementation(() => { + request.getUseSendBeacon.mockReturnValue(true); return Promise.resolve(); }); - return sendEdgeNetworkRequest({ request }).then(() => { + return sendEdgeNetworkRequest({ + request, + }).then(() => { expect(sendNetworkRequest).toHaveBeenCalledWith({ requestId: "RID123", url: "https://edge.example.com/ee/v1/test-action?configId=myconfigId&requestId=RID123", @@ -226,18 +243,19 @@ describe("injectSendEdgeNetworkRequest", () => { }); }); }); - it("calls lifecycle.onBeforeRequest and waits for it to complete before sending request", () => { const deferred = defer(); - lifecycle.onBeforeRequest.and.returnValue(deferred.promise); - const successHandler = jasmine.createSpy("successHandler"); - sendEdgeNetworkRequest({ request }).then(successHandler); + lifecycle.onBeforeRequest.mockReturnValue(deferred.promise); + const successHandler = vi.fn(); + sendEdgeNetworkRequest({ + request, + }).then(successHandler); return flushPromiseChains() .then(() => { expect(lifecycle.onBeforeRequest).toHaveBeenCalledWith({ request, - onResponse: jasmine.any(Function), - onRequestFailure: jasmine.any(Function), + onResponse: expect.any(Function), + onRequestFailure: expect.any(Function), }); expect(sendNetworkRequest).not.toHaveBeenCalled(); deferred.resolve(); @@ -247,13 +265,14 @@ describe("injectSendEdgeNetworkRequest", () => { expect(successHandler).toHaveBeenCalled(); }); }); - it("when network request fails, calls lifecycle.onRequestFailure, waits for it to complete, then rejects promise", () => { const deferred = defer(); - lifecycle.onRequestFailure.and.returnValue(deferred.promise); + lifecycle.onRequestFailure.mockReturnValue(deferred.promise); return testRequestFailureHandling({ assertLifecycleCall(error) { - expect(lifecycle.onRequestFailure).toHaveBeenCalledWith({ error }); + expect(lifecycle.onRequestFailure).toHaveBeenCalledWith({ + error, + }); // We reject this deferred to simulate a component throwing an error // during the lifecycle.onRequestFailure hook. This tests that the // promise from sendEdgeNetworkRequest is still rejected with the @@ -262,19 +281,18 @@ describe("injectSendEdgeNetworkRequest", () => { }, }); }); - it("when network request fails, calls lifecycle.onBeforeRequest's onRequestFailure callback, waits for it to complete, then rejects promise", () => { const deferred = defer(); - const requestFailureCallback = jasmine - .createSpy("requestFailureCallback") - .and.returnValue(deferred.promise); - lifecycle.onBeforeRequest.and.callFake(({ onRequestFailure }) => { + const requestFailureCallback = vi.fn().mockReturnValue(deferred.promise); + lifecycle.onBeforeRequest.mockImplementation(({ onRequestFailure }) => { onRequestFailure(requestFailureCallback); return Promise.resolve(); }); return testRequestFailureHandling({ assertLifecycleCall(error) { - expect(requestFailureCallback).toHaveBeenCalledWith({ error }); + expect(requestFailureCallback).toHaveBeenCalledWith({ + error, + }); // We reject this deferred to simulate a component throwing an error // during the lifecycle.onBeforeRequest's onRequestFailure callback. // This tests that the promise from sendEdgeNetworkRequest is still @@ -284,16 +302,17 @@ describe("injectSendEdgeNetworkRequest", () => { }, }); }); - it("when network request fails, calls onRequestFailureCallbacks, waits for it to complete, then rejects promise", () => { const deferred = defer(); - const runOnRequestFailureCallbacks = jasmine - .createSpy("runOnRequestFailureCallbacks") - .and.returnValue(deferred.promise); + const runOnRequestFailureCallbacks = vi + .fn() + .mockReturnValue(deferred.promise); return testRequestFailureHandling({ runOnRequestFailureCallbacks, assertLifecycleCall(error) { - expect(runOnRequestFailureCallbacks).toHaveBeenCalledWith({ error }); + expect(runOnRequestFailureCallbacks).toHaveBeenCalledWith({ + error, + }); // We reject this deferred to simulate a component throwing an error // during the runOnRequestFailureCallbacks call. This tests that the // promise from sendEdgeNetworkRequest is still rejected with the @@ -302,14 +321,14 @@ describe("injectSendEdgeNetworkRequest", () => { }, }); }); - it("when network response is a failure, calls lifecycle.onRequestFailure, waits for it to complete, then rejects promise", () => { const deferred = defer(); - lifecycle.onRequestFailure.and.returnValue(deferred.promise); - + lifecycle.onRequestFailure.mockReturnValue(deferred.promise); return testResponseFailureHandling({ assertLifecycleCall(error) { - expect(lifecycle.onRequestFailure).toHaveBeenCalledWith({ error }); + expect(lifecycle.onRequestFailure).toHaveBeenCalledWith({ + error, + }); // We reject this deferred to simulate a component throwing an error // during the lifecycle.onRequestFailure hook. This tests that the // promise from sendEdgeNetworkRequest is still rejected with the @@ -318,19 +337,18 @@ describe("injectSendEdgeNetworkRequest", () => { }, }); }); - it("when network response is a failure, calls lifecycle.onBeforeRequest's onRequestFailure callback, waits for it to complete, then rejects promise", () => { const deferred = defer(); - const requestFailureCallback = jasmine - .createSpy("requestFailureCallback") - .and.returnValue(deferred.promise); - lifecycle.onBeforeRequest.and.callFake(({ onRequestFailure }) => { + const requestFailureCallback = vi.fn().mockReturnValue(deferred.promise); + lifecycle.onBeforeRequest.mockImplementation(({ onRequestFailure }) => { onRequestFailure(requestFailureCallback); return Promise.resolve(); }); return testResponseFailureHandling({ assertLifecycleCall(error) { - expect(requestFailureCallback).toHaveBeenCalledWith({ error }); + expect(requestFailureCallback).toHaveBeenCalledWith({ + error, + }); // We reject this deferred to simulate a component throwing an error // during the lifecycle.onBeforeRequest's onRequestFailure callback. // This tests that the promise from sendEdgeNetworkRequest is still @@ -340,16 +358,17 @@ describe("injectSendEdgeNetworkRequest", () => { }, }); }); - it("when network response is a failure, calls runOnRequestFailureCallbacks, waits for it to complete, then rejects promise", () => { const deferred = defer(); - const runOnRequestFailureCallbacks = jasmine - .createSpy("runOnRequestFailureCallbacks") - .and.returnValue(deferred.promise); + const runOnRequestFailureCallbacks = vi + .fn() + .mockReturnValue(deferred.promise); return testResponseFailureHandling({ runOnRequestFailureCallbacks, assertLifecycleCall(error) { - expect(runOnRequestFailureCallbacks).toHaveBeenCalledWith({ error }); + expect(runOnRequestFailureCallbacks).toHaveBeenCalledWith({ + error, + }); // We reject this deferred to simulate a component throwing an error // during the runOnRequestFailureCallbacks call. This tests that the // promise from sendEdgeNetworkRequest is still rejected with the @@ -358,51 +377,51 @@ describe("injectSendEdgeNetworkRequest", () => { }, }); }); - it("when network response is a success, calls lifecycle.onResponse, waits for it to complete, then resolves promise", () => { const deferred = defer(); - lifecycle.onResponse.and.returnValue(deferred.promise); + lifecycle.onResponse.mockReturnValue(deferred.promise); return testResponseSuccessHandling({ assertLifecycleCall() { - expect(lifecycle.onResponse).toHaveBeenCalledWith({ response }); + expect(lifecycle.onResponse).toHaveBeenCalledWith({ + response, + }); deferred.resolve(); }, }); }); - it("when network response is a success, calls lifecycle.onBeforeRequest's responseCallback callback, waits for it to complete, then resolves promise", () => { const deferred = defer(); - const responseCallback = jasmine - .createSpy("responseCallback") - .and.returnValue(deferred.promise); - lifecycle.onBeforeRequest.and.callFake(({ onResponse }) => { + const responseCallback = vi.fn().mockReturnValue(deferred.promise); + lifecycle.onBeforeRequest.mockImplementation(({ onResponse }) => { onResponse(responseCallback); return Promise.resolve(); }); return testResponseSuccessHandling({ assertLifecycleCall() { - expect(responseCallback).toHaveBeenCalledWith({ response }); + expect(responseCallback).toHaveBeenCalledWith({ + response, + }); deferred.resolve(); }, }); }); - it("when network response is a success, calls runOnResponseCallbacks, waits for it to complete, then resolves promise", () => { const deferred = defer(); - const runOnResponseCallbacks = jasmine - .createSpy("runOnResponseCallbacks") - .and.returnValue(deferred.promise); + const runOnResponseCallbacks = vi.fn().mockReturnValue(deferred.promise); return testResponseSuccessHandling({ runOnResponseCallbacks, assertLifecycleCall() { - expect(runOnResponseCallbacks).toHaveBeenCalledWith({ response }); + expect(runOnResponseCallbacks).toHaveBeenCalledWith({ + response, + }); deferred.resolve(); }, }); }); - it("transfers cookies from response before lifecycle.onResponse", () => { - return sendEdgeNetworkRequest({ request }).then(() => { + return sendEdgeNetworkRequest({ + request, + }).then(() => { expect(cookieTransfer.responseToCookies).toHaveBeenCalledWith(response); assertFunctionCallOrder([ cookieTransfer.responseToCookies, @@ -410,48 +429,86 @@ describe("injectSendEdgeNetworkRequest", () => { ]); }); }); - it("returns the merged object from lifecycle::onResponse and runOnResponseCallbacks", () => { - const runOnResponseCallbacks = jasmine - .createSpy("runOnResponseCallbacks") - .and.returnValue(Promise.resolve([{ c: 2 }, { h: 9 }, undefined])); - - lifecycle.onResponse.and.returnValue( - Promise.resolve([{ a: 2 }, { b: 8 }, undefined]), + const runOnResponseCallbacks = vi.fn().mockReturnValue( + Promise.resolve([ + { + c: 2, + }, + { + h: 9, + }, + undefined, + ]), ); - - return expectAsync( - sendEdgeNetworkRequest({ request, runOnResponseCallbacks }), - ).toBeResolvedTo({ c: 2, h: 9, a: 2, b: 8 }); + lifecycle.onResponse.mockReturnValue( + Promise.resolve([ + { + a: 2, + }, + { + b: 8, + }, + undefined, + ]), + ); + return expect( + sendEdgeNetworkRequest({ + request, + runOnResponseCallbacks, + }), + ).resolves.toStrictEqual({ + c: 2, + h: 9, + a: 2, + b: 8, + }); }); - it("returns the merged object from lifecycle::onBeforeRequest & lifecycle::onResponse", () => { - lifecycle.onBeforeRequest.and.callFake(({ onResponse }) => { - onResponse(() => ({ a: 1 })); - onResponse(() => ({ b: 1 })); + lifecycle.onBeforeRequest.mockImplementation(({ onResponse }) => { + onResponse(() => ({ + a: 1, + })); + onResponse(() => ({ + b: 1, + })); onResponse(() => undefined); return Promise.resolve(); }); - lifecycle.onResponse.and.returnValue(Promise.resolve([{ c: 2 }])); - return expectAsync(sendEdgeNetworkRequest({ request })).toBeResolvedTo({ + lifecycle.onResponse.mockReturnValue( + Promise.resolve([ + { + c: 2, + }, + ]), + ); + return expect( + sendEdgeNetworkRequest({ + request, + }), + ).resolves.toStrictEqual({ a: 1, b: 1, c: 2, }); }); - it("creates the response with the correct parameters", () => { - return sendEdgeNetworkRequest({ request }).then(() => { + return sendEdgeNetworkRequest({ + request, + }).then(() => { expect(createResponse).toHaveBeenCalledWith({ - content: { my: "parsedBody" }, + content: { + my: "parsedBody", + }, getHeader: networkResult.getHeader, }); }); }); - it("uses the cluster cookie location hint", () => { - getLocationHint.and.returnValue("va6"); - return sendEdgeNetworkRequest({ request }).then(() => { + getLocationHint.mockReturnValue("va6"); + return sendEdgeNetworkRequest({ + request, + }).then(() => { expect(sendNetworkRequest).toHaveBeenCalledWith({ requestId: "RID123", url: "https://edge.example.com/ee/va6/v1/test-action?configId=myconfigId&requestId=RID123", @@ -460,12 +517,13 @@ describe("injectSendEdgeNetworkRequest", () => { }); }); }); - it("sets validation token params", () => { - getAssuranceValidationTokenParams.and.returnValue( + getAssuranceValidationTokenParams.mockReturnValue( "&adobeAepValidationToken=abc-123", ); - return sendEdgeNetworkRequest({ request }).then(() => { + return sendEdgeNetworkRequest({ + request, + }).then(() => { expect(sendNetworkRequest).toHaveBeenCalledWith({ requestId: "RID123", url: "https://edge.example.com/ee/v1/test-action?configId=myconfigId&requestId=RID123&adobeAepValidationToken=abc-123", @@ -474,12 +532,17 @@ describe("injectSendEdgeNetworkRequest", () => { }); }); }); - it("respects the datastreamIdOverride", () => { - request.getDatastreamIdOverride.and.returnValue("myconfigIdOverride"); - return sendEdgeNetworkRequest({ request }).then(() => { + request.getDatastreamIdOverride.mockReturnValue("myconfigIdOverride"); + return sendEdgeNetworkRequest({ + request, + }).then(() => { expect(payload.mergeMeta).toHaveBeenCalledWith({ - sdkConfig: { datastream: { original: "myconfigId" } }, + sdkConfig: { + datastream: { + original: "myconfigId", + }, + }, }); expect(sendNetworkRequest).toHaveBeenCalledWith({ payload, diff --git a/test/unit/specs/core/edgeNetwork/mergeLifecycleResponses.spec.js b/test/unit/specs/core/edgeNetwork/mergeLifecycleResponses.spec.js index 9e333fd84..19bf5757a 100644 --- a/test/unit/specs/core/edgeNetwork/mergeLifecycleResponses.spec.js +++ b/test/unit/specs/core/edgeNetwork/mergeLifecycleResponses.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import mergeLifecycleResponses from "../../../../../src/core/edgeNetwork/mergeLifecycleResponses.js"; describe("mergeLifecycleResponses", () => { diff --git a/test/unit/specs/core/initializeComponents.spec.js b/test/unit/specs/core/initializeComponents.spec.js index 91f484ab9..b18fcc13f 100644 --- a/test/unit/specs/core/initializeComponents.spec.js +++ b/test/unit/specs/core/initializeComponents.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import initializeComponents from "../../../../src/core/initializeComponents.js"; describe("initializeComponents", () => { @@ -18,30 +19,26 @@ describe("initializeComponents", () => { let componentByNamespace; let componentCreators; let getImmediatelyAvailableTools; - beforeEach(() => { lifecycle = { - onComponentsRegistered: jasmine - .createSpy() - .and.returnValue(Promise.resolve()), + onComponentsRegistered: vi.fn().mockReturnValue(Promise.resolve()), }; componentRegistry = { - register: jasmine.createSpy(), + register: vi.fn(), }; componentByNamespace = { Comp1: {}, Comp2: {}, }; - const componentCreator1 = jasmine - .createSpy() - .and.returnValue(componentByNamespace.Comp1); + const componentCreator1 = vi + .fn() + .mockReturnValue(componentByNamespace.Comp1); componentCreator1.namespace = "Comp1"; - const componentCreator2 = jasmine - .createSpy() - .and.returnValue(componentByNamespace.Comp2); + const componentCreator2 = vi + .fn() + .mockReturnValue(componentByNamespace.Comp2); componentCreator2.namespace = "Comp2"; componentCreators = [componentCreator1, componentCreator2]; - getImmediatelyAvailableTools = (componentName) => { return { tool1: { @@ -55,7 +52,6 @@ describe("initializeComponents", () => { }; }; }); - it("creates and registers components", () => { const initializeComponentsPromise = initializeComponents({ componentCreators, @@ -63,7 +59,6 @@ describe("initializeComponents", () => { componentRegistry, getImmediatelyAvailableTools, }); - componentCreators.forEach((componentCreator) => { const { namespace } = componentCreator; expect(componentCreator).toHaveBeenCalledWith({ @@ -84,15 +79,14 @@ describe("initializeComponents", () => { expect(lifecycle.onComponentsRegistered).toHaveBeenCalledWith({ lifecycle, }); - return initializeComponentsPromise.then((result) => { expect(result).toBe(componentRegistry); }); }); - it("throws error if component throws error during creation", () => { - componentCreators[1].and.throwError("thrownError"); - + componentCreators[1].mockImplementation(() => { + throw new Error("thrownError"); + }); expect(() => { initializeComponents({ componentCreators, diff --git a/test/unit/specs/core/injectCreateResponse.spec.js b/test/unit/specs/core/injectCreateResponse.spec.js index 738ccdef6..cf26f8573 100644 --- a/test/unit/specs/core/injectCreateResponse.spec.js +++ b/test/unit/specs/core/injectCreateResponse.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectCreateResponse from "../../../../src/core/injectCreateResponse.js"; const responseContent = { @@ -53,42 +54,41 @@ const responseContent = { }, ], }; - describe("createResponse", () => { let extractEdgeInfo; let getHeader; let createResponse; let response; - beforeEach(() => { - extractEdgeInfo = jasmine.createSpy("extractEdgeInfo"); - getHeader = jasmine.createSpy("getHeader"); - createResponse = injectCreateResponse({ extractEdgeInfo }); + extractEdgeInfo = vi.fn(); + getHeader = vi.fn(); + createResponse = injectCreateResponse({ + extractEdgeInfo, + }); response = createResponse({ content: responseContent, getHeader, }); }); - describe("getPayloadsByType", () => { it("handles undefined content", () => { - const emptyResponse = createResponse({ content: undefined }); + const emptyResponse = createResponse({ + content: undefined, + }); expect(emptyResponse.getPayloadsByType("type1")).toEqual([]); }); - it("handles content without handle property", () => { - const emptyResponse = createResponse({ content: {} }); + const emptyResponse = createResponse({ + content: {}, + }); expect(emptyResponse.getPayloadsByType("type1")).toEqual([]); }); - it("returns empty array when there are no matching payloads", () => { expect(response.getPayloadsByType("type3")).toEqual([]); }); - it("returns one matching payload as an array", () => { expect(response.getPayloadsByType("type2")).toEqual(["payload2a"]); }); - it("returns three matching payloads", () => { expect(response.getPayloadsByType("type1")).toEqual([ "payload1a", @@ -97,49 +97,53 @@ describe("createResponse", () => { ]); }); }); - describe("getErrors", () => { it("handles undefined content", () => { - const emptyResponse = createResponse({ content: undefined }); + const emptyResponse = createResponse({ + content: undefined, + }); expect(emptyResponse.getErrors()).toEqual([]); }); - it("handles content without errors property", () => { - const emptyResponse = createResponse({ content: {} }); + const emptyResponse = createResponse({ + content: {}, + }); expect(emptyResponse.getErrors()).toEqual([]); }); - it("returns errors", () => { expect(response.getErrors()).toBe(responseContent.errors); }); }); - describe("getWarnings", () => { it("handles undefined content", () => { - const emptyResponse = createResponse({ content: undefined }); + const emptyResponse = createResponse({ + content: undefined, + }); expect(emptyResponse.getWarnings()).toEqual([]); }); - it("handles content without warnings property", () => { - const emptyResponse = createResponse({ content: {} }); + const emptyResponse = createResponse({ + content: {}, + }); expect(emptyResponse.getWarnings()).toEqual([]); }); - it("returns warnings", () => { expect(response.getWarnings()).toBe(responseContent.warnings); }); }); - describe("getEdge", () => { it("calls extractEdgeInfo with x-adobe-edge header and returns the result", () => { - extractEdgeInfo.and.returnValue({ regionId: 42 }); - getHeader.and.returnValue("VA6;42"); - expect(response.getEdge()).toEqual({ regionId: 42 }); + extractEdgeInfo.mockReturnValue({ + regionId: 42, + }); + getHeader.mockReturnValue("VA6;42"); + expect(response.getEdge()).toEqual({ + regionId: 42, + }); expect(extractEdgeInfo).toHaveBeenCalledWith("VA6;42"); expect(getHeader).toHaveBeenCalledWith("x-adobe-edge"); }); }); - describe("toJSON", () => { it("returns underlying content object", () => { expect(response.toJSON()).toBe(responseContent); diff --git a/test/unit/specs/core/injectExecuteCommand.spec.js b/test/unit/specs/core/injectExecuteCommand.spec.js index 2a60ffcbe..8989b8ad0 100644 --- a/test/unit/specs/core/injectExecuteCommand.spec.js +++ b/test/unit/specs/core/injectExecuteCommand.spec.js @@ -10,41 +10,36 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectExecuteCommand from "../../../../src/core/injectExecuteCommand.js"; import flushPromiseChains from "../../helpers/flushPromiseChains.js"; describe("injectExecuteCommand", () => { let logger; let handleError; - beforeEach(() => { - logger = jasmine.createSpyObj("logger", [ - "info", - "warn", - "error", - "logOnBeforeCommand", - "logOnCommandResolved", - "logOnCommandRejected", - ]); - handleError = jasmine.createSpy().and.callFake((error) => { + logger = { + info: vi.fn(), + warn: vi.fn(), + error: vi.fn(), + logOnBeforeCommand: vi.fn(), + logOnCommandResolved: vi.fn(), + logOnCommandRejected: vi.fn(), + }; + handleError = vi.fn().mockImplementation((error) => { throw error; }); }); - it("rejects promise if configure is not the first command executed", () => { const executeCommand = injectExecuteCommand({ logger, handleError, }); - - return executeCommand("sendEvent") - .then(fail) - .catch((error) => { - expect(error.message).toContain("The library must be configured first"); - expect(handleError).toHaveBeenCalledWith(error, "sendEvent command"); - }); + return executeCommand("sendEvent").catch((error) => { + expect(error.message).toContain("The library must be configured first"); + expect(handleError).toHaveBeenCalledWith(error, "sendEvent command"); + }); }); - it("rejects promise if configure command is executed twice", () => { const configureCommand = () => Promise.resolve(); const executeCommand = injectExecuteCommand({ @@ -52,18 +47,14 @@ describe("injectExecuteCommand", () => { configureCommand, handleError, }); - executeCommand("configure"); - return executeCommand("configure") - .then(fail) - .catch((error) => { - expect(error.message).toContain( - "The library has already been configured", - ); - expect(handleError).toHaveBeenCalledWith(error, "configure command"); - }); + return executeCommand("configure").catch((error) => { + expect(error.message).toContain( + "The library has already been configured", + ); + expect(handleError).toHaveBeenCalledWith(error, "configure command"); + }); }); - it("rejects promise if command doesn't exist", () => { const componentRegistry = { getCommand() {}, @@ -78,16 +69,13 @@ describe("injectExecuteCommand", () => { handleError, }); executeCommand("configure"); - return executeCommand("bogus") - .then(fail) - .catch((error) => { - expect(error.message).toBe( - "The bogus command does not exist. List of available commands: configure, setDebug, genuine.", - ); - expect(handleError).toHaveBeenCalledWith(error, "bogus command"); - }); + return executeCommand("bogus").catch((error) => { + expect(error.message).toBe( + "The bogus command does not exist. List of available commands: configure, setDebug, genuine.", + ); + expect(handleError).toHaveBeenCalledWith(error, "bogus command"); + }); }); - it("never resolves/rejects promise to any other command after configure fails", () => { const configureError = new Error("Test configure command failed"); const configureCommand = () => Promise.reject(configureError); @@ -96,11 +84,10 @@ describe("injectExecuteCommand", () => { configureCommand, handleError, }); - - const configureRejectedSpy = jasmine.createSpy("configureRejectedSpy"); - executeCommand("configure").then(fail).catch(configureRejectedSpy); - const sendEventResolvedSpy = jasmine.createSpy("sendEventResolvedSpy"); - const sendEventRejectedSpy = jasmine.createSpy("sendEventRejectedSpy"); + const configureRejectedSpy = vi.fn(); + executeCommand("configure").catch(configureRejectedSpy); + const sendEventResolvedSpy = vi.fn(); + const sendEventRejectedSpy = vi.fn(); executeCommand("sendEvent") .then(sendEventResolvedSpy) .catch(sendEventRejectedSpy); @@ -113,11 +100,10 @@ describe("injectExecuteCommand", () => { expect(sendEventRejectedSpy).not.toHaveBeenCalled(); }); }); - it("reject promise if component command throws error", () => { - const runCommandSpy = jasmine - .createSpy() - .and.throwError(new Error("Unexpected error")); + const runCommandSpy = vi.fn().mockImplementation(() => { + throw new Error("Unexpected error"); + }); const testCommand = { run: runCommandSpy, }; @@ -142,30 +128,24 @@ describe("injectExecuteCommand", () => { ); }); }); - it("executes component commands", () => { - const validateCommandOptionsSpy = jasmine - .createSpy() - .and.returnValues( - "with-result-post-validation-options", - "without-result-post-validation-options", - ); - const testCommandWithResult = jasmine.createSpyObj( - "testCommandWithResult", - { - run: { foo: "bar" }, - }, - ); - const testCommandWithoutResult = jasmine.createSpyObj( - "testCommandWithoutResult", - { - run: undefined, - }, - ); + const validateCommandOptionsSpy = vi + .fn() + .mockReturnValueOnce("with-result-post-validation-options") + .mockReturnValueOnce("without-result-post-validation-options"); + const testCommandWithResult = { + run: vi.fn().mockReturnValue({ + foo: "bar", + }), + }; + const testCommandWithoutResult = { + run: vi.fn().mockReturnValue(undefined), + }; const componentRegistry = { - getCommand: jasmine - .createSpy("getCommand") - .and.returnValues(testCommandWithResult, testCommandWithoutResult), + getCommand: vi + .fn() + .mockReturnValueOnce(testCommandWithResult) + .mockReturnValueOnce(testCommandWithoutResult), getCommandNames() { return ["testCommandWithResult", "testCommandWithoutResult"]; }, @@ -188,7 +168,9 @@ describe("injectExecuteCommand", () => { "without-result-pre-validation-options", ), ]).then((results) => { - expect(results[0]).toEqual({ foo: "bar" }); + expect(results[0]).toEqual({ + foo: "bar", + }); expect(results[1]).toEqual({}); expect(validateCommandOptionsSpy).toHaveBeenCalledWith({ command: testCommandWithResult, @@ -206,19 +188,17 @@ describe("injectExecuteCommand", () => { ); }); }); - it("executes the core commands", () => { const componentRegistry = { getCommand() {}, }; - const configureCommand = jasmine - .createSpy() - .and.returnValue(Promise.resolve(componentRegistry)); - const setDebugCommand = jasmine.createSpy(); - const validateCommandOptions = jasmine - .createSpy() - .and.returnValue({ enabled: true }); - + const configureCommand = vi + .fn() + .mockReturnValue(Promise.resolve(componentRegistry)); + const setDebugCommand = vi.fn(); + const validateCommandOptions = vi.fn().mockReturnValue({ + enabled: true, + }); const executeCommand = injectExecuteCommand({ logger, configureCommand, @@ -226,18 +206,24 @@ describe("injectExecuteCommand", () => { handleError, validateCommandOptions, }); - return Promise.all([ - executeCommand("configure", { foo: "bar" }), - executeCommand("setDebug", { baz: "qux" }), + executeCommand("configure", { + foo: "bar", + }), + executeCommand("setDebug", { + baz: "qux", + }), ]).then(([configureResult, setDebugResult]) => { - expect(configureCommand).toHaveBeenCalledWith({ foo: "bar" }); - expect(setDebugCommand).toHaveBeenCalledWith({ enabled: true }); + expect(configureCommand).toHaveBeenCalledWith({ + foo: "bar", + }); + expect(setDebugCommand).toHaveBeenCalledWith({ + enabled: true, + }); expect(configureResult).toEqual({}); expect(setDebugResult).toEqual({}); }); }); - const buildWithTestCommand = (runCommand) => { const testCommand = { run: runCommand, @@ -256,34 +242,45 @@ describe("injectExecuteCommand", () => { validateCommandOptions: (options) => options, }); }; - it("logs onBeforeCommand", () => { const executeCommand = buildWithTestCommand(() => { expect(logger.logOnBeforeCommand).toHaveBeenCalledWith({ commandName: "test", - options: { my: "options" }, + options: { + my: "options", + }, }); }); executeCommand("configure"); - return executeCommand("test", { my: "options" }); + return executeCommand("test", { + my: "options", + }); }); - it("logs onCommandResolved", () => { const executeCommand = buildWithTestCommand(() => { expect(logger.logOnCommandResolved).not.toHaveBeenCalled(); - return { go: "bananas" }; + return { + go: "bananas", + }; }); executeCommand("configure"); - return executeCommand("test", { my: "options" }).then((result) => { - expect(result).toEqual({ go: "bananas" }); + return executeCommand("test", { + my: "options", + }).then((result) => { + expect(result).toEqual({ + go: "bananas", + }); expect(logger.logOnCommandResolved).toHaveBeenCalledWith({ commandName: "test", - options: { my: "options" }, - result: { go: "bananas" }, + options: { + my: "options", + }, + result: { + go: "bananas", + }, }); }); }); - it("logs onCommandRejected", () => { const myerror = Error("bananas"); const executeCommand = buildWithTestCommand(() => { @@ -291,28 +288,35 @@ describe("injectExecuteCommand", () => { throw myerror; }); executeCommand("configure"); - return executeCommand("test", { my: "options" }).catch((error) => { + return executeCommand("test", { + my: "options", + }).catch((error) => { expect(error).toEqual(myerror); expect(logger.logOnCommandRejected).toHaveBeenCalledWith({ commandName: "test", - options: { my: "options" }, + options: { + my: "options", + }, error: myerror, }); }); }); - it("logs onCommandResolved when handleError swallows the error", () => { const myerror = Error("bananas"); - handleError.and.returnValue({}); + handleError.mockReturnValue({}); const executeCommand = buildWithTestCommand(() => { throw myerror; }); executeCommand("configure"); - return executeCommand("test", { my: "options" }).then((result) => { + return executeCommand("test", { + my: "options", + }).then((result) => { expect(result).toEqual({}); expect(logger.logOnCommandResolved).toHaveBeenCalledWith({ commandName: "test", - options: { my: "options" }, + options: { + my: "options", + }, result: {}, }); expect(logger.logOnCommandRejected).not.toHaveBeenCalled(); diff --git a/test/unit/specs/core/injectHandleError.spec.js b/test/unit/specs/core/injectHandleError.spec.js index a39b685e5..2e145d525 100644 --- a/test/unit/specs/core/injectHandleError.spec.js +++ b/test/unit/specs/core/injectHandleError.spec.js @@ -10,38 +10,35 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import injectHandleError from "../../../../src/core/injectHandleError.js"; const expectedMessage = "[testinstanceName] Bad thing happened."; - describe("injectHandleError", () => { it("converts non-error to error and throws", () => { const handleError = injectHandleError({ errorPrefix: "[testinstanceName]", }); - expect(() => { handleError("Bad thing happened.", "myoperation"); }).toThrowError(expectedMessage); }); - it("rethrows error with instanceName prepended", () => { const handleError = injectHandleError({ errorPrefix: "[testinstanceName]", }); - expect(() => { handleError(new Error("Bad thing happened."), "myoperation"); }).toThrowError(expectedMessage); }); - it("logs an error and returns empty object if error is due to declined consent", () => { - const logger = jasmine.createSpyObj("logger", ["warn"]); + const logger = { + warn: vi.fn(), + }; const handleError = injectHandleError({ errorPrefix: "[testinstanceName]", logger, }); - const error = new Error("User declined consent."); error.code = "declinedConsent"; expect(handleError(error, "myoperation")).toEqual({}); diff --git a/test/unit/specs/core/injectShouldTransferCookie.spec.js b/test/unit/specs/core/injectShouldTransferCookie.spec.js index fbbdb538e..e1d75307a 100644 --- a/test/unit/specs/core/injectShouldTransferCookie.spec.js +++ b/test/unit/specs/core/injectShouldTransferCookie.spec.js @@ -10,13 +10,13 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import injectShouldTransferCookie from "../../../../src/core/injectShouldTransferCookie.js"; describe("shouldTransferCookie", () => { let targetMigrationEnabled; let orgId; let shouldTransferCookie; - beforeEach(() => { targetMigrationEnabled = false; orgId = "ABC@CustomOrg"; @@ -28,31 +28,26 @@ describe("shouldTransferCookie", () => { orgId, }); }; - it("returns true if it's at_qa_mode cookie", () => { build(); - expect(shouldTransferCookie("at_qa_mode")).toBeTrue(); + expect(shouldTransferCookie("at_qa_mode")).toBe(true); }); - it("returns true if it's mbox cookie and targetMigrationEnabled=true", () => { targetMigrationEnabled = true; build(); - expect(shouldTransferCookie("mbox")).toBeTrue(); + expect(shouldTransferCookie("mbox")).toBe(true); }); - it("returns false if it's mbox cookie and targetMigrationEnabled=false", () => { build(); - expect(shouldTransferCookie("mbox")).toBeFalse(); + expect(shouldTransferCookie("mbox")).toBe(false); }); - it("returns false if it's not a legacy cookie name", () => { targetMigrationEnabled = true; build(); - expect(shouldTransferCookie("foo")).toBeFalse(); + expect(shouldTransferCookie("foo")).toBe(false); }); - it("returns true for kndctr cookies", () => { build(); - expect(shouldTransferCookie("kndctr_ABC_CustomOrg_mynewcookie")).toBeTrue(); + expect(shouldTransferCookie("kndctr_ABC_CustomOrg_mynewcookie")).toBe(true); }); }); diff --git a/test/unit/specs/core/network/getRequestRetryDelay.spec.js b/test/unit/specs/core/network/getRequestRetryDelay.spec.js index 9ab799f28..800116f45 100644 --- a/test/unit/specs/core/network/getRequestRetryDelay.spec.js +++ b/test/unit/specs/core/network/getRequestRetryDelay.spec.js @@ -10,22 +10,21 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, afterEach, describe, it, expect } from "vitest"; import getRequestRetryDelay from "../../../../../src/core/network/getRequestRetryDelay.js"; describe("getRequestRetryDelay", () => { beforeEach(() => { - jasmine.clock().install(); - jasmine.clock().mockDate(new Date(0)); + vi.useFakeTimers(); + vi.setSystemTime(0); }); - afterEach(() => { - jasmine.clock().uninstall(); + vi.useRealTimers(); }); - it("returns value derived from retry-after header in delay-seconds format", () => { - const response = jasmine.createSpyObj("request", { - getHeader: "123", - }); + const response = { + getHeader: vi.fn().mockReturnValue("123"), + }; const delay = getRequestRetryDelay({ response, retriesAttempted: 0, @@ -33,11 +32,10 @@ describe("getRequestRetryDelay", () => { expect(delay).toBe(123000); expect(response.getHeader).toHaveBeenCalledWith("Retry-After"); }); - it("returns value derived from retry-after header in http-date format in the future", () => { - const response = jasmine.createSpyObj("request", { - getHeader: "Thu, 01 Jan 1970 00:00:09 GMT", - }); + const response = { + getHeader: vi.fn().mockReturnValue("Thu, 01 Jan 1970 00:00:09 GMT"), + }; const delay = getRequestRetryDelay({ response, retriesAttempted: 0, @@ -45,11 +43,10 @@ describe("getRequestRetryDelay", () => { expect(delay).toBe(9000); expect(response.getHeader).toHaveBeenCalledWith("Retry-After"); }); - it("returns value derived from retry-after header exists in http-date format in the past", () => { - const response = jasmine.createSpyObj("request", { - getHeader: "Thu, 01 Jan 1969 11:59:51 GMT", - }); + const response = { + getHeader: vi.fn().mockReturnValue("Thu, 01 Jan 1969 11:59:51 GMT"), + }; const delay = getRequestRetryDelay({ response, retriesAttempted: 0, @@ -57,7 +54,6 @@ describe("getRequestRetryDelay", () => { expect(delay).toBe(0); expect(response.getHeader).toHaveBeenCalledWith("Retry-After"); }); - const retriesAttemptedScenarios = [ { retriesAttempted: 0, @@ -80,20 +76,19 @@ describe("getRequestRetryDelay", () => { highDelay: 5200, }, ]; - retriesAttemptedScenarios.forEach((scenario) => { it(`returns randomized, incremental value based on ${scenario.retriesAttempted} retries attempted`, () => { - spyOn(Math, "random"); - const response = jasmine.createSpyObj("request", ["getHeader"]); - - Math.random.and.returnValue(0); + vi.spyOn(Math, "random"); + const response = { + getHeader: vi.fn(), + }; + Math.random.mockReturnValue(0); const lowDelay = getRequestRetryDelay({ response, retriesAttempted: scenario.retriesAttempted, }); expect(lowDelay).toBe(scenario.lowDelay); - - Math.random.and.returnValue(0.999999999999); + Math.random.mockReturnValue(0.999999999999); const highDelay = getRequestRetryDelay({ response, retriesAttempted: scenario.retriesAttempted, diff --git a/test/unit/specs/core/network/injectSendNetworkRequest.spec.js b/test/unit/specs/core/network/injectSendNetworkRequest.spec.js index 3ee8c0529..ae9d84f55 100644 --- a/test/unit/specs/core/network/injectSendNetworkRequest.spec.js +++ b/test/unit/specs/core/network/injectSendNetworkRequest.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, afterEach, describe, it, expect } from "vitest"; import injectSendNetworkRequest from "../../../../../src/core/network/injectSendNetworkRequest.js"; import flushPromiseChains from "../../../helpers/flushPromiseChains.js"; @@ -20,49 +21,44 @@ describe("injectSendNetworkRequest", () => { }; const payloadJson = JSON.stringify(payload); const requestId = "RID123"; - let logger; - - const responseBody = { requestId: "myrequestid", handle: [] }; + const responseBody = { + requestId: "myrequestid", + handle: [], + }; const responseBodyJson = JSON.stringify(responseBody); - let sendNetworkRequest; let sendFetchRequest; let sendBeaconRequest; let isRequestRetryable; let getRequestRetryDelay; let getHeader; - beforeEach(() => { - jasmine.clock().install(); - logger = jasmine.createSpyObj("logger", [ - "logOnBeforeNetworkRequest", - "logOnNetworkResponse", - "logOnNetworkError", - ]); + vi.useFakeTimers(); + vi.setSystemTime(new Date(1998, 11, 19)); + logger = { + logOnBeforeNetworkRequest: vi.fn(), + logOnNetworkResponse: vi.fn(), + logOnNetworkError: vi.fn(), + }; logger.enabled = true; - getHeader = jasmine.createSpy("getHeader"); - sendFetchRequest = jasmine.createSpy().and.returnValue( + getHeader = vi.fn(); + sendFetchRequest = vi.fn().mockReturnValue( Promise.resolve({ statusCode: 200, body: responseBodyJson, getHeader, }), ); - sendBeaconRequest = jasmine.createSpy().and.returnValue( + sendBeaconRequest = vi.fn().mockReturnValue( Promise.resolve({ statusCode: 204, body: "", getHeader: () => undefined, }), ); - isRequestRetryable = jasmine - .createSpy("isRequestRetryable") - .and.returnValue(false); - getRequestRetryDelay = jasmine - .createSpy("getRequestRetryDelay") - .and.returnValue(1000); - + isRequestRetryable = vi.fn().mockReturnValue(false); + getRequestRetryDelay = vi.fn().mockReturnValue(1000); sendNetworkRequest = injectSendNetworkRequest({ logger, sendFetchRequest, @@ -71,11 +67,9 @@ describe("injectSendNetworkRequest", () => { getRequestRetryDelay, }); }); - afterEach(() => { - jasmine.clock().uninstall(); + vi.useRealTimers(); }); - it("sends the request", () => { return sendNetworkRequest({ requestId, @@ -91,7 +85,6 @@ describe("injectSendNetworkRequest", () => { expect(sendFetchRequest).toHaveBeenCalledWith(url, payloadJson); }); }); - it("handles a response with a JSON body", () => { return sendNetworkRequest({ payload, @@ -116,9 +109,8 @@ describe("injectSendNetworkRequest", () => { }); }); }); - it("handles a response with a non-JSON body", () => { - sendFetchRequest.and.returnValue( + sendFetchRequest.mockReturnValue( Promise.resolve({ statusCode: 200, body: "non-JSON body", @@ -150,9 +142,8 @@ describe("injectSendNetworkRequest", () => { }); }); }); - it("handles a response with an empty body", () => { - sendFetchRequest.and.returnValue( + sendFetchRequest.mockReturnValue( Promise.resolve({ statusCode: 200, body: "", @@ -184,22 +175,18 @@ describe("injectSendNetworkRequest", () => { }); }); }); - it("rejects the promise when a network error occurs", () => { - sendFetchRequest.and.returnValue(Promise.reject(new Error("networkerror"))); + sendFetchRequest.mockReturnValue(Promise.reject(new Error("networkerror"))); return sendNetworkRequest({ payload, url, requestId, - }) - .then(fail) - .catch((error) => { - expect(error.message).toEqual( - "Network request failed.\nCaused by: networkerror", - ); - }); + }).catch((error) => { + expect(error.message).toEqual( + "Network request failed.\nCaused by: networkerror", + ); + }); }); - it("resolves the promise for successful status and valid json", () => { return sendNetworkRequest({ payload, @@ -214,32 +201,34 @@ describe("injectSendNetworkRequest", () => { }); }); }); - it(`retries requests until request is no longer retryable`, () => { - isRequestRetryable.and.returnValues(true, true, false); + isRequestRetryable + .mockReturnValueOnce(true) + .mockReturnValueOnce(true) + .mockReturnValueOnce(false); + sendNetworkRequest({ payload, url, requestId, }); - expect(sendFetchRequest).toHaveBeenCalledTimes(1); return flushPromiseChains() .then(() => { expect(sendFetchRequest).toHaveBeenCalledTimes(1); - jasmine.clock().tick(1000); + vi.advanceTimersByTime(1000); expect(sendFetchRequest).toHaveBeenCalledTimes(2); return flushPromiseChains(); }) .then(() => { expect(sendFetchRequest).toHaveBeenCalledTimes(2); - jasmine.clock().tick(1000); + vi.advanceTimersByTime(1000); expect(sendFetchRequest).toHaveBeenCalledTimes(3); return flushPromiseChains(); }) .then(() => { expect(sendFetchRequest).toHaveBeenCalledTimes(3); - jasmine.clock().tick(1000); + vi.advanceTimersByTime(1000); expect(sendFetchRequest).toHaveBeenCalledTimes(3); }); }); diff --git a/test/unit/specs/core/network/isRequestRetryable.spec.js b/test/unit/specs/core/network/isRequestRetryable.spec.js index 93ae3de52..a0699e190 100644 --- a/test/unit/specs/core/network/isRequestRetryable.spec.js +++ b/test/unit/specs/core/network/isRequestRetryable.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isRequestRetryable from "../../../../../src/core/network/isRequestRetryable.js"; describe("isRequestRetryable", () => { @@ -21,9 +22,8 @@ describe("isRequestRetryable", () => { }, retriesAttempted: 2, }); - expect(isRetryable).toBeTrue(); + expect(isRetryable).toBe(true); }); - it(`returns false for ${statusCode} and retries attempted is over the limit`, () => { const isRetryable = isRequestRetryable({ response: { @@ -31,10 +31,9 @@ describe("isRequestRetryable", () => { }, retriesAttempted: 3, }); - expect(isRetryable).toBeFalse(); + expect(isRetryable).toBe(false); }); }); - [100, 199, 200, 299, 300, 399, 400, 499, 500, 599].forEach((statusCode) => { it(`returns false for ${statusCode}`, () => { const isRetryable = isRequestRetryable({ @@ -43,7 +42,7 @@ describe("isRequestRetryable", () => { }, retriesAttempted: 0, }); - expect(isRetryable).toBeFalse(); + expect(isRetryable).toBe(false); }); }); }); diff --git a/test/unit/specs/core/network/requestMethods/injectSendBeaconRequest.spec.js b/test/unit/specs/core/network/requestMethods/injectSendBeaconRequest.spec.js index 7b347f01d..d86dc07d7 100644 --- a/test/unit/specs/core/network/requestMethods/injectSendBeaconRequest.spec.js +++ b/test/unit/specs/core/network/requestMethods/injectSendBeaconRequest.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import injectSendBeaconRequest from "../../../../../../src/core/network/requestMethods/injectSendBeaconRequest.js"; // When running these tests in IE 11, they fail because IE doesn't like the @@ -23,45 +24,47 @@ const guardForSendBeaconAvailability = (spec) => { ? spec : () => pending("No sendBeacon API available."); }; - describe("injectSendBeaconRequest", () => { it( "falls back to sendFetchRequest if sendBeacon fails", guardForSendBeaconAvailability(() => { - const sendBeacon = jasmine.createSpy().and.returnValue(false); + const sendBeacon = vi.fn().mockReturnValue(false); const sendFetchRequestPromise = Promise.resolve(); - const sendFetchRequest = jasmine - .createSpy() - .and.returnValue(sendFetchRequestPromise); - const logger = jasmine.createSpyObj(["info"]); + const sendFetchRequest = vi.fn().mockReturnValue(sendFetchRequestPromise); + const logger = { + info: vi.fn(), + }; const sendBeaconRequest = injectSendBeaconRequest({ sendBeacon, sendFetchRequest, logger, }); - const body = { a: "b" }; + const body = { + a: "b", + }; const result = sendBeaconRequest("https://example.com/endpoint", body); expect(sendBeacon).toHaveBeenCalledWith( "https://example.com/endpoint", - jasmine.any(Object), + expect.any(Object), ); expect(sendFetchRequest).toHaveBeenCalledWith( "https://example.com/endpoint", body, ); expect(logger.info).toHaveBeenCalledWith( - jasmine.stringMatching("falling back to"), + expect.stringMatching("falling back to"), ); expect(result).toBe(sendFetchRequestPromise); }), ); - it( "does not fall back to sendFetchRequest if sendBeacon succeeds", guardForSendBeaconAvailability(() => { - const sendBeacon = jasmine.createSpy().and.returnValue(true); - const body = { a: "b" }; - const sendFetchRequest = jasmine.createSpy(); + const sendBeacon = vi.fn().mockReturnValue(true); + const body = { + a: "b", + }; + const sendFetchRequest = vi.fn(); const sendBeaconRequest = injectSendBeaconRequest({ sendBeacon, sendFetchRequest, diff --git a/test/unit/specs/core/network/requestMethods/injectSendFetchRequest.spec.js b/test/unit/specs/core/network/requestMethods/injectSendFetchRequest.spec.js index 12a96c191..916c3720c 100644 --- a/test/unit/specs/core/network/requestMethods/injectSendFetchRequest.spec.js +++ b/test/unit/specs/core/network/requestMethods/injectSendFetchRequest.spec.js @@ -10,42 +10,44 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import injectSendFetchRequest from "../../../../../../src/core/network/requestMethods/injectSendFetchRequest.js"; describe("injectSendFetchRequest", () => { it("resolves returned promise upon network success", () => { const fetchResult = { status: 999, - headers: jasmine.createSpyObj("headers", { - get: "headervalue", - }), + headers: { + get: vi.fn().mockReturnValue("headervalue"), + }, text() { return Promise.resolve("content"); }, }; - const fetch = jasmine - .createSpy() - .and.returnValue(Promise.resolve(fetchResult)); - const sendFetchRequest = injectSendFetchRequest({ fetch }); - return sendFetchRequest("http://example.com/endpoint", { a: "b" }).then( - (result) => { - expect(result.statusCode).toBe(999); - expect(result.getHeader("Content-Type")).toBe("headervalue"); - expect(result.body).toBe("content"); - expect(fetchResult.headers.get).toHaveBeenCalledWith("Content-Type"); - }, - ); + const fetch = vi.fn().mockReturnValue(Promise.resolve(fetchResult)); + const sendFetchRequest = injectSendFetchRequest({ + fetch, + }); + return sendFetchRequest("http://example.com/endpoint", { + a: "b", + }).then((result) => { + expect(result.statusCode).toBe(999); + expect(result.getHeader("Content-Type")).toBe("headervalue"); + expect(result.body).toBe("content"); + expect(fetchResult.headers.get).toHaveBeenCalledWith("Content-Type"); + }); }); - it("rejects returned promise upon network failure", () => { - const fetch = jasmine - .createSpy() - .and.returnValue(Promise.reject(new Error("No connection"))); - const sendFetchRequest = injectSendFetchRequest({ fetch }); - return sendFetchRequest("http://example.com/endpoint", { a: "b" }) - .then(fail) - .catch((error) => { - expect(error.message).toBe("No connection"); - }); + const fetch = vi + .fn() + .mockReturnValue(Promise.reject(new Error("No connection"))); + const sendFetchRequest = injectSendFetchRequest({ + fetch, + }); + return sendFetchRequest("http://example.com/endpoint", { + a: "b", + }).catch((error) => { + expect(error.message).toBe("No connection"); + }); }); }); diff --git a/test/unit/specs/core/requiredComponentCreators.spec.js b/test/unit/specs/core/requiredComponentCreators.spec.js index d3e281e00..b01bcf17c 100644 --- a/test/unit/specs/core/requiredComponentCreators.spec.js +++ b/test/unit/specs/core/requiredComponentCreators.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import * as requiredComponentCreators from "../../../../src/core/requiredComponentCreators.js"; describe("requiredComponentCreators", () => { @@ -18,18 +19,13 @@ describe("requiredComponentCreators", () => { acc.push(requiredComponentCreators[key]); return acc; }, []); - - expect(c).toEqual(jasmine.any(Array)); - + expect(c).toEqual(expect.any(Array)); c.forEach((componentCreator) => { - expect(componentCreator).toEqual(jasmine.any(Function)); - expect(componentCreator.namespace).toEqual(jasmine.any(String)); - + expect(componentCreator).toEqual(expect.any(Function)); + expect(componentCreator.namespace).toEqual(expect.any(String)); if (componentCreator.configValidators) { // should export a validator function - expect(componentCreator.configValidators).toEqual( - jasmine.any(Function), - ); + expect(componentCreator.configValidators).toEqual(expect.any(Function)); } }); }); diff --git a/test/unit/specs/core/validateCommandOptions.spec.js b/test/unit/specs/core/validateCommandOptions.spec.js index cb2c43400..56b59b9d9 100644 --- a/test/unit/specs/core/validateCommandOptions.spec.js +++ b/test/unit/specs/core/validateCommandOptions.spec.js @@ -10,12 +10,12 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import validateCommandOptions from "../../../../src/core/validateCommandOptions.js"; describe("validateCommandOptions", () => { let command; let options; - beforeEach(() => { options = {}; command = { @@ -23,10 +23,12 @@ describe("validateCommandOptions", () => { run: () => {}, }; }); - it("supports commands not implementing command options validation.", () => { expect(() => { - validateCommandOptions({ command, options }); + validateCommandOptions({ + command, + options, + }); }).not.toThrowError(); }); it("should throw exception if command options validator throws exception.", () => { @@ -34,7 +36,10 @@ describe("validateCommandOptions", () => { throw new Error("Invalid Options"); }; expect(() => { - validateCommandOptions({ command, options }); + validateCommandOptions({ + command, + options, + }); }).toThrowError(); }); it("should include custom documentation URI in error message if provided by command options validator.", () => { @@ -44,7 +49,10 @@ describe("validateCommandOptions", () => { command.documentationUri = "https://example.com"; let errorMessage; try { - validateCommandOptions({ command, options }); + validateCommandOptions({ + command, + options, + }); } catch (e) { errorMessage = e.message; } diff --git a/test/unit/specs/karmaEntry.spec.cjs b/test/unit/specs/karmaEntry.spec.cjs deleted file mode 100644 index 5b0447e3b..000000000 --- a/test/unit/specs/karmaEntry.spec.cjs +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2020 Adobe. All rights reserved. -This file is licensed to you 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 REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ - -// Without this entry file, Karma + Rollup would create a separate build -// for each spec file, resulting in slow tests runs, high memory usage, -// and file system errors. - -// eslint-disable-next-line import/no-unresolved,import/extensions -import "./*/**/*.spec.js"; diff --git a/test/unit/specs/utils/assignConcatArrayValues.spec.js b/test/unit/specs/utils/assignConcatArrayValues.spec.js index 932af9a69..ab9c38e4c 100644 --- a/test/unit/specs/utils/assignConcatArrayValues.spec.js +++ b/test/unit/specs/utils/assignConcatArrayValues.spec.js @@ -9,53 +9,96 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import assignConcatArrayValues from "../../../../src/utils/assignConcatArrayValues.js"; describe("assignConcatArrayValues", () => { it("throws an error if no arguments are passed", () => { expect(() => assignConcatArrayValues()).toThrowError(); }); - it("returns an empty array if an empty array is passed", () => { const obj = []; expect(assignConcatArrayValues(obj)).toBe(obj); }); - it("returns the first object if only one argument is passed", () => { const obj = {}; expect(assignConcatArrayValues(obj)).toBe(obj); }); - it("works with two objects with different properties", () => { - const obj1 = { a: 1 }; - const obj2 = { b: 2 }; + const obj1 = { + a: 1, + }; + const obj2 = { + b: 2, + }; const result = assignConcatArrayValues(obj1, obj2); - expect(result).toEqual({ a: 1, b: 2 }); + expect(result).toEqual({ + a: 1, + b: 2, + }); expect(result).toBe(obj1); }); - it("works with two objects with the same property", () => { - expect(assignConcatArrayValues({ a: 1 }, { a: 2 })).toEqual({ a: 2 }); + expect( + assignConcatArrayValues( + { + a: 1, + }, + { + a: 2, + }, + ), + ).toEqual({ + a: 2, + }); }); - it("works with two objects with the same property that is an array", () => { - expect(assignConcatArrayValues({ a: [1] }, { a: [2] })).toEqual({ + expect( + assignConcatArrayValues( + { + a: [1], + }, + { + a: [2], + }, + ), + ).toEqual({ a: [1, 2], }); }); - it("works with three objects with the same property that is an array", () => { - expect(assignConcatArrayValues({ a: [1] }, { a: [] }, { a: [3] })).toEqual({ + expect( + assignConcatArrayValues( + { + a: [1], + }, + { + a: [], + }, + { + a: [3], + }, + ), + ).toEqual({ a: [1, 3], }); }); - it("works with three objects with the same property that is an array and different properties", () => { expect( assignConcatArrayValues( - { a: [1] }, - { a: [], c: true, d: false }, - { a: [3], b: "2", e: null }, + { + a: [1], + }, + { + a: [], + c: true, + d: false, + }, + { + a: [3], + b: "2", + e: null, + }, ), ).toEqual({ a: [1, 3], @@ -65,10 +108,20 @@ describe("assignConcatArrayValues", () => { e: null, }); }); - it("skips non-objects", () => { expect( - assignConcatArrayValues({ a: [1] }, null, { a: [3] }, false, [], 5), + assignConcatArrayValues( + { + a: [1], + }, + null, + { + a: [3], + }, + false, + [], + 5, + ), ).toEqual({ a: [1, 3], }); diff --git a/test/unit/specs/utils/clone.spec.js b/test/unit/specs/utils/clone.spec.js index e4b5be1ce..57f236b1a 100644 --- a/test/unit/specs/utils/clone.spec.js +++ b/test/unit/specs/utils/clone.spec.js @@ -10,18 +10,19 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import clone from "../../../../src/utils/clone.js"; describe("clone", () => { it("clones the object using JSON serialization/deserialization", () => { const obj = { toJSON() { - return { foo: "bar" }; + return { + foo: "bar", + }; }, }; - const result = clone(obj); - expect(result).toEqual({ foo: "bar", }); diff --git a/test/unit/specs/utils/cookieJar.spec.js b/test/unit/specs/utils/cookieJar.spec.js deleted file mode 100644 index 7b0e98dcd..000000000 --- a/test/unit/specs/utils/cookieJar.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -/* -Copyright 2019 Adobe. All rights reserved. -This file is licensed to you 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 REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ - -// eslint-disable-next-line no-unused-vars -import cookieJar from "../../../../src/utils/cookieJar.js"; diff --git a/test/unit/specs/utils/crc32.spec.js b/test/unit/specs/utils/crc32.spec.js index c83b099a6..146b1b84c 100644 --- a/test/unit/specs/utils/crc32.spec.js +++ b/test/unit/specs/utils/crc32.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import crc32 from "../../../../src/utils/crc32.js"; const crc32Sample = { @@ -613,7 +614,6 @@ const crc32Sample = { crc32Hash: 4211638728, }, }; - describe("crc32", () => { it("should hash a string and return a number ", () => { const str = "hello"; @@ -621,7 +621,6 @@ describe("crc32", () => { expect(typeof result).toBe("number"); expect(result).toEqual(907060870); }); - it("should create same hash every time", () => { const idsTohash = { email: { @@ -635,7 +634,6 @@ describe("crc32", () => { expect(resultOne).toBe(3158443042); expect(resultTwo).toBe(3158443042); }); - it("should always return a positive number", () => { const idOneTohash = "x+x"; const idTwoTohash = "a*b/100-220"; @@ -646,13 +644,11 @@ describe("crc32", () => { expect(typeof resultTwo).toBe("number"); expect(resultTwo).toBeGreaterThan(0); }); - it("should hash strings with special characters", () => { const stringToHash = "hello@#&^hq10"; const result = crc32(stringToHash); expect(result).toBe(864118309); }); - it("should create different hashes for different strings", () => { const stringOneToHash = "hello@#&^hq10"; const stringTwoToHash = "hello@#&h^q10"; @@ -662,7 +658,6 @@ describe("crc32", () => { expect(resultOne).toBe(864118309); expect(resultTwo).toBe(3365964926); }); - describe("hashing of various of unicode chars", () => { Object.keys(crc32Sample).forEach((lang) => { const sample = crc32Sample[lang]; diff --git a/test/unit/specs/utils/createCallbackAggregator.spec.js b/test/unit/specs/utils/createCallbackAggregator.spec.js index 636ee5fdf..705654316 100644 --- a/test/unit/specs/utils/createCallbackAggregator.spec.js +++ b/test/unit/specs/utils/createCallbackAggregator.spec.js @@ -10,18 +10,17 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createCallbackAggregator from "../../../../src/utils/createCallbackAggregator.js"; describe("createCallbackAggregator", () => { let callbackAggregator; - beforeEach(() => { callbackAggregator = createCallbackAggregator(); }); - it("calls all added callbacks and returns a combined promise", () => { - const callback1 = jasmine.createSpy("callback1").and.returnValue("foo"); - const callback2 = jasmine.createSpy("callback2").and.returnValue("bar"); + const callback1 = vi.fn().mockReturnValue("foo"); + const callback2 = vi.fn().mockReturnValue("bar"); callbackAggregator.add(callback1); callbackAggregator.add(callback2); return callbackAggregator.call("cherry", "tree").then((result) => { @@ -30,15 +29,13 @@ describe("createCallbackAggregator", () => { expect(result).toEqual(["foo", "bar"]); }); }); - it("doesn't throw errors when there are no callbacks", () => { return callbackAggregator.call("cherry", "tree").then((result) => { expect(result).toEqual([]); }); }); - it("doesn't throw errors when there are no arguments", () => { - const callback = jasmine.createSpy("callback").and.returnValue("foo"); + const callback = vi.fn().mockReturnValue("foo"); callbackAggregator.add(callback); return callbackAggregator.call().then((result) => { expect(result).toEqual(["foo"]); diff --git a/test/unit/specs/utils/createCollect.spec.js b/test/unit/specs/utils/createCollect.spec.js index d3ba7214c..a9b379365 100644 --- a/test/unit/specs/utils/createCollect.spec.js +++ b/test/unit/specs/utils/createCollect.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createCollect from "../../../../src/utils/createCollect.js"; import { PropositionEventType } from "../../../../src/constants/propositionEventType.js"; @@ -22,20 +23,23 @@ describe("Utils::createCollect", () => { }, ]; const event = { - mergeXdm: jasmine.createSpy(), + mergeXdm: vi.fn(), }; - beforeEach(() => { - eventManager = jasmine.createSpyObj("eventManager", { - sendEvent: undefined, - createEvent: event, - }); - mergeDecisionsMeta = jasmine.createSpy("mergeDecisionsMeta"); + eventManager = { + sendEvent: vi.fn().mockReturnValue(undefined), + createEvent: vi.fn().mockReturnValue(event), + }; + mergeDecisionsMeta = vi.fn(); }); - it("collects and sends event with metadata", () => { - const collect = createCollect({ eventManager, mergeDecisionsMeta }); - collect({ decisionsMeta }); + const collect = createCollect({ + eventManager, + mergeDecisionsMeta, + }); + collect({ + decisionsMeta, + }); expect(eventManager.createEvent).toHaveBeenCalled(); expect(event.mergeXdm).toHaveBeenCalledWith({ eventType: "decisioning.propositionDisplay", diff --git a/test/unit/specs/utils/createLoggingCookieJar.spec.js b/test/unit/specs/utils/createLoggingCookieJar.spec.js index 5b9c8d259..64e44476c 100644 --- a/test/unit/specs/utils/createLoggingCookieJar.spec.js +++ b/test/unit/specs/utils/createLoggingCookieJar.spec.js @@ -10,42 +10,50 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createLoggingCookieJar from "../../../../src/utils/createLoggingCookieJar.js"; describe("loggingCookieJar", () => { let cookieJar; let logger; let loggingCookieJar; - beforeEach(() => { - cookieJar = jasmine.createSpyObj("cookieJar", ["set", "get"]); - logger = jasmine.createSpyObj("logger", ["info"]); - loggingCookieJar = createLoggingCookieJar({ cookieJar, logger }); + cookieJar = { + set: vi.fn(), + get: vi.fn(), + }; + logger = { + info: vi.fn(), + }; + loggingCookieJar = createLoggingCookieJar({ + cookieJar, + logger, + }); }); - it("logs a message", () => { - loggingCookieJar.set("mykey", "myvalue", { myoption: "myoptionvalue" }); - expect(logger.info).toHaveBeenCalledOnceWith("Setting cookie", { + loggingCookieJar.set("mykey", "myvalue", { + myoption: "myoptionvalue", + }); + expect(logger.info).toHaveBeenNthCalledWith(1, "Setting cookie", { name: "mykey", value: "myvalue", myoption: "myoptionvalue", }); }); - it("calls set", () => { - loggingCookieJar.set("mykey", "myvalue", { myoption: "myoptionvalue" }); - expect(cookieJar.set).toHaveBeenCalledOnceWith("mykey", "myvalue", { + loggingCookieJar.set("mykey", "myvalue", { + myoption: "myoptionvalue", + }); + expect(cookieJar.set).toHaveBeenNthCalledWith(1, "mykey", "myvalue", { myoption: "myoptionvalue", }); }); - it("calls get", () => { loggingCookieJar.get("mykey"); - expect(cookieJar.get).toHaveBeenCalledOnceWith("mykey"); + expect(cookieJar.get).toHaveBeenNthCalledWith(1, "mykey"); }); - it("returns the value from get", () => { - cookieJar.get.and.returnValue("myvalue"); + cookieJar.get.mockReturnValue("myvalue"); expect(loggingCookieJar.get("mykey")).toEqual("myvalue"); }); }); diff --git a/test/unit/specs/utils/createMerger.spec.js b/test/unit/specs/utils/createMerger.spec.js index f826d5e6f..092efcfa6 100644 --- a/test/unit/specs/utils/createMerger.spec.js +++ b/test/unit/specs/utils/createMerger.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import createMerger from "../../../../src/utils/createMerger.js"; describe("createMerger", () => { @@ -27,7 +28,6 @@ describe("createMerger", () => { }, }); }); - it("deeply merges if key does exist", () => { const content = { foods: { diff --git a/test/unit/specs/utils/createSubscription.spec.js b/test/unit/specs/utils/createSubscription.spec.js index ca84aec48..c53621281 100644 --- a/test/unit/specs/utils/createSubscription.spec.js +++ b/test/unit/specs/utils/createSubscription.spec.js @@ -9,91 +9,69 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import createSubscription from "../../../../src/utils/createSubscription.js"; describe("createSubscription", () => { - const value = { something: 42 }; - + const value = { + something: 42, + }; let callback1; let callback2; let callback3; - beforeEach(() => { - callback1 = jasmine.createSpy("callback1"); - callback2 = jasmine.createSpy("callback2"); - callback3 = jasmine.createSpy("callback3"); + callback1 = vi.fn(); + callback2 = vi.fn(); + callback3 = vi.fn(); }); - it("supports a single subscription", () => { const subscription = createSubscription(); - expect(subscription.hasSubscriptions()).toBeFalse(); - + expect(subscription.hasSubscriptions()).toBe(false); const { unsubscribe } = subscription.add(callback1); - - expect(subscription.hasSubscriptions()).toBeTrue(); - + expect(subscription.hasSubscriptions()).toBe(true); subscription.emit(value); - - expect(callback1).toHaveBeenCalledOnceWith(value); - + expect(callback1).toHaveBeenNthCalledWith(1, value); unsubscribe(); - - expect(subscription.hasSubscriptions()).toBeFalse(); + expect(subscription.hasSubscriptions()).toBe(false); subscription.emit(value); - - expect(callback1).toHaveBeenCalledOnceWith(value); + expect(callback1).toHaveBeenNthCalledWith(1, value); }); - it("supports multiple subscriptions", () => { const subscription = createSubscription(); - expect(subscription.hasSubscriptions()).toBeFalse(); - + expect(subscription.hasSubscriptions()).toBe(false); const { unsubscribe: unsubscribe1 } = subscription.add(callback1); const { unsubscribe: unsubscribe2 } = subscription.add(callback2); const { unsubscribe: unsubscribe3 } = subscription.add(callback3); - - expect(subscription.hasSubscriptions()).toBeTrue(); - + expect(subscription.hasSubscriptions()).toBe(true); subscription.emit(value); - - expect(callback1).toHaveBeenCalledOnceWith(value); - expect(callback2).toHaveBeenCalledOnceWith(value); - expect(callback3).toHaveBeenCalledOnceWith(value); + expect(callback1).toHaveBeenNthCalledWith(1, value); + expect(callback2).toHaveBeenNthCalledWith(1, value); + expect(callback3).toHaveBeenNthCalledWith(1, value); // unsubscribe the first callback unsubscribe1(); - - expect(subscription.hasSubscriptions()).toBeTrue(); - + expect(subscription.hasSubscriptions()).toBe(true); subscription.emit(value); - expect(callback1).toHaveBeenCalledTimes(1); expect(callback2).toHaveBeenCalledTimes(2); expect(callback3).toHaveBeenCalledTimes(2); // unsubscribe the second callback unsubscribe2(); - - expect(subscription.hasSubscriptions()).toBeTrue(); - + expect(subscription.hasSubscriptions()).toBe(true); subscription.emit(value); - expect(callback1).toHaveBeenCalledTimes(1); expect(callback2).toHaveBeenCalledTimes(2); expect(callback3).toHaveBeenCalledTimes(3); // unsubscribe the third callback unsubscribe3(); - - expect(subscription.hasSubscriptions()).toBeFalse(); - + expect(subscription.hasSubscriptions()).toBe(false); subscription.emit(value); - expect(callback1).toHaveBeenCalledTimes(1); expect(callback2).toHaveBeenCalledTimes(2); expect(callback3).toHaveBeenCalledTimes(3); }); - it("emits distinct values for multiple subscriptions", () => { const subscription = createSubscription(); subscription.setEmissionPreprocessor((params, basePrice) => { @@ -101,7 +79,6 @@ describe("createSubscription", () => { const price = basePrice * profitMargin; return [`hello ${name}! The price is $${price}`]; }); - const { unsubscribe: unsubscribe1 } = subscription.add(callback1, { name: "jim", profitMargin: 3, @@ -114,18 +91,17 @@ describe("createSubscription", () => { name: "tina", profitMargin: 1.1, }); - subscription.emit(10); - - expect(callback1).toHaveBeenCalledOnceWith("hello jim! The price is $30"); - expect(callback2).toHaveBeenCalledOnceWith("hello bob! The price is $18"); - expect(callback3).toHaveBeenCalledOnceWith("hello tina! The price is $11"); - + expect(callback1).toHaveBeenNthCalledWith(1, "hello jim! The price is $30"); + expect(callback2).toHaveBeenNthCalledWith(1, "hello bob! The price is $18"); + expect(callback3).toHaveBeenNthCalledWith( + 1, + "hello tina! The price is $11", + ); unsubscribe1(); unsubscribe2(); unsubscribe3(); }); - it("emits distinct values conditionally", () => { const subscription = createSubscription(); subscription.setEmissionPreprocessor((params, basePrice) => { @@ -140,7 +116,6 @@ describe("createSubscription", () => { ); return price < 20; }); - const { unsubscribe: unsubscribe1 } = subscription.add(callback1, { name: "jim", profitMargin: 3, @@ -153,13 +128,13 @@ describe("createSubscription", () => { name: "tina", profitMargin: 1.1, }); - subscription.emit(10); - expect(callback1).not.toHaveBeenCalled(); // price is > 20, so no emission - expect(callback2).toHaveBeenCalledOnceWith("hello bob! The price is $18"); - expect(callback3).toHaveBeenCalledOnceWith("hello tina! The price is $11"); - + expect(callback2).toHaveBeenNthCalledWith(1, "hello bob! The price is $18"); + expect(callback3).toHaveBeenNthCalledWith( + 1, + "hello tina! The price is $11", + ); unsubscribe1(); unsubscribe2(); unsubscribe3(); diff --git a/test/unit/specs/utils/createTaskQueue.spec.js b/test/unit/specs/utils/createTaskQueue.spec.js index 0754d4c8d..e01244791 100644 --- a/test/unit/specs/utils/createTaskQueue.spec.js +++ b/test/unit/specs/utils/createTaskQueue.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import createTaskQueue from "../../../../src/utils/createTaskQueue.js"; import { defer } from "../../../../src/utils/index.js"; import flushPromiseChains from "../../helpers/flushPromiseChains.js"; @@ -17,31 +18,22 @@ import flushPromiseChains from "../../helpers/flushPromiseChains.js"; describe("createTaskQueue", () => { it("executes a single task once even when it throws an error", () => { const queue = createTaskQueue(); - const task1 = jasmine - .createSpy("task1") - .and.returnValue(Promise.reject(Error("myerror"))); - return queue.addTask(task1).then(fail, (e) => { + const task1 = vi.fn().mockReturnValue(Promise.reject(Error("myerror"))); + return queue.addTask(task1).catch((e) => { expect(e.message).toEqual("myerror"); expect(task1).toHaveBeenCalledTimes(1); }); }); - it("executes tasks in sequence when first task succeeds", () => { const queue = createTaskQueue(); const task1Deferred = defer(); - const task1 = jasmine - .createSpy("task1") - .and.returnValue(task1Deferred.promise); + const task1 = vi.fn().mockReturnValue(task1Deferred.promise); const task2Deferred = defer(); - const task2 = jasmine - .createSpy("task2") - .and.returnValue(task2Deferred.promise); - - const task1OnFulfilled = jasmine.createSpy("task1OnFulfilled"); + const task2 = vi.fn().mockReturnValue(task2Deferred.promise); + const task1OnFulfilled = vi.fn(); queue.addTask(task1).then(task1OnFulfilled); - const task2OnFulfilled = jasmine.createSpy("task2OnFulfilled"); + const task2OnFulfilled = vi.fn(); queue.addTask(task2).then(task2OnFulfilled); - return flushPromiseChains() .then(() => { expect(task1).toHaveBeenCalled(); @@ -62,23 +54,16 @@ describe("createTaskQueue", () => { expect(task2OnFulfilled).toHaveBeenCalledWith("task2Result"); }); }); - it("executes tasks in sequence when first task rejects promise", () => { const queue = createTaskQueue(); const task1Deferred = defer(); - const task1 = jasmine - .createSpy("task1") - .and.returnValue(task1Deferred.promise); + const task1 = vi.fn().mockReturnValue(task1Deferred.promise); const task2Deferred = defer(); - const task2 = jasmine - .createSpy("task2") - .and.returnValue(task2Deferred.promise); - - const task1OnRejected = jasmine.createSpy("task1OnRejected"); + const task2 = vi.fn().mockReturnValue(task2Deferred.promise); + const task1OnRejected = vi.fn(); queue.addTask(task1).catch(task1OnRejected); - const task2OnFulfilled = jasmine.createSpy("task2OnFulfilled"); + const task2OnFulfilled = vi.fn(); queue.addTask(task2).then(task2OnFulfilled); - return flushPromiseChains() .then(() => { expect(task1).toHaveBeenCalled(); @@ -99,22 +84,17 @@ describe("createTaskQueue", () => { expect(task2OnFulfilled).toHaveBeenCalledWith("task2Result"); }); }); - it("executes tasks in sequence when first task throws error", () => { const queue = createTaskQueue(); - const task1 = jasmine - .createSpy("task1") - .and.throwError(new Error("task1Error")); + const task1 = vi.fn().mockImplementation(() => { + throw new Error("task1Error"); + }); const task2Deferred = defer(); - const task2 = jasmine - .createSpy("task2") - .and.returnValue(task2Deferred.promise); - - const task1OnRejected = jasmine.createSpy("task1OnRejected"); + const task2 = vi.fn().mockReturnValue(task2Deferred.promise); + const task1OnRejected = vi.fn(); queue.addTask(task1).catch(task1OnRejected); - const task2OnFulfilled = jasmine.createSpy("task2OnFulfilled"); + const task2OnFulfilled = vi.fn(); queue.addTask(task2).then(task2OnFulfilled); - return flushPromiseChains() .then(() => { expect(task1).toHaveBeenCalled(); @@ -128,7 +108,6 @@ describe("createTaskQueue", () => { expect(task2OnFulfilled).toHaveBeenCalledWith("task2Result"); }); }); - it("accurately reports the size of the queue", () => { const queue = createTaskQueue(); const task1Deferred = defer(); diff --git a/test/unit/specs/utils/decodeUriComponentSafely.spec.js b/test/unit/specs/utils/decodeUriComponentSafely.spec.js index 2f8f64186..018bdabc4 100644 --- a/test/unit/specs/utils/decodeUriComponentSafely.spec.js +++ b/test/unit/specs/utils/decodeUriComponentSafely.spec.js @@ -10,13 +10,13 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import decodeUriComponentSafely from "../../../../src/utils/decodeUriComponentSafely.js"; describe("decodeUriComponentSafely", () => { it("decodes a uri encoded string", () => { expect(decodeUriComponentSafely("%3Fx%3Dtest")).toEqual("?x=test"); }); - it("returns an empty string when an invalid encoded URI component is provided", () => { expect( decodeUriComponentSafely( diff --git a/test/unit/specs/utils/deduplicateArray.spec.js b/test/unit/specs/utils/deduplicateArray.spec.js index 08c205208..b59a558cc 100644 --- a/test/unit/specs/utils/deduplicateArray.spec.js +++ b/test/unit/specs/utils/deduplicateArray.spec.js @@ -9,36 +9,49 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { deduplicateArray } from "../../../../src/utils/index.js"; describe("deduplicateArray", () => { it("should return an empty array if input is empty", () => { expect(deduplicateArray([])).toEqual([]); }); - it("should return an array with one item if input has one item", () => { const input = [1]; expect(deduplicateArray(input)).toEqual(input); }); - it("should return an array with one item if input has two equal items", () => { const input = [1, 1]; expect(deduplicateArray(input)).toEqual([1]); }); - it("should return an array with two items if input has two different items", () => { const input = [1, 2]; expect(deduplicateArray(input)).toEqual(input); }); - it("should return an array with two items if input has three items with two equal items", () => { const input = [1, 1, 2]; expect(deduplicateArray(input)).toEqual([1, 2]); }); - it("should accept a custom equality function", () => { - const input = [{ id: 1 }, { id: 1 }, { id: 2 }]; + const input = [ + { + id: 1, + }, + { + id: 1, + }, + { + id: 2, + }, + ]; const isEqual = (a, b) => a.id === b.id; - expect(deduplicateArray(input, isEqual)).toEqual([{ id: 1 }, { id: 2 }]); + expect(deduplicateArray(input, isEqual)).toEqual([ + { + id: 1, + }, + { + id: 2, + }, + ]); }); }); diff --git a/test/unit/specs/utils/deepAssign.spec.js b/test/unit/specs/utils/deepAssign.spec.js index d9c7438d8..1d02594d2 100644 --- a/test/unit/specs/utils/deepAssign.spec.js +++ b/test/unit/specs/utils/deepAssign.spec.js @@ -10,69 +10,94 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import deepAssign from "../../../../src/utils/deepAssign.js"; describe("deepAssign", () => { it("should throw when target is null or undefined", () => { expect(() => { - deepAssign(null, { a: 1 }); + deepAssign(null, { + a: 1, + }); }).toThrow(); - expect(() => { - deepAssign(undefined, { a: 1 }); + deepAssign(undefined, { + a: 1, + }); }).toThrow(); }); - it("should assign when target is string", () => { - const result1 = deepAssign("foo", { a: 1 }); - const result2 = Object.assign("foo", { a: 1 }); - + const result1 = deepAssign("foo", { + a: 1, + }); + const result2 = Object.assign("foo", { + a: 1, + }); expect(result1).toEqual(result2); }); - it("should assign when target is number", () => { - const result1 = deepAssign(1, { a: 1 }); - const result2 = Object.assign(1, { a: 1 }); - + const result1 = deepAssign(1, { + a: 1, + }); + const result2 = Object.assign(1, { + a: 1, + }); expect(result1).toEqual(result2); }); - it("should assign when target is array", () => { - const result1 = deepAssign([1], { a: 1 }); - const result2 = Object.assign([1], { a: 1 }); - + const result1 = deepAssign([1], { + a: 1, + }); + const result2 = Object.assign([1], { + a: 1, + }); expect(result1).toEqual(result2); }); - it("should assign when target is object and source is string", () => { const result1 = deepAssign({}, "foo"); - const result2 = { ..."foo" }; - + const result2 = { + ..."foo", + }; expect(result1).toEqual(result2); }); - it("should assign when target is object and source is number", () => { const result1 = deepAssign({}, 1); - const result2 = { ...1 }; - + const result2 = { + ...1, + }; expect(result1).toEqual(result2); }); - it("should assign when target is object and source is array", () => { const result1 = deepAssign({}, [1]); - const result2 = { ...[1] }; - + const result2 = { + ...[1], + }; expect(result1).toEqual(result2); }); - it("should assign values recursively", () => { const result = deepAssign( {}, - { a: { c: 1 } }, - { b: 2 }, - { a: { c: 2, d: 3 } }, + { + a: { + c: 1, + }, + }, + { + b: 2, + }, + { + a: { + c: 2, + d: 3, + }, + }, ); - - expect(result).toEqual({ a: { c: 2, d: 3 }, b: 2 }); + expect(result).toEqual({ + a: { + c: 2, + d: 3, + }, + b: 2, + }); }); }); diff --git a/test/unit/specs/utils/defer.spec.js b/test/unit/specs/utils/defer.spec.js index b2f8bc4f2..8dfff330f 100644 --- a/test/unit/specs/utils/defer.spec.js +++ b/test/unit/specs/utils/defer.spec.js @@ -10,25 +10,23 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import defer from "../../../../src/utils/defer.js"; describe("defer", () => { - it("resolves an exposed promise", (done) => { + it("resolves an exposed promise", () => { const deferred = defer(); deferred.promise.then((value) => { expect(value).toBe("abc"); - done(); }); deferred.resolve("abc"); }); - - it("rejects an exposed promise", (done) => { + it("rejects an exposed promise", () => { const deferred = defer(); deferred.promise.then( () => {}, (value) => { expect(value).toBe("abc"); - done(); }, ); deferred.reject("abc"); diff --git a/test/unit/specs/utils/dom/appendNode.spec.js b/test/unit/specs/utils/dom/appendNode.spec.js index 15b8c23f9..d3a903be1 100644 --- a/test/unit/specs/utils/dom/appendNode.spec.js +++ b/test/unit/specs/utils/dom/appendNode.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { afterEach, describe, it, expect } from "vitest"; import createNode from "../../../../../src/utils/dom/createNode.js"; import appendNode from "../../../../../src/utils/dom/appendNode.js"; import selectNodes from "../../../../../src/utils/dom/selectNodes.js"; @@ -19,12 +20,11 @@ describe("DOM::appendNode", () => { afterEach(() => { selectNodes("div").forEach(removeNode); }); - it("should append a node to head tag", () => { - const elem = createNode("div", { id: "append" }); - + const elem = createNode("div", { + id: "append", + }); appendNode(document.head, elem); - expect(selectNodes("#append").length).toEqual(1); }); }); diff --git a/test/unit/specs/utils/dom/awaitSelector.spec.js b/test/unit/specs/utils/dom/awaitSelector.spec.js index 48133a028..17faee903 100644 --- a/test/unit/specs/utils/dom/awaitSelector.spec.js +++ b/test/unit/specs/utils/dom/awaitSelector.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import awaitSelector from "../../../../../src/utils/dom/awaitSelector.js"; import selectNodes from "../../../../../src/utils/dom/selectNodes.js"; import { diff --git a/test/unit/specs/utils/dom/createNode.spec.js b/test/unit/specs/utils/dom/createNode.spec.js index cdfa2a8fb..d24f222f3 100644 --- a/test/unit/specs/utils/dom/createNode.spec.js +++ b/test/unit/specs/utils/dom/createNode.spec.js @@ -10,37 +10,43 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import createNode from "../../../../../src/utils/dom/createNode.js"; describe("DOM::createNode", () => { it("should createNode with tag only", () => { const element = createNode("DIV"); - expect(element.tagName).toEqual("DIV"); }); - it("should createNode with tag and attrs", () => { - const element = createNode("DIV", { id: "create" }); - + const element = createNode("DIV", { + id: "create", + }); expect(element.tagName).toEqual("DIV"); expect(element.id).toEqual("create"); }); - it("should createNode with tag, child", () => { const element = createNode("DIV", {}, {}, [createNode("p")]); - expect(element.tagName).toEqual("DIV"); expect(element.firstElementChild.tagName).toEqual("P"); }); - it("supports style attribute objects", () => { - const element = createNode("DIV", {}, { style: { color: "blue" } }); + const element = createNode( + "DIV", + {}, + { + style: { + color: "blue", + }, + }, + ); expect(element.tagName).toEqual("DIV"); expect(element.style.color).toEqual("blue"); }); - it("supports style attribute strings", () => { - const element = createNode("DIV", { style: "color: blue;" }); + const element = createNode("DIV", { + style: "color: blue;", + }); expect(element.tagName).toEqual("DIV"); expect(element.style.color).toEqual("blue"); }); diff --git a/test/unit/specs/utils/dom/isShadowSelector.spec.js b/test/unit/specs/utils/dom/isShadowSelector.spec.js index 7fa55cec9..28d6989b7 100644 --- a/test/unit/specs/utils/dom/isShadowSelector.spec.js +++ b/test/unit/specs/utils/dom/isShadowSelector.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isShadowSelector from "../../../../../src/utils/dom/isShadowSelector.js"; describe("Utils::DOM::isShadowSelector", () => { @@ -17,9 +18,9 @@ describe("Utils::DOM::isShadowSelector", () => { let selector = "BODY > BUY-NOW-BUTTON:nth-of-type(2):shadow > DIV:nth-of-type(1)"; let result = isShadowSelector(selector); - expect(result).toBeTrue(); + expect(result).toBe(true); selector = "BODY > BUY-NOW-BUTTON:nth-of-type(2) > DIV:nth-of-type(1)"; result = isShadowSelector(selector); - expect(result).toBeFalse(); + expect(result).toBe(false); }); }); diff --git a/test/unit/specs/utils/dom/matchesSelector.spec.js b/test/unit/specs/utils/dom/matchesSelector.spec.js index 10df57fd2..0562155ba 100644 --- a/test/unit/specs/utils/dom/matchesSelector.spec.js +++ b/test/unit/specs/utils/dom/matchesSelector.spec.js @@ -10,13 +10,13 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import matchesSelector from "../../../../../src/utils/dom/matchesSelector.js"; describe("DOM::matchesSelector", () => { it("should match selector for existing element", () => { expect(matchesSelector("BODY", document.body)).toEqual(true); }); - it("should not match selector for non-existing element", () => { expect(matchesSelector("#bla-bla", document.body)).toEqual(false); }); diff --git a/test/unit/specs/utils/dom/querySelectorAll.spec.js b/test/unit/specs/utils/dom/querySelectorAll.spec.js index 79593bc38..ca2e3c036 100644 --- a/test/unit/specs/utils/dom/querySelectorAll.spec.js +++ b/test/unit/specs/utils/dom/querySelectorAll.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { afterEach, describe, it, expect } from "vitest"; import { appendNode, createNode, @@ -22,21 +23,21 @@ describe("Personalization::DOM::querySelectorAll", () => { afterEach(() => { selectNodes(".qsa").forEach(removeNode); }); - it("should select with querySelectorAll", () => { const node = createNode( "DIV", - { id: "abc", class: "qsa" }, + { + id: "abc", + class: "qsa", + }, { innerHTML: `
    Test
    `, }, ); - appendNode(document.body, node); - const selector = ".test"; const result = querySelectorAll(document, selector); - expect(Array.isArray(result)).toBeTrue(); + expect(Array.isArray(result)).toBe(true); expect(result[0]).toEqual(node.children[0]); }); }); diff --git a/test/unit/specs/utils/dom/removeNode.spec.js b/test/unit/specs/utils/dom/removeNode.spec.js index 5ec9890d0..83c5106eb 100644 --- a/test/unit/specs/utils/dom/removeNode.spec.js +++ b/test/unit/specs/utils/dom/removeNode.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { afterEach, describe, it, expect } from "vitest"; import createNode from "../../../../../src/utils/dom/createNode.js"; import appendNode from "../../../../../src/utils/dom/appendNode.js"; import removeNode from "../../../../../src/utils/dom/removeNode.js"; @@ -19,12 +20,11 @@ describe("DOM::removeNode", () => { afterEach(() => { selectNodes("div").forEach(removeNode); }); - it("should remove a node from head tag", () => { - const node = createNode("div", { id: "remove" }); - + const node = createNode("div", { + id: "remove", + }); removeNode(appendNode(document.head, node)); - expect(selectNodes("#remove").length).toEqual(0); }); }); diff --git a/test/unit/specs/utils/dom/selectNodes.spec.js b/test/unit/specs/utils/dom/selectNodes.spec.js index 55bd284f0..af7c6a76f 100644 --- a/test/unit/specs/utils/dom/selectNodes.spec.js +++ b/test/unit/specs/utils/dom/selectNodes.spec.js @@ -10,13 +10,13 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import selectNodes from "../../../../../src/utils/dom/selectNodes.js"; describe("DOM::selectNodes", () => { it("should return array when nodes are present", () => { expect(selectNodes("HEAD").length).toEqual(1); }); - it("should return array when nodes are NOT present", () => { expect(selectNodes("FOO").length).toEqual(0); }); diff --git a/test/unit/specs/utils/dom/selectNodesWithShadow.spec.js b/test/unit/specs/utils/dom/selectNodesWithShadow.spec.js index e90b7e84d..1b8cc44af 100644 --- a/test/unit/specs/utils/dom/selectNodesWithShadow.spec.js +++ b/test/unit/specs/utils/dom/selectNodesWithShadow.spec.js @@ -11,6 +11,7 @@ governing permissions and limitations under the License. */ // eslint-disable-next-line max-classes-per-file +import { afterEach, describe, it, expect } from "vitest"; import { createNode, appendNode, @@ -20,12 +21,10 @@ import { import { selectNodesWithEq } from "../../../../../src/components/Personalization/dom-actions/dom/index.js"; const ieDetected = () => !!document.documentMode; - const defineCustomElements = () => { if (!customElements || customElements.get("buy-now-button")) { return; } - const buyNowContent = `
    @@ -41,86 +40,80 @@ const defineCustomElements = () => { class extends HTMLElement { constructor() { super(); - - const shadowRoot = this.attachShadow({ mode: "open" }); + const shadowRoot = this.attachShadow({ + mode: "open", + }); shadowRoot.innerHTML = buyNowContent; } }, ); - const productOrderContent = `

    Product order

    Buy
    `; customElements.define( "product-order", class extends HTMLElement { constructor() { super(); - - const shadowRoot = this.attachShadow({ mode: "open" }); + const shadowRoot = this.attachShadow({ + mode: "open", + }); shadowRoot.innerHTML = productOrderContent; } }, ); }; - describe("Utils::DOM::selectNodesWithShadow", () => { const CLEANUP_CLASS = "cleanup"; - afterEach(() => { selectNodes(`.${CLEANUP_CLASS}`).forEach(removeNode); }); - it("should select when no shadow", () => { appendNode( document.body, - createNode("DIV", { id: "noShadow", class: CLEANUP_CLASS }), + createNode("DIV", { + id: "noShadow", + class: CLEANUP_CLASS, + }), ); - const result = selectNodes("#noShadow"); - expect(result[0].tagName).toEqual("DIV"); expect(result[0].id).toEqual("noShadow"); }); - it("should select when one shadow node", () => { if (ieDetected()) { return; } - defineCustomElements(); - const content = `
    FirstButton SecondButton
    `; - appendNode( document.body, createNode( "DIV", - { id: "abc", class: CLEANUP_CLASS }, - { innerHTML: content }, + { + id: "abc", + class: CLEANUP_CLASS, + }, + { + innerHTML: content, + }, ), ); - const result = selectNodesWithEq( "#abc:eq(0) > FORM:nth-of-type(1) > BUY-NOW-BUTTON:nth-of-type(2):shadow > DIV:nth-of-type(1) > LABEL:nth-of-type(1)", ); - expect(result.length).toEqual(1); - expect(result[0].tagName).toEqual("LABEL"); expect(result[0].textContent).toEqual("Buy Now"); }); - it("should select when multiple nested shadow nodes", () => { if (ieDetected()) { return; } - defineCustomElements(); - const content = `
    FirstButton @@ -129,31 +122,30 @@ describe("Utils::DOM::selectNodesWithShadow", () => { SecondOrder
    `; - appendNode( document.body, createNode( "DIV", - { id: "abc", class: CLEANUP_CLASS }, - { innerHTML: content }, + { + id: "abc", + class: CLEANUP_CLASS, + }, + { + innerHTML: content, + }, ), ); - const result = selectNodesWithEq( "#abc:eq(0) > FORM:nth-of-type(1) > PRODUCT-ORDER:nth-of-type(2):shadow > *:eq(0) > BUY-NOW-BUTTON:nth-of-type(1):shadow > DIV:nth-of-type(1) > LABEL:nth-of-type(1)", ); - expect(result[0].tagName).toEqual("LABEL"); expect(result[0].textContent).toEqual("Buy Now"); }); - it("should select when chained :eq:shadow selector", () => { if (ieDetected()) { return; } - defineCustomElements(); - const content = `
    FirstButton @@ -162,24 +154,25 @@ describe("Utils::DOM::selectNodesWithShadow", () => { SecondOrder
    `; - appendNode( document.body, createNode( "DIV", - { id: "abc", class: CLEANUP_CLASS }, - { innerHTML: content }, + { + id: "abc", + class: CLEANUP_CLASS, + }, + { + innerHTML: content, + }, ), ); - const result = selectNodesWithEq( "#abc:eq(0) > FORM:nth-of-type(1) > PRODUCT-ORDER:eq(1):shadow > *:eq(0) > BUY-NOW-BUTTON:eq(0):shadow > DIV:nth-of-type(1) > LABEL:nth-of-type(1)", ); - expect(result[0].tagName).toEqual("LABEL"); expect(result[0].textContent).toEqual("Buy Now"); }); - it("should respect child selectors", () => { const content = `
    @@ -189,17 +182,18 @@ describe("Utils::DOM::selectNodesWithShadow", () => {
    `; - const node = createNode( "DIV", - { id: "target", class: CLEANUP_CLASS }, - { innerHTML: content }, + { + id: "target", + class: CLEANUP_CLASS, + }, + { + innerHTML: content, + }, ); - appendNode(document.body, node); - const result = selectNodesWithEq("#target > div:eq(0) > span"); - expect(result[0].tagName).toEqual("SPAN"); expect(result[0].id).toEqual("right"); }); diff --git a/test/unit/specs/utils/event.spec.js b/test/unit/specs/utils/event.spec.js index 17c9bec38..05980b441 100644 --- a/test/unit/specs/utils/event.spec.js +++ b/test/unit/specs/utils/event.spec.js @@ -10,16 +10,18 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import { mergeDecisionsMeta, mergeQuery } from "../../../../src/utils/event.js"; import { PropositionEventType } from "../../../../src/constants/propositionEventType.js"; describe("Utils::event", () => { let event; - beforeEach(() => { - event = jasmine.createSpyObj("event", ["mergeXdm", "mergeQuery"]); + event = { + mergeXdm: vi.fn(), + mergeQuery: vi.fn(), + }; }); - describe("mergeDecisionsMeta", () => { it("merges decisions meta", () => { const decisionsMeta = [ @@ -54,7 +56,6 @@ describe("Utils::event", () => { }); }); }); - describe("mergeQuery", () => { it("merges query details", () => { const details = { diff --git a/test/unit/specs/utils/filterObject.spec.js b/test/unit/specs/utils/filterObject.spec.js index c67bf89f1..6bd7c7572 100644 --- a/test/unit/specs/utils/filterObject.spec.js +++ b/test/unit/specs/utils/filterObject.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { filterObject } from "../../../../src/utils/index.js"; describe("utils:filterObject", () => { @@ -19,25 +20,44 @@ describe("utils:filterObject", () => { b: 6, }; const predicate = (val) => val > 5; - expect(filterObject(obj, predicate)).toEqual({ b: 6 }); + expect(filterObject(obj, predicate)).toEqual({ + b: 6, + }); }); - it("should filter out nested keys with values that do not pass the predicate", () => { const obj = { a: 5, - b: { c: 6 }, + b: { + c: 6, + }, }; const predicate = (val) => val > 5; - expect(filterObject(obj, predicate)).toEqual({ b: { c: 6 } }); + expect(filterObject(obj, predicate)).toEqual({ + b: { + c: 6, + }, + }); }); - it("should filter out deeply nested keys with values that do not pass the predicate", () => { const obj = { a: 5, - b: { c: { d: 4, e: 6 } }, - f: { g: 4 }, + b: { + c: { + d: 4, + e: 6, + }, + }, + f: { + g: 4, + }, }; const predicate = (val) => val > 5; - expect(filterObject(obj, predicate)).toEqual({ b: { c: { e: 6 } } }); + expect(filterObject(obj, predicate)).toEqual({ + b: { + c: { + e: 6, + }, + }, + }); }); }); diff --git a/test/unit/specs/utils/fireImage.spec.js b/test/unit/specs/utils/fireImage.spec.js deleted file mode 100644 index 7aecea8ff..000000000 --- a/test/unit/specs/utils/fireImage.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -/* -Copyright 2019 Adobe. All rights reserved. -This file is licensed to you 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 REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ - -// eslint-disable-next-line no-unused-vars -import fireImage from "../../../../src/utils/fireImage.js"; diff --git a/test/unit/specs/utils/flattenArray.spec.js b/test/unit/specs/utils/flattenArray.spec.js index 845172940..2311e2112 100644 --- a/test/unit/specs/utils/flattenArray.spec.js +++ b/test/unit/specs/utils/flattenArray.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import flattenArray from "../../../../src/utils/flattenArray.js"; describe("flattenArray", () => { @@ -66,8 +67,13 @@ describe("flattenArray", () => { "z", ]); }); - it("handles non arrays", () => { - expect(flattenArray({ wat: true })).toEqual({ wat: true }); + expect( + flattenArray({ + wat: true, + }), + ).toEqual({ + wat: true, + }); }); }); diff --git a/test/unit/specs/utils/flattenObject.spec.js b/test/unit/specs/utils/flattenObject.spec.js index 1388d2f6d..a3ab6f54a 100644 --- a/test/unit/specs/utils/flattenObject.spec.js +++ b/test/unit/specs/utils/flattenObject.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import flattenObject from "../../../../src/utils/flattenObject.js"; describe("flattenObject", () => { @@ -47,7 +48,6 @@ describe("flattenObject", () => { "data.moo": "woof", }); }); - it("flattens nested arrays", () => { expect( flattenObject({ @@ -101,15 +101,12 @@ describe("flattenObject", () => { "c.tres.value": "yeah ok", }); }); - it("handles non-objects", () => { expect(flattenObject(true)).toEqual(true); expect(flattenObject([1, 2, 3])).toEqual([1, 2, 3]); expect(flattenObject("hello")).toEqual("hello"); - let obj = new Set(); expect(obj).toEqual(obj); - obj = () => undefined; expect(flattenObject(obj)).toEqual(obj); }); diff --git a/test/unit/specs/utils/getApexDomain.spec.js b/test/unit/specs/utils/getApexDomain.spec.js index a8aac21e8..ba90bb0eb 100644 --- a/test/unit/specs/utils/getApexDomain.spec.js +++ b/test/unit/specs/utils/getApexDomain.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import getApexDomain from "../../../../src/utils/getApexDomain.js"; const mockWindowWithHostname = (hostname) => { @@ -19,7 +20,6 @@ const mockWindowWithHostname = (hostname) => { }, }; }; - describe("getTld", () => { it("returns an empty string when only one host part exists", () => { const window = mockWindowWithHostname("localhost"); @@ -30,7 +30,6 @@ describe("getTld", () => { }; expect(getApexDomain(window, cookieJar)).toBe(""); }); - it("returns the first host that allows a cookie to be set", () => { const window = mockWindowWithHostname("a.b.c.co.uk"); let storedValue; @@ -43,13 +42,11 @@ describe("getTld", () => { storedValue = value; } }, - remove: jasmine.createSpy(), + remove: vi.fn(), }; - expect(getApexDomain(window, cookieJar)).toBe("c.co.uk"); expect(cookieJar.remove).toHaveBeenCalled(); }); - it("tries all segments of the hostname if necessary", () => { const window = mockWindowWithHostname("10.30.34.68"); let storedValue; @@ -62,9 +59,8 @@ describe("getTld", () => { storedValue = value; } }, - remove: jasmine.createSpy(), + remove: vi.fn(), }; - expect(getApexDomain(window, cookieJar)).toBe("10.30.34.68"); expect(cookieJar.remove).toHaveBeenCalled(); }); diff --git a/test/unit/specs/utils/getLastArrayItems.spec.js b/test/unit/specs/utils/getLastArrayItems.spec.js index 82eff1393..0c9f752fb 100644 --- a/test/unit/specs/utils/getLastArrayItems.spec.js +++ b/test/unit/specs/utils/getLastArrayItems.spec.js @@ -10,15 +10,14 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import getLastArrayItems from "../../../../src/utils/getLastArrayItems.js"; describe("getLastArrayItems", () => { const letters = ["a", "b", "c"]; - it("returns last items from array larger than count", () => { expect(getLastArrayItems(letters, 2)).toEqual(["b", "c"]); }); - it("returns all items from array smaller than or equal to count", () => { expect(getLastArrayItems(letters, 10)).toEqual(["a", "b", "c"]); expect(getLastArrayItems(letters, 3)).toEqual(["a", "b", "c"]); diff --git a/test/unit/specs/utils/getNamespacedCookieName.spec.js b/test/unit/specs/utils/getNamespacedCookieName.spec.js index 5185f1d99..9aa5e844a 100644 --- a/test/unit/specs/utils/getNamespacedCookieName.spec.js +++ b/test/unit/specs/utils/getNamespacedCookieName.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import getNamespacedCookieName from "../../../../src/utils/getNamespacedCookieName.js"; describe("getNamespacedCookieName", () => { diff --git a/test/unit/specs/utils/getNamespacedStorage.spec.js b/test/unit/specs/utils/getNamespacedStorage.spec.js index c1627d523..a170cbeae 100644 --- a/test/unit/specs/utils/getNamespacedStorage.spec.js +++ b/test/unit/specs/utils/getNamespacedStorage.spec.js @@ -10,11 +10,11 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import injectStorage from "../../../../src/utils/injectStorage.js"; const getNamespacedStorage = injectStorage(window); const storage = getNamespacedStorage("namespace"); - describe("getNamespacedStorage", () => { it("is able to write and read from session storage", () => { storage.session.setItem("test", "session-storage"); diff --git a/test/unit/specs/utils/groupBy.spec.js b/test/unit/specs/utils/groupBy.spec.js index 2f953537b..116567edf 100644 --- a/test/unit/specs/utils/groupBy.spec.js +++ b/test/unit/specs/utils/groupBy.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import groupBy from "../../../../src/utils/groupBy.js"; describe("groupBy", () => { @@ -17,42 +18,84 @@ describe("groupBy", () => { const array = []; expect(groupBy(array, null)).toEqual({}); }); - it("expects to group by key getter provided", () => { const array = [ - { id: 1, name: "Foo" }, - { id: 2, name: "Foo2" }, - { id: 2, name: "Foo3" }, + { + id: 1, + name: "Foo", + }, + { + id: 2, + name: "Foo2", + }, + { + id: 2, + name: "Foo3", + }, ]; - const map = { - 1: [{ id: 1, name: "Foo" }], + 1: [ + { + id: 1, + name: "Foo", + }, + ], 2: [ - { id: 2, name: "Foo2" }, - { id: 2, name: "Foo3" }, + { + id: 2, + name: "Foo2", + }, + { + id: 2, + name: "Foo3", + }, ], }; - expect(groupBy(array, (item) => item.id || "default")).toEqual(map); }); - it("expects to group by key getter provided or to the default key", () => { const array = [ - { id: 1, name: "Foo" }, - { id: 2, name: "Foo2" }, - { id: 2, name: "Foo3" }, - { noId: 2, name: "Foo3" }, + { + id: 1, + name: "Foo", + }, + { + id: 2, + name: "Foo2", + }, + { + id: 2, + name: "Foo3", + }, + { + noId: 2, + name: "Foo3", + }, ]; - const map = { - 1: [{ id: 1, name: "Foo" }], + 1: [ + { + id: 1, + name: "Foo", + }, + ], 2: [ - { id: 2, name: "Foo2" }, - { id: 2, name: "Foo3" }, + { + id: 2, + name: "Foo2", + }, + { + id: 2, + name: "Foo3", + }, + ], + default: [ + { + noId: 2, + name: "Foo3", + }, ], - default: [{ noId: 2, name: "Foo3" }], }; - expect(groupBy(array, (item) => item.id || "default")).toEqual(map); }); }); diff --git a/test/unit/specs/utils/injectAreThirdPartyCookiesSupportedByDefault.spec.js b/test/unit/specs/utils/injectAreThirdPartyCookiesSupportedByDefault.spec.js index f688d4075..8a1eb15ab 100644 --- a/test/unit/specs/utils/injectAreThirdPartyCookiesSupportedByDefault.spec.js +++ b/test/unit/specs/utils/injectAreThirdPartyCookiesSupportedByDefault.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectAreThirdPartyCookiesSupportedByDefault from "../../../../src/utils/injectAreThirdPartyCookiesSupportedByDefault.js"; import { CHROME, @@ -23,28 +24,26 @@ import { const browsersWithSupport = [CHROME, EDGE, EDGE_CHROMIUM, IE, UNKNOWN]; const browsersWithoutSupport = [FIREFOX, SAFARI]; - describe("areThirdPartyCookiesSupportedByDefault", () => { let getBrowser; let areThirdPartyCookiesSupportedByDefault; - beforeEach(() => { - getBrowser = jasmine.createSpy(); + getBrowser = vi.fn(); areThirdPartyCookiesSupportedByDefault = - injectAreThirdPartyCookiesSupportedByDefault({ getBrowser }); + injectAreThirdPartyCookiesSupportedByDefault({ + getBrowser, + }); }); - browsersWithSupport.forEach((browser) => { it(`reports true for ${browser}`, () => { - getBrowser.and.returnValue(browser); - expect(areThirdPartyCookiesSupportedByDefault()).toBeTrue(); + getBrowser.mockReturnValue(browser); + expect(areThirdPartyCookiesSupportedByDefault()).toBe(true); }); }); - browsersWithoutSupport.forEach((browser) => { it(`reports false for ${browser}`, () => { - getBrowser.and.returnValue(browser); - expect(areThirdPartyCookiesSupportedByDefault()).toBeFalse(); + getBrowser.mockReturnValue(browser); + expect(areThirdPartyCookiesSupportedByDefault()).toBe(false); }); }); }); diff --git a/test/unit/specs/utils/injectDoesIdentityCookieExist.spec.js b/test/unit/specs/utils/injectDoesIdentityCookieExist.spec.js index 0a72f2b85..4b1ff6d94 100644 --- a/test/unit/specs/utils/injectDoesIdentityCookieExist.spec.js +++ b/test/unit/specs/utils/injectDoesIdentityCookieExist.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { beforeEach, afterEach, describe, it, expect } from "vitest"; import { injectDoesIdentityCookieExist, cookieJar, @@ -19,19 +20,17 @@ import removeAllCookies from "../../helpers/removeAllCookies.js"; describe("Identity::injectDoesIdentityCookieExist", () => { beforeEach(removeAllCookies); afterEach(removeAllCookies); - it("returns false if cookie does not exist", () => { const doesIdentityCookieExist = injectDoesIdentityCookieExist({ orgId: "org@adobe", }); - expect(doesIdentityCookieExist()).toBeFalse(); + expect(doesIdentityCookieExist()).toBe(false); }); - it("returns true if cookie exists", () => { cookieJar.set("kndctr_org_adobe_identity", "user@adobe"); const doesIdentityCookieExist = injectDoesIdentityCookieExist({ orgId: "org@adobe", }); - expect(doesIdentityCookieExist()).toBeTrue(); + expect(doesIdentityCookieExist()).toBe(true); }); }); diff --git a/test/unit/specs/utils/injectFireReferrerHideableImage.spec.js b/test/unit/specs/utils/injectFireReferrerHideableImage.spec.js index e1df08f81..91ee993cc 100644 --- a/test/unit/specs/utils/injectFireReferrerHideableImage.spec.js +++ b/test/unit/specs/utils/injectFireReferrerHideableImage.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import injectFireReferrerHideableImage from "../../../../src/utils/injectFireReferrerHideableImage.js"; describe("injectFireReferrerHideableImage", () => { @@ -18,20 +19,21 @@ describe("injectFireReferrerHideableImage", () => { let createNodeMock; let fireImageMock; let fireReferrerHideableImage; - beforeEach(() => { - appendNodeMock = jasmine - .createSpy("appendNode") - .and.callFake(() => ({ contentWindow: { document: {} } })); - awaitSelectorMock = jasmine - .createSpy("awaitSelector") - .and.callFake(() => Promise.resolve(["body"])); - createNodeMock = jasmine - .createSpy("createNode") - .and.callFake(() => ({ contentWindow: { document: {} } })); - fireImageMock = jasmine - .createSpy("fireImage") - .and.callFake(() => Promise.resolve()); + appendNodeMock = vi.fn().mockImplementation(() => ({ + contentWindow: { + document: {}, + }, + })); + awaitSelectorMock = vi + .fn() + .mockImplementation(() => Promise.resolve(["body"])); + createNodeMock = vi.fn().mockImplementation(() => ({ + contentWindow: { + document: {}, + }, + })); + fireImageMock = vi.fn().mockImplementation(() => Promise.resolve()); fireReferrerHideableImage = injectFireReferrerHideableImage({ appendNode: appendNodeMock, awaitSelector: awaitSelectorMock, @@ -39,30 +41,25 @@ describe("injectFireReferrerHideableImage", () => { fireImage: fireImageMock, }); }); - it("should create an iframe for a request that hides the referrer", async () => { const request = { hideReferrer: true, url: "https://adobe.com/test-referrer.jpg", }; await fireReferrerHideableImage(request); - expect(createNodeMock).toHaveBeenCalled(); - expect(createNodeMock.calls.argsFor(0)).toContain("IFRAME"); + expect(createNodeMock.mock.calls[0]).toContain("IFRAME"); expect(fireImageMock).toHaveBeenCalled(); }); - it("should fire the image on the page for a request that does not hide the referrer", async () => { const request = { hideReferrer: false, url: "https://adobe.com/test-referrer.jpg", }; await fireReferrerHideableImage(request); - expect(createNodeMock).not.toHaveBeenCalled(); expect(fireImageMock).toHaveBeenCalled(); }); - it("should only create one iframe when called multiple times", async () => { const request = { hideReferrer: true, @@ -72,12 +69,10 @@ describe("injectFireReferrerHideableImage", () => { hideReferrer: true, url: "https://adobe.com/test-invalid-referrer2.jpg", }; - await fireReferrerHideableImage(request); await fireReferrerHideableImage(secondRequest); - expect(createNodeMock).toHaveBeenCalledTimes(1); - expect(createNodeMock.calls.argsFor(0)).toContain("IFRAME"); + expect(createNodeMock.mock.calls[0]).toContain("IFRAME"); expect(fireImageMock).toHaveBeenCalledTimes(2); }); }); diff --git a/test/unit/specs/utils/injectGetBrowser.spec.js b/test/unit/specs/utils/injectGetBrowser.spec.js index 9de0514e5..56ddc6101 100644 --- a/test/unit/specs/utils/injectGetBrowser.spec.js +++ b/test/unit/specs/utils/injectGetBrowser.spec.js @@ -10,8 +10,8 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import injectGetBrowser from "../../../../src/utils/injectGetBrowser.js"; - import { EDGE, EDGE_CHROMIUM, @@ -49,17 +49,21 @@ const userAgentsByBrowser = { "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13 Mobile/15E148 Safari/604.1", ], [UNKNOWN]: [ - "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 OPR/43.0.2442.991", // Opera + "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 OPR/43.0.2442.991", + // Opera "Mozilla/5.0 (X11; Linux) KHTML/4.9.1 (like Gecko) Konqueror/4.9", // Konqueror ], }; - describe("getBrowser", () => { Object.keys(userAgentsByBrowser).forEach((browser) => { const userAgents = userAgentsByBrowser[browser]; userAgents.forEach((userAgent) => { it(`reports ${browser} for ${userAgent}`, () => { - expect(injectGetBrowser({ userAgent })()).toBe(browser); + expect( + injectGetBrowser({ + userAgent, + })(), + ).toBe(browser); }); }); }); diff --git a/test/unit/specs/utils/injectStorage.spec.js b/test/unit/specs/utils/injectStorage.spec.js index b28168f0b..999de3dbc 100644 --- a/test/unit/specs/utils/injectStorage.spec.js +++ b/test/unit/specs/utils/injectStorage.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import injectStorage from "../../../../src/utils/injectStorage.js"; describe("injectStorage", () => { @@ -28,7 +29,7 @@ describe("injectStorage", () => { it("sets item", () => { const window = { [windowProperty]: { - setItem: jasmine.createSpy().and.returnValue(true), + setItem: vi.fn().mockReturnValue(true), }, }; const storage = injectStorage(window)("example."); @@ -37,26 +38,26 @@ describe("injectStorage", () => { "com.adobe.alloy.example.foo", "bar", ); - expect(result).toBeTrue(); + expect(result).toBe(true); }); - it("returns false if an error occurs setting item", () => { const window = { [windowProperty]: { - setItem: jasmine.createSpy().and.throwError(), + setItem: vi.fn().mockImplementation(() => { + throw new Error(); + }), }, }; const storage = injectStorage(window)("example."); const result = storage[storageProperty].setItem("foo", "bar"); - expect(result).toBeFalse(); + expect(result).toBe(false); }); }); - describe("getItem", () => { it("gets item", () => { const window = { [windowProperty]: { - getItem: jasmine.createSpy().and.returnValue("abc"), + getItem: vi.fn().mockReturnValue("abc"), }, }; const storage = injectStorage(window)("example."); @@ -66,11 +67,12 @@ describe("injectStorage", () => { ); expect(result).toBe("abc"); }); - it("returns null if an error occurs while getting item", () => { const window = { [windowProperty]: { - getItem: jasmine.createSpy().and.throwError(), + getItem: vi.fn().mockImplementation(() => { + throw new Error(); + }), }, }; const storage = injectStorage(window)("example."); @@ -78,12 +80,11 @@ describe("injectStorage", () => { expect(result).toBeNull(); }); }); - describe("clear", () => { it("clears all with the namespace prefix", () => { const window = { [windowProperty]: { - removeItem: jasmine.createSpy(), + removeItem: vi.fn(), "com.adobe.alloy.example.a": "1", "com.adobe.alloy.example.b": "2", c: "3", diff --git a/test/unit/specs/utils/intersection.spec.js b/test/unit/specs/utils/intersection.spec.js index f7e720226..f88f77a58 100644 --- a/test/unit/specs/utils/intersection.spec.js +++ b/test/unit/specs/utils/intersection.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import intersection from "../../../../src/utils/intersection.js"; describe("intersection", () => { @@ -17,7 +18,6 @@ describe("intersection", () => { const result = intersection(["a", "b", "c", "d"], ["z", "b", "d"]); expect(result).toEqual(["b", "d"]); }); - it("returns an empty array if there are no matches", () => { const result = intersection(["a", "b", "c", "d"], ["e"]); expect(result).toEqual([]); diff --git a/test/unit/specs/utils/isBlankString.spec.js b/test/unit/specs/utils/isBlankString.spec.js index 72c256bfd..9235fe729 100644 --- a/test/unit/specs/utils/isBlankString.spec.js +++ b/test/unit/specs/utils/isBlankString.spec.js @@ -10,21 +10,19 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isBlankString from "../../../../src/utils/isBlankString.js"; describe("isBlankString", () => { it("returns true when null", () => { expect(isBlankString(null)).toBe(true); }); - it("returns true when not a string", () => { expect(isBlankString(42)).toBe(true); }); - it("returns true for a blank string", () => { expect(isBlankString("")).toBe(true); }); - it("returns false for a string", () => { expect(isBlankString("hi")).toBe(false); }); diff --git a/test/unit/specs/utils/isBoolean.spec.js b/test/unit/specs/utils/isBoolean.spec.js index d796f72d5..a5f483f7c 100644 --- a/test/unit/specs/utils/isBoolean.spec.js +++ b/test/unit/specs/utils/isBoolean.spec.js @@ -10,16 +10,15 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isBoolean from "../../../../src/utils/isBoolean.js"; const nonBooleans = [{}, [], new Date(), /abc/, "foo", 123]; - describe("isString", () => { it("returns true if the value is boolean", () => { expect(isBoolean(true)).toBe(true); expect(isBoolean(false)).toBe(true); }); - it("returns false if the value is not a boolean", () => { nonBooleans.forEach((value) => { expect(isBoolean(value)).toBe(false); diff --git a/test/unit/specs/utils/isEmptyObject.spec.js b/test/unit/specs/utils/isEmptyObject.spec.js index 439612dda..64277f717 100644 --- a/test/unit/specs/utils/isEmptyObject.spec.js +++ b/test/unit/specs/utils/isEmptyObject.spec.js @@ -10,15 +10,19 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isEmptyObject from "../../../../src/utils/isEmptyObject.js"; -const nonEmptyObjects = ["abc", { a: 123 }]; - +const nonEmptyObjects = [ + "abc", + { + a: 123, + }, +]; describe("isEmptyObject", () => { it("returns true if the value is an empty object", () => { expect(isEmptyObject({})).toBe(true); }); - it("returns false if the value is not an empty object", () => { nonEmptyObjects.forEach((obj) => { expect(isEmptyObject(obj)).toBe(false); diff --git a/test/unit/specs/utils/isFunction.spec.js b/test/unit/specs/utils/isFunction.spec.js index 526ae0f76..b8312b8c6 100644 --- a/test/unit/specs/utils/isFunction.spec.js +++ b/test/unit/specs/utils/isFunction.spec.js @@ -10,15 +10,14 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isFunction from "../../../../src/utils/isFunction.js"; const nonFunctions = [{}, [], new Date(), /abc/, true, false, "text", 123]; - describe("isFunction", () => { it("returns true if the value is a function", () => { expect(isFunction(() => {})).toBe(true); }); - it("returns false if the value is not a function", () => { nonFunctions.forEach((nonFunction) => { expect(isFunction(nonFunction)).toBe(false); diff --git a/test/unit/specs/utils/isInteger.spec.js b/test/unit/specs/utils/isInteger.spec.js index d0a28c0a8..8239c3c94 100644 --- a/test/unit/specs/utils/isInteger.spec.js +++ b/test/unit/specs/utils/isInteger.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isInteger from "../../../../src/utils/isInteger.js"; describe("isInteger", () => { diff --git a/test/unit/specs/utils/isNamespacedCookieName.spec.js b/test/unit/specs/utils/isNamespacedCookieName.spec.js index ce893ea5b..8debf7d7e 100644 --- a/test/unit/specs/utils/isNamespacedCookieName.spec.js +++ b/test/unit/specs/utils/isNamespacedCookieName.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isNamespacedCookieName from "../../../../src/utils/isNamespacedCookieName.js"; describe("isNamespacedCookieName", () => { @@ -18,14 +19,13 @@ describe("isNamespacedCookieName", () => { "ABC@CustomOrg", "kndctr_ABC_CustomOrg_foo", ); - expect(result).toBeTrue(); + expect(result).toBe(true); }); - it("returns false if it's not a namespaced cookie name", () => { const result = isNamespacedCookieName( "kndctr_DEF_CustomOrg_foo", "ABC@CustomOrg", ); - expect(result).toBeFalse(); + expect(result).toBe(false); }); }); diff --git a/test/unit/specs/utils/isNil.spec.js b/test/unit/specs/utils/isNil.spec.js index cbf2de7cc..60c0ec25b 100644 --- a/test/unit/specs/utils/isNil.spec.js +++ b/test/unit/specs/utils/isNil.spec.js @@ -10,17 +10,16 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isNil from "../../../../src/utils/isNil.js"; describe("isNil", () => { it("returns true when null", () => { expect(isNil(null)).toBe(true); }); - it("returns true when undefined", () => { expect(isNil(undefined)).toBe(true); }); - it("returns false when value", () => { expect(isNil(1)).toBe(false); expect(isNil({})).toBe(false); diff --git a/test/unit/specs/utils/isNonEmptyArray.spec.js b/test/unit/specs/utils/isNonEmptyArray.spec.js index 45e644bf9..121ff5dda 100644 --- a/test/unit/specs/utils/isNonEmptyArray.spec.js +++ b/test/unit/specs/utils/isNonEmptyArray.spec.js @@ -10,22 +10,20 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isNonEmptyArray from "../../../../src/utils/isNonEmptyArray.js"; describe("isNonEmptyArray", () => { it("returns true when array with values", () => { expect(isNonEmptyArray([1, 2, 3])).toBe(true); }); - it("returns false when array is empty", () => { expect(isNonEmptyArray([])).toBe(false); }); - it("returns false when undefined or null", () => { expect(isNonEmptyArray(undefined)).toBe(false); expect(isNonEmptyArray(null)).toBe(false); }); - it("returns false when non array", () => { expect(isNonEmptyArray("123")).toBe(false); }); diff --git a/test/unit/specs/utils/isNonEmptyString.spec.js b/test/unit/specs/utils/isNonEmptyString.spec.js index 2da0f25c3..a79cec5e3 100644 --- a/test/unit/specs/utils/isNonEmptyString.spec.js +++ b/test/unit/specs/utils/isNonEmptyString.spec.js @@ -10,17 +10,16 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isNonEmptyString from "../../../../src/utils/isNonEmptyString.js"; describe("isNonEmptyString", () => { it("returns true when string", () => { expect(isNonEmptyString("1234")).toBe(true); }); - it("returns false when empty string", () => { expect(isNonEmptyString("")).toBe(false); }); - it("returns false when undefined string", () => { expect(isNonEmptyString(undefined)).toBe(false); }); diff --git a/test/unit/specs/utils/isNumber.spec.js b/test/unit/specs/utils/isNumber.spec.js index a3faa3a22..f739a5fdd 100644 --- a/test/unit/specs/utils/isNumber.spec.js +++ b/test/unit/specs/utils/isNumber.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isNumber from "../../../../src/utils/isNumber.js"; describe("isNumber", () => { diff --git a/test/unit/specs/utils/isObject.spec.js b/test/unit/specs/utils/isObject.spec.js index 9bae50a9d..3e9f040da 100644 --- a/test/unit/specs/utils/isObject.spec.js +++ b/test/unit/specs/utils/isObject.spec.js @@ -10,15 +10,14 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isObject from "../../../../src/utils/isObject.js"; const nonObjects = [[], true, false, 123]; - describe("isObject", () => { it("returns true if the value is an object", () => { expect(isObject({})).toBe(true); }); - it("returns false if the value is not an object", () => { nonObjects.forEach((obj) => { expect(isObject(obj)).toBe(false); diff --git a/test/unit/specs/utils/isString.spec.js b/test/unit/specs/utils/isString.spec.js index df84bb329..08455bb02 100644 --- a/test/unit/specs/utils/isString.spec.js +++ b/test/unit/specs/utils/isString.spec.js @@ -10,15 +10,14 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isString from "../../../../src/utils/isString.js"; const nonStrings = [{}, [], new Date(), /abc/, true, false, 123]; - describe("isString", () => { it("returns true if the value is a string", () => { expect(isString("123")).toBe(true); }); - it("returns false if the value is not a string", () => { nonStrings.forEach((str) => { expect(isString(str)).toBe(false); diff --git a/test/unit/specs/utils/isUnique.spec.js b/test/unit/specs/utils/isUnique.spec.js index 2cf9e193d..3cc0f2959 100644 --- a/test/unit/specs/utils/isUnique.spec.js +++ b/test/unit/specs/utils/isUnique.spec.js @@ -10,13 +10,13 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isUnique from "../../../../src/utils/isUnique.js"; describe("isUnique", () => { it("returns true if array values are unique", () => { expect(isUnique(["item1", "item2", "item3"])).toBe(true); }); - it("returns false if array contains duplicate values", () => { expect(isUnique(["item1", "item1", "item3"])).toBe(false); }); diff --git a/test/unit/specs/utils/isValidRegExp.spec.js b/test/unit/specs/utils/isValidRegExp.spec.js index 2e60cf672..a857e03db 100644 --- a/test/unit/specs/utils/isValidRegExp.spec.js +++ b/test/unit/specs/utils/isValidRegExp.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import isValidRegExp from "../../../../src/utils/isValidRegExp.js"; describe("isValidRegExp", () => { diff --git a/test/unit/specs/utils/lazy.spec.js b/test/unit/specs/utils/lazy.spec.js index 558f40d87..3917eabb6 100644 --- a/test/unit/specs/utils/lazy.spec.js +++ b/test/unit/specs/utils/lazy.spec.js @@ -10,43 +10,38 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import lazy from "../../../../src/utils/lazy.js"; describe("lazy", () => { let factory; let getter; beforeEach(() => { - factory = jasmine.createSpy("factory"); - factory.and.returnValue("result"); + factory = vi.fn(); + factory.mockReturnValue("result"); getter = lazy(factory); }); - it("doesn't call the factory function before the first time the getter is called", () => { expect(factory).not.toHaveBeenCalled(); }); - it("calls the factory function the first time the getter is called", () => { getter(); expect(factory).toHaveBeenCalledTimes(1); }); - it("doesn't call the factory function the second time the getter is called", () => { getter(); getter(); expect(factory).toHaveBeenCalledTimes(1); }); - it("returns the result of the factory function", () => { expect(getter()).toBe("result"); }); - it("returns the same result the second time the getter is called", () => { const result = getter(); expect(getter()).toBe(result); }); - it("handles factory functions that return undefined", () => { - factory.and.returnValue(undefined); + factory.mockReturnValue(undefined); getter(); expect(getter()).toBeUndefined(); expect(factory).toHaveBeenCalledTimes(1); diff --git a/test/unit/specs/utils/noop.spec.js b/test/unit/specs/utils/noop.spec.js index 1d27ac3ba..a24d2b6ad 100644 --- a/test/unit/specs/utils/noop.spec.js +++ b/test/unit/specs/utils/noop.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import noop from "../../../../src/utils/noop.js"; describe("noop", () => { diff --git a/test/unit/specs/utils/parseUrl.spec.js b/test/unit/specs/utils/parseUrl.spec.js index 75e679543..2398cec25 100644 --- a/test/unit/specs/utils/parseUrl.spec.js +++ b/test/unit/specs/utils/parseUrl.spec.js @@ -9,12 +9,12 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import parseUrl from "../../../../src/utils/parseUrl.js"; describe("parseUrl", () => { it("should parse a valid URL with all components", () => { const url = "https://example.com/path/to/page?param=value#section"; - const result = parseUrl(url); expect(result.path).toBe("/path/to/page"); expect(result.query).toBe("param=value"); @@ -23,12 +23,9 @@ describe("parseUrl", () => { expect(result.subdomain).toBe(""); expect(result.topLevelDomain).toBe("com"); }); - it("should handle URL without subdomain", () => { const url = "https://example.com"; - const result = parseUrl(url); - expect(result.path).toBe(""); expect(result.query).toBe(""); expect(result.fragment).toBe(""); @@ -36,10 +33,8 @@ describe("parseUrl", () => { expect(result.subdomain).toBe(""); expect(result.topLevelDomain).toBe("com"); }); - it("should handle empty URL and return default values", () => { const url = ""; - const result = parseUrl(url); expect(result.path).toBe(""); expect(result.query).toBe(""); @@ -48,10 +43,8 @@ describe("parseUrl", () => { expect(result.subdomain).toBe(""); expect(result.topLevelDomain).toBe(""); }); - it("should handle URL with subdomain", () => { const url = "https://www.example.com"; - const result = parseUrl(url); expect(result.path).toBe(""); expect(result.query).toBe(""); diff --git a/test/unit/specs/utils/prepareConfigOverridesForEdge.spec.js b/test/unit/specs/utils/prepareConfigOverridesForEdge.spec.js index a61bc31f2..59b0b38a8 100644 --- a/test/unit/specs/utils/prepareConfigOverridesForEdge.spec.js +++ b/test/unit/specs/utils/prepareConfigOverridesForEdge.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { prepareConfigOverridesForEdge } from "../../../../src/utils/index.js"; describe("utils:prepareConfigOverridesForEdge", () => { @@ -18,8 +19,12 @@ describe("utils:prepareConfigOverridesForEdge", () => { prepareConfigOverridesForEdge({ com_adobe_experience_platform: { datasets: { - event: { datasetId: "werewr" }, - profile: { datasetId: "" }, + event: { + datasetId: "werewr", + }, + profile: { + datasetId: "", + }, }, enabled: false, }, @@ -36,7 +41,9 @@ describe("utils:prepareConfigOverridesForEdge", () => { ).toEqual({ com_adobe_experience_platform: { datasets: { - event: { datasetId: "werewr" }, + event: { + datasetId: "werewr", + }, }, enabled: false, }, @@ -46,14 +53,17 @@ describe("utils:prepareConfigOverridesForEdge", () => { }, }); }); - it("should return null for empty config objects", () => { expect( prepareConfigOverridesForEdge({ com_adobe_experience_platform: { datasets: { - event: { datasetId: "" }, - profile: { datasetId: "" }, + event: { + datasetId: "", + }, + profile: { + datasetId: "", + }, }, }, com_adobe_analytics: { diff --git a/test/unit/specs/utils/querystring.spec.js b/test/unit/specs/utils/querystring.spec.js deleted file mode 100644 index 0ff717eb9..000000000 --- a/test/unit/specs/utils/querystring.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -/* -Copyright 2019 Adobe. All rights reserved. -This file is licensed to you 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 REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ - -// eslint-disable-next-line no-unused-vars -import querystring from "../../../../src/utils/querystring.js"; diff --git a/test/unit/specs/utils/request/createAddIdentity.spec.js b/test/unit/specs/utils/request/createAddIdentity.spec.js index 6b761ad68..cfa56435e 100644 --- a/test/unit/specs/utils/request/createAddIdentity.spec.js +++ b/test/unit/specs/utils/request/createAddIdentity.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { createAddIdentity } from "../../../../../src/utils/request/index.js"; describe("createAddIdentity", () => { diff --git a/test/unit/specs/utils/request/createDataCollectionRequest.spec.js b/test/unit/specs/utils/request/createDataCollectionRequest.spec.js index 077eccd4c..a25e770cb 100644 --- a/test/unit/specs/utils/request/createDataCollectionRequest.spec.js +++ b/test/unit/specs/utils/request/createDataCollectionRequest.spec.js @@ -10,58 +10,62 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { createDataCollectionRequest } from "../../../../../src/utils/request/index.js"; import describeRequest from "../../../helpers/describeRequest.js"; describe("createDataCollectionRequest", () => { describeRequest(createDataCollectionRequest); - it("uses collect with sendBeacon if document may unload and identity is established", () => { const payload = { getDocumentMayUnload() { return true; }, }; - const request = createDataCollectionRequest({ payload }); + const request = createDataCollectionRequest({ + payload, + }); request.setIsIdentityEstablished(); expect(request.getAction()).toBe("collect"); - expect(request.getUseSendBeacon()).toBeTrue(); + expect(request.getUseSendBeacon()).toBe(true); }); - it("uses interact without sendBeacon if document may unload but identity has not been established", () => { const payload = { getDocumentMayUnload() { return true; }, }; - const request = createDataCollectionRequest({ payload }); + const request = createDataCollectionRequest({ + payload, + }); expect(request.getAction()).toBe("interact"); - expect(request.getUseSendBeacon()).toBeFalse(); + expect(request.getUseSendBeacon()).toBe(false); }); - it("uses interact without sendBeacon if identity has been established but document will not unload", () => { const payload = { getDocumentMayUnload() { return false; }, }; - const request = createDataCollectionRequest({ payload }); + const request = createDataCollectionRequest({ + payload, + }); request.setIsIdentityEstablished(); expect(request.getAction()).toBe("interact"); - expect(request.getUseSendBeacon()).toBeFalse(); + expect(request.getUseSendBeacon()).toBe(false); }); - it("uses interact without sendBeacon if document will not unload and identity has not been established", () => { const payload = { getDocumentMayUnload() { return false; }, }; - const request = createDataCollectionRequest({ payload }); + const request = createDataCollectionRequest({ + payload, + }); expect(request.getAction()).toBe("interact"); - expect(request.getUseSendBeacon()).toBeFalse(); + expect(request.getUseSendBeacon()).toBe(false); }); - it("passes the datastreamIdOverride to the request", () => { const payload = {}; const datastreamIdOverride = "my-edge-config-id-override"; diff --git a/test/unit/specs/utils/request/createDataCollectionRequestPayload.spec.js b/test/unit/specs/utils/request/createDataCollectionRequestPayload.spec.js index 8a47dea64..7627c6645 100644 --- a/test/unit/specs/utils/request/createDataCollectionRequestPayload.spec.js +++ b/test/unit/specs/utils/request/createDataCollectionRequestPayload.spec.js @@ -10,13 +10,13 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { createDataCollectionRequestPayload } from "../../../../../src/utils/request/index.js"; import createEvent from "../../../../../src/core/createEvent.js"; import describeRequestPayload from "../../../helpers/describeRequestPayload.js"; describe("createDataCollectionRequestPayload", () => { describeRequestPayload(createDataCollectionRequestPayload); - it("adds an identity", () => { const payload = createDataCollectionRequestPayload(); payload.addIdentity("IDNS", { @@ -40,16 +40,33 @@ describe("createDataCollectionRequestPayload", () => { }, }); }); - it("adds events and serializes them properly", () => { const payload = createDataCollectionRequestPayload(); - payload.addEvent({ xdm: { a: "b" } }); - payload.addEvent({ xdm: { c: "d" } }); + payload.addEvent({ + xdm: { + a: "b", + }, + }); + payload.addEvent({ + xdm: { + c: "d", + }, + }); expect(JSON.parse(JSON.stringify(payload))).toEqual({ - events: [{ xdm: { a: "b" } }, { xdm: { c: "d" } }], + events: [ + { + xdm: { + a: "b", + }, + }, + { + xdm: { + c: "d", + }, + }, + ], }); }); - it("returns that document may unload if any event reports that it may unload", () => { const payload = createDataCollectionRequestPayload(); const event1 = createEvent(); @@ -57,20 +74,18 @@ describe("createDataCollectionRequestPayload", () => { const event2 = createEvent(); event2.documentMayUnload(); payload.addEvent(event2); - expect(payload.getDocumentMayUnload()).toBeTrue(); + expect(payload.getDocumentMayUnload()).toBe(true); }); - it("returns that document will not unload if no event reports that it may unload", () => { const payload = createDataCollectionRequestPayload(); const event1 = createEvent(); payload.addEvent(event1); const event2 = createEvent(); payload.addEvent(event2); - expect(payload.getDocumentMayUnload()).toBeFalse(); + expect(payload.getDocumentMayUnload()).toBe(false); }); - it("returns that document will not unload if the payload contains no events", () => { const payload = createDataCollectionRequestPayload(); - expect(payload.getDocumentMayUnload()).toBeFalse(); + expect(payload.getDocumentMayUnload()).toBe(false); }); }); diff --git a/test/unit/specs/utils/request/createGetAssuranceValidationTokenParams.spec.js b/test/unit/specs/utils/request/createGetAssuranceValidationTokenParams.spec.js index af906f33c..eddf483e9 100644 --- a/test/unit/specs/utils/request/createGetAssuranceValidationTokenParams.spec.js +++ b/test/unit/specs/utils/request/createGetAssuranceValidationTokenParams.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { createGetAssuranceValidationTokenParams } from "../../../../../src/utils/request/index.js"; import { injectStorage } from "../../../../../src/utils/index.js"; import uuidV4Regex from "../../../constants/uuidV4Regex.js"; @@ -20,7 +21,6 @@ const win = { }, localStorage: window.localStorage, }; - describe("createGetAssuranceValidationTokenParams", () => { it("gets validation token params", () => { let result; @@ -33,34 +33,29 @@ describe("createGetAssuranceValidationTokenParams", () => { createNamespacedStorage: injectStorage(win), }); expect(getAssuranceValidationTokenParams()).toEqual(""); - win.location.search = "?adb_validation_sessionid=abc-123"; result = getAssuranceValidationTokenParams(); // eslint-disable-next-line prefer-const [token, firstClientId] = result.split("%7C"); expect(token).toEqual("&adobeAepValidationToken=abc-123"); - expect(uuidV4Regex.test(firstClientId)).toBeTrue(); + expect(uuidV4Regex.test(firstClientId)).toBe(true); expect( win.localStorage.getItem("com.adobe.alloy.validation.clientId"), ).toEqual(firstClientId); - win.location.search = "?adb_validation_sessionid=abc-123%20fgh"; result = getAssuranceValidationTokenParams(); [token, clientId] = result.split("%7C"); expect(token).toEqual("&adobeAepValidationToken=abc-123%20fgh"); expect(clientId).toEqual(firstClientId); - win.location.search = "?lang=en&sort=relevancy&f:el_product=[Data%20Collection]&adb_validation_sessionid=abc-123"; result = getAssuranceValidationTokenParams(); [token, clientId] = result.split("%7C"); expect(token).toEqual("&adobeAepValidationToken=abc-123"); expect(clientId).toEqual(firstClientId); - win.location.search = "?lang=en&sort=relevancy&f:el_product=[Data%20Collection]"; expect(getAssuranceValidationTokenParams()).toEqual(""); - win.location.search = "?adb_validation_sessionid="; expect(getAssuranceValidationTokenParams()).toEqual(""); }); diff --git a/test/unit/specs/utils/request/createHasIdentity.spec.js b/test/unit/specs/utils/request/createHasIdentity.spec.js index 87b54951c..2c4cbb590 100644 --- a/test/unit/specs/utils/request/createHasIdentity.spec.js +++ b/test/unit/specs/utils/request/createHasIdentity.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { beforeEach, describe, it, expect } from "vitest"; import { createHasIdentity, createAddIdentity, @@ -18,13 +19,11 @@ describe("createHasIdentity", () => { let content; let hasIdentity; let addIdentity; - beforeEach(() => { content = {}; hasIdentity = createHasIdentity(content); addIdentity = createAddIdentity(content); }); - it("should return false when no xdm has been set", () => { expect(hasIdentity("myid")).toBe(false); }); diff --git a/test/unit/specs/utils/request/createRequest.spec.js b/test/unit/specs/utils/request/createRequest.spec.js deleted file mode 100644 index 469602d80..000000000 --- a/test/unit/specs/utils/request/createRequest.spec.js +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2020 Adobe. All rights reserved. -This file is licensed to you 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 REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ - -// eslint-disable-next-line no-unused-vars -import { createRequest } from "../../../../../src/utils/request/index.js"; - -// This module is tested thoroughly through the different types of requests -// that leverage this module. diff --git a/test/unit/specs/utils/request/createRequestParams.spec.js b/test/unit/specs/utils/request/createRequestParams.spec.js index 156a07620..63fdba73a 100644 --- a/test/unit/specs/utils/request/createRequestParams.spec.js +++ b/test/unit/specs/utils/request/createRequestParams.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, beforeEach, describe, it, expect } from "vitest"; import { createRequestParams } from "../../../../../src/utils/request/index.js"; describe("createRequestParams", () => { @@ -16,9 +17,10 @@ describe("createRequestParams", () => { let globalConfigOverrides; let localConfigOverrides; beforeEach(() => { - payload = jasmine.createSpyObj("payload", ["mergeConfigOverride"]); + payload = { + mergeConfigOverride: vi.fn(), + }; }); - it("returns the payload and datastreamIdOverride", () => { const result = createRequestParams({ payload, @@ -31,7 +33,6 @@ describe("createRequestParams", () => { datastreamIdOverride: "123", }); }); - it("works fine without overrides", () => { const result = createRequestParams({ payload, @@ -40,7 +41,6 @@ describe("createRequestParams", () => { payload, }); }); - it("merges the global and local config overrides", () => { globalConfigOverrides = { a: "b", diff --git a/test/unit/specs/utils/request/createRequestPayload.spec.js b/test/unit/specs/utils/request/createRequestPayload.spec.js deleted file mode 100644 index b7b1af9e2..000000000 --- a/test/unit/specs/utils/request/createRequestPayload.spec.js +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2019 Adobe. All rights reserved. -This file is licensed to you 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 REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ - -// eslint-disable-next-line no-unused-vars -import { createRequestPayload } from "../../../../../src/utils/request/index.js"; - -// This module is tested thoroughly through the different types of request -// payloads that leverage this module. diff --git a/test/unit/specs/utils/sanitizeOrgIdForCookieName.spec.js b/test/unit/specs/utils/sanitizeOrgIdForCookieName.spec.js index 4a99dfb14..d766c0111 100644 --- a/test/unit/specs/utils/sanitizeOrgIdForCookieName.spec.js +++ b/test/unit/specs/utils/sanitizeOrgIdForCookieName.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import sanitizeOrgIdForCookieName from "../../../../src/utils/sanitizeOrgIdForCookieName.js"; describe("sanitizeOrgIdForCookieName", () => { diff --git a/test/unit/specs/utils/stackError.spec.js b/test/unit/specs/utils/stackError.spec.js index 5dbe707e4..fd99341ab 100644 --- a/test/unit/specs/utils/stackError.spec.js +++ b/test/unit/specs/utils/stackError.spec.js @@ -10,22 +10,28 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import stackError from "../../../../src/utils/stackError.js"; describe("stackError", () => { it("stacks message onto error instance", () => { const error = new Error("Conundrum encountered."); - const result = stackError({ error, message: "Predicament discovered." }); - expect(result).toEqual(jasmine.any(Error)); + const result = stackError({ + error, + message: "Predicament discovered.", + }); + expect(result).toEqual(expect.any(Error)); expect(result.message).toBe( "Predicament discovered.\nCaused by: Conundrum encountered.", ); }); - it("stacks message onto non-error instance", () => { const error = "Conundrum encountered."; - const result = stackError({ error, message: "Predicament discovered." }); - expect(result).toEqual(jasmine.any(Error)); + const result = stackError({ + error, + message: "Predicament discovered.", + }); + expect(result).toEqual(expect.any(Error)); expect(result.message).toBe( "Predicament discovered.\nCaused by: Conundrum encountered.", ); diff --git a/test/unit/specs/utils/stringToBoolean.spec.js b/test/unit/specs/utils/stringToBoolean.spec.js index 515d4bbf2..82fcb8e36 100644 --- a/test/unit/specs/utils/stringToBoolean.spec.js +++ b/test/unit/specs/utils/stringToBoolean.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { stringToBoolean } from "../../../../src/utils/index.js"; describe("stringToBoolean", () => { @@ -17,7 +18,6 @@ describe("stringToBoolean", () => { expect(stringToBoolean(str)).toBe(true); }); }); - ["false", "0", "foo", ""].forEach((str) => { it(`parses '${str}' as false`, () => { expect(stringToBoolean(str)).toBe(false); diff --git a/test/unit/specs/utils/toArray.spec.js b/test/unit/specs/utils/toArray.spec.js index 2cecd6d3b..b4108f6b0 100644 --- a/test/unit/specs/utils/toArray.spec.js +++ b/test/unit/specs/utils/toArray.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import toArray from "../../../../src/utils/toArray.js"; describe("toArray", () => { @@ -17,15 +18,12 @@ describe("toArray", () => { const value = []; expect(toArray(value)).toBe(value); }); - it("converts undefined to empty array", () => { expect(toArray()).toEqual([]); }); - it("converts null to empty array", () => { expect(toArray(null)).toEqual([]); }); - it("converts array-like value to array", () => { const result = toArray(document.querySelectorAll("body")); expect(Array.isArray(result)).toBe(true); diff --git a/test/unit/specs/utils/toError.spec.js b/test/unit/specs/utils/toError.spec.js index bf7393f6c..ceecc45b6 100644 --- a/test/unit/specs/utils/toError.spec.js +++ b/test/unit/specs/utils/toError.spec.js @@ -10,16 +10,16 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import toError from "../../../../src/utils/toError.js"; describe("toError", () => { it("returns an error if value is not an error", () => { const message = "Conundrum encountered."; const result = toError(message); - expect(result).toEqual(jasmine.any(Error)); + expect(result).toEqual(expect.any(Error)); expect(result.message).toBe("Conundrum encountered."); }); - it("returns the value unmodified if value is an error", () => { const error = new Error("Conundrum encountered."); const result = toError(error); diff --git a/test/unit/specs/utils/toISOStringLocal.spec.js b/test/unit/specs/utils/toISOStringLocal.spec.js index 7cdef6b6e..7597bb6ac 100644 --- a/test/unit/specs/utils/toISOStringLocal.spec.js +++ b/test/unit/specs/utils/toISOStringLocal.spec.js @@ -9,30 +9,28 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import { toISOStringLocal } from "../../../../src/utils/index.js"; describe("toISOStringLocal", () => { it("handles a date in Utah", () => { const date = new Date("August 9, 2019 10:59:42"); - spyOn(date, "getTimezoneOffset").and.returnValue(7 * 60); + vi.spyOn(date, "getTimezoneOffset").mockReturnValue(7 * 60); expect(toISOStringLocal(date)).toEqual("2019-08-09T10:59:42.000-07:00"); }); - it("handles a date in india", () => { const date = new Date("December 31, 2019 22:36:00"); - spyOn(date, "getTimezoneOffset").and.returnValue(-5 * 60 - 30); + vi.spyOn(date, "getTimezoneOffset").mockReturnValue(-5 * 60 - 30); expect(toISOStringLocal(date)).toEqual("2019-12-31T22:36:00.000+05:30"); }); - it("handles a weird offset", () => { const date = new Date("January 01, 2020 00:00:42"); - spyOn(date, "getTimezoneOffset").and.returnValue(-176); + vi.spyOn(date, "getTimezoneOffset").mockReturnValue(-176); expect(toISOStringLocal(date)).toEqual("2020-01-01T00:00:42.000+02:56"); }); - it("handles a UTC timezone", () => { const date = new Date("December 31, 2019 22:36:00"); - spyOn(date, "getTimezoneOffset").and.returnValue(0); + vi.spyOn(date, "getTimezoneOffset").mockReturnValue(0); expect(toISOStringLocal(date)).toEqual("2019-12-31T22:36:00.000+00:00"); }); }); diff --git a/test/unit/specs/utils/toInteger.spec.js b/test/unit/specs/utils/toInteger.spec.js index fbc6b9562..575c5ff25 100644 --- a/test/unit/specs/utils/toInteger.spec.js +++ b/test/unit/specs/utils/toInteger.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import toInteger from "../../../../src/utils/toInteger.js"; describe("toInteger", () => { @@ -35,7 +36,6 @@ describe("toInteger", () => { expect(toInteger(input)).toEqual(output); }); }); - it("uses the passed value for the default", () => { expect(toInteger("foo", 0)).toEqual(0); }); diff --git a/test/unit/specs/utils/updateErrorMessage.spec.js b/test/unit/specs/utils/updateErrorMessage.spec.js index 0ba1c35e6..1a7161b4a 100644 --- a/test/unit/specs/utils/updateErrorMessage.spec.js +++ b/test/unit/specs/utils/updateErrorMessage.spec.js @@ -10,16 +10,19 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import updateErrorMessage from "../../../../src/utils/updateErrorMessage.js"; describe("updateErrorMessage", () => { it("updates error message if the message property is writeable", () => { const error = new Error("Conundrum encountered."); const message = "Predicament discovered."; - updateErrorMessage({ error, message }); + updateErrorMessage({ + error, + message, + }); expect(error.message).toEqual("Predicament discovered."); }); - it("does not update error message if the message property is read-only", () => { let error; try { @@ -29,7 +32,10 @@ describe("updateErrorMessage", () => { } catch (e) { error = e; } - updateErrorMessage({ error, message: "Predicament discovered." }); + updateErrorMessage({ + error, + message: "Predicament discovered.", + }); expect(error.message).not.toContain("Predicament discovered."); }); }); diff --git a/test/unit/specs/utils/uuid.spec.js b/test/unit/specs/utils/uuid.spec.js deleted file mode 100644 index 595c2773b..000000000 --- a/test/unit/specs/utils/uuid.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -/* -Copyright 2019 Adobe. All rights reserved. -This file is licensed to you 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 REPRESENTATIONS -OF ANY KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. -*/ - -// eslint-disable-next-line no-unused-vars -import uuid from "../../../../src/utils/uuid.js"; diff --git a/test/unit/specs/utils/validateConfigOverride.spec.js b/test/unit/specs/utils/validateConfigOverride.spec.js index 807b043fa..952a44331 100644 --- a/test/unit/specs/utils/validateConfigOverride.spec.js +++ b/test/unit/specs/utils/validateConfigOverride.spec.js @@ -15,7 +15,9 @@ import describeValidation from "../../helpers/describeValidation.js"; describeValidation("utils:validateConfigOverride", validateConfigOverride, [ // empty configuration - { value: {} }, + { + value: {}, + }, // standard configuration { value: { @@ -60,9 +62,24 @@ describeValidation("utils:validateConfigOverride", validateConfigOverride, [ }, }, // value must be an object - { value: true, error: true }, - { value: false, error: true }, - { value: "", error: true }, - { value: [], error: true }, - { value: 123, error: true }, + { + value: true, + error: true, + }, + { + value: false, + error: true, + }, + { + value: "", + error: true, + }, + { + value: [], + error: true, + }, + { + value: 123, + error: true, + }, ]); diff --git a/test/unit/specs/utils/validateIdentityMap.spec.js b/test/unit/specs/utils/validateIdentityMap.spec.js index a85255f33..f5a118a22 100644 --- a/test/unit/specs/utils/validateIdentityMap.spec.js +++ b/test/unit/specs/utils/validateIdentityMap.spec.js @@ -14,23 +14,149 @@ import { validateIdentityMap } from "../../../../src/utils/index.js"; import describeValidation from "../../helpers/describeValidation.js"; describeValidation("utils:validateIdentityMap", validateIdentityMap, [ - { value: { a: [{ authenticatedState: "unknown" }] }, error: true }, - { value: { a: [{ authenticatedState: "authenticated" }] } }, - { value: { a: [{ id: 123 }] }, error: true }, - { value: { a: [{ id: "123" }] } }, - { value: { a: [{ namespace: { unknown: "field" } }] }, error: true }, - { value: { a: [{ namespace: { code: "123" } }] } }, - { value: { a: [{ primary: 1 }] }, error: true }, - { value: { a: [{ primary: true }] } }, - { value: { a: [{ xid: 123 }] }, error: true }, - { value: { a: [{ xid: "123" }] } }, - { value: { a: [{ unknown: "field" }] }, error: true }, - { value: null }, - { value: undefined }, - { value: [], error: true }, - { value: { a: [] } }, - { value: { a: null }, error: true }, - { value: { a: undefined }, error: true }, - { value: { a: "string" }, error: true }, - { value: {} }, + { + value: { + a: [ + { + authenticatedState: "unknown", + }, + ], + }, + error: true, + }, + { + value: { + a: [ + { + authenticatedState: "authenticated", + }, + ], + }, + }, + { + value: { + a: [ + { + id: 123, + }, + ], + }, + error: true, + }, + { + value: { + a: [ + { + id: "123", + }, + ], + }, + }, + { + value: { + a: [ + { + namespace: { + unknown: "field", + }, + }, + ], + }, + error: true, + }, + { + value: { + a: [ + { + namespace: { + code: "123", + }, + }, + ], + }, + }, + { + value: { + a: [ + { + primary: 1, + }, + ], + }, + error: true, + }, + { + value: { + a: [ + { + primary: true, + }, + ], + }, + }, + { + value: { + a: [ + { + xid: 123, + }, + ], + }, + error: true, + }, + { + value: { + a: [ + { + xid: "123", + }, + ], + }, + }, + { + value: { + a: [ + { + unknown: "field", + }, + ], + }, + error: true, + }, + { + value: null, + }, + { + value: undefined, + }, + { + value: [], + error: true, + }, + { + value: { + a: [], + }, + }, + { + value: { + a: null, + }, + error: true, + }, + { + value: { + a: undefined, + }, + error: true, + }, + { + value: { + a: "string", + }, + error: true, + }, + { + value: {}, + }, ]); diff --git a/test/unit/specs/utils/validation/anythingValidator.spec.js b/test/unit/specs/utils/validation/anythingValidator.spec.js index 9a86ce9f1..b510a4a42 100644 --- a/test/unit/specs/utils/validation/anythingValidator.spec.js +++ b/test/unit/specs/utils/validation/anythingValidator.spec.js @@ -10,41 +10,100 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { anything } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::anything", () => { describeValidation("optional anything", anything(), [ - { value: {} }, - { value: { a: 1 } }, - { value: [] }, - { value: ["hello"] }, - { value: 1 }, - { value: true }, - { value: undefined }, - { value: null }, - { value: () => undefined }, + { + value: {}, + }, + { + value: { + a: 1, + }, + }, + { + value: [], + }, + { + value: ["hello"], + }, + { + value: 1, + }, + { + value: true, + }, + { + value: undefined, + }, + { + value: null, + }, + { + value: () => undefined, + }, ]); - describeValidation("required anything", anything().required(), [ - { value: {} }, - { value: { a: 1 } }, - { value: [] }, - { value: ["hello"] }, - { value: 1 }, - { value: true }, - { value: undefined, error: true }, - { value: null, error: true }, + { + value: {}, + }, + { + value: { + a: 1, + }, + }, + { + value: [], + }, + { + value: ["hello"], + }, + { + value: 1, + }, + { + value: true, + }, + { + value: undefined, + error: true, + }, + { + value: null, + error: true, + }, ]); - describeValidation("default anything", anything().default("foo"), [ - { value: {} }, - { value: { a: 1 } }, - { value: [] }, - { value: ["hello"] }, - { value: 1 }, - { value: true }, - { value: undefined, expected: "foo" }, - { value: null, expected: "foo" }, + { + value: {}, + }, + { + value: { + a: 1, + }, + }, + { + value: [], + }, + { + value: ["hello"], + }, + { + value: 1, + }, + { + value: true, + }, + { + value: undefined, + expected: "foo", + }, + { + value: null, + expected: "foo", + }, ]); }); diff --git a/test/unit/specs/utils/validation/booleanValidator.spec.js b/test/unit/specs/utils/validation/booleanValidator.spec.js index 382cbe4c3..5dba11061 100644 --- a/test/unit/specs/utils/validation/booleanValidator.spec.js +++ b/test/unit/specs/utils/validation/booleanValidator.spec.js @@ -10,34 +10,79 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { boolean } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::boolean", () => { describeValidation("optional boolean", boolean(), [ - { value: "", error: true }, - { value: "true", error: true }, - { value: [1], error: true }, - { value: {}, error: true }, - { value: 0, error: true }, - { value: 42, error: true }, - { value: true }, - { value: false }, - { value: null }, - { value: undefined }, + { + value: "", + error: true, + }, + { + value: "true", + error: true, + }, + { + value: [1], + error: true, + }, + { + value: {}, + error: true, + }, + { + value: 0, + error: true, + }, + { + value: 42, + error: true, + }, + { + value: true, + }, + { + value: false, + }, + { + value: null, + }, + { + value: undefined, + }, ]); - describeValidation("required boolean", boolean().required(), [ - { value: true }, - { value: false }, - { value: null, error: true }, - { value: undefined, error: true }, + { + value: true, + }, + { + value: false, + }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, ]); - describeValidation("default true boolean", boolean().default(true), [ - { value: null, expected: true }, - { value: undefined, expected: true }, - { value: true }, - { value: false }, + { + value: null, + expected: true, + }, + { + value: undefined, + expected: true, + }, + { + value: true, + }, + { + value: false, + }, ]); }); diff --git a/test/unit/specs/utils/validation/callbackValidator.spec.js b/test/unit/specs/utils/validation/callbackValidator.spec.js index 9f4845fcc..3ec054d2e 100644 --- a/test/unit/specs/utils/validation/callbackValidator.spec.js +++ b/test/unit/specs/utils/validation/callbackValidator.spec.js @@ -10,31 +10,66 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { callback } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::callback", () => { describeValidation("optional callback", callback(), [ - { value: "", error: true }, - { value: "true", error: true }, - { value: [1], error: true }, - { value: {}, error: true }, - { value: 0, error: true }, - { value: () => undefined }, - { value: function func() {} }, + { + value: "", + error: true, + }, + { + value: "true", + error: true, + }, + { + value: [1], + error: true, + }, + { + value: {}, + error: true, + }, + { + value: 0, + error: true, + }, + { + value: () => undefined, + }, + { + value: function func() {}, + }, ]); - describeValidation("required callback", callback().required(), [ - { value: () => undefined }, - { value: null, error: true }, - { value: undefined, error: true }, + { + value: () => undefined, + }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, ]); - const func1 = () => {}; const func2 = () => {}; describeValidation("callback with default value", callback().default(func1), [ - { value: null, expected: func1 }, - { value: undefined, expected: func1 }, - { value: func2, expected: func2 }, + { + value: null, + expected: func1, + }, + { + value: undefined, + expected: func1, + }, + { + value: func2, + expected: func2, + }, ]); }); diff --git a/test/unit/specs/utils/validation/createAnyOfValidator.spec.js b/test/unit/specs/utils/validation/createAnyOfValidator.spec.js index a416a3083..e012bd1d4 100644 --- a/test/unit/specs/utils/validation/createAnyOfValidator.spec.js +++ b/test/unit/specs/utils/validation/createAnyOfValidator.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { anyOf, objectOf, @@ -37,21 +38,75 @@ describe("validation:anyOf", () => { "either renderDecisions set to true or decisionScopes set to a nonEmpty array", ), [ - { value: undefined, error: true }, - { value: null, error: true }, - { value: {}, error: true }, - { value: { renderDecisions: true }, error: false }, - { value: { renderDecisions: false }, error: true }, - { value: { renderDecisions: "foo" }, error: true }, - { value: { decisionScopes: [] }, error: true }, - { value: { decisionScopes: ["a"] }, error: false }, - { value: { decisionScopes: "bar" }, error: true }, - { - value: { renderDecisions: true, decisionScopes: ["a", "b"] }, + { + value: undefined, + error: true, + }, + { + value: null, + error: true, + }, + { + value: {}, + error: true, + }, + { + value: { + renderDecisions: true, + }, error: false, }, - { value: { renderDecisions: true, decisionScopes: "foo" }, error: true }, - { value: { renderDecisions: "foo", decisionScopes: ["a"] }, error: true }, + { + value: { + renderDecisions: false, + }, + error: true, + }, + { + value: { + renderDecisions: "foo", + }, + error: true, + }, + { + value: { + decisionScopes: [], + }, + error: true, + }, + { + value: { + decisionScopes: ["a"], + }, + error: false, + }, + { + value: { + decisionScopes: "bar", + }, + error: true, + }, + { + value: { + renderDecisions: true, + decisionScopes: ["a", "b"], + }, + error: false, + }, + { + value: { + renderDecisions: true, + decisionScopes: "foo", + }, + error: true, + }, + { + value: { + renderDecisions: "foo", + decisionScopes: ["a"], + }, + error: true, + }, ], ); }); diff --git a/test/unit/specs/utils/validation/createArrayOfValidator.spec.js b/test/unit/specs/utils/validation/createArrayOfValidator.spec.js index 031dbccb9..64ea3bbd4 100644 --- a/test/unit/specs/utils/validation/createArrayOfValidator.spec.js +++ b/test/unit/specs/utils/validation/createArrayOfValidator.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { arrayOf, string } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; @@ -18,17 +19,35 @@ describe("validation::arrayOf", () => { "optional array with required values", arrayOf(string().required()), [ - { value: ["foo", undefined], error: true }, - { value: [true, "bar"], error: true }, - { value: "non-array", error: true }, - { value: ["foo"] }, - { value: ["foo", "bar"] }, - { value: [] }, - { value: null }, - { value: undefined }, + { + value: ["foo", undefined], + error: true, + }, + { + value: [true, "bar"], + error: true, + }, + { + value: "non-array", + error: true, + }, + { + value: ["foo"], + }, + { + value: ["foo", "bar"], + }, + { + value: [], + }, + { + value: null, + }, + { + value: undefined, + }, ], ); - describeValidation( "optional array with optional values", arrayOf(string().default("hello")), @@ -39,14 +58,21 @@ describe("validation::arrayOf", () => { }, ], ); - describeValidation( "required array with optional values", arrayOf(string()).required(), [ - { value: [null] }, - { value: null, error: true }, - { value: undefined, error: true }, + { + value: [null], + }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, ], ); }); diff --git a/test/unit/specs/utils/validation/createDefaultValidator.spec.js b/test/unit/specs/utils/validation/createDefaultValidator.spec.js index 9f345f192..adb1e2ed4 100644 --- a/test/unit/specs/utils/validation/createDefaultValidator.spec.js +++ b/test/unit/specs/utils/validation/createDefaultValidator.spec.js @@ -10,14 +10,25 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { string } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::default", () => { describeValidation("default string", string().default("my default"), [ - { value: null, expected: "my default" }, - { value: undefined, expected: "my default" }, - { value: "" }, - { value: "hello" }, + { + value: null, + expected: "my default", + }, + { + value: undefined, + expected: "my default", + }, + { + value: "", + }, + { + value: "hello", + }, ]); }); diff --git a/test/unit/specs/utils/validation/createDeprecatedValidator.spec.js b/test/unit/specs/utils/validation/createDeprecatedValidator.spec.js index cc3484964..d3d2c5896 100644 --- a/test/unit/specs/utils/validation/createDeprecatedValidator.spec.js +++ b/test/unit/specs/utils/validation/createDeprecatedValidator.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { objectOf, callback, @@ -26,12 +27,31 @@ describe("validation::deprecated", () => { new: string(), }), [ - { value: { old: "a" }, expected: { old: "a" }, warning: true }, - { value: {}, expected: {}, warning: false }, - { value: { new: "b" }, expected: { new: "b" }, warning: false }, + { + value: { + old: "a", + }, + expected: { + old: "a", + }, + warning: true, + }, + { + value: {}, + expected: {}, + warning: false, + }, + { + value: { + new: "b", + }, + expected: { + new: "b", + }, + warning: false, + }, ], ); - describeValidation( "works for a boolean field", objectOf({ @@ -39,12 +59,31 @@ describe("validation::deprecated", () => { new: boolean(), }), [ - { value: { old: true }, expected: { old: true }, warning: true }, - { value: {}, expected: {}, warning: false }, - { value: { new: false }, expected: { new: false }, warning: false }, + { + value: { + old: true, + }, + expected: { + old: true, + }, + warning: true, + }, + { + value: {}, + expected: {}, + warning: false, + }, + { + value: { + new: false, + }, + expected: { + new: false, + }, + warning: false, + }, ], ); - const noop = () => undefined; describeValidation( "works for a callback field", @@ -54,12 +93,30 @@ describe("validation::deprecated", () => { }), [ { - value: { old: noop, new: noop }, - expected: { old: noop, new: noop }, + value: { + old: noop, + new: noop, + }, + expected: { + old: noop, + new: noop, + }, warning: true, }, - { value: {}, expected: {}, warning: false }, - { value: { new: noop }, expected: { new: noop }, warning: false }, + { + value: {}, + expected: {}, + warning: false, + }, + { + value: { + new: noop, + }, + expected: { + new: noop, + }, + warning: false, + }, ], ); }); diff --git a/test/unit/specs/utils/validation/createLiteralValidator.spec.js b/test/unit/specs/utils/validation/createLiteralValidator.spec.js index 82d712d61..c456d858a 100644 --- a/test/unit/specs/utils/validation/createLiteralValidator.spec.js +++ b/test/unit/specs/utils/validation/createLiteralValidator.spec.js @@ -10,22 +10,53 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { literal } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation:literal", () => { describeValidation("literal optional string", literal("hello"), [ - { value: undefined, error: false }, - { value: null, error: false }, - { value: "hello", error: false }, - { value: {}, error: true }, - { value: "", error: true }, - { value: "goodbye", error: true }, + { + value: undefined, + error: false, + }, + { + value: null, + error: false, + }, + { + value: "hello", + error: false, + }, + { + value: {}, + error: true, + }, + { + value: "", + error: true, + }, + { + value: "goodbye", + error: true, + }, ]); describeValidation("literal required integer", literal(42).required(), [ - { value: 42, error: false }, - { value: 41, error: true }, - { value: null, error: true }, - { value: undefined, error: true }, + { + value: 42, + error: false, + }, + { + value: 41, + error: true, + }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, ]); }); diff --git a/test/unit/specs/utils/validation/createMapOfValuesValidator.spec.js b/test/unit/specs/utils/validation/createMapOfValuesValidator.spec.js index ea73e44ad..75601c39a 100644 --- a/test/unit/specs/utils/validation/createMapOfValuesValidator.spec.js +++ b/test/unit/specs/utils/validation/createMapOfValuesValidator.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { mapOfValues, arrayOf, @@ -23,23 +24,76 @@ describe("validation::mapOfValues", () => { "map of required strings", mapOfValues(string().required()).required(), [ - { value: {} }, - { value: { a: "1" } }, - { value: { a: "1", b: "2", c: "3" } }, - { value: undefined, error: true }, - { value: null, error: true }, - { value: { a: 123 }, error: true }, - { value: 123, error: true }, - { value: { a: undefined }, error: true }, + { + value: {}, + }, + { + value: { + a: "1", + }, + }, + { + value: { + a: "1", + b: "2", + c: "3", + }, + }, + { + value: undefined, + error: true, + }, + { + value: null, + error: true, + }, + { + value: { + a: 123, + }, + error: true, + }, + { + value: 123, + error: true, + }, + { + value: { + a: undefined, + }, + error: true, + }, ], ); - describeValidation("map of arrays", mapOfValues(arrayOf(anything())), [ - { value: { a: [], b: [true, 1, 0.1, "string", undefined, null] } }, - { value: { a: "string" }, error: true }, - { value: { a: undefined }, expected: {} }, - { value: { a: null } }, - { value: undefined }, - { value: null }, + { + value: { + a: [], + b: [true, 1, 0.1, "string", undefined, null], + }, + }, + { + value: { + a: "string", + }, + error: true, + }, + { + value: { + a: undefined, + }, + expected: {}, + }, + { + value: { + a: null, + }, + }, + { + value: undefined, + }, + { + value: null, + }, ]); }); diff --git a/test/unit/specs/utils/validation/createMaximumValidator.spec.js b/test/unit/specs/utils/validation/createMaximumValidator.spec.js index 93076d36d..78bf704c1 100644 --- a/test/unit/specs/utils/validation/createMaximumValidator.spec.js +++ b/test/unit/specs/utils/validation/createMaximumValidator.spec.js @@ -10,35 +10,63 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { number } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::maximum", () => { describeValidation("optional maximum", number().integer().maximum(4), [ - { value: 3 }, - { value: 5, error: true }, - { value: null }, - { value: undefined }, + { + value: 3, + }, + { + value: 5, + error: true, + }, + { + value: null, + }, + { + value: undefined, + }, ]); - describeValidation( "required maximum", number().integer().maximum(2).required(), [ - { value: null, error: true }, - { value: undefined, error: true }, - { value: 3, error: true }, - { value: 1 }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, + { + value: 3, + error: true, + }, + { + value: 1, + }, ], ); - describeValidation( "default maximum", number().integer().maximum(10).default(8), [ - { value: null, expected: 8 }, - { value: undefined, expected: 8 }, - { value: 11, error: true }, + { + value: null, + expected: 8, + }, + { + value: undefined, + expected: 8, + }, + { + value: 11, + error: true, + }, ], ); }); diff --git a/test/unit/specs/utils/validation/createMinimumValidator.spec.js b/test/unit/specs/utils/validation/createMinimumValidator.spec.js index 46fcaa37c..09614fc7c 100644 --- a/test/unit/specs/utils/validation/createMinimumValidator.spec.js +++ b/test/unit/specs/utils/validation/createMinimumValidator.spec.js @@ -10,36 +10,66 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { number } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::minimum", () => { describeValidation("optional minimum", number().integer().minimum(4), [ - { value: 3, error: true }, - { value: 4 }, - { value: 5 }, - { value: null }, - { value: undefined }, + { + value: 3, + error: true, + }, + { + value: 4, + }, + { + value: 5, + }, + { + value: null, + }, + { + value: undefined, + }, ]); - describeValidation( "required minimum", number().integer().minimum(1).required(), [ - { value: null, error: true }, - { value: undefined, error: true }, - { value: 0, error: true }, - { value: 1 }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, + { + value: 0, + error: true, + }, + { + value: 1, + }, ], ); - describeValidation( "default minimum", number().integer().minimum(10).default(42), [ - { value: null, expected: 42 }, - { value: undefined, expected: 42 }, - { value: 0, error: true }, + { + value: null, + expected: 42, + }, + { + value: undefined, + expected: 42, + }, + { + value: 0, + error: true, + }, ], ); }); diff --git a/test/unit/specs/utils/validation/createNoUnknownFieldsValidator.spec.js b/test/unit/specs/utils/validation/createNoUnknownFieldsValidator.spec.js index c72de8c1a..639a10fb2 100644 --- a/test/unit/specs/utils/validation/createNoUnknownFieldsValidator.spec.js +++ b/test/unit/specs/utils/validation/createNoUnknownFieldsValidator.spec.js @@ -10,38 +10,104 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { objectOf, string } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::noUnknownFields", () => { - describeValidation("optional", objectOf({ a: string() }).noUnknownFields(), [ - { value: { b: "world" }, error: true }, - { value: { a: "hello", b: "world" }, error: true }, - { value: { a: "hello" }, error: false }, - { value: {}, error: false }, - ]); - + describeValidation( + "optional", + objectOf({ + a: string(), + }).noUnknownFields(), + [ + { + value: { + b: "world", + }, + error: true, + }, + { + value: { + a: "hello", + b: "world", + }, + error: true, + }, + { + value: { + a: "hello", + }, + error: false, + }, + { + value: {}, + error: false, + }, + ], + ); describeValidation( "required", - objectOf({ a: string().required() }).noUnknownFields().required(), + objectOf({ + a: string().required(), + }) + .noUnknownFields() + .required(), [ - { value: null, error: true }, - { value: undefined, error: true }, - { value: {}, error: true }, - { value: { a: "Hello" }, error: false }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, + { + value: {}, + error: true, + }, + { + value: { + a: "Hello", + }, + error: false, + }, ], ); - describeValidation( "default", - objectOf({ a: string().default("hello") }) + objectOf({ + a: string().default("hello"), + }) .noUnknownFields() - .default({ a: "world" }), + .default({ + a: "world", + }), [ - { value: null, expected: { a: "world" } }, - { value: undefined, expected: { a: "world" } }, - { value: {}, expected: { a: "hello" } }, - { value: { b: "goodbye" }, error: true }, + { + value: null, + expected: { + a: "world", + }, + }, + { + value: undefined, + expected: { + a: "world", + }, + }, + { + value: {}, + expected: { + a: "hello", + }, + }, + { + value: { + b: "goodbye", + }, + error: true, + }, ], ); }); diff --git a/test/unit/specs/utils/validation/createNonEmptyValidator.spec.js b/test/unit/specs/utils/validation/createNonEmptyValidator.spec.js index f1347cb19..2bebf0c37 100644 --- a/test/unit/specs/utils/validation/createNonEmptyValidator.spec.js +++ b/test/unit/specs/utils/validation/createNonEmptyValidator.spec.js @@ -10,28 +10,54 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { string } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::nonEmpty", () => { describeValidation("optional nonEmpty", string().nonEmpty(), [ - { value: "key" }, - { value: "", error: true }, - { value: null }, - { value: undefined }, + { + value: "key", + }, + { + value: "", + error: true, + }, + { + value: null, + }, + { + value: undefined, + }, ]); describeValidation("required nonEmpty", string().nonEmpty().required(), [ - { value: "abc" }, - { value: null, error: true }, - { value: undefined, error: true }, + { + value: "abc", + }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, ]); describeValidation( "default nonEmpty", string().nonEmpty().default("mydefault"), [ - { value: null, expected: "mydefault" }, - { value: undefined, expected: "mydefault" }, - { value: "abc" }, + { + value: null, + expected: "mydefault", + }, + { + value: undefined, + expected: "mydefault", + }, + { + value: "abc", + }, ], ); }); diff --git a/test/unit/specs/utils/validation/createObjectOfValidator.spec.js b/test/unit/specs/utils/validation/createObjectOfValidator.spec.js index 93a751abb..7afb12459 100644 --- a/test/unit/specs/utils/validation/createObjectOfValidator.spec.js +++ b/test/unit/specs/utils/validation/createObjectOfValidator.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { objectOf, string } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; @@ -22,16 +23,44 @@ describe("validation::objectOf", () => { c: string(), }), [ - { value: {}, error: true }, - { value: { a: "1" }, expected: { a: "1", b: "b default" } }, - { value: { a: "1", b: "2", c: "3" } }, - { value: undefined }, - { value: null }, - { value: { a: 123 }, error: true }, - { value: 123, error: true }, + { + value: {}, + error: true, + }, + { + value: { + a: "1", + }, + expected: { + a: "1", + b: "b default", + }, + }, + { + value: { + a: "1", + b: "2", + c: "3", + }, + }, + { + value: undefined, + }, + { + value: null, + }, + { + value: { + a: 123, + }, + error: true, + }, + { + value: 123, + error: true, + }, ], ); - describeValidation( "nested object", objectOf({ @@ -40,12 +69,25 @@ describe("validation::objectOf", () => { }).required(), }), [ - { value: {}, error: true }, - { value: { a: {} }, error: true }, - { value: { a: { aa: "11" } } }, + { + value: {}, + error: true, + }, + { + value: { + a: {}, + }, + error: true, + }, + { + value: { + a: { + aa: "11", + }, + }, + }, ], ); - describeValidation( "concat", objectOf({ @@ -62,13 +104,42 @@ describe("validation::objectOf", () => { }), ), [ - { value: {}, error: true }, - { value: { a: "1" }, expected: { a: "1", b: "b default" } }, - { value: { a: "1", b: "2", c: "3" } }, - { value: undefined }, - { value: null }, - { value: { a: 123 }, error: true }, - { value: 123, error: true }, + { + value: {}, + error: true, + }, + { + value: { + a: "1", + }, + expected: { + a: "1", + b: "b default", + }, + }, + { + value: { + a: "1", + b: "2", + c: "3", + }, + }, + { + value: undefined, + }, + { + value: null, + }, + { + value: { + a: 123, + }, + error: true, + }, + { + value: 123, + error: true, + }, ], ); }); diff --git a/test/unit/specs/utils/validation/createRenamedValidator.spec.js b/test/unit/specs/utils/validation/createRenamedValidator.spec.js index 2a5918573..f506217a9 100644 --- a/test/unit/specs/utils/validation/createRenamedValidator.spec.js +++ b/test/unit/specs/utils/validation/createRenamedValidator.spec.js @@ -10,20 +10,55 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { objectOf, string } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::renamed", () => { const testCases = [ - { value: { old: "a", new: "a" }, expected: { new: "a" }, warning: true }, - { value: { old: "a" }, expected: { new: "a" }, warning: true }, - { value: { new: "a" } }, - { value: { old: "a", new: "b" }, error: true }, - { value: "foo", error: true }, - { value: 1, error: true }, - { value: undefined }, + { + value: { + old: "a", + new: "a", + }, + expected: { + new: "a", + }, + warning: true, + }, + { + value: { + old: "a", + }, + expected: { + new: "a", + }, + warning: true, + }, + { + value: { + new: "a", + }, + }, + { + value: { + old: "a", + new: "b", + }, + error: true, + }, + { + value: "foo", + error: true, + }, + { + value: 1, + error: true, + }, + { + value: undefined, + }, ]; - describeValidation( "works for a single deprecated field", objectOf({ @@ -31,7 +66,6 @@ describe("validation::renamed", () => { }).renamed("old", string(), "new"), testCases, ); - describeValidation( "works for multiple deprecated fields", objectOf({ @@ -42,8 +76,14 @@ describe("validation::renamed", () => { .renamed("old2", string(), "new2"), [ { - value: { old1: "a", old2: "b" }, - expected: { new1: "a", new2: "b" }, + value: { + old1: "a", + old2: "b", + }, + expected: { + new1: "a", + new2: "b", + }, warning: true, }, ], diff --git a/test/unit/specs/utils/validation/createUniqueItemsValidator.spec.js b/test/unit/specs/utils/validation/createUniqueItemsValidator.spec.js index b7c240d71..624914d12 100644 --- a/test/unit/specs/utils/validation/createUniqueItemsValidator.spec.js +++ b/test/unit/specs/utils/validation/createUniqueItemsValidator.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { string, arrayOf, @@ -20,32 +21,26 @@ describe("validation::createUniqueItems", () => { const validator = arrayOf(string()).uniqueItems(); expect(validator([])).toEqual([]); }); - it(`validates an array of one item`, () => { const validator = arrayOf(string()).uniqueItems(); expect(validator(["a"])).toEqual(["a"]); }); - it(`throws an error on an array with duplicate (string) items`, () => { const validator = arrayOf(string()).uniqueItems(); expect(() => validator(["a", "b", "a", "e"])).toThrowError(); }); - it(`throws an error on an array with duplicate integers`, () => { const validator = arrayOf(number()).uniqueItems(); expect(() => validator([1, 2, 3, 4, 4, 5])).toThrowError(); }); - it(`validates an array of enums`, () => { const validator = arrayOf(number()).uniqueItems(); expect(validator([])).toEqual([]); }); - it(`validates an array of null or undefined`, () => { const validator = arrayOf(string()).uniqueItems(); expect(validator([null, undefined])).toEqual([null, undefined]); }); - it(`complains about required when null or undefined`, () => { const validator = arrayOf(string().required()).uniqueItems(); expect(() => validator([null, undefined])).toThrowError(); diff --git a/test/unit/specs/utils/validation/createUniqueValidator.spec.js b/test/unit/specs/utils/validation/createUniqueValidator.spec.js index 70d78e95a..5b8a6dc6d 100644 --- a/test/unit/specs/utils/validation/createUniqueValidator.spec.js +++ b/test/unit/specs/utils/validation/createUniqueValidator.spec.js @@ -9,6 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe, it, expect } from "vitest"; import { string } from "../../../../../src/utils/validation/index.js"; describe("validation::createUnique", () => { @@ -20,7 +21,6 @@ describe("validation::createUnique", () => { }); }); }); - [ ["a", "a"], ["a", "b", "a"], @@ -37,7 +37,6 @@ describe("validation::createUnique", () => { }); }); }); - [null, undefined].forEach((value) => { it(`complains about required when ${JSON.stringify(value)}`, () => { const validator = string().unique().required(); diff --git a/test/unit/specs/utils/validation/domainValidator.spec.js b/test/unit/specs/utils/validation/domainValidator.spec.js index 3c5655f02..26fc45d47 100644 --- a/test/unit/specs/utils/validation/domainValidator.spec.js +++ b/test/unit/specs/utils/validation/domainValidator.spec.js @@ -10,15 +10,29 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { string } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::domain", () => { describeValidation("domain", string().domain(), [ - { value: "stats.adobe.com" }, - { value: "stats-edge.adobe.com" }, - { value: "https://stats.adobe.com", error: true }, - { value: "stats.adobe.com\n", error: true }, - { value: "stats.adobe.com\nbad", error: true }, + { + value: "stats.adobe.com", + }, + { + value: "stats-edge.adobe.com", + }, + { + value: "https://stats.adobe.com", + error: true, + }, + { + value: "stats.adobe.com\n", + error: true, + }, + { + value: "stats.adobe.com\nbad", + error: true, + }, ]); }); diff --git a/test/unit/specs/utils/validation/enumOfValidator.spec.js b/test/unit/specs/utils/validation/enumOfValidator.spec.js index 5d9d96dc7..09bac966d 100644 --- a/test/unit/specs/utils/validation/enumOfValidator.spec.js +++ b/test/unit/specs/utils/validation/enumOfValidator.spec.js @@ -10,32 +10,93 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { enumOf } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation:enumOf", () => { describeValidation("optional enum", enumOf("in", 1234, 0.1, false), [ - { value: undefined, error: false }, - { value: 1234, error: false }, - { value: "in", error: false }, - { value: null, error: false }, - { value: 0.1, error: false }, - { value: false, error: false }, - { value: "out", error: true }, - { value: "", error: true }, - { value: {}, error: true }, - { value: [], error: true }, + { + value: undefined, + error: false, + }, + { + value: 1234, + error: false, + }, + { + value: "in", + error: false, + }, + { + value: null, + error: false, + }, + { + value: 0.1, + error: false, + }, + { + value: false, + error: false, + }, + { + value: "out", + error: true, + }, + { + value: "", + error: true, + }, + { + value: {}, + error: true, + }, + { + value: [], + error: true, + }, ]); describeValidation("required enum", enumOf("in", "pending").required(), [ - { value: "in", error: false }, - { value: "pending", error: false }, - { value: null, error: true }, - { value: undefined, error: true }, - { value: 0.1, error: true }, - { value: false, error: true }, - { value: "out", error: true }, - { value: "", error: true }, - { value: {}, error: true }, - { value: [], error: true }, + { + value: "in", + error: false, + }, + { + value: "pending", + error: false, + }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, + { + value: 0.1, + error: true, + }, + { + value: false, + error: true, + }, + { + value: "out", + error: true, + }, + { + value: "", + error: true, + }, + { + value: {}, + error: true, + }, + { + value: [], + error: true, + }, ]); }); diff --git a/test/unit/specs/utils/validation/integerValidator.spec.js b/test/unit/specs/utils/validation/integerValidator.spec.js index 043235e24..d09320af3 100644 --- a/test/unit/specs/utils/validation/integerValidator.spec.js +++ b/test/unit/specs/utils/validation/integerValidator.spec.js @@ -10,28 +10,59 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { number } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::integer()", () => { describeValidation("optional integer", number().integer(), [ - { value: 42.01, error: true }, - { value: -1.1, error: true }, - { value: NaN, error: true }, - { value: 0 }, - { value: 42 }, - { value: -1 }, + { + value: 42.01, + error: true, + }, + { + value: -1.1, + error: true, + }, + { + value: NaN, + error: true, + }, + { + value: 0, + }, + { + value: 42, + }, + { + value: -1, + }, ]); - describeValidation("required integer", number().integer().required(), [ - { value: null, error: true }, - { value: undefined, error: true }, - { value: 10 }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, + { + value: 10, + }, ]); - describeValidation("default integer", number().integer().default(12345), [ - { value: null, expected: 12345 }, - { value: undefined, expected: 12345 }, - { value: 10, expected: 10 }, + { + value: null, + expected: 12345, + }, + { + value: undefined, + expected: 12345, + }, + { + value: 10, + expected: 10, + }, ]); }); diff --git a/test/unit/specs/utils/validation/matchesRegexpValidator.spec.js b/test/unit/specs/utils/validation/matchesRegexpValidator.spec.js index eb50c9dff..6d4857e39 100644 --- a/test/unit/specs/utils/validation/matchesRegexpValidator.spec.js +++ b/test/unit/specs/utils/validation/matchesRegexpValidator.spec.js @@ -10,30 +10,58 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { string } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; const regexp = /^[A-z]+$/; - describe("validation::matchesRegexp", () => { describeValidation("optional matchesRegexp", string().matches(regexp), [ - { value: "abc" }, - { value: "ABCD" }, - { value: "*", error: true }, - { value: "123", error: true }, - { value: null }, - { value: undefined }, + { + value: "abc", + }, + { + value: "ABCD", + }, + { + value: "*", + error: true, + }, + { + value: "123", + error: true, + }, + { + value: null, + }, + { + value: undefined, + }, ]); - describeValidation("required regexp", string().regexp(regexp).required(), [ - { value: null, error: true }, - { value: undefined, error: true }, - { value: "" }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, + { + value: "", + }, ]); - describeValidation("default regexp", string().regexp(regexp).default("abc"), [ - { value: null, expected: "abc" }, - { value: undefined, expected: "abc" }, - { value: "a" }, + { + value: null, + expected: "abc", + }, + { + value: undefined, + expected: "abc", + }, + { + value: "a", + }, ]); }); diff --git a/test/unit/specs/utils/validation/numberValidator.spec.js b/test/unit/specs/utils/validation/numberValidator.spec.js index 58eadd2b2..9ee87928a 100644 --- a/test/unit/specs/utils/validation/numberValidator.spec.js +++ b/test/unit/specs/utils/validation/numberValidator.spec.js @@ -10,31 +10,70 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { number } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::number", () => { describeValidation("optional number", number(), [ - { value: true, error: true }, - { value: "", error: true }, - { value: "42", error: true }, - { value: [1], error: true }, - { value: {}, error: true }, - { value: NaN, error: true }, - { value: 0 }, - { value: 0.01 }, - { value: Infinity }, + { + value: true, + error: true, + }, + { + value: "", + error: true, + }, + { + value: "42", + error: true, + }, + { + value: [1], + error: true, + }, + { + value: {}, + error: true, + }, + { + value: NaN, + error: true, + }, + { + value: 0, + }, + { + value: 0.01, + }, + { + value: Infinity, + }, ]); - describeValidation("required number", number().required(), [ - { value: null, error: true }, - { value: undefined, error: true }, - { value: 123 }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, + { + value: 123, + }, ]); - describeValidation("default number", number().default(-1), [ - { value: null, expected: -1 }, - { value: undefined, expected: -1 }, - { value: 123 }, + { + value: null, + expected: -1, + }, + { + value: undefined, + expected: -1, + }, + { + value: 123, + }, ]); }); diff --git a/test/unit/specs/utils/validation/regexpValidator.spec.js b/test/unit/specs/utils/validation/regexpValidator.spec.js index f68041807..f3c88f9e3 100644 --- a/test/unit/specs/utils/validation/regexpValidator.spec.js +++ b/test/unit/specs/utils/validation/regexpValidator.spec.js @@ -10,29 +10,60 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { string } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::regexp", () => { describeValidation("optional regexp", string().regexp(), [ - { value: "steel|bronze" }, - { value: "/a/" }, - { value: "/^[a-z0-9+]:///i" }, - { value: "[", error: true }, - { value: "*", error: true }, - { value: null }, - { value: undefined }, + { + value: "steel|bronze", + }, + { + value: "/a/", + }, + { + value: "/^[a-z0-9+]:///i", + }, + { + value: "[", + error: true, + }, + { + value: "*", + error: true, + }, + { + value: null, + }, + { + value: undefined, + }, ]); - describeValidation("required regexp", string().regexp().required(), [ - { value: null, error: true }, - { value: undefined, error: true }, - { value: "" }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, + { + value: "", + }, ]); - describeValidation("default regexp", string().regexp().default("/default/"), [ - { value: null, expected: "/default/" }, - { value: undefined, expected: "/default/" }, - { value: "a" }, + { + value: null, + expected: "/default/", + }, + { + value: undefined, + expected: "/default/", + }, + { + value: "a", + }, ]); }); diff --git a/test/unit/specs/utils/validation/requiredValidator.spec.js b/test/unit/specs/utils/validation/requiredValidator.spec.js index 63491c51e..668e29676 100644 --- a/test/unit/specs/utils/validation/requiredValidator.spec.js +++ b/test/unit/specs/utils/validation/requiredValidator.spec.js @@ -10,14 +10,25 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { string } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::required", () => { describeValidation("required string", string().required(), [ - { value: null, error: true }, - { value: undefined, error: true }, - { value: "" }, - { value: "hello" }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, + { + value: "", + }, + { + value: "hello", + }, ]); }); diff --git a/test/unit/specs/utils/validation/stringValidator.spec.js b/test/unit/specs/utils/validation/stringValidator.spec.js index 9e123a776..f0d358514 100644 --- a/test/unit/specs/utils/validation/stringValidator.spec.js +++ b/test/unit/specs/utils/validation/stringValidator.spec.js @@ -9,29 +9,62 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +import { describe } from "vitest"; import { string } from "../../../../../src/utils/validation/index.js"; import describeValidation from "../../../helpers/describeValidation.js"; describe("validation::string", () => { describeValidation("optional string", string(), [ - { value: false, error: true }, - { value: 0, error: true }, - { value: [], error: true }, - { value: () => {}, error: true }, - { value: null }, - { value: undefined }, + { + value: false, + error: true, + }, + { + value: 0, + error: true, + }, + { + value: [], + error: true, + }, + { + value: () => {}, + error: true, + }, + { + value: null, + }, + { + value: undefined, + }, ]); - describeValidation("required string", string().required(), [ - { value: null, error: true }, - { value: undefined, error: true }, - { value: "" }, - { value: "hello" }, + { + value: null, + error: true, + }, + { + value: undefined, + error: true, + }, + { + value: "", + }, + { + value: "hello", + }, ]); - describeValidation("default string", string().default("default"), [ - { value: null, expected: "default" }, - { value: undefined, expected: "default" }, - { value: "hello" }, + { + value: null, + expected: "default", + }, + { + value: undefined, + expected: "default", + }, + { + value: "hello", + }, ]); }); diff --git a/test/unit/specs/utils/validation/utils.spec.js b/test/unit/specs/utils/validation/utils.spec.js index 70cd3b591..0ddb45bfe 100644 --- a/test/unit/specs/utils/validation/utils.spec.js +++ b/test/unit/specs/utils/validation/utils.spec.js @@ -10,6 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ +import { vi, describe, it, expect } from "vitest"; import { chain, nullSafeChain, @@ -19,12 +20,12 @@ import { describe("validation::utils", () => { describe("chain", () => { it("calls the validators with the correct params", () => { - const validator1 = jasmine.createSpy(); - const validator2 = jasmine.createSpy(); - const validator3 = jasmine.createSpy(); - validator1.and.returnValue("validator1return"); - validator2.and.returnValue("validator2return"); - validator3.and.returnValue("validator3return"); + const validator1 = vi.fn(); + const validator2 = vi.fn(); + const validator3 = vi.fn(); + validator1.mockReturnValue("validator1return"); + validator2.mockReturnValue("validator2return"); + validator3.mockReturnValue("validator3return"); const subject = chain(chain(validator1, validator2), validator3); expect(subject("myCurrentValue", "myKey")).toEqual("validator3return"); expect(validator1).toHaveBeenCalledTimes(1); @@ -34,14 +35,15 @@ describe("validation::utils", () => { expect(validator3).toHaveBeenCalledTimes(1); expect(validator3).toHaveBeenCalledWith("validator2return", "myKey"); }); - it("short circuits evaluation", () => { - const validator1 = jasmine.createSpy(); - const validator2 = jasmine.createSpy(); - const validator3 = jasmine.createSpy(); - validator1.and.returnValue("validator1return"); - validator2.and.throwError("My Error!"); - validator3.and.returnValue("validator3return"); + const validator1 = vi.fn(); + const validator2 = vi.fn(); + const validator3 = vi.fn(); + validator1.mockReturnValue("validator1return"); + validator2.mockImplementation(() => { + throw new Error("My Error!"); + }); + validator3.mockReturnValue("validator3return"); const subject = chain(chain(validator1, validator2), validator3); expect(() => subject("myCurrentValue", "myKey")).toThrow( Error("My Error!"), @@ -49,13 +51,12 @@ describe("validation::utils", () => { expect(validator3).not.toHaveBeenCalled(); }); }); - describe("nullSafeChain", () => { it("doesn't call the underlying validators when null is passed in", () => { - const validator1 = jasmine.createSpy(); - const validator2 = jasmine.createSpy(); - const validator3 = jasmine.createSpy(); - validator1.and.returnValue(null); + const validator1 = vi.fn(); + const validator2 = vi.fn(); + const validator3 = vi.fn(); + validator1.mockReturnValue(null); const subject = nullSafeChain( nullSafeChain(validator1, validator2), validator3, @@ -67,19 +68,12 @@ describe("validation::utils", () => { expect(validator3).toHaveBeenCalledTimes(0); }); }); - describe("assertValid", () => { it("throws an error when it is invalid", () => { expect(() => assertValid(false, "myValue", "myPath", "myMessage"), - ).toThrowMatching((e) => { - expect(e.message).toEqual( - `'myPath': Expected myMessage, but got "myValue".`, - ); - return true; - }); + ).toThrowError(/'myPath': Expected myMessage, but got "myValue"\./); }); - it("does not throw an error when it is valid", () => { expect( assertValid(true, "myValue", "myPath", "myMessage"), diff --git a/vitest.config.js b/vitest.config.js new file mode 100644 index 000000000..82fbf45ce --- /dev/null +++ b/vitest.config.js @@ -0,0 +1,19 @@ +// eslint-disable-next-line import/no-unresolved +import { defineProject } from "vitest/config"; + +export default defineProject({ + test: { + name: "unit-tests", + include: ["test/unit/**/*.{test,spec}.?(c|m)[jt]s?(x)"], + isolate: false, + browser: { + provider: "playwright", + name: "chromium", + enabled: true, + headless: true, + }, + coverage: { + include: ["src/**/*"], + }, + }, +});