diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index faed59562..000000000 --- a/.eslintignore +++ /dev/null @@ -1,12 +0,0 @@ -lib -dev -node_modules -/coverage/ -/docgen/ -/v1/ -/v2/ -/logger/ -/dist/ -/spec/fixtures -/scripts/**/*.js -/protos/ diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index f225e5960..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,70 +0,0 @@ -module.exports = { - env: { - es6: true, - node: true, - }, - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/recommended-requiring-type-checking", - "plugin:jsdoc/recommended", - "google", - "prettier", - ], - rules: { - "jsdoc/newline-after-description": "off", - "jsdoc/require-jsdoc": ["warn", { publicOnly: true }], - "no-restricted-globals": ["error", "name", "length"], - "prefer-arrow-callback": "error", - "prettier/prettier": "error", - "require-atomic-updates": "off", // This rule is so noisy and isn't useful: https://github.com/eslint/eslint/issues/11899 - "require-jsdoc": "off", // This rule is deprecated and superseded by jsdoc/require-jsdoc. - "valid-jsdoc": "off", // This is deprecated but included in recommended configs. - - "no-prototype-builtins": "warn", - "no-useless-escape": "warn", - "prefer-promise-reject-errors": "warn", - }, - overrides: [ - { - files: ["*.ts"], - rules: { - "jsdoc/require-param-type": "off", - "jsdoc/require-returns-type": "off", - - // Google style guide allows us to omit trivial parameters and returns - "jsdoc/require-param": "off", - "jsdoc/require-returns": "off", - - "@typescript-eslint/no-invalid-this": "error", - "@typescript-eslint/no-unused-vars": "error", // Unused vars should not exist. - "@typescript-eslint/no-misused-promises": "warn", // rule does not work with async handlers for express. - "no-invalid-this": "off", // Turned off in favor of @typescript-eslint/no-invalid-this. - "no-unused-vars": "off", // Off in favor of @typescript-eslint/no-unused-vars. - eqeqeq: ["error", "always", { null: "ignore" }], - camelcase: ["error", { properties: "never" }], // snake_case allowed in properties iif to satisfy an external contract / style - - // Ideally, all these warning should be error - let's fix them in the future. - "@typescript-eslint/no-unsafe-argument": "warn", - "@typescript-eslint/no-unsafe-assignment": "warn", - "@typescript-eslint/no-unsafe-call": "warn", - "@typescript-eslint/no-unsafe-member-access": "warn", - "@typescript-eslint/no-unsafe-return": "warn", - "@typescript-eslint/restrict-template-expressions": "warn", - }, - }, - { - files: ["*.spec.*"], - env: { - mocha: true, - }, - rules: {}, - }, - ], - globals: {}, - parserOptions: { - project: "tsconfig.json", - }, - plugins: ["prettier", "@typescript-eslint", "jsdoc"], - parser: "@typescript-eslint/parser", -}; diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 75dfe190d..93fc3fb26 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -24,7 +24,7 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - run: npm ci - - run: npm run lint + - run: npm run check unit: runs-on: ubuntu-latest strategy: diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 2011321b8..000000000 --- a/.prettierignore +++ /dev/null @@ -1,4 +0,0 @@ -/node_modules -/lib/**/* -/CONTRIBUTING.md -/docgen \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js deleted file mode 100644 index d7a429f94..000000000 --- a/.prettierrc.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - printWidth: 100, -}; \ No newline at end of file diff --git a/biome.json b/biome.json new file mode 100644 index 000000000..5b1256702 --- /dev/null +++ b/biome.json @@ -0,0 +1,88 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.2.5/schema.json", + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 2, + "lineWidth": 100 + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "correctness": { + "noUnusedVariables": "error", + "noUndeclaredVariables": "off" + }, + "style": { + "useObjectHasOwn": "off", + "useConst": "off", + "useBlockStatements": "off", + "useSelfClosingElements": "off", + "useTemplate": "warn" + }, + "suspicious": { + "noExtraNonNullAssertion": "warn", + "noTsIgnore": "warn", + "useAdjacentOverloadSignatures": "warn", + "noImplicitAnyLet": "warn", + "noAssignInExpressions": "warn", + "noThenProperty": "warn", + "noShadowRestrictedNames": "warn", + "useIterableCallbackReturn": "warn" + } + } + }, + "javascript": { + "formatter": { + "quoteStyle": "double", + "jsxQuoteStyle": "double", + "quoteProperties": "asNeeded", + "trailingCommas": "es5", + "semicolons": "always", + "arrowParentheses": "always" + }, + "globals": ["console", "process", "module", "require", "exports", "__dirname", "__filename"], + "parser": { + "unsafeParameterDecoratorsEnabled": true + } + }, + "overrides": [ + { + "includes": ["**/*.spec.ts", "**/*.spec.js"], + "javascript": { + "globals": ["describe", "it", "before", "after", "beforeEach", "afterEach"] + } + }, + { + "includes": ["docgen/**/*.ts"], + "linter": { + "enabled": false + } + }, + { + "includes": ["spec/fixtures/credential/unparsable.key.json"], + "formatter": { + "enabled": false + }, + "linter": { + "enabled": false + } + }, + { + "includes": ["spec/fixtures/**"], + "formatter": { + "enabled": false + }, + "linter": { + "enabled": false + } + } + ], + "assist": { + "enabled": false + }, + "files": { + "includes": ["src/**/*.{ts,js}", "spec/**/*.{ts,js}"] + } +} diff --git a/package-lock.json b/package-lock.json index f865797b0..24770caff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "firebase-functions": "lib/bin/firebase-functions.js" }, "devDependencies": { + "@biomejs/biome": "^2.2.5", "@firebase/api-documenter": "^0.2.0", "@microsoft/api-documenter": "^7.13.45", "@microsoft/api-extractor": "^7.18.7", @@ -31,17 +32,10 @@ "@types/node": "^14.18.24", "@types/node-fetch": "^3.0.3", "@types/sinon": "^9.0.11", - "@typescript-eslint/eslint-plugin": "^5.33.1", - "@typescript-eslint/parser": "^5.33.1", "api-extractor-model-me": "^0.1.1", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "child-process-promise": "^2.2.1", - "eslint": "^8.6.0", - "eslint-config-google": "^0.14.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-jsdoc": "^39.2.9", - "eslint-plugin-prettier": "^4.0.0", "firebase-admin": "^13.0.0", "genkit": "^1.0.0-rc.4", "jsdom": "^16.2.1", @@ -53,7 +47,6 @@ "nock": "^13.2.9", "node-fetch": "^2.6.7", "portfinder": "^1.0.28", - "prettier": "^2.7.1", "protobufjs-cli": "^1.1.1", "semver": "^7.3.5", "sinon": "^9.2.4", @@ -115,141 +108,179 @@ "node": ">=6.9.0" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "node_modules/@biomejs/biome": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.2.5.tgz", + "integrity": "sha512-zcIi+163Rc3HtyHbEO7CjeHq8DjQRs40HsGbW6vx2WI0tg8mYQOPouhvHSyEnCBAorfYNnKdR64/IxO7xQ5faw==", "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" + "license": "MIT OR Apache-2.0", + "bin": { + "biome": "bin/biome" }, "engines": { - "node": ">=12" + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "2.2.5", + "@biomejs/cli-darwin-x64": "2.2.5", + "@biomejs/cli-linux-arm64": "2.2.5", + "@biomejs/cli-linux-arm64-musl": "2.2.5", + "@biomejs/cli-linux-x64": "2.2.5", + "@biomejs/cli-linux-x64-musl": "2.2.5", + "@biomejs/cli-win32-arm64": "2.2.5", + "@biomejs/cli-win32-x64": "2.2.5" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.2.5.tgz", + "integrity": "sha512-MYT+nZ38wEIWVcL5xLyOhYQQ7nlWD0b/4mgATW2c8dvq7R4OQjt/XGXFkXrmtWmQofaIM14L7V8qIz/M+bx5QQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" } }, - "node_modules/@es-joy/jsdoccomment": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.36.1.tgz", - "integrity": "sha512-922xqFsTpHs6D0BUiG4toiyPOMc8/jafnWKxz1KWgS4XzKPy2qXf1Pe6UFuNSCQqt6tOuhAWXBNuuyUhJmw9Vg==", + "node_modules/@biomejs/cli-darwin-x64": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.2.5.tgz", + "integrity": "sha512-FLIEl73fv0R7dI10EnEiZLw+IMz3mWLnF95ASDI0kbx6DDLJjWxE5JxxBfmG+udz1hIDd3fr5wsuP7nwuTRdAg==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "comment-parser": "1.3.1", - "esquery": "^1.4.0", - "jsdoc-type-pratt-parser": "~3.1.0" - }, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": "^14 || ^16 || ^17 || ^18 || ^19" + "node": ">=14.21.3" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "node_modules/@biomejs/cli-linux-arm64": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.2.5.tgz", + "integrity": "sha512-5DjiiDfHqGgR2MS9D+AZ8kOfrzTGqLKywn8hoXpXXlJXIECGQ32t+gt/uiS2XyGBM2XQhR6ztUvbjZWeccFMoQ==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + "node": ">=14.21.3" } }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.2.5.tgz", + "integrity": "sha512-5Ov2wgAFwqDvQiESnu7b9ufD1faRa+40uwrohgBopeY84El2TnBDoMNXx6iuQdreoFGjwW8vH6k68G21EpNERw==", + "cpu": [ + "arm64" + ], "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "node": ">=14.21.3" } }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "node_modules/@biomejs/cli-linux-x64": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.2.5.tgz", + "integrity": "sha512-fq9meKm1AEXeAWan3uCg6XSP5ObA6F/Ovm89TwaMiy1DNIwdgxPkNwxlXJX8iM6oRbFysYeGnT0OG8diCWb9ew==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=14.21.3" } }, - "node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.2.5.tgz", + "integrity": "sha512-AVqLCDb/6K7aPNIcxHaTQj01sl1m989CJIQFQEaiQkGr2EQwyOpaATJ473h+nXDUuAcREhccfRpe/tu+0wu0eQ==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" } }, - "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/@biomejs/cli-win32-arm64": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.2.5.tgz", + "integrity": "sha512-xaOIad4wBambwJa6mdp1FigYSIF9i7PCqRbvBqtIi9y29QtPVQ13sDGtUnsRoe6SjL10auMzQ6YAe+B3RpZXVg==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" } }, - "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/@biomejs/cli-win32-x64": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.2.5.tgz", + "integrity": "sha512-F/jhuXCssPFAuciMhHKk00xnCAxJRS/pUzVfXYmOMUp//XW7mO6QeCjsjvnm8L4AO/dG2VOB0O+fJPiJ2uXtIw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": "*" + "node": ">=14.21.3" } }, - "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" } }, "node_modules/@fastify/busboy": { @@ -702,41 +733,6 @@ "node": ">=12" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true - }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", @@ -1148,41 +1144,6 @@ "integrity": "sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw==", "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/@opentelemetry/api": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", @@ -2652,12 +2613,6 @@ "node": ">= 0.12" } }, - "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true - }, "node_modules/@types/send": { "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", @@ -2705,200 +2660,6 @@ "dev": true, "optional": true }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", - "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", - "dev": true, - "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.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 - } - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", - "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "debug": "^4.3.4" - }, - "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 - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.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.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", - "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "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_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "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" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.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" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz", - "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==", - "dev": true - }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -3240,15 +3001,6 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, - "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==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/arrify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", @@ -3490,15 +3242,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", @@ -3712,15 +3455,6 @@ "node": "^12.20.0 || >=14" } }, - "node_modules/comment-parser": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", - "integrity": "sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==", - "dev": true, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -3919,30 +3653,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", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/domexception": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", @@ -4139,141 +3849,6 @@ "node": ">=4.0" } }, - "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-google": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/eslint-config-google/-/eslint-config-google-0.14.0.tgz", - "integrity": "sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "eslint": ">=5.16.0" - } - }, - "node_modules/eslint-config-prettier": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", - "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", - "dev": true, - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-plugin-jsdoc": { - "version": "39.9.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-39.9.1.tgz", - "integrity": "sha512-Rq2QY6BZP2meNIs48aZ3GlIlJgBqFCmR55+UBvaDkA3ZNQ0SvQXOs2QKkubakEijV8UbIVbVZKsOVN8G3MuqZw==", - "dev": true, - "dependencies": { - "@es-joy/jsdoccomment": "~0.36.1", - "comment-parser": "1.3.1", - "debug": "^4.3.4", - "escape-string-regexp": "^4.0.0", - "esquery": "^1.4.0", - "semver": "^7.3.8", - "spdx-expression-parse": "^3.0.1" - }, - "engines": { - "node": "^14 || ^16 || ^17 || ^18 || ^19" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "node_modules/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, - "dependencies": { - "prettier-linter-helpers": "^1.0.0" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" - }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } - } - }, - "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.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -4286,112 +3861,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/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/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/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/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/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -4422,57 +3891,6 @@ "node": ">=4" } }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -4579,46 +3997,6 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "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.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/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/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 - }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", @@ -4648,15 +4026,6 @@ "fxparser": "src/cli/cli.js" } }, - "node_modules/fastq": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz", - "integrity": "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, "node_modules/faye-websocket": { "version": "0.11.4", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", @@ -4692,18 +4061,6 @@ "node": "^12.20 || >= 14.13" } }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -4811,26 +4168,6 @@ "flat": "cli.js" } }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", - "dev": true - }, "node_modules/form-data": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.2.tgz", @@ -5080,18 +4417,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/glob/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -5113,41 +4438,6 @@ "node": ">=10" } }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "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==", - "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" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/google-auth-library": { "version": "9.15.0", "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.15.0.tgz", @@ -5220,12 +4510,6 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "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/gtoken": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", @@ -5413,37 +4697,12 @@ "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/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "safer-buffer": ">= 2.1.2 < 3" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, "node_modules/import-in-the-middle": { @@ -5467,15 +4726,6 @@ "node": ">=8" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -5566,15 +4816,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -5692,15 +4933,6 @@ "node": ">=12.0.0" } }, - "node_modules/jsdoc-type-pratt-parser": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-3.1.0.tgz", - "integrity": "sha512-MgtD0ZiCDk9B+eI73BextfRrVQl0oyzRG8B2BjORts6jbunj4ScKPcyXGTbB6eXL4y9TzxCm6hyeLq/2ASzNdw==", - "dev": true, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/jsdoc/node_modules/escape-string-regexp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", @@ -5802,12 +5034,6 @@ "bignumber.js": "^9.0.0" } }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -5820,12 +5046,6 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -5951,15 +5171,6 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, "node_modules/klaw": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", @@ -5969,19 +5180,6 @@ "graceful-fs": "^4.1.9" } }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/limiter": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.5.tgz", @@ -6239,15 +5437,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -6256,19 +5445,6 @@ "node": ">= 0.6" } }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/mime": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", @@ -6531,18 +5707,6 @@ "thenify-all": "^1.0.0" } }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "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==", - "dev": true - }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -6736,23 +5900,6 @@ "wrappy": "1" } }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "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.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -6792,18 +5939,6 @@ "node": ">=6" } }, - "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/parse5": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", @@ -6833,24 +5968,6 @@ "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": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "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-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -6862,15 +5979,6 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" }, - "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/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -6915,42 +6023,6 @@ "ms": "^2.1.1" } }, - "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.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" - } - }, - "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/promise-polyfill": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.1.0.tgz", @@ -7189,26 +6261,6 @@ "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", "dev": true }, - "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", @@ -7346,15 +6398,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "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.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", @@ -7380,88 +6423,6 @@ "node": ">=14" } }, - "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==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "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.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -7599,27 +6560,6 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, - "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/shimmer": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", @@ -7734,15 +6674,6 @@ "node": ">=8" } }, - "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/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -7752,28 +6683,6 @@ "node": ">=0.10.0" } }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.21", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", - "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", - "dev": true - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -7992,12 +6901,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -8160,39 +7063,6 @@ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "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/tsutils/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/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-detect": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", @@ -8202,18 +7072,6 @@ "node": ">=4" } }, - "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/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", diff --git a/package.json b/package.json index 9b1a91b18..c1b452c21 100644 --- a/package.json +++ b/package.json @@ -257,13 +257,13 @@ "build:release": "npm ci --production && npm install --no-save typescript && tsc -p tsconfig.release.json", "build": "tsc -p tsconfig.release.json", "build:watch": "npm run build -- -w", - "format": "npm run format:ts && npm run format:other", - "format:other": "npm run lint:other -- --write", - "format:ts": "npm run lint:ts -- --fix --quiet", - "lint": "npm run lint:ts && npm run lint:other", - "lint:other": "prettier --check '**/*.{md,yaml,yml}'", - "lint:quiet": "npm run lint:ts -- --quiet && npm run lint:other", - "lint:ts": "eslint --config .eslintrc.js --ext .ts,.js .", + "check": "biome check src spec", + "check:quiet": "npm run check -- --quiet", + "fix": "npm run check -- --write", + "lint": "npm run check", + "lint:quiet": "npm run check:quiet", + "lint:fix": "npm run fix", + "format": "npm run fix", "test": "mocha --file ./mocha/setup.ts \"spec/**/*.spec.ts\"", "test:bin": "./scripts/bin-test/run.sh", "test:postmerge": "./integration_test/run_tests.sh" @@ -288,17 +288,10 @@ "@types/node": "^14.18.24", "@types/node-fetch": "^3.0.3", "@types/sinon": "^9.0.11", - "@typescript-eslint/eslint-plugin": "^5.33.1", - "@typescript-eslint/parser": "^5.33.1", "api-extractor-model-me": "^0.1.1", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "child-process-promise": "^2.2.1", - "eslint": "^8.6.0", - "eslint-config-google": "^0.14.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-jsdoc": "^39.2.9", - "eslint-plugin-prettier": "^4.0.0", "firebase-admin": "^13.0.0", "genkit": "^1.0.0-rc.4", "jsdom": "^16.2.1", @@ -310,14 +303,14 @@ "nock": "^13.2.9", "node-fetch": "^2.6.7", "portfinder": "^1.0.28", - "prettier": "^2.7.1", "protobufjs-cli": "^1.1.1", "semver": "^7.3.5", "sinon": "^9.2.4", "ts-node": "^10.4.0", "typescript": "^4.3.5", "yaml": "^2.8.1", - "yargs": "^15.3.1" + "yargs": "^15.3.1", + "@biomejs/biome": "^2.2.5" }, "peerDependencies": { "firebase-admin": "^11.10.0 || ^12.0.0 || ^13.0.0" diff --git a/spec/common/config.spec.ts b/spec/common/config.spec.ts index 004be249a..4dc0f2747 100644 --- a/spec/common/config.spec.ts +++ b/spec/common/config.spec.ts @@ -21,8 +21,8 @@ // SOFTWARE. import { expect } from "chai"; -import * as fs from "fs"; -import * as process from "process"; +import * as fs from "node:fs"; +import * as process from "node:process"; import * as sinon from "sinon"; import { firebaseConfig, resetCache } from "../../src/common/config"; diff --git a/spec/common/metaprogramming.ts b/spec/common/metaprogramming.ts index 11909ede8..d7e227f53 100644 --- a/spec/common/metaprogramming.ts +++ b/spec/common/metaprogramming.ts @@ -22,4 +22,4 @@ // This method will fail to compile if value is not of the explicit parameter type. /* eslint-disable @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function */ export function expectType(value: Type) {} -export function expectNever() {} +export function expectNever<_Type extends never>() {} diff --git a/spec/common/options.ts b/spec/common/options.ts index 1e49863c4..9ca0181b1 100644 --- a/spec/common/options.ts +++ b/spec/common/options.ts @@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE ignoreUnusedWarning OR OTHER DEALINGS IN THE // SOFTWARE. -import { ResettableKeys, ResetValue } from "../../src/common/options"; +import type { ResettableKeys, ResetValue } from "../../src/common/options"; import { expectNever, expectType } from "./metaprogramming"; describe("ResettableKeys", () => { diff --git a/spec/common/params.spec.ts b/spec/common/params.spec.ts index 595a5758f..54db79205 100644 --- a/spec/common/params.spec.ts +++ b/spec/common/params.spec.ts @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE ignoreUnusedWarning OR OTHER DEALINGS IN THE // SOFTWARE. -import { Extract, ParamsOf, Split } from "../../src/common/params"; +import type { Extract, ParamsOf, Split } from "../../src/common/params"; import { expectNever, expectType } from "./metaprogramming"; describe("Params namespace", () => { diff --git a/spec/common/providers/https.spec.ts b/spec/common/providers/https.spec.ts index 9dc42b504..1b4db5d9b 100644 --- a/spec/common/providers/https.spec.ts +++ b/spec/common/providers/https.spec.ts @@ -1,8 +1,8 @@ import { expect } from "chai"; -import { App, initializeApp } from "firebase-admin/app"; +import { type App, initializeApp } from "firebase-admin/app"; import * as appCheck from "firebase-admin/app-check"; +import type * as nock from "nock"; import * as sinon from "sinon"; -import * as nock from "nock"; import { getApp, setApp } from "../../../src/common/app"; import * as debug from "../../../src/common/debug"; @@ -18,7 +18,12 @@ import { mockFetchPublicKeys, mockRequest, } from "../../fixtures/mockrequest"; -import { checkAppCheckContext, checkAuthContext, runHandler, RunHandlerResult } from "../../helper"; +import { + checkAppCheckContext, + checkAuthContext, + type RunHandlerResult, + runHandler, +} from "../../helper"; /** * A CallTest is a specification for a test of a callable function that diff --git a/spec/common/providers/identity.spec.ts b/spec/common/providers/identity.spec.ts index 253a337b2..c2db0298c 100644 --- a/spec/common/providers/identity.spec.ts +++ b/spec/common/providers/identity.spec.ts @@ -21,7 +21,7 @@ // SOFTWARE. import { expect } from "chai"; -import * as express from "express"; +import type * as express from "express"; import * as identity from "../../../src/common/providers/identity"; const EVENT = "EVENT_TYPE"; @@ -920,7 +920,7 @@ describe("identity", () => { it("should not return recaptchaActionOverride if undefined", () => { const payload = identity.generateResponsePayload(TEST_RESPONSE_RECAPTCHA_UNDEFINED); - expect(payload.hasOwnProperty("recaptchaActionOverride")).to.be.false; + expect(Object.prototype.hasOwnProperty.call(payload, "recaptchaActionOverride")).to.be.false; expect(payload).to.deep.equal(EXPECT_PAYLOAD_UNDEFINED); }); }); diff --git a/spec/common/providers/tasks.spec.ts b/spec/common/providers/tasks.spec.ts index ce2497faf..7b4617fba 100644 --- a/spec/common/providers/tasks.spec.ts +++ b/spec/common/providers/tasks.spec.ts @@ -21,11 +21,15 @@ // SOFTWARE. import { expect } from "chai"; -import { App, initializeApp } from "firebase-admin/app"; +import { type App, initializeApp } from "firebase-admin/app"; import { getApp, setApp } from "../../../src/common/app"; import * as https from "../../../src/common/providers/https"; -import { onDispatchHandler, Request, TaskContext } from "../../../src/common/providers/tasks"; +import { + onDispatchHandler, + type Request, + type TaskContext, +} from "../../../src/common/providers/tasks"; import * as mocks from "../../fixtures/credential/key.json"; import { generateIdToken, generateUnsignedIdToken, mockRequest } from "../../fixtures/mockrequest"; import { checkAuthContext, runHandler } from "../../helper"; @@ -47,7 +51,7 @@ interface TaskTest { } // Runs a TaskTest test. -export async function runTaskTest(test: TaskTest): Promise { +async function runTaskTest(test: TaskTest): Promise { const taskQueueFunctionV1 = onDispatchHandler(async (data, context) => { expect(data).to.deep.equal(test.expectedData); if (test.taskFunction) { diff --git a/spec/fixtures.ts b/spec/fixtures.ts index ddc2084fd..ace63b547 100644 --- a/spec/fixtures.ts +++ b/spec/fixtures.ts @@ -19,8 +19,9 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { ManifestEndpoint } from "../src/runtime/manifest"; + import { RESET_VALUE } from "../src/common/options"; +import type { ManifestEndpoint } from "../src/runtime/manifest"; export const MINIMAL_V2_ENDPOINT: ManifestEndpoint = { availableMemoryMb: RESET_VALUE, diff --git a/spec/helper.ts b/spec/helper.ts index 9df32156b..4ff458b8c 100644 --- a/spec/helper.ts +++ b/spec/helper.ts @@ -21,10 +21,10 @@ // SOFTWARE. import { expect } from "chai"; -import * as express from "express"; +import type * as express from "express"; -import * as https from "../src/common/providers/https"; -import * as tasks from "../src/common/providers/tasks"; +import type * as https from "../src/common/providers/https"; +import type * as tasks from "../src/common/providers/tasks"; /** * RunHandlerResult contains the data from an express.Response. @@ -136,7 +136,7 @@ export function checkAuthContext( expect(context.auth.token.aud).to.equal(projectId); // TaskContext & TaskRequest don't have instanceIdToken - if ({}.hasOwnProperty.call(context, "instanceIdToken")) { + if (Object.prototype.hasOwnProperty.call(context, "instanceIdToken")) { expect((context as https.CallableContext).instanceIdToken).to.be.undefined; } } diff --git a/spec/runtime/loader.spec.ts b/spec/runtime/loader.spec.ts index e67140c1b..a48737275 100644 --- a/spec/runtime/loader.spec.ts +++ b/spec/runtime/loader.spec.ts @@ -1,18 +1,17 @@ import { expect } from "chai"; -import * as path from "path"; - -import * as functions from "../../src/v1"; +import * as path from "node:path"; +import { clearParams } from "../../src/params"; +import { BooleanParam, IntParam, StringParam } from "../../src/params/types"; import * as loader from "../../src/runtime/loader"; -import { +import type { ManifestEndpoint, ManifestExtension, ManifestRequiredAPI, ManifestStack, } from "../../src/runtime/manifest"; -import { clearParams } from "../../src/params"; +import * as functions from "../../src/v1"; import { MINIMAL_V1_ENDPOINT, MINIMAL_V2_ENDPOINT } from "../fixtures"; import { MINIMAL_SCHEDULE_TRIGGER, MINIMIAL_TASK_QUEUE_TRIGGER } from "../v1/providers/fixtures"; -import { BooleanParam, IntParam, StringParam } from "../../src/params/types"; describe("extractStack", () => { const httpFn = functions.https.onRequest(() => undefined); diff --git a/spec/runtime/manifest.spec.ts b/spec/runtime/manifest.spec.ts index 7534ba2ee..e8faeb399 100644 --- a/spec/runtime/manifest.spec.ts +++ b/spec/runtime/manifest.spec.ts @@ -1,16 +1,16 @@ import { expect } from "chai"; +import { RESET_VALUE } from "../../src/common/options"; +import * as params from "../../src/params"; import { - stackToWire, - ManifestStack, - initV2ScheduleTrigger, - initV1ScheduleTrigger, initTaskQueueTrigger, + initV1ScheduleTrigger, + initV2ScheduleTrigger, + type ManifestStack, + stackToWire, } from "../../src/runtime/manifest"; -import { RESET_VALUE } from "../../src/common/options"; -import * as params from "../../src/params"; -import * as optsv2 from "../../src/v2/options"; import * as v1 from "../../src/v1"; -import { DeploymentOptions } from "../../src/v1"; +import type { DeploymentOptions } from "../../src/v1"; +import * as optsv2 from "../../src/v2/options"; describe("stackToWire", () => { afterEach(() => { diff --git a/spec/v1/cloud-functions.spec.ts b/spec/v1/cloud-functions.spec.ts index d85afbe2f..fbfd66d59 100644 --- a/spec/v1/cloud-functions.spec.ts +++ b/spec/v1/cloud-functions.spec.ts @@ -23,11 +23,11 @@ import { expect } from "chai"; import { - onInit, - Event, - EventContext, + type Event, + type EventContext, + type MakeCloudFunctionArgs, makeCloudFunction, - MakeCloudFunctionArgs, + onInit, RESET_VALUE, } from "../../src/v1"; import { MINIMAL_V1_ENDPOINT } from "../fixtures"; diff --git a/spec/v1/config.spec.ts b/spec/v1/config.spec.ts index 97d7b6faa..72f21da69 100644 --- a/spec/v1/config.spec.ts +++ b/spec/v1/config.spec.ts @@ -21,8 +21,8 @@ // SOFTWARE. import { expect } from "chai"; -import * as fs from "fs"; -import * as process from "process"; +import * as fs from "node:fs"; +import * as process from "node:process"; import * as sinon from "sinon"; import { config, resetCache } from "../../src/v1/config"; diff --git a/spec/v1/providers/analytics.spec.input.ts b/spec/v1/providers/analytics.spec.input.ts index 9edb62a4e..1db0f1b79 100644 --- a/spec/v1/providers/analytics.spec.input.ts +++ b/spec/v1/providers/analytics.spec.input.ts @@ -21,7 +21,7 @@ // SOFTWARE. /* tslint:disable:max-line-length */ -import { AnalyticsEvent } from "../../../src/v1/providers/analytics"; +import type { AnalyticsEvent } from "../../../src/v1/providers/analytics"; // A payload, as it might arrive over the wire. Every possible field is filled out at least once. export const fullPayload = JSON.parse(`{ diff --git a/spec/v1/providers/analytics.spec.ts b/spec/v1/providers/analytics.spec.ts index 98db1702f..5f157b549 100644 --- a/spec/v1/providers/analytics.spec.ts +++ b/spec/v1/providers/analytics.spec.ts @@ -23,10 +23,10 @@ import { expect } from "chai"; import * as functions from "../../../src/v1"; -import { Event } from "../../../src/v1/cloud-functions"; +import type { Event } from "../../../src/v1/cloud-functions"; import * as analytics from "../../../src/v1/providers/analytics"; -import * as analyticsSpecInput from "./analytics.spec.input"; import { MINIMAL_V1_ENDPOINT } from "../../fixtures"; +import * as analyticsSpecInput from "./analytics.spec.input"; describe("Analytics Functions", () => { describe("EventBuilder", () => { diff --git a/spec/v1/providers/auth.spec.ts b/spec/v1/providers/auth.spec.ts index ec1a793f5..3e3537581 100644 --- a/spec/v1/providers/auth.spec.ts +++ b/spec/v1/providers/auth.spec.ts @@ -21,9 +21,9 @@ // SOFTWARE. import { expect } from "chai"; -import { UserRecord } from "../../../src/common/providers/identity"; +import type { UserRecord } from "../../../src/common/providers/identity"; import * as functions from "../../../src/v1"; -import { CloudFunction, Event } from "../../../src/v1/cloud-functions"; +import type { CloudFunction, Event } from "../../../src/v1/cloud-functions"; import * as auth from "../../../src/v1/providers/auth"; import { MINIMAL_V1_ENDPOINT } from "../../fixtures"; diff --git a/spec/v1/providers/fixtures.ts b/spec/v1/providers/fixtures.ts index e047ba07f..0ddfe53aa 100644 --- a/spec/v1/providers/fixtures.ts +++ b/spec/v1/providers/fixtures.ts @@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { ManifestEndpoint } from "../../../src/runtime/manifest"; +import type { ManifestEndpoint } from "../../../src/runtime/manifest"; import * as functions from "../../../src/v1"; import * as options from "../../../src/v2/options"; diff --git a/spec/v1/providers/https.spec.ts b/spec/v1/providers/https.spec.ts index 96f54f569..ba304b7a4 100644 --- a/spec/v1/providers/https.spec.ts +++ b/spec/v1/providers/https.spec.ts @@ -21,11 +21,13 @@ // SOFTWARE. import { expect } from "chai"; - +import * as sinon from "sinon"; +import * as debug from "../../../src/common/debug"; +import { CALLABLE_AUTH_HEADER, ORIGINAL_AUTH_HEADER } from "../../../src/common/providers/https"; import * as functions from "../../../src/v1"; +import { onInit } from "../../../src/v1"; import * as https from "../../../src/v1/providers/https"; -import * as debug from "../../../src/common/debug"; -import * as sinon from "sinon"; +import { MINIMAL_V1_ENDPOINT } from "../../fixtures"; import { expectedResponseHeaders, generateUnsignedIdToken, @@ -33,9 +35,6 @@ import { mockRequest, } from "../../fixtures/mockrequest"; import { runHandler } from "../../helper"; -import { MINIMAL_V1_ENDPOINT } from "../../fixtures"; -import { CALLABLE_AUTH_HEADER, ORIGINAL_AUTH_HEADER } from "../../../src/common/providers/https"; -import { onInit } from "../../../src/v1"; describe("CloudHttpsBuilder", () => { describe("#onRequest", () => { diff --git a/spec/v1/providers/pubsub.spec.ts b/spec/v1/providers/pubsub.spec.ts index 0a7b89ad6..3b0a0ad1d 100644 --- a/spec/v1/providers/pubsub.spec.ts +++ b/spec/v1/providers/pubsub.spec.ts @@ -21,12 +21,11 @@ // SOFTWARE. import { expect } from "chai"; - -import { Event, RESET_VALUE } from "../../../src/v1"; -import { MINIMAL_V1_ENDPOINT } from "../../fixtures"; -import { MINIMAL_SCHEDULE_TRIGGER } from "./fixtures"; import * as functions from "../../../src/v1"; +import { type Event, RESET_VALUE } from "../../../src/v1"; import * as pubsub from "../../../src/v1/providers/pubsub"; +import { MINIMAL_V1_ENDPOINT } from "../../fixtures"; +import { MINIMAL_SCHEDULE_TRIGGER } from "./fixtures"; describe("Pubsub Functions", () => { describe("pubsub.Message", () => { diff --git a/spec/v1/providers/remoteConfig.spec.ts b/spec/v1/providers/remoteConfig.spec.ts index e207b5de3..a7a44c466 100644 --- a/spec/v1/providers/remoteConfig.spec.ts +++ b/spec/v1/providers/remoteConfig.spec.ts @@ -22,7 +22,7 @@ import { expect } from "chai"; import * as functions from "../../../src/v1"; -import { CloudFunction, Event } from "../../../src/v1/cloud-functions"; +import type { CloudFunction, Event } from "../../../src/v1/cloud-functions"; import * as remoteConfig from "../../../src/v1/providers/remoteConfig"; import { MINIMAL_V1_ENDPOINT } from "../../fixtures"; diff --git a/spec/v1/providers/storage.spec.ts b/spec/v1/providers/storage.spec.ts index 77f8610fc..20657665c 100644 --- a/spec/v1/providers/storage.spec.ts +++ b/spec/v1/providers/storage.spec.ts @@ -21,9 +21,9 @@ // SOFTWARE. import { expect } from "chai"; -import { Event } from "../../../src/v1"; import * as config from "../../../src/common/config"; import * as functions from "../../../src/v1"; +import type { Event } from "../../../src/v1"; import * as storage from "../../../src/v1/providers/storage"; import { MINIMAL_V1_ENDPOINT } from "../../fixtures"; diff --git a/spec/v1/providers/tasks.spec.ts b/spec/v1/providers/tasks.spec.ts index eccdd3ab8..c6bf8e891 100644 --- a/spec/v1/providers/tasks.spec.ts +++ b/spec/v1/providers/tasks.spec.ts @@ -23,12 +23,12 @@ import { expect } from "chai"; import * as functions from "../../../src/v1"; +import { runWith } from "../../../src/v1"; import { taskQueue } from "../../../src/v1/providers/tasks"; +import { MINIMAL_V1_ENDPOINT } from "../../fixtures"; import { MockRequest } from "../../fixtures/mockrequest"; import { runHandler } from "../../helper"; -import { MINIMAL_V1_ENDPOINT } from "../../fixtures"; import { MINIMIAL_TASK_QUEUE_TRIGGER } from "./fixtures"; -import { runWith } from "../../../src/v1"; describe("#onDispatch", () => { it("should return a trigger/endpoint with appropriate values", () => { diff --git a/spec/v2/providers/alerts/alerts.spec.ts b/spec/v2/providers/alerts/alerts.spec.ts index 9f69f0555..314a73bfe 100644 --- a/spec/v2/providers/alerts/alerts.spec.ts +++ b/spec/v2/providers/alerts/alerts.spec.ts @@ -1,9 +1,9 @@ import { expect } from "chai"; -import { CloudEvent, onInit } from "../../../../src/v2"; +import { type CloudEvent, onInit } from "../../../../src/v2"; import * as options from "../../../../src/v2/options"; import * as alerts from "../../../../src/v2/providers/alerts"; -import { FULL_OPTIONS } from "../fixtures"; import { FULL_ENDPOINT, MINIMAL_V2_ENDPOINT } from "../../../fixtures"; +import { FULL_OPTIONS } from "../fixtures"; const ALERT_TYPE = "new-alert-type"; const APPID = "123456789"; diff --git a/spec/v2/providers/alerts/appDistribution.spec.ts b/spec/v2/providers/alerts/appDistribution.spec.ts index 045b84448..4de0a1b21 100644 --- a/spec/v2/providers/alerts/appDistribution.spec.ts +++ b/spec/v2/providers/alerts/appDistribution.spec.ts @@ -1,9 +1,9 @@ import { expect } from "chai"; +import { onInit } from "../../../../src/v2/core"; import * as alerts from "../../../../src/v2/providers/alerts"; import * as appDistribution from "../../../../src/v2/providers/alerts/appDistribution"; -import { FULL_OPTIONS } from "../fixtures"; import { FULL_ENDPOINT, MINIMAL_V2_ENDPOINT } from "../../../fixtures"; -import { onInit } from "../../../../src/v2/core"; +import { FULL_OPTIONS } from "../fixtures"; const APPID = "123456789"; const myHandler = () => 42; diff --git a/spec/v2/providers/alerts/billing.spec.ts b/spec/v2/providers/alerts/billing.spec.ts index a0020f83b..c63f5d5e5 100644 --- a/spec/v2/providers/alerts/billing.spec.ts +++ b/spec/v2/providers/alerts/billing.spec.ts @@ -1,9 +1,9 @@ import { expect } from "chai"; +import { onInit } from "../../../../src/v2/core"; import * as alerts from "../../../../src/v2/providers/alerts"; import * as billing from "../../../../src/v2/providers/alerts/billing"; -import { FULL_OPTIONS } from "../fixtures"; import { FULL_ENDPOINT, MINIMAL_V2_ENDPOINT } from "../../../fixtures"; -import { onInit } from "../../../../src/v2/core"; +import { FULL_OPTIONS } from "../fixtures"; const ALERT_TYPE = "new-alert-type"; const myHandler = () => 42; diff --git a/spec/v2/providers/alerts/crashlytics.spec.ts b/spec/v2/providers/alerts/crashlytics.spec.ts index 496f6f10c..ab6e41710 100644 --- a/spec/v2/providers/alerts/crashlytics.spec.ts +++ b/spec/v2/providers/alerts/crashlytics.spec.ts @@ -1,9 +1,9 @@ import { expect } from "chai"; +import { onInit } from "../../../../src/v2/core"; import * as alerts from "../../../../src/v2/providers/alerts"; import * as crashlytics from "../../../../src/v2/providers/alerts/crashlytics"; -import { FULL_OPTIONS } from "../fixtures"; import { FULL_ENDPOINT, MINIMAL_V2_ENDPOINT } from "../../../fixtures"; -import { onInit } from "../../../../src/v2/core"; +import { FULL_OPTIONS } from "../fixtures"; const ALERT_TYPE = "new-alert-type"; const APPID = "123456789"; diff --git a/spec/v2/providers/alerts/performance.spec.ts b/spec/v2/providers/alerts/performance.spec.ts index 01004e3f6..17b04f679 100644 --- a/spec/v2/providers/alerts/performance.spec.ts +++ b/spec/v2/providers/alerts/performance.spec.ts @@ -1,9 +1,9 @@ import { expect } from "chai"; +import { type CloudEvent, onInit } from "../../../../src/v2/core"; import * as alerts from "../../../../src/v2/providers/alerts"; import * as performance from "../../../../src/v2/providers/alerts/performance"; -import { FULL_OPTIONS } from "../fixtures"; import { FULL_ENDPOINT, MINIMAL_V2_ENDPOINT } from "../../../fixtures"; -import { CloudEvent, onInit } from "../../../../src/v2/core"; +import { FULL_OPTIONS } from "../fixtures"; const APPID = "123456789"; const myHandler = () => 42; diff --git a/spec/v2/providers/database.spec.ts b/spec/v2/providers/database.spec.ts index 9eabf61ca..09371d2c6 100644 --- a/spec/v2/providers/database.spec.ts +++ b/spec/v2/providers/database.spec.ts @@ -22,10 +22,10 @@ import { expect } from "chai"; import { PathPattern } from "../../../src/common/utilities/path-pattern"; +import { type CloudEvent, onInit } from "../../../src/v2/core"; import * as database from "../../../src/v2/providers/database"; import { expectType } from "../../common/metaprogramming"; import { MINIMAL_V2_ENDPOINT } from "../../fixtures"; -import { CloudEvent, onInit } from "../../../src/v2/core"; const RAW_RTDB_EVENT: database.RawRTDBCloudEvent = { data: { diff --git a/spec/v2/providers/eventarc.spec.ts b/spec/v2/providers/eventarc.spec.ts index 28696319a..ac0d1d16e 100644 --- a/spec/v2/providers/eventarc.spec.ts +++ b/spec/v2/providers/eventarc.spec.ts @@ -21,11 +21,11 @@ // SOFTWARE. import { expect } from "chai"; +import { type CloudEvent, onInit } from "../../../src/v2/core"; import * as options from "../../../src/v2/options"; import * as eventarc from "../../../src/v2/providers/eventarc"; -import { FULL_OPTIONS } from "./fixtures"; import { FULL_ENDPOINT, MINIMAL_V2_ENDPOINT } from "../../fixtures"; -import { CloudEvent, onInit } from "../../../src/v2/core"; +import { FULL_OPTIONS } from "./fixtures"; const ENDPOINT_EVENT_TRIGGER = { eventType: "event-type", diff --git a/spec/v2/providers/firestore.spec.ts b/spec/v2/providers/firestore.spec.ts index e5406bdb3..4fdfd981c 100644 --- a/spec/v2/providers/firestore.spec.ts +++ b/spec/v2/providers/firestore.spec.ts @@ -21,12 +21,12 @@ // SOFTWARE. import { expect } from "chai"; -import { google } from "../../../protos/compiledFirestore"; import { Timestamp } from "firebase-admin/firestore"; -import * as firestore from "../../../src/v2/providers/firestore"; +import { google } from "../../../protos/compiledFirestore"; import { PathPattern } from "../../../src/common/utilities/path-pattern"; -import { onInit } from "../../../src/v2/core"; import * as params from "../../../src/params"; +import { onInit } from "../../../src/v2/core"; +import * as firestore from "../../../src/v2/providers/firestore"; /** static-complied protobuf */ const DocumentEventData = google.events.cloud.firestore.v1.DocumentEventData; diff --git a/spec/v2/providers/fixtures.ts b/spec/v2/providers/fixtures.ts index 1766a3dfb..8f55c7b07 100644 --- a/spec/v2/providers/fixtures.ts +++ b/spec/v2/providers/fixtures.ts @@ -1,6 +1,6 @@ -import { ManifestEndpoint } from "../../../src/runtime/manifest"; -import { TriggerAnnotation } from "../../../src/v2/core"; -import * as options from "../../../src/v2/options"; +import type { ManifestEndpoint } from "../../../src/runtime/manifest"; +import type { TriggerAnnotation } from "../../../src/v2/core"; +import type * as options from "../../../src/v2/options"; export { MINIMAL_V1_ENDPOINT, MINIMAL_V2_ENDPOINT } from "../../fixtures"; diff --git a/spec/v2/providers/https.spec.ts b/spec/v2/providers/https.spec.ts index 9ab5d52a8..f3277bbd4 100644 --- a/spec/v2/providers/https.spec.ts +++ b/spec/v2/providers/https.spec.ts @@ -21,18 +21,17 @@ // SOFTWARE. import { expect } from "chai"; +import type { Handler } from "express"; +import { genkit } from "genkit"; import * as sinon from "sinon"; - import * as debug from "../../../src/common/debug"; +import { clearParams, defineList, type Expression } from "../../../src/params"; +import { onInit } from "../../../src/v2/core"; import * as options from "../../../src/v2/options"; import * as https from "../../../src/v2/providers/https"; import { expectedResponseHeaders, MockRequest } from "../../fixtures/mockrequest"; import { runHandler } from "../../helper"; -import { FULL_ENDPOINT, MINIMAL_V2_ENDPOINT, FULL_OPTIONS, FULL_TRIGGER } from "./fixtures"; -import { onInit } from "../../../src/v2/core"; -import { Handler } from "express"; -import { genkit } from "genkit"; -import { clearParams, defineList, Expression } from "../../../src/params"; +import { FULL_ENDPOINT, FULL_OPTIONS, FULL_TRIGGER, MINIMAL_V2_ENDPOINT } from "./fixtures"; function request(args: { data?: any; diff --git a/spec/v2/providers/identity.spec.ts b/spec/v2/providers/identity.spec.ts index dbda1189c..b7bfa7de8 100644 --- a/spec/v2/providers/identity.spec.ts +++ b/spec/v2/providers/identity.spec.ts @@ -20,9 +20,9 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. import { expect } from "chai"; +import { onInit } from "../../../src/v2/core"; import * as identity from "../../../src/v2/providers/identity"; import { MINIMAL_V2_ENDPOINT } from "../../fixtures"; -import { onInit } from "../../../src/v2/core"; import { MockRequest } from "../../fixtures/mockrequest"; import { runHandler } from "../../helper"; diff --git a/spec/v2/providers/pubsub.spec.ts b/spec/v2/providers/pubsub.spec.ts index d498b1b42..f5ecf7d6a 100644 --- a/spec/v2/providers/pubsub.spec.ts +++ b/spec/v2/providers/pubsub.spec.ts @@ -1,9 +1,9 @@ import { expect } from "chai"; -import { CloudEvent } from "../../../src/v2/core"; +import type { CloudEvent } from "../../../src/v2/core"; import * as options from "../../../src/v2/options"; import * as pubsub from "../../../src/v2/providers/pubsub"; -import { FULL_ENDPOINT, MINIMAL_V2_ENDPOINT, FULL_OPTIONS, FULL_TRIGGER } from "./fixtures"; +import { FULL_ENDPOINT, FULL_OPTIONS, FULL_TRIGGER, MINIMAL_V2_ENDPOINT } from "./fixtures"; const EVENT_TRIGGER = { eventType: "google.cloud.pubsub.topic.v1.messagePublished", diff --git a/spec/v2/providers/remoteConfig.spec.ts b/spec/v2/providers/remoteConfig.spec.ts index 3b32ed111..adc09b173 100644 --- a/spec/v2/providers/remoteConfig.spec.ts +++ b/spec/v2/providers/remoteConfig.spec.ts @@ -21,10 +21,10 @@ // SOFTWARE. import { expect } from "chai"; -import * as remoteConfig from "../../../src/v2/providers/remoteConfig"; +import { type CloudEvent, onInit } from "../../../src/v2/core"; import * as options from "../../../src/v2/options"; +import * as remoteConfig from "../../../src/v2/providers/remoteConfig"; import { MINIMAL_V2_ENDPOINT } from "../../fixtures"; -import { CloudEvent, onInit } from "../../../src/v2/core"; describe("onConfigUpdated", () => { afterEach(() => { diff --git a/spec/v2/providers/scheduler.spec.ts b/spec/v2/providers/scheduler.spec.ts index fcd03cf1f..1720bfa59 100644 --- a/spec/v2/providers/scheduler.spec.ts +++ b/spec/v2/providers/scheduler.spec.ts @@ -21,11 +21,11 @@ // SOFTWARE. import { expect } from "chai"; -import { ManifestEndpoint } from "../../../src/runtime/manifest"; +import type { ManifestEndpoint } from "../../../src/runtime/manifest"; +import { onInit } from "../../../src/v2/core"; import * as options from "../../../src/v2/options"; import * as schedule from "../../../src/v2/providers/scheduler"; import { MINIMAL_V2_ENDPOINT } from "../../fixtures"; -import { onInit } from "../../../src/v2/core"; import { MockRequest } from "../../fixtures/mockrequest"; import { runHandler } from "../../helper"; diff --git a/spec/v2/providers/storage.spec.ts b/spec/v2/providers/storage.spec.ts index 06324e9ab..0b5d41b26 100644 --- a/spec/v2/providers/storage.spec.ts +++ b/spec/v2/providers/storage.spec.ts @@ -1,9 +1,9 @@ import { expect } from "chai"; import * as config from "../../../src/common/config"; +import { type CloudEvent, onInit } from "../../../src/v2/core"; import * as options from "../../../src/v2/options"; import * as storage from "../../../src/v2/providers/storage"; -import { FULL_ENDPOINT, MINIMAL_V2_ENDPOINT, FULL_OPTIONS, FULL_TRIGGER } from "./fixtures"; -import { CloudEvent, onInit } from "../../../src/v2/core"; +import { FULL_ENDPOINT, FULL_OPTIONS, FULL_TRIGGER, MINIMAL_V2_ENDPOINT } from "./fixtures"; const EVENT_TRIGGER = { eventType: "event-type", diff --git a/spec/v2/providers/tasks.spec.ts b/spec/v2/providers/tasks.spec.ts index 46ffd7a0a..36ed45def 100644 --- a/spec/v2/providers/tasks.spec.ts +++ b/spec/v2/providers/tasks.spec.ts @@ -22,13 +22,13 @@ import { expect } from "chai"; -import { ManifestEndpoint } from "../../../src/runtime/manifest"; +import type { ManifestEndpoint } from "../../../src/runtime/manifest"; +import { onInit } from "../../../src/v2/core"; import * as options from "../../../src/v2/options"; -import { onTaskDispatched, Request } from "../../../src/v2/providers/tasks"; +import { onTaskDispatched, type Request } from "../../../src/v2/providers/tasks"; import { MockRequest } from "../../fixtures/mockrequest"; import { runHandler } from "../../helper"; -import { FULL_ENDPOINT, MINIMAL_V2_ENDPOINT, FULL_OPTIONS, FULL_TRIGGER } from "./fixtures"; -import { onInit } from "../../../src/v2/core"; +import { FULL_ENDPOINT, FULL_OPTIONS, FULL_TRIGGER, MINIMAL_V2_ENDPOINT } from "./fixtures"; const MINIMIAL_TASK_QUEUE_TRIGGER: ManifestEndpoint["taskQueueTrigger"] = { rateLimits: { diff --git a/spec/v2/providers/testLab.spec.ts b/spec/v2/providers/testLab.spec.ts index 15d649d44..20ad9bf21 100644 --- a/spec/v2/providers/testLab.spec.ts +++ b/spec/v2/providers/testLab.spec.ts @@ -21,10 +21,10 @@ // SOFTWARE. import { expect } from "chai"; -import * as testLab from "../../../src/v2/providers/testLab"; +import { type CloudEvent, onInit } from "../../../src/v2/core"; import * as options from "../../../src/v2/options"; +import * as testLab from "../../../src/v2/providers/testLab"; import { MINIMAL_V2_ENDPOINT } from "../../fixtures"; -import { CloudEvent, onInit } from "../../../src/v2/core"; describe("onTestMatrixCompleted", () => { afterEach(() => { diff --git a/src/bin/firebase-functions.ts b/src/bin/firebase-functions.ts index 19cee056e..43951d530 100644 --- a/src/bin/firebase-functions.ts +++ b/src/bin/firebase-functions.ts @@ -22,10 +22,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import * as http from "http"; import * as express from "express"; -import * as fs from "fs/promises"; -import * as path from "path"; +import * as fs from "node:fs/promises"; +import type * as http from "node:http"; +import * as path from "node:path"; import { loadStack } from "../runtime/loader"; import { stackToWire } from "../runtime/manifest"; @@ -99,7 +99,7 @@ if (process.env.FUNCTIONS_MANIFEST_OUTPUT_PATH) { } })(); } else { - let server: http.Server = undefined; + let server: http.Server; const app = express(); app.get("/__/quitquitquit", (req, res) => handleQuitquitquit(req, res, server)); diff --git a/src/common/app.ts b/src/common/app.ts index 44f7ca929..6ff42dfd4 100644 --- a/src/common/app.ts +++ b/src/common/app.ts @@ -21,7 +21,7 @@ // SOFTWARE. import { - App, + type App, applicationDefault, deleteApp, getApp as getAppNamed, diff --git a/src/common/change.ts b/src/common/change.ts index d81b7c1fb..264567e21 100644 --- a/src/common/change.ts +++ b/src/common/change.ts @@ -92,5 +92,8 @@ export class Change { return Change.fromObjects(customizer(before || {}), customizer(json.after || {})); } - constructor(public before: T, public after: T) {} + constructor( + public before: T, + public after: T + ) {} } diff --git a/src/common/config.ts b/src/common/config.ts index ac634f2e7..1c6f1272f 100644 --- a/src/common/config.ts +++ b/src/common/config.ts @@ -1,6 +1,6 @@ -import { AppOptions } from "firebase-admin/app"; -import { readFileSync } from "fs"; -import * as path from "path"; +import type { AppOptions } from "firebase-admin/app"; +import { readFileSync } from "node:fs"; +import * as path from "node:path"; import * as logger from "../logger"; diff --git a/src/common/debug.ts b/src/common/debug.ts index 22ea7637d..5170fe7ff 100644 --- a/src/common/debug.ts +++ b/src/common/debug.ts @@ -38,7 +38,7 @@ function loadDebugFeatures(): DebugFeatures { return {}; } return obj as DebugFeatures; - } catch (e) { + } catch (_e) { return {}; } } diff --git a/src/common/params.ts b/src/common/params.ts index e0b0b8537..0cb9d48dc 100644 --- a/src/common/params.ts +++ b/src/common/params.ts @@ -20,30 +20,28 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { Expression } from "../params"; +import type { Expression } from "../params"; /** * A type that splits literal string S with delimiter D. * * For example Split<"a/b/c", "/"> is ['a' | "b" | "c"] */ -export type Split = - // A non-literal string splits into a string[] - string extends S - ? string[] - : // A literal empty string turns into a zero-tuple +export type Split = string extends S // A non-literal string splits into a string[] + ? string[] + : // A literal empty string turns into a zero-tuple S extends "" ? [] : // Split the string; Head may be the empty string - S extends `${D}${infer Tail}` - ? [...Split] - : S extends `${infer Head}${D}${infer Tail}` - ? // Drop types that are exactly string; they'll eat up literal string types - string extends Head + S extends `${D}${infer Tail}` ? [...Split] - : [Head, ...Split] - : // A string without delimiters splits into an array of itself - [S]; + : S extends `${infer Head}${D}${infer Tail}` + ? // Drop types that are exactly string; they'll eat up literal string types + string extends Head + ? [...Split] + : [Head, ...Split] + : // A string without delimiters splits into an array of itself + [S]; /** * A type that ensure that type S is not null or undefined. @@ -51,10 +49,10 @@ export type Split = export type NullSafe = S extends null ? never : S extends undefined - ? never - : S extends string - ? S - : never; + ? never + : S extends string + ? S + : never; /** * A type that extracts parameter name enclosed in bracket as string. @@ -67,10 +65,10 @@ export type NullSafe = S extends null export type Extract = Part extends `{${infer Param}=**}` ? Param : Part extends `{${infer Param}=*}` - ? Param - : Part extends `{${infer Param}}` - ? Param - : never; + ? Param + : Part extends `{${infer Param}}` + ? Param + : never; /** * A type that maps all parameter capture gropus into keys of a record. @@ -85,12 +83,12 @@ export type ParamsOf> = PathPattern extends Expression ? Record : string extends PathPattern - ? Record - : { - // N.B. I'm not sure why PathPattern isn't detected to not be an - // Expression per the check above. Since we have the check above - // The Exclude call should be safe. - [Key in Extract< - Split>>, "/">[number] - >]: string; - }; + ? Record + : { + // N.B. I'm not sure why PathPattern isn't detected to not be an + // Expression per the check above. Since we have the check above + // The Exclude call should be safe. + [Key in Extract< + Split>>, "/">[number] + >]: string; + }; diff --git a/src/common/providers/database.ts b/src/common/providers/database.ts index fb8c47c9b..d61573909 100644 --- a/src/common/providers/database.ts +++ b/src/common/providers/database.ts @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { App } from "firebase-admin/app"; +import type { App } from "firebase-admin/app"; import * as database from "firebase-admin/database"; import { firebaseConfig } from "../../common/config"; import { joinPath, pathParts } from "../../common/utilities/path"; @@ -289,7 +289,7 @@ export class DataSnapshot implements database.DataSnapshot { let maxKey = 0; let allIntegerKeys = true; for (const key in node) { - if (!node.hasOwnProperty(key)) { + if (!Object.prototype.hasOwnProperty.call(node, key)) { continue; } const childNode = node[key]; diff --git a/src/common/providers/firestore.ts b/src/common/providers/firestore.ts index 8a74b588a..5e1e1bb8d 100644 --- a/src/common/providers/firestore.ts +++ b/src/common/providers/firestore.ts @@ -21,10 +21,10 @@ // SOFTWARE. import * as firestore from "firebase-admin/firestore"; -import * as logger from "../../logger"; -import { getApp } from "../../common/app"; import { google } from "../../../protos/compiledFirestore"; +import { getApp } from "../../common/app"; import { dateToTimestampProto } from "../../common/utilities/encoder"; +import * as logger from "../../logger"; /** static-complied protobufs */ const DocumentEventData = google.events.cloud.firestore.v1.DocumentEventData; diff --git a/src/common/providers/https.ts b/src/common/providers/https.ts index 5e3c08c16..94bf752f3 100644 --- a/src/common/providers/https.ts +++ b/src/common/providers/https.ts @@ -21,18 +21,15 @@ // SOFTWARE. import * as cors from "cors"; -import * as express from "express"; -import { DecodedAppCheckToken } from "firebase-admin/app-check"; - -import * as logger from "../../logger"; - +import type * as express from "express"; // TODO(inlined): Decide whether we want to un-version apps or whether we want a // different strategy -import { getAppCheck } from "firebase-admin/app-check"; -import { DecodedIdToken, getAuth } from "firebase-admin/auth"; +import { type DecodedAppCheckToken, getAppCheck } from "firebase-admin/app-check"; +import { type DecodedIdToken, getAuth } from "firebase-admin/auth"; +import * as logger from "../../logger"; import { getApp } from "../app"; import { isDebugFeatureEnabled } from "../debug"; -import { TaskContext } from "./tasks"; +import type { TaskContext } from "./tasks"; const JWT_REGEX = /^[a-zA-Z0-9\-_=]+?\.[a-zA-Z0-9\-_=]+?\.([a-zA-Z0-9\-_=]+)?$/; @@ -539,7 +536,7 @@ export function unsafeDecodeToken(token: string): unknown { if (typeof obj === "object") { payload = obj; } - } catch (e) { + } catch (_e) { // ignore error } } diff --git a/src/common/providers/identity.ts b/src/common/providers/identity.ts index f2a8a3949..af0e99aaa 100644 --- a/src/common/providers/identity.ts +++ b/src/common/providers/identity.ts @@ -20,10 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import * as express from "express"; +import type * as express from "express"; import * as auth from "firebase-admin/auth"; import * as logger from "../../logger"; -import { EventContext } from "../../v1/cloud-functions"; +import type { EventContext } from "../../v1/cloud-functions"; import { getApp } from "../app"; import { isDebugFeatureEnabled } from "../debug"; import { HttpsError, unsafeDecodeToken } from "./https"; @@ -84,7 +84,10 @@ export type UserInfo = auth.UserInfo; * Helper class to create the user metadata in a `UserRecord` object. */ export class UserRecordMetadata implements auth.UserMetadata { - constructor(public creationTime: string, public lastSignInTime: string) {} + constructor( + public creationTime: string, + public lastSignInTime: string + ) {} /** Returns a plain JavaScript object with the properties of UserRecordMetadata. */ toJSON(): AuthUserMetadata { @@ -812,7 +815,7 @@ export function validateAuthResponse( } if (authRequest.customClaims) { const invalidClaims = DISALLOWED_CUSTOM_CLAIMS.filter((claim) => - authRequest.customClaims.hasOwnProperty(claim) + Object.prototype.hasOwnProperty.call(authRequest.customClaims, claim) ); if (invalidClaims.length > 0) { throw new HttpsError( @@ -829,7 +832,10 @@ export function validateAuthResponse( } if (eventType === "beforeSignIn" && (authRequest as BeforeSignInResponse).sessionClaims) { const invalidClaims = DISALLOWED_CUSTOM_CLAIMS.filter((claim) => - (authRequest as BeforeSignInResponse).sessionClaims.hasOwnProperty(claim) + Object.prototype.hasOwnProperty.call( + (authRequest as BeforeSignInResponse).sessionClaims, + claim + ) ); if (invalidClaims.length > 0) { throw new HttpsError( @@ -871,7 +877,10 @@ export function getUpdateMask(authResponse?: BeforeCreateResponse | BeforeSignIn } const updateMask: string[] = []; for (const key in authResponse) { - if (authResponse.hasOwnProperty(key) && typeof authResponse[key] !== "undefined") { + if ( + Object.prototype.hasOwnProperty.call(authResponse, key) && + typeof authResponse[key] !== "undefined" + ) { updateMask.push(key); } } @@ -897,8 +906,8 @@ export function wrapHandler(eventType: AuthBlockingEventType, handler: AuthBlock const decodedPayload: DecodedPayload = isDebugFeatureEnabled("skipTokenVerification") ? unsafeDecodeAuthBlockingToken(req.body.data.jwt) : handler.platform === "gcfv1" - ? await auth.getAuth(getApp())._verifyAuthBlockingToken(req.body.data.jwt) - : await auth.getAuth(getApp())._verifyAuthBlockingToken(req.body.data.jwt, "run.app"); + ? await auth.getAuth(getApp())._verifyAuthBlockingToken(req.body.data.jwt) + : await auth.getAuth(getApp())._verifyAuthBlockingToken(req.body.data.jwt, "run.app"); let authUserRecord: AuthUserRecord | undefined; if ( decodedPayload.event_type === "beforeCreate" || diff --git a/src/common/providers/tasks.ts b/src/common/providers/tasks.ts index 4f2e82a78..178b46de5 100644 --- a/src/common/providers/tasks.ts +++ b/src/common/providers/tasks.ts @@ -20,13 +20,13 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import * as express from "express"; -import { DecodedIdToken } from "firebase-admin/auth"; +import type * as express from "express"; +import type { DecodedIdToken } from "firebase-admin/auth"; import * as logger from "../../logger"; +import type { Expression } from "../../params"; +import type { ResetValue } from "../options"; import * as https from "./https"; -import { Expression } from "../../params"; -import { ResetValue } from "../options"; /** How a task should be retried in the event of a non-2xx return. */ export interface RetryConfig { diff --git a/src/common/trace.ts b/src/common/trace.ts index 65d9894cc..c31768c7d 100644 --- a/src/common/trace.ts +++ b/src/common/trace.ts @@ -1,4 +1,4 @@ -import { AsyncLocalStorage } from "async_hooks"; +import { AsyncLocalStorage } from "node:async_hooks"; export const traceContext = new AsyncLocalStorage(); diff --git a/src/common/utilities/encoder.ts b/src/common/utilities/encoder.ts index ecdc86550..ed5896c24 100644 --- a/src/common/utilities/encoder.ts +++ b/src/common/utilities/encoder.ts @@ -30,7 +30,7 @@ export function dateToTimestampProto(timeString?: string) { if (timeString.length > 20) { const nanoString = timeString.substring(20, timeString.length - 1); const trailingZeroes = 9 - nanoString.length; - nanos = parseInt(nanoString, 10) * Math.pow(10, trailingZeroes); + nanos = parseInt(nanoString, 10) * 10 ** trailingZeroes; } return { seconds, nanos }; } diff --git a/src/common/utilities/path-pattern.ts b/src/common/utilities/path-pattern.ts index 8548a850f..4b02b88f5 100644 --- a/src/common/utilities/path-pattern.ts +++ b/src/common/utilities/path-pattern.ts @@ -25,7 +25,7 @@ import { pathParts } from "./path"; /** https://cloud.google.com/eventarc/docs/path-patterns */ /** @hidden */ -const WILDCARD_CAPTURE_REGEX = new RegExp("{[^/{}]+}", "g"); +const WILDCARD_CAPTURE_REGEX = /{[^/{}]+}/g; /** @internal */ export function trimParam(param: string) { diff --git a/src/logger/compat.ts b/src/logger/compat.ts index 02b819ddc..c4d7c6896 100644 --- a/src/logger/compat.ts +++ b/src/logger/compat.ts @@ -20,12 +20,12 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { format } from "util"; +import { format } from "node:util"; import { CONSOLE_SEVERITY, UNPATCHED_CONSOLE } from "./common"; /** @hidden */ function patchedConsole(severity: string): (data: any, ...args: any[]) => void { - return function (data: any, ...args: any[]): void { + return (data: any, ...args: any[]): void => { let message = format(data, ...args); if (severity === "ERROR") { message = new Error(message).stack || message; diff --git a/src/logger/index.ts b/src/logger/index.ts index 2a2d85ae7..9f27ef20f 100644 --- a/src/logger/index.ts +++ b/src/logger/index.ts @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { format } from "util"; +import { format } from "node:util"; import { traceContext } from "../common/trace"; import { CONSOLE_SEVERITY, UNPATCHED_CONSOLE } from "./common"; @@ -90,9 +90,8 @@ function removeCircular(obj: any, refs: any[] = []): any { export function write(entry: LogEntry) { const ctx = traceContext.getStore(); if (ctx?.traceId) { - entry[ - "logging.googleapis.com/trace" - ] = `projects/${process.env.GCLOUD_PROJECT}/traces/${ctx.traceId}`; + entry["logging.googleapis.com/trace"] = + `projects/${process.env.GCLOUD_PROJECT}/traces/${ctx.traceId}`; } UNPATCHED_CONSOLE[CONSOLE_SEVERITY[entry.severity]](JSON.stringify(removeCircular(entry))); diff --git a/src/params/index.ts b/src/params/index.ts index fadd36b54..59775950a 100644 --- a/src/params/index.ts +++ b/src/params/index.ts @@ -29,23 +29,23 @@ import { BooleanParam, Expression, FloatParam, + InternalExpression, IntParam, - Param, + ListParam, + type Param, ParamOptions, SecretParam, StringParam, - ListParam, - InternalExpression, } from "./types"; export { BUCKET_PICKER, - TextInput, + MultiSelectInput, + multiSelect, SelectInput, SelectOptions, - MultiSelectInput, select, - multiSelect, + TextInput, } from "./types"; export { ParamOptions, Expression }; diff --git a/src/params/types.ts b/src/params/types.ts index 0d0413413..8eb8f0c76 100644 --- a/src/params/types.ts +++ b/src/params/types.ts @@ -84,7 +84,7 @@ function refOf(arg: T | Expressi * A CEL expression corresponding to a ternary operator, e.g {{ cond ? ifTrue : ifFalse }} */ export class TernaryExpression< - T extends string | number | boolean | string[] + T extends string | number | boolean | string[], > extends Expression { constructor( private readonly test: Expression, @@ -111,7 +111,7 @@ export class TernaryExpression< * between the value of another expression and a literal of that same type. */ export class CompareExpression< - T extends string | number | boolean | string[] + T extends string | number | boolean | string[], > extends Expression { cmp: "==" | "!=" | ">" | ">=" | "<" | "<="; lhs: Expression; @@ -226,7 +226,7 @@ type ParamInput = * provided validationRegex, if present, will be retried. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars -export interface TextInput { +export interface TextInput<_T = unknown> { text: { example?: string; /** @@ -340,7 +340,10 @@ export type ParamOptions = Omit< export abstract class Param extends Expression { static type: ParamValueType = "string"; - constructor(readonly name: string, readonly options: ParamOptions = {}) { + constructor( + readonly name: string, + readonly options: ParamOptions = {} + ) { super(); } @@ -483,7 +486,10 @@ export class StringParam extends Param { * @internal */ export class InternalExpression extends Param { - constructor(name: string, private readonly getter: (env: NodeJS.ProcessEnv) => string) { + constructor( + name: string, + private readonly getter: (env: NodeJS.ProcessEnv) => string + ) { super(name); } diff --git a/src/runtime/loader.ts b/src/runtime/loader.ts index 5c7af9553..f00c671d6 100644 --- a/src/runtime/loader.ts +++ b/src/runtime/loader.ts @@ -19,18 +19,16 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import * as path from "path"; -import * as url from "url"; - -import { +import * as path from "node:path"; +import * as url from "node:url"; +import * as params from "../params"; +import type { ManifestEndpoint, ManifestExtension, ManifestRequiredAPI, ManifestStack, } from "./manifest"; -import * as params from "../params"; - /** * Dynamically load import function to prevent TypeScript from * transpiling into a require. diff --git a/src/runtime/manifest.ts b/src/runtime/manifest.ts index 4d52d5eaf..f56879ae0 100644 --- a/src/runtime/manifest.ts +++ b/src/runtime/manifest.ts @@ -20,9 +20,9 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { RESET_VALUE, ResettableKeys, ResetValue } from "../common/options"; +import { RESET_VALUE, type ResettableKeys, ResetValue } from "../common/options"; import { Expression } from "../params"; -import { WireParamSpec, SecretParam } from "../params/types"; +import type { SecretParam, WireParamSpec } from "../params/types"; /** * A definition of an extension as appears in the Manifest. @@ -196,7 +196,7 @@ function initEndpoint( */ export function initV1Endpoint(...opts: ManifestOptions[]): ManifestEndpoint { // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { concurrency, ...resetOpts } = RESETTABLE_OPTIONS; + const { _concurrency, ...resetOpts } = RESETTABLE_OPTIONS; return initEndpoint({ ...resetOpts }, ...opts); } diff --git a/src/v1/cloud-functions.ts b/src/v1/cloud-functions.ts index 0a86853f9..16ce30fe2 100644 --- a/src/v1/cloud-functions.ts +++ b/src/v1/cloud-functions.ts @@ -24,32 +24,33 @@ import { Request, Response } from "express"; import { warn } from "../logger"; import { DEFAULT_FAILURE_POLICY, - DeploymentOptions, + type DeploymentOptions, + type FailurePolicy, RESET_VALUE, - FailurePolicy, - Schedule, + type Schedule, } from "./function-configuration"; export { Request, Response }; + import { convertIfPresent, copyIfPresent, - serviceAccountFromShorthand, durationFromSeconds, + serviceAccountFromShorthand, } from "../common/encoding"; +import { withInit } from "../common/onInit"; +import { ResetValue } from "../common/options"; +import { SecretParam } from "../params/types"; import { initV1Endpoint, initV1ScheduleTrigger, - ManifestEndpoint, - ManifestRequiredAPI, + type ManifestEndpoint, + type ManifestRequiredAPI, } from "../runtime/manifest"; -import { ResetValue } from "../common/options"; -import { SecretParam } from "../params/types"; -import { withInit } from "../common/onInit"; export { Change } from "../common/change"; /** @internal */ -const WILDCARD_REGEX = new RegExp("{[^/{}]*}", "g"); +const WILDCARD_REGEX = /{[^/{}]*}/g; /** * Wire format for an event. diff --git a/src/v1/config.ts b/src/v1/config.ts index 2eafa3150..0a06fab85 100644 --- a/src/v1/config.ts +++ b/src/v1/config.ts @@ -20,8 +20,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import * as fs from "fs"; -import * as path from "path"; +import * as fs from "node:fs"; +import * as path from "node:path"; export { firebaseConfig } from "../common/config"; @@ -62,7 +62,7 @@ function init() { delete parsed.firebase; singleton = parsed; return; - } catch (e) { + } catch (_e) { // Do nothing } @@ -74,7 +74,7 @@ function init() { delete parsed.firebase; singleton = parsed; return; - } catch (e) { + } catch (_e) { // Do nothing } diff --git a/src/v1/function-builder.ts b/src/v1/function-builder.ts index e70f26166..0260b9098 100644 --- a/src/v1/function-builder.ts +++ b/src/v1/function-builder.ts @@ -20,18 +20,18 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import * as express from "express"; +import type * as express from "express"; import { ResetValue } from "../common/options"; import { Expression, SecretParam } from "../params/types"; -import { EventContext } from "./cloud-functions"; +import type { EventContext } from "./cloud-functions"; import { - DeploymentOptions, + type DeploymentOptions, INGRESS_SETTINGS_OPTIONS, MAX_NUMBER_USER_LABELS, MAX_TIMEOUT_SECONDS, - RuntimeOptions, - SUPPORTED_REGIONS, + type RuntimeOptions, + type SUPPORTED_REGIONS, VALID_MEMORY_OPTIONS, VPC_EGRESS_SETTINGS_OPTIONS, } from "./function-configuration"; diff --git a/src/v1/function-configuration.ts b/src/v1/function-configuration.ts index 90aa391fc..5505aefbf 100644 --- a/src/v1/function-configuration.ts +++ b/src/v1/function-configuration.ts @@ -1,6 +1,6 @@ -import { Expression } from "../params"; -import { ResetValue } from "../common/options"; -import { SecretParam } from "../params/types"; +import type { ResetValue } from "../common/options"; +import type { Expression } from "../params"; +import type { SecretParam } from "../params/types"; export { RESET_VALUE } from "../common/options"; diff --git a/src/v1/index.ts b/src/v1/index.ts index 7f3f9e10b..885b98f01 100644 --- a/src/v1/index.ts +++ b/src/v1/index.ts @@ -20,6 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +import { setApp as setEmulatedAdminApp } from "../common/app"; // Providers: import * as logger from "../logger"; import * as analytics from "./providers/analytics"; @@ -33,8 +34,6 @@ import * as storage from "./providers/storage"; import * as tasks from "./providers/tasks"; import * as testLab from "./providers/testLab"; -import { setApp as setEmulatedAdminApp } from "../common/app"; - export { analytics, auth, @@ -56,6 +55,7 @@ export * from "./cloud-functions"; export * from "./config"; export * from "./function-builder"; export * from "./function-configuration"; + // NOTE: Equivalent to `export * as params from "../params"` but api-extractor doesn't support that syntax. import * as params from "../params"; export { params }; diff --git a/src/v1/providers/analytics.ts b/src/v1/providers/analytics.ts index 63895a7ca..b138272ad 100644 --- a/src/v1/providers/analytics.ts +++ b/src/v1/providers/analytics.ts @@ -20,8 +20,13 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { CloudFunction, Event, EventContext, makeCloudFunction } from "../cloud-functions"; -import { DeploymentOptions } from "../function-configuration"; +import { + type CloudFunction, + type Event, + type EventContext, + makeCloudFunction, +} from "../cloud-functions"; +import type { DeploymentOptions } from "../function-configuration"; /** @internal */ export const provider = "google.analytics"; @@ -57,7 +62,10 @@ export function _eventWithOptions(analyticsEventType: string, options: Deploymen */ export class AnalyticsEventBuilder { /** @hidden */ - constructor(private triggerResource: () => string, private options: DeploymentOptions) {} + constructor( + private triggerResource: () => string, + private options: DeploymentOptions + ) {} /** * Event handler that fires every time a Firebase Analytics event occurs. diff --git a/src/v1/providers/auth.ts b/src/v1/providers/auth.ts index 2a88cd41a..4909ea316 100644 --- a/src/v1/providers/auth.ts +++ b/src/v1/providers/auth.ts @@ -21,33 +21,33 @@ // SOFTWARE. import { - AuthBlockingEventType, - AuthEventContext, - AuthUserRecord, - BeforeCreateResponse, - BeforeEmailResponse, - BeforeSignInResponse, - BeforeSmsResponse, - HandlerV1, + type AuthBlockingEventType, + type AuthEventContext, + type AuthUserRecord, + type BeforeCreateResponse, + type BeforeEmailResponse, + type BeforeSignInResponse, + type BeforeSmsResponse, + type HandlerV1, HttpsError, - MaybeAsync, + type MaybeAsync, UserInfo, UserRecord, - userRecordConstructor, UserRecordMetadata, + userRecordConstructor, wrapHandler, } from "../../common/providers/identity"; +import { initV1Endpoint } from "../../runtime/manifest"; import { - BlockingFunction, - CloudFunction, - Event, - EventContext, + type BlockingFunction, + type CloudFunction, + type Event, + type EventContext, makeCloudFunction, optionsToEndpoint, optionsToTrigger, } from "../cloud-functions"; -import { DeploymentOptions } from "../function-configuration"; -import { initV1Endpoint } from "../../runtime/manifest"; +import type { DeploymentOptions } from "../function-configuration"; // TODO: yank in next breaking change release export { UserRecord, UserInfo, UserRecordMetadata, userRecordConstructor }; diff --git a/src/v1/providers/database.ts b/src/v1/providers/database.ts index d59d7de19..bc4eb6e27 100644 --- a/src/v1/providers/database.ts +++ b/src/v1/providers/database.ts @@ -21,14 +21,19 @@ // SOFTWARE. import { getApp } from "../../common/app"; -import { Change } from "../../common/change"; +import type { Change } from "../../common/change"; import { firebaseConfig } from "../../common/config"; -import { ParamsOf } from "../../common/params"; +import type { ParamsOf } from "../../common/params"; import { DataSnapshot } from "../../common/providers/database"; import { normalizePath } from "../../common/utilities/path"; import { applyChange } from "../../common/utilities/utils"; -import { CloudFunction, Event, EventContext, makeCloudFunction } from "../cloud-functions"; -import { DeploymentOptions } from "../function-configuration"; +import { + type CloudFunction, + type Event, + type EventContext, + makeCloudFunction, +} from "../cloud-functions"; +import type { DeploymentOptions } from "../function-configuration"; export { DataSnapshot }; @@ -37,8 +42,8 @@ export const provider = "google.firebase.database"; /** @internal */ export const service = "firebaseio.com"; -const databaseURLRegex = new RegExp("^https://([^.]+)."); -const emulatorDatabaseURLRegex = new RegExp("^http://.*ns=([^&]+)"); +const databaseURLRegex = /^https:\/\/([^.]+)./; +const emulatorDatabaseURLRegex = /^http:\/\/.*ns=([^&]+)/; /** * Registers a function that triggers on events from a specific @@ -109,7 +114,10 @@ export function _instanceWithOptions( * Access via [`database.instance()`](providers_database_.html#instance). */ export class InstanceBuilder { - constructor(private instance: string, private options: DeploymentOptions) {} + constructor( + private instance: string, + private options: DeploymentOptions + ) {} /** * @returns Firebase Realtime Database reference builder interface. @@ -167,7 +175,10 @@ export function _refWithOptions( * Access via [`functions.database.ref()`](functions.database#.ref). */ export class RefBuilder { - constructor(private triggerResource: () => string, private options: DeploymentOptions) {} + constructor( + private triggerResource: () => string, + private options: DeploymentOptions + ) {} /** * Event handler that fires every time a Firebase Realtime Database write diff --git a/src/v1/providers/firestore.ts b/src/v1/providers/firestore.ts index 00ee71114..df67418f3 100644 --- a/src/v1/providers/firestore.ts +++ b/src/v1/providers/firestore.ts @@ -20,17 +20,22 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import * as firestore from "firebase-admin/firestore"; +import type * as firestore from "firebase-admin/firestore"; -import { posix } from "path"; +import { posix } from "node:path"; import { Change } from "../../common/change"; -import { ParamsOf } from "../../common/params"; +import type { ParamsOf } from "../../common/params"; import { createBeforeSnapshotFromJson, createSnapshotFromJson, } from "../../common/providers/firestore"; -import { CloudFunction, Event, EventContext, makeCloudFunction } from "../cloud-functions"; -import { DeploymentOptions } from "../function-configuration"; +import { + type CloudFunction, + type Event, + type EventContext, + makeCloudFunction, +} from "../cloud-functions"; +import type { DeploymentOptions } from "../function-configuration"; /** @internal */ export const provider = "google.firestore"; @@ -82,7 +87,10 @@ export function _documentWithOptions(path: Path, options: D } export class DatabaseBuilder { - constructor(private database: string, private options: DeploymentOptions) {} + constructor( + private database: string, + private options: DeploymentOptions + ) {} namespace(namespace: string) { return new NamespaceBuilder(this.database, this.options, namespace); @@ -144,7 +152,10 @@ function changeConstructor(raw: Event) { } export class DocumentBuilder { - constructor(private triggerResource: () => string, private options: DeploymentOptions) { + constructor( + private triggerResource: () => string, + private options: DeploymentOptions + ) { // TODO what validation do we want to do here? } diff --git a/src/v1/providers/https.ts b/src/v1/providers/https.ts index 8d079bfa1..785669ed9 100644 --- a/src/v1/providers/https.ts +++ b/src/v1/providers/https.ts @@ -20,9 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import * as express from "express"; +import type * as express from "express"; import { convertIfPresent, convertInvoker } from "../../common/encoding"; +import { withInit } from "../../common/onInit"; import { CallableContext, FunctionsErrorCode, @@ -30,11 +31,15 @@ import { onCallHandler, Request, } from "../../common/providers/https"; -import { HttpsFunction, optionsToEndpoint, optionsToTrigger, Runnable } from "../cloud-functions"; -import { DeploymentOptions } from "../function-configuration"; import { initV1Endpoint } from "../../runtime/manifest"; -import { withInit } from "../../common/onInit"; import { wrapTraceContext } from "../../v2/trace"; +import { + type HttpsFunction, + optionsToEndpoint, + optionsToTrigger, + type Runnable, +} from "../cloud-functions"; +import type { DeploymentOptions } from "../function-configuration"; export { Request, CallableContext, FunctionsErrorCode, HttpsError }; diff --git a/src/v1/providers/pubsub.ts b/src/v1/providers/pubsub.ts index 57a28803c..7ba379a89 100644 --- a/src/v1/providers/pubsub.ts +++ b/src/v1/providers/pubsub.ts @@ -20,8 +20,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { CloudFunction, EventContext, makeCloudFunction } from "../cloud-functions"; -import { DeploymentOptions, ScheduleRetryConfig } from "../function-configuration"; +import { type CloudFunction, type EventContext, makeCloudFunction } from "../cloud-functions"; +import type { DeploymentOptions, ScheduleRetryConfig } from "../function-configuration"; /** @internal */ export const provider = "google.pubsub"; @@ -60,7 +60,10 @@ export function _topicWithOptions(topic: string, options: DeploymentOptions): To */ export class TopicBuilder { /** @hidden */ - constructor(private triggerResource: () => string, private options: DeploymentOptions) {} + constructor( + private triggerResource: () => string, + private options: DeploymentOptions + ) {} /** * Event handler that fires every time a Cloud Pub/Sub message is @@ -124,7 +127,10 @@ export function _scheduleWithOptions( */ export class ScheduleBuilder { /** @hidden */ - constructor(private triggerResource: () => string, private options: DeploymentOptions) {} + constructor( + private triggerResource: () => string, + private options: DeploymentOptions + ) {} retryConfig(config: ScheduleRetryConfig): ScheduleBuilder { this.options.schedule.retryConfig = config; diff --git a/src/v1/providers/remoteConfig.ts b/src/v1/providers/remoteConfig.ts index cf67383dc..6ff517b60 100644 --- a/src/v1/providers/remoteConfig.ts +++ b/src/v1/providers/remoteConfig.ts @@ -20,8 +20,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { CloudFunction, EventContext, makeCloudFunction } from "../cloud-functions"; -import { DeploymentOptions } from "../function-configuration"; +import { type CloudFunction, type EventContext, makeCloudFunction } from "../cloud-functions"; +import type { DeploymentOptions } from "../function-configuration"; /** @internal */ export const provider = "google.firebase.remoteconfig"; @@ -60,7 +60,10 @@ export function _onUpdateWithOptions( /** Builder used to create Cloud Functions for Remote Config. */ export class UpdateBuilder { /** @internal */ - constructor(private triggerResource: () => string, private options: DeploymentOptions) {} + constructor( + private triggerResource: () => string, + private options: DeploymentOptions + ) {} /** * Handle all updates (including rollbacks) that affect a Remote Config diff --git a/src/v1/providers/storage.ts b/src/v1/providers/storage.ts index 998760eb6..e801c5774 100644 --- a/src/v1/providers/storage.ts +++ b/src/v1/providers/storage.ts @@ -21,8 +21,8 @@ // SOFTWARE. import { firebaseConfig } from "../../common/config"; -import { CloudFunction, EventContext, makeCloudFunction } from "../cloud-functions"; -import { DeploymentOptions } from "../function-configuration"; +import { type CloudFunction, type EventContext, makeCloudFunction } from "../cloud-functions"; +import type { DeploymentOptions } from "../function-configuration"; /** @internal */ export const provider = "google.storage"; @@ -81,7 +81,10 @@ export function _objectWithOptions(options: DeploymentOptions): ObjectBuilder { */ export class BucketBuilder { /** @internal */ - constructor(private triggerResource: () => string, private options: DeploymentOptions) {} + constructor( + private triggerResource: () => string, + private options: DeploymentOptions + ) {} /** * Event handler which fires every time a Google Cloud Storage change occurs. @@ -101,7 +104,10 @@ export class BucketBuilder { */ export class ObjectBuilder { /** @internal */ - constructor(private triggerResource: () => string, private options: DeploymentOptions) {} + constructor( + private triggerResource: () => string, + private options: DeploymentOptions + ) {} /** * Event handler sent only when a bucket has enabled object versioning. @@ -303,7 +309,7 @@ export interface ObjectMetadata { team?: string; }; etag?: string; - } + }, ]; owner?: { diff --git a/src/v1/providers/tasks.ts b/src/v1/providers/tasks.ts index c9bf70849..8d5454b30 100644 --- a/src/v1/providers/tasks.ts +++ b/src/v1/providers/tasks.ts @@ -20,10 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import * as express from "express"; +import type * as express from "express"; import { convertIfPresent, convertInvoker, copyIfPresent } from "../../common/encoding"; -import { Request } from "../../common/providers/https"; +import type { Request } from "../../common/providers/https"; import { onDispatchHandler, RateLimits, @@ -31,13 +31,13 @@ import { TaskContext, } from "../../common/providers/tasks"; import { - initV1Endpoint, initTaskQueueTrigger, - ManifestEndpoint, - ManifestRequiredAPI, + initV1Endpoint, + type ManifestEndpoint, + type ManifestRequiredAPI, } from "../../runtime/manifest"; import { optionsToEndpoint, optionsToTrigger } from "../cloud-functions"; -import { DeploymentOptions } from "../function-configuration"; +import type { DeploymentOptions } from "../function-configuration"; export { RetryConfig, RateLimits, TaskContext }; diff --git a/src/v1/providers/testLab.ts b/src/v1/providers/testLab.ts index ae9f9e584..8b77119b2 100644 --- a/src/v1/providers/testLab.ts +++ b/src/v1/providers/testLab.ts @@ -20,8 +20,13 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { CloudFunction, Event, EventContext, makeCloudFunction } from "../cloud-functions"; -import { DeploymentOptions } from "../function-configuration"; +import { + type CloudFunction, + type Event, + type EventContext, + makeCloudFunction, +} from "../cloud-functions"; +import type { DeploymentOptions } from "../function-configuration"; /** @internal */ export const PROVIDER = "google.testing"; @@ -48,7 +53,10 @@ export function _testMatrixWithOpts(opts: DeploymentOptions) { /** Builder used to create Cloud Functions for Test Lab test matrices events. */ export class TestMatrixBuilder { /** @internal */ - constructor(private triggerResource: () => string, private options: DeploymentOptions) {} + constructor( + private triggerResource: () => string, + private options: DeploymentOptions + ) {} /** Handle a TestMatrix that reached a final test state. */ onComplete( diff --git a/src/v2/core.ts b/src/v2/core.ts index 3d2e33748..701a3b3e7 100644 --- a/src/v2/core.ts +++ b/src/v2/core.ts @@ -26,12 +26,12 @@ */ import { Change } from "../common/change"; -import { ManifestEndpoint } from "../runtime/manifest"; +import type { ManifestEndpoint } from "../runtime/manifest"; export { Change }; -export { ParamsOf } from "../common/params"; export { onInit } from "../common/onInit"; +export { ParamsOf } from "../common/params"; /** @internal */ export interface TriggerAnnotation { diff --git a/src/v2/index.ts b/src/v2/index.ts index 23fc424b8..89ec13d2c 100644 --- a/src/v2/index.ts +++ b/src/v2/index.ts @@ -32,15 +32,15 @@ import * as logger from "../logger"; import * as alerts from "./providers/alerts"; import * as database from "./providers/database"; import * as eventarc from "./providers/eventarc"; +import * as firestore from "./providers/firestore"; import * as https from "./providers/https"; import * as identity from "./providers/identity"; import * as pubsub from "./providers/pubsub"; +import * as remoteConfig from "./providers/remoteConfig"; import * as scheduler from "./providers/scheduler"; import * as storage from "./providers/storage"; import * as tasks from "./providers/tasks"; -import * as remoteConfig from "./providers/remoteConfig"; import * as testLab from "./providers/testLab"; -import * as firestore from "./providers/firestore"; export { alerts, @@ -58,19 +58,19 @@ export { firestore, }; +export { Change } from "../common/change"; +export { traceContext } from "../common/trace"; +export { CloudEvent, CloudFunction, onInit, ParamsOf } from "./core"; export { - setGlobalOptions, + EventHandlerOptions, GlobalOptions, - SupportedRegion, + IngressSetting, MemoryOption, + SupportedRegion, + setGlobalOptions, VpcEgressSetting, - IngressSetting, - EventHandlerOptions, } from "./options"; -export { CloudFunction, CloudEvent, ParamsOf, onInit } from "./core"; -export { Change } from "../common/change"; -export { traceContext } from "../common/trace"; // NOTE: Equivalent to `export * as params from "../params"` but api-extractor doesn't support that syntax. import * as params from "../params"; export { params }; diff --git a/src/v2/options.ts b/src/v2/options.ts index 608db1fa4..3aec07cad 100644 --- a/src/v2/options.ts +++ b/src/v2/options.ts @@ -32,12 +32,12 @@ import { serviceAccountFromShorthand, } from "../common/encoding"; import { RESET_VALUE, ResetValue } from "../common/options"; -import { ManifestEndpoint } from "../runtime/manifest"; -import { TriggerAnnotation } from "./core"; -import { declaredParams, Expression } from "../params"; -import { ParamSpec, SecretParam } from "../params/types"; -import { HttpsOptions } from "./providers/https"; import * as logger from "../logger"; +import { declaredParams, type Expression } from "../params"; +import { type ParamSpec, SecretParam } from "../params/types"; +import type { ManifestEndpoint } from "../runtime/manifest"; +import type { TriggerAnnotation } from "./core"; +import type { HttpsOptions } from "./providers/https"; export { RESET_VALUE } from "../common/options"; diff --git a/src/v2/providers/alerts/alerts.ts b/src/v2/providers/alerts/alerts.ts index e3b51c549..ede945705 100644 --- a/src/v2/providers/alerts/alerts.ts +++ b/src/v2/providers/alerts/alerts.ts @@ -20,14 +20,14 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import { initV2Endpoint, ManifestEndpoint } from "../../../runtime/manifest"; -import { ResetValue } from "../../../common/options"; -import { CloudEvent, CloudFunction } from "../../core"; -import { Expression } from "../../../params"; -import { wrapTraceContext } from "../../trace"; -import * as options from "../../options"; -import { SecretParam } from "../../../params/types"; import { withInit } from "../../../common/onInit"; +import type { ResetValue } from "../../../common/options"; +import type { Expression } from "../../../params"; +import type { SecretParam } from "../../../params/types"; +import { initV2Endpoint, type ManifestEndpoint } from "../../../runtime/manifest"; +import type { CloudEvent, CloudFunction } from "../../core"; +import * as options from "../../options"; +import { wrapTraceContext } from "../../trace"; /** * The CloudEvent data emitted by Firebase Alerts. diff --git a/src/v2/providers/alerts/appDistribution.ts b/src/v2/providers/alerts/appDistribution.ts index 6aa54e733..084ef5222 100644 --- a/src/v2/providers/alerts/appDistribution.ts +++ b/src/v2/providers/alerts/appDistribution.ts @@ -25,14 +25,14 @@ * @packageDocumentation */ -import { ResetValue } from "../../../common/options"; -import { Expression } from "../../../params"; -import { CloudEvent, CloudFunction } from "../../core"; -import { wrapTraceContext } from "../../trace"; -import { convertAlertAndApp, FirebaseAlertData, getEndpointAnnotation } from "./alerts"; -import * as options from "../../options"; -import { SecretParam } from "../../../params/types"; import { withInit } from "../../../common/onInit"; +import type { ResetValue } from "../../../common/options"; +import type { Expression } from "../../../params"; +import type { SecretParam } from "../../../params/types"; +import type { CloudEvent, CloudFunction } from "../../core"; +import type * as options from "../../options"; +import { wrapTraceContext } from "../../trace"; +import { convertAlertAndApp, type FirebaseAlertData, getEndpointAnnotation } from "./alerts"; /** * The internal payload object for adding a new tester device to app distribution. diff --git a/src/v2/providers/alerts/billing.ts b/src/v2/providers/alerts/billing.ts index 8bdb10d3d..6d195371b 100644 --- a/src/v2/providers/alerts/billing.ts +++ b/src/v2/providers/alerts/billing.ts @@ -25,11 +25,11 @@ * @packageDocumentation */ -import { CloudEvent, CloudFunction } from "../../core"; -import { wrapTraceContext } from "../../trace"; -import { convertAlertAndApp, FirebaseAlertData, getEndpointAnnotation } from "./alerts"; -import * as options from "../../options"; import { withInit } from "../../../common/onInit"; +import type { CloudEvent, CloudFunction } from "../../core"; +import type * as options from "../../options"; +import { wrapTraceContext } from "../../trace"; +import { convertAlertAndApp, type FirebaseAlertData, getEndpointAnnotation } from "./alerts"; /** * The internal payload object for billing plan updates. diff --git a/src/v2/providers/alerts/crashlytics.ts b/src/v2/providers/alerts/crashlytics.ts index 9fd2b26bb..2073810ba 100644 --- a/src/v2/providers/alerts/crashlytics.ts +++ b/src/v2/providers/alerts/crashlytics.ts @@ -25,14 +25,14 @@ * @packageDocumentation */ -import { ResetValue } from "../../../common/options"; -import { Expression } from "../../../params"; -import { CloudEvent, CloudFunction } from "../../core"; -import { wrapTraceContext } from "../../trace"; -import { convertAlertAndApp, FirebaseAlertData, getEndpointAnnotation } from "./alerts"; -import * as options from "../../options"; -import { SecretParam } from "../../../params/types"; import { withInit } from "../../../common/onInit"; +import type { ResetValue } from "../../../common/options"; +import type { Expression } from "../../../params"; +import type { SecretParam } from "../../../params/types"; +import type { CloudEvent, CloudFunction } from "../../core"; +import type * as options from "../../options"; +import { wrapTraceContext } from "../../trace"; +import { convertAlertAndApp, type FirebaseAlertData, getEndpointAnnotation } from "./alerts"; /** Generic Crashlytics issue interface */ export interface Issue { diff --git a/src/v2/providers/alerts/performance.ts b/src/v2/providers/alerts/performance.ts index 9ee3f7beb..058883367 100644 --- a/src/v2/providers/alerts/performance.ts +++ b/src/v2/providers/alerts/performance.ts @@ -26,10 +26,10 @@ */ import { withInit } from "../../../common/onInit"; -import { CloudEvent, CloudFunction } from "../../core"; -import { EventHandlerOptions } from "../../options"; +import type { CloudEvent, CloudFunction } from "../../core"; +import type { EventHandlerOptions } from "../../options"; import { wrapTraceContext } from "../../trace"; -import { convertAlertAndApp, FirebaseAlertData, getEndpointAnnotation } from "./alerts"; +import { convertAlertAndApp, type FirebaseAlertData, getEndpointAnnotation } from "./alerts"; /** * The internal payload object for a performance threshold alert. diff --git a/src/v2/providers/database.ts b/src/v2/providers/database.ts index 8bccbc59b..e8902999a 100644 --- a/src/v2/providers/database.ts +++ b/src/v2/providers/database.ts @@ -21,20 +21,20 @@ // SOFTWARE. import { getApp } from "../../common/app"; -import { Change } from "../../common/change"; -import { ParamsOf } from "../../common/params"; -import { ResetValue } from "../../common/options"; +import type { Change } from "../../common/change"; +import { withInit } from "../../common/onInit"; +import type { ResetValue } from "../../common/options"; +import type { ParamsOf } from "../../common/params"; import { DataSnapshot } from "../../common/providers/database"; import { normalizePath } from "../../common/utilities/path"; import { PathPattern } from "../../common/utilities/path-pattern"; import { applyChange } from "../../common/utilities/utils"; -import { initV2Endpoint, ManifestEndpoint } from "../../runtime/manifest"; -import { CloudEvent, CloudFunction } from "../core"; -import { Expression } from "../../params"; -import { wrapTraceContext } from "../trace"; +import type { Expression } from "../../params"; +import type { SecretParam } from "../../params/types"; +import { initV2Endpoint, type ManifestEndpoint } from "../../runtime/manifest"; +import type { CloudEvent, CloudFunction } from "../core"; import * as options from "../options"; -import { SecretParam } from "../../params/types"; -import { withInit } from "../../common/onInit"; +import { wrapTraceContext } from "../trace"; export { DataSnapshot }; diff --git a/src/v2/providers/eventarc.ts b/src/v2/providers/eventarc.ts index 48f5974be..d00fd5931 100644 --- a/src/v2/providers/eventarc.ts +++ b/src/v2/providers/eventarc.ts @@ -26,14 +26,14 @@ */ import { convertIfPresent, copyIfPresent } from "../../common/encoding"; -import { ResetValue } from "../../common/options"; -import { initV2Endpoint, ManifestEndpoint } from "../../runtime/manifest"; -import { CloudEvent, CloudFunction } from "../core"; -import { wrapTraceContext } from "../trace"; -import { Expression } from "../../params"; -import * as options from "../options"; -import { SecretParam } from "../../params/types"; import { withInit } from "../../common/onInit"; +import type { ResetValue } from "../../common/options"; +import type { Expression } from "../../params"; +import type { SecretParam } from "../../params/types"; +import { initV2Endpoint, type ManifestEndpoint } from "../../runtime/manifest"; +import type { CloudEvent, CloudFunction } from "../core"; +import * as options from "../options"; +import { wrapTraceContext } from "../trace"; /** Options that can be set on an Eventarc trigger. */ export interface EventarcTriggerOptions extends options.EventHandlerOptions { diff --git a/src/v2/providers/firestore.ts b/src/v2/providers/firestore.ts index 1adf1478d..d74349e22 100644 --- a/src/v2/providers/firestore.ts +++ b/src/v2/providers/firestore.ts @@ -20,23 +20,23 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import * as firestore from "firebase-admin/firestore"; -import * as logger from "../../logger"; -import { ParamsOf } from "../../common/params"; -import { normalizePath } from "../../common/utilities/path"; -import { PathPattern } from "../../common/utilities/path-pattern"; -import { initV2Endpoint, ManifestEndpoint } from "../../runtime/manifest"; -import { Change, CloudEvent, CloudFunction } from "../core"; -import { EventHandlerOptions, getGlobalOptions, optionsToEndpoint } from "../options"; +import type * as firestore from "firebase-admin/firestore"; +import { withInit } from "../../common/onInit"; +import type { ParamsOf } from "../../common/params"; import { createBeforeSnapshotFromJson, createBeforeSnapshotFromProtobuf, createSnapshotFromJson, createSnapshotFromProtobuf, } from "../../common/providers/firestore"; +import { normalizePath } from "../../common/utilities/path"; +import { PathPattern } from "../../common/utilities/path-pattern"; +import * as logger from "../../logger"; +import type { Expression } from "../../params"; +import { initV2Endpoint, type ManifestEndpoint } from "../../runtime/manifest"; +import { Change, type CloudEvent, type CloudFunction } from "../core"; +import { type EventHandlerOptions, getGlobalOptions, optionsToEndpoint } from "../options"; import { wrapTraceContext } from "../trace"; -import { withInit } from "../../common/onInit"; -import { Expression } from "../../params"; export { Change }; @@ -693,7 +693,7 @@ export function makeEndpoint( /** @internal */ export function onOperation< Document extends string, - Event extends FirestoreEvent> + Event extends FirestoreEvent>, >( eventType: string, documentOrOpts: Document | DocumentOptions, @@ -722,7 +722,7 @@ export function onOperation< /** @internal */ export function onChangedOperation< Document extends string, - Event extends FirestoreEvent, ParamsOf> + Event extends FirestoreEvent, ParamsOf>, >( eventType: string, documentOrOpts: Document | DocumentOptions, diff --git a/src/v2/providers/https.ts b/src/v2/providers/https.ts index ce468611e..10c1d8ad8 100644 --- a/src/v2/providers/https.ts +++ b/src/v2/providers/https.ts @@ -26,27 +26,27 @@ */ import * as cors from "cors"; -import * as express from "express"; -import { convertIfPresent, convertInvoker, copyIfPresent } from "../../common/encoding"; -import { wrapTraceContext } from "../trace"; +import type * as express from "express"; import { isDebugFeatureEnabled } from "../../common/debug"; -import { ResetValue } from "../../common/options"; +import { convertIfPresent, convertInvoker, copyIfPresent } from "../../common/encoding"; +import { withInit } from "../../common/onInit"; +import type { ResetValue } from "../../common/options"; import { + type AuthData, CallableRequest, CallableResponse, FunctionsErrorCode, HttpsError, onCallHandler, Request, - AuthData, } from "../../common/providers/https"; -import { initV2Endpoint, ManifestEndpoint } from "../../runtime/manifest"; -import { GlobalOptions, SupportedRegion } from "../options"; +import * as logger from "../../logger"; import { Expression } from "../../params"; -import { SecretParam } from "../../params/types"; +import type { SecretParam } from "../../params/types"; +import { initV2Endpoint, type ManifestEndpoint } from "../../runtime/manifest"; import * as options from "../options"; -import { withInit } from "../../common/onInit"; -import * as logger from "../../logger"; +import type { GlobalOptions, SupportedRegion } from "../options"; +import { wrapTraceContext } from "../trace"; export { Request, CallableRequest, CallableResponse, FunctionsErrorCode, HttpsError }; @@ -531,7 +531,7 @@ interface GenkitRunOptions { type GenkitAction< I extends ZodType = ZodType, O extends ZodType = ZodType, - S extends ZodType = ZodType + S extends ZodType = ZodType, > = { // NOTE: The return type from run includes trace data that we may one day like to use. run(input: I["__output"], options: GenkitRunOptions): Promise<{ result: O["__output"] }>; diff --git a/src/v2/providers/identity.ts b/src/v2/providers/identity.ts index b9e8737df..9b8ab1ee8 100644 --- a/src/v2/providers/identity.ts +++ b/src/v2/providers/identity.ts @@ -20,31 +20,31 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +import { withInit } from "../../common/onInit"; /** * Cloud functions to handle events from Google Cloud Identity Platform. * @packageDocumentation */ -import { ResetValue } from "../../common/options"; +import type { ResetValue } from "../../common/options"; import { AuthBlockingEvent, - AuthBlockingEventType, + type AuthBlockingEventType, AuthUserRecord, - BeforeCreateResponse, - BeforeSignInResponse, - BeforeEmailResponse, - BeforeSmsResponse, - HandlerV2, + type BeforeCreateResponse, + type BeforeEmailResponse, + type BeforeSignInResponse, + type BeforeSmsResponse, + type HandlerV2, HttpsError, + type MaybeAsync, wrapHandler, - MaybeAsync, } from "../../common/providers/identity"; -import { BlockingFunction } from "../../v1/cloud-functions"; -import { wrapTraceContext } from "../trace"; -import { Expression } from "../../params"; +import type { Expression } from "../../params"; +import type { SecretParam } from "../../params/types"; import { initV2Endpoint } from "../../runtime/manifest"; +import type { BlockingFunction } from "../../v1/cloud-functions"; import * as options from "../options"; -import { SecretParam } from "../../params/types"; -import { withInit } from "../../common/onInit"; +import { wrapTraceContext } from "../trace"; export { AuthUserRecord, AuthBlockingEvent, HttpsError }; diff --git a/src/v2/providers/pubsub.ts b/src/v2/providers/pubsub.ts index 5ae982185..faa7313dd 100644 --- a/src/v2/providers/pubsub.ts +++ b/src/v2/providers/pubsub.ts @@ -26,14 +26,14 @@ */ import { copyIfPresent } from "../../common/encoding"; -import { ResetValue } from "../../common/options"; -import { initV2Endpoint, ManifestEndpoint } from "../../runtime/manifest"; -import { CloudEvent, CloudFunction } from "../core"; -import { wrapTraceContext } from "../trace"; -import { Expression } from "../../params"; -import * as options from "../options"; -import { SecretParam } from "../../params/types"; import { withInit } from "../../common/onInit"; +import type { ResetValue } from "../../common/options"; +import type { Expression } from "../../params"; +import type { SecretParam } from "../../params/types"; +import { initV2Endpoint, type ManifestEndpoint } from "../../runtime/manifest"; +import type { CloudEvent, CloudFunction } from "../core"; +import * as options from "../options"; +import { wrapTraceContext } from "../trace"; /** * Google Cloud Pub/Sub is a globally distributed message bus that automatically scales as you need it. diff --git a/src/v2/providers/remoteConfig.ts b/src/v2/providers/remoteConfig.ts index a168dff1c..986c0b30d 100644 --- a/src/v2/providers/remoteConfig.ts +++ b/src/v2/providers/remoteConfig.ts @@ -21,9 +21,9 @@ // SOFTWARE. import { withInit } from "../../common/onInit"; -import { initV2Endpoint, ManifestEndpoint } from "../../runtime/manifest"; -import { CloudEvent, CloudFunction } from "../core"; -import { EventHandlerOptions, getGlobalOptions, optionsToEndpoint } from "../options"; +import { initV2Endpoint, type ManifestEndpoint } from "../../runtime/manifest"; +import type { CloudEvent, CloudFunction } from "../core"; +import { type EventHandlerOptions, getGlobalOptions, optionsToEndpoint } from "../options"; import { wrapTraceContext } from "../trace"; /** @internal */ diff --git a/src/v2/providers/scheduler.ts b/src/v2/providers/scheduler.ts index 1f8f33c31..992a437e5 100644 --- a/src/v2/providers/scheduler.ts +++ b/src/v2/providers/scheduler.ts @@ -20,23 +20,23 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import * as express from "express"; +import type * as express from "express"; import { copyIfPresent } from "../../common/encoding"; -import { ResetValue } from "../../common/options"; -import { timezone } from "../../common/timezone"; +import { withInit } from "../../common/onInit"; +import type { ResetValue } from "../../common/options"; +import type { timezone } from "../../common/timezone"; +import * as logger from "../../logger"; +import type { Expression } from "../../params"; import { initV2Endpoint, initV2ScheduleTrigger, - ManifestEndpoint, - ManifestRequiredAPI, + type ManifestEndpoint, + type ManifestRequiredAPI, } from "../../runtime/manifest"; -import { HttpsFunction } from "./https"; -import { wrapTraceContext } from "../trace"; -import { Expression } from "../../params"; -import * as logger from "../../logger"; import * as options from "../options"; -import { withInit } from "../../common/onInit"; +import { wrapTraceContext } from "../trace"; +import type { HttpsFunction } from "./https"; /** @hidden */ interface SeparatedOpts { diff --git a/src/v2/providers/storage.ts b/src/v2/providers/storage.ts index e05187eb1..afef7033a 100644 --- a/src/v2/providers/storage.ts +++ b/src/v2/providers/storage.ts @@ -27,14 +27,14 @@ import { firebaseConfig } from "../../common/config"; import { copyIfPresent } from "../../common/encoding"; -import { ResetValue } from "../../common/options"; -import { initV2Endpoint, ManifestEndpoint } from "../../runtime/manifest"; -import { CloudEvent, CloudFunction } from "../core"; -import { wrapTraceContext } from "../trace"; -import { Expression } from "../../params"; -import * as options from "../options"; -import { SecretParam } from "../../params/types"; import { withInit } from "../../common/onInit"; +import type { ResetValue } from "../../common/options"; +import type { Expression } from "../../params"; +import type { SecretParam } from "../../params/types"; +import { initV2Endpoint, type ManifestEndpoint } from "../../runtime/manifest"; +import type { CloudEvent, CloudFunction } from "../core"; +import * as options from "../options"; +import { wrapTraceContext } from "../trace"; /** * An object within Google Cloud Storage. diff --git a/src/v2/providers/tasks.ts b/src/v2/providers/tasks.ts index 32908e3ee..4381b006f 100644 --- a/src/v2/providers/tasks.ts +++ b/src/v2/providers/tasks.ts @@ -26,7 +26,8 @@ */ import { convertIfPresent, convertInvoker, copyIfPresent } from "../../common/encoding"; -import { ResetValue } from "../../common/options"; +import { withInit } from "../../common/onInit"; +import type { ResetValue } from "../../common/options"; import { AuthData, onDispatchHandler, @@ -34,13 +35,12 @@ import { Request, RetryConfig, } from "../../common/providers/tasks"; +import type { Expression } from "../../params"; +import type { SecretParam } from "../../params/types"; +import { initTaskQueueTrigger, initV2Endpoint } from "../../runtime/manifest"; import * as options from "../options"; import { wrapTraceContext } from "../trace"; -import { HttpsFunction } from "./https"; -import { Expression } from "../../params"; -import { SecretParam } from "../../params/types"; -import { initV2Endpoint, initTaskQueueTrigger } from "../../runtime/manifest"; -import { withInit } from "../../common/onInit"; +import type { HttpsFunction } from "./https"; export { AuthData, Request, RateLimits, RetryConfig }; diff --git a/src/v2/providers/testLab.ts b/src/v2/providers/testLab.ts index 3b4e5a3c1..21463dd95 100644 --- a/src/v2/providers/testLab.ts +++ b/src/v2/providers/testLab.ts @@ -21,9 +21,9 @@ // SOFTWARE. import { withInit } from "../../common/onInit"; -import { initV2Endpoint, ManifestEndpoint } from "../../runtime/manifest"; -import { CloudEvent, CloudFunction } from "../core"; -import { EventHandlerOptions, getGlobalOptions, optionsToEndpoint } from "../options"; +import { initV2Endpoint, type ManifestEndpoint } from "../../runtime/manifest"; +import type { CloudEvent, CloudFunction } from "../core"; +import { type EventHandlerOptions, getGlobalOptions, optionsToEndpoint } from "../options"; import { wrapTraceContext } from "../trace"; /** @internal */ diff --git a/src/v2/trace.ts b/src/v2/trace.ts index 585686b89..65ceadec2 100644 --- a/src/v2/trace.ts +++ b/src/v2/trace.ts @@ -1,7 +1,7 @@ -import * as express from "express"; +import type * as express from "express"; -import { TraceContext, extractTraceContext, traceContext } from "../common/trace"; -import { CloudEvent } from "./core"; +import { extractTraceContext, type TraceContext, traceContext } from "../common/trace"; +import type { CloudEvent } from "./core"; type HttpsFunction = (req: express.Request, res: express.Response) => void | Promise; type CloudEventFunction = (raw: CloudEvent) => any | Promise;