diff --git a/.dockerignore b/.dockerignore index 9cf03a4..660e02c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,11 +1,14 @@ node_modules **/node_modules +# Required for the async_init_with_node_modules unit test +!test/handlers/async_init_with_node_modules/node_modules + build **/build -lib -**/lib +dist +**/dist .idea **/.idea @@ -13,7 +16,5 @@ lib package-lock.json **/package-lock.json -test/integration/*.ts - .git .DS_STORE \ No newline at end of file diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..d8498ad --- /dev/null +++ b/.eslintignore @@ -0,0 +1,7 @@ +node_modules +**/node_modules + +async_init_package +test-handlers + +dist/** \ No newline at end of file diff --git a/.eslintrc b/.eslintrc index 773d29e..1f9466f 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,38 +1,31 @@ { - "parser": "@typescript-eslint/parser", "parserOptions": { - "project": ["src/tsconfig.json", "test/unit/tsconfig.json"] + "ecmaVersion": 2022 }, - "plugins": ["@typescript-eslint", "prettier"], "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "prettier" + "plugin:prettier/recommended" ], "env": { "node": true, + "mocha": true, "es6": true }, "rules": { - "@typescript-eslint/restrict-plus-operands": "error", - "@typescript-eslint/interface-name-prefix": "off", - "no-async-promise-executor": "warn", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/indent": "off", - "@typescript-eslint/ban-types": "warn", - "no-console": "warn", - "no-shadow": "warn" - }, - "overrides": [ - { - "files":["test/**/*.ts"], - "rules": { - "no-console": "off", - "@typescript-eslint/no-explicit-any": "off", - "no-prototype-builtins": "off", - "strictBindCallApply": "off" + "strict": [ + "error", + "global" + ], + "indent": [ + "error", + 2 + ], + "camelcase": "error", + "no-console": "off", + "no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_" } - } - ] + ] + } } \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0a19bee..40f6187 100644 --- a/.gitignore +++ b/.gitignore @@ -7,9 +7,6 @@ test/integration/resources/init logs *.log npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json @@ -20,9 +17,6 @@ pids *.seed *.pid.lock -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - # Coverage directory used by tools like istanbul coverage *.lcov @@ -30,93 +24,27 @@ coverage # nyc test coverage .nyc_output -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ -# TypeScript cache -*.tsbuildinfo +# Required for the async_init_with_node_modules unit test +!test/handlers/async_init_with_node_modules/node_modules # Optional npm cache directory .npm # Optional eslint cache .eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history +.eslintignore # Output of 'npm pack' *.tgz -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -lib/ - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port +# Build +dist/ # Stores VSCode versions used for testing VSCode extensions .vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* -.idea/ diff --git a/.npmignore b/.npmignore index 1929246..af2d322 100644 --- a/.npmignore +++ b/.npmignore @@ -1,16 +1,15 @@ build .DS_Store -src +src/* +# Rapid-client.c to be used with node-gyp +!src/rapid-client.cc test # Logs logs *.log npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* # IDEs .idea @@ -35,27 +34,11 @@ coverage # nyc test coverage .nyc_output -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo # Optional npm cache directory .npm @@ -63,68 +46,14 @@ web_modules/ # Optional eslint config & cache .eslintrc .eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history +.eslintignore # Output of 'npm pack' *.tgz -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - # Stores VSCode versions used for testing VSCode extensions .vscode-test -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* - # git .git* diff --git a/Makefile b/Makefile index 2bb8689..5a59942 100644 --- a/Makefile +++ b/Makefile @@ -1,61 +1,49 @@ -.PHONY: target target: $(info ${HELP_MESSAGE}) @exit 0 -.PHONY: init init: npm install -.PHONY: test test: npm run test -.PHONY: setup-codebuild-agent setup-codebuild-agent: docker build -t codebuild-agent - < test/integration/codebuild-local/Dockerfile.agent -.PHONY: test-smoke test-smoke: setup-codebuild-agent CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.alpine.1.yml alpine 3.16 18 -.PHONY: test-integ test-integ: setup-codebuild-agent CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_all.sh test/integration/codebuild -.PHONY: copy-files copy-files: npm run copy-files -.PHONY: install install: BUILD=$(BUILD) npm install -.PHONY: format format: npm run format # Command to run everytime you make changes to verify everything works -.PHONY: dev dev: init test # Verifications to run before sending a pull request -.PHONY: pr pr: build dev test-smoke -.PHONY: clean clean: npm run clean -.PHONY: build build: copy-files make install BUILD=1 npm run build -.PHONY: pack pack: build npm pack +.PHONY: target init test setup-codebuild-agent test-smoke test-integ install format dev pr clean build pack copy-files + define HELP_MESSAGE Usage: $ make [TARGETS] diff --git a/README.md b/README.md index 433b395..9893254 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ The NodeJS Runtime Interface Client package currently supports NodeJS versions: ### Creating a Docker Image for Lambda with the Runtime Interface Client First step is to choose the base image to be used. The supported Linux OS distributions are: - - Amazon Linux 2 + - Amazon Linux (2 and 2023) - Alpine - CentOS - Debian @@ -75,11 +75,11 @@ COPY myFunction/* ${FUNCTION_DIR} WORKDIR ${FUNCTION_DIR} +RUN npm install + # If the dependency is not in package.json uncomment the following line # RUN npm install aws-lambda-ric -RUN npm install - # Grab a fresh slim copy of the image to reduce the final size FROM node:18-buster-slim diff --git a/THIRD-PARTY-LICENSES b/THIRD-PARTY-LICENSES index 91183f5..14a3456 100644 --- a/THIRD-PARTY-LICENSES +++ b/THIRD-PARTY-LICENSES @@ -234,7 +234,7 @@ OTHER DEALINGS IN THE SOFTWARE. ------ -** node-addon-api; version 6.0.0 -- https://github.com/nodejs/node-addon-api +** node-addon-api; version 6.1.0 -- https://github.com/nodejs/node-addon-api The MIT License (MIT) Copyright (c) 2017 Node.js API collaborators Node.js API collaborators listed at @@ -282,7 +282,7 @@ SOFTWARE. ------ -** libcurl; version 7.84.0 -- https://github.com/curl/curl +** libcurl; version 7.83.1 -- https://github.com/curl/curl Copyright (c) 1996 - 2020, Daniel Stenberg, , and many contributors, see the THANKS file. diff --git a/bin/index.js b/bin/index.js deleted file mode 100755 index c3f40b3..0000000 --- a/bin/index.js +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env node -/** Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -const lambda = require("../lib/index"); - -if(process.argv.length < 3) { - throw new Error("No handler specified"); -} - -const appRoot = process.cwd(); -const handler = process.argv[2]; - -console.log(`Executing '${handler}' in function directory '${appRoot}'`); -lambda.run(appRoot, handler); \ No newline at end of file diff --git a/bin/index.mjs b/bin/index.mjs new file mode 100755 index 0000000..5240e27 --- /dev/null +++ b/bin/index.mjs @@ -0,0 +1,14 @@ +#!/usr/bin/env node +/** Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +import { run } from "../dist/index.mjs" + +if (process.argv.length < 3) { + throw new Error("No handler specified"); +} + +const appRoot = process.cwd(); +const handler = process.argv[2]; + +console.log(`Executing '${handler}' in function directory '${appRoot}'`); +await run(appRoot, handler); \ No newline at end of file diff --git a/binding.gyp b/binding.gyp index dd36f5c..64349f0 100644 --- a/binding.gyp +++ b/binding.gyp @@ -1,9 +1,9 @@ { 'targets': [ { - 'target_name': 'runtime-client', + 'target_name': 'rapid-client', 'sources': [ - 'lib/RuntimeClient/runtime-client.cc', + 'src/rapid-client.cc', ], 'dependencies': [ "=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", + "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", - "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==", - "dev": true + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.5.tgz", + "integrity": "sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, "node_modules/@babel/core": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.14.tgz", - "integrity": "sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-compilation-targets": "^7.13.13", - "@babel/helper-module-transforms": "^7.13.14", - "@babel/helpers": "^7.13.10", - "@babel/parser": "^7.13.13", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.5.tgz", + "integrity": "sha512-SBuTAjg91A3eKOvD+bPEz3LlhHZRNu1nFOVts9lzDJTXshHTjII0BAtDS3Y2DAkdZdDKWVZGVwkDfc4Clxn1dg==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helpers": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" + "json5": "^2.2.2", + "semver": "^6.3.0" }, "engines": { "node": ">=6.9.0" @@ -69,15 +94,6 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.12.13" - } - }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -88,31 +104,48 @@ } }, "node_modules/@babel/generator": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", - "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.5.tgz", + "integrity": "sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA==", "dev": true, "dependencies": { - "@babel/types": "^7.13.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.22.5", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz", - "integrity": "sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.5.tgz", + "integrity": "sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.13.12", - "@babel/helper-validator-option": "^7.12.17", - "browserslist": "^4.14.5", + "@babel/compat-data": "^7.22.5", + "@babel/helper-validator-option": "^7.22.5", + "browserslist": "^4.21.3", + "lru-cache": "^5.1.1", "semver": "^6.3.0" }, + "engines": { + "node": ">=6.9.0" + }, "peerDependencies": { "@babel/core": "^7.0.0" } }, + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -122,131 +155,154 @@ "semver": "bin/semver.js" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", + "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", "dev": true, - "dependencies": { - "@babel/helper-get-function-arity": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/types": "^7.12.13" + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", - "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", + "node_modules/@babel/helper-function-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", + "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", "dev": true, "dependencies": { - "@babel/types": "^7.12.13" + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", - "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.13.12" + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", - "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", + "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", "dev": true, "dependencies": { - "@babel/types": "^7.13.12" + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz", - "integrity": "sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz", + "integrity": "sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.13.12", - "@babel/helper-replace-supers": "^7.13.12", - "@babel/helper-simple-access": "^7.13.12", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.12.11", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14" + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", - "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dev": true, "dependencies": { - "@babel/types": "^7.12.13" + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", - "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.5.tgz", + "integrity": "sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ==", "dev": true, "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.13.12", - "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.12" + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/helper-simple-access": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", - "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "dev": true, - "dependencies": { - "@babel/types": "^7.13.12" + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", - "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", "dev": true, - "dependencies": { - "@babel/types": "^7.12.13" + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true - }, "node_modules/@babel/helper-validator-option": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", - "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", - "dev": true + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", + "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, "node_modules/@babel/helpers": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", - "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.5.tgz", + "integrity": "sha512-pSXRmfE1vzcUIDFQcSGA5Mr+GxBV9oiRKDuDxXvWQQBCh8HoIjs/2DlDB7H8smac1IVrB9/xdXj2N3Wol9Cr+Q==", "dev": true, "dependencies": { - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", - "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", + "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.22.5", "chalk": "^2.0.0", "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/highlight/node_modules/ansi-styles": { @@ -287,13 +343,13 @@ "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "node_modules/@babel/highlight/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": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "engines": { "node": ">=0.8.0" @@ -302,7 +358,7 @@ "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, "engines": { "node": ">=4" @@ -321,9 +377,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", - "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.5.tgz", + "integrity": "sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -333,48 +389,38 @@ } }, "node_modules/@babel/template": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", - "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.12.13", - "@babel/types": "^7.12.13" - } - }, - "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", + "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", "dev": true, "dependencies": { - "@babel/highlight": "^7.12.13" + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", - "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.13", - "@babel/types": "^7.13.13", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.5.tgz", + "integrity": "sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5", "debug": "^4.1.0", "globals": "^11.1.0" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.12.13" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/traverse/node_modules/globals": { @@ -387,499 +433,772 @@ } }, "node_modules/@babel/types": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.14.tgz", - "integrity": "sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", + "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", "to-fast-properties": "^2.0.0" - } - }, - "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==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + "node": ">=6.9.0" } }, - "node_modules/@eslint-community/regexpp": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", - "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", + "node_modules/@esbuild/android-arm": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.3.tgz", + "integrity": "sha512-QOn3VIlL6Qv1eHBpQB/s7simaZgGss2ASyxDOwYSLmc6vD0uuizZkuYawHmuLjWEm5wPwp0JQWhbpaYwwGevYw==", + "cpu": [ + "arm" + ], "dev": true, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/@eslint/eslintrc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", - "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "node_modules/@esbuild/android-arm64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.3.tgz", + "integrity": "sha512-PgabCsoaEEnnOiF6rUhOBXgYoLFIrHWP6mfLOzuQ1oZ1lwBdTL0hp5ivC4K3Kvz3BD8EipjeQo6l0aty3nr4qQ==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.5.1", - "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==", - "dev": true - }, - "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/android-x64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.3.tgz", + "integrity": "sha512-1OkJf8wNX1W5ucbp5HrK+z42b9DINb4ix59oJH/PIsh9cyFMqjgRKtCBXg0zEWhkmP1k3egdfrnS7cDTpLH43g==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@eslint/js": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.38.0.tgz", - "integrity": "sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.3.tgz", + "integrity": "sha512-57aofORpY7wDAuMs6DeqpmgSnVfZ63RgGbR/BHdOSTqJgYvHDCMY7/o1myFntl3k0YxtLE3WAm56nMf4qy3UDw==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.3.tgz", + "integrity": "sha512-NVBqMnxT9qvgu7Z322LUDlwjh4GDk6wEePyAQnHF9noxik/WvLFmr5v3Vgz5LSvqFducLCxsdmLztKhdpFW0Gg==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, + "optional": true, + "os": [ + "darwin" + ], "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==", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.3.tgz", + "integrity": "sha512-XiLK1AsCk2wKxN7j8h9GXXCs8FPZhp07U0rnpwRkAVSVGgLaIWYSqpTRzKjAfqJiZlp+XKo1HwsmDdICEKB3Dg==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "node": ">=12" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.3.tgz", + "integrity": "sha512-xyITfrF0G3l1gwR79hvNCCWKQ/16uK14xNNPFgzjbIqF4EpBvhO6l3jrWxXFUW51z6dVIl2Szh3x3uIbBWzH1Q==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/@esbuild/linux-arm": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.3.tgz", + "integrity": "sha512-fc/T0QHMzvmnlF+kfD6bHLB8u+17gg13260p/E86yYjVoKNFjonL/+Y0GGQjMbFUas9QijqOa7pcR00a9RNkwg==", + "cpu": [ + "arm" + ], "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.3.tgz", + "integrity": "sha512-lsKUYVd8L/j2uNs8dhMjMsKC5MHYh77gR9EThu7YCeeFz1XpIkx1I4a7mhoVfPS2VPVD1pMCh+PgxuAHUcEmXw==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.3.tgz", + "integrity": "sha512-EyfGWeOwRqK5Xj18vok0qv8IFBZ1/+hKV+cqD44oVhGsxHo9TmPtoSiDrWn8Sa2swq/VuO5Aiog6YPDj81oIkA==", + "cpu": [ + "ia32" + ], "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.3.tgz", + "integrity": "sha512-PwXkcl3t0kSeYH5RuJIeh/fHOzKZd+ZdifAWzpVO+9TLWArutTFBJvOSkTZ3CcqQqNrTj1Qyo6nqE8MQj/a7cQ==", + "cpu": [ + "loong64" + ], "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.3.tgz", + "integrity": "sha512-CRVkkSXf5GQcq7Am2a2tdIn85oqi/bkjuPvhNqcdeTgI0xgNbqLnEPRy2AEGkRuaJWB5uCX1IC4sqnY8ET14Yg==", + "cpu": [ + "mips64el" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.3.tgz", + "integrity": "sha512-t7zK1Cheh0xvzfZbimztiE0wGnpV+YRsBg3tefcEBN3O4GzgLu6fFpA5HxEyVm3hHZW1jAC4OhoGEp7C5Ii6Eg==", + "cpu": [ + "ppc64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.3.tgz", + "integrity": "sha512-fUZPtyCYih6y4lDYdSM4Yoax4nS7aH0/XixJStys+9tfp5cAlIAZhEVKOOdeGXmQn0IEyiUtlIsPnfObbeDQfQ==", + "cpu": [ + "riscv64" + ], "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 8" + "node": ">=12" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.3.tgz", + "integrity": "sha512-oIcK2LqHWqfMERqjvaKJ3QJmycHn723HsXIv5gH4iGfmePfSj+gi0ZQv2h4bHUg2bs2gJtV0DlIjGhEuvdgxLw==", + "cpu": [ + "s390x" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 8" + "node": ">=12" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/@esbuild/linux-x64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.3.tgz", + "integrity": "sha512-RW9lpfZ6XZ6f5to2DJPvt0f/4RXEW229Xf++quVoW+YbnPrcapIJChtD/AmZ8cK3hglO/hXxJjs21pV0/l7L5w==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 8" + "node": ">=12" } }, - "node_modules/@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", - "dependencies": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" - }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.3.tgz", + "integrity": "sha512-piZ2oBoaq58pKZvhgdV6PemlL30Uhd9GmmOkIGZYgChwNcyVSSl6iMEJxMzU7x44Lk9q+hJ6a343M/iVEMEvxA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/@npmcli/move-file": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", - "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", - "deprecated": "This functionality has been moved to @npmcli/fs", - "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.3.tgz", + "integrity": "sha512-vaMfouYTz/4tKdQsXDccqhV6wgPEr+hfuxdNU5Pl/vQxYTsqcXv5DYEa5Z1RAxCoua5aEB+Uj5V7VT/bM92wxw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.3.tgz", + "integrity": "sha512-Fa3rNQQ9q1qwy9u2cdDvuGKy3jmPnPPMDdyy/qbn5d395Pb9hjLYiPzX9BozXMPJDlCNofSY7jN3miM9gyAdHA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": ">= 10" + "node": ">=12" } }, - "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.3.tgz", + "integrity": "sha512-LPJC8ub+9uzyC6ygVmp00dAqet1q1DsZ/OldGIIBt+y+Ctd1OfnKNlzQgXK8nxwY1G8fAhklFSeSRRgAUJnR0w==", + "cpu": [ + "arm64" + ], "dev": true, - "optional": true - }, - "node_modules/@types/mocha": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", - "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", - "dev": true + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/@types/node": { - "version": "18.15.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", - "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==", - "dev": true + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.3.tgz", + "integrity": "sha512-WtUyRspyxZR6NTc2HG4xd9Wvz8lP4C6OUY1gAqisrf151HvXIxsK0mfAacFJNS7EN2wvPTgjP+SM8vgBOx5+zA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", - "dev": true + "node_modules/@esbuild/win32-x64": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.3.tgz", + "integrity": "sha512-Z8qCK4BkBm40j5KUM4NrkxYQS0R12cBO1NBVtI4vws6uwh1n/VaNu31Hm+n2cJUWdFbfH57PBghkhm9yLgmPfw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.58.0.tgz", - "integrity": "sha512-vxHvLhH0qgBd3/tW6/VccptSfc8FxPQIkmNTVLWcCOVqSBvqpnKkBTYrhcGlXfSnd78azwe+PsjYFj0X34/njA==", + "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==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.58.0", - "@typescript-eslint/type-utils": "5.58.0", - "@typescript-eslint/utils": "5.58.0", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", + "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@typescript-eslint/parser": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.58.0.tgz", - "integrity": "sha512-ixaM3gRtlfrKzP8N6lRhBbjTow1t6ztfBvQNGuRM8qH1bjFFXIJ35XY+FC0RRBKn3C6cT+7VW1y8tNm7DwPHDQ==", + "node_modules/@eslint/eslintrc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.58.0", - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/typescript-estree": "5.58.0", - "debug": "^4.3.4" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.5.2", + "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": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "url": "https://opencollective.com/eslint" } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.58.0.tgz", - "integrity": "sha512-b+w8ypN5CFvrXWQb9Ow9T4/6LC2MikNf1viLkYTiTbkQl46CnR69w7lajz1icW0TBsYmlpg+mRzFJ4LEJ8X9NA==", + "node_modules/@eslint/js": { + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.42.0.tgz", + "integrity": "sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==", "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/visitor-keys": "5.58.0" - }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/type-utils": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.58.0.tgz", - "integrity": "sha512-FF5vP/SKAFJ+LmR9PENql7fQVVgGDOS+dq3j+cKl9iW/9VuZC/8CFmzIP0DLKXfWKpRHawJiG70rVH+xZZbp8w==", + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.58.0", - "@typescript-eslint/utils": "5.58.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=10.10.0" } }, - "node_modules/@typescript-eslint/types": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.58.0.tgz", - "integrity": "sha512-JYV4eITHPzVQMnHZcYJXl2ZloC7thuUHrcUmxtzvItyKPvQ50kb9QXBkgNAt90OYMqwaodQh2kHutWZl1fc+1g==", + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12.22" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.58.0.tgz", - "integrity": "sha512-cRACvGTodA+UxnYM2uwA2KCwRL7VAzo45syNysqlMyNyjw0Z35Icc9ihPJZjIYuA5bXJYiJ2YGUB59BqlOZT1Q==", - "dev": true, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dependencies": { - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/visitor-keys": "5.58.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" + } + }, + "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==", + "engines": { + "node": ">=12" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "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==", + "engines": { + "node": ">=12" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@typescript-eslint/utils": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.58.0.tgz", - "integrity": "sha512-gAmLOTFXMXOC+zP1fsqm3VceKSBQJNzV385Ok3+yzlavNHZoedajjS4UyS21gabJYcobuigQPs/z71A9MdJFqQ==", - "dev": true, + "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==" + }, + "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==", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.58.0", - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/typescript-estree": "5.58.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.58.0.tgz", - "integrity": "sha512-/fBraTlPj0jwdyTwLyrRTxv/3lnU2H96pNTVM6z3esTWLtA5MZ9ghSMJ7Rb+TtUAdtEw9EyJzJ0EydIMKxQ9gA==", - "dev": true, + "node_modules/@isaacs/cliui/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==", "dependencies": { - "@typescript-eslint/types": "5.58.0", - "eslint-visitor-keys": "^3.3.0" + "ansi-regex": "^6.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/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, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "engines": { + "node": ">= 10" } }, "node_modules/abbrev": { @@ -888,9 +1207,9 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", + "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -981,7 +1300,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -993,9 +1311,9 @@ } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { "normalize-path": "^3.0.0", @@ -1025,7 +1343,7 @@ "node_modules/archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "dev": true }, "node_modules/are-we-there-yet": { @@ -1041,46 +1359,64 @@ } }, "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "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.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "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==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "ms": "2.0.0" } }, + "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==", + "dev": true + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1109,60 +1445,66 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.16.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", - "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "dependencies": { - "caniuse-lite": "^1.0.30001219", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.723", - "escalade": "^3.1.1", - "node-releases": "^1.1.71" + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" }, "bin": { "browserslist": "cli.js" }, "engines": { "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" } }, - "node_modules/buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "node_modules/cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", - "dependencies": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "glob": "^8.0.1", - "infer-owner": "^1.0.4", + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacache": { + "version": "17.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.3.tgz", + "integrity": "sha512-jAdjGxmPxZh0IipMdR7fK/4sDSrHMLUV0+GvVUsjwyGNKHsh79kW/otg+GkbXwl6Uzvy9wsvHOX4nUoWldeZMg==", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", "lru-cache": "^7.7.1", - "minipass": "^3.1.6", + "minipass": "^5.0.0", "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", + "ssri": "^10.0.0", "tar": "^6.1.11", - "unique-filename": "^2.0.0" + "unique-filename": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/cacache/node_modules/brace-expansion": { @@ -1173,55 +1515,65 @@ "balanced-match": "^1.0.0" } }, - "node_modules/cacache/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "node_modules/cacache/node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" }, "engines": { - "node": ">=12" + "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/cacache/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==", + "node_modules/cacache/node_modules/glob": { + "version": "10.2.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.2.7.tgz", + "integrity": "sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.0.3", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2", + "path-scurry": "^1.7.0" + }, + "bin": { + "glob": "dist/cjs/src/bin.js" + }, "engines": { - "node": ">=12" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/cacache/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", + "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/cacache/node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dependencies": { - "aggregate-error": "^3.0.0" - }, + "node_modules/cacache/node_modules/signal-exit": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz", + "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==", "engines": { - "node": ">=10" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/caching-transform": { @@ -1239,6 +1591,19 @@ "node": ">=8" } }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1258,19 +1623,29 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001235", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001235.tgz", - "integrity": "sha512-zWEwIVqnzPkSAXOUlQnPW2oKoYb2aLQ4Q5ejdjBcnH63rfypaW34CxaeBn1VMya2XaEU3P/R2qHpWyj+l0BT1A==", + "version": "1.0.30001503", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001503.tgz", + "integrity": "sha512-Sf9NiF+wZxPfzv8Z3iS0rXM1Do+iOy2Lxvib38glFX+08TCYYYGR5fRJXk4d77C4AYwhUjgYgMsMudbh2TqCKw==", "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } + "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" + } + ] }, "node_modules/chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { "ansi-styles": "^4.1.0", @@ -1310,6 +1685,18 @@ "fsevents": "~2.3.2" } }, + "node_modules/chokidar/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, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", @@ -1341,7 +1728,6 @@ "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, "dependencies": { "color-name": "~1.1.4" }, @@ -1352,8 +1738,7 @@ "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 + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/color-support": { "version": "1.1.3", @@ -1363,42 +1748,71 @@ "color-support": "bin.js" } }, - "node_modules/colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", - "dev": true - }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "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==", + "dev": true, + "dependencies": { + "ms": "2.0.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 }, "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/convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "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==", "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" + "engines": { + "node": ">= 0.6" } }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, "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==", - "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1427,28 +1841,31 @@ "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "node_modules/default-require-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz", + "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==", "dev": true, "dependencies": { "strip-bom": "^4.0.0" }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/delegates": { @@ -1464,6 +1881,16 @@ "node": ">= 0.8" } }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, "node_modules/diff": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", @@ -1473,18 +1900,6 @@ "node": ">=0.3.1" } }, - "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, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -1497,10 +1912,21 @@ "node": ">=6.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/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 + }, "node_modules/electron-to-chromium": { - "version": "1.3.749", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.749.tgz", - "integrity": "sha512-F+v2zxZgw/fMwPz/VUGIggG4ZndDsYy0vlpthi3tjmDZlcfbhN5mYW0evXUsBr2sUtuDANFtle410A9u/sd/4A==", + "version": "1.4.432", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.432.tgz", + "integrity": "sha512-yz3U/khQgAFT2HURJA3/F4fKIyO2r5eK09BQzBZFd6BvBSSaRuzKc2ZNBHtJcO75/EKiRYbVYJZ2RB0P4BuD2g==", "dev": true }, "node_modules/emoji-regex": { @@ -1508,6 +1934,15 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, + "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, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/encoding": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", @@ -1517,6 +1952,18 @@ "iconv-lite": "^0.6.2" } }, + "node_modules/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==", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/env-paths": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", @@ -1536,6 +1983,43 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "node_modules/esbuild": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.3.tgz", + "integrity": "sha512-eadWJC4CRpj93+miO5ZBlvCv+m2x6pzyNBznTvUeLFObMmxs1IMd8cCf6qiDVEZuDL6W8W7u+ZNW3GKEfOdDsA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.3", + "@esbuild/android-arm64": "0.18.3", + "@esbuild/android-x64": "0.18.3", + "@esbuild/darwin-arm64": "0.18.3", + "@esbuild/darwin-x64": "0.18.3", + "@esbuild/freebsd-arm64": "0.18.3", + "@esbuild/freebsd-x64": "0.18.3", + "@esbuild/linux-arm": "0.18.3", + "@esbuild/linux-arm64": "0.18.3", + "@esbuild/linux-ia32": "0.18.3", + "@esbuild/linux-loong64": "0.18.3", + "@esbuild/linux-mips64el": "0.18.3", + "@esbuild/linux-ppc64": "0.18.3", + "@esbuild/linux-riscv64": "0.18.3", + "@esbuild/linux-s390x": "0.18.3", + "@esbuild/linux-x64": "0.18.3", + "@esbuild/netbsd-x64": "0.18.3", + "@esbuild/openbsd-x64": "0.18.3", + "@esbuild/sunos-x64": "0.18.3", + "@esbuild/win32-arm64": "0.18.3", + "@esbuild/win32-ia32": "0.18.3", + "@esbuild/win32-x64": "0.18.3" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -1545,6 +2029,12 @@ "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 + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -1558,16 +2048,16 @@ } }, "node_modules/eslint": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz", - "integrity": "sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==", + "version": "8.42.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.42.0.tgz", + "integrity": "sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.38.0", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.42.0", + "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -1576,9 +2066,9 @@ "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.1", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1586,13 +2076,12 @@ "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -1648,37 +2137,6 @@ } }, "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "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==", - "dev": true - }, - "node_modules/eslint/node_modules/eslint-scope": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", @@ -1694,48 +2152,27 @@ "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==", - "dev": true, - "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==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, "engines": { - "node": ">=10.13.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==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/espree": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", - "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "dev": true, "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1769,15 +2206,6 @@ "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==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -1790,7 +2218,7 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { + "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", @@ -1799,15 +2227,6 @@ "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==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -1817,6 +2236,11 @@ "node": ">=0.10.0" } }, + "node_modules/exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1824,27 +2248,11 @@ "dev": true }, "node_modules/fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "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 }, - "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "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", @@ -1854,7 +2262,7 @@ "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, "node_modules/fastq": { @@ -1890,35 +2298,80 @@ "node": ">=8" } }, - "node_modules/find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", "dev": true, "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "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": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + "node": ">= 0.8" } }, - "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==", + "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, "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, + "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 + }, + "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, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } @@ -1946,9 +2399,9 @@ } }, "node_modules/flatted": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, "node_modules/foreground-child": { @@ -1985,20 +2438,20 @@ ] }, "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.2.tgz", + "integrity": "sha512-2GAfyfoaCDRrM6jaOS3UsBts8yJ55VioXdWcOL7dK9zdAuKT71+WBA4ifnNYqVjYv+4SsPxjK0JT4yIIn4cA/g==", "dependencies": { - "minipass": "^3.0.0" + "minipass": "^5.0.0" }, "engines": { - "node": ">= 8" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fsevents": { "version": "2.3.2", @@ -2014,6 +2467,12 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "node_modules/gauge": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", @@ -2050,6 +2509,21 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -2079,15 +2553,15 @@ } }, "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==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/globals": { @@ -2105,37 +2579,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "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==" + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "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" + "function-bind": "^1.1.1" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 0.4.0" } }, - "node_modules/graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" - }, - "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 - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -2145,6 +2611,30 @@ "node": ">=8" } }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -2195,6 +2685,31 @@ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, + "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==", + "dev": true, + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/http-proxy-agent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", @@ -2244,12 +2759,12 @@ } }, "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==", - "optional": true, + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" + "safer-buffer": ">= 2.1.2 < 3" }, "engines": { "node": ">=0.10.0" @@ -2283,7 +2798,7 @@ "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "engines": { "node": ">=0.8.19" } @@ -2296,15 +2811,10 @@ "node": ">=8" } }, - "node_modules/infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" - }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -2335,7 +2845,7 @@ "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "engines": { "node": ">=0.10.0" @@ -2394,18 +2904,21 @@ } }, "node_modules/is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, "node_modules/is-unicode-supported": { @@ -2432,12 +2945,12 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", "dev": true, "engines": { "node": ">=8" @@ -2480,18 +2993,29 @@ } }, "node_modules/istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", + "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", "dev": true, "dependencies": { "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", + "cross-spawn": "^7.0.3", + "istanbul-lib-coverage": "^3.2.0", "p-map": "^3.0.0", "rimraf": "^3.0.0", - "uuid": "^3.3.3" + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-processinfo/node_modules/p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" }, "engines": { "node": ">=8" @@ -2512,9 +3036,9 @@ } }, "node_modules/istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "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, "dependencies": { "debug": "^4.1.1", @@ -2522,22 +3046,13 @@ "source-map": "^0.6.1" }, "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-source-maps/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, "node_modules/istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -2547,14 +3062,21 @@ "node": ">=8" } }, - "node_modules/js-sdsl": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", - "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", - "dev": true, + "node_modules/jackspeak": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", + "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" } }, "node_modules/js-tokens": { @@ -2564,13 +3086,12 @@ "dev": true }, "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==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" @@ -2597,7 +3118,7 @@ "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": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, "node_modules/json5": { @@ -2640,16 +3161,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "node_modules/lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", "dev": true }, "node_modules/lodash.merge": { @@ -2675,14 +3190,11 @@ } }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/make-dir": { @@ -2709,66 +3221,59 @@ "semver": "bin/semver.js" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, "node_modules/make-fetch-happen": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", - "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", "dependencies": { "agentkeepalive": "^4.2.1", - "cacache": "^16.1.0", - "http-cache-semantics": "^4.1.0", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", "promise-retry": "^2.0.1", "socks-proxy-agent": "^7.0.0", - "ssri": "^9.0.0" + "ssri": "^10.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/make-fetch-happen/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==", + "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==", + "dev": true, "engines": { - "node": ">=12" + "node": ">= 0.6" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, "engines": { - "node": ">= 8" + "node": ">= 0.6" } }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" + "mime-db": "1.52.0" }, "engines": { - "node": ">=8.6" + "node": ">= 0.6" } }, "node_modules/minimatch": { @@ -2782,19 +3287,10 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, "node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dependencies": { - "yallist": "^4.0.0" - }, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "engines": { "node": ">=8" } @@ -2810,17 +3306,28 @@ "node": ">= 8" } }, + "node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-fetch": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", - "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.3.tgz", + "integrity": "sha512-n5ITsTkDqYkYJZjcRWzZt9qnZKCT7nKCosJhHoj7S7zD+BP4jVbWs+odsniw5TA3E0sLomhTKOKjF86wf11PuQ==", "dependencies": { - "minipass": "^3.1.6", + "minipass": "^5.0.0", "minipass-sized": "^1.0.3", "minizlib": "^2.1.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "optionalDependencies": { "encoding": "^0.1.13" @@ -2837,6 +3344,17 @@ "node": ">= 8" } }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-pipeline": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", @@ -2848,6 +3366,17 @@ "node": ">=8" } }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-sized": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", @@ -2859,16 +3388,38 @@ "node": ">=8" } }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dependencies": { - "minipass": "^3.0.0", "yallist": "^4.0.0" }, "engines": { - "node": ">= 8" + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/mkdirp": { @@ -2922,12 +3473,6 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "node_modules/mocha/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -2937,18 +3482,6 @@ "balanced-match": "^1.0.0" } }, - "node_modules/mocha/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==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/mocha/node_modules/minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -2982,11 +3515,62 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/mock-http-server": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/mock-http-server/-/mock-http-server-1.4.5.tgz", + "integrity": "sha512-7WZx7RJmMQEvTxJTOJt9U6+gLFl0JFaPHLSsAngfLaOgr3UH+ci7PW8049quyXwZGI4mh3W8oAch6w406ccyRQ==", + "dev": true, + "dependencies": { + "body-parser": "^1.18.1", + "connect": "^3.4.0", + "multiparty": "^4.1.2", + "underscore": "^1.8.3" + } + }, "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/multiparty": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/multiparty/-/multiparty-4.2.3.tgz", + "integrity": "sha512-Ak6EUJZuhGS8hJ3c2fY6UW5MbkGUPMBEGd13djUzoY/BHqV/gTuFWtC6IuVA7A2+v3yjBS6c4or50xhzTQZImQ==", + "dev": true, + "dependencies": { + "http-errors": "~1.8.1", + "safe-buffer": "5.2.1", + "uid-safe": "2.1.5" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/multiparty/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/multiparty/node_modules/http-errors": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", + "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "dev": true, + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/nanoid": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", @@ -3002,13 +3586,7 @@ "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, "node_modules/negotiator": { @@ -3020,19 +3598,20 @@ } }, "node_modules/node-addon-api": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.0.0.tgz", - "integrity": "sha512-GyHvgPvUXBvAkXa0YvYnhilSB1A+FRYMpIVggKzPZqdaZfevZOuzfWzyvgzOwRLHBeo/MMswmJFsrNF4Nw1pmA==" + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", + "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" }, "node_modules/node-gyp": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz", - "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.4.0.tgz", + "integrity": "sha512-dMXsYP6gc9rRbejLXmTbVRYjAHw7ppswsKyMxuxJxxOHzluIO1rGp9TOQgjFJ+2MCqcOcQTOPB/8Xwhr+7s4Eg==", "dependencies": { "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", "glob": "^7.1.4", "graceful-fs": "^4.2.6", - "make-fetch-happen": "^10.0.3", + "make-fetch-happen": "^11.0.3", "nopt": "^6.0.0", "npmlog": "^6.0.0", "rimraf": "^3.0.2", @@ -3060,9 +3639,9 @@ } }, "node_modules/node-releases": { - "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", + "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", "dev": true }, "node_modules/nopt": { @@ -3206,6 +3785,18 @@ "node": ">=8" } }, + "node_modules/nyc/node_modules/p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/nyc/node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -3230,9 +3821,9 @@ } }, "node_modules/nyc/node_modules/y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "node_modules/nyc/node_modules/yargs": { @@ -3258,4016 +3849,631 @@ } }, "node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "2.8.7", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.7.tgz", - "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", - "dev": true, - "dependencies": { - "fromentries": "^1.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==" - }, - "node_modules/promise-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", - "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", - "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "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" - } - ] - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "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==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", - "dev": true, - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "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==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "engines": { - "node": ">= 4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "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" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "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==", - "optional": true - }, - "node_modules/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/should": { - "version": "13.2.3", - "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", - "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", - "dev": true, - "dependencies": { - "should-equal": "^2.0.0", - "should-format": "^3.0.3", - "should-type": "^1.4.0", - "should-type-adaptors": "^1.0.1", - "should-util": "^1.0.0" - } - }, - "node_modules/should-equal": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", - "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", - "dev": true, - "dependencies": { - "should-type": "^1.4.0" - } - }, - "node_modules/should-format": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", - "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", - "dev": true, - "dependencies": { - "should-type": "^1.3.0", - "should-type-adaptors": "^1.0.1" - } - }, - "node_modules/should-type": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", - "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=", - "dev": true - }, - "node_modules/should-type-adaptors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", - "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", - "dev": true, - "dependencies": { - "should-type": "^1.3.0", - "should-util": "^1.0.0" - } - }, - "node_modules/should-util": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", - "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==", - "dev": true - }, - "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/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "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==", - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", - "dependencies": { - "ip": "^2.0.0", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", - "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "dev": true, - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "node_modules/ssri": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", - "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", - "dependencies": { - "minipass": "^3.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "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==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string_decoder/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==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "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==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tar": { - "version": "6.1.14", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.14.tgz", - "integrity": "sha512-piERznXu0U7/pW7cdSn7hjqySIVTYT6F76icmFk7ptU7dDYlXTm5r9A6K04R2vU3olYgoKeo1Cg3eeu5nhftAw==", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/tar/node_modules/minipass": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", - "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz", - "integrity": "sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw==", - "dev": true, - "dependencies": { - "ts-node": "7.0.1" - }, - "bin": { - "ts-mocha": "bin/ts-mocha" - }, - "engines": { - "node": ">= 6.X.X" - }, - "optionalDependencies": { - "tsconfig-paths": "^3.5.0" - }, - "peerDependencies": { - "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X" - } - }, - "node_modules/ts-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", - "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", - "dev": true, - "dependencies": { - "arrify": "^1.0.0", - "buffer-from": "^1.1.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.5.6", - "yn": "^2.0.0" - }, - "bin": { - "ts-node": "dist/bin.js" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/ts-node/node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/ts-node/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/tsconfig-paths": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", - "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", - "dev": true, - "optional": true, - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.1", - "minimist": "^1.2.0", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "optional": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/tsconfig-paths/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true, - "optional": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/unique-filename": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", - "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", - "dependencies": { - "unique-slug": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/unique-slug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", - "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", - "dependencies": { - "imurmurhash": "^0.1.4" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "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, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/y18n": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", - "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "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, - "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/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, - "dependencies": { - "@babel/compat-data": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", - "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==", - "dev": true - }, - "@babel/core": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.14.tgz", - "integrity": "sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-compilation-targets": "^7.13.13", - "@babel/helper-module-transforms": "^7.13.14", - "@babel/helpers": "^7.13.10", - "@babel/parser": "^7.13.13", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "dev": true, - "requires": { - "@babel/highlight": "^7.12.13" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "@babel/generator": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", - "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", - "dev": true, - "requires": { - "@babel/types": "^7.13.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, - "@babel/helper-compilation-targets": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz", - "integrity": "sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.13.12", - "@babel/helper-validator-option": "^7.12.17", - "browserslist": "^4.14.5", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "@babel/helper-function-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/types": "^7.12.13" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", - "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", - "dev": true, - "requires": { - "@babel/types": "^7.12.13" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", - "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", - "dev": true, - "requires": { - "@babel/types": "^7.13.12" - } - }, - "@babel/helper-module-imports": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", - "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", - "dev": true, - "requires": { - "@babel/types": "^7.13.12" - } - }, - "@babel/helper-module-transforms": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz", - "integrity": "sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.13.12", - "@babel/helper-replace-supers": "^7.13.12", - "@babel/helper-simple-access": "^7.13.12", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.12.11", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", - "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", - "dev": true, - "requires": { - "@babel/types": "^7.12.13" - } - }, - "@babel/helper-replace-supers": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", - "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.13.12", - "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.12" - } - }, - "@babel/helper-simple-access": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", - "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", - "dev": true, - "requires": { - "@babel/types": "^7.13.12" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", - "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", - "dev": true, - "requires": { - "@babel/types": "^7.12.13" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", - "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", - "dev": true - }, - "@babel/helpers": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", - "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", - "dev": true, - "requires": { - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" - } - }, - "@babel/highlight": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", - "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "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, - "requires": { - "color-convert": "^1.9.0" - } - }, - "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, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "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, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "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, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", - "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", - "dev": true - }, - "@babel/template": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", - "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.12.13", - "@babel/types": "^7.12.13" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "dev": true, - "requires": { - "@babel/highlight": "^7.12.13" - } - } - } - }, - "@babel/traverse": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", - "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.13", - "@babel/types": "^7.13.13", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "dev": true, - "requires": { - "@babel/highlight": "^7.12.13" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.14.tgz", - "integrity": "sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", - "to-fast-properties": "^2.0.0" - } - }, - "@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==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^3.3.0" - } - }, - "@eslint-community/regexpp": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", - "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", - "dev": true - }, - "@eslint/eslintrc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", - "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.5.1", - "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" - }, - "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - } - } - }, - "@eslint/js": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.38.0.tgz", - "integrity": "sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==", - "dev": true - }, - "@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" - }, - "@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - } - }, - "@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", - "requires": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" - } - }, - "@npmcli/move-file": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", - "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", - "requires": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - } - }, - "@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==" - }, - "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", - "dev": true, - "optional": true - }, - "@types/mocha": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", - "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", - "dev": true - }, - "@types/node": { - "version": "18.15.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", - "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==", - "dev": true - }, - "@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", - "dev": true - }, - "@typescript-eslint/eslint-plugin": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.58.0.tgz", - "integrity": "sha512-vxHvLhH0qgBd3/tW6/VccptSfc8FxPQIkmNTVLWcCOVqSBvqpnKkBTYrhcGlXfSnd78azwe+PsjYFj0X34/njA==", - "dev": true, - "requires": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.58.0", - "@typescript-eslint/type-utils": "5.58.0", - "@typescript-eslint/utils": "5.58.0", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/parser": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.58.0.tgz", - "integrity": "sha512-ixaM3gRtlfrKzP8N6lRhBbjTow1t6ztfBvQNGuRM8qH1bjFFXIJ35XY+FC0RRBKn3C6cT+7VW1y8tNm7DwPHDQ==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.58.0", - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/typescript-estree": "5.58.0", - "debug": "^4.3.4" - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.58.0.tgz", - "integrity": "sha512-b+w8ypN5CFvrXWQb9Ow9T4/6LC2MikNf1viLkYTiTbkQl46CnR69w7lajz1icW0TBsYmlpg+mRzFJ4LEJ8X9NA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/visitor-keys": "5.58.0" - } - }, - "@typescript-eslint/type-utils": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.58.0.tgz", - "integrity": "sha512-FF5vP/SKAFJ+LmR9PENql7fQVVgGDOS+dq3j+cKl9iW/9VuZC/8CFmzIP0DLKXfWKpRHawJiG70rVH+xZZbp8w==", - "dev": true, - "requires": { - "@typescript-eslint/typescript-estree": "5.58.0", - "@typescript-eslint/utils": "5.58.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/types": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.58.0.tgz", - "integrity": "sha512-JYV4eITHPzVQMnHZcYJXl2ZloC7thuUHrcUmxtzvItyKPvQ50kb9QXBkgNAt90OYMqwaodQh2kHutWZl1fc+1g==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.58.0.tgz", - "integrity": "sha512-cRACvGTodA+UxnYM2uwA2KCwRL7VAzo45syNysqlMyNyjw0Z35Icc9ihPJZjIYuA5bXJYiJ2YGUB59BqlOZT1Q==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/visitor-keys": "5.58.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/utils": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.58.0.tgz", - "integrity": "sha512-gAmLOTFXMXOC+zP1fsqm3VceKSBQJNzV385Ok3+yzlavNHZoedajjS4UyS21gabJYcobuigQPs/z71A9MdJFqQ==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.58.0", - "@typescript-eslint/types": "5.58.0", - "@typescript-eslint/typescript-estree": "5.58.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.58.0.tgz", - "integrity": "sha512-/fBraTlPj0jwdyTwLyrRTxv/3lnU2H96pNTVM6z3esTWLtA5MZ9ghSMJ7Rb+TtUAdtEw9EyJzJ0EydIMKxQ9gA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.58.0", - "eslint-visitor-keys": "^3.3.0" - } - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} - }, - "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==", - "requires": { - "debug": "4" - } - }, - "agentkeepalive": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.3.0.tgz", - "integrity": "sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg==", - "requires": { - "debug": "^4.1.0", - "depd": "^2.0.0", - "humanize-ms": "^1.2.1" - } - }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", - "dev": true, - "requires": { - "default-require-extensions": "^3.0.0" - } - }, - "aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, - "are-we-there-yet": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", - "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserslist": { - "version": "4.16.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", - "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001219", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.723", - "escalade": "^3.1.1", - "node-releases": "^1.1.71" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", - "requires": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "glob": "^8.0.1", - "infer-owner": "^1.0.4", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", - "tar": "^6.1.11", - "unique-filename": "^2.0.0" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "requires": { - "balanced-match": "^1.0.0" - } - }, - "glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - } - }, - "lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==" - }, - "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "requires": { - "aggregate-error": "^3.0.0" - } - } - } - }, - "caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", - "dev": true, - "requires": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001235", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001235.tgz", - "integrity": "sha512-zWEwIVqnzPkSAXOUlQnPW2oKoYb2aLQ4Q5ejdjBcnH63rfypaW34CxaeBn1VMya2XaEU3P/R2qHpWyj+l0BT1A==", - "dev": true - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.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" - } - }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" - }, - "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, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "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, - "requires": { - "color-name": "~1.1.4" - } - }, - "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 - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" - }, - "colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "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==" - }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "default-require-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", - "dev": true, - "requires": { - "strip-bom": "^4.0.0" - } - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" - }, - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" - }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, - "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, - "requires": { - "path-type": "^4.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "electron-to-chromium": { - "version": "1.3.749", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.749.tgz", - "integrity": "sha512-F+v2zxZgw/fMwPz/VUGIggG4ZndDsYy0vlpthi3tjmDZlcfbhN5mYW0evXUsBr2sUtuDANFtle410A9u/sd/4A==", - "dev": true - }, - "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==" - }, - "encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "optional": true, - "requires": { - "iconv-lite": "^0.6.2" - } - }, - "env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==" - }, - "err-code": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" - }, - "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 - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "eslint": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz", - "integrity": "sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.38.0", - "@humanwhocodes/config-array": "^0.11.8", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "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.1.1", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.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", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "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.1", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "eslint-scope": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", - "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - } - } - }, - "eslint-config-prettier": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", - "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", - "dev": true, - "requires": {} - }, - "eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0" - } - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", - "dev": true - }, - "espree": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", - "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", - "dev": true, - "requires": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.0" - } - }, - "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 - }, - "esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, - "fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "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==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", - "dev": true - }, - "foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - } - }, - "fromentries": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", - "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", - "dev": true - }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "requires": { - "minipass": "^3.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "gauge": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", - "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", - "requires": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - } - }, - "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==", - "dev": true - }, - "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 - }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-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, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "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" - } - }, - "graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" - }, - "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 - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" - }, - "hasha": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", - "dev": true, - "requires": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "dependencies": { - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - } - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "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 - }, - "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==" - }, - "http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "requires": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - } - }, - "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==", - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "requires": { - "ms": "^2.0.0" - } - }, - "husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", - "dev": true - }, - "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==", - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - }, - "ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" - }, - "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, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "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==" - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-lambda": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" - }, - "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 - }, - "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==", - "dev": true - }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", - "dev": true, - "requires": { - "append-transform": "^2.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", - "dev": true, - "requires": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^3.3.3" - } - }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - } - }, - "istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "js-sdsl": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", - "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", - "dev": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "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, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "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": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "make-fetch-happen": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", - "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", - "requires": { - "agentkeepalive": "^4.2.1", - "cacache": "^16.1.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^7.0.0", - "ssri": "^9.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==" - } - } - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, - "minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "requires": { - "yallist": "^4.0.0" - } - }, - "minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-fetch": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", - "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", - "requires": { - "encoding": "^0.1.13", - "minipass": "^3.1.6", - "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" - } - }, - "minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-sized": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", - "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", - "requires": { - "minipass": "^3.0.0" - } - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - }, - "mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", - "dev": true, - "requires": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "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, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, - "negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" - }, - "node-addon-api": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.0.0.tgz", - "integrity": "sha512-GyHvgPvUXBvAkXa0YvYnhilSB1A+FRYMpIVggKzPZqdaZfevZOuzfWzyvgzOwRLHBeo/MMswmJFsrNF4Nw1pmA==" - }, - "node-gyp": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz", - "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==", - "requires": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^10.0.3", - "nopt": "^6.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - } - }, - "node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "dev": true, - "requires": { - "process-on-spawn": "^1.0.0" - } - }, - "node-releases": { - "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", - "dev": true - }, - "nopt": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", - "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", - "requires": { - "abbrev": "^1.0.0" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "npmlog": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", - "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", - "requires": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - } - }, - "nyc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", - "dev": true, - "requires": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" }, + "engines": { + "node": ">=6" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "funding": { + "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, "dependencies": { - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", - "dev": true - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" } }, - "once": { + "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { "wrappy": "1" } }, - "optionator": { + "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, - "requires": { + "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" } }, - "p-limit": { + "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "requires": { + "dependencies": { "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "p-locate": { + "node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "requires": { + "dependencies": { "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "requires": { + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dependencies": { "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "p-try": { + "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "package-hash": { + "node_modules/package-hash": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", "dev": true, - "requires": { + "dependencies": { "graceful-fs": "^4.1.15", "hasha": "^5.0.0", "lodash.flattendeep": "^4.4.0", "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=8" } }, - "parent-module": { + "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, - "requires": { + "dependencies": { "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "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, + "engines": { + "node": ">= 0.8" } }, - "path-exists": { + "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "path-is-absolute": { + "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } }, - "path-key": { + "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "engines": { + "node": ">=8" + } }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "node_modules/path-scurry": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.9.2.tgz", + "integrity": "sha512-qSDLy2aGFPm8i4rsbHd4MNyTcrzHFsLQykrtbuGRknZZCBBVXSv2tSCDN2Cg6Rt/GFRw8GoW9y9Ecw5rIPG1sg==", + "dependencies": { + "lru-cache": "^9.1.1", + "minipass": "^5.0.0 || ^6.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.2.tgz", + "integrity": "sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true }, - "picomatch": { + "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } }, - "pkg-dir": { + "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, - "requires": { + "dependencies": { "find-up": "^4.0.0" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - } + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" } }, - "prelude-ls": { + "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.8.0" + } }, - "prettier": { - "version": "2.8.7", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.7.tgz", - "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", - "dev": true + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } }, - "prettier-linter-helpers": { + "node_modules/prettier-linter-helpers": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", "dev": true, - "requires": { + "dependencies": { "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" } }, - "process-on-spawn": { + "node_modules/process-on-spawn": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", "dev": true, - "requires": { + "dependencies": { "fromentries": "^1.2.0" + }, + "engines": { + "node": ">=8" } }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==" - }, - "promise-retry": { + "node_modules/promise-retry": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", - "requires": { + "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" } }, - "punycode": { + "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "queue-microtask": { + "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true + "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" + } + ] + }, + "node_modules/random-bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", + "integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } }, - "randombytes": { + "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "requires": { + "dependencies": { "safe-buffer": "^5.1.0" } }, - "readable-stream": { + "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, + "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/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "requires": { + "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" } }, - "readdirp": { + "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "requires": { + "dependencies": { "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" } }, - "release-zalgo": { + "node_modules/release-zalgo": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", "dev": true, - "requires": { + "dependencies": { "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" } }, - "require-directory": { + "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "require-main-filename": { + "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "resolve-from": { + "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==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "retry": { + "node_modules/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==" + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "engines": { + "node": ">= 4" + } }, - "reusify": { + "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } }, - "rimraf": { + "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { + "dependencies": { "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "run-parallel": { + "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, - "requires": { + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { "queue-microtask": "^1.2.2" } }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "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==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "safer-buffer": { + "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "optional": true + "devOptional": true }, - "semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", - "requires": { + "node_modules/semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "dependencies": { "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, - "serialize-javascript": { + "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, - "requires": { + "dependencies": { "randombytes": "^2.1.0" } }, - "set-blocking": { + "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, - "shebang-command": { + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { + "dependencies": { "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "shebang-regex": { + "node_modules/shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true + "engines": { + "node": ">=8" + } }, - "should": { + "node_modules/should": { "version": "13.2.3", "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", "dev": true, - "requires": { + "dependencies": { "should-equal": "^2.0.0", "should-format": "^3.0.3", "should-type": "^1.4.0", @@ -7275,193 +4481,273 @@ "should-util": "^1.0.0" } }, - "should-equal": { + "node_modules/should-equal": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", "dev": true, - "requires": { + "dependencies": { "should-type": "^1.4.0" } }, - "should-format": { + "node_modules/should-format": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", - "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", + "integrity": "sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==", "dev": true, - "requires": { + "dependencies": { "should-type": "^1.3.0", "should-type-adaptors": "^1.0.1" } }, - "should-type": { + "node_modules/should-type": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", - "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=", + "integrity": "sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==", "dev": true }, - "should-type-adaptors": { + "node_modules/should-type-adaptors": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", "dev": true, - "requires": { + "dependencies": { "should-type": "^1.3.0", "should-util": "^1.0.0" } }, - "should-util": { + "node_modules/should-util": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==", "dev": true }, - "signal-exit": { + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==" }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "smart-buffer": { + "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==" + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } }, - "socks": { + "node_modules/socks": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", - "requires": { + "dependencies": { "ip": "^2.0.0", "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" } }, - "socks-proxy-agent": { + "node_modules/socks-proxy-agent": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", - "requires": { + "dependencies": { "agent-base": "^6.0.2", "debug": "^4.3.3", "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } + "engines": { + "node": ">=0.10.0" } }, - "spawn-wrap": { + "node_modules/spawn-wrap": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", "dev": true, - "requires": { + "dependencies": { "foreground-child": "^2.0.0", "is-windows": "^1.0.2", "make-dir": "^3.0.0", "rimraf": "^3.0.0", "signal-exit": "^3.0.2", "which": "^2.0.1" + }, + "engines": { + "node": ">=8" } }, - "sprintf-js": { + "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, - "ssri": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", - "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", - "requires": { - "minipass": "^3.1.1" + "node_modules/ssri": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.4.tgz", + "integrity": "sha512-12+IR2CB2C28MMAw0Ncqwj5QbTcs0nGIhgJzYWzDkb21vWmfNI83KS4f3Ci6GI98WreIfG7o9UXp3C0qbpA8nQ==", + "dependencies": { + "minipass": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "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==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stream-parser": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/stream-parser/-/stream-parser-0.3.1.tgz", + "integrity": "sha512-bJ/HgKq41nlKvlhccD5kaCr/P+Hu0wPNKPJOH7en+YrJu/9EgqUF+88w5Jb6KNcjOFMhfX4B2asfeAtIGuHObQ==", + "dev": true, + "dependencies": { + "debug": "2" } }, - "string_decoder": { + "node_modules/stream-parser/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, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/stream-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "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==", - "requires": { + "dependencies": { "safe-buffer": "~5.2.0" - }, + } + }, + "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==", "dependencies": { - "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==" - } + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" } }, - "string-width": { + "node_modules/string-width-cjs": { + "name": "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==", - "requires": { + "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "strip-ansi": { + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { + "dependencies": { "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "strip-bom": { + "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "strip-json-comments": { + "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "supports-color": { + "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, - "requires": { + "dependencies": { "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "tar": { - "version": "6.1.14", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.14.tgz", - "integrity": "sha512-piERznXu0U7/pW7cdSn7hjqySIVTYT6F76icmFk7ptU7dDYlXTm5r9A6K04R2vU3olYgoKeo1Cg3eeu5nhftAw==", - "requires": { + "node_modules/tar": { + "version": "6.1.15", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.15.tgz", + "integrity": "sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==", + "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", "minipass": "^5.0.0", @@ -7469,281 +4755,366 @@ "mkdirp": "^1.0.3", "yallist": "^4.0.0" }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "dependencies": { - "minipass": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", - "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==" - } + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "test-exclude": { + "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, - "requires": { + "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" } }, - "text-table": { + "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, - "to-fast-properties": { + "node_modules/throttle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/throttle/-/throttle-1.0.3.tgz", + "integrity": "sha512-VYINSQFQeFdmhCds0tTqvQmLmdAjzGX1D6GnRQa4zlq8OpTtWSMddNyRq8Z4Snw/d6QZrWt9cM/cH8xTiGUkYA==", + "dev": true, + "dependencies": { + "readable-stream": ">= 0.3.0", + "stream-parser": ">= 0.0.2" + }, + "engines": { + "node": ">= v0.8.0" + } + }, + "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } }, - "to-regex-range": { + "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "requires": { + "dependencies": { "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" } }, - "ts-mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz", - "integrity": "sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw==", - "dev": true, - "requires": { - "ts-node": "7.0.1", - "tsconfig-paths": "^3.5.0" - } - }, - "ts-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", - "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", - "dev": true, - "requires": { - "arrify": "^1.0.0", - "buffer-from": "^1.1.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.5.6", - "yn": "^2.0.0" - }, - "dependencies": { - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - } - } - }, - "tsconfig-paths": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", - "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", - "dev": true, - "optional": true, - "requires": { - "@types/json5": "^0.0.29", - "json5": "^1.0.1", - "minimist": "^1.2.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "optional": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true, - "optional": true - } - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "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==", "dev": true, - "requires": { - "tslib": "^1.8.1" + "engines": { + "node": ">=0.6" } }, - "type-check": { + "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, - "requires": { + "dependencies": { "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" } }, - "type-fest": { + "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==", - "dev": true + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "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, + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } }, - "typedarray-to-buffer": { + "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, - "requires": { + "dependencies": { "is-typedarray": "^1.0.0" } }, - "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "node_modules/uid-safe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", + "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", + "dev": true, + "dependencies": { + "random-bytes": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "dev": true }, - "unique-filename": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", - "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", - "requires": { - "unique-slug": "^3.0.0" + "node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "unique-slug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", - "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", - "requires": { + "node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dependencies": { "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" } }, - "uri-js": { + "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "requires": { + "dependencies": { "punycode": "^2.1.0" } }, - "util-deprecate": { + "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true + "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, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } }, - "which": { + "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { + "dependencies": { "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", "dev": true }, - "wide-align": { + "node_modules/wide-align": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "requires": { + "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } }, - "word-wrap": { + "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "workerpool": { + "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, - "wrap-ansi": { + "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, - "requires": { + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "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==", + "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "wrappy": { + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "write-file-atomic": { + "node_modules/write-file-atomic": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, - "requires": { + "dependencies": { "imurmurhash": "^0.1.4", "is-typedarray": "^1.0.0", "signal-exit": "^3.0.2", "typedarray-to-buffer": "^3.1.5" } }, - "y18n": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", - "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", - "dev": true + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } }, - "yallist": { + "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, - "yargs": { + "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, - "requires": { + "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", @@ -7751,51 +5122,70 @@ "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" } }, - "yargs-parser": { + "node_modules/yargs-parser": { "version": "20.2.4", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true + "dev": true, + "engines": { + "node": ">=10" + } }, - "yargs-unparser": { + "node_modules/yargs-unparser": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, - "requires": { + "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" }, - "dependencies": { - "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - } + "engines": { + "node": ">=10" } }, - "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", - "dev": true + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "yocto-queue": { + "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index 4e8e402..4820d07 100644 --- a/package.json +++ b/package.json @@ -1,37 +1,36 @@ { "name": "aws-lambda-ric", - "version": "2.1.0", + "version": "3.0.0", "description": "AWS Lambda Runtime Interface Client for NodeJs", "homepage": "https://github.com/aws/aws-lambda-nodejs-runtime-interface-client", - "main": "lib/index.js", + "main": "dist/index.mjs", "gypfile": true, "scripts": { "archive": "npx rimraf aws-lambda-ric-*.tgz && npm install && npm run build && npm pack", - "clean": "npx rimraf {build, node_modules} && npx rimraf deps/{build_complete.txt, aws-lambda-cpp, curl}", - "copy-files": "mkdir -p lib/RuntimeClient && cp src/RuntimeClient/runtime-client.cc lib/RuntimeClient/runtime-client.cc", + "clean": "npx rimraf build node_modules package-lock.json", + "copy-files": "mkdir -p dist && cp src/types/* dist/", "update-deps": "./scripts/update_dependencies.sh", "preinstall": "./scripts/preinstall.sh", "postinstall": "./scripts/postinstall.sh", - "build": "npx rimraf lib && tsc -b src", - "build:gyp": "node-gyp rebuild", "postbuild": "npm run copy-files", + "build": "cd src && node build.js && cd ..", + "build:gyp": "node-gyp rebuild", "format": "npm run format:src && npm run format:test", - "format:src": "prettier --check \"src/**/*.ts\" --write", - "format:test": "prettier --check \"test/**/*.ts\" --write", - "lint": "eslint --ext \".ts,.js\" src", + "format:src": "prettier --check \"src/*.*js\" --write", + "format:test": "prettier --check \"test/**/*.*js\" --write", + "lint": "eslint --ext \".js\" src test", + "fix": "eslint --fix --ext \".js\" src test", "test": "npm run test:unit", - "test:unit": "ts-mocha test/unit/**/*.test.ts --reporter ./test/utils/StdoutReporter -p ./test/unit/tsconfig.json", - "test:unit:watch": "ts-mocha test/unit/**/*.test.ts --reporter ./test/utils/StdoutReporter --watch-extensions ts --watch --watch-files src, test/unit/**/*.ts -p ./test/unit/tsconfig.json", + "test:unit": "mocha --recursive ./test/unit --reporter ./test/util/StdoutReporter.test", "test:coverage": "nyc npm run test:unit", - "tsc": "tsc -b src", - "tsc:watch": "tsc -b src --watch", "refresh": "rm -rf ./node_modules ./package-lock.json && npm install", - "precommit": "npm run lint" + "precommit": "npm run lint && npm run format:test", + "prepush": "npm run lint && npm run test" }, "author": "AWS Lambda", "license": "Apache-2.0", "bin": { - "aws-lambda-ric": "bin/index.js" + "aws-lambda-ric": "bin/index.mjs" }, "husky": { "hooks": { @@ -39,8 +38,11 @@ } }, "nyc": { - "extension": [ - ".ts" + "include": [ + "src/*.*js" + ], + "exclude": [ + "src/VerboseLog.js" ], "reporter": [ "text", @@ -53,23 +55,26 @@ "statements": 75 }, "dependencies": { - "node-addon-api": "6.0.0", - "node-gyp": "9.3.1" + "node-addon-api": "6.1.0", + "node-gyp": "9.4.0" }, "devDependencies": { - "@types/mocha": "10.0.1", - "@types/node": "^18.15.11", - "@typescript-eslint/eslint-plugin": "5.58.0", - "@typescript-eslint/parser": "5.58.0", - "eslint": "8.38.0", + "esbuild": "^0.18.3", + "eslint": "8.42.0", "eslint-config-prettier": "8.8.0", "eslint-plugin-prettier": "4.2.1", - "husky": "8.0.3", + "husky": "^8.0.3", "mocha": "10.2.0", + "mock-http-server": "^1.4.5", "nyc": "^15.1.0", - "prettier": "2.8.7", + "prettier": "2.8.8", "should": "13.2.3", - "ts-mocha": "10.0.0", - "typescript": "4.9.5" + "throttle": "^1.0.3" + }, + "prettier": { + "trailingComma": "all", + "tabWidth": 2, + "semi": true, + "singleQuote": true } } diff --git a/scripts/postinstall.sh b/scripts/postinstall.sh index 0675146..98788ea 100755 --- a/scripts/postinstall.sh +++ b/scripts/postinstall.sh @@ -6,6 +6,8 @@ if [ "$(uname)" = "Darwin" ]; then echo "aws-lambda-cpp does not build on OS X. Skipping the postinstall step." else npm run build:gyp + mkdir -p dist + cp build/Release/rapid-client.node dist/ fi # If the path of this file ends in "node_modules/aws-lambda-ric/scripts" @@ -18,8 +20,11 @@ if test "${current_path#*$node_modules_path}" != "$current_path" || [ "$BUILD" ! echo "Cleaning up source dependencies to save space" deps_path="$current_path/../deps" + build_path="$current_path/../build" # Clean up source dependencies - rm -rf "$deps_path"/aws-lambda-cpp*[^gz]$ - rm -rf "$deps_path"/curl*[^gz]$ + rm -rf "$deps_path"/aws-lambda-cpp*[^gz] + rm -rf "$deps_path"/curl*[^gz] + rm -rf "$deps_path"/artifacts + rm -rf "$build_path" fi diff --git a/scripts/preinstall.sh b/scripts/preinstall.sh index 087755c..8b9b030 100755 --- a/scripts/preinstall.sh +++ b/scripts/preinstall.sh @@ -29,10 +29,60 @@ else ./buildconf && \ ./configure \ --prefix "$ARTIFACTS_DIR" \ + --disable-alt-svc \ + --disable-ares \ + --disable-cookies \ + --disable-crypto-auth \ + --disable-dateparse \ + --disable-dict \ + --disable-dnsshuffle \ + --disable-doh \ + --disable-file \ + --disable-ftp \ + --disable-get-easy-options \ + --disable-gopher \ + --disable-hsts \ + --disable-http-auth \ + --disable-imap \ + --disable-ipv6 \ + --disable-ldap \ + --disable-ldaps \ + --disable-libcurl-option \ + --disable-manual \ + --disable-mime \ + --disable-mqtt \ + --disable-netrc \ + --disable-ntlm-wb \ + --disable-pop3 \ + --disable-progress-meter \ + --disable-proxy \ + --disable-pthreads \ + --disable-rtsp \ --disable-shared \ - --without-ssl \ + --disable-smtp \ + --disable-socketpair \ + --disable-sspi \ + --disable-telnet \ + --disable-tftp \ + --disable-threaded-resolver \ + --disable-unix-sockets \ + --disable-verbose \ + --disable-versioned-symbols \ + --disable-websockets \ --with-pic \ - --without-zlib && \ + --without-brotli \ + --without-ca-bundle \ + --without-gssapi \ + --without-libidn2 \ + --without-libpsl \ + --without-librtmp \ + --without-libssh2 \ + --without-nghttp2 \ + --without-nghttp3 \ + --without-ngtcp2 \ + --without-ssl \ + --without-zlib \ + --without-zstd && \ make && \ make install ) diff --git a/src/BeforeExitListener.js b/src/BeforeExitListener.js new file mode 100644 index 0000000..b553852 --- /dev/null +++ b/src/BeforeExitListener.js @@ -0,0 +1,33 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * The runtime has a single beforeExit function which is stored in the global + * object with a symbol key. + * The symbol is not exported. + * The process.beforeExit listener is setup in index.mjs along with all other + * top-level process event listeners. + */ + +'use strict'; + +// define a named symbol for the handler function +const LISTENER_SYMBOL = Symbol.for('aws.lambda.beforeExit'); +const NO_OP_LISTENER = () => {}; + +// export a setter +module.exports = { + /** + * Call the listener function with no arguments. + */ + invoke: () => global[LISTENER_SYMBOL](), + + /** + * Reset the listener to a no-op function. + */ + reset: () => (global[LISTENER_SYMBOL] = NO_OP_LISTENER), + + /** + * Set the listener to the provided function. + */ + set: (listener) => (global[LISTENER_SYMBOL] = listener), +}; diff --git a/src/CallbackContext.js b/src/CallbackContext.js new file mode 100644 index 0000000..8560784 --- /dev/null +++ b/src/CallbackContext.js @@ -0,0 +1,146 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +const BeforeExitListener = require('./BeforeExitListener.js'); +const { toFormatted, intoError } = require('./Errors'); + +/** + * Build the callback function and the part of the context which exposes + * the succeed/fail/done callbacks. + * @param client {RuntimeClient} + * The RAPID client used to post results/errors. + * @param id {string} + * The invokeId for the current invocation. + * @param scheduleNext {function} + * A function which takes no params and immediately schedules the next + * iteration of the invoke loop. + */ +function _rawCallbackContext(client, id, scheduleNext) { + const postError = (err, callback) => { + console.error('Invoke Error', toFormatted(intoError(err))); + client.postInvocationError(err, id, callback); + }; + + let isCompleteInvoked = false; + const complete = (result, callback) => { + if (isCompleteInvoked) { + console.error( + 'Invocation has already been reported as done. Cannot call complete more than once per invocation.', + ); + return; + } + isCompleteInvoked = true; + client.postInvocationResponse(result, id, callback); + }; + + let waitForEmptyEventLoop = true; + + const callback = function (err, result) { + BeforeExitListener.reset(); + if (err !== undefined && err !== null) { + postError(err, scheduleNext); + } else { + if (!waitForEmptyEventLoop) { + complete(result, scheduleNext); + } else { + BeforeExitListener.set(() => { + setImmediate(() => { + complete(result, scheduleNext); + }); + }); + } + } + }; + + const done = (err, result) => { + BeforeExitListener.reset(); + if (err !== undefined && err !== null) { + postError(err, scheduleNext); + } else { + complete(result, scheduleNext); + } + }; + const succeed = (result) => { + done(null, result); + }; + const fail = (err) => { + if (err === undefined || err === null) { + done('handled'); + } else { + done(err, null); + } + }; + + const callbackContext = { + get callbackWaitsForEmptyEventLoop() { + return waitForEmptyEventLoop; + }, + set callbackWaitsForEmptyEventLoop(value) { + waitForEmptyEventLoop = value; + }, + succeed: succeed, + fail: fail, + done: done, + }; + + return [ + callback, + callbackContext, + function () { + isCompleteInvoked = true; + }, + ]; +} + +/** + * Wraps the callback and context so that only the first call to any callback + * succeeds. + * @param callback {function} + * the node-style callback function that was previously generated but not + * yet wrapped. + * @param callbackContext {object} + * The previously generated callbackContext object that contains + * getter/setters for the contextWaitsForEmptyeventLoop flag and the + * succeed/fail/done functions. + * @return [callback, context] + */ +function _wrappedCallbackContext(callback, callbackContext, markCompleted) { + let finished = false; + const onlyAllowFirstCall = function (toWrap) { + return function () { + if (!finished) { + toWrap.apply(null, arguments); + finished = true; + } + }; + }; + + callbackContext.succeed = onlyAllowFirstCall(callbackContext.succeed); + callbackContext.fail = onlyAllowFirstCall(callbackContext.fail); + callbackContext.done = onlyAllowFirstCall(callbackContext.done); + + return [onlyAllowFirstCall(callback), callbackContext, markCompleted]; +} + +/** + * Construct the base-context object which includes the required flags and + * callback methods for the Node programming model. + * @param client {RAPIDClient} + * The RAPID client used to post results/errors. + * @param id {string} + * The invokeId for the current invocation. + * @param scheduleNext {function} + * A function which takes no params and immediately schedules the next + * iteration of the invoke loop. + * @return [callback, context] + * The same function and context object, but wrapped such that only the + * first call to any function will be successful. All subsequent calls are + * a no-op. + */ +module.exports.build = function (client, id, scheduleNext) { + let rawCallbackContext = _rawCallbackContext(client, id, scheduleNext); + return _wrappedCallbackContext(...rawCallbackContext); +}; diff --git a/src/Common/index.ts b/src/Common/index.ts deleted file mode 100644 index a2d6459..0000000 --- a/src/Common/index.ts +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * This module defines types, enums and interfaces common to the other modules. - */ - -import { IncomingHttpHeaders } from "http"; - -export interface InvocationResponse { - bodyJson: string; - headers: IncomingHttpHeaders; -} - -export interface NativeClient { - initializeClient: (userAgent: string) => void; - done: (id: string, bodyString: string) => void; - error: (id: string, bodyString: string, xrayString: string) => void; - next: () => Promise; -} - -export enum INVOKE_HEADER { - ClientContext = "lambda-runtime-client-context", - CognitoIdentity = "lambda-runtime-cognito-identity", - ARN = "lambda-runtime-invoked-function-arn", - AWSRequestId = "lambda-runtime-aws-request-id", - DeadlineMs = "lambda-runtime-deadline-ms", - XRayTrace = "lambda-runtime-trace-id", -} - -export interface IEnvironmentData { - functionVersion?: string; - functionName?: string; - memoryLimitInMB?: string; - logGroupName?: string; - logStreamName?: string; -} - -export interface IHeaderData { - clientContext?: string; - identity?: string; - invokedFunctionArn?: string; - awsRequestId?: string; - getRemainingTimeInMillis: () => number; -} - -export type ErrorStringOrUndefined = Error | string | undefined; - -export type ErrorStringOrUndefinedOrNull = ErrorStringOrUndefined | null; - -/** - * - */ -export interface ICallbackContext { - callbackWaitsForEmptyEventLoop: boolean; - succeed: (result: unknown) => void; - fail: (err: ErrorStringOrUndefinedOrNull) => void; - done: (err: ErrorStringOrUndefinedOrNull, result?: unknown) => void; -} - -export type CallbackFunction = ( - err: ErrorStringOrUndefinedOrNull, - result?: unknown -) => void; - -export interface IBeforeExitListener { - invoke: () => void; - reset: () => () => void; - set: (listener: () => void) => () => void; -} - -export interface IErrorCallbacks { - uncaughtException: (err: Error) => void; - unhandledRejection: (err: Error) => void; -} - -export type HandlerFunction = ( - body: unknown, - data: IEnvironmentData & IHeaderData, - callback: CallbackFunction -) => PromiseLike | unknown; - -export function isHandlerFunction(value: any): value is HandlerFunction { - return typeof value === "function"; -} diff --git a/src/Errors.js b/src/Errors.js new file mode 100644 index 0000000..22cf0ce --- /dev/null +++ b/src/Errors.js @@ -0,0 +1,121 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Defines custom error types throwable by the runtime. + */ + +'use strict'; + +const util = require('util'); + +function _isError(obj) { + return ( + obj && + obj.name && + obj.message && + obj.stack && + typeof obj.name === 'string' && + typeof obj.message === 'string' && + typeof obj.stack === 'string' + ); +} + +function intoError(err) { + if (err instanceof Error) { + return err; + } else { + return new Error(err); + } +} + +module.exports.intoError = intoError; + +/** + * Attempt to convert an object into a response object. + * This method accounts for failures when serializing the error object. + */ +function toRapidResponse(error) { + try { + if (util.types.isNativeError(error) || _isError(error)) { + return { + errorType: error.name, + errorMessage: error.message, + trace: error.stack.split('\n'), + }; + } else { + return { + errorType: typeof error, + errorMessage: error.toString(), + trace: [], + }; + } + } catch (_err) { + return { + errorType: 'handled', + errorMessage: + 'callback called with Error argument, but there was a problem while retrieving one or more of its message, name, and stack', + }; + } +} + +module.exports.toRapidResponse = toRapidResponse; + +/** + * Format an error with the expected properties. + * For compatability, the error string always starts with a tab. + */ +module.exports.toFormatted = (error) => { + try { + return ( + '\t' + JSON.stringify(error, (_k, v) => _withEnumerableProperties(v)) + ); + } catch (err) { + return '\t' + JSON.stringify(toRapidResponse(error)); + } +}; + +/** + * Error name, message, code, and stack are all members of the superclass, which + * means they aren't enumerable and don't normally show up in JSON.stringify. + * This method ensures those interesting properties are available along with any + * user-provided enumerable properties. + */ +function _withEnumerableProperties(error) { + if (error instanceof Error) { + let ret = Object.assign( + { + errorType: error.name, + errorMessage: error.message, + code: error.code, + }, + error, + ); + if (typeof error.stack == 'string') { + ret.stack = error.stack.split('\n'); + } + return ret; + } else { + return error; + } +} + +const errorClasses = [ + class ImportModuleError extends Error {}, + class HandlerNotFound extends Error {}, + class MalformedHandlerName extends Error {}, + class UserCodeSyntaxError extends Error {}, + class MalformedStreamingHandler extends Error {}, + class InvalidStreamingOperation extends Error {}, + class UnhandledPromiseRejection extends Error { + constructor(reason, promise) { + super(reason); + this.reason = reason; + this.promise = promise; + } + }, +]; + +errorClasses.forEach((e) => { + module.exports[e.name] = e; + e.prototype.name = `Runtime.${e.name}`; +}); diff --git a/src/Errors/XRayError.ts b/src/Errors/XRayError.ts deleted file mode 100644 index aa42762..0000000 --- a/src/Errors/XRayError.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; - -import { isError } from "."; - -/** - * prepare an exception blob for sending to AWS X-Ray - * transform an Error, or Error-like, into an exception parseable by X-Ray's service. - * { - * "name": "CustomException", - * "message": "Something bad happend!", - * "stack": [ - * "exports.handler (/var/function/node_modules/event_invoke.js:3:502) - * ] - * } - * => - * { - * "working_directory": "/var/function", - * "exceptions": [ - * { - * "type": "CustomException", - * "message": "Something bad happend!", - * "stack": [ - * { - * "path": "/var/function/event_invoke.js", - * "line": 502, - * "label": "exports.throw_custom_exception" - * } - * ] - * } - * ], - * "paths": [ - * "/var/function/event_invoke.js" - * ] - * } - */ -export const toFormatted = (err: unknown): string => { - if (!isError(err)) { - return ""; - } - - try { - return JSON.stringify(new XRayFormattedCause(err)); - } catch (error) { - return ""; - } -}; - -interface XRayStackEntry { - path: string; - line: number; - label: string; -} - -interface XRayError { - type: string; - message: string; - stack: XRayStackEntry[]; -} - -class XRayFormattedCause { - working_directory: string; - exceptions: XRayError[]; - paths: string[]; - - constructor(err: Error) { - this.working_directory = process.cwd(); // eslint-disable-line - - const stack: XRayStackEntry[] = []; - if (err.stack) { - const stackLines = err.stack.split("\n"); - stackLines.shift(); - - stackLines.forEach((stackLine) => { - let line = stackLine.trim().replace(/\(|\)/g, ""); - line = line.substring(line.indexOf(" ") + 1); - - const label = - line.lastIndexOf(" ") >= 0 - ? line.slice(0, line.lastIndexOf(" ")) - : null; - - const path = - label == undefined || label == null || label.length === 0 - ? line - : line.slice(line.lastIndexOf(" ") + 1); - - const pathParts = path.split(":"); - - const entry = { - path: pathParts[0], - line: parseInt(pathParts[1]), - label: label || "anonymous", - }; - - stack.push(entry); - }); - } - - this.exceptions = [ - { - type: err.name, - message: err.message, - stack: stack, - }, - ]; - - const paths = new Set(); - stack.forEach((entry) => { - paths.add(entry.path); - }); - this.paths = Array.from(paths); - } -} diff --git a/src/Errors/index.ts b/src/Errors/index.ts deleted file mode 100644 index 8d47aeb..0000000 --- a/src/Errors/index.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Defines custom error types throwable by the runtime. - */ - -"use strict"; - -import util from "util"; - -export function isError(obj: any): obj is Error { - return ( - obj && - obj.name && - obj.message && - obj.stack && - typeof obj.name === "string" && - typeof obj.message === "string" && - typeof obj.stack === "string" - ); -} - -interface RuntimeErrorResponse { - errorType: string; - errorMessage: string; - trace: string[]; -} - -/** - * Attempt to convert an object into a response object. - * This method accounts for failures when serializing the error object. - */ -export function toRuntimeResponse(error: unknown): RuntimeErrorResponse { - try { - if (util.types.isNativeError(error) || isError(error)) { - if (!error.stack) { - throw new Error("Error stack is missing."); - } - return { - errorType: error.name, - errorMessage: error.message, - trace: error.stack.split("\n") || [], - }; - } else { - return { - errorType: typeof error, - errorMessage: (error as any).toString(), - trace: [], - }; - } - } catch (_err) { - return { - errorType: "handled", - errorMessage: - "callback called with Error argument, but there was a problem while retrieving one or more of its message, name, and stack", - trace: [], - }; - } -} - -/** - * Format an error with the expected properties. - * For compatability, the error string always starts with a tab. - */ -export const toFormatted = (error: unknown): string => { - try { - return ( - "\t" + JSON.stringify(error, (_k, v) => _withEnumerableProperties(v)) - ); - } catch (err) { - return "\t" + JSON.stringify(toRuntimeResponse(error)); - } -}; - -/** - * Error name, message, code, and stack are all members of the superclass, which - * means they aren't enumerable and don't normally show up in JSON.stringify. - * This method ensures those interesting properties are available along with any - * user-provided enumerable properties. - */ -function _withEnumerableProperties(error: any) { - if (error instanceof Error) { - const extendedError: ExtendedError = (error); - const ret: any = Object.assign( - { - errorType: extendedError.name, - errorMessage: extendedError.message, - code: extendedError.code, - }, - extendedError - ); - if (typeof extendedError.stack == "string") { - ret.stack = extendedError.stack.split("\n"); - } - return ret; - } else { - return error; - } -} - -export class ExtendedError extends Error { - code?: number; - custom?: string; - reason?: string; - promise?: Promise; - - constructor(reason?: string) { - super(reason); // 'Error' breaks prototype chain here - Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain - } -} - -export class ImportModuleError extends ExtendedError {} -export class HandlerNotFound extends ExtendedError {} -export class MalformedHandlerName extends ExtendedError {} -export class UserCodeSyntaxError extends ExtendedError {} -export class UnhandledPromiseRejection extends ExtendedError { - constructor(reason?: string, promise?: Promise) { - super(reason); - this.reason = reason; - this.promise = promise; - } -} - -const errorClasses = [ - ImportModuleError, - HandlerNotFound, - MalformedHandlerName, - UserCodeSyntaxError, - UnhandledPromiseRejection, -]; - -errorClasses.forEach((e) => { - e.prototype.name = `Runtime.${e.name}`; -}); diff --git a/src/HttpResponseStream.js b/src/HttpResponseStream.js new file mode 100644 index 0000000..b31e04e --- /dev/null +++ b/src/HttpResponseStream.js @@ -0,0 +1,33 @@ +/** + * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * HttpResponseStream is NOT used by the runtime. + * It is only exposed in the `awslambda` variable for customers to use. + */ + +'use strict'; + +const METADATA_PRELUDE_CONTENT_TYPE = + 'application/vnd.awslambda.http-integration-response'; +const DELIMITER_LEN = 8; + +// Implements the application/vnd.awslambda.http-integration-response content type. +class HttpResponseStream { + static from(underlyingStream, prelude) { + underlyingStream.setContentType(METADATA_PRELUDE_CONTENT_TYPE); + + // JSON.stringify is required. NULL byte is not allowed in metadataPrelude. + const metadataPrelude = JSON.stringify(prelude); + + underlyingStream._onBeforeFirstWrite = (write) => { + write(metadataPrelude); + + // Write 8 null bytes after the JSON prelude. + write(new Uint8Array(DELIMITER_LEN)); + }; + + return underlyingStream; + } +} + +module.exports.HttpResponseStream = HttpResponseStream; diff --git a/src/InvokeContext.js b/src/InvokeContext.js new file mode 100644 index 0000000..dab10d3 --- /dev/null +++ b/src/InvokeContext.js @@ -0,0 +1,139 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * This module defines the InvokeContext and supporting functions. The + * InvokeContext is responsible for pulling information from the invoke headers + * and for wrapping the Rapid Client object's error and response functions. + */ + +'use strict'; + +const assert = require('assert').strict; +let { setCurrentRequestId } = require('./LogPatch'); + +const INVOKE_HEADER = { + ClientContext: 'lambda-runtime-client-context', + CognitoIdentity: 'lambda-runtime-cognito-identity', + ARN: 'lambda-runtime-invoked-function-arn', + AWSRequestId: 'lambda-runtime-aws-request-id', + DeadlineMs: 'lambda-runtime-deadline-ms', + XRayTrace: 'lambda-runtime-trace-id', +}; + +module.exports = class InvokeContext { + constructor(headers) { + this.headers = _enforceLowercaseKeys(headers); + } + + /** + * The invokeId for this request. + */ + get invokeId() { + let id = this.headers[INVOKE_HEADER.AWSRequestId]; + assert.ok(id, 'invocation id is missing or invalid'); + return id; + } + + /** + * Push relevant invoke data into the logging context. + */ + updateLoggingContext() { + setCurrentRequestId(this.invokeId); + } + + /** + * Attach all of the relavant environmental and invocation data to the + * provided object. + * This method can throw if the headers are malformed and cannot be parsed. + * @param callbackContext {Object} + * The callbackContext object returned by a call to buildCallbackContext(). + * @return {Object} + * The user context object with all required data populated from the headers + * and environment variables. + */ + attachEnvironmentData(callbackContext) { + this._forwardXRay(); + return Object.assign( + callbackContext, + this._environmentalData(), + this._headerData(), + ); + } + + /** + * All parts of the user-facing context object which are provided through + * environment variables. + */ + _environmentalData() { + return { + functionVersion: process.env['AWS_LAMBDA_FUNCTION_VERSION'], + functionName: process.env['AWS_LAMBDA_FUNCTION_NAME'], + memoryLimitInMB: process.env['AWS_LAMBDA_FUNCTION_MEMORY_SIZE'], + logGroupName: process.env['AWS_LAMBDA_LOG_GROUP_NAME'], + logStreamName: process.env['AWS_LAMBDA_LOG_STREAM_NAME'], + }; + } + + /** + * All parts of the user-facing context object which are provided through + * request headers. + */ + _headerData() { + const deadline = this.headers[INVOKE_HEADER.DeadlineMs]; + return { + clientContext: _parseJson( + this.headers[INVOKE_HEADER.ClientContext], + 'ClientContext', + ), + identity: _parseJson( + this.headers[INVOKE_HEADER.CognitoIdentity], + 'CognitoIdentity', + ), + invokedFunctionArn: this.headers[INVOKE_HEADER.ARN], + awsRequestId: this.headers[INVOKE_HEADER.AWSRequestId], + getRemainingTimeInMillis: function () { + return deadline - Date.now(); + }, + }; + } + + /** + * Forward the XRay header into the environment variable. + */ + _forwardXRay() { + if (this.headers[INVOKE_HEADER.XRayTrace]) { + process.env['_X_AMZN_TRACE_ID'] = this.headers[INVOKE_HEADER.XRayTrace]; + } else { + delete process.env['_X_AMZN_TRACE_ID']; + } + } +}; + +/** + * Parse a JSON string and throw a readable error if something fails. + * @param jsonString {string} - the string to attempt to parse + * @param name {name} - the name to use when describing the string in an error + * @return object - the parsed object + * @throws if jsonString cannot be parsed + */ +function _parseJson(jsonString, name) { + if (jsonString !== undefined) { + try { + return JSON.parse(jsonString); + } catch (err) { + throw new Error(`Cannot parse ${name} as json: ${err.toString()}`); + } + } else { + return undefined; + } +} + +/** + * Construct a copy of an object such that all of its keys are lowercase. + */ +function _enforceLowercaseKeys(original) { + return Object.keys(original).reduce((enforced, originalKey) => { + enforced[originalKey.toLowerCase()] = original[originalKey]; + return enforced; + }, {}); +} diff --git a/src/LogPatch.js b/src/LogPatch.js new file mode 100644 index 0000000..60ebfd6 --- /dev/null +++ b/src/LogPatch.js @@ -0,0 +1,110 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +const util = require('util'); +const fs = require('fs'); + +const levels = Object.freeze({ + INFO: { name: 'INFO' }, + DEBUG: { name: 'DEBUG' }, + WARN: { name: 'WARN' }, + ERROR: { name: 'ERROR' }, + TRACE: { name: 'TRACE' }, + FATAL: { name: 'FATAL' }, +}); + +/* Use a unique symbol to provide global access without risk of name clashes. */ +const REQUEST_ID_SYMBOL = Symbol.for('aws.lambda.runtime.requestId'); +let _currentRequestId = { + get: () => global[REQUEST_ID_SYMBOL], + set: (id) => (global[REQUEST_ID_SYMBOL] = id), +}; + +/** + * Write logs to stdout. + */ +let _logToStdout = (level, message) => { + let time = new Date().toISOString(); + let requestId = _currentRequestId.get(); + let line = `${time}\t${requestId}\t${level.name}\t${message}`; + line = line.replace(/\n/g, '\r'); + process.stdout.write(line + '\n'); +}; + +/** + * Write logs to filedescriptor. + * Implements the logging contract between runtimes and the platform. + * Each entry is framed as: + * +----------------------+------------------------+---------------------+-----------------------+ + * | Frame Type - 4 bytes | Length (len) - 4 bytes | Timestamp - 8 bytes | Message - 'len' bytes | + * +----------------------+------------------------+---------------------+-----------------------+ + * The frist 4 bytes are the frame type. For logs this is always 0xa55a0003. + * The second 4 bytes are the length of the message. + * The next 8 bytes are the UNIX timestamp of the message with microseconds precision. + * The remaining bytes ar ethe message itself. Byte order is big-endian. + */ +let _logToFd = function (logTarget) { + let typeAndLength = Buffer.alloc(16); + typeAndLength.writeUInt32BE(0xa55a0003, 0); + + return (level, message) => { + let date = new Date(); + let time = date.toISOString(); + let requestId = _currentRequestId.get(); + let enrichedMessage = `${time}\t${requestId}\t${level.name}\t${message}\n`; + let messageBytes = Buffer.from(enrichedMessage, 'utf8'); + typeAndLength.writeInt32BE(messageBytes.length, 4); + typeAndLength.writeBigInt64BE(BigInt(date.valueOf()) * 1000n, 8); + fs.writeSync(logTarget, typeAndLength); + fs.writeSync(logTarget, messageBytes); + }; +}; + +/** + * Replace console functions with a log function. + * @param {Function(level, String)} log + */ +function _patchConsoleWith(log) { + console.log = (msg, ...params) => { + log(levels.INFO, util.format(msg, ...params)); + }; + console.debug = (msg, ...params) => { + log(levels.DEBUG, util.format(msg, ...params)); + }; + console.info = (msg, ...params) => { + log(levels.INFO, util.format(msg, ...params)); + }; + console.warn = (msg, ...params) => { + log(levels.WARN, util.format(msg, ...params)); + }; + console.error = (msg, ...params) => { + log(levels.ERROR, util.format(msg, ...params)); + }; + console.trace = (msg, ...params) => { + log(levels.TRACE, util.format(msg, ...params)); + }; + console.fatal = (msg, ...params) => { + log(levels.FATAL, util.format(msg, ...params)); + }; +} + +let _patchConsole = () => { + if ( + process.env['_LAMBDA_TELEMETRY_LOG_FD'] != null && + process.env['_LAMBDA_TELEMETRY_LOG_FD'] != undefined + ) { + let logFd = parseInt(process.env['_LAMBDA_TELEMETRY_LOG_FD']); + _patchConsoleWith(_logToFd(logFd)); + delete process.env['_LAMBDA_TELEMETRY_LOG_FD']; + } else { + _patchConsoleWith(_logToStdout); + } +}; + +module.exports = { + setCurrentRequestId: _currentRequestId.set, + patchConsole: _patchConsole, +}; diff --git a/src/NativeModuleLoader.js b/src/NativeModuleLoader.js new file mode 100644 index 0000000..66776fe --- /dev/null +++ b/src/NativeModuleLoader.js @@ -0,0 +1,7 @@ +/** + * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +exports.load = () => require('./rapid-client.node'); diff --git a/src/RAPIDClient.js b/src/RAPIDClient.js new file mode 100644 index 0000000..84ce5f3 --- /dev/null +++ b/src/RAPIDClient.js @@ -0,0 +1,210 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * This module defines the RAPID client which is responsible for all HTTP + * interactions with the RAPID layer. + */ + +'use strict'; + +const Errors = require('./Errors'); +const XRayError = require('./XRayError'); +const ERROR_TYPE_HEADER = 'Lambda-Runtime-Function-Error-Type'; +const { createResponseStream } = require('./ResponseStream'); + +/** + * Objects of this class are responsible for all interactions with the RAPID + * API. + */ +module.exports = class RAPIDClient { + constructor(hostnamePort, httpClient, nativeClient) { + this.http = httpClient || require('http'); + this.nativeClient = + nativeClient || require('./NativeModuleLoader.js').load(); + this.useAlternativeClient = + process.env['AWS_LAMBDA_NODEJS_USE_ALTERNATIVE_CLIENT_1'] === 'true'; + + let [hostname, port] = hostnamePort.split(':'); + this.hostname = hostname; + this.port = parseInt(port, 10); + this.agent = new this.http.Agent({ + keepAlive: true, + maxSockets: 1, + }); + } + + /** + * Complete and invocation with the provided response. + * @param {Object} response + * An arbitrary object to convert to JSON and send back as as response. + * @param {String} id + * The invocation ID. + * @param {Function} callback + * The callback to run after the POST response ends + */ + postInvocationResponse(response, id, callback) { + let bodyString = _trySerializeResponse(response); + this.nativeClient.done(id, bodyString); + callback(); + } + + /** + * Stream the invocation response. + * @param {String} id + * The invocation ID. + * @param {Function} callback + * The callback to run after the POST response ends + * @return {object} + * A response stream and a Promise that resolves when the stream is done. + */ + getStreamForInvocationResponse(id, callback, options) { + const ret = createResponseStream({ + httpOptions: { + agent: this.agent, + http: this.http, + hostname: this.hostname, + method: 'POST', + port: this.port, + path: '/2018-06-01/runtime/invocation/' + id + '/response', + highWaterMark: options?.highWaterMark, + }, + }); + + return { + request: ret.request, + responseDone: ret.responseDone.then((_) => { + if (callback) { + callback(); + } + }), + }; + } + + /** + * Post an initialization error to the RAPID API. + * @param {Error} error + * @param {Function} callback + * The callback to run after the POST response ends + */ + postInitError(error, callback) { + let response = Errors.toRapidResponse(error); + this._post( + `/2018-06-01/runtime/init/error`, + response, + { [ERROR_TYPE_HEADER]: response.errorType }, + callback, + ); + } + + /** + * Post an invocation error to the RAPID API + * @param {Error} error + * @param {String} id + * The invocation ID for the in-progress invocation. + * @param {Function} callback + * The callback to run after the POST response ends + */ + postInvocationError(error, id, callback) { + let response = Errors.toRapidResponse(error); + let bodyString = _trySerializeResponse(response); + let xrayString = XRayError.formatted(error); + this.nativeClient.error(id, bodyString, xrayString); + callback(); + } + + /** + * Get the next invocation. + * @return {PromiseLike.} + * A promise which resolves to an invocation object that contains the body + * as json and the header array. e.g. {bodyJson, headers} + */ + async nextInvocation() { + if (this.useAlternativeClient) { + const options = { + hostname: this.hostname, + port: this.port, + path: '/2018-06-01/runtime/invocation/next', + method: 'GET', + agent: this.agent, + }; + return new Promise((resolve, reject) => { + let request = this.http.request(options, (response) => { + let data = ''; + response + .setEncoding('utf-8') + .on('data', (chunk) => { + data += chunk; + }) + .on('end', () => { + resolve({ + bodyJson: data, + headers: response.headers, + }); + }); + }); + request + .on('error', (e) => { + reject(e); + }) + .end(); + }); + } + + return this.nativeClient.next(); + } + + /** + * HTTP Post to a path. + * @param {String} path + * @param {Object} body + * The body is serialized into JSON before posting. + * @param {Object} headers + * The http headers + * @param (function()} callback + * The callback to run after the POST response ends + */ + _post(path, body, headers, callback) { + let bodyString = _trySerializeResponse(body); + const options = { + hostname: this.hostname, + port: this.port, + path: path, + method: 'POST', + headers: Object.assign( + { + 'Content-Type': 'application/json', + 'Content-Length': Buffer.from(bodyString).length, + }, + headers || {}, + ), + agent: this.agent, + }; + let request = this.http.request(options, (response) => { + response + .on('end', () => { + callback(); + }) + .on('error', (e) => { + throw e; + }) + .on('data', () => {}); + }); + request + .on('error', (e) => { + throw e; + }) + .end(bodyString, 'utf-8'); + } +}; + +/** + * Attempt to serialize an object as json. Capture the failure if it occurs and + * throw one that's known to be serializable. + */ +function _trySerializeResponse(body) { + try { + return JSON.stringify(body === undefined ? null : body); + } catch (err) { + throw new Error('Unable to stringify response body'); + } +} diff --git a/src/ResponseStream.js b/src/ResponseStream.js new file mode 100644 index 0000000..b1c09dd --- /dev/null +++ b/src/ResponseStream.js @@ -0,0 +1,288 @@ +/** + * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +const { InvalidStreamingOperation, toRapidResponse } = require('./Errors.js'); +const { verbose, vvverbose } = require('./VerboseLog.js').logger('STREAM'); +const net = require('net'); + +const STATUS_READY = 'ready'; // request created, no data sent yet, can send more data. +const STATUS_WRITE_CALLED = 'write_called'; // .write called and request created. + +const HEADER_RESPONSE_MODE = 'Lambda-Runtime-Function-Response-Mode'; +const VALUE_STREAMING = 'streaming'; +const TRAILER_NAME_ERROR_TYPE = 'Lambda-Runtime-Function-Error-Type'; +const TRAILER_NAME_ERROR_BODY = 'Lambda-Runtime-Function-Error-Body'; + +const DEFAULT_CONTENT_TYPE = 'application/octet-stream'; + +const failProps = new WeakMap(); + +function addFailWeakProp(req, fn) { + failProps.set(req, fn); +} + +function tryCallFail(req, err, callback) { + const fail = failProps.get(req); + if (typeof fail === 'function') { + fail(err, callback); + return true; + } + return false; +} + +function writableStreamOnly(inner) { + const fns = [ + // stream.Writable + 'cork', + 'destroy', + 'end', + 'uncork', + 'write', + + // EventEmitter + 'addListener', + 'emit', + 'eventNames', + 'getMaxListeners', + 'listenerCount', + 'listeners', + 'off', + 'on', + 'once', + 'prependListener', + 'prependOnceListener', + 'rawListeners', + 'removeAllListeners', + 'removeListener', + 'setMaxListeners', + + // AWS + 'setContentType', + ]; + + const propsReadWrite = ['destroyed', 'writable', '_onBeforeFirstWrite']; + + const propsReadOnly = [ + 'writableFinished', + 'writableObjectMode', + 'writableBuffer', + 'writableEnded', + 'writableNeedDrain', + 'writableHighWaterMark', + 'writableCorked', + 'writableLength', + ]; + + const stream = Object.fromEntries( + fns.map((fn) => { + return [fn, inner[fn].bind(inner)]; + }), + ); + + Object.defineProperties( + stream, + Object.fromEntries( + propsReadWrite.map((prop) => [ + prop, + { + get() { + return inner[prop]; + }, + set(value) { + inner[prop] = value; + }, + }, + ]), + ), + ); + + Object.defineProperties( + stream, + Object.fromEntries( + propsReadOnly.map((prop) => [ + prop, + { + get() { + return inner[prop]; + }, + }, + ]), + ), + ); + + return stream; +} + +// Wraps a "transport" that can accept data in chunks. Transport can +// be an HTTP/1.1 connection with chunking. +// WARN There is NO chunk fidelity, i.e. no guarantee that HTTP chunks +// will map to Stream write invocations 1-1. +function createResponseStream(options) { + let status = STATUS_READY; + let req = undefined; + + const headers = { + [HEADER_RESPONSE_MODE]: VALUE_STREAMING, + Trailer: [TRAILER_NAME_ERROR_TYPE, TRAILER_NAME_ERROR_BODY], + 'Content-Type': options.contentType + ? options.contentType + : DEFAULT_CONTENT_TYPE, + }; + + let responseDoneResolve; + let responseDoneReject; + let responseDonePromise = new Promise((resolve, reject) => { + responseDoneResolve = resolve; + responseDoneReject = reject; + }); + + let headersDoneResolve; + let headersDoneReject; + let headersDonePromise = new Promise((resolve, reject) => { + headersDoneResolve = resolve; + headersDoneReject = reject; + }); + + const agent = options.httpOptions.agent; + agent.createConnection = (opts, connectionListener) => { + return net.createConnection( + { + ...opts, + highWaterMark: options?.httpOptions?.highWaterMark, + }, + connectionListener, + ); + }; + + req = options.httpOptions.http.request( + { + http: options.httpOptions.http, + contentType: options.httpOptions.contentType, + method: options.httpOptions.method, + hostname: options.httpOptions.hostname, + port: options.httpOptions.port, + path: options.httpOptions.path, + headers, + agent: agent, + }, + (res) => { + headersDoneResolve({ + statusCode: res.statusCode, + statusMessage: res.statusMessage, + headers: res.headers, + }); + + let buf = undefined; + + res.on('data', (chunk) => { + buf = typeof buf === 'undefined' ? chunk : Buffer.concat([buf, chunk]); + }); + + res.on('aborted', (err) => { + if (responseDoneReject) { + responseDoneReject(err); + } + req.destroy(err); + }); + + res.on('end', () => { + vvverbose('rapid response', buf ? buf.toString() : 'buf undefined'); + + responseDoneResolve(buf); + }); + }, + ); + + req.on('error', (err) => { + if (headersDoneReject) { + headersDoneReject(err); + } + + if (responseDoneReject) { + responseDoneReject(err); + } + + req.destroy(err); + }); + + const origEnd = req.end.bind(req); + req.end = function (cb) { + origEnd(cb); + }; + + req.setContentType = function (contentType) { + if (status !== STATUS_READY) { + throw new InvalidStreamingOperation('Cannot set content-type, too late.'); + } + req.setHeader('Content-Type', contentType); + }; + + const origWrite = req.write.bind(req); + req.write = function (chunk, encoding, callback) { + vvverbose( + 'ResponseStream::write', + chunk.length, + 'callback:', + typeof callback, + ); + + if ( + typeof chunk !== 'string' && + !Buffer.isBuffer(chunk) && + chunk?.constructor !== Uint8Array + ) { + chunk = JSON.stringify(chunk); + } + + if ( + status === STATUS_READY && + typeof this._onBeforeFirstWrite === 'function' + ) { + this._onBeforeFirstWrite((ch) => origWrite(ch)); + } + + // First write shall open the connection. + const ret = origWrite(chunk, encoding, callback); + + vvverbose('ResponseStream::origWrite', ret); + vvverbose('ResponseStream::write outputData len', this.outputData.length); + vvverbose('ResponseStream::write outputSize', this.outputSize); + + if (status === STATUS_READY) { + status = STATUS_WRITE_CALLED; + } + + return ret; + }; + + const request = writableStreamOnly(req); + + // This will close the stream after sending the error. + addFailWeakProp(request, function (err, callback) { + verbose('ResponseStream::fail err:', err); + + const error = toRapidResponse(err); + + // Send error as trailers. + req.addTrailers({ + [TRAILER_NAME_ERROR_TYPE]: error.errorType, + [TRAILER_NAME_ERROR_BODY]: Buffer.from(JSON.stringify(error)).toString( + 'base64', + ), + }); + + req.end(callback); + }); + + return { + request, + headersDone: headersDonePromise, // Not required to be awaited. + responseDone: responseDonePromise, + }; +} + +module.exports.createResponseStream = createResponseStream; +module.exports.tryCallFail = tryCallFail; diff --git a/src/Runtime.js b/src/Runtime.js new file mode 100644 index 0000000..8ec0baa --- /dev/null +++ b/src/Runtime.js @@ -0,0 +1,204 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * This module defines the top-level Runtime class which controls the + * bootstrap's execution flow. + */ + +'use strict'; + +const InvokeContext = require('./InvokeContext.js'); +const CallbackContext = require('./CallbackContext.js'); +const StreamingContext = require('./StreamingContext.js'); +const BeforeExitListener = require('./BeforeExitListener.js'); +const { STREAM_RESPONSE } = require('./UserFunction.js'); +const { verbose, vverbose } = require('./VerboseLog.js').logger('RAPID'); + +module.exports = class Runtime { + constructor(client, handler, handlerMetadata, errorCallbacks) { + this.client = client; + this.handler = handler; + this.handlerMetadata = handlerMetadata; + this.errorCallbacks = errorCallbacks; + this.handleOnce = + handlerMetadata.streaming === STREAM_RESPONSE + ? this.handleOnceStreaming + : this.handleOnceNonStreaming; + } + + /** + * Schedule the next loop iteration to start at the beginning of the next time + * around the event loop. + */ + scheduleIteration() { + let that = this; + setImmediate(() => { + that.handleOnce().then( + // Success is a no-op at this level. There are 2 cases: + // 1 - The user used one of the callback functions which already + // schedules the next iteration. + // 2 - The next iteration is not scheduled because the + // waitForEmptyEventLoop was set. In this case the beforeExit + // handler will automatically start the next iteration. + () => {}, + + // Errors should not reach this level in typical execution. If they do + // it's a sign of an issue in the Client or a bug in the runtime. So + // dump it to the console and attempt to report it as a Runtime error. + (err) => { + console.log(`Unexpected Top Level Error: ${err.toString()}`); + this.errorCallbacks.uncaughtException(err); + }, + ); + }); + } + + /** + * Wait for the next invocation, process it, and schedule the next iteration. + */ + async handleOnceNonStreaming() { + let { bodyJson, headers } = await this.client.nextInvocation(); + let invokeContext = new InvokeContext(headers); + invokeContext.updateLoggingContext(); + + let [callback, callbackContext, markCompleted] = CallbackContext.build( + this.client, + invokeContext.invokeId, + this.scheduleIteration.bind(this), + ); + + try { + this._setErrorCallbacks(invokeContext.invokeId); + this._setDefaultExitListener(invokeContext.invokeId, markCompleted); + + let result = this.handler( + JSON.parse(bodyJson), + invokeContext.attachEnvironmentData(callbackContext), + callback, + ); + + if (_isPromise(result)) { + result + .then(callbackContext.succeed, callbackContext.fail) + .catch(callbackContext.fail); + } + } catch (err) { + callback(err); + } + } + + /** + * Wait for the next invocation, process it, and schedule the next iteration. + */ + async handleOnceStreaming() { + let { bodyJson, headers } = await this.client.nextInvocation(); + + let invokeContext = new InvokeContext(headers); + invokeContext.updateLoggingContext(); + + let streamingContext = StreamingContext.build( + this.client, + invokeContext.invokeId, + this.scheduleIteration.bind(this), + this.handlerMetadata?.highWaterMark + ? { highWaterMark: this.handlerMetadata.highWaterMark } + : undefined, + ); + + const { + responseStream, + rapidResponse, + scheduleNext, + fail: ctxFail, + } = streamingContext.createStream(); + delete streamingContext.createStream; + + try { + this._setErrorCallbacks(invokeContext.invokeId); + this._setStreamingExitListener(invokeContext.invokeId, responseStream); + + const ctx = invokeContext.attachEnvironmentData(streamingContext); + + verbose('Runtime::handleOnceStreaming', 'invoking handler'); + const event = JSON.parse(bodyJson); + const handlerResult = this.handler(event, responseStream, ctx); + verbose('Runtime::handleOnceStreaming', 'handler returned'); + + if (!_isPromise(handlerResult)) { + verbose('Runtime got non-promise response'); + ctxFail('Streaming does not support non-async handlers.', scheduleNext); + + return; + } + + const result = await handlerResult; + if (typeof result !== 'undefined') { + console.warn('Streaming handlers ignore return values.'); + } + verbose('Runtime::handleOnceStreaming result is awaited.'); + + // await for the rapid response if present. + if (rapidResponse) { + const res = await rapidResponse; + vverbose('RAPID response', res); + } + + if (!responseStream.writableFinished) { + ctxFail('Response stream is not finished.', scheduleNext); + return; + } + + // Handler returned and response has ended. + scheduleNext(); + } catch (err) { + verbose('Runtime::handleOnceStreaming::finally stream destroyed'); + ctxFail(err, scheduleNext); + } + } + + /** + * Replace the error handler callbacks. + * @param {String} invokeId + */ + _setErrorCallbacks(invokeId) { + this.errorCallbacks.uncaughtException = (error) => { + this.client.postInvocationError(error, invokeId, () => { + process.exit(129); + }); + }; + this.errorCallbacks.unhandledRejection = (error) => { + this.client.postInvocationError(error, invokeId, () => { + process.exit(128); + }); + }; + } + + /** + * Setup the 'beforeExit' listener that is used if the callback is never + * called and the handler is not async. + * CallbackContext replaces the listener if a callback is invoked. + */ + _setDefaultExitListener(invokeId, markCompleted) { + BeforeExitListener.set(() => { + markCompleted(); + this.client.postInvocationResponse(null, invokeId, () => + this.scheduleIteration(), + ); + }); + } + + /** + * Setup the 'beforeExit' listener that is used if the callback is never + * called and the handler is not async. + * CallbackContext replaces the listener if a callback is invoked. + */ + _setStreamingExitListener(_invokeId) { + BeforeExitListener.set(() => { + this.scheduleIteration(); + }); + } +}; + +function _isPromise(obj) { + return obj && obj.then && typeof obj.then === 'function'; +} diff --git a/src/Runtime/BeforeExitListener.ts b/src/Runtime/BeforeExitListener.ts deleted file mode 100644 index 74dbc21..0000000 --- a/src/Runtime/BeforeExitListener.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; - -import { IBeforeExitListener } from "../Common"; - -/** - * The runtime has a single beforeExit function which is stored in the global - * object with a symbol key. - * The symbol is not exported. - * The process.beforeExit listener is setup in index.js along with all other - * top-level process event listeners. - */ - -// define a named symbol for the handler function -const LISTENER_SYMBOL = Symbol.for("aws.lambda.beforeExit"); - -const NO_OP_LISTENER = () => { - /* NoOp */ -}; - -// export a setter -class BeforeExitListener implements IBeforeExitListener { - constructor() { - this.reset(); - } - - /** - * Call the listener function with no arguments. - */ - invoke = (): void => (global as any)[LISTENER_SYMBOL](); - - /** - * Reset the listener to a no-op function. - */ - reset = (): (() => void) => - ((global as any)[LISTENER_SYMBOL] = NO_OP_LISTENER); - - /** - * Set the listener to the provided function. - */ - set = (listener: () => void): (() => void) => - ((global as any)[LISTENER_SYMBOL] = listener); -} - -const beforeExitListener = new BeforeExitListener(); - -export default beforeExitListener; diff --git a/src/Runtime/CallbackContext.ts b/src/Runtime/CallbackContext.ts deleted file mode 100644 index eb85f8d..0000000 --- a/src/Runtime/CallbackContext.ts +++ /dev/null @@ -1,164 +0,0 @@ -/* eslint-disable no-console */ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; - -import BeforeExitListener from "./BeforeExitListener"; -import { - ErrorStringOrUndefinedOrNull, - ICallbackContext, - ErrorStringOrUndefined, - CallbackFunction, -} from "../Common"; -import * as Errors from "../Errors"; -import { IRuntimeClient } from "../RuntimeClient"; - -/** - * Construct the base-context object which includes the required flags and - * callback methods for the Node programming model. - * - * @param client {Client} - * The Runtime client used to post results/errors. - * @param id {string} - * The invokeId for the current invocation. - * @param scheduleNext {function} - * A function which takes no params and immediately schedules the next - * iteration of the invoke loop. - * @returns [callback, context] - * The same function and context object, but wrapped such that only the - * first call to any function will be successful. All subsequent calls are - * a no-op. - */ -export const build = function ( - client: IRuntimeClient, - id: string, - scheduleNext: () => void -): [CallbackFunction, ICallbackContext] { - const [callback, context] = _rawCallbackContext(client, id, scheduleNext); - return _wrappedCallbackContext(callback, context); -}; - -function _homogeneousError(err: ErrorStringOrUndefined) { - if (err instanceof Error) { - return err; - } else { - return new Error(err); - } -} - -/** - * Build the callback function and the part of the context which exposes - * the succeed/fail/done callbacks. - * @param client {Client} - * The Runtime client used to post results/errors. - * @param id {string} - * The invokeId for the current invocation. - * @param scheduleNext {function} - * A function which takes no params and immediately schedules the next - * iteration of the invoke loop. - */ -function _rawCallbackContext( - client: IRuntimeClient, - id: string, - scheduleNext: () => void -): [CallbackFunction, ICallbackContext] { - const postError = (err: ErrorStringOrUndefined, callback: () => void) => { - const homogeneousError = _homogeneousError(err); - console.error("Invoke Error", Errors.toFormatted(homogeneousError)); - client.postInvocationError(err, id, callback); - }; - - const complete = (result: unknown, callback: () => void) => { - client.postInvocationResponse(result, id, callback); - }; - - let waitForEmptyEventLoop = true; - - const callback = ( - err: ErrorStringOrUndefinedOrNull, - result: unknown - ): void => { - BeforeExitListener.reset(); - if (err !== undefined && err !== null) { - postError(err, scheduleNext); - } else { - complete(result, () => { - if (!waitForEmptyEventLoop) { - scheduleNext(); - } else { - BeforeExitListener.set(scheduleNext); - } - }); - } - }; - - const done = (err: ErrorStringOrUndefinedOrNull, result?: unknown) => { - BeforeExitListener.reset(); - if (err !== undefined && err !== null) { - postError(err, scheduleNext); - } else { - complete(result, scheduleNext); - } - }; - - const succeed = (result: unknown) => { - done(null, result); - }; - - const fail = (err: ErrorStringOrUndefinedOrNull) => { - if (err === undefined || err === null) { - done("handled"); - } else { - done(err); - } - }; - - const callbackContext = { - get callbackWaitsForEmptyEventLoop(): boolean { - return waitForEmptyEventLoop; - }, - set callbackWaitsForEmptyEventLoop(value: boolean) { - waitForEmptyEventLoop = value; - }, - succeed, - fail, - done, - }; - - return [callback, callbackContext]; -} - -/** - * Wraps the callback and context so that only the first call to any callback - * succeeds. - * @param callback {function} - * the node-style callback function that was previously generated but not - * yet wrapped. - * @param callbackContext {object} - * The previously generated callbackContext object that contains - * getter/setters for the contextWaitsForEmptyeventLoop flag and the - * succeed/fail/done functions. - * @return [callback, context] - */ -function _wrappedCallbackContext( - callback: CallbackFunction, - callbackContext: ICallbackContext -): [CallbackFunction, ICallbackContext] { - let finished = false; - // eslint-disable-next-line @typescript-eslint/ban-types - const onlyAllowFirstCall = function (toWrap: Function) { - return function (...args: unknown[]) { - if (!finished) { - // eslint-disable-next-line prefer-spread - toWrap.apply(null, args); - finished = true; - } - }; - }; - - callbackContext.succeed = onlyAllowFirstCall(callbackContext.succeed); - callbackContext.fail = onlyAllowFirstCall(callbackContext.fail); - callbackContext.done = onlyAllowFirstCall(callbackContext.done); - - return [onlyAllowFirstCall(callback), callbackContext]; -} diff --git a/src/Runtime/InvokeContext.ts b/src/Runtime/InvokeContext.ts deleted file mode 100644 index 51cbbae..0000000 --- a/src/Runtime/InvokeContext.ts +++ /dev/null @@ -1,173 +0,0 @@ -/** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * This module defines the InvokeContext and supporting functions. The - * InvokeContext is responsible for pulling information from the invoke headers - * and for wrapping the Runtime Client object's error and response functions. - */ - -"use strict"; - -import { strict as assert } from "assert"; -import { IncomingHttpHeaders } from "http"; -import { - ICallbackContext, - IHeaderData, - IEnvironmentData, - INVOKE_HEADER, -} from "../Common"; -import LogPatch from "../utils/LogPatch"; - -const setCurrentRequestId = LogPatch.setCurrentRequestId; - -export default class InvokeContext { - headers: IncomingHttpHeaders; - - constructor(headers: IncomingHttpHeaders) { - this.headers = _enforceLowercaseKeys(headers); - } - - private getHeaderValue(key: string): string | undefined { - const headerVal = this.headers[key]; - - switch (typeof headerVal) { - case "undefined": - return undefined; - case "string": - return headerVal; - default: - if (headerVal.length == 0) { - return undefined; - } - - return headerVal[0]; - } - } - - /** - * The invokeId for this request. - */ - get invokeId(): string { - const id = this.getHeaderValue(INVOKE_HEADER.AWSRequestId); - assert.ok(id, "invocation id is missing or invalid"); - return id; - } - - /** - * The header data for this request. - */ - get headerData(): IHeaderData { - return this._headerData(); - } - - /** - * Push relevant invoke data into the logging context. - */ - updateLoggingContext(): void { - setCurrentRequestId(this.invokeId); - } - - /** - * Attach all of the relavant environmental and invocation data to the - * provided object. - * This method can throw if the headers are malformed and cannot be parsed. - * @param callbackContext {Object} - * The callbackContext object returned by a call to buildCallbackContext(). - * @return {Object} - * The user context object with all required data populated from the headers - * and environment variables. - */ - attachEnvironmentData( - callbackContext: ICallbackContext - ): ICallbackContext & IEnvironmentData & IHeaderData { - this._forwardXRay(); - return Object.assign( - callbackContext, - this._environmentalData(), - this._headerData() - ); - } - - /** - * All parts of the user-facing context object which are provided through - * environment variables. - */ - private _environmentalData(): IEnvironmentData { - return { - functionVersion: process.env["AWS_LAMBDA_FUNCTION_VERSION"], - functionName: process.env["AWS_LAMBDA_FUNCTION_NAME"], - memoryLimitInMB: process.env["AWS_LAMBDA_FUNCTION_MEMORY_SIZE"], - logGroupName: process.env["AWS_LAMBDA_LOG_GROUP_NAME"], - logStreamName: process.env["AWS_LAMBDA_LOG_STREAM_NAME"], - }; - } - - /** - * All parts of the user-facing context object which are provided through - * request headers. - */ - private _headerData(): IHeaderData { - const deadline = parseInt( - this.getHeaderValue(INVOKE_HEADER.DeadlineMs) || "" - ); - return { - clientContext: _parseJson( - this.getHeaderValue(INVOKE_HEADER.ClientContext), - "ClientContext" - ), - identity: _parseJson( - this.getHeaderValue(INVOKE_HEADER.CognitoIdentity), - "CognitoIdentity" - ), - invokedFunctionArn: this.getHeaderValue(INVOKE_HEADER.ARN), - awsRequestId: this.getHeaderValue(INVOKE_HEADER.AWSRequestId), - getRemainingTimeInMillis: function () { - return deadline - Date.now(); - }, - }; - } - - /** - * Forward the XRay header into the environment variable. - */ - private _forwardXRay(): void { - if (this.getHeaderValue(INVOKE_HEADER.XRayTrace)) { - process.env["_X_AMZN_TRACE_ID"] = this.getHeaderValue( - INVOKE_HEADER.XRayTrace - ); - } else { - delete process.env["_X_AMZN_TRACE_ID"]; - } - } -} - -/** - * Parse a JSON string and throw a readable error if something fails. - * @param jsonString {string} - the string to attempt to parse - * @param name {string} - the name to use when describing the string in an error - * @return object - the parsed object - * @throws if jsonString cannot be parsed - */ -function _parseJson(jsonString?: string, name?: string): string | undefined { - if (jsonString !== undefined) { - try { - return JSON.parse(jsonString); - } catch (err: any) { - throw new Error(`Cannot parse ${name} as json: ${err.toString()}`); - } - } else { - return undefined; - } -} - -/** - * Construct a copy of an object such that all of its keys are lowercase. - */ -function _enforceLowercaseKeys( - original: IncomingHttpHeaders -): IncomingHttpHeaders { - return Object.keys(original).reduce((enforced, originalKey) => { - enforced[originalKey.toLowerCase()] = original[originalKey]; - return enforced; - }, {} as IncomingHttpHeaders); -} diff --git a/src/Runtime/Runtime.ts b/src/Runtime/Runtime.ts deleted file mode 100644 index 7182329..0000000 --- a/src/Runtime/Runtime.ts +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * This module defines the top-level Runtime class which controls the - * bootstrap's execution flow. - */ - -"use strict"; - -import BeforeExitListener from "./BeforeExitListener"; -import { HandlerFunction, IErrorCallbacks } from "../Common"; -import * as CallbackContext from "./CallbackContext"; -import InvokeContext from "./InvokeContext"; -import { IRuntimeClient } from "../RuntimeClient"; - -export default class Runtime { - client: IRuntimeClient; - errorCallbacks: IErrorCallbacks; - handler: HandlerFunction; - - constructor( - client: IRuntimeClient, - handler: HandlerFunction, - errorCallbacks: IErrorCallbacks - ) { - this.client = client; - this.handler = handler; - this.errorCallbacks = errorCallbacks; - } - - /** - * Schedule the next loop iteration to start at the beginning of the next time - * around the event loop. - */ - scheduleIteration(): void { - setImmediate(() => { - this.handleOnce().then( - // Success is a no-op at this level. There are 2 cases: - // 1 - The user used one of the callback functions which already - // schedules the next iteration. - // 2 - The next iteration is not scheduled because the - // waitForEmptyEventLoop was set. In this case the beforeExit - // handler will automatically start the next iteration. - // eslint-disable-next-line @typescript-eslint/no-empty-function - () => {}, - - // Errors should not reach this level in typical execution. If they do - // it's a sign of an issue in the Client or a bug in the runtime. So - // dump it to the console and attempt to report it as a Runtime error. - (err) => { - // eslint-disable-next-line no-console - console.log(`Unexpected Top Level Error: ${err.toString()}`); - this.errorCallbacks.uncaughtException(err); - } - ); - }); - } - - /** - * Wait for the next invocation, process it, and schedule the next iteration. - */ - async handleOnce(): Promise { - const { bodyJson, headers } = await this.client.nextInvocation(); - const invokeContext = new InvokeContext(headers); - invokeContext.updateLoggingContext(); - - const [callback, callbackContext] = CallbackContext.build( - this.client, - invokeContext.invokeId, - this.scheduleIteration.bind(this) - ); - - try { - this._setErrorCallbacks(invokeContext.invokeId); - this._setDefaultExitListener(invokeContext.invokeId); - - const result = this.handler( - JSON.parse(bodyJson), - invokeContext.attachEnvironmentData(callbackContext), - callback - ); - - if (_isPromise(result)) { - result - .then(callbackContext.succeed, callbackContext.fail) - .catch(callbackContext.fail); - } - } catch (err: any) { - callback(err); - } - } - - /** - * Replace the error handler callbacks. - * @param {String} invokeId - */ - private _setErrorCallbacks(invokeId: string): void { - this.errorCallbacks.uncaughtException = (error: Error): void => { - this.client.postInvocationError(error, invokeId, () => { - process.exit(129); - }); - }; - this.errorCallbacks.unhandledRejection = (error: Error): void => { - this.client.postInvocationError(error, invokeId, () => { - process.exit(128); - }); - }; - } - - /** - * Setup the 'beforeExit' listener that is used if the callback is never - * called and the handler is not async. - * CallbackContext replaces the listener if a callback is invoked. - */ - private _setDefaultExitListener(invokeId: string): void { - BeforeExitListener.set(() => { - this.client.postInvocationResponse(null, invokeId, () => - this.scheduleIteration() - ); - }); - } -} - -function _isPromise(obj: Promise | unknown): obj is Promise { - return obj instanceof Promise; -} diff --git a/src/Runtime/index.ts b/src/Runtime/index.ts deleted file mode 100644 index e83a528..0000000 --- a/src/Runtime/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. - */ -import Runtime from "./Runtime"; - -export default Runtime; diff --git a/src/RuntimeClient/RuntimeClient.ts b/src/RuntimeClient/RuntimeClient.ts deleted file mode 100644 index bf71bc6..0000000 --- a/src/RuntimeClient/RuntimeClient.ts +++ /dev/null @@ -1,247 +0,0 @@ -/** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * This module defines the Runtime client which is responsible for all HTTP - * interactions with the Runtime layer. - */ - -"use strict"; - -import { - Agent, - RequestOptions, - IncomingMessage, - ClientRequest, - OutgoingHttpHeaders, -} from "http"; -import { URL } from "url"; - -import { InvocationResponse, NativeClient } from "../Common"; -import * as Errors from "../Errors"; -import * as XRayError from "../Errors/XRayError"; - -const ERROR_TYPE_HEADER = "Lambda-Runtime-Function-Error-Type"; - -interface HttpModule { - Agent: typeof Agent; - request( - options: RequestOptions | string | URL, - callback?: (res: IncomingMessage) => void - ): ClientRequest; -} - -export interface IRuntimeClient { - nextInvocation: () => Promise; - - postInvocationError: ( - error: unknown, - id: string, - callback: () => void - ) => void; - - postInvocationResponse: ( - response: unknown, - id: string, - callback: () => void - ) => void; -} - -function userAgent(): string { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const version = require("../../package.json").version; - - return `aws-lambda-nodejs/${process.version}-${version}`; -} - -/** - * Objects of this class are responsible for all interactions with the Runtime - * API. - */ -export default class RuntimeClient implements IRuntimeClient { - agent: Agent; - http: HttpModule; - nativeClient: NativeClient; - userAgent: string; - useAlternativeClient: boolean; - - hostname: string; - port: number; - - constructor( - hostnamePort: string, - httpClient?: HttpModule, - nativeClient?: NativeClient - ) { - this.http = httpClient || require("http"); - this.nativeClient = - nativeClient || require("../../build/Release/runtime-client.node"); - this.userAgent = userAgent(); - this.nativeClient.initializeClient(this.userAgent); - this.useAlternativeClient = - process.env["AWS_LAMBDA_NODEJS_USE_ALTERNATIVE_CLIENT_1"] === "true"; - - const [hostname, port] = hostnamePort.split(":"); - this.hostname = hostname; - this.port = parseInt(port, 10); - this.agent = new this.http.Agent({ - keepAlive: true, - maxSockets: 1, - }); - } - - /** - * Complete and invocation with the provided response. - * @param {Object} response - * An arbitrary object to convert to JSON and send back as as response. - * @param {String} id - * The invocation ID. - * @param {function()} callback - * The callback to run after the POST response ends - */ - postInvocationResponse( - response: unknown, - id: string, - callback: () => void - ): void { - const bodyString = _trySerializeResponse(response); - this.nativeClient.done(id, bodyString); - callback(); - } - - /** - * Post an initialization error to the Runtime API. - * @param {Error} error - * @param {function()} callback - * The callback to run after the POST response ends - */ - postInitError(error: unknown, callback: () => void): void { - const response = Errors.toRuntimeResponse(error); - this._post( - `/2018-06-01/runtime/init/error`, - response, - { [ERROR_TYPE_HEADER]: response.errorType }, - callback - ); - } - - /** - * Post an invocation error to the Runtime API - * @param {Error} error - * @param {String} id - * The invocation ID for the in-progress invocation. - * @param {function()} callback - * The callback to run after the POST response ends - */ - postInvocationError(error: unknown, id: string, callback: () => void): void { - const response = Errors.toRuntimeResponse(error); - const bodyString = _trySerializeResponse(response); - const xrayString = XRayError.toFormatted(error); - this.nativeClient.error(id, bodyString, xrayString); - callback(); - } - - /** - * Get the next invocation. - * @return {PromiseLike.} - * A promise which resolves to an invocation object that contains the body - * as json and the header array. e.g. {bodyJson, headers} - */ - async nextInvocation(): Promise { - if (this.useAlternativeClient) { - const options = { - hostname: this.hostname, - port: this.port, - path: "/2018-06-01/runtime/invocation/next", - method: "GET", - agent: this.agent, - headers: { - "User-Agent": this.userAgent, - }, - }; - return new Promise((resolve, reject) => { - const request = this.http.request(options, (response) => { - let data = ""; - response - .setEncoding("utf-8") - .on("data", (chunk) => { - data += chunk; - }) - .on("end", () => { - resolve({ - bodyJson: data, - headers: response.headers, - }); - }); - }); - request - .on("error", (e) => { - reject(e); - }) - .end(); - }); - } - - return this.nativeClient.next(); - } - - /** - * HTTP Post to a path. - * @param {String} path - * @param {Object} body - * The body is serialized into JSON before posting. - * @param {Object} headers - * The http headers - * @param {function()} callback - * The callback to run after the POST response ends - */ - _post( - path: string, - body: unknown, - headers: OutgoingHttpHeaders, - callback: () => void - ): void { - const bodyString = _trySerializeResponse(body); - const options: RequestOptions = { - hostname: this.hostname, - port: this.port, - path: path, - method: "POST", - headers: Object.assign( - { - "Content-Type": "application/json", - "Content-Length": Buffer.from(bodyString).length, - }, - headers || {} - ), - agent: this.agent, - }; - const request = this.http.request(options, (response) => { - response - .on("end", () => { - callback(); - }) - .on("error", (e) => { - throw e; - }) - // eslint-disable-next-line @typescript-eslint/no-empty-function - .on("data", () => {}); - }); - request - .on("error", (e) => { - throw e; - }) - .end(bodyString, "utf-8"); - } -} - -/** - * Attempt to serialize an object as json. Capture the failure if it occurs and - * throw one that's known to be serializable. - */ -function _trySerializeResponse(body: unknown): string { - try { - return JSON.stringify(body === undefined ? null : body); - } catch (err) { - throw new Error("Unable to stringify response body"); - } -} diff --git a/src/RuntimeClient/index.ts b/src/RuntimeClient/index.ts deleted file mode 100644 index 7cd048e..0000000 --- a/src/RuntimeClient/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. - */ -import RuntimeClient from "./RuntimeClient"; - -export default RuntimeClient; -export { IRuntimeClient } from "./RuntimeClient"; diff --git a/src/RuntimeClient/runtime-client.cc b/src/RuntimeClient/runtime-client.cc deleted file mode 100644 index d6edffa..0000000 --- a/src/RuntimeClient/runtime-client.cc +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright 2019-present Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -#include -#include "aws/lambda-runtime/runtime.h" -#include "aws/lambda-runtime/version.h" -#include "napi.h" - -#include - -static aws::lambda_runtime::runtime *CLIENT; - -Napi::Value InitializeClient(const Napi::CallbackInfo & info) -{ - Napi::Env env = info.Env(); - if (info.Length() < 1) { - Napi::TypeError::New(env, "Wrong number of arguments, expected 1").ThrowAsJavaScriptException(); - return env.Null(); - } - if (!info[0].IsString()) { - Napi::TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException(); - return env.Null(); - } - if (CLIENT != nullptr) { - Napi::TypeError::New(env, "Client already initialized").ThrowAsJavaScriptException(); - return env.Null(); - } - auto userAgent = info[0].As().Utf8Value(); - CLIENT = new aws::lambda_runtime::runtime(getenv("AWS_LAMBDA_RUNTIME_API"), userAgent); - return env.Null(); -} - -Napi::Value Next(const Napi::CallbackInfo & info) -{ - Napi::Env env = info.Env(); - if (CLIENT == nullptr) { - Napi::TypeError::New(env, "Client not initialized").ThrowAsJavaScriptException(); - return env.Null(); - } - auto outcome = CLIENT->get_next(); - if (!outcome.is_success()) { - Napi::TypeError::New(env, "Failed to get next!").ThrowAsJavaScriptException(); - return env.Null(); - } - - // TODO: See if json parsing works on V8:Buffer objects, which might be a way to reduce copying large payloads - auto response = outcome.get_result(); - auto response_data = Napi::String::New(env, response.payload.c_str()); - - // TODO: The current javascript code (InvokeContext.js) to handle the header values itself. - // These type conversions might be replaced by returning the final context object. - auto headers = Napi::Object::New(env); - headers.Set( - Napi::String::New(env, "lambda-runtime-deadline-ms"), - Napi::Number::New(env, - std::chrono::duration_cast( - response.deadline.time_since_epoch() - ).count() - )); - headers.Set( - Napi::String::New(env, "lambda-runtime-aws-request-id"), - Napi::String::New(env, response.request_id.c_str())); - headers.Set( - Napi::String::New(env, "lambda-runtime-trace-id"), - Napi::String::New(env, response.xray_trace_id.c_str())); - headers.Set( - Napi::String::New(env, "lambda-runtime-invoked-function-arn"), - Napi::String::New(env, response.function_arn.c_str())); - if (response.client_context != "") { - headers.Set( - Napi::String::New(env, "lambda-runtime-client-context"), - Napi::String::New(env, response.client_context.c_str())); - } - if (response.cognito_identity != "") { - headers.Set( - Napi::String::New(env, "lambda-runtime-cognito-identity"), - Napi::String::New(env, response.cognito_identity.c_str())); - } - - auto ret = Napi::Object::New(env); - ret.Set(Napi::String::New(env, "bodyJson"), response_data); - ret.Set(Napi::String::New(env, "headers"), headers); - - return ret; -} - -Napi::Value Done(const Napi::CallbackInfo & info) -{ - Napi::Env env = info.Env(); - if (CLIENT == nullptr) { - Napi::TypeError::New(env, "Client not initialized").ThrowAsJavaScriptException(); - return env.Null(); - } - if (info.Length() < 2) { - Napi::TypeError::New(env, "Wrong number of arguments, expected 2").ThrowAsJavaScriptException(); - return env.Null(); - } - if (!info[0].IsString() || !info[1].IsString()) { - Napi::TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException(); - return env.Null(); - } - auto requestId = info[0].As(); - auto responseString = info[1].As(); - auto response = aws::lambda_runtime::invocation_response::success(responseString.Utf8Value(), "application/json"); - auto outcome = CLIENT->post_success(requestId.Utf8Value(), response); - return env.Null(); -} - -Napi::Value Error(const Napi::CallbackInfo & info) -{ - Napi::Env env = info.Env(); - if (CLIENT == nullptr) { - Napi::TypeError::New(env, "Client not initialized").ThrowAsJavaScriptException(); - return env.Null(); - } - if (info.Length() < 3) { - Napi::TypeError::New(env, "Wrong number of arguments, expected 3").ThrowAsJavaScriptException(); - return env.Null(); - } - if (!info[0].IsString() || !info[1].IsString() || !info[2].IsString()) { - Napi::TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException(); - return env.Null(); - } - auto requestId = info[0].As(); - auto responseString = info[1].As(); - auto xrayResponse = info[2].As(); - auto response = aws::lambda_runtime::invocation_response(responseString.Utf8Value(), "application/json", false, xrayResponse.Utf8Value()); - auto outcome = CLIENT->post_failure(requestId.Utf8Value(), response); - return env.Null(); -} - -Napi::Object Init(Napi::Env env, Napi::Object exports) -{ - exports.Set(Napi::String::New(env, "initializeClient"), Napi::Function::New(env, InitializeClient)); - exports.Set(Napi::String::New(env, "next"), Napi::Function::New(env, Next)); - exports.Set(Napi::String::New(env, "done"), Napi::Function::New(env, Done)); - exports.Set(Napi::String::New(env, "error"), Napi::Function::New(env, Error)); - return exports; -} - -NODE_API_MODULE(addon, Init); diff --git a/src/StreamingContext.js b/src/StreamingContext.js new file mode 100644 index 0000000..f7a23ea --- /dev/null +++ b/src/StreamingContext.js @@ -0,0 +1,86 @@ +/** + * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +const BeforeExitListener = require('./BeforeExitListener.js'); +const { + InvalidStreamingOperation, + toFormatted, + intoError, +} = require('./Errors'); +const { verbose, vverbose } = require('./VerboseLog.js').logger('STREAM'); +const { tryCallFail } = require('./ResponseStream'); + +/** + * Construct the base-context object which includes the required flags and + * callback methods for the Node programming model. + * @param client {RAPIDClient} + * The RAPID client used to post results/errors. + * @param id {string} + * The invokeId for the current invocation. + * @param scheduleNext {function} + * A function which takes no params and immediately schedules the next + * iteration of the invoke loop. + * @param options {object} + * An object with optional properties for streaming. + * @return {context} + * Context object that has the createStream function. + */ +module.exports.build = function (client, id, scheduleNext, options) { + let waitForEmptyEventLoop = true; + + const scheduleNextNow = () => { + verbose('StreamingContext::scheduleNextNow entered'); + if (!waitForEmptyEventLoop) { + scheduleNext(); + } else { + BeforeExitListener.set(() => { + setImmediate(() => { + scheduleNext(); + }); + }); + } + }; + + let isStreamCreated = false; + const streamingContext = { + get callbackWaitsForEmptyEventLoop() { + return waitForEmptyEventLoop; + }, + set callbackWaitsForEmptyEventLoop(value) { + waitForEmptyEventLoop = value; + }, + createStream: (callback) => { + if (isStreamCreated) { + throw new InvalidStreamingOperation( + 'Cannot create stream for the same StreamingContext more than once.', + ); + } + + const { request: responseStream, responseDone: rapidResponse } = + client.getStreamForInvocationResponse(id, callback, options); + + isStreamCreated = true; + vverbose('StreamingContext::createStream stream created'); + + return { + fail: (err, callback) => { + console.error('Invoke Error', toFormatted(intoError(err))); + + tryCallFail(responseStream, err, callback); + }, + responseStream, + rapidResponse, + scheduleNext: () => { + verbose('StreamingContext::createStream scheduleNext'); + BeforeExitListener.reset(); + scheduleNextNow(); + }, + }; + }, + }; + + return streamingContext; +}; diff --git a/src/UserFunction.js b/src/UserFunction.js new file mode 100644 index 0000000..1114fb4 --- /dev/null +++ b/src/UserFunction.js @@ -0,0 +1,321 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * This module defines the functions for loading the user's code as specified + * in a handler string. + */ + +'use strict'; + +const path = require('path'); +const fs = require('fs'); +const { + HandlerNotFound, + MalformedHandlerName, + ImportModuleError, + UserCodeSyntaxError, +} = require('./Errors.js'); +const { verbose } = require('./VerboseLog.js').logger('LOADER'); +const { HttpResponseStream } = require('./HttpResponseStream'); + +const FUNCTION_EXPR = /^([^.]*)\.(.*)$/; +const RELATIVE_PATH_SUBSTRING = '..'; +const HANDLER_STREAMING = Symbol.for('aws.lambda.runtime.handler.streaming'); +const HANDLER_HIGHWATERMARK = Symbol.for( + 'aws.lambda.runtime.handler.streaming.highWaterMark', +); +const STREAM_RESPONSE = 'response'; + +// `awslambda.streamifyResponse` function is provided by default. +const NoGlobalAwsLambda = + process.env['AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA'] === '1' || + process.env['AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA'] === 'true'; + +/** + * Break the full handler string into two pieces, the module root and the actual + * handler string. + * Given './somepath/something/module.nestedobj.handler' this returns + * ['./somepath/something', 'module.nestedobj.handler'] + */ +function _moduleRootAndHandler(fullHandlerString) { + let handlerString = path.basename(fullHandlerString); + let moduleRoot = fullHandlerString.substring( + 0, + fullHandlerString.indexOf(handlerString), + ); + return [moduleRoot, handlerString]; +} + +/** + * Split the handler string into two pieces: the module name and the path to + * the handler function. + */ +function _splitHandlerString(handler) { + let match = handler.match(FUNCTION_EXPR); + if (!match || match.length != 3) { + throw new MalformedHandlerName('Bad handler'); + } + return [match[1], match[2]]; // [module, function-path] +} + +/** + * Resolve the user's handler function from the module. + */ +function _resolveHandler(object, nestedProperty) { + return nestedProperty.split('.').reduce((nested, key) => { + return nested && nested[key]; + }, object); +} + +function _tryRequireFile(file, extension) { + const path = file + (extension || ''); + verbose('Try loading as commonjs:', path); + return fs.existsSync(path) ? require(path) : undefined; +} + +async function _tryAwaitImport(file, extension) { + const path = file + (extension || ''); + verbose('Try loading as esmodule:', path); + + if (fs.existsSync(path)) { + return await import(path); + } + + return undefined; +} + +function _hasFolderPackageJsonTypeModule(folder) { + // Check if package.json exists, return true if type === "module" in package json. + // If there is no package.json, and there is a node_modules, return false. + // Check parent folder otherwise, if there is one. + if (folder.endsWith('/node_modules')) { + return false; + } + + const pj = path.join(folder, '/package.json'); + if (fs.existsSync(pj)) { + try { + const pkg = JSON.parse(fs.readFileSync(pj)); + if (pkg) { + if (pkg.type === 'module') { + verbose('type: module detected in', pj); + return true; + } else { + verbose('type: module not detected in', pj); + return false; + } + } + } catch (e) { + console.warn( + `${pj} cannot be read, it will be ignored for ES module detection purposes.`, + e, + ); + return false; + } + } + + if (folder === '/') { + // We have reached root without finding either a package.json or a node_modules. + return false; + } + + return _hasFolderPackageJsonTypeModule(path.resolve(folder, '..')); +} + +function _hasPackageJsonTypeModule(file) { + // File must have a .js extension + const jsPath = file + '.js'; + return fs.existsSync(jsPath) + ? _hasFolderPackageJsonTypeModule(path.resolve(path.dirname(jsPath))) + : false; +} + +/** + * Attempt to load the user's module. + * Attempts to directly resolve the module relative to the application root, + * then falls back to the more general require(). + */ +async function _tryRequire(appRoot, moduleRoot, module) { + verbose( + 'Try loading as commonjs: ', + module, + ' with paths: ,', + appRoot, + moduleRoot, + ); + + const lambdaStylePath = path.resolve(appRoot, moduleRoot, module); + + // Extensionless files are loaded via require. + const extensionless = _tryRequireFile(lambdaStylePath); + if (extensionless) { + return extensionless; + } + + // If package.json type != module, .js files are loaded via require. + const pjHasModule = _hasPackageJsonTypeModule(lambdaStylePath); + if (!pjHasModule) { + const loaded = _tryRequireFile(lambdaStylePath, '.js'); + if (loaded) { + return loaded; + } + } + + // If still not loaded, try .js, .mjs, and .cjs in that order. + // Files ending with .js are loaded as ES modules when the nearest parent package.json + // file contains a top-level field "type" with a value of "module". + // https://nodejs.org/api/packages.html#packages_type + const loaded = + (pjHasModule && (await _tryAwaitImport(lambdaStylePath, '.js'))) || + (await _tryAwaitImport(lambdaStylePath, '.mjs')) || + _tryRequireFile(lambdaStylePath, '.cjs'); + if (loaded) { + return loaded; + } + + verbose( + 'Try loading as commonjs: ', + module, + ' with path(s): ', + appRoot, + moduleRoot, + ); + + // Why not just require(module)? + // Because require() is relative to __dirname, not process.cwd(). And the + // runtime implementation is not located in /var/task + // This won't work (yet) for esModules as import.meta.resolve is still experimental + // See: https://nodejs.org/api/esm.html#esm_import_meta_resolve_specifier_parent + const nodeStylePath = require.resolve(module, { + paths: [appRoot, moduleRoot], + }); + + return require(nodeStylePath); +} + +/** + * Load the user's application or throw a descriptive error. + * @throws Runtime errors in two cases + * 1 - UserCodeSyntaxError if there's a syntax error while loading the module + * 2 - ImportModuleError if the module cannot be found + */ +async function _loadUserApp(appRoot, moduleRoot, module) { + if (!NoGlobalAwsLambda) { + globalThis.awslambda = { + streamifyResponse: (handler, options) => { + handler[HANDLER_STREAMING] = STREAM_RESPONSE; + if (typeof options?.highWaterMark === 'number') { + handler[HANDLER_HIGHWATERMARK] = parseInt(options.highWaterMark); + } + return handler; + }, + HttpResponseStream: HttpResponseStream, + }; + } + + try { + return await _tryRequire(appRoot, moduleRoot, module); + } catch (e) { + if (e instanceof SyntaxError) { + throw new UserCodeSyntaxError(e); + } else if (e.code !== undefined && e.code === 'MODULE_NOT_FOUND') { + verbose('globalPaths', JSON.stringify(require('module').globalPaths)); + throw new ImportModuleError(e); + } else { + throw e; + } + } +} + +function _throwIfInvalidHandler(fullHandlerString) { + if (fullHandlerString.includes(RELATIVE_PATH_SUBSTRING)) { + throw new MalformedHandlerName( + `'${fullHandlerString}' is not a valid handler name. Use absolute paths when specifying root directories in handler names.`, + ); + } +} + +function _isHandlerStreaming(handler) { + if ( + typeof handler[HANDLER_STREAMING] === 'undefined' || + handler[HANDLER_STREAMING] === null || + handler[HANDLER_STREAMING] === false + ) { + return false; + } + + if (handler[HANDLER_STREAMING] === STREAM_RESPONSE) { + return STREAM_RESPONSE; + } else { + throw new MalformedStreamingHandler( + 'Only response streaming is supported.', + ); + } +} + +function _highWaterMark(handler) { + if ( + typeof handler[HANDLER_HIGHWATERMARK] === 'undefined' || + handler[HANDLER_HIGHWATERMARK] === null || + handler[HANDLER_HIGHWATERMARK] === false + ) { + return undefined; + } + + const hwm = parseInt(handler[HANDLER_HIGHWATERMARK]); + return isNaN(hwm) ? undefined : hwm; +} + +/** + * Load the user's function with the approot and the handler string. + * @param appRoot {string} + * The path to the application root. + * @param handlerString {string} + * The user-provided handler function in the form 'module.function'. + * @return userFuction {function} + * The user's handler function. This function will be passed the event body, + * the context object, and the callback function. + * @throws In five cases:- + * 1 - if the handler string is incorrectly formatted an error is thrown + * 2 - if the module referenced by the handler cannot be loaded + * 3 - if the function in the handler does not exist in the module + * 4 - if a property with the same name, but isn't a function, exists on the + * module + * 5 - the handler includes illegal character sequences (like relative paths + * for traversing up the filesystem '..') + * Errors for scenarios known by the runtime, will be wrapped by Runtime.* errors. + */ +module.exports.load = async function (appRoot, fullHandlerString) { + _throwIfInvalidHandler(fullHandlerString); + + let [moduleRoot, moduleAndHandler] = _moduleRootAndHandler(fullHandlerString); + let [module, handlerPath] = _splitHandlerString(moduleAndHandler); + + let userApp = await _loadUserApp(appRoot, moduleRoot, module); + let handlerFunc = _resolveHandler(userApp, handlerPath); + + if (!handlerFunc) { + throw new HandlerNotFound( + `${fullHandlerString} is undefined or not exported`, + ); + } + + if (typeof handlerFunc !== 'function') { + throw new HandlerNotFound(`${fullHandlerString} is not a function`); + } + + return handlerFunc; +}; + +module.exports.isHandlerFunction = function (value) { + return typeof value === 'function'; +}; + +module.exports.getHandlerMetadata = function (handlerFunc) { + return { + streaming: _isHandlerStreaming(handlerFunc), + highWaterMark: _highWaterMark(handlerFunc), + }; +}; + +module.exports.STREAM_RESPONSE = STREAM_RESPONSE; diff --git a/src/VerboseLog.js b/src/VerboseLog.js new file mode 100644 index 0000000..1f4361f --- /dev/null +++ b/src/VerboseLog.js @@ -0,0 +1,49 @@ +/** + * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +const EnvVarName = 'AWS_LAMBDA_RUNTIME_VERBOSE'; +const Tag = 'RUNTIME'; +const Verbosity = (() => { + if (!process.env[EnvVarName]) { + return 0; + } + + try { + const verbosity = parseInt(process.env[EnvVarName]); + return verbosity < 0 ? 0 : verbosity > 3 ? 3 : verbosity; + } catch (_) { + return 0; + } +})(); + +exports.logger = function (category) { + return { + verbose: function () { + if (Verbosity >= 1) { + const args = [...arguments].map((arg) => + typeof arg === 'function' ? arg() : arg, + ); + console.log.apply(null, [Tag, category, ...args]); + } + }, + vverbose: function () { + if (Verbosity >= 2) { + const args = [...arguments].map((arg) => + typeof arg === 'function' ? arg() : arg, + ); + console.log.apply(null, [Tag, category, ...args]); + } + }, + vvverbose: function () { + if (Verbosity >= 3) { + const args = [...arguments].map((arg) => + typeof arg === 'function' ? arg() : arg, + ); + console.log.apply(null, [Tag, category, ...args]); + } + }, + }; +}; diff --git a/src/XRayError.js b/src/XRayError.js new file mode 100644 index 0000000..86c01d1 --- /dev/null +++ b/src/XRayError.js @@ -0,0 +1,94 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +module.exports.formatted = (err) => { + try { + return JSON.stringify(new XRayFormattedCause(err)); + } catch (err) { + return ''; + } +}; + +/** + * prepare an exception blob for sending to AWS X-Ray + * adapted from https://code.amazon.com/packages/AWSTracingSDKNode/blobs/c917508ca4fce6a795f95dc30c91b70c6bc6c617/--/core/lib/segments/attributes/captured_exception.js + * transform an Error, or Error-like, into an exception parseable by X-Ray's service. + * { + * "name": "CustomException", + * "message": "Something bad happend!", + * "stack": [ + * "exports.handler (/var/task/node_modules/event_invoke.js:3:502) + * ] + * } + * => + * { + * "working_directory": "/var/task", + * "exceptions": [ + * { + * "type": "CustomException", + * "message": "Something bad happend!", + * "stack": [ + * { + * "path": "/var/task/event_invoke.js", + * "line": 502, + * "label": "exports.throw_custom_exception" + * } + * ] + * } + * ], + * "paths": [ + * "/var/task/event_invoke.js" + * ] + * } + */ +class XRayFormattedCause { + constructor(err) { + this.working_directory = process.cwd(); // eslint-disable-line + + let stack = []; + if (err.stack) { + let stackLines = err.stack.split('\n'); + stackLines.shift(); + + stackLines.forEach((stackLine) => { + let line = stackLine.trim().replace(/\(|\)/g, ''); + line = line.substring(line.indexOf(' ') + 1); + + let label = + line.lastIndexOf(' ') >= 0 + ? line.slice(0, line.lastIndexOf(' ')) + : null; + let path = + label == undefined || label == null || label.length === 0 + ? line + : line.slice(line.lastIndexOf(' ') + 1); + path = path.split(':'); + + let entry = { + path: path[0], + line: parseInt(path[1]), + label: label || 'anonymous', + }; + + stack.push(entry); + }); + } + + this.exceptions = [ + { + type: err.name, + message: err.message, + stack: stack, + }, + ]; + + let paths = new Set(); + stack.forEach((entry) => { + paths.add(entry.path); + }); + this.paths = Array.from(paths); + } +} diff --git a/src/build.js b/src/build.js new file mode 100644 index 0000000..cb7baf4 --- /dev/null +++ b/src/build.js @@ -0,0 +1,49 @@ +/** + * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +const { build } = require('esbuild'); +const fs = require('fs'); + +const shared = { + bundle: true, + entryPoints: ['index.mjs'], + external: ['./rapid-client.node'], + logLevel: 'info', + minify: false, + platform: 'node', + format: 'esm', + charset: 'utf8', + banner: { + js: `/** Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. */\nimport { createRequire } from \"module\";\nconst require = createRequire(import.meta.url);`, + }, +}; + +const buildOneSet = (target) => { + build({ + ...shared, + outfile: `../dist/index.mjs`, + target, + }); + + // Keep backward compatibility for Node14 + if (process.version.startsWith('v14')) { + build({ + ...shared, + format: 'cjs', + entryPoints: ['UserFunction.js'], + banner: { + js: '(function (){', + }, + footer: { + js: '})();', + }, + outfile: `../dist/UserFunction.js`, + target, + }); + } +}; + +buildOneSet('node14.21.3'); diff --git a/src/index.mjs b/src/index.mjs new file mode 100755 index 0000000..1fc14c0 --- /dev/null +++ b/src/index.mjs @@ -0,0 +1,53 @@ +/** + * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * This module is the bootstrap entrypoint. It establishes the top-level event + * listeners and loads the user's code. + */ + +const RAPIDClient = require('./RAPIDClient.js'); +const Runtime = require('./Runtime.js'); +const UserFunction = require('./UserFunction.js'); +const Errors = require('./Errors.js'); +const BeforeExitListener = require('./BeforeExitListener.js'); +const LogPatch = require('./LogPatch'); + +export async function run(appRootOrHandler, handler = '') { + LogPatch.patchConsole(); + const client = new RAPIDClient(process.env.AWS_LAMBDA_RUNTIME_API); + + let errorCallbacks = { + uncaughtException: (error) => { + client.postInitError(error, () => process.exit(129)); + }, + unhandledRejection: (error) => { + client.postInitError(error, () => process.exit(128)); + }, + }; + + process.on('uncaughtException', (error) => { + console.error('Uncaught Exception', Errors.toFormatted(error)); + errorCallbacks.uncaughtException(error); + }); + + process.on('unhandledRejection', (reason, promise) => { + let error = new Errors.UnhandledPromiseRejection(reason, promise); + console.error('Unhandled Promise Rejection', Errors.toFormatted(error)); + errorCallbacks.unhandledRejection(error); + }); + + BeforeExitListener.reset(); + process.on('beforeExit', BeforeExitListener.invoke); + + const handlerFunc = UserFunction.isHandlerFunction(appRootOrHandler) + ? appRootOrHandler + : await UserFunction.load(appRootOrHandler, handler); + + const metadata = UserFunction.getHandlerMetadata(handlerFunc); + new Runtime( + client, + handlerFunc, + metadata, + errorCallbacks, + ).scheduleIteration(); +} diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 148edad..0000000 --- a/src/index.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* eslint-disable no-console */ -/** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * This module is the bootstrap entrypoint. It establishes the top-level event - * listeners and loads the user's code. - */ - -"use strict"; - -import { HandlerFunction, isHandlerFunction } from "./Common"; -import * as Errors from "./Errors"; -import RuntimeClient from "./RuntimeClient"; -import Runtime from "./Runtime"; -import BeforeExitListener from "./Runtime/BeforeExitListener"; -import LogPatch from "./utils/LogPatch"; -import * as UserFunction from "./utils/UserFunction"; - -LogPatch.patchConsole(); - -export function run(appRoot: string, handler: string): void; -export function run(handler: HandlerFunction): void; - -export function run( - appRootOrHandler: string | HandlerFunction, - handler: string = "" -): void { - if (!process.env.AWS_LAMBDA_RUNTIME_API) { - throw new Error("Missing Runtime API Server configuration."); - } - const client = new RuntimeClient(process.env.AWS_LAMBDA_RUNTIME_API); - - const errorCallbacks = { - uncaughtException: (error: Error) => { - client.postInitError(error, () => process.exit(129)); - }, - unhandledRejection: (error: Error) => { - client.postInitError(error, () => process.exit(128)); - }, - }; - - process.on("uncaughtException", (error) => { - console.error("Uncaught Exception", Errors.toFormatted(error)); - errorCallbacks.uncaughtException(error); - }); - - process.on("unhandledRejection", (reason, promise) => { - const error = new Errors.UnhandledPromiseRejection( - reason?.toString(), - promise - ); - console.error("Unhandled Promise Rejection", Errors.toFormatted(error)); - errorCallbacks.unhandledRejection(error); - }); - - BeforeExitListener.reset(); - process.on("beforeExit", BeforeExitListener.invoke); - - const handlerFunc = isHandlerFunction(appRootOrHandler) - ? appRootOrHandler - : (UserFunction.load(appRootOrHandler, handler) as HandlerFunction); - const runtime = new Runtime(client, handlerFunc, errorCallbacks); - - runtime.scheduleIteration(); -} diff --git a/src/rapid-client.cc b/src/rapid-client.cc new file mode 100644 index 0000000..d02f55e --- /dev/null +++ b/src/rapid-client.cc @@ -0,0 +1,156 @@ +/* + * Copyright 2019-present Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +#include +#include "aws/lambda-runtime/runtime.h" +#include "napi.h" +#include +#include +#include +#include + +static const std::string ENDPOINT(getenv("AWS_LAMBDA_RUNTIME_API")); +static aws::lambda_runtime::runtime CLIENT(ENDPOINT); + +// Napi::AsyncWorker docs: https://github.com/nodejs/node-addon-api/blob/main/doc/async_worker.md +class RuntimeApiNextPromiseWorker : public Napi::AsyncWorker { +public: + RuntimeApiNextPromiseWorker(Napi::Env &env) + : Napi::AsyncWorker(env), response(), deferred(Napi::Promise::Deferred::New(env)) {} + + ~RuntimeApiNextPromiseWorker() {} + + void Execute() override { + auto outcome = CLIENT.get_next(); + if (!outcome.is_success()) { + std::string err = "Failed to get next invocation, error "; + err.append(std::to_string(static_cast(outcome.get_failure()))); + SetError(err); + return; + } + + // TODO: See if json parsing works on V8:Buffer objects, which might be a way to reduce copying large payloads + response = outcome.get_result(); + } + + Napi::Value Promise() { + return deferred.Promise(); + } + + void OnOK() override { + Napi::Env env = Env(); + auto response_data = Napi::String::New(env, response.payload.c_str()); + + // TODO: The current javascript code (InvokeContext.js) to handle the header values itself. + // These type conversions might be replaced by returning the final context object. + auto headers = Napi::Object::New(env); + headers.Set( + Napi::String::New(env, "lambda-runtime-deadline-ms"), + Napi::Number::New(env, + std::chrono::duration_cast( + response.deadline.time_since_epoch() + ).count() + )); + headers.Set( + Napi::String::New(env, "lambda-runtime-aws-request-id"), + Napi::String::New(env, response.request_id.c_str())); + headers.Set( + Napi::String::New(env, "lambda-runtime-trace-id"), + Napi::String::New(env, response.xray_trace_id.c_str())); + headers.Set( + Napi::String::New(env, "lambda-runtime-invoked-function-arn"), + Napi::String::New(env, response.function_arn.c_str())); + if (response.client_context != "") { + headers.Set( + Napi::String::New(env, "lambda-runtime-client-context"), + Napi::String::New(env, response.client_context.c_str())); + } + if (response.cognito_identity != "") { + headers.Set( + Napi::String::New(env, "lambda-runtime-cognito-identity"), + Napi::String::New(env, response.cognito_identity.c_str())); + } + + auto ret = Napi::Object::New(env); + ret.Set(Napi::String::New(env, "bodyJson"), response_data); + ret.Set(Napi::String::New(env, "headers"), headers); + + deferred.Resolve(ret); + } + + void OnError(Napi::Error const &error) override { + deferred.Reject(error.Value()); + } + +private: + aws::lambda_runtime::invocation_request response; + Napi::Promise::Deferred deferred; +}; + + +Napi::Value Next(const Napi::CallbackInfo & info) +{ + Napi::Env env = info.Env(); + RuntimeApiNextPromiseWorker *nextWorker = new RuntimeApiNextPromiseWorker(env); + nextWorker->Queue(); + return nextWorker->Promise(); +} + +Napi::Value Done(const Napi::CallbackInfo & info) +{ + Napi::Env env = info.Env(); + if (info.Length() < 2) { + Napi::TypeError::New(env, "Wrong number of arguments, expected 2").ThrowAsJavaScriptException(); + return env.Null(); + } + if (!info[0].IsString() || !info[1].IsString()) { + Napi::TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException(); + return env.Null(); + } + auto requestId = info[0].As(); + auto responseString = info[1].As(); + auto response = aws::lambda_runtime::invocation_response::success(responseString.Utf8Value(), "application/json"); + auto outcome = CLIENT.post_success(requestId.Utf8Value(), response); + return env.Null(); +} + +Napi::Value Error(const Napi::CallbackInfo & info) +{ + Napi::Env env = info.Env(); + if (info.Length() < 3) { + Napi::TypeError::New(env, "Wrong number of arguments, expected 3").ThrowAsJavaScriptException(); + return env.Null(); + } + if (!info[0].IsString() || !info[1].IsString() || !info[2].IsString()) { + Napi::TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException(); + return env.Null(); + } + auto requestId = info[0].As(); + auto responseString = info[1].As(); + auto xrayResponse = info[2].As(); + auto response = aws::lambda_runtime::invocation_response(responseString.Utf8Value(), "application/json", false, xrayResponse.Utf8Value()); + auto outcome = CLIENT.post_failure(requestId.Utf8Value(), response); + return env.Null(); +} + +Napi::Object Init(Napi::Env env, Napi::Object exports) +{ + exports.Set(Napi::String::New(env, "next"), Napi::Function::New(env, Next)); + exports.Set(Napi::String::New(env, "done"), Napi::Function::New(env, Done)); + exports.Set(Napi::String::New(env, "error"), Napi::Function::New(env, Error)); + return exports; +} + +NODE_API_MODULE(addon, Init); diff --git a/src/tsconfig.json b/src/tsconfig.json deleted file mode 100644 index 8888b7e..0000000 --- a/src/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "../tsconfig-base.json", - "compilerOptions": { - "outDir": "../lib" - } -} \ No newline at end of file diff --git a/src/types/awslambda.d.ts b/src/types/awslambda.d.ts new file mode 100644 index 0000000..1c5153e --- /dev/null +++ b/src/types/awslambda.d.ts @@ -0,0 +1,10 @@ +export class HttpResponseStream { + static from(underlyingStream: any, prelude: any): any; +} + +declare global { + namespace awslambda { + function streamifyResponse(handler: any, options: any): any; + let HttpResponseStream: HttpResponseStream; + } +} \ No newline at end of file diff --git a/src/types/index.d.mts b/src/types/index.d.mts new file mode 100644 index 0000000..e08f6b0 --- /dev/null +++ b/src/types/index.d.mts @@ -0,0 +1 @@ +export function run(appRootOrHandler: any, handler?: string): Promise; \ No newline at end of file diff --git a/src/utils/LogPatch.ts b/src/utils/LogPatch.ts deleted file mode 100644 index bec949d..0000000 --- a/src/utils/LogPatch.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable no-console */ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; - -import * as fs from "fs"; -import * as util from "util"; - -const levels = Object.freeze({ - INFO: { name: "INFO" }, - DEBUG: { name: "DEBUG" }, - WARN: { name: "WARN" }, - ERROR: { name: "ERROR" }, - TRACE: { name: "TRACE" }, - FATAL: { name: "FATAL" }, -}); - -/* Use a unique symbol to provide global access without risk of name clashes. */ -const REQUEST_ID_SYMBOL = Symbol.for("aws.lambda.runtime.requestId"); -const _currentRequestId = { - get: () => (global as any)[REQUEST_ID_SYMBOL], - set: (id: any) => ((global as any)[REQUEST_ID_SYMBOL] = id), -}; - -/** - * Write logs to stdout. - */ -const _logToStdout = (level: any, message: any) => { - const time = new Date().toISOString(); - const requestId = _currentRequestId.get(); - let line = `${time}\t${requestId}\t${level.name}\t${message}`; - line = line.replace(/\n/g, "\r"); - process.stdout.write(line + "\n"); -}; - -/** - * Write logs to filedescriptor. - * Implements the logging contract between runtimes and the platform. - * Each entry is framed as: - * +----------------------+------------------------+-----------------------+ - * | Frame Type - 4 bytes | Length (len) - 4 bytes | Message - 'len' bytes | - * +----------------------+------------------------+-----------------------+ - * The frist 4 bytes are the frame type. For logs this is always 0xa55a0001. - * The second 4 bytes are the length of the message. - * The remaining bytes ar ethe message itself. Byte order is big-endian. - */ -const _logToFd = function (logTarget: any) { - const typeAndLength = Buffer.alloc(8); - typeAndLength.writeUInt32BE(0xa55a0001, 0); - typeAndLength.writeUInt32BE(0x00000000, 4); - - return (level: any, message: any) => { - const time = new Date().toISOString(); - const requestId = _currentRequestId.get(); - const enrichedMessage = `${time}\t${requestId}\t${level.name}\t${message}\n`; - const messageBytes = Buffer.from(enrichedMessage, "utf8"); - typeAndLength.writeInt32BE(messageBytes.length, 4); - fs.writeSync(logTarget, typeAndLength); - fs.writeSync(logTarget, messageBytes); - }; -}; - -/** - * Replace console functions with a log function. - * @param {Function(level, String)} log - */ -function _patchConsoleWith(log: any) { - console.log = (msg, ...params) => { - log(levels.INFO, util.format(msg, ...params)); - }; - console.debug = (msg, ...params) => { - log(levels.DEBUG, util.format(msg, ...params)); - }; - console.info = (msg, ...params) => { - log(levels.INFO, util.format(msg, ...params)); - }; - console.warn = (msg, ...params) => { - log(levels.WARN, util.format(msg, ...params)); - }; - console.error = (msg, ...params) => { - log(levels.ERROR, util.format(msg, ...params)); - }; - console.trace = (msg, ...params) => { - log(levels.TRACE, util.format(msg, ...params)); - }; - (console as any).fatal = (msg: any, ...params: any[]) => { - log(levels.FATAL, util.format(msg, ...params)); - }; -} - -const _patchConsole = (): void => { - if ( - process.env["_LAMBDA_TELEMETRY_LOG_FD"] != null && - process.env["_LAMBDA_TELEMETRY_LOG_FD"] != undefined - ) { - const logFd = parseInt(process.env["_LAMBDA_TELEMETRY_LOG_FD"]); - _patchConsoleWith(_logToFd(logFd)); - delete process.env["_LAMBDA_TELEMETRY_LOG_FD"]; - } else { - _patchConsoleWith(_logToStdout); - } -}; - -export default { - setCurrentRequestId: _currentRequestId.set, - patchConsole: _patchConsole, -}; diff --git a/src/utils/UserFunction.ts b/src/utils/UserFunction.ts deleted file mode 100644 index f38a62b..0000000 --- a/src/utils/UserFunction.ts +++ /dev/null @@ -1,165 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * This module defines the functions for loading the user's code as specified - * in a handler string. - */ - -"use strict"; - -import path from "path"; -import fs from "fs"; -import { HandlerFunction } from "../Common"; -import { - HandlerNotFound, - MalformedHandlerName, - ImportModuleError, - UserCodeSyntaxError, -} from "../Errors"; - -const FUNCTION_EXPR = /^([^.]*)\.(.*)$/; -const RELATIVE_PATH_SUBSTRING = ".."; - -/** - * Break the full handler string into two pieces, the module root and the actual - * handler string. - * Given './somepath/something/module.nestedobj.handler' this returns - * ['./somepath/something', 'module.nestedobj.handler'] - */ -function _moduleRootAndHandler(fullHandlerString: string): [string, string] { - const handlerString = path.basename(fullHandlerString); - const moduleRoot = fullHandlerString.substring( - 0, - fullHandlerString.indexOf(handlerString) - ); - return [moduleRoot, handlerString]; -} - -/** - * Split the handler string into two pieces: the module name and the path to - * the handler function. - */ -function _splitHandlerString(handler: string): [string, string] { - const match = handler.match(FUNCTION_EXPR); - if (!match || match.length != 3) { - throw new MalformedHandlerName("Bad handler"); - } - return [match[1], match[2]]; // [module, function-path] -} - -/** - * Resolve the user's handler function from the module. - */ -function _resolveHandler(object: any, nestedProperty: string): any { - return nestedProperty.split(".").reduce((nested, key) => { - return nested && nested[key]; - }, object); -} - -/** - * Verify that the provided path can be loaded as a file per: - * https://nodejs.org/dist/latest-v10.x/docs/api/modules.html#modules_all_together - * @param string - the fully resolved file path to the module - * @return bool - */ -function _canLoadAsFile(modulePath: string): boolean { - return fs.existsSync(modulePath) || fs.existsSync(modulePath + ".js"); -} - -/** - * Attempt to load the user's module. - * Attempts to directly resolve the module relative to the application root, - * then falls back to the more general require(). - */ -function _tryRequire(appRoot: string, moduleRoot: string, module: string): any { - const lambdaStylePath = path.resolve(appRoot, moduleRoot, module); - if (_canLoadAsFile(lambdaStylePath)) { - return require(lambdaStylePath); - } else { - // Why not just require(module)? - // Because require() is relative to __dirname, not process.cwd() - const nodeStylePath = require.resolve(module, { - paths: [appRoot, moduleRoot], - }); - return require(nodeStylePath); - } -} - -/** - * Load the user's application or throw a descriptive error. - * @throws Runtime errors in two cases - * 1 - UserCodeSyntaxError if there's a syntax error while loading the module - * 2 - ImportModuleError if the module cannot be found - */ -function _loadUserApp( - appRoot: string, - moduleRoot: string, - module: string -): any { - try { - return _tryRequire(appRoot, moduleRoot, module); - } catch (e: any) { - if (e instanceof SyntaxError) { - throw new UserCodeSyntaxError(e); - } else if (e.code !== undefined && e.code === "MODULE_NOT_FOUND") { - throw new ImportModuleError(e); - } else { - throw e; - } - } -} - -function _throwIfInvalidHandler(fullHandlerString: string): void { - if (fullHandlerString.includes(RELATIVE_PATH_SUBSTRING)) { - throw new MalformedHandlerName( - `'${fullHandlerString}' is not a valid handler name. Use absolute paths when specifying root directories in handler names.` - ); - } -} - -/** - * Load the user's function with the approot and the handler string. - * @param appRoot {string} - * The path to the application root. - * @param handlerString {string} - * The user-provided handler function in the form 'module.function'. - * @return userFuction {function} - * The user's handler function. This function will be passed the event body, - * the context object, and the callback function. - * @throws In five cases:- - * 1 - if the handler string is incorrectly formatted an error is thrown - * 2 - if the module referenced by the handler cannot be loaded - * 3 - if the function in the handler does not exist in the module - * 4 - if a property with the same name, but isn't a function, exists on the - * module - * 5 - the handler includes illegal character sequences (like relative paths - * for traversing up the filesystem '..') - * Errors for scenarios known by the runtime, will be wrapped by Runtime.* errors. - */ -export const load = function ( - appRoot: string, - fullHandlerString: string -): HandlerFunction { - _throwIfInvalidHandler(fullHandlerString); - - const [moduleRoot, moduleAndHandler] = _moduleRootAndHandler( - fullHandlerString - ); - const [module, handlerPath] = _splitHandlerString(moduleAndHandler); - - const userApp = _loadUserApp(appRoot, moduleRoot, module); - const handlerFunc = _resolveHandler(userApp, handlerPath); - - if (!handlerFunc) { - throw new HandlerNotFound( - `${fullHandlerString} is undefined or not exported` - ); - } - - if (typeof handlerFunc !== "function") { - throw new HandlerNotFound(`${fullHandlerString} is not a function`); - } - - return handlerFunc; -}; diff --git a/test/handlers/asyncInit.mjs b/test/handlers/asyncInit.mjs new file mode 100644 index 0000000..b8fb848 --- /dev/null +++ b/test/handlers/asyncInit.mjs @@ -0,0 +1,11 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ +let awaited = false; + +awaited = await new Promise((resolve) => setTimeout(() => resolve(true), 900)); + +export const handler = async () => { + if (!awaited) { + throw new Error('The async initialization of this module was not awaited!'); + } + return 'Hi'; +}; diff --git a/test/handlers/asyncInitRejection.mjs b/test/handlers/asyncInitRejection.mjs new file mode 100644 index 0000000..ebc6926 --- /dev/null +++ b/test/handlers/asyncInitRejection.mjs @@ -0,0 +1,26 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ +let awaited = false; + +class AsyncInitRejectionException extends Error { + constructor(msg) { + super(msg); + this.name = this.constructor.name; + } +} + +awaited = await new Promise((_, reject) => + setTimeout( + () => + reject( + new AsyncInitRejectionException('Oh noes! something bad happened'), + ), + 900, + ), +); + +export const handler = async () => { + if (!awaited) { + throw new Error('The async initialization of this module was not awaited!'); + } + return 'Hi'; +}; diff --git a/test/handlers/async_init_package/cjsModuleInEsmPackage.js b/test/handlers/async_init_package/cjsModuleInEsmPackage.js new file mode 100644 index 0000000..af1bbf6 --- /dev/null +++ b/test/handlers/async_init_package/cjsModuleInEsmPackage.js @@ -0,0 +1,7 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +'use strict'; + +exports.echo = async (event) => { + return event; +}; diff --git a/test/handlers/async_init_package/index.js b/test/handlers/async_init_package/index.js new file mode 100644 index 0000000..b8fb848 --- /dev/null +++ b/test/handlers/async_init_package/index.js @@ -0,0 +1,11 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ +let awaited = false; + +awaited = await new Promise((resolve) => setTimeout(() => resolve(true), 900)); + +export const handler = async () => { + if (!awaited) { + throw new Error('The async initialization of this module was not awaited!'); + } + return 'Hi'; +}; diff --git a/test/handlers/async_init_package/nested/even/more/index.js b/test/handlers/async_init_package/nested/even/more/index.js new file mode 100644 index 0000000..021c818 --- /dev/null +++ b/test/handlers/async_init_package/nested/even/more/index.js @@ -0,0 +1,5 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +exports.handler = () => { + return 42; +}; diff --git a/test/handlers/async_init_package/nested/even/package.json b/test/handlers/async_init_package/nested/even/package.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/test/handlers/async_init_package/nested/even/package.json @@ -0,0 +1 @@ +{} diff --git a/test/handlers/async_init_package/nested/even/readme.txt b/test/handlers/async_init_package/nested/even/readme.txt new file mode 100644 index 0000000..6b63f60 --- /dev/null +++ b/test/handlers/async_init_package/nested/even/readme.txt @@ -0,0 +1 @@ +package.json exists and does not contain `type: "module"`. \ No newline at end of file diff --git a/test/handlers/async_init_package/nested/index.js b/test/handlers/async_init_package/nested/index.js new file mode 100644 index 0000000..bce62df --- /dev/null +++ b/test/handlers/async_init_package/nested/index.js @@ -0,0 +1,7 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +await new Promise((r) => setTimeout(r, 100)); + +export const handler = async () => { + return 42; +}; diff --git a/test/handlers/async_init_package/package.json b/test/handlers/async_init_package/package.json new file mode 100644 index 0000000..3680116 --- /dev/null +++ b/test/handlers/async_init_package/package.json @@ -0,0 +1,12 @@ +{ + "name": "async-init-package-test", + "version": "1.0.0", + "description": "dummy package for the loading esm packages", + "main": "index.js", + "type": "module", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "AWS Lambda", + "license": "Apache-2.0" +} diff --git a/test/handlers/async_init_type_not_module/index.js b/test/handlers/async_init_type_not_module/index.js new file mode 100644 index 0000000..315d2f3 --- /dev/null +++ b/test/handlers/async_init_type_not_module/index.js @@ -0,0 +1,7 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +'use strict'; + +exports.ret42 = () => { + return 42; +}; diff --git a/test/handlers/async_init_type_not_module/package.json b/test/handlers/async_init_type_not_module/package.json new file mode 100644 index 0000000..f82e3d8 --- /dev/null +++ b/test/handlers/async_init_type_not_module/package.json @@ -0,0 +1,3 @@ +{ + "type": "Ceci n’est pas une module" +} diff --git a/test/handlers/async_init_with_node_modules/node_modules/index.js b/test/handlers/async_init_with_node_modules/node_modules/index.js new file mode 100644 index 0000000..53494e4 --- /dev/null +++ b/test/handlers/async_init_with_node_modules/node_modules/index.js @@ -0,0 +1,7 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +"use strict"; + +exports.ret42 = () => { + return 42; +}; diff --git a/test/handlers/async_init_with_node_modules/package.json b/test/handlers/async_init_with_node_modules/package.json new file mode 100644 index 0000000..3680116 --- /dev/null +++ b/test/handlers/async_init_with_node_modules/package.json @@ -0,0 +1,12 @@ +{ + "name": "async-init-package-test", + "version": "1.0.0", + "description": "dummy package for the loading esm packages", + "main": "index.js", + "type": "module", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "AWS Lambda", + "license": "Apache-2.0" +} diff --git a/test/handlers/beforeExitBehaviour.js b/test/handlers/beforeExitBehaviour.js new file mode 100644 index 0000000..df5c6aa --- /dev/null +++ b/test/handlers/beforeExitBehaviour.js @@ -0,0 +1,24 @@ +/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +'use strict'; + +process.on('beforeExit', () => { + setImmediate(() => console.log('from setImmediate')); +}); + +process.on('beforeExit', () => { + process.nextTick(() => console.log('from process.nextTick')); +}); + +exports.callbackWithTrueFlag = (_event, _cxt, callback) => { + callback(null, 'hello'); +}; + +exports.callbackWithFalseFlag = (_event, cxt, callback) => { + cxt.callbackWaitsForEmptyEventLoop = false; + callback(null, 'hello'); +}; + +exports.asyncFunction = async (_event) => { + return 'hello'; +}; diff --git a/test/handlers/cjsModule.cjs b/test/handlers/cjsModule.cjs new file mode 100644 index 0000000..f43705d --- /dev/null +++ b/test/handlers/cjsModule.cjs @@ -0,0 +1,5 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +exports.echo = async (event) => { + return event; +}; diff --git a/test/handlers/core.js b/test/handlers/core.js new file mode 100644 index 0000000..962252c --- /dev/null +++ b/test/handlers/core.js @@ -0,0 +1,39 @@ +/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +'use strict'; + +exports.workingDirectory = async () => process.cwd(); + +exports.echo = async (event) => { + return event; +}; + +exports.ping = async (event) => { + return { + msg: `pong[${event['msg']}]`, + }; +}; + +exports.env = async () => { + return process.env; +}; + +exports.clientContext = async (_, ctx) => { + return ctx.clientContext; +}; + +exports.cognitoIdentity = async (_, _ctx) => { + return context.identity; +}; + +exports.nodePathContainsMajorVersion = async () => { + let majorVersion = process.version.match(/(\d+)/g)[0]; + let expectedNodeString = `node${majorVersion}`; + let nodePath = process.env['NODE_PATH']; + + console.log(nodePath, 'should include', expectedNodeString); + + return { + nodePathIncludesMajorVersion: nodePath.includes(expectedNodeString), + }; +}; diff --git a/test/handlers/defaultHandler.js b/test/handlers/defaultHandler.js new file mode 100644 index 0000000..9f26024 --- /dev/null +++ b/test/handlers/defaultHandler.js @@ -0,0 +1,7 @@ +/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +'use strict'; + +module.exports = { + default: () => 42, +}; diff --git a/test/handlers/defaultHandlerESM.mjs b/test/handlers/defaultHandlerESM.mjs new file mode 100644 index 0000000..bb46151 --- /dev/null +++ b/test/handlers/defaultHandlerESM.mjs @@ -0,0 +1,3 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +export default () => 42; diff --git a/test/handlers/esModule.mjs b/test/handlers/esModule.mjs new file mode 100644 index 0000000..e44d0ea --- /dev/null +++ b/test/handlers/esModule.mjs @@ -0,0 +1,5 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +export const echo = async (event) => { + return event; +}; diff --git a/test/handlers/esModuleImports.mjs b/test/handlers/esModuleImports.mjs new file mode 100644 index 0000000..c9179e9 --- /dev/null +++ b/test/handlers/esModuleImports.mjs @@ -0,0 +1,19 @@ +/** Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +import { echo as esModuleEcho } from './esModule.mjs'; +import * as util from 'util'; +import { Buffer } from 'buffer'; +import defaultExport from './defaultHandlerESM.mjs'; + +export const echo = async (event) => { + // Use an arbitrary internal node module, with import star. + console.log(util.format('can import node module: %s+%s', 'yes', 'yes')); + + // Use an arbitrary internal node module. + console.log(Buffer.from('yes')); + + // Use an arbitrary default export. + console.log(defaultExport()); + + return esModuleEcho(event); +}; diff --git a/test/handlers/nestedHandler.js b/test/handlers/nestedHandler.js new file mode 100644 index 0000000..115feef --- /dev/null +++ b/test/handlers/nestedHandler.js @@ -0,0 +1,11 @@ +/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +'use strict'; + +module.exports = { + nested: { + somethingComplex: { + handler: async () => 'something interesting', + }, + }, +}; diff --git a/test/handlers/package-lock.json b/test/handlers/package-lock.json new file mode 100644 index 0000000..dce2fd4 --- /dev/null +++ b/test/handlers/package-lock.json @@ -0,0 +1,713 @@ +{ + "name": "handlers", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "handlers", + "version": "1.0.0", + "license": "Apache-2.0", + "dependencies": { + "aws-serverless-express": "^3.3.6", + "body-parser": "^1.18.3", + "cors": "^2.8.5", + "express": "^4.16.4", + "function-bluebird": "file:./fake_node_modules/function-bluebird", + "not-shadowed": "file:./fake_node_modules/not-shadowed", + "precedence": "file:./fake_node_modules/precedence" + }, + "devDependencies": {} + }, + "fake_node_modules/function-bluebird": {}, + "fake_node_modules/not-shadowed": {}, + "fake_node_modules/precedence": {}, + "node_modules/@vendia/serverless-express": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@vendia/serverless-express/-/serverless-express-3.4.0.tgz", + "integrity": "sha512-/UAAbi9qRjUtjRISt5MJ1sfhtrHb26hqQ0nvE5qhMLsAdR5H7ErBwPD8Q/v2OENKm0iWsGwErIZEg7ebUeFDjQ==", + "dependencies": { + "binary-case": "^1.0.0", + "type-is": "^1.6.16" + }, + "engines": { + "node": ">=6" + } + }, + "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==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/aws-serverless-express": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/aws-serverless-express/-/aws-serverless-express-3.4.0.tgz", + "integrity": "sha512-YG9ZjAOI9OpwqDDWzkRc3kKJYJuR7gTMjLa3kAWopO17myoprxskCUyCEee+RKe34tcR4UNrVtgAwW5yDe74bw==", + "dependencies": { + "@vendia/serverless-express": "^3.4.0", + "binary-case": "^1.0.0", + "type-is": "^1.6.16" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/binary-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/binary-case/-/binary-case-1.1.4.tgz", + "integrity": "sha512-9Kq8m6NZTAgy05Ryuh7U3Qc4/ujLQU1AZ5vMw4cr3igTdi5itZC6kCNrRr2X8NzPiDn2oUIFTfa71DKMnue/Zg==" + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "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.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "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==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "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==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "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==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "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==" + }, + "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==", + "engines": { + "node": ">= 0.8" + } + }, + "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==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "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.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/express/node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "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/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/function-bluebird": { + "resolved": "fake_node_modules/function-bluebird", + "link": true + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.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==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "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==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/not-shadowed": { + "resolved": "fake_node_modules/not-shadowed", + "link": true + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "funding": { + "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==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/precedence": { + "resolved": "fake_node_modules/precedence", + "link": true + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "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==", + "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/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==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/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==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "engines": { + "node": ">=0.6" + } + }, + "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==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "engines": { + "node": ">= 0.4.0" + } + }, + "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==", + "engines": { + "node": ">= 0.8" + } + } + } +} diff --git a/test/handlers/package.json b/test/handlers/package.json new file mode 100644 index 0000000..d03a227 --- /dev/null +++ b/test/handlers/package.json @@ -0,0 +1,63 @@ +{ + "name": "handlers", + "version": "1.0.0", + "description": "test handlers for nodes runtime project", + "main": "index.js", + "dependencies": { + "aws-serverless-express": "^3.3.6", + "body-parser": "^1.18.3", + "cors": "^2.8.5", + "express": "^4.16.4", + "function-bluebird": "file:./fake_node_modules/function-bluebird", + "not-shadowed": "file:./fake_node_modules/not-shadowed", + "precedence": "file:./fake_node_modules/precedence" + }, + "devDependencies": {}, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "AWS Lambda", + "license": "Apache-2.0", + "eslintConfig": { + "extends": [ + "plugin:prettier/recommended" + ], + "env": { + "node": true, + "mocha": true, + "es6": true + }, + "parserOptions": { + "ecmaVersion": 2020 + }, + "rules": { + "strict": [ + "error", + "global" + ], + "indent": [ + "error", + 2 + ], + "camelcase": "error", + "no-console": "off", + "no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_" + } + ] + } + }, + "eslintIgnore": [ + "syntax_error.js", + "node_modules", + "async_init_package" + ], + "prettier": { + "trailingComma": "all", + "tabWidth": 2, + "semi": true, + "singleQuote": true + } +} diff --git a/test/handlers/precedence b/test/handlers/precedence new file mode 100644 index 0000000..eb8b4de --- /dev/null +++ b/test/handlers/precedence @@ -0,0 +1,6 @@ +/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.*/ + +'use strict'; + +module.exports.handler = async () => "I don't have a .js file suffix"; + diff --git a/test/handlers/precedence.js b/test/handlers/precedence.js new file mode 100644 index 0000000..c150e3a --- /dev/null +++ b/test/handlers/precedence.js @@ -0,0 +1,5 @@ +/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +'use strict'; + +module.exports.handler = async () => 'I do have a .js file suffix'; diff --git a/test/handlers/precedence.json b/test/handlers/precedence.json new file mode 100644 index 0000000..9f7ede5 --- /dev/null +++ b/test/handlers/precedence.json @@ -0,0 +1,3 @@ +{ + "handler": "this should never be used" +} diff --git a/test/handlers/precedence.mjs b/test/handlers/precedence.mjs new file mode 100644 index 0000000..4f79637 --- /dev/null +++ b/test/handlers/precedence.mjs @@ -0,0 +1,5 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +'use strict'; + +module.exports.handler = async () => 'I do have a .mjs file suffix'; diff --git a/test/handlers/precedence.node b/test/handlers/precedence.node new file mode 100644 index 0000000..a88a4c5 --- /dev/null +++ b/test/handlers/precedence.node @@ -0,0 +1 @@ +this isn't actually a node extension diff --git a/test/handlers/precedenceJsVsMjs.js b/test/handlers/precedenceJsVsMjs.js new file mode 100644 index 0000000..3e7ea8e --- /dev/null +++ b/test/handlers/precedenceJsVsMjs.js @@ -0,0 +1,5 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +'use strict'; + +module.exports.handler = async () => 'I do have a .js file suffix'; diff --git a/test/handlers/precedenceJsVsMjs.mjs b/test/handlers/precedenceJsVsMjs.mjs new file mode 100644 index 0000000..5278ce0 --- /dev/null +++ b/test/handlers/precedenceJsVsMjs.mjs @@ -0,0 +1,5 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +'use strict'; + +export const handler = async () => 'I do have a .mjs file suffix'; diff --git a/test/handlers/precedenceMjsVsCjs.cjs b/test/handlers/precedenceMjsVsCjs.cjs new file mode 100644 index 0000000..42f425b --- /dev/null +++ b/test/handlers/precedenceMjsVsCjs.cjs @@ -0,0 +1,5 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +'use strict'; + +module.exports.handler = async () => 'I do have a .cjs file suffix'; diff --git a/test/handlers/precedenceMjsVsCjs.mjs b/test/handlers/precedenceMjsVsCjs.mjs new file mode 100644 index 0000000..5278ce0 --- /dev/null +++ b/test/handlers/precedenceMjsVsCjs.mjs @@ -0,0 +1,5 @@ +/** Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +'use strict'; + +export const handler = async () => 'I do have a .mjs file suffix'; diff --git a/test/integration/codebuild/buildspec.os.alpine.2.yml b/test/integration/codebuild/buildspec.os.alpine.2.yml index b4a0adc..85a04c4 100644 --- a/test/integration/codebuild/buildspec.os.alpine.2.yml +++ b/test/integration/codebuild/buildspec.os.alpine.2.yml @@ -68,7 +68,7 @@ phases: --network "${OS_DISTRIBUTION}-network" \ --entrypoint="" \ "${IMAGE_TAG}" \ - sh -c '/usr/bin/aws-lambda-rie ${NODE_BINARY_LOCATION} index.js' + sh -c '/usr/bin/aws-lambda-rie ${NODE_BINARY_LOCATION} index.mjs' - sleep 2 - > docker run \ diff --git a/test/integration/codebuild/buildspec.os.amazonlinux.1.yml b/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml similarity index 98% rename from test/integration/codebuild/buildspec.os.amazonlinux.1.yml rename to test/integration/codebuild/buildspec.os.amazonlinux.2023.yml index a102160..9083fbb 100644 --- a/test/integration/codebuild/buildspec.os.amazonlinux.1.yml +++ b/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml @@ -14,9 +14,9 @@ batch: env: variables: DISTRO_VERSION: - - "1" + - "2023" RUNTIME_VERSION: - - "14" + - "18" phases: pre_build: commands: diff --git a/test/integration/codebuild/buildspec.os.centos.1.yml b/test/integration/codebuild/buildspec.os.centos.1.yml deleted file mode 100644 index 1f40912..0000000 --- a/test/integration/codebuild/buildspec.os.centos.1.yml +++ /dev/null @@ -1,107 +0,0 @@ -version: 0.2 - -env: - variables: - OS_DISTRIBUTION: centos - NPX_BINARY_LOCATION: "/usr/bin/npx" -batch: - build-matrix: - static: - ignore-failure: false - env: - privileged-mode: true - dynamic: - env: - variables: - DISTRO_VERSION: - - "centos7" - RUNTIME_VERSION: - - "14" -phases: - pre_build: - commands: - - export IMAGE_TAG="nodejs-${OS_DISTRIBUTION}-${DISTRO_VERSION}:${RUNTIME_VERSION}" - - echo "Extracting and including the Runtime Interface Emulator" - - SCRATCH_DIR=".scratch" - - mkdir "${SCRATCH_DIR}" - - ARCHITECTURE=$(arch) - - > - if [[ "$ARCHITECTURE" == "x86_64" ]]; then - RIE="aws-lambda-rie" - elif [[ "$ARCHITECTURE" == "aarch64" ]]; then - RIE="aws-lambda-rie-arm64" - else - echo "Architecture $ARCHITECTURE is not currently supported." - exit 1 - fi - - tar -xvf test/integration/resources/${RIE}.tar.gz --directory "${SCRATCH_DIR}" - - > - cp "test/integration/docker/Dockerfile.echo.${OS_DISTRIBUTION}" \ - "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" - - > - echo "COPY ${SCRATCH_DIR}/${RIE} /usr/bin/${RIE}" >> \ - "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" - - > - if [[ -z "${DOCKERHUB_USERNAME}" && -z "${DOCKERHUB_PASSWORD}" ]]; - then - echo "DockerHub credentials not set as CodeBuild environment variables. Continuing without docker login." - else - echo "Performing DockerHub login . . ." - docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD - fi - - echo "Building image ${IMAGE_TAG}" - - > - docker build . \ - -f "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" \ - -t "${IMAGE_TAG}" \ - --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ - --build-arg DISTRO_VERSION="${DISTRO_VERSION}" \ - --build-arg ARCHITECTURE="${ARCHITECTURE}" - build: - commands: - - set -x - - echo "Running Image ${IMAGE_TAG}" - - docker network create "${OS_DISTRIBUTION}-network" - - > - docker run \ - --detach \ - --name "${OS_DISTRIBUTION}-app" \ - --network "${OS_DISTRIBUTION}-network" \ - --entrypoint="" \ - "${IMAGE_TAG}" \ - sh -c "/usr/bin/${RIE} ${NPX_BINARY_LOCATION} aws-lambda-ric index.handler" - - sleep 2 - - > - docker run \ - --name "${OS_DISTRIBUTION}-tester" \ - --env "TARGET=${OS_DISTRIBUTION}-app" \ - --network "${OS_DISTRIBUTION}-network" \ - --entrypoint="" \ - "${IMAGE_TAG}" \ - sh -c 'curl -X POST "http://${TARGET}:8080/2015-03-31/functions/function/invocations" -d "{}" --max-time 10' - - actual="$(docker logs --tail 1 "${OS_DISTRIBUTION}-tester" | xargs)" - - expected='success' - - | - echo "Response: ${actual}" - if [[ "$actual" != "$expected" ]]; then - echo "fail! runtime: $RUNTIME - expected output $expected - got $actual" - exit -1 - fi - finally: - - | - echo "---------Container Logs: ${OS_DISTRIBUTION}-app----------" - echo - docker logs "${OS_DISTRIBUTION}-app" || true - echo - echo "---------------------------------------------------" - echo "--------Container Logs: ${OS_DISTRIBUTION}-tester--------" - echo - docker logs "${OS_DISTRIBUTION}-tester" || true - echo - echo "---------------------------------------------------" - - echo "Cleaning up..." - - docker stop "${OS_DISTRIBUTION}-app" || true - - docker rm --force "${OS_DISTRIBUTION}-app" || true - - docker stop "${OS_DISTRIBUTION}-tester" || true - - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file diff --git a/test/integration/codebuild/buildspec.os.centos.2.yml b/test/integration/codebuild/buildspec.os.centos.yml similarity index 100% rename from test/integration/codebuild/buildspec.os.centos.2.yml rename to test/integration/codebuild/buildspec.os.centos.yml diff --git a/test/integration/docker/Dockerfile.echo.alpine b/test/integration/docker/Dockerfile.echo.alpine index 4715176..b2eea22 100644 --- a/test/integration/docker/Dockerfile.echo.alpine +++ b/test/integration/docker/Dockerfile.echo.alpine @@ -28,6 +28,12 @@ RUN mkdir -p ${FUNCTION_DIR} # Copy & build Runtime Interface Client package (as we're installing it from a local filesystem source) WORKDIR ${FUNCTION_DIR}/deps/aws-lambda-ric COPY . . + +# Node14 uses npm@6.14.18 by default which will downgrade permissions, if it's root, +# before running any build scripts: https://github.com/npm/npm/issues/3497 +# Starting from npm@7.0.0, when npm is run as root, +# scripts are always run with the effective uid and gid of the working directory owner. +RUN if [[ $(node -v | cut -c 1-3) == "v14" ]] ; then npm install -g npm@7 ; fi RUN make build && \ npm run test:unit diff --git a/test/integration/docker/Dockerfile.echo.amazonlinux b/test/integration/docker/Dockerfile.echo.amazonlinux index 3a5b94d..28a77e4 100644 --- a/test/integration/docker/Dockerfile.echo.amazonlinux +++ b/test/integration/docker/Dockerfile.echo.amazonlinux @@ -42,6 +42,12 @@ RUN mkdir -p ${FUNCTION_DIR} # Copy & build Runtime Interface Client package (as we're installing it from a local filesystem source) WORKDIR ${FUNCTION_DIR}/deps/aws-lambda-ric COPY . . + +# Node14 uses npm@6.14.18 by default which will downgrade permissions, if it's root, +# before running any build scripts: https://github.com/npm/npm/issues/3497 +# Starting from npm@7.0.0, when npm is run as root, +# scripts are always run with the effective uid and gid of the working directory owner. +RUN if [[ $(node -v | cut -c 1-3) == "v14" ]] ; then npm install -g npm@7 ; fi RUN make build && \ npm run test:unit diff --git a/test/integration/docker/Dockerfile.echo.centos b/test/integration/docker/Dockerfile.echo.centos index e735e92..df40318 100644 --- a/test/integration/docker/Dockerfile.echo.centos +++ b/test/integration/docker/Dockerfile.echo.centos @@ -39,6 +39,12 @@ RUN mkdir -p ${FUNCTION_DIR} # Copy & build Runtime Interface Client package (as we're installing it from a local filesystem source) WORKDIR ${FUNCTION_DIR}/deps/aws-lambda-ric COPY . . + +# Node14 uses npm@6.14.18 by default which will downgrade permissions, if it's root, +# before running any build scripts: https://github.com/npm/npm/issues/3497 +# Starting from npm@7.0.0, when npm is run as root, +# scripts are always run with the effective uid and gid of the working directory owner. +RUN if [[ $(node -v | cut -c 1-3) == "v14" ]] ; then npm install -g npm@7 ; fi RUN make build && \ npm run test:unit diff --git a/test/integration/docker/Dockerfile.echo.debian b/test/integration/docker/Dockerfile.echo.debian index 341240f..4581ad5 100644 --- a/test/integration/docker/Dockerfile.echo.debian +++ b/test/integration/docker/Dockerfile.echo.debian @@ -1,5 +1,5 @@ # Define global args -ARG FUNCTION_DIR="/function/" +ARG FUNCTION_DIR="/home/app/" ARG RUNTIME_VERSION ARG DISTRO_VERSION @@ -21,6 +21,12 @@ RUN mkdir -p ${FUNCTION_DIR} # Copy & build Runtime Interface Client package (as we're installing it from a local filesystem source) WORKDIR ${FUNCTION_DIR}/deps/aws-lambda-ric COPY . . + +# Node14 uses npm@6.14.18 by default which will downgrade permissions, if it's root, +# before running any build scripts: https://github.com/npm/npm/issues/3497 +# Starting from npm@7.0.0, when npm is run as root, +# scripts are always run with the effective uid and gid of the working directory owner. +RUN if [ $(node -v | cut -c 1-3) = "v14" ] ; then npm install -g npm@7 ; fi RUN make build && \ npm run test:unit diff --git a/test/integration/docker/Dockerfile.echo.ubuntu b/test/integration/docker/Dockerfile.echo.ubuntu index 9bd54b7..bbabd50 100644 --- a/test/integration/docker/Dockerfile.echo.ubuntu +++ b/test/integration/docker/Dockerfile.echo.ubuntu @@ -47,6 +47,12 @@ RUN mkdir -p ${FUNCTION_DIR} # Copy & build Runtime Interface Client package (as we're installing it from a local filesystem source) WORKDIR ${FUNCTION_DIR}/deps/aws-lambda-ric COPY . . + +# Node14 uses npm@6.14.18 by default which will downgrade permissions, if it's root, +# before running any build scripts: https://github.com/npm/npm/issues/3497 +# Starting from npm@7.0.0, when npm is run as root, +# scripts are always run with the effective uid and gid of the working directory owner. +RUN if [ $(node -v | cut -c 1-3) = "v14" ] ; then npm install -g npm@7 ; fi RUN make build && \ npm run test:unit diff --git a/test/integration/docker/Dockerfile.programmatic.alpine b/test/integration/docker/Dockerfile.programmatic.alpine index 2a7b1e2..9727fd3 100644 --- a/test/integration/docker/Dockerfile.programmatic.alpine +++ b/test/integration/docker/Dockerfile.programmatic.alpine @@ -28,6 +28,12 @@ RUN mkdir -p ${FUNCTION_DIR} # Copy & build Runtime Interface Client package (as we're installing it from a local filesystem source) WORKDIR ${FUNCTION_DIR}/deps/aws-lambda-ric COPY . . + +# Node14 uses npm@6.14.18 by default which will downgrade permissions, if it's root, +# before running any build scripts: https://github.com/npm/npm/issues/3497 +# Starting from npm@7.0.0, when npm is run as root, +# scripts are always run with the effective uid and gid of the working directory owner. +RUN if [[ $(node -v | cut -c 1-3) == "v14" ]] ; then npm install -g npm@7 ; fi RUN make build && \ npm run test:unit @@ -52,4 +58,4 @@ WORKDIR ${FUNCTION_DIR} # Copy in the built dependencies COPY --from=build-image ${FUNCTION_DIR} ${FUNCTION_DIR} -CMD [ "/usr/local/bin/node", "index.js" ] +CMD [ "/usr/local/bin/node", "index.mjs" ] diff --git a/test/integration/resources/aws-lambda-rie-arm64.tar.gz b/test/integration/resources/aws-lambda-rie-arm64.tar.gz index f62577f..57878e2 100644 Binary files a/test/integration/resources/aws-lambda-rie-arm64.tar.gz and b/test/integration/resources/aws-lambda-rie-arm64.tar.gz differ diff --git a/test/integration/resources/aws-lambda-rie.tar.gz b/test/integration/resources/aws-lambda-rie.tar.gz index feda16d..2553eaa 100644 Binary files a/test/integration/resources/aws-lambda-rie.tar.gz and b/test/integration/resources/aws-lambda-rie.tar.gz differ diff --git a/test/integration/test-handlers/echo/index.js b/test/integration/test-handlers/echo/index.js index d7ce65a..ff988d3 100644 --- a/test/integration/test-handlers/echo/index.js +++ b/test/integration/test-handlers/echo/index.js @@ -1,4 +1,6 @@ +'use strict'; + exports.handler = async (event, context) => { - console.log('hello world'); - return 'success' + console.log('hello world'); + return 'success'; }; diff --git a/test/integration/test-handlers/echo/package.json b/test/integration/test-handlers/echo/package.json index b60909d..7d32021 100644 --- a/test/integration/test-handlers/echo/package.json +++ b/test/integration/test-handlers/echo/package.json @@ -2,7 +2,6 @@ "name": "echo-hanlder", "version": "1.0.0", "description": "Sample Lambda echo handler for NodeJS", - "main": "app.js", "author": "AWS Lambda", "license": "Apache-2.0", "dependencies": { diff --git a/test/integration/test-handlers/programmatic/index.js b/test/integration/test-handlers/programmatic/index.mjs similarity index 57% rename from test/integration/test-handlers/programmatic/index.js rename to test/integration/test-handlers/programmatic/index.mjs index 7f23f49..8d3d85a 100644 --- a/test/integration/test-handlers/programmatic/index.js +++ b/test/integration/test-handlers/programmatic/index.mjs @@ -1,8 +1,10 @@ -const ric = require('aws-lambda-ric'); +'use strict'; + +import { run } from 'aws-lambda-ric'; const echo = async (event, context) => { console.log('hello world'); return 'success'; }; -ric.run(echo); +await run(echo); diff --git a/test/integration/test-handlers/programmatic/package.json b/test/integration/test-handlers/programmatic/package.json index c15911e..95b0c3f 100644 --- a/test/integration/test-handlers/programmatic/package.json +++ b/test/integration/test-handlers/programmatic/package.json @@ -2,7 +2,6 @@ "name": "programmatic-hanlder", "version": "1.0.0", "description": "Sample Lambda echo handler for NodeJS", - "main": "app.js", "author": "AWS Lambda", "license": "Apache-2.0", "dependencies": { diff --git a/test/unit/Common/Common.test.ts b/test/unit/Common/Common.test.ts deleted file mode 100644 index eeeae21..0000000 --- a/test/unit/Common/Common.test.ts +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -require("should"); -import * as Common from "../../../src/Common"; - -describe("type guards HandlerFunction", () => { - it("should compile the code", () => { - const func = () => {}; - if (Common.isHandlerFunction(func)) { - func(); - } - }); - - it("should return true if function", () => { - Common.isHandlerFunction(() => {}).should.be.true(); - }); - - it("should return false if not function", () => { - Common.isHandlerFunction("MyHandler").should.be.false(); - }); -}); diff --git a/test/unit/Errors/Errors.test.ts b/test/unit/Errors/Errors.test.ts deleted file mode 100644 index e2841ef..0000000 --- a/test/unit/Errors/Errors.test.ts +++ /dev/null @@ -1,125 +0,0 @@ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; - -require("should"); -import * as Errors from "../../../src/Errors"; - -class CircularError extends Error { - backlink: Error; - - constructor(message?: string) { - super(message); - - this.backlink = this; - this.name = "CircularError"; - } -} - -class ExtendedError extends Error { - code?: number; - customProperty?: string; - - constructor(message?: string) { - super(message); - - this.name = "ExtendedError"; - this.stack = "ExtendedErrorStack"; - this.code = 100; - this.customProperty = "ExtendedErrorCustomProperty"; - } -} - -describe("Formatting CircularError Logging", () => { - it("should fall back to a minimal error format when an exception occurs", () => { - const error = new CircularError("custom message"); - error.backlink = error; - - const loggedError = JSON.parse(Errors.toFormatted(error).trim()); - loggedError.should.have.property("errorType", "CircularError"); - loggedError.should.have.property("errorMessage", "custom message"); - loggedError.should.have.property("trace"); - loggedError.trace.length.should.be.aboveOrEqual(1); - }); -}); - -describe("Formatting Error Logging", () => { - it("should fall back to an extended error format when an exception occurs", () => { - const error = new ExtendedError("custom message"); - - const loggedError = JSON.parse(Errors.toFormatted(error).trim()); - loggedError.should.have.property("errorType", "ExtendedError"); - loggedError.should.have.property("errorMessage", "custom message"); - loggedError.should.have.property("stack", ["ExtendedErrorStack"]); - loggedError.should.have.property("code", 100); - loggedError.should.have.property( - "customProperty", - "ExtendedErrorCustomProperty" - ); - }); -}); - -describe("Converting an Error to a Runtime response", () => { - it("should create a RuntimeErrorResponse object when an Error object is given", () => { - const error = new Error("custom message"); - error.name = "Runtime.TestError"; - - const errorResponse = Errors.toRuntimeResponse(error); - - errorResponse.should.have.property("errorType", "Runtime.TestError"); - errorResponse.should.have.property("errorMessage", "custom message"); - errorResponse.should.have.property("trace"); - errorResponse.trace.length.should.be.aboveOrEqual(1); - }); - - it("should return a handled error response when the trace is missing", () => { - const error = new Error("custom message"); - error.name = "Runtime.TestError"; - error.stack = undefined; - - const errorResponse = Errors.toRuntimeResponse(error); - - errorResponse.should.have.property("errorType", "handled"); - errorResponse.should.have - .property("errorMessage") - .with.match(/message, name, and stack/); - errorResponse.should.have.property("trace"); - errorResponse.trace.length.should.be.equal(0); - }); - - it("should handle strings by setting them as the message and assigning error type to string", () => { - const error = "custom message"; - const errorResponse = Errors.toRuntimeResponse(error); - - errorResponse.should.have.property("errorType", "string"); - errorResponse.should.have.property("errorMessage", "custom message"); - errorResponse.should.have.property("trace"); - errorResponse.trace.length.should.be.equal(0); - }); - - it("should handle arbitrary objects by converting them to string", () => { - const error = { - text: "custom message", - }; - - const errorResponse = Errors.toRuntimeResponse(error); - - errorResponse.should.have.property("errorType", "object"); - errorResponse.should.have.property("errorMessage", "[object Object]"); - errorResponse.should.have.property("trace"); - errorResponse.trace.length.should.be.equal(0); - }); - - it("should handle arbitrary objects by converting them to string by calling the toString method", () => { - const error = { - text: "custom message", - }; - error.toString = () => error.text; - const errorResponse = Errors.toRuntimeResponse(error); - - errorResponse.should.have.property("errorType", "object"); - errorResponse.should.have.property("errorMessage", "custom message"); - errorResponse.should.have.property("trace"); - errorResponse.trace.length.should.be.equal(0); - }); -}); diff --git a/test/unit/Errors/XRayError.test.ts b/test/unit/Errors/XRayError.test.ts deleted file mode 100644 index 5fd1035..0000000 --- a/test/unit/Errors/XRayError.test.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; - -require("should"); -import * as XRayError from "../../../src/Errors/XRayError"; - -describe("Formatted Error Logging", () => { - it("should fall back to a minimal error format when an exception occurs", () => { - const error = new Error("custom message"); - error.name = "CircularError"; - error.stack = `CircularError: custom message - at exports.handler (/var/function/node_modules/event_invoke.js:3:502) - at exports.handler (/var/function/node_modules/event_invoke.js:5:242) - at (/var/function/test_exec.js:4:123)`; - - const loggedXRayError = JSON.parse(XRayError.toFormatted(error).trim()); - loggedXRayError.should.have.property("working_directory"); - loggedXRayError.should.have.property("exceptions"); - loggedXRayError.should.have - .property("paths") - .with.containDeep([ - "/var/function/node_modules/event_invoke.js", - "/var/function/test_exec.js", - ]); - - const exceptions = loggedXRayError.exceptions; - - exceptions.should.have.length(1); - - const loggedError = exceptions[0]; - - loggedError.should.have.property("type", "CircularError"); - loggedError.should.have.property("message", "custom message"); - loggedError.should.have.property("stack").containDeep([ - { - path: "/var/function/node_modules/event_invoke.js", - line: 3, - label: "exports.handler", - }, - { - path: "/var/function/node_modules/event_invoke.js", - line: 5, - label: "exports.handler", - }, - { - path: "/var/function/test_exec.js", - line: 4, - label: "anonymous", - }, - ]); - }); -}); diff --git a/test/unit/ErrorsTest.js b/test/unit/ErrorsTest.js new file mode 100644 index 0000000..f72b73b --- /dev/null +++ b/test/unit/ErrorsTest.js @@ -0,0 +1,21 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +require('should'); +let Errors = require('../../src/Errors'); + +describe('Formatted Error Logging', () => { + it('should fall back to a minimal error format when an exception occurs', () => { + let error = new Error('custom message'); + error.name = 'CircularError'; + error.backlink = error; + + let loggedError = JSON.parse(Errors.toFormatted(error).trim()); + loggedError.should.have.property('errorType', 'CircularError'); + loggedError.should.have.property('errorMessage', 'custom message'); + loggedError.should.have.property('trace').with.length(11); + }); +}); diff --git a/test/unit/FakeTelemetryTarget.js b/test/unit/FakeTelemetryTarget.js new file mode 100644 index 0000000..db9b28d --- /dev/null +++ b/test/unit/FakeTelemetryTarget.js @@ -0,0 +1,100 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +const os = require('os'); +const fs = require('fs'); +const path = require('path'); +const assert = require('assert'); + +const _LOG_IDENTIFIER = Buffer.from('a55a0003', 'hex'); + +/** + * A fake implementation of the multilne logging protocol. + * Read and write log frames to a temp file and provide an asserting helper for + * reading individual log statements from the file. + */ +module.exports = class FakeTelemetryTarget { + constructor() { + this.readTarget = 0; + this.writeTarget = 0; + } + + openFile() { + let tempTelemetryDir = fs.mkdtempSync( + path.join(os.tmpdir(), 'AWSLambdaNodeJsTelemetry-'), + ); + this.writeTarget = fs.openSync(path.join(tempTelemetryDir, 'log'), 'as+'); + this.readTarget = fs.openSync(path.join(tempTelemetryDir, 'log'), 'rs+'); + console.log( + 'Generate new telemetry file', + tempTelemetryDir, + 'with file descriptor', + this.readTarget, + ); + } + + closeFile() { + console.log(`Close telemetry filedescriptor ${this.readTarget}`); + fs.closeSync(this.readTarget); + fs.closeSync(this.writeTarget); + this.readTarget = 0; + this.writeTarget = 0; + } + + updateEnv() { + process.env['_LAMBDA_TELEMETRY_LOG_FD'] = this.writeTarget; + } + + /** + * Read a single line from the telemetry file. + * Explodes when: + * - no line is present + * - the prefix is malformed + * - there aren't enough bytes + */ + readLine() { + let readLength = () => { + let logPrefix = Buffer.alloc(16); + let actualReadBytes = fs.readSync( + this.readTarget, + logPrefix, + 0, + logPrefix.length, + ); + assert.strictEqual( + actualReadBytes, + logPrefix.length, + `Expected actualReadBytes[${actualReadBytes}] = ${logPrefix.length}`, + ); + assert.strictEqual( + logPrefix.lastIndexOf(_LOG_IDENTIFIER), + 0, + `log prefix ${logPrefix.toString( + 'hex', + )} should start with ${_LOG_IDENTIFIER.toString('hex')}`, + ); + let len = logPrefix.readUInt32BE(4); + // discard the timestamp + logPrefix.readBigUInt64BE(8); + return len; + }; + + let lineLength = readLength(); + let lineBytes = Buffer.alloc(lineLength); + let actualLineSize = fs.readSync( + this.readTarget, + lineBytes, + 0, + lineBytes.length, + ); + assert.strictEqual( + actualLineSize, + lineBytes.length, + 'The log line must match the length specified in the frame header', + ); + return lineBytes.toString('utf8'); + } +}; diff --git a/test/unit/InvokeContextTest.js b/test/unit/InvokeContextTest.js new file mode 100644 index 0000000..58b35a2 --- /dev/null +++ b/test/unit/InvokeContextTest.js @@ -0,0 +1,37 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +require('should'); +const sleep = require('util').promisify(setTimeout); + +let InvokeContext = require('../../src/InvokeContext'); + +describe('Getting remaining invoke time', () => { + it('should reduce by at least elapsed time', async () => { + let ctx = new InvokeContext({ + 'lambda-runtime-deadline-ms': Date.now() + 1000, + }); + + const timeout = 100; + let before = ctx._headerData().getRemainingTimeInMillis(); + await sleep(timeout + 10); + let after = ctx._headerData().getRemainingTimeInMillis(); + (before - after).should.greaterThanOrEqual( + timeout - 1 /* Timers are not precise, allow 1 ms drift */, + ); + }); + + it('should be within range', () => { + let ctx = new InvokeContext({ + 'lambda-runtime-deadline-ms': Date.now() + 1000, + }); + + let remainingTime = ctx._headerData().getRemainingTimeInMillis(); + + remainingTime.should.greaterThan(0); + remainingTime.should.lessThanOrEqual(1000); + }); +}); diff --git a/test/unit/LogPatchTest.js b/test/unit/LogPatchTest.js new file mode 100644 index 0000000..117f249 --- /dev/null +++ b/test/unit/LogPatchTest.js @@ -0,0 +1,231 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +let should = require('should'); +let LogPatch = require('../../src/LogPatch'); +let Errors = require('../../src/Errors'); + +let { captureStream, consoleSnapshot } = require('./LoggingGlobals'); +let FakeTelemetryTarget = require('./FakeTelemetryTarget'); + +describe('Apply the default console log patch', () => { + let restoreConsole = consoleSnapshot(); + let capturedStdout = captureStream(process.stdout); + + beforeEach('capture stdout', () => capturedStdout.hook()); + beforeEach('apply console patch', () => LogPatch.patchConsole()); + afterEach('remove console patch', () => restoreConsole()); + afterEach('unhook stdout', () => capturedStdout.unhook()); + + it('should have four tab-separated fields on a normal line', () => { + console.log('anything'); + capturedStdout.captured().should.match(/.*\t.*\t.*\t.*\n/); + }); + + it('should have five tab-separated fields when logging an error', () => { + console.error('message', Errors.toFormatted(new Error('garbage'))); + capturedStdout.captured().should.match(/.*\t.*\t.*\t.*\t.*\n/); + }); + + describe('When the global requestId is set', () => { + const EXPECTED_ID = 'some fake request id'; + + beforeEach('set the request id', () => { + LogPatch.setCurrentRequestId(EXPECTED_ID); + }); + afterEach('unset the request id', () => { + LogPatch.setCurrentRequestId(EXPECTED_ID); + }); + + it('should include the requestId as the second field', () => { + console.info('something'); + capturedStdout + .captured() + .should.match(new RegExp(`.*\t${EXPECTED_ID}\t.*\t.*\n`)); + }); + }); + + it('should include the level field as the third field', () => { + console.warn('content'); + capturedStdout.captured().should.match(new RegExp(`.*\t.*\tWARN\t.*\n`)); + }); + + it('should include the message as the fourth field', () => { + let message = 'my turbo message'; + console.trace(message); + capturedStdout + .captured() + .should.match(new RegExp(`.*\t.*\t.*\t${message}\n`)); + }); + + describe('Each console.* method should include a level value', () => { + it('should use INFO for console.log', () => { + console.log('hello'); + capturedStdout.captured().should.containEql('INFO'); + }); + + it('should use INFO for console.info', () => { + console.info('hello'); + capturedStdout.captured().should.containEql('INFO'); + }); + + it('should use WARN for console.warn', () => { + console.warn('hello'); + capturedStdout.captured().should.containEql('WARN'); + }); + + it('should use ERROR for console.error', () => { + console.error('hello'); + capturedStdout.captured().should.containEql('ERROR'); + }); + + it('should use TRACE for console.trace', () => { + console.trace('hello'); + capturedStdout.captured().should.containEql('TRACE'); + }); + + it('should use FATAL for console.fatal', () => { + console.fatal('hello'); + capturedStdout.captured().should.containEql('FATAL'); + }); + }); + + it('should log an error as json', () => { + let expected = new Error('some error'); + expected.code = 1234; + expected.custom = 'my custom field'; + + console.error('message', Errors.toFormatted(expected)); + + let errorString = capturedStdout.captured().split('\t')[4]; + let recoveredError = JSON.parse(errorString); + + recoveredError.should.have.property('errorType', expected.name); + recoveredError.should.have.property('errorMessage', expected.message); + recoveredError.should.have.property('stack', expected.stack.split('\n')); + recoveredError.should.have.property('code', expected.code); + recoveredError.should.have.property('custom', expected.custom); + }); +}); + +describe('The multiline log patch', () => { + let restoreConsole = consoleSnapshot(); + let telemetryTarget = new FakeTelemetryTarget(); + + beforeEach('create a new telemetry file and patch the console', () => { + telemetryTarget.openFile(); + telemetryTarget.updateEnv(); + LogPatch.patchConsole(); + }); + afterEach('close the telemetry file and unpatch the console', () => { + restoreConsole(); + telemetryTarget.closeFile(); + }); + + it('should clear the telemetry env var', () => { + should.not.exist(process.env['_LAMBDA_TELEMETRY_LOG_FD']); + }); + + it('should write a line', () => { + console.log('a line'); + telemetryTarget.readLine().should.containEql('a line'); + }); + + it('should have four tab-separated fields on a normal line', () => { + console.log('anything'); + telemetryTarget.readLine().should.match(/.*\t.*\t.*\t.*/); + }); + + it('should end with a newline', () => { + console.log('lol'); + telemetryTarget.readLine().should.match(/.*\n$/); + }); + + it('should have five tab-separated fields when logging an error', () => { + console.error('message', Errors.toFormatted(new Error('garbage'))); + telemetryTarget.readLine().should.match(/.*\t.*\t.*\t.*\t.*/); + }); + + describe('When the global requestId is set', () => { + const EXPECTED_ID = 'some fake request id'; + + beforeEach('set the request id', () => { + LogPatch.setCurrentRequestId(EXPECTED_ID); + }); + afterEach('unset the request id', () => { + LogPatch.setCurrentRequestId(EXPECTED_ID); + }); + + it('should include the requestId as the second field', () => { + console.info('something'); + telemetryTarget + .readLine() + .should.match(new RegExp(`.*\t${EXPECTED_ID}\t.*\t.*`)); + }); + }); + + it('should include the level field as the third field', () => { + console.warn('content'); + telemetryTarget.readLine().should.match(new RegExp(`.*\t.*\tWARN\t.*`)); + }); + + it('should include the message as the fourth field', () => { + let message = 'my turbo message'; + console.trace(message); + telemetryTarget + .readLine() + .should.match(new RegExp(`.*\t.*\t.*\t${message}`)); + }); + + describe('Each console.* method should include a level value', () => { + it('should use INFO for console.log', () => { + console.log('hello'); + telemetryTarget.readLine().should.containEql('INFO'); + }); + + it('should use INFO for console.info', () => { + console.info('hello'); + telemetryTarget.readLine().should.containEql('INFO'); + }); + + it('should use WARN for console.warn', () => { + console.warn('hello'); + telemetryTarget.readLine().should.containEql('WARN'); + }); + + it('should use ERROR for console.error', () => { + console.error('hello'); + telemetryTarget.readLine().should.containEql('ERROR'); + }); + + it('should use TRACE for console.trace', () => { + console.trace('hello'); + telemetryTarget.readLine().should.containEql('TRACE'); + }); + + it('should use FATAL for console.fatal', () => { + console.fatal('hello'); + telemetryTarget.readLine().should.containEql('FATAL'); + }); + }); + + it('should log an error as json', () => { + let expected = new Error('some error'); + expected.code = 1234; + expected.custom = 'my custom field'; + + console.error('message', Errors.toFormatted(expected)); + + let errorString = telemetryTarget.readLine().split('\t')[4]; + let recoveredError = JSON.parse(errorString); + + recoveredError.should.have.property('errorType', expected.name); + recoveredError.should.have.property('errorMessage', expected.message); + recoveredError.should.have.property('stack', expected.stack.split('\n')); + recoveredError.should.have.property('code', expected.code); + recoveredError.should.have.property('custom', expected.custom); + }); +}); diff --git a/test/unit/LoggingGlobals.js b/test/unit/LoggingGlobals.js new file mode 100644 index 0000000..e61194d --- /dev/null +++ b/test/unit/LoggingGlobals.js @@ -0,0 +1,51 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +/** + * Testing logging in unit tests requires manipulating the global console and + * stdout objects. + * This module provides methods for safely capturing and restoring these + * objects under test. + */ + +module.exports.consoleSnapshot = () => { + let log = console.log; + let debug = console.debug; + let info = console.info; + let warn = console.warn; + let error = console.error; + let trace = console.trace; + let fatal = console.fatal; + + return function restoreConsole() { + console.log = log; + console.debug = debug; + console.info = info; + console.warn = warn; + console.error = error; + console.trace = trace; + console.fatal = fatal; + }; +}; + +/** + * Capture all of the writes to a given stream. + */ +module.exports.captureStream = function captureStream(stream) { + let originalWrite = stream.write; + let buf = ''; + return { + hook: () => { + buf = ''; // reset the buffer + stream.write = function (chunk, _encoding, _callback) { + buf += chunk.toString(); + originalWrite.apply(stream, arguments); + }; + }, + unhook: () => (stream.write = originalWrite), + captured: () => buf, + }; +}; diff --git a/test/unit/ResponseStreamTest.js b/test/unit/ResponseStreamTest.js new file mode 100644 index 0000000..dbfe940 --- /dev/null +++ b/test/unit/ResponseStreamTest.js @@ -0,0 +1,577 @@ +/** + * Copyright 2021-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +require('should'); +const ServerMock = require('mock-http-server'); +const { + createResponseStream, + tryCallFail, +} = require('../../src/ResponseStream.js'); +const { HttpResponseStream } = require('../../src/HttpResponseStream.js'); +const { InvalidStreamingOperation } = require('../../src/Errors.js'); +const { verbose, vverbose, vvverbose } = require('../../src/VerboseLog').logger( + 'TEST', +); +const Throttle = require('throttle'); +const pipeline = require('util').promisify(require('stream').pipeline); +const { Readable } = require('stream'); +const { Buffer } = require('buffer'); +const http = require('http'); + +/** + * Node.js 17 changed the default DNS resolution ordering from always prioritizing ipv4 to the ordering + * returned by the DNS provider. In some environments, this can result in `localhost` resolving to + * an ipv6 address instead of ipv4 and a consequent failure to connect to the server. + * Hence, using `127.0.0.1` in place of localhost. + * ref: https://github.com/nodejs/node/pull/39987 + */ +const HOSTNAME = '127.0.0.1'; +const PATH = '/asd/efg'; + +const createStream = (port, options) => { + const { + request: stream, + headersDone, + responseDone: streamDone, + } = createResponseStream({ + httpOptions: { + hostname: HOSTNAME, + port, + path: PATH, + method: options?.method || 'POST', + http: options?.http || require('http'), + agent: new http.Agent({ + // keepAlive: true, + // maxSockets: 1, + }), + }, + contentType: options?.contentType, + }); + + return { stream, headersDone, streamDone }; +}; + +const streamSpy = (name, stream) => + stream + .on('end', () => verbose(name, 'ended')) + .on('close', () => verbose(name, 'closed')) + .on('finish', () => verbose(name, 'finished')) + .on('drain', () => verbose(name, 'drained')) + .on('error', () => verbose(name, 'errored')) + .on('pause', () => verbose(name, 'paused')) + .on('readable', () => verbose(name, 'readabled')) + .on('resume', () => verbose(name, 'resumed')); + +const assertStream = async (port, useStream) => { + const { stream, headersDone, streamDone } = createStream(port); + streamSpy('test stream', stream); + + vverbose('assertStream 1'); + await useStream(stream); + vverbose('assertStream 2'); + + // auto-close. + stream.end(); + vverbose('assertStream 3'); + + const info = await headersDone; + vverbose('assertStream 4'); + + const body = await streamDone; + vverbose('assertStream 5'); + + const response = { + statusCode: info.statusCode, + headers: info.headers, + body, + }; + vverbose('assertStream 6'); + return response; +}; + +const destroyConnections = (server) => { + server.connections().forEach((c) => c.destroy()); +}; + +describe('stream - throws uncaughtException', () => { + const server = new ServerMock({ host: HOSTNAME, port: 0 }); + let originalListener; + + before(function (done) { + server.start(done); + }); + after(function () { + process.addListener('uncaughtException', originalListener); + }); + + it('no end will timeout', function (done) { + this.timeout(1000); //increase timeout. + + originalListener = process.listeners('uncaughtException').pop(); + process.removeListener('uncaughtException', originalListener); + + const { stream, streamDone } = createStream(server.getHttpPort()); + streamSpy('ender', stream); + stream.setContentType('moon/dust'); + + // Write to the stream, do not call .end + stream.write(Buffer.from([1])); + + process.prependOnceListener('uncaughtException', (err) => { + should(err).be.not.empty(); + err.code.should.be.equal('ECONNRESET'); + }); + + setTimeout(() => { + stream.writableFinished.should.be.false(); + stream.end(); + streamDone.then(() => { + destroyConnections(server); + server.stop(done); + }); + }, 500); + }); +}); + +describe('stream/pipeline', function () { + this.timeout(10000); + + const server = new ServerMock({ host: HOSTNAME, port: 0 }); + + beforeEach(function (done) { + server.start(done); + }); + + afterEach(function (done) { + server.stop(done); + }); + + it('can pipeline', async () => { + const { stream, streamDone } = createStream(server.getHttpPort()); + stream.setContentType('application/octet-stream'); + const input = Readable.from(Buffer.from('moon')); + + await pipeline(input, stream); + await streamDone; + + const reqs = server.requests(); + reqs.length.should.be.equal(1); + reqs[0].body.should.be.equal('moon'); + }); + + it('can pipeline with throttle', async () => { + const { stream, streamDone } = createStream(server.getHttpPort()); + stream.setContentType('application/octet-stream'); + const input = Readable.from(Buffer.from('moon '.repeat(1000))); + + await pipeline(input, new Throttle({ bps: 20000, chunkSize: 2 }), stream); + await streamDone; + + const reqs = server.requests(); + reqs.length.should.be.equal(1); + reqs[0].body.should.be.equal('moon '.repeat(1000)); + }); + + it('can pipeline with throttle 2', async () => { + const { stream, streamDone } = createStream(server.getHttpPort()); + stream.setContentType('application/octet-stream'); + const input = Readable.from(Buffer.from('moon')); + + await pipeline(input, new Throttle({ bps: 1, chunkSize: 1 }), stream); + await streamDone; + + const reqs = server.requests(); + reqs.length.should.be.equal(1); + reqs[0].body.should.be.equal('moon'); + }); + + it('can pipeline generator function', async () => { + async function* generateContent() { + // Push 1 MiB of data in 1 KiB chunks + for (let i = 1; i <= 100; i++) { + yield (i % 10).toString().repeat(1024); // push 1 KiB to the stream + } + } + + const { stream, streamDone } = createStream(server.getHttpPort()); + stream.setContentType('application/octet-stream'); + + const input = generateContent(); + + await pipeline(input, stream); + await streamDone; + + const reqs = server.requests(); + reqs.length.should.be.equal(1); + + let expected = ''; + for await (let s of generateContent()) { + expected += s; + } + reqs[0].body.should.be.equal(expected); + }); +}); + +describe('stream', () => { + const server = new ServerMock({ host: HOSTNAME, port: 0 }); + + beforeEach(function (done) { + server.start(done); + }); + + afterEach(function (done) { + server.stop(done); + }); + + it('write returns true', async () => { + const { stream, streamDone } = createStream(server.getHttpPort()); + stream.setContentType('application/octet-stream'); + + const result = stream.write('moon'); + result.should.be.true(); + + await new Promise((r) => stream.end(r)); + await streamDone; + + const reqs = server.requests(); + reqs.length.should.be.equal(1); + + reqs[0].body.should.be.equal('moon'); + }); + + it('default content type', (done) => { + const { stream, streamDone } = createStream(server.getHttpPort()); + stream.end(() => { + streamDone.then(() => { + const reqs = server.requests(); + reqs.length.should.be.equal(1); + reqs[0].headers['content-type'].should.be.equal( + 'application/octet-stream', + ); + reqs[0].headers[ + 'lambda-runtime-function-response-mode' + ].should.be.equal('streaming'); + + done(); + }); + }); + }); + + it('expect error trailer', async () => { + const { stream, streamDone } = createStream(server.getHttpPort()); + + await new Promise((r) => stream.end(r)); + await streamDone; + + const reqs = server.requests(); + reqs.length.should.be.equal(1); + reqs[0].headers['trailer'].should.be.equal( + 'Lambda-Runtime-Function-Error-Type, Lambda-Runtime-Function-Error-Body', + ); + reqs[0].headers['lambda-runtime-function-response-mode'].should.be.equal( + 'streaming', + ); + }); + + it('chunked encoding', async () => { + const { stream, streamDone } = createStream(server.getHttpPort()); + + await new Promise((r) => stream.end(r)); + await streamDone; + + const reqs = server.requests(); + reqs.length.should.be.equal(1); + reqs[0].headers['transfer-encoding'].should.be.equal('chunked'); + reqs[0].headers['lambda-runtime-function-response-mode'].should.be.equal( + 'streaming', + ); + }); + + it("setContentType doesn't throw when constructed", async () => { + const { stream, streamDone } = createStream(server.getHttpPort()); + stream.setContentType('moon/dust'); + + await new Promise((r) => stream.end(r)); + await streamDone; + + const reqs = server.requests(); + reqs.length.should.be.equal(1); + reqs[0].headers['content-type'].should.be.equal('moon/dust'); + reqs[0].headers['lambda-runtime-function-response-mode'].should.be.equal( + 'streaming', + ); + }); + + it('content type from options', async () => { + const { stream, streamDone } = createStream(server.getHttpPort(), { + contentType: 'moon/dust', + }); + + await new Promise((r) => stream.end(r)); + await streamDone; + + const reqs = server.requests(); + reqs.length.should.be.equal(1); + reqs[0].headers['content-type'].should.be.equal('moon/dust'); + reqs[0].headers['lambda-runtime-function-response-mode'].should.be.equal( + 'streaming', + ); + }); + + it('override content type from options', async () => { + const { stream, streamDone } = createStream(server.getHttpPort(), { + contentType: 'moon/flake', + }); + stream.setContentType('moon/dust'); + + await new Promise((r) => stream.end(r)); + await streamDone; + + const reqs = server.requests(); + reqs.length.should.be.equal(1); + reqs[0].headers['content-type'].should.be.equal('moon/dust'); + reqs[0].headers['lambda-runtime-function-response-mode'].should.be.equal( + 'streaming', + ); + }); + + it('override content type, metadata prelude', async () => { + let { stream, streamDone } = createStream(server.getHttpPort(), { + contentType: 'moon/flake', + }); + stream = HttpResponseStream.from(stream, { + loc: 'mare\x00tranquillitatis', + }); + + stream.write('ABC'); + + await new Promise((r) => stream.end(r)); + await streamDone; + + const reqs = server.requests(); + reqs.length.should.be.equal(1); + + reqs[0].headers['content-type'].should.be.equal( + 'application/vnd.awslambda.http-integration-response', + ); + reqs[0].headers['lambda-runtime-function-response-mode'].should.be.equal( + 'streaming', + ); + + // Null in the object value is escaped, prelude added followed by a null byte. + reqs[0].body.should.be.equal( + '{"loc":"mare\\u0000tranquillitatis"}\u0000\u0000\u0000\u0000\u0000\u0000\x00\u0000ABC', + ); + }); + + it('metadata prelude, do not use return value', async () => { + let { stream, streamDone } = createStream(server.getHttpPort()); + + // Ignore the return value. + HttpResponseStream.from(stream, { + loc: 'mare\x00tranquillitatis', + }); + + stream.write('ABC'); + + await new Promise((r) => stream.end(r)); + await streamDone; + + const reqs = server.requests(); + reqs.length.should.be.equal(1); + + reqs[0].headers['content-type'].should.be.equal( + 'application/vnd.awslambda.http-integration-response', + ); + reqs[0].headers['lambda-runtime-function-response-mode'].should.be.equal( + 'streaming', + ); + + // Null in the object value is escaped, prelude added followed by a null byte. + reqs[0].body.should.be.equal( + '{"loc":"mare\\u0000tranquillitatis"}\x00\x00\x00\x00\x00\x00\x00\x00ABC', + ); + }); + + it('setContentType throws after first write', (done) => { + const { stream, streamDone } = createStream(server.getHttpPort()); + stream.write(Buffer.from(JSON.stringify({}))); + should(() => stream.setContentType('moon/trust')).throw({ + name: 'Runtime.InvalidStreamingOperation', + message: 'Cannot set content-type, too late.', + }); + stream.end(() => streamDone.then(() => done())); + }); + + it('setContentType throws after first write, non-default', (done) => { + const { stream, streamDone } = createStream(server.getHttpPort()); + stream.setContentType('moon/dust'); + stream.write(Buffer.from([1, 2, 3, 2, 1])); + should(() => stream.setContentType('moon/trust')).throw({ + name: 'Runtime.InvalidStreamingOperation', + message: 'Cannot set content-type, too late.', + }); + stream.end(() => streamDone.then(() => done())); + }); + + it('send error in trailer', (done) => { + const { stream, streamDone } = createStream(server.getHttpPort(), {}); + tryCallFail(stream, 42); + stream.end(() => { + streamDone.then(() => { + const reqs = server.requests(); + reqs.length.should.be.equal(1); + reqs[0].trailers['lambda-runtime-function-error-type'].should.be.equal( + 'number', + ); + const body = JSON.parse( + Buffer.from( + reqs[0].trailers['lambda-runtime-function-error-body'], + 'base64', + ).toString(), + ); + + body.should.be.eql({ + errorType: 'number', + errorMessage: '42', + trace: [], + }); + + done(); + }); + }); + }); + + it('send InvalidStreamingOperation in trailer', (done) => { + const { stream, streamDone } = createStream(server.getHttpPort(), {}); + tryCallFail( + stream, + new InvalidStreamingOperation('Cannot set content-type, too late.'), + ); + stream.end(() => { + streamDone.then(() => { + const reqs = server.requests(); + reqs.length.should.be.equal(1); + reqs[0].trailers['lambda-runtime-function-error-type'].should.be.equal( + 'Runtime.InvalidStreamingOperation', + ); + const body = JSON.parse( + Buffer.from( + reqs[0].trailers['lambda-runtime-function-error-body'], + 'base64', + ).toString(), + ); + + body.errorType.should.be.equal('Runtime.InvalidStreamingOperation'); + body.errorMessage.should.be.equal('Cannot set content-type, too late.'); + body.trace.should.be.not.empty(); + + done(); + }); + }); + }); + + it('send error in trailer, callback from fail', (done) => { + const { stream, streamDone } = createStream(server.getHttpPort(), {}); + tryCallFail(stream, 42, () => { + streamDone.then(() => { + const reqs = server.requests(); + reqs.length.should.be.equal(1); + reqs[0].trailers['lambda-runtime-function-error-type'].should.be.equal( + 'number', + ); + + const body = JSON.parse( + Buffer.from( + reqs[0].trailers['lambda-runtime-function-error-body'], + 'base64', + ).toString(), + ); + + body.should.be.eql({ + errorType: 'number', + errorMessage: '42', + trace: [], + }); + + done(); + }); + }); + }); + + const TypeErrorMsg = + 'The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Object'; + [0, 1, 2, 100, 1000].forEach((repeat) => { + [ + { + name: 'object, should fail', + value: { moon: 'dust' }, + error: { code: 'ERR_INVALID_ARG_TYPE', message: TypeErrorMsg }, + }, + { + name: 'string', + value: JSON.stringify({ moon: 'dust' }), + expected: '{"moon":"dust"}', + }, + { + name: 'buffer', + value: Buffer.from(JSON.stringify({ moon: 'dust' })), + expected: '{"moon":"dust"}', + }, + { + name: 'Uint8Array', + value: new TextEncoder().encode(JSON.stringify({ moon: 'dust' })), + expected: '{"moon":"dust"}', + }, + ].forEach((v) => { + it(`write ${repeat} ${v.name}`, async () => { + server.on({ + method: 'POST', + path: PATH, + reply: { + status: 200, + headers: { 'content-type': 'application/octet-stream' }, + body: (req) => { + return req.body; + }, + }, + }); + + const response = await assertStream(server.getHttpPort(), (stream) => { + stream.setContentType('moon/sparkle'); + for (let i = 1; i <= repeat; i++) { + try { + stream.write(v.value); + } catch (err) { + if (!v.error) { + throw err; + } + + if (v.error.code) { + err.code.should.be.equal(v.error.code); + } + if (v.error.message) { + err.message.should.be.equal(v.error.message); + } + } + } + stream.end(); + }); + + vvverbose('response', response); + response.statusCode.should.be.equal(200); + + if (v.error) { + return; + } + const expected = v.expected.repeat(repeat); + const body = response.body ? response.body.toString('utf-8') : ''; + + body.should.be.equal(expected); + }); + }); + }); +}); diff --git a/test/unit/Runtime/BeforeExitListener.test.ts b/test/unit/Runtime/BeforeExitListener.test.ts deleted file mode 100644 index bfd00c5..0000000 --- a/test/unit/Runtime/BeforeExitListener.test.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; - -require("should"); - -describe("Invoke the BeforeExitListener", () => { - it("should not fail if a listerner has not been set", async () => { - const beforeExitListenerModule = await import( - "../../../src/Runtime/BeforeExitListener" - ); - const beforeExitListener = beforeExitListenerModule.default; - - beforeExitListener.invoke(); - }); - - it("should use the listener", async () => { - let count = 0; - const listener = () => { - count++; - }; - - const beforeExitListenerModule = await import( - "../../../src/Runtime/BeforeExitListener" - ); - const beforeExitListener = beforeExitListenerModule.default; - - beforeExitListener.set(listener); - - beforeExitListener.invoke(); - count.should.be.equal(1); - - beforeExitListener.invoke(); - count.should.be.equal(2); - }); - - it("should use the same listener even when imported again", async () => { - let count = 0; - const listener = () => { - count++; - }; - - const beforeExitListenerModule = await import( - "../../../src/Runtime/BeforeExitListener" - ); - const beforeExitListener = beforeExitListenerModule.default; - - beforeExitListener.set(listener); - beforeExitListener.invoke(); - - const secondImport = await import( - "../../../src/Runtime/BeforeExitListener" - ); - const secondBeforeExitListener = secondImport.default; - - secondBeforeExitListener.invoke(); - count.should.be.equal(2); - }); -}); diff --git a/test/unit/Runtime/CallbackContext.test.ts b/test/unit/Runtime/CallbackContext.test.ts deleted file mode 100644 index c650b5f..0000000 --- a/test/unit/Runtime/CallbackContext.test.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; - -import { IncomingHttpHeaders } from "http"; -import BeforeExitListener from "../../../src/Runtime/BeforeExitListener"; -import { IRuntimeClient } from "../../../src/RuntimeClient"; -import { - InvocationResponse, - CallbackFunction, - ICallbackContext, -} from "../../../src/Common"; -import { build as buildCallBackContext } from "../../../src/Runtime/CallbackContext"; - -require("should"); - -class RuntimeClientStub implements IRuntimeClient { - lastId?: string; - lastError?: any; - lastResponse?: string; - - nextInvocation(): Promise { - return Promise.resolve({ - bodyJson: "{ 'this': 'is a test' }", - headers: {} as IncomingHttpHeaders, - }); - } - postInvocationError(error: unknown, id: string, callback: () => void): void { - this.lastId = id; - this.lastError = error; - callback(); - } - - postInvocationResponse( - response: unknown, - id: string, - callback: () => void - ): void { - this.lastId = id; - this.lastResponse = JSON.stringify(response); - callback(); - } -} - -describe("Executing the callback", () => { - let scheduledNextCalled = false; - const scheduleNext = () => { - scheduledNextCalled = true; - }; - - const dummyExecutionId = "some id"; - let callback: CallbackFunction; - let context: ICallbackContext; - let client: RuntimeClientStub; - - beforeEach(() => { - scheduledNextCalled = false; - client = new RuntimeClientStub(); - [callback, context] = buildCallBackContext( - client, - dummyExecutionId, - scheduleNext - ); - }); - - it("should call the client with the correct response.", async () => { - callback(null, "response"); - - scheduledNextCalled.should.be.false(); - client.lastResponse?.should.equal('"response"'); - client.lastId?.should.equal(dummyExecutionId); - client.lastError?.should.be.null(); - - BeforeExitListener.invoke(); - scheduledNextCalled.should.be.true(); - }); - - it("should not allow the callback to be executed more than once.", async () => { - callback(null, "response"); - callback(null, "Second time"); - - client.lastResponse?.should.equal('"response"'); - }); - - it("should immediatelly schedule the next invocation when setting the callbackWaitsForEmptyEventLoop to false.", async () => { - context.callbackWaitsForEmptyEventLoop = false; - callback(null, "response when not waiting"); - - client.lastResponse?.should.equal('"response when not waiting"'); - scheduledNextCalled.should.be.true(); - }); - - it("should call the client with correct error when the error is defined.", () => { - const myError = new Error("This is an error"); - - callback(myError); - - client.lastResponse?.should.be.null(); - client.lastError?.should.equal(myError); - }); - - it("should not wrap an error string into a generic Error.", () => { - callback("This is an error"); - - client.lastResponse?.should.be.null(); - client.lastError?.should.equal("This is an error"); - }); -}); diff --git a/test/unit/Runtime/InvokeContext.test.ts b/test/unit/Runtime/InvokeContext.test.ts deleted file mode 100644 index b0aa5bf..0000000 --- a/test/unit/Runtime/InvokeContext.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; - -require("should"); -import utilModule from "util"; - -const sleep = utilModule.promisify(setTimeout); - -import InvokeContext from "../../../src/Runtime/InvokeContext"; - -describe("Getting remaining invoke time", () => { - it("should reduce by at least elapsed time", async () => { - const ctx = new InvokeContext({ - "lambda-runtime-deadline-ms": (Date.now() + 1000).toString(), - }); - - const timeout = 100 * 1.05; // 5% margin of error - const before = ctx.headerData.getRemainingTimeInMillis(); - await sleep(timeout); - const after = ctx.headerData.getRemainingTimeInMillis(); - (before - after).should.greaterThanOrEqual(100); - }); - - it("should return NaN when the deadline is not defined?", async () => { - const ctx = new InvokeContext({}); - const remaining = ctx.headerData.getRemainingTimeInMillis(); - - remaining.should.be.NaN(); - }); - - it("should be within range.", () => { - const ctx = new InvokeContext({ - "lambda-runtime-deadline-ms": (Date.now() + 1000).toString(), - }); - - const remainingTime = ctx.headerData.getRemainingTimeInMillis(); - - remainingTime.should.greaterThan(0); - remainingTime.should.lessThanOrEqual(1000); - }); -}); diff --git a/test/unit/RuntimeClient/RuntimeClient.test.ts b/test/unit/RuntimeClient/RuntimeClient.test.ts deleted file mode 100644 index 9d046c3..0000000 --- a/test/unit/RuntimeClient/RuntimeClient.test.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; - -require("should"); -import RuntimeClient from "../../../src/RuntimeClient"; -import * as runtimeErrors from "../../../src/Errors"; -import { StubHttp } from "../utils/StubHttp"; -import { NoOpNativeHttp } from "../utils/NoOpNativeHttp"; - -class EvilError extends Error { - get name(): string { - throw "gotcha"; - } -} - -const EXPECTED_ERROR_HEADER = "Lambda-Runtime-Function-Error-Type"; - -describe("building error requests with the RuntimeClient", () => { - const stubHttp = new StubHttp(); - const client = new RuntimeClient( - "notUsed:1337", - stubHttp, - new NoOpNativeHttp() - ); - - const errors: Array<[Error, string]> = [ - [new Error("generic failure"), "Error"], - [new runtimeErrors.ImportModuleError(), "Runtime.ImportModuleError"], - [new runtimeErrors.HandlerNotFound(), "Runtime.HandlerNotFound"], - [new runtimeErrors.MalformedHandlerName(), "Runtime.MalformedHandlerName"], - [new runtimeErrors.UserCodeSyntaxError(), "Runtime.UserCodeSyntaxError"], - [({ data: "some random object" } as unknown) as Error, "object"], - [new EvilError(), "handled"], - ]; - - describe("the error header in postInitError", () => { - errors.forEach(([error, name]) => { - it(`should be ${name} for ${error.constructor.name}`, () => { - client.postInitError(error, () => { - // No op - }); - stubHttp.lastUsedOptions.should.have - .property("headers") - .have.property(EXPECTED_ERROR_HEADER, name); - }); - }); - }); -}); diff --git a/test/unit/StreamingContextTest.js b/test/unit/StreamingContextTest.js new file mode 100644 index 0000000..b9e67a0 --- /dev/null +++ b/test/unit/StreamingContextTest.js @@ -0,0 +1,123 @@ +/** + * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +require('should'); +const StreamingContext = require('../../src/StreamingContext.js'); +const { PassThrough } = require('stream'); +const BeforeExitListener = require('../../src/BeforeExitListener.js'); + +class MockRapidClient { + constructor() { + this.sentErrors = []; + this.responseStream = new PassThrough(); + this.responseStream.fail = (err, callback) => { + this.sentErrors.push({ err }); + callback(); + }; + } + + getStreamForInvocationResponse() { + return { request: this.responseStream, responseDone: undefined }; + } +} + +describe('StreamingContext', () => { + it('can set callbackWaitsForEmptyEventLoop', () => { + const ctx = StreamingContext.build(); + + ctx.callbackWaitsForEmptyEventLoop = true; + ctx.callbackWaitsForEmptyEventLoop.should.be.equal(true); + + ctx.callbackWaitsForEmptyEventLoop = false; + ctx.callbackWaitsForEmptyEventLoop.should.be.equal(false); + }); + + it('can create stream', () => { + const id = '12-3-4-56'; + const client = new MockRapidClient(); + const ctx = StreamingContext.build( + client, + id, + () => {}, + JSON.stringify({}), + ); + const stream = ctx.createStream(); + should(stream).not.be.empty(); + }); + + it('cannot create stream more than once', () => { + const id = '12-3-4-56'; + const client = new MockRapidClient(); + const ctx = StreamingContext.build( + client, + id, + () => {}, + JSON.stringify({}), + ); + const stream = ctx.createStream(); + should(stream).not.be.empty(); + + for (let i = 0; i < 5; i++) { + should(() => ctx.createStream()).throw({ + message: + 'Cannot create stream for the same StreamingContext more than once.', + }); + } + }); + + [true, false].forEach((callbackWaitsForEmptyEventLoop) => + [ + { + error: new Error('too much sun'), + expected: 'too much sun', + }, + { + error: 'too much sun', + expected: 'too much sun', + }, + ].forEach((v) => + it(`can call next after fail (callbackWaitsForEmptyEventLoop: ${callbackWaitsForEmptyEventLoop}, error: ${typeof v.error})`, () => { + // This test will print "Invoke Error" to stderr which is to be expected. + + let nextCalled = 0; + const ID = '12-3-4-56'; + const client = new MockRapidClient(); + const ctx = StreamingContext.build( + client, + ID, + () => nextCalled++, + JSON.stringify({}), + ); + ctx.callbackWaitsForEmptyEventLoop = callbackWaitsForEmptyEventLoop; + const { scheduleNext, fail } = ctx.createStream(); + + fail(v.error, scheduleNext); + client.responseStream.fail(v.error, scheduleNext); + + const verify = () => { + nextCalled.should.be.equal(1); + + console.log('client.sentErrors', client.sentErrors); + console.log('client.invocationErrors', client.invocationErrors); + + client.sentErrors.length.should.be.equal(1); + if (typeof v.error === 'string') { + client.sentErrors[0].err.should.be.equal(v.expected); + } else { + client.sentErrors[0].err.message.should.be.equal(v.expected); + } + }; + + if (v) { + BeforeExitListener.invoke(); + setImmediate(() => verify()); + } else { + verify(); + } + }), + ), + ); +}); diff --git a/test/unit/UserFunctionTest.js b/test/unit/UserFunctionTest.js new file mode 100644 index 0000000..cf53b09 --- /dev/null +++ b/test/unit/UserFunctionTest.js @@ -0,0 +1,270 @@ +/** + * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +'use strict'; + +require('should'); +const path = require('path'); +const { + HandlerNotFound, + ImportModuleError, + MalformedHandlerName, +} = require('../../src/Errors.js'); +const UserFunction = require('../../src/UserFunction.js'); + +const TEST_ROOT = path.join(__dirname, '../'); +const HANDLERS_ROOT = path.join(TEST_ROOT, 'handlers'); + +describe('UserFunction.load method', () => { + const echoTestMessage = 'This is a echo test'; + it('should successfully load a user function', async () => { + const handler = await UserFunction.load(HANDLERS_ROOT, 'core.echo'); + const response = await handler(echoTestMessage); + + response.should.equal(echoTestMessage); + }); + + it('should successfully load a user function nested in an object', async () => { + const handler = await UserFunction.load( + HANDLERS_ROOT, + 'nestedHandler.nested.somethingComplex.handler', + ); + const response = await handler(); + + response.should.equal('something interesting'); + }); + + it('should successfully load a user function with a path to the module', async () => { + const handler = await UserFunction.load( + TEST_ROOT, + 'handlers/nestedHandler.nested.somethingComplex.handler', + ); + const response = await handler(); + + response.should.equal('something interesting'); + }); + + it("should throw a MalformedHandlerName error if the handler string contains '..'", () => { + UserFunction.load( + HANDLERS_ROOT, + 'malformed..handler', + ).should.be.rejectedWith(MalformedHandlerName); + }); + + it('should throw a MalformedHandlerName error if the handler string does not contain a dot', () => { + UserFunction.load(HANDLERS_ROOT, 'malformedHandler').should.be.rejectedWith( + MalformedHandlerName, + ); + }); + + it('should throw a MalformedHandlerName error if the path to the handler does not exists and malformed handler', () => { + UserFunction.load( + path.join(HANDLERS_ROOT, 'non/existent/path'), + 'malformedHandler', + ).should.be.rejectedWith(MalformedHandlerName); + }); + + it('should throw a ImportModuleError error if the module does not exists', () => { + UserFunction.load(HANDLERS_ROOT, 'noModule.echo').should.be.rejectedWith( + ImportModuleError, + ); + }); + + it('should throw a HandlerNotFound error if the handler does not exists', () => { + UserFunction.load( + HANDLERS_ROOT, + 'nestedHandler.nested.somethingComplex.nonHandler', + ).should.be.rejectedWith(HandlerNotFound); + }); + + it('should throw a HandlerNotFound error if the handler is not a function', () => { + UserFunction.load( + HANDLERS_ROOT, + 'core.noFunctionHandler', + ).should.be.rejectedWith(HandlerNotFound); + }); + + it('should successfully load a user function in an ES module in a file with .mjs extension', async () => { + const handler = await UserFunction.load(HANDLERS_ROOT, 'esModule.echo'); + const response = await handler(echoTestMessage); + + response.should.equal(echoTestMessage); + }); + + it('should successfully load a user function CommonJS module in a file with .cjs extension', async () => { + const handler = await UserFunction.load(HANDLERS_ROOT, 'cjsModule.echo'); + const response = await handler(echoTestMessage); + + response.should.equal(echoTestMessage); + }); + + it('should default to load the cjs module without extension', async () => { + // There are multiple files named precendence with different extensions + // and the .js file should have precedence over all but the current implementation gives + // priority to files without extension. + const handler = await UserFunction.load( + HANDLERS_ROOT, + 'precedence.handler', + ); + const response = await handler(); + + // Currently files without extension have higher precedence over .js files + response.should.equal("I don't have a .js file suffix"); + }); + + it('should default to load the .js file over the .mjs module', async () => { + // The .js file should be loaded instead of the .mjs file + const handler = await UserFunction.load( + HANDLERS_ROOT, + 'precedenceJsVsMjs.handler', + ); + const response = await handler(); + + response.should.equal('I do have a .js file suffix'); + }); + + it('should default to load the .mjs file over the .cjs module', async () => { + // The .mjs file should be loaded instead of the .cjs file + const handler = await UserFunction.load( + HANDLERS_ROOT, + 'precedenceMjsVsCjs.handler', + ); + const response = await handler(); + + response.should.equal('I do have a .mjs file suffix'); + }); + + it('should support init', async () => { + // The asyncInit module has a top level await on a timer to set a flag + // If at the time of invocation, the flag is not set, the handler will throw an Error + const handler = await UserFunction.load(HANDLERS_ROOT, 'asyncInit.handler'); + const response = await handler(); + + response.should.equal('Hi'); + }); + + it('should support init in .js files in packages using the module type', async () => { + // The asyncInit module has a top level await on a timer to set a flag + // If at the time of invocation, the flag is not set, the handler will throw an Error + const handler = await UserFunction.load( + path.join(HANDLERS_ROOT, 'async_init_package'), + 'index.handler', + ); + const response = await handler(); + + response.should.equal('Hi'); + }); + + it('should support init in .js files in packages using the module type, nested', async () => { + const handler = await UserFunction.load( + path.join(HANDLERS_ROOT, 'async_init_package/nested'), + 'index.handler', + ); + handler().should.be.resolvedWith(42); + }); + + it('should support init in .js files in packages using the module type, nested even more', async () => { + const handler = await UserFunction.load( + path.join(HANDLERS_ROOT, 'async_init_package/nested/even/more'), + 'index.handler', + ); + handler().should.be.equal(42); + }); + + it('should support init in .js files in packages using the module type, nested even more + moduleRoot', async () => { + const handler = await UserFunction.load( + path.join(HANDLERS_ROOT, 'async_init_package/nested'), + 'even/more/index.handler', + ); + handler().should.be.equal(42); + }); + + it('should use commonjs when package.json cannot be read', async () => { + const handler = await UserFunction.load( + path.join(HANDLERS_ROOT, 'async_init_type_not_module'), + 'index.ret42', + ); + handler().should.be.equal(42); + }); + + it('should use commonjs when node_modules is reached before package.json', async () => { + const handler = await UserFunction.load( + path.join(HANDLERS_ROOT, 'async_init_with_node_modules'), + 'node_modules/index.ret42', + ); + handler().should.be.equal(42); + }); + + it('should bubble up rejections occurred during init as errors', async () => { + try { + await UserFunction.load(HANDLERS_ROOT, 'asyncInitRejection.handler'); + + should.fail('The rejection did not bubble up!'); + } catch (error) { + error.should.be.instanceof(Error); + error.name.should.equal('AsyncInitRejectionException'); + error.message.should.equal('Oh noes! something bad happened'); + } + }); + + it('should not load a CommonJS module if the package has the module type defined', () => { + UserFunction.load( + path.join(HANDLERS_ROOT, 'async_init_package'), + 'cjsModuleInEsmPackage.echo', + ).should.be.rejectedWith(/exports is not defined in ES module scope/); + }); + + it('should throw a ImportModuleError error if the module does not exists', () => { + UserFunction.load(HANDLERS_ROOT, 'noModule.echo').should.be.rejectedWith( + ImportModuleError, + ); + }); + + it("should successfully load a user function exported as 'default'", async () => { + const handler = await UserFunction.load( + HANDLERS_ROOT, + 'defaultHandler.default', + ); + const response = handler(); + + response.should.be.equal(42); + }); + + it("should successfully load a user function exported as 'default', esm", async () => { + const handler = await UserFunction.load( + HANDLERS_ROOT, + 'defaultHandlerESM.default', + ); + const response = handler(); + + response.should.be.equal(42); + }); + + it('should successfully load a user function that uses different import styles, esm', async () => { + const handler = await UserFunction.load( + HANDLERS_ROOT, + 'esModuleImports.echo', + ); + const response = handler('moon'); + + response.should.be.resolvedWith('moon'); + }); +}); + +describe('type guards HandlerFunction', () => { + it('should compile the code', () => { + const func = () => {}; + if (UserFunction.isHandlerFunction(func)) { + func(); + } + }); + + it('should return true if function', () => { + UserFunction.isHandlerFunction(() => {}).should.be.true(); + }); + + it('should return false if not function', () => { + UserFunction.isHandlerFunction('MyHandler').should.be.false(); + }); +}); diff --git a/test/unit/package.json b/test/unit/package.json new file mode 100644 index 0000000..599108a --- /dev/null +++ b/test/unit/package.json @@ -0,0 +1,48 @@ +{ + "name": "_unit", + "version": "1.0.0", + "author": "AWS Lambda", + "license": "Apache-2.0", + "eslintConfig": { + "extends": [ + "plugin:prettier/recommended" + ], + "env": { + "node": true, + "mocha": true, + "es6": true + }, + "parserOptions": { + "ecmaVersion": 2020 + }, + "rules": { + "strict": [ + "error", + "global" + ], + "indent": [ + "error", + 2 + ], + "camelcase": "error", + "no-console": "off", + "no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_" + } + ] + } + }, + "eslintIgnore": [ + "syntax_error.js", + "node_modules", + "async_init_package" + ], + "prettier": { + "trailingComma": "all", + "tabWidth": 2, + "semi": true, + "singleQuote": true + } +} diff --git a/test/unit/tsconfig.json b/test/unit/tsconfig.json deleted file mode 100644 index 2136ca2..0000000 --- a/test/unit/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../tsconfig-base.json", - "references": [ - { "path": "../../src" } - ], - "compilerOptions": { - "types": [ - "node", - "mocha" - ] - } -} \ No newline at end of file diff --git a/test/unit/utils/FakeTelemetryTarget.ts b/test/unit/utils/FakeTelemetryTarget.ts deleted file mode 100644 index 700a381..0000000 --- a/test/unit/utils/FakeTelemetryTarget.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; - -import * as os from "os"; -import * as fs from "fs"; -import * as path from "path"; -import * as assert from "assert"; - -const _LOG_IDENTIFIER = Buffer.from("a55a0001", "hex"); - -/** - * A fake implementation of the multilne logging protocol. - * Read and write log frames to a temp file and provide an asserting helper for - * reading individual log statements from the file. - */ -export default class FakeTelemetryTarget { - readTarget: number; - writeTarget: number; - - constructor() { - this.readTarget = 0; - this.writeTarget = 0; - } - - openFile(): void { - const tempTelemetryDir = fs.mkdtempSync( - path.join(os.tmpdir(), "LambdyBYOLNodeJs12xTelemetry-") - ); - this.writeTarget = fs.openSync(path.join(tempTelemetryDir, "log"), "as+"); - this.readTarget = fs.openSync(path.join(tempTelemetryDir, "log"), "rs+"); - console.log( - "Generate new telemetry file", - tempTelemetryDir, - "with file descriptor", - this.readTarget - ); - } - - closeFile(): void { - console.log(`Close telemetry filedescriptor ${this.readTarget}`); - fs.closeSync(this.readTarget); - fs.closeSync(this.writeTarget); - this.readTarget = 0; - this.writeTarget = 0; - } - - updateEnv(): void { - process.env["_LAMBDA_TELEMETRY_LOG_FD"] = this.writeTarget.toString(); - } - - /** - * Read a single line from the telemetry file. - * Explodes when: - * - no line is present - * - the prefix is malformed - * - there aren't enough bytes - */ - readLine(): string { - const readLength = () => { - const logPrefix = Buffer.alloc(8); - const actualReadBytes = fs.readSync( - this.readTarget, - logPrefix, - 0, - logPrefix.length, - null - ); - assert.strictEqual( - actualReadBytes, - logPrefix.length, - `Expected actualReadBytes[${actualReadBytes}] = ${logPrefix.length}` - ); - assert.strictEqual( - logPrefix.lastIndexOf(_LOG_IDENTIFIER), - 0, - `log prefix ${logPrefix.toString( - "hex" - )} should start with ${_LOG_IDENTIFIER.toString("hex")}` - ); - return logPrefix.readInt32BE(4); - }; - - const lineLength = readLength(); - const lineBytes = Buffer.alloc(lineLength); - const actualLineSize = fs.readSync( - this.readTarget, - lineBytes, - 0, - lineBytes.length, - null - ); - assert.strictEqual( - actualLineSize, - lineBytes.length, - "The log line must match the length specified in the frame header" - ); - return lineBytes.toString("utf8"); - } -} diff --git a/test/unit/utils/LogPatch.test.ts b/test/unit/utils/LogPatch.test.ts deleted file mode 100644 index d78e2f1..0000000 --- a/test/unit/utils/LogPatch.test.ts +++ /dev/null @@ -1,229 +0,0 @@ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; - -import should from "should"; -import LogPatch from "../../../src/utils/LogPatch"; -import * as Errors from "../../../src/Errors"; - -import { captureStream, consoleSnapshot } from "./LoggingGlobals"; -import FakeTelemetryTarget from "./FakeTelemetryTarget"; - -describe("Apply the default console log patch", () => { - const restoreConsole = consoleSnapshot(); - const capturedStdout = captureStream(process.stdout); - - beforeEach("capture stdout", () => capturedStdout.hook()); - beforeEach("apply console patch", () => LogPatch.patchConsole()); - afterEach("remove console patch", () => restoreConsole()); - afterEach("unhook stdout", () => capturedStdout.unhook()); - - it("should have four tab-separated fields on a normal line", () => { - console.log("anything"); - capturedStdout.captured().should.match(/.*\t.*\t.*\t.*\n/); - }); - - it("should have five tab-separated fields when logging an error", () => { - console.error("message", Errors.toFormatted(new Error("garbage"))); - capturedStdout.captured().should.match(/.*\t.*\t.*\t.*\t.*\n/); - }); - - describe("When the global requestId is set", () => { - const EXPECTED_ID = "some fake request id"; - - beforeEach("set the request id", () => { - LogPatch.setCurrentRequestId(EXPECTED_ID); - }); - afterEach("unset the request id", () => { - LogPatch.setCurrentRequestId(undefined); - }); - - it("should include the requestId as the second field", () => { - console.info("something"); - capturedStdout - .captured() - .should.match(new RegExp(`.*\t${EXPECTED_ID}\t.*\t.*\n`)); - }); - }); - - it("should include the level field as the third field", () => { - console.warn("content"); - capturedStdout.captured().should.match(new RegExp(`.*\t.*\tWARN\t.*\n`)); - }); - - it("should include the message as the fourth field", () => { - const message = "my turbo message"; - console.trace(message); - capturedStdout - .captured() - .should.match(new RegExp(`.*\t.*\t.*\t${message}\n`)); - }); - - describe("Each console.* method should include a level value", () => { - it("should use INFO for console.log", () => { - console.log("hello"); - capturedStdout.captured().should.containEql("INFO"); - }); - - it("should use INFO for console.info", () => { - console.info("hello"); - capturedStdout.captured().should.containEql("INFO"); - }); - - it("should use WARN for console.warn", () => { - console.warn("hello"); - capturedStdout.captured().should.containEql("WARN"); - }); - - it("should use ERROR for console.error", () => { - console.error("hello"); - capturedStdout.captured().should.containEql("ERROR"); - }); - - it("should use TRACE for console.trace", () => { - console.trace("hello"); - capturedStdout.captured().should.containEql("TRACE"); - }); - - it("should use FATAL for console.fatal", () => { - (console as any).fatal("hello"); - capturedStdout.captured().should.containEql("FATAL"); - }); - }); - - it("should log an error as json", () => { - const expected = new Errors.ExtendedError("some error"); - expected.code = 1234; - expected.custom = "my custom field"; - - console.error("message", Errors.toFormatted(expected)); - - const errorString = capturedStdout.captured().split("\t")[4]; - const recoveredError = JSON.parse(errorString); - - recoveredError.should.have.property("errorType", expected.name); - recoveredError.should.have.property("errorMessage", expected.message); - recoveredError.should.have.property("stack", expected.stack?.split("\n")); - recoveredError.should.have.property("code", expected.code); - recoveredError.should.have.property("custom", expected.custom); - }); -}); - -describe("The multiline log patch", () => { - const restoreConsole = consoleSnapshot(); - const telemetryTarget = new FakeTelemetryTarget(); - - beforeEach("create a new telemetry file and patch the console", () => { - telemetryTarget.openFile(); - telemetryTarget.updateEnv(); - LogPatch.patchConsole(); - }); - afterEach("close the telemetry file and unpatch the console", () => { - restoreConsole(); - telemetryTarget.closeFile(); - }); - - it("should clear the telemetry env var", () => { - should.not.exist(process.env["_LAMBDA_TELEMETRY_LOG_FD"]); - }); - - it("should write a line", () => { - console.log("a line"); - telemetryTarget.readLine().should.containEql("a line"); - }); - - it("should have four tab-separated fields on a normal line", () => { - console.log("anything"); - telemetryTarget.readLine().should.match(/.*\t.*\t.*\t.*/); - }); - - it("should end with a newline", () => { - console.log("lol"); - telemetryTarget.readLine().should.match(/.*\n$/); - }); - - it("should have five tab-separated fields when logging an error", () => { - console.error("message", Errors.toFormatted(new Error("garbage"))); - telemetryTarget.readLine().should.match(/.*\t.*\t.*\t.*\t.*/); - }); - - describe("When the global requestId is set", () => { - const EXPECTED_ID = "some fake request id"; - - beforeEach("set the request id", () => { - LogPatch.setCurrentRequestId(EXPECTED_ID); - }); - afterEach("unset the request id", () => { - LogPatch.setCurrentRequestId(EXPECTED_ID); - }); - - it("should include the requestId as the second field", () => { - console.info("something"); - telemetryTarget - .readLine() - .should.match(new RegExp(`.*\t${EXPECTED_ID}\t.*\t.*`)); - }); - }); - - it("should include the level field as the third field", () => { - console.warn("content"); - telemetryTarget.readLine().should.match(new RegExp(`.*\t.*\tWARN\t.*`)); - }); - - it("should include the message as the fourth field", () => { - const message = "my turbo message"; - console.trace(message); - telemetryTarget - .readLine() - .should.match(new RegExp(`.*\t.*\t.*\t${message}`)); - }); - - describe("Each console.* method should include a level value", () => { - it("should use INFO for console.log", () => { - console.log("hello"); - telemetryTarget.readLine().should.containEql("INFO"); - }); - - it("should use INFO for console.info", () => { - console.info("hello"); - telemetryTarget.readLine().should.containEql("INFO"); - }); - - it("should use WARN for console.warn", () => { - console.warn("hello"); - telemetryTarget.readLine().should.containEql("WARN"); - }); - - it("should use ERROR for console.error", () => { - console.error("hello"); - telemetryTarget.readLine().should.containEql("ERROR"); - }); - - it("should use TRACE for console.trace", () => { - console.trace("hello"); - telemetryTarget.readLine().should.containEql("TRACE"); - }); - - it("should use FATAL for console.fatal", () => { - (console as any).fatal("hello"); - telemetryTarget.readLine().should.containEql("FATAL"); - }); - }); - - it("should log an error as json", () => { - const expected = new Errors.ExtendedError("some error"); - expected.code = 1234; - expected.custom = "my custom field"; - - console.error("message", Errors.toFormatted(expected)); - - const errorString = telemetryTarget.readLine().split("\t")[4]; - const recoveredError = JSON.parse(errorString); - - recoveredError.should.have.property("errorType", expected.name); - recoveredError.should.have.property("errorMessage", expected.message); - recoveredError.should.have.property("stack", expected.stack?.split("\n")); - recoveredError.should.have.property("code", expected.code); - recoveredError.should.have.property("custom", expected.custom); - }); -}); diff --git a/test/unit/utils/LoggingGlobals.ts b/test/unit/utils/LoggingGlobals.ts deleted file mode 100644 index 0d89943..0000000 --- a/test/unit/utils/LoggingGlobals.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable prefer-rest-params */ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; - -/** - * Testing logging in unit tests requires manipulating the global console and - * stdout objects. - * This module provides methods for safely capturing and restoring these - * objects under test. - */ - -export const consoleSnapshot = (): (() => void) => { - const log = console.log; - const debug = console.debug; - const info = console.info; - const warn = console.warn; - const error = console.error; - const trace = console.trace; - const fatal = (console as any).fatal; - - return function restoreConsole() { - console.log = log; - console.debug = debug; - console.info = info; - console.warn = warn; - console.error = error; - console.trace = trace; - (console as any).fatal = fatal; - }; -}; - -interface CapturedStream { - hook: () => void; - unhook: () => any; - captured: () => string; -} - -/** - * Capture all of the writes to a given stream. - */ -export const captureStream = function captureStream( - stream: NodeJS.WritableStream -): CapturedStream { - const originalWrite: any = stream.write; - let buf = ""; - return { - hook: () => { - buf = ""; // reset the buffer - stream.write = function (chunk: any): boolean { - buf += chunk.toString(); - return originalWrite.apply(stream, arguments); - }; - }, - unhook: () => (stream.write = originalWrite), - captured: () => buf, - }; -}; diff --git a/test/unit/utils/NoOpNativeHttp.ts b/test/unit/utils/NoOpNativeHttp.ts deleted file mode 100644 index 659aec2..0000000 --- a/test/unit/utils/NoOpNativeHttp.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -import { NativeClient, InvocationResponse } from "../../../src/Common"; - -export class NoOpNativeHttp implements NativeClient { - done(): void { - /*NoOp*/ - } - error(): void { - /*NoOp*/ - } - next(): Promise { - return Promise.resolve(null as any); - } - initializeClient(_userAgent: string): void { - /*NoOp*/ - } -} diff --git a/test/unit/utils/StubHttp.ts b/test/unit/utils/StubHttp.ts deleted file mode 100644 index eb0b493..0000000 --- a/test/unit/utils/StubHttp.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -import { RequestOptions, ClientRequest } from "http"; -import { URL } from "url"; - -/** - * Stub request object. - * Provides no-op definitions of the request functions used by the Runtime Interface Client. - */ -export const noOpRequest = Object.freeze({ - /* no op, return itself to allow continuations/chaining */ - on: () => noOpRequest, - /* no op, return itself to allow continuations/chaninig */ - end: () => noOpRequest, -}); - -export class StubHttp { - lastUsedOptions: RequestOptions | string | URL; - Agent: any; - - constructor() { - this.lastUsedOptions = {}; - this.Agent = class FakeAgent {}; - } - - request(options: RequestOptions | string | URL): ClientRequest { - this.lastUsedOptions = options; - return (noOpRequest as unknown) as ClientRequest; - } -} diff --git a/test/utils/StdoutReporter.ts b/test/util/StdoutReporter.test.js similarity index 68% rename from test/utils/StdoutReporter.ts rename to test/util/StdoutReporter.test.js index c59a068..944ed92 100644 --- a/test/utils/StdoutReporter.ts +++ b/test/util/StdoutReporter.test.js @@ -1,33 +1,28 @@ -/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ - -"use strict"; +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ -import { MochaOptions, Runner, reporters } from "mocha"; +'use strict'; +const Mocha = require('mocha'); const { - EVENT_SUITE_BEGIN, - EVENT_SUITE_END, EVENT_RUN_BEGIN, EVENT_RUN_END, - EVENT_TEST_PASS, EVENT_TEST_FAIL, -} = Runner.constants; + EVENT_TEST_PASS, + EVENT_SUITE_BEGIN, + EVENT_SUITE_END, +} = Mocha.Runner.constants; /** * Custom reporter does not depend on any of the console.* functions, which * enables clean test output even when applying the lambda-runtime console * patch. */ -module.exports = class StdoutReporter extends reporters.Base { - private _alreadyWritten: boolean; - private _report: string; - private _indents: number; - - public constructor(runner: Runner, options: MochaOptions) { - super(runner, options); - +module.exports = class StdoutReporter { + constructor(runner) { this._alreadyWritten = false; - this._report = ""; + this._report = ''; this._indents = 0; const stats = runner.stats; @@ -46,27 +41,27 @@ module.exports = class StdoutReporter extends reporters.Base { .on(EVENT_TEST_FAIL, (test, err) => { this.log(`✗ ${test.title}`); this.increaseIndent(); - err.stack.split("\n").forEach((msg) => this.log(msg)); + err.stack.split('\n').forEach((msg) => this.log(msg)); this.decreaseIndent(); }) .once(EVENT_RUN_END, () => { this.log( - "Results " + + 'Results ' + stats.passes + - " passed out of " + + ' passed out of ' + (stats.passes + stats.failures) + - " total tests" + ' total tests', ); this.dumpReport(); }); // This is hella nice if Mocha crashes for some reason // (which turns out is easy to do if you fool around with console.log) - process.on("exit", () => this.dumpReport()); + process.on('exit', () => this.dumpReport()); } indent() { - return Array(this._indents).join(" "); + return Array(this._indents).join(' '); } increaseIndent() { diff --git a/tsconfig-base.json b/tsconfig-base.json deleted file mode 100644 index 485043f..0000000 --- a/tsconfig-base.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - - // As recmmoneded in https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping#node-10 - "target": "es2018", - "module": "commonjs", - "lib": ["es2018"], - "moduleResolution": "node", - "declaration": true, - "declarationMap": true, - "inlineSourceMap": true, - "esModuleInterop": true, - - "strict": true /* Enable all strict type-checking options. */, - - /* Additional Checks */ - "noUnusedLocals": true /* Report errors on unused locals. */, - "noUnusedParameters": true /* Report errors on unused parameters. */, - "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, - "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, - - /* Debugging Options */ - "traceResolution": false /* Report module resolution log messages. */, - "listEmittedFiles": false /* Print names of generated files part of the compilation. */, - "listFiles": false /* Print names of files part of the compilation. */, - "pretty": true /* Stylize errors and messages using color and context. */, - - "typeRoots": ["node_modules/@types", "src/types", "lib/types"] - } -} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 516e347..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "files": [], - "references": [ - { "path": "./src" }, - { "path": "./test/unit" }, - ] -} \ No newline at end of file