diff --git a/DEPS b/DEPS index b2475a1839..c1389b3dd6 100644 --- a/DEPS +++ b/DEPS @@ -131,7 +131,7 @@ deps = { 'packages': [ { 'package': 'infra/3pp/tools/esbuild/${{platform}}', - 'version': 'version:3@0.24.0.chromium.2', + 'version': 'version:2@0.14.13.chromium.2', } ], 'dep_type': 'cipd', diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 6582364ef6..26b2ef2442 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1511,9 +1511,9 @@ } }, "node_modules/ast-types/node_modules/tslib": { - "version": "2.8.0", - "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "version": "2.7.0", + "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", "dev": true, "license": "0BSD" }, @@ -2602,9 +2602,9 @@ } }, "node_modules/degenerator/node_modules/tslib": { - "version": "2.8.0", - "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "version": "2.7.0", + "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", "dev": true, "license": "0BSD" }, @@ -2886,43 +2886,33 @@ } }, "node_modules/esbuild": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/esbuild/-/esbuild-0.24.0.tgz", - "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild/-/esbuild-0.14.13.tgz", + "integrity": "sha512-FIxvAdj3i2oHA6ex+E67bG7zlSTO+slt8kU2ogHDgGtrQLy2HNChv3PYjiFTYkt8hZbEAniZCXVeHn+FrHt7dA==", "dev": true, "hasInstallScript": true, - "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, - "engines": { - "node": ">=18" - }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" + "esbuild-android-arm64": "0.14.13", + "esbuild-darwin-64": "0.14.13", + "esbuild-darwin-arm64": "0.14.13", + "esbuild-freebsd-64": "0.14.13", + "esbuild-freebsd-arm64": "0.14.13", + "esbuild-linux-32": "0.14.13", + "esbuild-linux-64": "0.14.13", + "esbuild-linux-arm": "0.14.13", + "esbuild-linux-arm64": "0.14.13", + "esbuild-linux-mips64le": "0.14.13", + "esbuild-linux-ppc64le": "0.14.13", + "esbuild-linux-s390x": "0.14.13", + "esbuild-netbsd-64": "0.14.13", + "esbuild-openbsd-64": "0.14.13", + "esbuild-sunos-64": "0.14.13", + "esbuild-windows-32": "0.14.13", + "esbuild-windows-64": "0.14.13", + "esbuild-windows-arm64": "0.14.13" } }, "node_modules/escalade": { @@ -7330,9 +7320,9 @@ } }, "node_modules/recast/node_modules/tslib": { - "version": "2.8.0", - "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "version": "2.7.0", + "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", "dev": true, "license": "0BSD" }, diff --git a/node_modules/ast-types/node_modules/tslib/modules/index.d.ts b/node_modules/ast-types/node_modules/tslib/modules/index.d.ts index 3244fabeec..0fedae881e 100644 --- a/node_modules/ast-types/node_modules/tslib/modules/index.d.ts +++ b/node_modules/ast-types/node_modules/tslib/modules/index.d.ts @@ -33,6 +33,5 @@ export { __createBinding, __addDisposableResource, __disposeResources, - __rewriteRelativeImportExtension, } from '../tslib.js'; export * as default from '../tslib.js'; diff --git a/node_modules/ast-types/node_modules/tslib/modules/index.js b/node_modules/ast-types/node_modules/tslib/modules/index.js index f4f9a06d2a..0c9dcd5f59 100644 --- a/node_modules/ast-types/node_modules/tslib/modules/index.js +++ b/node_modules/ast-types/node_modules/tslib/modules/index.js @@ -31,7 +31,6 @@ const { __classPrivateFieldIn, __addDisposableResource, __disposeResources, - __rewriteRelativeImportExtension, } = tslib; export { __extends, @@ -65,6 +64,5 @@ export { __classPrivateFieldIn, __addDisposableResource, __disposeResources, - __rewriteRelativeImportExtension, }; export default tslib; diff --git a/node_modules/ast-types/node_modules/tslib/package.json b/node_modules/ast-types/node_modules/tslib/package.json index ee7ce69718..88f67e7f8b 100644 --- a/node_modules/ast-types/node_modules/tslib/package.json +++ b/node_modules/ast-types/node_modules/tslib/package.json @@ -2,7 +2,7 @@ "name": "tslib", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "2.8.0", + "version": "2.7.0", "license": "0BSD", "description": "Runtime library for TypeScript helper functions", "keywords": [ diff --git a/node_modules/ast-types/node_modules/tslib/tslib.d.ts b/node_modules/ast-types/node_modules/tslib/tslib.d.ts index 9c27e05864..7fdf69c113 100644 --- a/node_modules/ast-types/node_modules/tslib/tslib.d.ts +++ b/node_modules/ast-types/node_modules/tslib/tslib.d.ts @@ -451,10 +451,3 @@ export declare function __addDisposableResource(env: { stack: { value?: unkno * @seealso {@link __addDisposableResource} */ export declare function __disposeResources(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }): any; - -/** - * Transforms a relative import specifier ending in a non-declaration TypeScript file extension to its JavaScript file extension counterpart. - * @param path The import specifier. - * @param preserveJsx Causes '*.tsx' to transform to '*.jsx' instead of '*.js'. Should be true when `--jsx` is set to `preserve`. - */ -export declare function __rewriteRelativeImportExtension(path: string, preserveJsx?: boolean): string; \ No newline at end of file diff --git a/node_modules/ast-types/node_modules/tslib/tslib.es6.js b/node_modules/ast-types/node_modules/tslib/tslib.es6.js index 2cc91e2ad5..6e2bd871c1 100644 --- a/node_modules/ast-types/node_modules/tslib/tslib.es6.js +++ b/node_modules/ast-types/node_modules/tslib/tslib.es6.js @@ -348,25 +348,12 @@ export function __disposeResources(env) { return next(); } -export function __rewriteRelativeImportExtension(path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; -} - export default { __extends: __extends, __assign: __assign, __rest: __rest, __decorate: __decorate, __param: __param, - __esDecorate: __esDecorate, - __runInitializers: __runInitializers, - __propKey: __propKey, - __setFunctionName: __setFunctionName, __metadata: __metadata, __awaiter: __awaiter, __generator: __generator, @@ -389,5 +376,4 @@ export default { __classPrivateFieldIn: __classPrivateFieldIn, __addDisposableResource: __addDisposableResource, __disposeResources: __disposeResources, - __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, }; diff --git a/node_modules/ast-types/node_modules/tslib/tslib.es6.mjs b/node_modules/ast-types/node_modules/tslib/tslib.es6.mjs index a1d9ef56b2..17bb2ff8f2 100644 --- a/node_modules/ast-types/node_modules/tslib/tslib.es6.mjs +++ b/node_modules/ast-types/node_modules/tslib/tslib.es6.mjs @@ -347,25 +347,12 @@ export function __disposeResources(env) { return next(); } -export function __rewriteRelativeImportExtension(path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; -} - export default { __extends, __assign, __rest, __decorate, __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, __metadata, __awaiter, __generator, @@ -388,5 +375,4 @@ export default { __classPrivateFieldIn, __addDisposableResource, __disposeResources, - __rewriteRelativeImportExtension, }; diff --git a/node_modules/ast-types/node_modules/tslib/tslib.js b/node_modules/ast-types/node_modules/tslib/tslib.js index 66fee315d2..bf17a4d8c6 100644 --- a/node_modules/ast-types/node_modules/tslib/tslib.js +++ b/node_modules/ast-types/node_modules/tslib/tslib.js @@ -44,7 +44,6 @@ var __classPrivateFieldIn; var __createBinding; var __addDisposableResource; var __disposeResources; -var __rewriteRelativeImportExtension; (function (factory) { var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; if (typeof define === "function" && define.amd) { @@ -396,15 +395,6 @@ var __rewriteRelativeImportExtension; return next(); }; - __rewriteRelativeImportExtension = function (path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; - }; - exporter("__extends", __extends); exporter("__assign", __assign); exporter("__rest", __rest); @@ -436,40 +426,4 @@ var __rewriteRelativeImportExtension; exporter("__classPrivateFieldIn", __classPrivateFieldIn); exporter("__addDisposableResource", __addDisposableResource); exporter("__disposeResources", __disposeResources); - exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); -}); - -0 && (module.exports = { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __createBinding, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, }); diff --git a/node_modules/call-bind/package.json b/node_modules/call-bind/package.json index f29a5401ab..5ba88ff852 100644 --- a/node_modules/call-bind/package.json +++ b/node_modules/call-bind/package.json @@ -1,95 +1,95 @@ { - "name": "call-bind", - "version": "1.0.7", - "description": "Robustly `.call.bind()` a function", - "main": "index.js", - "exports": { - ".": "./index.js", - "./callBound": "./callBound.js", - "./package.json": "./package.json" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=auto", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "lint": "eslint --ext=.js,.mjs .", - "postlint": "evalmd README.md", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/call-bind.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "es", - "js", - "callbind", - "callbound", - "call", - "bind", - "bound", - "call-bind", - "call-bound", - "function", - "es-abstract" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/call-bind/issues" - }, - "homepage": "https://github.com/ljharb/call-bind#readme", - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "es-value-fixtures": "^1.4.2", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-strict-mode": "^1.0.1", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "object-inspect": "^1.13.1", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.4" - }, - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "testling": { - "files": "test/index.js" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } + "name": "call-bind", + "version": "1.0.7", + "description": "Robustly `.call.bind()` a function", + "main": "index.js", + "exports": { + ".": "./index.js", + "./callBound": "./callBound.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=auto", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint --ext=.js,.mjs .", + "postlint": "evalmd README.md", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/call-bind.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "es", + "js", + "callbind", + "callbound", + "call", + "bind", + "bound", + "call-bind", + "call-bound", + "function", + "es-abstract" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/call-bind/issues" + }, + "homepage": "https://github.com/ljharb/call-bind#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4" + }, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } } diff --git a/node_modules/define-data-property/package.json b/node_modules/define-data-property/package.json index 91151d9f90..eec40971eb 100644 --- a/node_modules/define-data-property/package.json +++ b/node_modules/define-data-property/package.json @@ -1,106 +1,106 @@ { - "name": "define-data-property", - "version": "1.1.4", - "description": "Define a data property on an object. Will fall back to assignment in an engine without descriptors.", - "main": "index.js", - "types": "./index.d.ts", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "tsc": "tsc -p .", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "npm run tsc", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/define-data-property.git" - }, - "keywords": [ - "define", - "data", - "property", - "object", - "accessor", - "javascript", - "ecmascript", - "enumerable", - "configurable", - "writable" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/define-data-property/issues" - }, - "homepage": "https://github.com/ljharb/define-data-property#readme", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "@types/call-bind": "^1.0.5", - "@types/define-properties": "^1.1.5", - "@types/es-value-fixtures": "^1.4.4", - "@types/for-each": "^0.3.3", - "@types/get-intrinsic": "^1.2.2", - "@types/gopd": "^1.0.3", - "@types/has-property-descriptors": "^1.0.3", - "@types/object-inspect": "^1.8.4", - "@types/object.getownpropertydescriptors": "^2.1.4", - "@types/tape": "^5.6.4", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "es-value-fixtures": "^1.4.2", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "for-each": "^0.3.3", - "hasown": "^2.0.1", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "object-inspect": "^1.13.1", - "object.getownpropertydescriptors": "^2.1.7", - "reflect.ownkeys": "^1.1.4", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.4", - "typescript": "next" - }, - "engines": { - "node": ">= 0.4" - }, - "testling": { - "files": "test/index.js" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows", - "types/reflect.ownkeys" - ] - } + "name": "define-data-property", + "version": "1.1.4", + "description": "Define a data property on an object. Will fall back to assignment in an engine without descriptors.", + "main": "index.js", + "types": "./index.d.ts", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "tsc": "tsc -p .", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "npm run tsc", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/define-data-property.git" + }, + "keywords": [ + "define", + "data", + "property", + "object", + "accessor", + "javascript", + "ecmascript", + "enumerable", + "configurable", + "writable" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/define-data-property/issues" + }, + "homepage": "https://github.com/ljharb/define-data-property#readme", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/call-bind": "^1.0.5", + "@types/define-properties": "^1.1.5", + "@types/es-value-fixtures": "^1.4.4", + "@types/for-each": "^0.3.3", + "@types/get-intrinsic": "^1.2.2", + "@types/gopd": "^1.0.3", + "@types/has-property-descriptors": "^1.0.3", + "@types/object-inspect": "^1.8.4", + "@types/object.getownpropertydescriptors": "^2.1.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "hasown": "^2.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "object.getownpropertydescriptors": "^2.1.7", + "reflect.ownkeys": "^1.1.4", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "types/reflect.ownkeys" + ] + } } diff --git a/node_modules/degenerator/node_modules/tslib/modules/index.d.ts b/node_modules/degenerator/node_modules/tslib/modules/index.d.ts index 3244fabeec..0fedae881e 100644 --- a/node_modules/degenerator/node_modules/tslib/modules/index.d.ts +++ b/node_modules/degenerator/node_modules/tslib/modules/index.d.ts @@ -33,6 +33,5 @@ export { __createBinding, __addDisposableResource, __disposeResources, - __rewriteRelativeImportExtension, } from '../tslib.js'; export * as default from '../tslib.js'; diff --git a/node_modules/degenerator/node_modules/tslib/modules/index.js b/node_modules/degenerator/node_modules/tslib/modules/index.js index f4f9a06d2a..0c9dcd5f59 100644 --- a/node_modules/degenerator/node_modules/tslib/modules/index.js +++ b/node_modules/degenerator/node_modules/tslib/modules/index.js @@ -31,7 +31,6 @@ const { __classPrivateFieldIn, __addDisposableResource, __disposeResources, - __rewriteRelativeImportExtension, } = tslib; export { __extends, @@ -65,6 +64,5 @@ export { __classPrivateFieldIn, __addDisposableResource, __disposeResources, - __rewriteRelativeImportExtension, }; export default tslib; diff --git a/node_modules/degenerator/node_modules/tslib/package.json b/node_modules/degenerator/node_modules/tslib/package.json index ee7ce69718..88f67e7f8b 100644 --- a/node_modules/degenerator/node_modules/tslib/package.json +++ b/node_modules/degenerator/node_modules/tslib/package.json @@ -2,7 +2,7 @@ "name": "tslib", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "2.8.0", + "version": "2.7.0", "license": "0BSD", "description": "Runtime library for TypeScript helper functions", "keywords": [ diff --git a/node_modules/degenerator/node_modules/tslib/tslib.d.ts b/node_modules/degenerator/node_modules/tslib/tslib.d.ts index 9c27e05864..7fdf69c113 100644 --- a/node_modules/degenerator/node_modules/tslib/tslib.d.ts +++ b/node_modules/degenerator/node_modules/tslib/tslib.d.ts @@ -451,10 +451,3 @@ export declare function __addDisposableResource(env: { stack: { value?: unkno * @seealso {@link __addDisposableResource} */ export declare function __disposeResources(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }): any; - -/** - * Transforms a relative import specifier ending in a non-declaration TypeScript file extension to its JavaScript file extension counterpart. - * @param path The import specifier. - * @param preserveJsx Causes '*.tsx' to transform to '*.jsx' instead of '*.js'. Should be true when `--jsx` is set to `preserve`. - */ -export declare function __rewriteRelativeImportExtension(path: string, preserveJsx?: boolean): string; \ No newline at end of file diff --git a/node_modules/degenerator/node_modules/tslib/tslib.es6.js b/node_modules/degenerator/node_modules/tslib/tslib.es6.js index 2cc91e2ad5..ff7d4ebc1c 100644 --- a/node_modules/degenerator/node_modules/tslib/tslib.es6.js +++ b/node_modules/degenerator/node_modules/tslib/tslib.es6.js @@ -1,393 +1,757 @@ /****************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ + + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + + export function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + } + + export var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); + } + + export function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + } + + export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + } + + export function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + } + + export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; + }; + + export function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; + }; + + export function __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); + }; + + export function __setFunctionName(f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + export function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + } + + export function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + } + + export function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + } + + export var __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + export function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + } + + export function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + } + + export function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + } + + /** @deprecated */ + export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + } + + /** @deprecated */ + export function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + } + + export function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + } + + export function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + } + + export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + } + + export function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } + } + + export function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + } + + export function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + export function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + } + + export function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; + } + + export function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + } + + export function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + } + + export function __classPrivateFieldIn(state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); + } + + export function __addDisposableResource(env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + + } + + var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; + + export function __disposeResources(env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + else s |= 1; + } + catch (e) { + fail(e); + } + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); + } -export function __rewriteRelativeImportExtension(path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; -} + export default { + __extends: __extends, + __assign: __assign, + __rest: __rest, + __decorate: __decorate, + __param: __param, - __esDecorate: __esDecorate, - __runInitializers: __runInitializers, - __propKey: __propKey, - __setFunctionName: __setFunctionName, + __metadata: __metadata, + __awaiter: __awaiter, + __generator: __generator, + __createBinding: __createBinding, + __exportStar: __exportStar, + __values: __values, + __read: __read, + __spread: __spread, + __spreadArrays: __spreadArrays, + __spreadArray: __spreadArray, + __await: __await, + __asyncGenerator: __asyncGenerator, + __asyncDelegator: __asyncDelegator, + __asyncValues: __asyncValues, + __makeTemplateObject: __makeTemplateObject, + __importStar: __importStar, + __importDefault: __importDefault, + __classPrivateFieldGet: __classPrivateFieldGet, + __classPrivateFieldSet: __classPrivateFieldSet, + __classPrivateFieldIn: __classPrivateFieldIn, + __addDisposableResource: __addDisposableResource, + __disposeResources: __disposeResources, - __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, + }; diff --git a/node_modules/degenerator/node_modules/tslib/tslib.es6.mjs b/node_modules/degenerator/node_modules/tslib/tslib.es6.mjs index a1d9ef56b2..17bb2ff8f2 100644 --- a/node_modules/degenerator/node_modules/tslib/tslib.es6.mjs +++ b/node_modules/degenerator/node_modules/tslib/tslib.es6.mjs @@ -347,25 +347,12 @@ export function __disposeResources(env) { return next(); } -export function __rewriteRelativeImportExtension(path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; -} - export default { __extends, __assign, __rest, __decorate, __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, __metadata, __awaiter, __generator, @@ -388,5 +375,4 @@ export default { __classPrivateFieldIn, __addDisposableResource, __disposeResources, - __rewriteRelativeImportExtension, }; diff --git a/node_modules/degenerator/node_modules/tslib/tslib.js b/node_modules/degenerator/node_modules/tslib/tslib.js index 66fee315d2..8059193da5 100644 --- a/node_modules/degenerator/node_modules/tslib/tslib.js +++ b/node_modules/degenerator/node_modules/tslib/tslib.js @@ -1,475 +1,857 @@ /****************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + /* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */ + var __extends; + var __assign; + var __rest; + var __decorate; + var __param; + var __esDecorate; + var __runInitializers; + var __propKey; + var __setFunctionName; + var __metadata; + var __awaiter; + var __generator; + var __exportStar; + var __values; + var __read; + var __spread; + var __spreadArrays; + var __spreadArray; + var __await; + var __asyncGenerator; + var __asyncDelegator; + var __asyncValues; + var __makeTemplateObject; + var __importStar; + var __importDefault; + var __classPrivateFieldGet; + var __classPrivateFieldSet; + var __classPrivateFieldIn; + var __createBinding; + var __addDisposableResource; + var __disposeResources; -var __rewriteRelativeImportExtension; + (function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if (typeof module === "object" && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } + }) + (function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; + }; + + __runInitializers = function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; + }; + + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; + + __setFunctionName = function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); + }; + + __addDisposableResource = function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; + + __disposeResources = function (env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + else s |= 1; + } + catch (e) { + fail(e); + } + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); + }; - __rewriteRelativeImportExtension = function (path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; - }; + exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__esDecorate", __esDecorate); - exporter("__runInitializers", __runInitializers); - exporter("__propKey", __propKey); - exporter("__setFunctionName", __setFunctionName); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); - exporter("__addDisposableResource", __addDisposableResource); - exporter("__disposeResources", __disposeResources); - exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); -}); -0 && (module.exports = { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __createBinding, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, + exporter("__assign", __assign); + + exporter("__rest", __rest); + + exporter("__decorate", __decorate); + + exporter("__param", __param); + + exporter("__esDecorate", __esDecorate); + + exporter("__runInitializers", __runInitializers); + + exporter("__propKey", __propKey); + + exporter("__setFunctionName", __setFunctionName); + + exporter("__metadata", __metadata); + + exporter("__awaiter", __awaiter); + + exporter("__generator", __generator); + + exporter("__exportStar", __exportStar); + + exporter("__createBinding", __createBinding); + + exporter("__values", __values); + + exporter("__read", __read); + + exporter("__spread", __spread); + + exporter("__spreadArrays", __spreadArrays); + + exporter("__spreadArray", __spreadArray); + + exporter("__await", __await); + + exporter("__asyncGenerator", __asyncGenerator); + + exporter("__asyncDelegator", __asyncDelegator); + + exporter("__asyncValues", __asyncValues); + + exporter("__makeTemplateObject", __makeTemplateObject); + + exporter("__importStar", __importStar); + + exporter("__importDefault", __importDefault); + + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + + exporter("__addDisposableResource", __addDisposableResource); + + exporter("__disposeResources", __disposeResources); + }); diff --git a/node_modules/es-define-property/package.json b/node_modules/es-define-property/package.json index 5d4a3cf39a..45bc90f3e8 100644 --- a/node_modules/es-define-property/package.json +++ b/node_modules/es-define-property/package.json @@ -1,81 +1,81 @@ { - "name": "es-define-property", - "version": "1.0.0", - "description": "`Object.defineProperty`, but not IE 8's broken one.", - "main": "index.js", - "types": "./index.d.ts", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/es-define-property.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "object", - "define", - "property", - "defineProperty", - "Object.defineProperty" - ], - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/es-define-property/issues" - }, - "homepage": "https://github.com/ljharb/es-define-property#readme", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "@types/get-intrinsic": "^1.2.2", - "@types/gopd": "^1.0.3", - "@types/tape": "^5.6.4", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "eslint": "^8.8.0", - "evalmd": "^0.0.19", - "gopd": "^1.0.1", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.4", - "typescript": "next" - }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } + "name": "es-define-property", + "version": "1.0.0", + "description": "`Object.defineProperty`, but not IE 8's broken one.", + "main": "index.js", + "types": "./index.d.ts", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/es-define-property.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "object", + "define", + "property", + "defineProperty", + "Object.defineProperty" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/es-define-property/issues" + }, + "homepage": "https://github.com/ljharb/es-define-property#readme", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/get-intrinsic": "^1.2.2", + "@types/gopd": "^1.0.3", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "^8.8.0", + "evalmd": "^0.0.19", + "gopd": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } } diff --git a/node_modules/es-errors/package.json b/node_modules/es-errors/package.json index b5c07852cc..ff8c2a531b 100644 --- a/node_modules/es-errors/package.json +++ b/node_modules/es-errors/package.json @@ -1,80 +1,80 @@ { - "name": "es-errors", - "version": "1.3.0", - "description": "A simple cache for a few of the JS Error constructors.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./eval": "./eval.js", - "./range": "./range.js", - "./ref": "./ref.js", - "./syntax": "./syntax.js", - "./type": "./type.js", - "./uri": "./uri.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "nyc tape 'test/**/*.js'", - "posttest": "aud --production", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/es-errors.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "error", - "typeerror", - "syntaxerror", - "rangeerror" - ], - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/es-errors/issues" - }, - "homepage": "https://github.com/ljharb/es-errors#readme", - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "@types/tape": "^5.6.4", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "eclint": "^2.8.1", - "eslint": "^8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.4", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } + "name": "es-errors", + "version": "1.3.0", + "description": "A simple cache for a few of the JS Error constructors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./eval": "./eval.js", + "./range": "./range.js", + "./ref": "./ref.js", + "./syntax": "./syntax.js", + "./type": "./type.js", + "./uri": "./uri.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "aud --production", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/es-errors.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "error", + "typeerror", + "syntaxerror", + "rangeerror" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/es-errors/issues" + }, + "homepage": "https://github.com/ljharb/es-errors#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eclint": "^2.8.1", + "eslint": "^8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } } diff --git a/node_modules/esbuild/LICENSE.md b/node_modules/esbuild/LICENSE.md deleted file mode 100644 index 2027e8dcf3..0000000000 --- a/node_modules/esbuild/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Evan Wallace - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -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. diff --git a/node_modules/esbuild/bin/esbuild b/node_modules/esbuild/bin/esbuild index 06f4563548..e43f477cff 100755 --- a/node_modules/esbuild/bin/esbuild +++ b/node_modules/esbuild/bin/esbuild @@ -1,70 +1,53 @@ #!/usr/bin/env node -"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); +var __reExport = (target, module2, copyDefault, desc) => { + if (module2 && typeof module2 === "object" || typeof module2 === "function") { + for (let key of __getOwnPropNames(module2)) + if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default")) + __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); } - return to; + return target; +}; +var __toESM = (module2, isNodeMode) => { + return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); }; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); // lib/npm/node-platform.ts var fs = require("fs"); var os = require("os"); var path = require("path"); var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; -var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; -var packageDarwin_arm64 = "@esbuild/darwin-arm64"; -var packageDarwin_x64 = "@esbuild/darwin-x64"; var knownWindowsPackages = { - "win32 arm64 LE": "@esbuild/win32-arm64", - "win32 ia32 LE": "@esbuild/win32-ia32", - "win32 x64 LE": "@esbuild/win32-x64" + "win32 arm64 LE": "esbuild-windows-arm64", + "win32 ia32 LE": "esbuild-windows-32", + "win32 x64 LE": "esbuild-windows-64" }; var knownUnixlikePackages = { - "aix ppc64 BE": "@esbuild/aix-ppc64", - "android arm64 LE": "@esbuild/android-arm64", - "darwin arm64 LE": "@esbuild/darwin-arm64", - "darwin x64 LE": "@esbuild/darwin-x64", - "freebsd arm64 LE": "@esbuild/freebsd-arm64", - "freebsd x64 LE": "@esbuild/freebsd-x64", - "linux arm LE": "@esbuild/linux-arm", - "linux arm64 LE": "@esbuild/linux-arm64", - "linux ia32 LE": "@esbuild/linux-ia32", - "linux mips64el LE": "@esbuild/linux-mips64el", - "linux ppc64 LE": "@esbuild/linux-ppc64", - "linux riscv64 LE": "@esbuild/linux-riscv64", - "linux s390x BE": "@esbuild/linux-s390x", - "linux x64 LE": "@esbuild/linux-x64", - "linux loong64 LE": "@esbuild/linux-loong64", - "netbsd x64 LE": "@esbuild/netbsd-x64", - "openbsd arm64 LE": "@esbuild/openbsd-arm64", - "openbsd x64 LE": "@esbuild/openbsd-x64", - "sunos x64 LE": "@esbuild/sunos-x64" -}; -var knownWebAssemblyFallbackPackages = { - "android arm LE": "@esbuild/android-arm", - "android x64 LE": "@esbuild/android-x64" + "android arm64 LE": "esbuild-android-arm64", + "darwin arm64 LE": "esbuild-darwin-arm64", + "darwin x64 LE": "esbuild-darwin-64", + "freebsd arm64 LE": "esbuild-freebsd-arm64", + "freebsd x64 LE": "esbuild-freebsd-64", + "linux arm LE": "esbuild-linux-arm", + "linux arm64 LE": "esbuild-linux-arm64", + "linux ia32 LE": "esbuild-linux-32", + "linux mips64el LE": "esbuild-linux-mips64le", + "linux ppc64 LE": "esbuild-linux-ppc64le", + "linux s390x BE": "esbuild-linux-s390x", + "linux x64 LE": "esbuild-linux-64", + "netbsd x64 LE": "esbuild-netbsd-64", + "openbsd x64 LE": "esbuild-openbsd-64", + "sunos x64 LE": "esbuild-sunos-64" }; function pkgAndSubpathForCurrentPlatform() { let pkg; let subpath; - let isWASM2 = false; let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; if (platformKey in knownWindowsPackages) { pkg = knownWindowsPackages[platformKey]; @@ -72,14 +55,10 @@ function pkgAndSubpathForCurrentPlatform() { } else if (platformKey in knownUnixlikePackages) { pkg = knownUnixlikePackages[platformKey]; subpath = "bin/esbuild"; - } else if (platformKey in knownWebAssemblyFallbackPackages) { - pkg = knownWebAssemblyFallbackPackages[platformKey]; - subpath = "bin/esbuild"; - isWASM2 = true; } else { throw new Error(`Unsupported platform: ${platformKey}`); } - return { pkg, subpath, isWASM: isWASM2 }; + return { pkg, subpath }; } function pkgForSomeOtherPlatform() { const libMainJS = require.resolve("esbuild"); @@ -88,14 +67,16 @@ function pkgForSomeOtherPlatform() { for (const unixKey in knownUnixlikePackages) { try { const pkg = knownUnixlikePackages[unixKey]; - if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) + return pkg; } catch { } } for (const windowsKey in knownWindowsPackages) { try { const pkg = knownWindowsPackages[windowsKey]; - if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) + return pkg; } catch { } } @@ -104,29 +85,29 @@ function pkgForSomeOtherPlatform() { } function downloadedBinPath(pkg, subpath) { const esbuildLibDir = path.dirname(require.resolve("esbuild")); - return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); + return path.join(esbuildLibDir, `downloaded-${pkg}-${path.basename(subpath)}`); } function generateBinPath() { - if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { - if (!fs.existsSync(ESBUILD_BINARY_PATH)) { - console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); - } else { - return { binPath: ESBUILD_BINARY_PATH, isWASM: false }; - } + if (ESBUILD_BINARY_PATH) { + return ESBUILD_BINARY_PATH; } - const { pkg, subpath, isWASM: isWASM2 } = pkgAndSubpathForCurrentPlatform(); - let binPath2; + const { pkg, subpath } = pkgAndSubpathForCurrentPlatform(); + let binPath; try { - binPath2 = require.resolve(`${pkg}/${subpath}`); + binPath = require.resolve(`${pkg}/${subpath}`); } catch (e) { - binPath2 = downloadedBinPath(pkg, subpath); - if (!fs.existsSync(binPath2)) { + binPath = downloadedBinPath(pkg, subpath); + if (!fs.existsSync(binPath)) { try { require.resolve(pkg); } catch { const otherPkg = pkgForSomeOtherPlatform(); if (otherPkg) { - let suggestions = ` + throw new Error(` +You installed esbuild on another platform than the one you're currently using. +This won't work because esbuild is written with native code and needs to +install a platform-specific binary executable. + Specifically the "${otherPkg}" package is present but this platform needs the "${pkg}" package instead. People often get into this situation by installing esbuild on Windows or macOS and copying "node_modules" @@ -136,40 +117,14 @@ Windows and WSL environments. If you are installing with npm, you can try not copying the "node_modules" directory when you copy the files over, and running "npm ci" or "npm install" on the destination platform after the copy. Or you could consider using yarn -instead of npm which has built-in support for installing a package on multiple +instead which has built-in support for installing a package on multiple platforms simultaneously. If you are installing with yarn, you can try listing both this platform and the other platform in your ".yarnrc.yml" file using the "supportedArchitectures" feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures Keep in mind that this means multiple copies of esbuild will be present. -`; - if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) { - suggestions = ` -Specifically the "${otherPkg}" package is present but this platform -needs the "${pkg}" package instead. People often get into this -situation by installing esbuild with npm running inside of Rosetta 2 and then -trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta -2 is Apple's on-the-fly x86_64-to-arm64 translation service). -If you are installing with npm, you can try ensuring that both npm and node are -not running under Rosetta 2 and then reinstalling esbuild. This likely involves -changing how you installed npm and/or node. For example, installing node with -the universal installer here should work: https://nodejs.org/en/download/. Or -you could consider using yarn instead of npm which has built-in support for -installing a package on multiple platforms simultaneously. - -If you are installing with yarn, you can try listing both "arm64" and "x64" -in your ".yarnrc.yml" file using the "supportedArchitectures" feature: -https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures -Keep in mind that this means multiple copies of esbuild will be present. -`; - } - throw new Error(` -You installed esbuild for another platform than the one you're currently using. -This won't work because esbuild is written with native code and needs to -install a platform-specific binary executable. -${suggestions} Another alternative is to use the "esbuild-wasm" package instead, which works the same way on all platforms. But it comes with a heavy performance cost and can sometimes be 10x slower than the "esbuild" package, so you may also not @@ -179,43 +134,29 @@ want to do that. throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild. If you are installing esbuild with npm, make sure that you don't specify the -"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature -of "package.json" is used by esbuild to install the correct binary executable -for your current platform.`); +"--no-optional" flag. The "optionalDependencies" package.json feature is used +by esbuild to install the correct binary executable for your current platform.`); } throw e; } } - if (/\.zip\//.test(binPath2)) { - let pnpapi; - try { - pnpapi = require("pnpapi"); - } catch (e) { - } - if (pnpapi) { - const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation; - const binTargetPath = path.join( - root, - "node_modules", - ".cache", - "esbuild", - `pnpapi-${pkg.replace("/", "-")}-${"0.24.0"}-${path.basename(subpath)}` - ); - if (!fs.existsSync(binTargetPath)) { - fs.mkdirSync(path.dirname(binTargetPath), { recursive: true }); - fs.copyFileSync(binPath2, binTargetPath); - fs.chmodSync(binTargetPath, 493); - } - return { binPath: binTargetPath, isWASM: isWASM2 }; - } + let isYarnPnP = false; + try { + require("pnpapi"); + isYarnPnP = true; + } catch (e) { } - return { binPath: binPath2, isWASM: isWASM2 }; + if (isYarnPnP) { + const esbuildLibDir = path.dirname(require.resolve("esbuild")); + const binTargetPath = path.join(esbuildLibDir, `pnpapi-${pkg}-${path.basename(subpath)}`); + if (!fs.existsSync(binTargetPath)) { + fs.copyFileSync(binPath, binTargetPath); + fs.chmodSync(binTargetPath, 493); + } + return binTargetPath; + } + return binPath; } // lib/npm/node-shim.ts -var { binPath, isWASM } = generateBinPath(); -if (isWASM) { - require("child_process").execFileSync("node", [binPath].concat(process.argv.slice(2)), { stdio: "inherit" }); -} else { - require("child_process").execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" }); -} +require("child_process").execFileSync(generateBinPath(), process.argv.slice(2), { stdio: "inherit" }); diff --git a/node_modules/esbuild/install.js b/node_modules/esbuild/install.js index 86b6c4364c..df5450c735 100644 --- a/node_modules/esbuild/install.js +++ b/node_modules/esbuild/install.js @@ -1,67 +1,69 @@ -"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; +var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; +}; +var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); +var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); +var __reExport = (target, module2, copyDefault, desc) => { + if (module2 && typeof module2 === "object" || typeof module2 === "function") { + for (let key of __getOwnPropNames(module2)) + if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default")) + __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); + } + return target; +}; +var __toESM = (module2, isNodeMode) => { + return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); }; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); // lib/npm/node-platform.ts var fs = require("fs"); var os = require("os"); var path = require("path"); var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; -var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; var knownWindowsPackages = { - "win32 arm64 LE": "@esbuild/win32-arm64", - "win32 ia32 LE": "@esbuild/win32-ia32", - "win32 x64 LE": "@esbuild/win32-x64" + "win32 arm64 LE": "esbuild-windows-arm64", + "win32 ia32 LE": "esbuild-windows-32", + "win32 x64 LE": "esbuild-windows-64" }; var knownUnixlikePackages = { - "aix ppc64 BE": "@esbuild/aix-ppc64", - "android arm64 LE": "@esbuild/android-arm64", - "darwin arm64 LE": "@esbuild/darwin-arm64", - "darwin x64 LE": "@esbuild/darwin-x64", - "freebsd arm64 LE": "@esbuild/freebsd-arm64", - "freebsd x64 LE": "@esbuild/freebsd-x64", - "linux arm LE": "@esbuild/linux-arm", - "linux arm64 LE": "@esbuild/linux-arm64", - "linux ia32 LE": "@esbuild/linux-ia32", - "linux mips64el LE": "@esbuild/linux-mips64el", - "linux ppc64 LE": "@esbuild/linux-ppc64", - "linux riscv64 LE": "@esbuild/linux-riscv64", - "linux s390x BE": "@esbuild/linux-s390x", - "linux x64 LE": "@esbuild/linux-x64", - "linux loong64 LE": "@esbuild/linux-loong64", - "netbsd x64 LE": "@esbuild/netbsd-x64", - "openbsd arm64 LE": "@esbuild/openbsd-arm64", - "openbsd x64 LE": "@esbuild/openbsd-x64", - "sunos x64 LE": "@esbuild/sunos-x64" -}; -var knownWebAssemblyFallbackPackages = { - "android arm LE": "@esbuild/android-arm", - "android x64 LE": "@esbuild/android-x64" + "android arm64 LE": "esbuild-android-arm64", + "darwin arm64 LE": "esbuild-darwin-arm64", + "darwin x64 LE": "esbuild-darwin-64", + "freebsd arm64 LE": "esbuild-freebsd-arm64", + "freebsd x64 LE": "esbuild-freebsd-64", + "linux arm LE": "esbuild-linux-arm", + "linux arm64 LE": "esbuild-linux-arm64", + "linux ia32 LE": "esbuild-linux-32", + "linux mips64el LE": "esbuild-linux-mips64le", + "linux ppc64 LE": "esbuild-linux-ppc64le", + "linux s390x BE": "esbuild-linux-s390x", + "linux x64 LE": "esbuild-linux-64", + "netbsd x64 LE": "esbuild-netbsd-64", + "openbsd x64 LE": "esbuild-openbsd-64", + "sunos x64 LE": "esbuild-sunos-64" }; function pkgAndSubpathForCurrentPlatform() { let pkg; let subpath; - let isWASM = false; let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; if (platformKey in knownWindowsPackages) { pkg = knownWindowsPackages[platformKey]; @@ -69,18 +71,14 @@ function pkgAndSubpathForCurrentPlatform() { } else if (platformKey in knownUnixlikePackages) { pkg = knownUnixlikePackages[platformKey]; subpath = "bin/esbuild"; - } else if (platformKey in knownWebAssemblyFallbackPackages) { - pkg = knownWebAssemblyFallbackPackages[platformKey]; - subpath = "bin/esbuild"; - isWASM = true; } else { throw new Error(`Unsupported platform: ${platformKey}`); } - return { pkg, subpath, isWASM }; + return { pkg, subpath }; } function downloadedBinPath(pkg, subpath) { const esbuildLibDir = path.dirname(require.resolve("esbuild")); - return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); + return path.join(esbuildLibDir, `downloaded-${pkg}-${path.basename(subpath)}`); } // lib/npm/node-install.ts @@ -90,48 +88,13 @@ var path2 = require("path"); var zlib = require("zlib"); var https = require("https"); var child_process = require("child_process"); -var versionFromPackageJSON = require(path2.join(__dirname, "package.json")).version; var toPath = path2.join(__dirname, "bin", "esbuild"); var isToPathJS = true; function validateBinaryVersion(...command) { command.push("--version"); - let stdout; - try { - stdout = child_process.execFileSync(command.shift(), command, { - // Without this, this install script strangely crashes with the error - // "EACCES: permission denied, write" but only on Ubuntu Linux when node is - // installed from the Snap Store. This is not a problem when you download - // the official version of node. The problem appears to be that stderr - // (i.e. file descriptor 2) isn't writable? - // - // More info: - // - https://snapcraft.io/ (what the Snap Store is) - // - https://nodejs.org/dist/ (download the official version of node) - // - https://github.com/evanw/esbuild/issues/1711#issuecomment-1027554035 - // - stdio: "pipe" - }).toString().trim(); - } catch (err) { - if (os2.platform() === "darwin" && /_SecTrustEvaluateWithError/.test(err + "")) { - let os3 = "this version of macOS"; - try { - os3 = "macOS " + child_process.execFileSync("sw_vers", ["-productVersion"]).toString().trim(); - } catch { - } - throw new Error(`The "esbuild" package cannot be installed because ${os3} is too outdated. - -The Go compiler (which esbuild relies on) no longer supports ${os3}, -which means the "esbuild" binary executable can't be run. You can either: - - * Update your version of macOS to one that the Go compiler supports - * Use the "esbuild-wasm" package instead of the "esbuild" package - * Build esbuild yourself using an older version of the Go compiler -`); - } - throw err; - } - if (stdout !== versionFromPackageJSON) { - throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`); + const stdout = child_process.execFileSync(command.shift(), command).toString().trim(); + if (stdout !== "0.14.13") { + throw new Error(`Expected ${JSON.stringify("0.14.13")} but got ${JSON.stringify(stdout)}`); } } function isYarn() { @@ -168,23 +131,21 @@ function extractFileFromTarGzip(buffer, subpath) { let size = parseInt(str(offset + 124, 12), 8); offset += 512; if (!isNaN(size)) { - if (name === subpath) return buffer.subarray(offset, offset + size); + if (name === subpath) + return buffer.subarray(offset, offset + size); offset += size + 511 & ~511; } } throw new Error(`Could not find ${JSON.stringify(subpath)} in archive`); } function installUsingNPM(pkg, subpath, binPath) { - const env = { ...process.env, npm_config_global: void 0 }; + const env = __spreadProps(__spreadValues({}, process.env), { npm_config_global: void 0 }); const esbuildLibDir = path2.dirname(require.resolve("esbuild")); const installDir = path2.join(esbuildLibDir, "npm-install"); fs2.mkdirSync(installDir); try { fs2.writeFileSync(path2.join(installDir, "package.json"), "{}"); - child_process.execSync( - `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${versionFromPackageJSON}`, - { cwd: installDir, stdio: "pipe", env } - ); + child_process.execSync(`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${"0.14.13"}`, { cwd: installDir, stdio: "pipe", env }); const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath); fs2.renameSync(installedBinPath, binPath); } finally { @@ -203,8 +164,10 @@ function removeRecursive(dir) { } catch { continue; } - if (stats.isDirectory()) removeRecursive(entryPath); - else fs2.unlinkSync(entryPath); + if (stats.isDirectory()) + removeRecursive(entryPath); + else + fs2.unlinkSync(entryPath); } fs2.rmdirSync(dir); } @@ -231,7 +194,7 @@ function maybeOptimizePackage(binPath) { } } async function downloadDirectlyFromNPM(pkg, subpath, binPath) { - const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${versionFromPackageJSON}.tgz`; + const url = `https://registry.npmjs.org/${pkg}/-/${pkg}-${"0.14.13"}.tgz`; console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`); try { fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath)); @@ -242,13 +205,9 @@ async function downloadDirectlyFromNPM(pkg, subpath, binPath) { } } async function checkAndPreparePackage() { - if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { - if (!fs2.existsSync(ESBUILD_BINARY_PATH)) { - console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); - } else { - applyManualBinaryPathOverride(ESBUILD_BINARY_PATH); - return; - } + if (ESBUILD_BINARY_PATH) { + applyManualBinaryPathOverride(ESBUILD_BINARY_PATH); + return; } const { pkg, subpath } = pkgAndSubpathForCurrentPlatform(); let binPath; @@ -279,7 +238,7 @@ this. If that fails, you need to remove the "--no-optional" flag to use esbuild. } checkAndPreparePackage().then(() => { if (isToPathJS) { - validateBinaryVersion(process.execPath, toPath); + validateBinaryVersion("node", toPath); } else { validateBinaryVersion(toPath); } diff --git a/node_modules/esbuild/lib/main.d.ts b/node_modules/esbuild/lib/main.d.ts index c7053070fe..0f1796ac09 100644 --- a/node_modules/esbuild/lib/main.d.ts +++ b/node_modules/esbuild/lib/main.d.ts @@ -1,324 +1,281 @@ -export type Platform = 'browser' | 'node' | 'neutral' -export type Format = 'iife' | 'cjs' | 'esm' -export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx' -export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent' -export type Charset = 'ascii' | 'utf8' -export type Drop = 'console' | 'debugger' +export type Platform = 'browser' | 'node' | 'neutral'; +export type Format = 'iife' | 'cjs' | 'esm'; +export type Loader = 'js' | 'jsx' | 'ts' | 'tsx' | 'css' | 'json' | 'text' | 'base64' | 'file' | 'dataurl' | 'binary' | 'default'; +export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent'; +export type Charset = 'ascii' | 'utf8'; +export type Drop = 'console' | 'debugger'; interface CommonOptions { /** Documentation: https://esbuild.github.io/api/#sourcemap */ - sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both' + sourcemap?: boolean | 'inline' | 'external' | 'both'; /** Documentation: https://esbuild.github.io/api/#legal-comments */ - legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external' + legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external'; /** Documentation: https://esbuild.github.io/api/#source-root */ - sourceRoot?: string + sourceRoot?: string; /** Documentation: https://esbuild.github.io/api/#sources-content */ - sourcesContent?: boolean + sourcesContent?: boolean; /** Documentation: https://esbuild.github.io/api/#format */ - format?: Format - /** Documentation: https://esbuild.github.io/api/#global-name */ - globalName?: string + format?: Format; + /** Documentation: https://esbuild.github.io/api/#globalName */ + globalName?: string; /** Documentation: https://esbuild.github.io/api/#target */ - target?: string | string[] - /** Documentation: https://esbuild.github.io/api/#supported */ - supported?: Record - /** Documentation: https://esbuild.github.io/api/#platform */ - platform?: Platform + target?: string | string[]; - /** Documentation: https://esbuild.github.io/api/#mangle-props */ - mangleProps?: RegExp - /** Documentation: https://esbuild.github.io/api/#mangle-props */ - reserveProps?: RegExp - /** Documentation: https://esbuild.github.io/api/#mangle-props */ - mangleQuoted?: boolean - /** Documentation: https://esbuild.github.io/api/#mangle-props */ - mangleCache?: Record - /** Documentation: https://esbuild.github.io/api/#drop */ - drop?: Drop[] - /** Documentation: https://esbuild.github.io/api/#drop-labels */ - dropLabels?: string[] + drop?: Drop[]; /** Documentation: https://esbuild.github.io/api/#minify */ - minify?: boolean + minify?: boolean; /** Documentation: https://esbuild.github.io/api/#minify */ - minifyWhitespace?: boolean + minifyWhitespace?: boolean; /** Documentation: https://esbuild.github.io/api/#minify */ - minifyIdentifiers?: boolean + minifyIdentifiers?: boolean; /** Documentation: https://esbuild.github.io/api/#minify */ - minifySyntax?: boolean - /** Documentation: https://esbuild.github.io/api/#line-limit */ - lineLimit?: number + minifySyntax?: boolean; /** Documentation: https://esbuild.github.io/api/#charset */ - charset?: Charset + charset?: Charset; /** Documentation: https://esbuild.github.io/api/#tree-shaking */ - treeShaking?: boolean + treeShaking?: boolean; /** Documentation: https://esbuild.github.io/api/#ignore-annotations */ - ignoreAnnotations?: boolean + ignoreAnnotations?: boolean; /** Documentation: https://esbuild.github.io/api/#jsx */ - jsx?: 'transform' | 'preserve' | 'automatic' + jsx?: 'transform' | 'preserve'; /** Documentation: https://esbuild.github.io/api/#jsx-factory */ - jsxFactory?: string + jsxFactory?: string; /** Documentation: https://esbuild.github.io/api/#jsx-fragment */ - jsxFragment?: string - /** Documentation: https://esbuild.github.io/api/#jsx-import-source */ - jsxImportSource?: string - /** Documentation: https://esbuild.github.io/api/#jsx-development */ - jsxDev?: boolean - /** Documentation: https://esbuild.github.io/api/#jsx-side-effects */ - jsxSideEffects?: boolean + jsxFragment?: string; /** Documentation: https://esbuild.github.io/api/#define */ - define?: { [key: string]: string } + define?: { [key: string]: string }; /** Documentation: https://esbuild.github.io/api/#pure */ - pure?: string[] + pure?: string[]; /** Documentation: https://esbuild.github.io/api/#keep-names */ - keepNames?: boolean + keepNames?: boolean; /** Documentation: https://esbuild.github.io/api/#color */ - color?: boolean + color?: boolean; /** Documentation: https://esbuild.github.io/api/#log-level */ - logLevel?: LogLevel + logLevel?: LogLevel; /** Documentation: https://esbuild.github.io/api/#log-limit */ - logLimit?: number - /** Documentation: https://esbuild.github.io/api/#log-override */ - logOverride?: Record - - /** Documentation: https://esbuild.github.io/api/#tsconfig-raw */ - tsconfigRaw?: string | TsconfigRaw -} - -export interface TsconfigRaw { - compilerOptions?: { - alwaysStrict?: boolean - baseUrl?: string - experimentalDecorators?: boolean - importsNotUsedAsValues?: 'remove' | 'preserve' | 'error' - jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev' - jsxFactory?: string - jsxFragmentFactory?: string - jsxImportSource?: string - paths?: Record - preserveValueImports?: boolean - strict?: boolean - target?: string - useDefineForClassFields?: boolean - verbatimModuleSyntax?: boolean - } + logLimit?: number; } export interface BuildOptions extends CommonOptions { /** Documentation: https://esbuild.github.io/api/#bundle */ - bundle?: boolean + bundle?: boolean; /** Documentation: https://esbuild.github.io/api/#splitting */ - splitting?: boolean + splitting?: boolean; /** Documentation: https://esbuild.github.io/api/#preserve-symlinks */ - preserveSymlinks?: boolean + preserveSymlinks?: boolean; /** Documentation: https://esbuild.github.io/api/#outfile */ - outfile?: string + outfile?: string; /** Documentation: https://esbuild.github.io/api/#metafile */ - metafile?: boolean + metafile?: boolean; /** Documentation: https://esbuild.github.io/api/#outdir */ - outdir?: string + outdir?: string; /** Documentation: https://esbuild.github.io/api/#outbase */ - outbase?: string + outbase?: string; + /** Documentation: https://esbuild.github.io/api/#platform */ + platform?: Platform; /** Documentation: https://esbuild.github.io/api/#external */ - external?: string[] - /** Documentation: https://esbuild.github.io/api/#packages */ - packages?: 'bundle' | 'external' - /** Documentation: https://esbuild.github.io/api/#alias */ - alias?: Record + external?: string[]; /** Documentation: https://esbuild.github.io/api/#loader */ - loader?: { [ext: string]: Loader } + loader?: { [ext: string]: Loader }; /** Documentation: https://esbuild.github.io/api/#resolve-extensions */ - resolveExtensions?: string[] - /** Documentation: https://esbuild.github.io/api/#main-fields */ - mainFields?: string[] + resolveExtensions?: string[]; + /** Documentation: https://esbuild.github.io/api/#mainFields */ + mainFields?: string[]; /** Documentation: https://esbuild.github.io/api/#conditions */ - conditions?: string[] + conditions?: string[]; /** Documentation: https://esbuild.github.io/api/#write */ - write?: boolean + write?: boolean; /** Documentation: https://esbuild.github.io/api/#allow-overwrite */ - allowOverwrite?: boolean + allowOverwrite?: boolean; /** Documentation: https://esbuild.github.io/api/#tsconfig */ - tsconfig?: string + tsconfig?: string; /** Documentation: https://esbuild.github.io/api/#out-extension */ - outExtension?: { [ext: string]: string } + outExtension?: { [ext: string]: string }; /** Documentation: https://esbuild.github.io/api/#public-path */ - publicPath?: string + publicPath?: string; /** Documentation: https://esbuild.github.io/api/#entry-names */ - entryNames?: string + entryNames?: string; /** Documentation: https://esbuild.github.io/api/#chunk-names */ - chunkNames?: string + chunkNames?: string; /** Documentation: https://esbuild.github.io/api/#asset-names */ - assetNames?: string + assetNames?: string; /** Documentation: https://esbuild.github.io/api/#inject */ - inject?: string[] + inject?: string[]; /** Documentation: https://esbuild.github.io/api/#banner */ - banner?: { [type: string]: string } + banner?: { [type: string]: string }; /** Documentation: https://esbuild.github.io/api/#footer */ - footer?: { [type: string]: string } + footer?: { [type: string]: string }; + /** Documentation: https://esbuild.github.io/api/#incremental */ + incremental?: boolean; /** Documentation: https://esbuild.github.io/api/#entry-points */ - entryPoints?: string[] | Record | { in: string, out: string }[] + entryPoints?: string[] | Record; /** Documentation: https://esbuild.github.io/api/#stdin */ - stdin?: StdinOptions + stdin?: StdinOptions; /** Documentation: https://esbuild.github.io/plugins/ */ - plugins?: Plugin[] + plugins?: Plugin[]; /** Documentation: https://esbuild.github.io/api/#working-directory */ - absWorkingDir?: string + absWorkingDir?: string; /** Documentation: https://esbuild.github.io/api/#node-paths */ nodePaths?: string[]; // The "NODE_PATH" variable from Node.js + /** Documentation: https://esbuild.github.io/api/#watch */ + watch?: boolean | WatchMode; +} + +export interface WatchMode { + onRebuild?: (error: BuildFailure | null, result: BuildResult | null) => void; } export interface StdinOptions { - contents: string | Uint8Array - resolveDir?: string - sourcefile?: string - loader?: Loader + contents: string; + resolveDir?: string; + sourcefile?: string; + loader?: Loader; } export interface Message { - id: string - pluginName: string - text: string - location: Location | null - notes: Note[] + pluginName: string; + text: string; + location: Location | null; + notes: Note[]; /** * Optional user-specified data that is passed through unmodified. You can * use this to stash the original error, for example. */ - detail: any + detail: any; } export interface Note { - text: string - location: Location | null + text: string; + location: Location | null; } export interface Location { - file: string - namespace: string + file: string; + namespace: string; /** 1-based */ - line: number + line: number; /** 0-based, in bytes */ - column: number + column: number; /** in bytes */ - length: number - lineText: string - suggestion: string + length: number; + lineText: string; + suggestion: string; } export interface OutputFile { - path: string - contents: Uint8Array - hash: string - /** "contents" as text (changes automatically with "contents") */ - readonly text: string + path: string; + /** "text" as bytes */ + contents: Uint8Array; + /** "contents" as text */ + text: string; } -export interface BuildResult { - errors: Message[] - warnings: Message[] +export interface BuildInvalidate { + (): Promise; + dispose(): void; +} + +export interface BuildIncremental extends BuildResult { + rebuild: BuildInvalidate; +} + +export interface BuildResult { + errors: Message[]; + warnings: Message[]; /** Only when "write: false" */ - outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined) + outputFiles?: OutputFile[]; + /** Only when "incremental: true" */ + rebuild?: BuildInvalidate; + /** Only when "watch: true" */ + stop?: () => void; /** Only when "metafile: true" */ - metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined) - /** Only when "mangleCache" is present */ - mangleCache: Record | (ProvidedOptions['mangleCache'] extends Object ? never : undefined) + metafile?: Metafile; } export interface BuildFailure extends Error { - errors: Message[] - warnings: Message[] + errors: Message[]; + warnings: Message[]; } /** Documentation: https://esbuild.github.io/api/#serve-arguments */ export interface ServeOptions { - port?: number - host?: string - servedir?: string - keyfile?: string - certfile?: string - fallback?: string - onRequest?: (args: ServeOnRequestArgs) => void + port?: number; + host?: string; + servedir?: string; + onRequest?: (args: ServeOnRequestArgs) => void; } export interface ServeOnRequestArgs { - remoteAddress: string - method: string - path: string - status: number + remoteAddress: string; + method: string; + path: string; + status: number; /** The time to generate the response, not to send it */ - timeInMS: number + timeInMS: number; } /** Documentation: https://esbuild.github.io/api/#serve-return-values */ export interface ServeResult { - port: number - host: string + port: number; + host: string; + wait: Promise; + stop: () => void; } export interface TransformOptions extends CommonOptions { - /** Documentation: https://esbuild.github.io/api/#sourcefile */ - sourcefile?: string - /** Documentation: https://esbuild.github.io/api/#loader */ - loader?: Loader - /** Documentation: https://esbuild.github.io/api/#banner */ - banner?: string - /** Documentation: https://esbuild.github.io/api/#footer */ - footer?: string + tsconfigRaw?: string | { + compilerOptions?: { + jsxFactory?: string, + jsxFragmentFactory?: string, + useDefineForClassFields?: boolean, + importsNotUsedAsValues?: 'remove' | 'preserve' | 'error', + preserveValueImports?: boolean, + }, + }; + + sourcefile?: string; + loader?: Loader; + banner?: string; + footer?: string; } -export interface TransformResult { - code: string - map: string - warnings: Message[] - /** Only when "mangleCache" is present */ - mangleCache: Record | (ProvidedOptions['mangleCache'] extends Object ? never : undefined) - /** Only when "legalComments" is "external" */ - legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined) +export interface TransformResult { + code: string; + map: string; + warnings: Message[]; } export interface TransformFailure extends Error { - errors: Message[] - warnings: Message[] + errors: Message[]; + warnings: Message[]; } export interface Plugin { - name: string - setup: (build: PluginBuild) => (void | Promise) + name: string; + setup: (build: PluginBuild) => (void | Promise); } export interface PluginBuild { - /** Documentation: https://esbuild.github.io/plugins/#build-options */ - initialOptions: BuildOptions + initialOptions: BuildOptions; + resolve(path: string, options?: ResolveOptions): Promise; - /** Documentation: https://esbuild.github.io/plugins/#resolve */ - resolve(path: string, options?: ResolveOptions): Promise - - /** Documentation: https://esbuild.github.io/plugins/#on-start */ onStart(callback: () => - (OnStartResult | null | void | Promise)): void - - /** Documentation: https://esbuild.github.io/plugins/#on-end */ + (OnStartResult | null | void | Promise)): void; onEnd(callback: (result: BuildResult) => - (OnEndResult | null | void | Promise)): void - - /** Documentation: https://esbuild.github.io/plugins/#on-resolve */ + (void | Promise)): void; onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) => - (OnResolveResult | null | undefined | Promise)): void - - /** Documentation: https://esbuild.github.io/plugins/#on-load */ + (OnResolveResult | null | undefined | Promise)): void; onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) => - (OnLoadResult | null | undefined | Promise)): void - - /** Documentation: https://esbuild.github.io/plugins/#on-dispose */ - onDispose(callback: () => void): void + (OnLoadResult | null | undefined | Promise)): void; // This is a full copy of the esbuild library in case you need it esbuild: { - context: typeof context, + serve: typeof serve, build: typeof build, buildSync: typeof buildSync, transform: typeof transform, @@ -329,58 +286,47 @@ export interface PluginBuild { analyzeMetafileSync: typeof analyzeMetafileSync, initialize: typeof initialize, version: typeof version, - } + }; } -/** Documentation: https://esbuild.github.io/plugins/#resolve-options */ export interface ResolveOptions { - pluginName?: string - importer?: string - namespace?: string - resolveDir?: string - kind?: ImportKind - pluginData?: any - with?: Record + pluginName?: string; + importer?: string; + namespace?: string; + resolveDir?: string; + kind?: ImportKind; + pluginData?: any; } -/** Documentation: https://esbuild.github.io/plugins/#resolve-results */ export interface ResolveResult { - errors: Message[] - warnings: Message[] + errors: Message[]; + warnings: Message[]; - path: string - external: boolean - sideEffects: boolean - namespace: string - suffix: string - pluginData: any + path: string; + external: boolean; + sideEffects: boolean; + namespace: string; + suffix: string; + pluginData: any; } export interface OnStartResult { - errors?: PartialMessage[] - warnings?: PartialMessage[] + errors?: PartialMessage[]; + warnings?: PartialMessage[]; } -export interface OnEndResult { - errors?: PartialMessage[] - warnings?: PartialMessage[] -} - -/** Documentation: https://esbuild.github.io/plugins/#on-resolve-options */ export interface OnResolveOptions { - filter: RegExp - namespace?: string + filter: RegExp; + namespace?: string; } -/** Documentation: https://esbuild.github.io/plugins/#on-resolve-arguments */ export interface OnResolveArgs { - path: string - importer: string - namespace: string - resolveDir: string - kind: ImportKind - pluginData: any - with: Record + path: string; + importer: string; + namespace: string; + resolveDir: string; + kind: ImportKind; + pluginData: any; } export type ImportKind = @@ -394,73 +340,65 @@ export type ImportKind = // CSS | 'import-rule' - | 'composes-from' | 'url-token' -/** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */ export interface OnResolveResult { - pluginName?: string + pluginName?: string; - errors?: PartialMessage[] - warnings?: PartialMessage[] + errors?: PartialMessage[]; + warnings?: PartialMessage[]; - path?: string - external?: boolean - sideEffects?: boolean - namespace?: string - suffix?: string - pluginData?: any + path?: string; + external?: boolean; + sideEffects?: boolean; + namespace?: string; + suffix?: string; + pluginData?: any; - watchFiles?: string[] - watchDirs?: string[] + watchFiles?: string[]; + watchDirs?: string[]; } -/** Documentation: https://esbuild.github.io/plugins/#on-load-options */ export interface OnLoadOptions { - filter: RegExp - namespace?: string + filter: RegExp; + namespace?: string; } -/** Documentation: https://esbuild.github.io/plugins/#on-load-arguments */ export interface OnLoadArgs { - path: string - namespace: string - suffix: string - pluginData: any - with: Record + path: string; + namespace: string; + suffix: string; + pluginData: any; } -/** Documentation: https://esbuild.github.io/plugins/#on-load-results */ export interface OnLoadResult { - pluginName?: string + pluginName?: string; - errors?: PartialMessage[] - warnings?: PartialMessage[] + errors?: PartialMessage[]; + warnings?: PartialMessage[]; - contents?: string | Uint8Array - resolveDir?: string - loader?: Loader - pluginData?: any + contents?: string | Uint8Array; + resolveDir?: string; + loader?: Loader; + pluginData?: any; - watchFiles?: string[] - watchDirs?: string[] + watchFiles?: string[]; + watchDirs?: string[]; } export interface PartialMessage { - id?: string - pluginName?: string - text?: string - location?: Partial | null - notes?: PartialNote[] - detail?: any + pluginName?: string; + text?: string; + location?: Partial | null; + notes?: PartialNote[]; + detail?: any; } export interface PartialNote { - text?: string - location?: Partial | null + text?: string; + location?: Partial | null; } -/** Documentation: https://esbuild.github.io/api/#metafile */ export interface Metafile { inputs: { [path: string]: { @@ -468,12 +406,7 @@ export interface Metafile { imports: { path: string kind: ImportKind - external?: boolean - original?: string - with?: Record }[] - format?: 'cjs' | 'esm' - with?: Record } } outputs: { @@ -486,49 +419,25 @@ export interface Metafile { } imports: { path: string - kind: ImportKind | 'file-loader' - external?: boolean + kind: ImportKind }[] exports: string[] entryPoint?: string - cssBundle?: string } } } export interface FormatMessagesOptions { - kind: 'error' | 'warning' - color?: boolean - terminalWidth?: number + kind: 'error' | 'warning'; + color?: boolean; + terminalWidth?: number; } export interface AnalyzeMetafileOptions { - color?: boolean - verbose?: boolean + color?: boolean; + verbose?: boolean; } -export interface WatchOptions { -} - -export interface BuildContext { - /** Documentation: https://esbuild.github.io/api/#rebuild */ - rebuild(): Promise> - - /** Documentation: https://esbuild.github.io/api/#watch */ - watch(options?: WatchOptions): Promise - - /** Documentation: https://esbuild.github.io/api/#serve */ - serve(options?: ServeOptions): Promise - - cancel(): Promise - dispose(): Promise -} - -// This is a TypeScript type-level function which replaces any keys in "In" -// that aren't in "Out" with "never". We use this to reject properties with -// typos in object literals. See: https://stackoverflow.com/questions/49580725 -type SameShape = In & { [Key in Exclude]: never } - /** * This function invokes the "esbuild" command-line tool for you. It returns a * promise that either resolves with a "BuildResult" object or rejects with a @@ -537,20 +446,24 @@ type SameShape = In & { [Key in Exclude(options: SameShape): Promise> +export declare function build(options: BuildOptions & { write: false }): Promise; +export declare function build(options: BuildOptions & { incremental: true, metafile: true }): Promise; +export declare function build(options: BuildOptions & { incremental: true }): Promise; +export declare function build(options: BuildOptions & { metafile: true }): Promise; +export declare function build(options: BuildOptions): Promise; /** - * This is the advanced long-running form of "build" that supports additional - * features such as watch mode and a local development server. + * This function is similar to "build" but it serves the resulting files over + * HTTP on a localhost address with the specified port. * * - Works in node: yes * - Works in browser: no * - * Documentation: https://esbuild.github.io/api/#build + * Documentation: https://esbuild.github.io/api/#serve */ -export declare function context(options: SameShape): Promise> +export declare function serve(serveOptions: ServeOptions, buildOptions: BuildOptions): Promise; /** * This function transforms a single JavaScript file. It can be used to minify @@ -561,9 +474,9 @@ export declare function context(options: SameShape(input: string | Uint8Array, options?: SameShape): Promise> +export declare function transform(input: string, options?: TransformOptions): Promise; /** * Converts log messages to formatted message strings suitable for printing in @@ -573,7 +486,7 @@ export declare function transform(input: string | Ui * - Works in node: yes * - Works in browser: yes */ -export declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise +export declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise; /** * Pretty-prints an analysis of the metafile JSON to a string. This is just for @@ -585,7 +498,7 @@ export declare function formatMessages(messages: PartialMessage[], options: Form * * Documentation: https://esbuild.github.io/api/#analyze */ -export declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise +export declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise; /** * A synchronous version of "build". @@ -593,9 +506,10 @@ export declare function analyzeMetafile(metafile: Metafile | string, options?: A * - Works in node: yes * - Works in browser: no * - * Documentation: https://esbuild.github.io/api/#build + * Documentation: https://esbuild.github.io/api/#build-api */ -export declare function buildSync(options: SameShape): BuildResult +export declare function buildSync(options: BuildOptions & { write: false }): BuildResult & { outputFiles: OutputFile[] }; +export declare function buildSync(options: BuildOptions): BuildResult; /** * A synchronous version of "transform". @@ -603,9 +517,9 @@ export declare function buildSync(options: SameShape(input: string | Uint8Array, options?: SameShape): TransformResult +export declare function transformSync(input: string, options?: TransformOptions): TransformResult; /** * A synchronous version of "formatMessages". @@ -613,7 +527,7 @@ export declare function transformSync(input: string * - Works in node: yes * - Works in browser: no */ -export declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[] +export declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[]; /** * A synchronous version of "analyzeMetafile". @@ -623,7 +537,7 @@ export declare function formatMessagesSync(messages: PartialMessage[], options: * * Documentation: https://esbuild.github.io/api/#analyze */ -export declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string +export declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string; /** * This configures the browser-based version of esbuild. It is necessary to @@ -633,26 +547,16 @@ export declare function analyzeMetafileSync(metafile: Metafile | string, options * - Works in node: yes * - Works in browser: yes ("options" is required) * - * Documentation: https://esbuild.github.io/api/#browser + * Documentation: https://esbuild.github.io/api/#running-in-the-browser */ -export declare function initialize(options: InitializeOptions): Promise +export declare function initialize(options: InitializeOptions): Promise; export interface InitializeOptions { /** * The URL of the "esbuild.wasm" file. This must be provided when running * esbuild in the browser. */ - wasmURL?: string | URL - - /** - * The result of calling "new WebAssembly.Module(buffer)" where "buffer" - * is a typed array or ArrayBuffer containing the binary code of the - * "esbuild.wasm" file. - * - * You can use this as an alternative to "wasmURL" for environments where it's - * not possible to download the WebAssembly module. - */ - wasmModule?: WebAssembly.Module + wasmURL?: string /** * By default esbuild runs the WebAssembly-based browser API in a web worker @@ -662,44 +566,4 @@ export interface InitializeOptions { worker?: boolean } -export let version: string - -// Call this function to terminate esbuild's child process. The child process -// is not terminated and re-created after each API call because it's more -// efficient to keep it around when there are multiple API calls. -// -// In node this happens automatically before the parent node process exits. So -// you only need to call this if you know you will not make any more esbuild -// API calls and you want to clean up resources. -// -// Unlike node, Deno lacks the necessary APIs to clean up child processes -// automatically. You must manually call stop() in Deno when you're done -// using esbuild or Deno will continue running forever. -// -// Another reason you might want to call this is if you are using esbuild from -// within a Deno test. Deno fails tests that create a child process without -// killing it before the test ends, so you have to call this function (and -// await the returned promise) in every Deno test that uses esbuild. -export declare function stop(): Promise - -// Note: These declarations exist to avoid type errors when you omit "dom" from -// "lib" in your "tsconfig.json" file. TypeScript confusingly declares the -// global "WebAssembly" type in "lib.dom.d.ts" even though it has nothing to do -// with the browser DOM and is present in many non-browser JavaScript runtimes -// (e.g. node and deno). Declaring it here allows esbuild's API to be used in -// these scenarios. -// -// There's an open issue about getting this problem corrected (although these -// declarations will need to remain even if this is fixed for backward -// compatibility with older TypeScript versions): -// -// https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/826 -// -declare global { - namespace WebAssembly { - interface Module { - } - } - interface URL { - } -} +export let version: string; diff --git a/node_modules/esbuild/lib/main.js b/node_modules/esbuild/lib/main.js index a2a6591df0..c0f1a99108 100644 --- a/node_modules/esbuild/lib/main.js +++ b/node_modules/esbuild/lib/main.js @@ -1,31 +1,47 @@ -"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; +var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; +}; +var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); +var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +var __reExport = (target, module2, copyDefault, desc) => { + if (module2 && typeof module2 === "object" || typeof module2 === "function") { + for (let key of __getOwnPropNames(module2)) + if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default")) + __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); } - return to; + return target; }; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var __toESM = (module2, isNodeMode) => { + return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); +}; +var __toCommonJS = /* @__PURE__ */ ((cache) => { + return (module2, temp) => { + return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp); + }; +})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0); // lib/npm/node.ts var node_exports = {}; @@ -34,17 +50,14 @@ __export(node_exports, { analyzeMetafileSync: () => analyzeMetafileSync, build: () => build, buildSync: () => buildSync, - context: () => context, - default: () => node_default, formatMessages: () => formatMessages, formatMessagesSync: () => formatMessagesSync, initialize: () => initialize, - stop: () => stop, + serve: () => serve, transform: () => transform, transformSync: () => transformSync, version: () => version }); -module.exports = __toCommonJS(node_exports); // lib/shared/stdio_protocol.ts function encodePacket(packet) { @@ -180,30 +193,26 @@ var ByteBuffer = class { }; var encodeUTF8; var decodeUTF8; -var encodeInvariant; if (typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined") { let encoder = new TextEncoder(); let decoder = new TextDecoder(); encodeUTF8 = (text) => encoder.encode(text); decodeUTF8 = (bytes) => decoder.decode(bytes); - encodeInvariant = 'new TextEncoder().encode("")'; } else if (typeof Buffer !== "undefined") { - encodeUTF8 = (text) => Buffer.from(text); + encodeUTF8 = (text) => { + let buffer = Buffer.from(text); + if (!(buffer instanceof Uint8Array)) { + buffer = new Uint8Array(buffer); + } + return buffer; + }; decodeUTF8 = (bytes) => { let { buffer, byteOffset, byteLength } = bytes; return Buffer.from(buffer, byteOffset, byteLength).toString(); }; - encodeInvariant = 'Buffer.from("")'; } else { throw new Error("No UTF-8 codec found"); } -if (!(encodeUTF8("") instanceof Uint8Array)) - throw new Error(`Invariant violation: "${encodeInvariant} instanceof Uint8Array" is incorrectly false - -This indicates that your JavaScript environment is broken. You cannot use -esbuild in this environment because esbuild relies on this invariant. This -is not a problem with esbuild. You need to fix your environment instead. -`); function readUInt32LE(buffer, offset) { return buffer[offset++] | buffer[offset++] << 8 | buffer[offset++] << 16 | buffer[offset++] << 24; } @@ -215,87 +224,65 @@ function writeUInt32LE(buffer, value, offset) { } // lib/shared/common.ts -var quote = JSON.stringify; -var buildLogLevelDefault = "warning"; -var transformLogLevelDefault = "silent"; function validateTarget(target) { - validateStringValue(target, "target"); - if (target.indexOf(",") >= 0) throw new Error(`Invalid target: ${target}`); + target += ""; + if (target.indexOf(",") >= 0) + throw new Error(`Invalid target: ${target}`); return target; } var canBeAnything = () => null; var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean"; +var mustBeBooleanOrObject = (value) => typeof value === "boolean" || typeof value === "object" && !Array.isArray(value) ? null : "a boolean or an object"; var mustBeString = (value) => typeof value === "string" ? null : "a string"; var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object"; var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer"; var mustBeFunction = (value) => typeof value === "function" ? null : "a function"; var mustBeArray = (value) => Array.isArray(value) ? null : "an array"; var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object"; -var mustBeEntryPoints = (value) => typeof value === "object" && value !== null ? null : "an array or an object"; -var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module"; +var mustBeArrayOrRecord = (value) => typeof value === "object" && value !== null ? null : "an array or an object"; var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null"; var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean"; var mustBeStringOrObject = (value) => typeof value === "string" || typeof value === "object" && value !== null && !Array.isArray(value) ? null : "a string or an object"; var mustBeStringOrArray = (value) => typeof value === "string" || Array.isArray(value) ? null : "a string or an array"; var mustBeStringOrUint8Array = (value) => typeof value === "string" || value instanceof Uint8Array ? null : "a string or a Uint8Array"; -var mustBeStringOrURL = (value) => typeof value === "string" || value instanceof URL ? null : "a string or a URL"; function getFlag(object, keys, key, mustBeFn) { let value = object[key]; keys[key + ""] = true; - if (value === void 0) return void 0; + if (value === void 0) + return void 0; let mustBe = mustBeFn(value); - if (mustBe !== null) throw new Error(`${quote(key)} must be ${mustBe}`); + if (mustBe !== null) + throw new Error(`"${key}" must be ${mustBe}`); return value; } function checkForInvalidFlags(object, keys, where) { for (let key in object) { if (!(key in keys)) { - throw new Error(`Invalid option ${where}: ${quote(key)}`); + throw new Error(`Invalid option ${where}: "${key}"`); } } } function validateInitializeOptions(options) { let keys = /* @__PURE__ */ Object.create(null); - let wasmURL = getFlag(options, keys, "wasmURL", mustBeStringOrURL); - let wasmModule = getFlag(options, keys, "wasmModule", mustBeWebAssemblyModule); + let wasmURL = getFlag(options, keys, "wasmURL", mustBeString); let worker = getFlag(options, keys, "worker", mustBeBoolean); - checkForInvalidFlags(options, keys, "in initialize() call"); + checkForInvalidFlags(options, keys, "in startService() call"); return { wasmURL, - wasmModule, worker }; } -function validateMangleCache(mangleCache) { - let validated; - if (mangleCache !== void 0) { - validated = /* @__PURE__ */ Object.create(null); - for (let key in mangleCache) { - let value = mangleCache[key]; - if (typeof value === "string" || value === false) { - validated[key] = value; - } else { - throw new Error(`Expected ${quote(key)} in mangle cache to map to either a string or false`); - } - } - } - return validated; -} function pushLogFlags(flags, options, keys, isTTY2, logLevelDefault) { let color = getFlag(options, keys, "color", mustBeBoolean); let logLevel = getFlag(options, keys, "logLevel", mustBeString); let logLimit = getFlag(options, keys, "logLimit", mustBeInteger); - if (color !== void 0) flags.push(`--color=${color}`); - else if (isTTY2) flags.push(`--color=true`); + if (color !== void 0) + flags.push(`--color=${color}`); + else if (isTTY2) + flags.push(`--color=true`); flags.push(`--log-level=${logLevel || logLevelDefault}`); flags.push(`--log-limit=${logLimit || 0}`); } -function validateStringValue(value, what, key) { - if (typeof value !== "string") { - throw new Error(`Expected value for ${what}${key !== void 0 ? " " + quote(key) : ""} to be a string, got ${typeof value} instead`); - } - return value; -} function pushCommonFlags(flags, options, keys) { let legalComments = getFlag(options, keys, "legalComments", mustBeString); let sourceRoot = getFlag(options, keys, "sourceRoot", mustBeString); @@ -303,84 +290,71 @@ function pushCommonFlags(flags, options, keys) { let target = getFlag(options, keys, "target", mustBeStringOrArray); let format = getFlag(options, keys, "format", mustBeString); let globalName = getFlag(options, keys, "globalName", mustBeString); - let mangleProps = getFlag(options, keys, "mangleProps", mustBeRegExp); - let reserveProps = getFlag(options, keys, "reserveProps", mustBeRegExp); - let mangleQuoted = getFlag(options, keys, "mangleQuoted", mustBeBoolean); let minify = getFlag(options, keys, "minify", mustBeBoolean); let minifySyntax = getFlag(options, keys, "minifySyntax", mustBeBoolean); let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean); let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean); - let lineLimit = getFlag(options, keys, "lineLimit", mustBeInteger); let drop = getFlag(options, keys, "drop", mustBeArray); - let dropLabels = getFlag(options, keys, "dropLabels", mustBeArray); let charset = getFlag(options, keys, "charset", mustBeString); let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean); let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean); let jsx = getFlag(options, keys, "jsx", mustBeString); let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString); let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString); - let jsxImportSource = getFlag(options, keys, "jsxImportSource", mustBeString); - let jsxDev = getFlag(options, keys, "jsxDev", mustBeBoolean); - let jsxSideEffects = getFlag(options, keys, "jsxSideEffects", mustBeBoolean); let define = getFlag(options, keys, "define", mustBeObject); - let logOverride = getFlag(options, keys, "logOverride", mustBeObject); - let supported = getFlag(options, keys, "supported", mustBeObject); let pure = getFlag(options, keys, "pure", mustBeArray); let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean); - let platform = getFlag(options, keys, "platform", mustBeString); - let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject); - if (legalComments) flags.push(`--legal-comments=${legalComments}`); - if (sourceRoot !== void 0) flags.push(`--source-root=${sourceRoot}`); - if (sourcesContent !== void 0) flags.push(`--sources-content=${sourcesContent}`); + if (legalComments) + flags.push(`--legal-comments=${legalComments}`); + if (sourceRoot !== void 0) + flags.push(`--source-root=${sourceRoot}`); + if (sourcesContent !== void 0) + flags.push(`--sources-content=${sourcesContent}`); if (target) { - if (Array.isArray(target)) flags.push(`--target=${Array.from(target).map(validateTarget).join(",")}`); - else flags.push(`--target=${validateTarget(target)}`); + if (Array.isArray(target)) + flags.push(`--target=${Array.from(target).map(validateTarget).join(",")}`); + else + flags.push(`--target=${validateTarget(target)}`); } - if (format) flags.push(`--format=${format}`); - if (globalName) flags.push(`--global-name=${globalName}`); - if (platform) flags.push(`--platform=${platform}`); - if (tsconfigRaw) flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`); - if (minify) flags.push("--minify"); - if (minifySyntax) flags.push("--minify-syntax"); - if (minifyWhitespace) flags.push("--minify-whitespace"); - if (minifyIdentifiers) flags.push("--minify-identifiers"); - if (lineLimit) flags.push(`--line-limit=${lineLimit}`); - if (charset) flags.push(`--charset=${charset}`); - if (treeShaking !== void 0) flags.push(`--tree-shaking=${treeShaking}`); - if (ignoreAnnotations) flags.push(`--ignore-annotations`); - if (drop) for (let what of drop) flags.push(`--drop:${validateStringValue(what, "drop")}`); - if (dropLabels) flags.push(`--drop-labels=${Array.from(dropLabels).map((what) => validateStringValue(what, "dropLabels")).join(",")}`); - if (mangleProps) flags.push(`--mangle-props=${mangleProps.source}`); - if (reserveProps) flags.push(`--reserve-props=${reserveProps.source}`); - if (mangleQuoted !== void 0) flags.push(`--mangle-quoted=${mangleQuoted}`); - if (jsx) flags.push(`--jsx=${jsx}`); - if (jsxFactory) flags.push(`--jsx-factory=${jsxFactory}`); - if (jsxFragment) flags.push(`--jsx-fragment=${jsxFragment}`); - if (jsxImportSource) flags.push(`--jsx-import-source=${jsxImportSource}`); - if (jsxDev) flags.push(`--jsx-dev`); - if (jsxSideEffects) flags.push(`--jsx-side-effects`); + if (format) + flags.push(`--format=${format}`); + if (globalName) + flags.push(`--global-name=${globalName}`); + if (minify) + flags.push("--minify"); + if (minifySyntax) + flags.push("--minify-syntax"); + if (minifyWhitespace) + flags.push("--minify-whitespace"); + if (minifyIdentifiers) + flags.push("--minify-identifiers"); + if (charset) + flags.push(`--charset=${charset}`); + if (treeShaking !== void 0) + flags.push(`--tree-shaking=${treeShaking}`); + if (ignoreAnnotations) + flags.push(`--ignore-annotations`); + if (drop) + for (let what of drop) + flags.push(`--drop:${what}`); + if (jsx) + flags.push(`--jsx=${jsx}`); + if (jsxFactory) + flags.push(`--jsx-factory=${jsxFactory}`); + if (jsxFragment) + flags.push(`--jsx-fragment=${jsxFragment}`); if (define) { for (let key in define) { - if (key.indexOf("=") >= 0) throw new Error(`Invalid define: ${key}`); - flags.push(`--define:${key}=${validateStringValue(define[key], "define", key)}`); + if (key.indexOf("=") >= 0) + throw new Error(`Invalid define: ${key}`); + flags.push(`--define:${key}=${define[key]}`); } } - if (logOverride) { - for (let key in logOverride) { - if (key.indexOf("=") >= 0) throw new Error(`Invalid log override: ${key}`); - flags.push(`--log-override:${key}=${validateStringValue(logOverride[key], "log override", key)}`); - } - } - if (supported) { - for (let key in supported) { - if (key.indexOf("=") >= 0) throw new Error(`Invalid supported: ${key}`); - const value = supported[key]; - if (typeof value !== "boolean") throw new Error(`Expected value for supported ${quote(key)} to be a boolean, got ${typeof value} instead`); - flags.push(`--supported:${key}=${value}`); - } - } - if (pure) for (let fn of pure) flags.push(`--pure:${validateStringValue(fn, "pure")}`); - if (keepNames) flags.push(`--keep-names`); + if (pure) + for (let fn of pure) + flags.push(`--pure:${fn}`); + if (keepNames) + flags.push(`--keep-names`); } function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeDefault) { var _a2; @@ -389,24 +363,25 @@ function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeD let keys = /* @__PURE__ */ Object.create(null); let stdinContents = null; let stdinResolveDir = null; + let watchMode = null; pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); pushCommonFlags(flags, options, keys); let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); let bundle = getFlag(options, keys, "bundle", mustBeBoolean); + let watch = getFlag(options, keys, "watch", mustBeBooleanOrObject); let splitting = getFlag(options, keys, "splitting", mustBeBoolean); let preserveSymlinks = getFlag(options, keys, "preserveSymlinks", mustBeBoolean); let metafile = getFlag(options, keys, "metafile", mustBeBoolean); let outfile = getFlag(options, keys, "outfile", mustBeString); let outdir = getFlag(options, keys, "outdir", mustBeString); let outbase = getFlag(options, keys, "outbase", mustBeString); + let platform = getFlag(options, keys, "platform", mustBeString); let tsconfig = getFlag(options, keys, "tsconfig", mustBeString); let resolveExtensions = getFlag(options, keys, "resolveExtensions", mustBeArray); let nodePathsInput = getFlag(options, keys, "nodePaths", mustBeArray); let mainFields = getFlag(options, keys, "mainFields", mustBeArray); let conditions = getFlag(options, keys, "conditions", mustBeArray); let external = getFlag(options, keys, "external", mustBeArray); - let packages = getFlag(options, keys, "packages", mustBeString); - let alias = getFlag(options, keys, "alias", mustBeObject); let loader = getFlag(options, keys, "loader", mustBeObject); let outExtension = getFlag(options, keys, "outExtension", mustBeObject); let publicPath = getFlag(options, keys, "publicPath", mustBeString); @@ -416,43 +391,71 @@ function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeD let inject = getFlag(options, keys, "inject", mustBeArray); let banner = getFlag(options, keys, "banner", mustBeObject); let footer = getFlag(options, keys, "footer", mustBeObject); - let entryPoints = getFlag(options, keys, "entryPoints", mustBeEntryPoints); + let entryPoints = getFlag(options, keys, "entryPoints", mustBeArrayOrRecord); let absWorkingDir = getFlag(options, keys, "absWorkingDir", mustBeString); let stdin = getFlag(options, keys, "stdin", mustBeObject); let write = (_a2 = getFlag(options, keys, "write", mustBeBoolean)) != null ? _a2 : writeDefault; let allowOverwrite = getFlag(options, keys, "allowOverwrite", mustBeBoolean); - let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); + let incremental = getFlag(options, keys, "incremental", mustBeBoolean) === true; keys.plugins = true; checkForInvalidFlags(options, keys, `in ${callName}() call`); - if (sourcemap) flags.push(`--sourcemap${sourcemap === true ? "" : `=${sourcemap}`}`); - if (bundle) flags.push("--bundle"); - if (allowOverwrite) flags.push("--allow-overwrite"); - if (splitting) flags.push("--splitting"); - if (preserveSymlinks) flags.push("--preserve-symlinks"); - if (metafile) flags.push(`--metafile`); - if (outfile) flags.push(`--outfile=${outfile}`); - if (outdir) flags.push(`--outdir=${outdir}`); - if (outbase) flags.push(`--outbase=${outbase}`); - if (tsconfig) flags.push(`--tsconfig=${tsconfig}`); - if (packages) flags.push(`--packages=${packages}`); + if (sourcemap) + flags.push(`--sourcemap${sourcemap === true ? "" : `=${sourcemap}`}`); + if (bundle) + flags.push("--bundle"); + if (allowOverwrite) + flags.push("--allow-overwrite"); + if (watch) { + flags.push("--watch"); + if (typeof watch === "boolean") { + watchMode = {}; + } else { + let watchKeys = /* @__PURE__ */ Object.create(null); + let onRebuild = getFlag(watch, watchKeys, "onRebuild", mustBeFunction); + checkForInvalidFlags(watch, watchKeys, `on "watch" in ${callName}() call`); + watchMode = { onRebuild }; + } + } + if (splitting) + flags.push("--splitting"); + if (preserveSymlinks) + flags.push("--preserve-symlinks"); + if (metafile) + flags.push(`--metafile`); + if (outfile) + flags.push(`--outfile=${outfile}`); + if (outdir) + flags.push(`--outdir=${outdir}`); + if (outbase) + flags.push(`--outbase=${outbase}`); + if (platform) + flags.push(`--platform=${platform}`); + if (tsconfig) + flags.push(`--tsconfig=${tsconfig}`); if (resolveExtensions) { let values = []; for (let value of resolveExtensions) { - validateStringValue(value, "resolve extension"); - if (value.indexOf(",") >= 0) throw new Error(`Invalid resolve extension: ${value}`); + value += ""; + if (value.indexOf(",") >= 0) + throw new Error(`Invalid resolve extension: ${value}`); values.push(value); } flags.push(`--resolve-extensions=${values.join(",")}`); } - if (publicPath) flags.push(`--public-path=${publicPath}`); - if (entryNames) flags.push(`--entry-names=${entryNames}`); - if (chunkNames) flags.push(`--chunk-names=${chunkNames}`); - if (assetNames) flags.push(`--asset-names=${assetNames}`); + if (publicPath) + flags.push(`--public-path=${publicPath}`); + if (entryNames) + flags.push(`--entry-names=${entryNames}`); + if (chunkNames) + flags.push(`--chunk-names=${chunkNames}`); + if (assetNames) + flags.push(`--asset-names=${assetNames}`); if (mainFields) { let values = []; for (let value of mainFields) { - validateStringValue(value, "main field"); - if (value.indexOf(",") >= 0) throw new Error(`Invalid main field: ${value}`); + value += ""; + if (value.indexOf(",") >= 0) + throw new Error(`Invalid main field: ${value}`); values.push(value); } flags.push(`--main-fields=${values.join(",")}`); @@ -460,78 +463,72 @@ function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeD if (conditions) { let values = []; for (let value of conditions) { - validateStringValue(value, "condition"); - if (value.indexOf(",") >= 0) throw new Error(`Invalid condition: ${value}`); + value += ""; + if (value.indexOf(",") >= 0) + throw new Error(`Invalid condition: ${value}`); values.push(value); } flags.push(`--conditions=${values.join(",")}`); } - if (external) for (let name of external) flags.push(`--external:${validateStringValue(name, "external")}`); - if (alias) { - for (let old in alias) { - if (old.indexOf("=") >= 0) throw new Error(`Invalid package name in alias: ${old}`); - flags.push(`--alias:${old}=${validateStringValue(alias[old], "alias", old)}`); - } - } + if (external) + for (let name of external) + flags.push(`--external:${name}`); if (banner) { for (let type in banner) { - if (type.indexOf("=") >= 0) throw new Error(`Invalid banner file type: ${type}`); - flags.push(`--banner:${type}=${validateStringValue(banner[type], "banner", type)}`); + if (type.indexOf("=") >= 0) + throw new Error(`Invalid banner file type: ${type}`); + flags.push(`--banner:${type}=${banner[type]}`); } } if (footer) { for (let type in footer) { - if (type.indexOf("=") >= 0) throw new Error(`Invalid footer file type: ${type}`); - flags.push(`--footer:${type}=${validateStringValue(footer[type], "footer", type)}`); + if (type.indexOf("=") >= 0) + throw new Error(`Invalid footer file type: ${type}`); + flags.push(`--footer:${type}=${footer[type]}`); } } - if (inject) for (let path3 of inject) flags.push(`--inject:${validateStringValue(path3, "inject")}`); + if (inject) + for (let path3 of inject) + flags.push(`--inject:${path3}`); if (loader) { for (let ext in loader) { - if (ext.indexOf("=") >= 0) throw new Error(`Invalid loader extension: ${ext}`); - flags.push(`--loader:${ext}=${validateStringValue(loader[ext], "loader", ext)}`); + if (ext.indexOf("=") >= 0) + throw new Error(`Invalid loader extension: ${ext}`); + flags.push(`--loader:${ext}=${loader[ext]}`); } } if (outExtension) { for (let ext in outExtension) { - if (ext.indexOf("=") >= 0) throw new Error(`Invalid out extension: ${ext}`); - flags.push(`--out-extension:${ext}=${validateStringValue(outExtension[ext], "out extension", ext)}`); + if (ext.indexOf("=") >= 0) + throw new Error(`Invalid out extension: ${ext}`); + flags.push(`--out-extension:${ext}=${outExtension[ext]}`); } } if (entryPoints) { if (Array.isArray(entryPoints)) { - for (let i = 0, n = entryPoints.length; i < n; i++) { - let entryPoint = entryPoints[i]; - if (typeof entryPoint === "object" && entryPoint !== null) { - let entryPointKeys = /* @__PURE__ */ Object.create(null); - let input = getFlag(entryPoint, entryPointKeys, "in", mustBeString); - let output = getFlag(entryPoint, entryPointKeys, "out", mustBeString); - checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i); - if (input === void 0) throw new Error('Missing property "in" for entry point at index ' + i); - if (output === void 0) throw new Error('Missing property "out" for entry point at index ' + i); - entries.push([output, input]); - } else { - entries.push(["", validateStringValue(entryPoint, "entry point at index " + i)]); - } + for (let entryPoint of entryPoints) { + entries.push(["", entryPoint + ""]); } } else { - for (let key in entryPoints) { - entries.push([key, validateStringValue(entryPoints[key], "entry point", key)]); + for (let [key, value] of Object.entries(entryPoints)) { + entries.push([key + "", value + ""]); } } } if (stdin) { let stdinKeys = /* @__PURE__ */ Object.create(null); - let contents = getFlag(stdin, stdinKeys, "contents", mustBeStringOrUint8Array); + let contents = getFlag(stdin, stdinKeys, "contents", mustBeString); let resolveDir = getFlag(stdin, stdinKeys, "resolveDir", mustBeString); let sourcefile = getFlag(stdin, stdinKeys, "sourcefile", mustBeString); let loader2 = getFlag(stdin, stdinKeys, "loader", mustBeString); checkForInvalidFlags(stdin, stdinKeys, 'in "stdin" object'); - if (sourcefile) flags.push(`--sourcefile=${sourcefile}`); - if (loader2) flags.push(`--loader=${loader2}`); - if (resolveDir) stdinResolveDir = resolveDir; - if (typeof contents === "string") stdinContents = encodeUTF8(contents); - else if (contents instanceof Uint8Array) stdinContents = contents; + if (sourcefile) + flags.push(`--sourcefile=${sourcefile}`); + if (loader2) + flags.push(`--loader=${loader2}`); + if (resolveDir) + stdinResolveDir = resolveDir + ""; + stdinContents = contents ? contents + "" : ""; } let nodePaths = []; if (nodePathsInput) { @@ -547,8 +544,9 @@ function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeD stdinContents, stdinResolveDir, absWorkingDir, + incremental, nodePaths, - mangleCache: validateMangleCache(mangleCache) + watch: watchMode }; } function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) { @@ -557,26 +555,32 @@ function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) { pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); pushCommonFlags(flags, options, keys); let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); + let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject); let sourcefile = getFlag(options, keys, "sourcefile", mustBeString); let loader = getFlag(options, keys, "loader", mustBeString); let banner = getFlag(options, keys, "banner", mustBeString); let footer = getFlag(options, keys, "footer", mustBeString); - let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); checkForInvalidFlags(options, keys, `in ${callName}() call`); - if (sourcemap) flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`); - if (sourcefile) flags.push(`--sourcefile=${sourcefile}`); - if (loader) flags.push(`--loader=${loader}`); - if (banner) flags.push(`--banner=${banner}`); - if (footer) flags.push(`--footer=${footer}`); - return { - flags, - mangleCache: validateMangleCache(mangleCache) - }; + if (sourcemap) + flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`); + if (tsconfigRaw) + flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`); + if (sourcefile) + flags.push(`--sourcefile=${sourcefile}`); + if (loader) + flags.push(`--loader=${loader}`); + if (banner) + flags.push(`--banner=${banner}`); + if (footer) + flags.push(`--footer=${footer}`); + return flags; } function createChannel(streamIn) { - const requestCallbacksByKey = {}; - const closeData = { didClose: false, reason: "" }; - let responseCallbacks = {}; + let responseCallbacks = /* @__PURE__ */ new Map(); + let pluginCallbacks = /* @__PURE__ */ new Map(); + let watchCallbacks = /* @__PURE__ */ new Map(); + let serveCallbacks = /* @__PURE__ */ new Map(); + let isClosed = false; let nextRequestID = 0; let nextBuildKey = 0; let stdout = new Uint8Array(16 * 1024); @@ -605,56 +609,107 @@ function createChannel(streamIn) { stdoutUsed -= offset; } }; - let afterClose = (error) => { - closeData.didClose = true; - if (error) closeData.reason = ": " + (error.message || error); - const text = "The service was stopped" + closeData.reason; - for (let id in responseCallbacks) { - responseCallbacks[id](text, null); + let afterClose = () => { + isClosed = true; + for (let callback of responseCallbacks.values()) { + callback("The service was stopped", null); } - responseCallbacks = {}; + responseCallbacks.clear(); + for (let callbacks of serveCallbacks.values()) { + callbacks.onWait("The service was stopped"); + } + serveCallbacks.clear(); + for (let callback of watchCallbacks.values()) { + try { + callback(new Error("The service was stopped"), null); + } catch (e) { + console.error(e); + } + } + watchCallbacks.clear(); }; let sendRequest = (refs, value, callback) => { - if (closeData.didClose) return callback("The service is no longer running" + closeData.reason, null); + if (isClosed) + return callback("The service is no longer running", null); let id = nextRequestID++; - responseCallbacks[id] = (error, response) => { + responseCallbacks.set(id, (error, response) => { try { callback(error, response); } finally { - if (refs) refs.unref(); + if (refs) + refs.unref(); } - }; - if (refs) refs.ref(); + }); + if (refs) + refs.ref(); streamIn.writeToStdin(encodePacket({ id, isRequest: true, value })); }; let sendResponse = (id, value) => { - if (closeData.didClose) throw new Error("The service is no longer running" + closeData.reason); + if (isClosed) + throw new Error("The service is no longer running"); streamIn.writeToStdin(encodePacket({ id, isRequest: false, value })); }; let handleRequest = async (id, request) => { try { - if (request.command === "ping") { - sendResponse(id, {}); - return; - } - if (typeof request.key === "number") { - const requestCallbacks = requestCallbacksByKey[request.key]; - if (!requestCallbacks) { - return; + switch (request.command) { + case "ping": { + sendResponse(id, {}); + break; } - const callback = requestCallbacks[request.command]; - if (callback) { - await callback(id, request); - return; + case "on-start": { + let callback = pluginCallbacks.get(request.key); + if (!callback) + sendResponse(id, {}); + else + sendResponse(id, await callback(request)); + break; } + case "on-resolve": { + let callback = pluginCallbacks.get(request.key); + if (!callback) + sendResponse(id, {}); + else + sendResponse(id, await callback(request)); + break; + } + case "on-load": { + let callback = pluginCallbacks.get(request.key); + if (!callback) + sendResponse(id, {}); + else + sendResponse(id, await callback(request)); + break; + } + case "serve-request": { + let callbacks = serveCallbacks.get(request.key); + if (callbacks && callbacks.onRequest) + callbacks.onRequest(request.args); + sendResponse(id, {}); + break; + } + case "serve-wait": { + let callbacks = serveCallbacks.get(request.key); + if (callbacks) + callbacks.onWait(request.error); + sendResponse(id, {}); + break; + } + case "watch-rebuild": { + let callback = watchCallbacks.get(request.key); + try { + if (callback) + callback(null, request.args); + } catch (err) { + console.error(err); + } + sendResponse(id, {}); + break; + } + default: + throw new Error(`Invalid command: ` + request.command); } - throw new Error(`Invalid command: ` + request.command); } catch (e) { - const errors = [extractErrorMessageV8(e, streamIn, null, void 0, "")]; - try { - sendResponse(id, { errors }); - } catch { - } + sendResponse(id, { errors: [extractErrorMessageV8(e, streamIn, null, void 0, "")] }); } }; let isFirstPacket = true; @@ -662,8 +717,8 @@ function createChannel(streamIn) { if (isFirstPacket) { isFirstPacket = false; let binaryVersion = String.fromCharCode(...bytes); - if (binaryVersion !== "0.24.0") { - throw new Error(`Cannot start service: Host version "${"0.24.0"}" does not match binary version ${quote(binaryVersion)}`); + if (binaryVersion !== "0.14.13") { + throw new Error(`Cannot start service: Host version "${"0.14.13"}" does not match binary version ${JSON.stringify(binaryVersion)}`); } return; } @@ -671,88 +726,624 @@ function createChannel(streamIn) { if (packet.isRequest) { handleRequest(packet.id, packet.value); } else { - let callback = responseCallbacks[packet.id]; - delete responseCallbacks[packet.id]; - if (packet.value.error) callback(packet.value.error, {}); - else callback(null, packet.value); + let callback = responseCallbacks.get(packet.id); + responseCallbacks.delete(packet.id); + if (packet.value.error) + callback(packet.value.error, {}); + else + callback(null, packet.value); } }; - let buildOrContext = ({ callName, refs, options, isTTY: isTTY2, defaultWD: defaultWD2, callback }) => { - let refCount = 0; - const buildKey = nextBuildKey++; - const requestCallbacks = {}; - const buildRefs = { - ref() { - if (++refCount === 1) { - if (refs) refs.ref(); + let handlePlugins = async (initialOptions, plugins, buildKey, stash, refs) => { + let onStartCallbacks = []; + let onEndCallbacks = []; + let onResolveCallbacks = {}; + let onLoadCallbacks = {}; + let nextCallbackID = 0; + let i = 0; + let requestPlugins = []; + let isSetupDone = false; + plugins = [...plugins]; + for (let item of plugins) { + let keys = {}; + if (typeof item !== "object") + throw new Error(`Plugin at index ${i} must be an object`); + const name = getFlag(item, keys, "name", mustBeString); + if (typeof name !== "string" || name === "") + throw new Error(`Plugin at index ${i} is missing a name`); + try { + let setup = getFlag(item, keys, "setup", mustBeFunction); + if (typeof setup !== "function") + throw new Error(`Plugin is missing a setup function`); + checkForInvalidFlags(item, keys, `on plugin ${JSON.stringify(name)}`); + let plugin = { + name, + onResolve: [], + onLoad: [] + }; + i++; + let resolve = (path3, options = {}) => { + if (!isSetupDone) + throw new Error('Cannot call "resolve" before plugin setup has completed'); + if (typeof path3 !== "string") + throw new Error(`The path to resolve must be a string`); + let keys2 = /* @__PURE__ */ Object.create(null); + let pluginName = getFlag(options, keys2, "pluginName", mustBeString); + let importer = getFlag(options, keys2, "importer", mustBeString); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString); + let kind = getFlag(options, keys2, "kind", mustBeString); + let pluginData = getFlag(options, keys2, "pluginData", canBeAnything); + checkForInvalidFlags(options, keys2, "in resolve() call"); + return new Promise((resolve2, reject) => { + const request = { + command: "resolve", + path: path3, + key: buildKey, + pluginName: name + }; + if (pluginName != null) + request.pluginName = pluginName; + if (importer != null) + request.importer = importer; + if (namespace != null) + request.namespace = namespace; + if (resolveDir != null) + request.resolveDir = resolveDir; + if (kind != null) + request.kind = kind; + if (pluginData != null) + request.pluginData = stash.store(pluginData); + sendRequest(refs, request, (error, response) => { + if (error !== null) + reject(new Error(error)); + else + resolve2({ + errors: replaceDetailsInMessages(response.errors, stash), + warnings: replaceDetailsInMessages(response.warnings, stash), + path: response.path, + external: response.external, + sideEffects: response.sideEffects, + namespace: response.namespace, + suffix: response.suffix, + pluginData: stash.load(response.pluginData) + }); + }); + }); + }; + let promise = setup({ + initialOptions, + resolve, + onStart(callback2) { + let registeredText = `This error came from the "onStart" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart"); + onStartCallbacks.push({ name, callback: callback2, note: registeredNote }); + }, + onEnd(callback2) { + let registeredText = `This error came from the "onEnd" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd"); + onEndCallbacks.push({ name, callback: callback2, note: registeredNote }); + }, + onResolve(options, callback2) { + let registeredText = `This error came from the "onResolve" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve"); + let keys2 = {}; + let filter = getFlag(options, keys2, "filter", mustBeRegExp); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${JSON.stringify(name)}`); + if (filter == null) + throw new Error(`onResolve() call is missing a filter`); + let id = nextCallbackID++; + onResolveCallbacks[id] = { name, callback: callback2, note: registeredNote }; + plugin.onResolve.push({ id, filter: filter.source, namespace: namespace || "" }); + }, + onLoad(options, callback2) { + let registeredText = `This error came from the "onLoad" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad"); + let keys2 = {}; + let filter = getFlag(options, keys2, "filter", mustBeRegExp); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${JSON.stringify(name)}`); + if (filter == null) + throw new Error(`onLoad() call is missing a filter`); + let id = nextCallbackID++; + onLoadCallbacks[id] = { name, callback: callback2, note: registeredNote }; + plugin.onLoad.push({ id, filter: filter.source, namespace: namespace || "" }); + }, + esbuild: streamIn.esbuild + }); + if (promise) + await promise; + requestPlugins.push(plugin); + } catch (e) { + return { ok: false, error: e, pluginName: name }; + } + } + const callback = async (request) => { + switch (request.command) { + case "on-start": { + let response = { errors: [], warnings: [] }; + await Promise.all(onStartCallbacks.map(async ({ name, callback: callback2, note }) => { + try { + let result = await callback2(); + if (result != null) { + if (typeof result !== "object") + throw new Error(`Expected onStart() callback in plugin ${JSON.stringify(name)} to return an object`); + let keys = {}; + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${JSON.stringify(name)}`); + if (errors != null) + response.errors.push(...sanitizeMessages(errors, "errors", stash, name)); + if (warnings != null) + response.warnings.push(...sanitizeMessages(warnings, "warnings", stash, name)); + } + } catch (e) { + response.errors.push(extractErrorMessageV8(e, streamIn, stash, note && note(), name)); + } + })); + return response; } - }, - unref() { - if (--refCount === 0) { - delete requestCallbacksByKey[buildKey]; - if (refs) refs.unref(); + case "on-resolve": { + let response = {}, name = "", callback2, note; + for (let id of request.ids) { + try { + ({ name, callback: callback2, note } = onResolveCallbacks[id]); + let result = await callback2({ + path: request.path, + importer: request.importer, + namespace: request.namespace, + resolveDir: request.resolveDir, + kind: request.kind, + pluginData: stash.load(request.pluginData) + }); + if (result != null) { + if (typeof result !== "object") + throw new Error(`Expected onResolve() callback in plugin ${JSON.stringify(name)} to return an object`); + let keys = {}; + let pluginName = getFlag(result, keys, "pluginName", mustBeString); + let path3 = getFlag(result, keys, "path", mustBeString); + let namespace = getFlag(result, keys, "namespace", mustBeString); + let suffix = getFlag(result, keys, "suffix", mustBeString); + let external = getFlag(result, keys, "external", mustBeBoolean); + let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean); + let pluginData = getFlag(result, keys, "pluginData", canBeAnything); + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray); + let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray); + checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${JSON.stringify(name)}`); + response.id = id; + if (pluginName != null) + response.pluginName = pluginName; + if (path3 != null) + response.path = path3; + if (namespace != null) + response.namespace = namespace; + if (suffix != null) + response.suffix = suffix; + if (external != null) + response.external = external; + if (sideEffects != null) + response.sideEffects = sideEffects; + if (pluginData != null) + response.pluginData = stash.store(pluginData); + if (errors != null) + response.errors = sanitizeMessages(errors, "errors", stash, name); + if (warnings != null) + response.warnings = sanitizeMessages(warnings, "warnings", stash, name); + if (watchFiles != null) + response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); + if (watchDirs != null) + response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); + break; + } + } catch (e) { + return { id, errors: [extractErrorMessageV8(e, streamIn, stash, note && note(), name)] }; + } + } + return response; + } + case "on-load": { + let response = {}, name = "", callback2, note; + for (let id of request.ids) { + try { + ({ name, callback: callback2, note } = onLoadCallbacks[id]); + let result = await callback2({ + path: request.path, + namespace: request.namespace, + suffix: request.suffix, + pluginData: stash.load(request.pluginData) + }); + if (result != null) { + if (typeof result !== "object") + throw new Error(`Expected onLoad() callback in plugin ${JSON.stringify(name)} to return an object`); + let keys = {}; + let pluginName = getFlag(result, keys, "pluginName", mustBeString); + let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array); + let resolveDir = getFlag(result, keys, "resolveDir", mustBeString); + let pluginData = getFlag(result, keys, "pluginData", canBeAnything); + let loader = getFlag(result, keys, "loader", mustBeString); + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray); + let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray); + checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${JSON.stringify(name)}`); + response.id = id; + if (pluginName != null) + response.pluginName = pluginName; + if (contents instanceof Uint8Array) + response.contents = contents; + else if (contents != null) + response.contents = encodeUTF8(contents); + if (resolveDir != null) + response.resolveDir = resolveDir; + if (pluginData != null) + response.pluginData = stash.store(pluginData); + if (loader != null) + response.loader = loader; + if (errors != null) + response.errors = sanitizeMessages(errors, "errors", stash, name); + if (warnings != null) + response.warnings = sanitizeMessages(warnings, "warnings", stash, name); + if (watchFiles != null) + response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); + if (watchDirs != null) + response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); + break; + } + } catch (e) { + return { id, errors: [extractErrorMessageV8(e, streamIn, stash, note && note(), name)] }; + } + } + return response; + } + default: + throw new Error(`Invalid command: ` + request.command); + } + }; + let runOnEndCallbacks = (result, logPluginError, done) => done(); + if (onEndCallbacks.length > 0) { + runOnEndCallbacks = (result, logPluginError, done) => { + (async () => { + for (const { name, callback: callback2, note } of onEndCallbacks) { + try { + await callback2(result); + } catch (e) { + result.errors.push(await new Promise((resolve) => logPluginError(e, name, note && note(), resolve))); + } + } + })().then(done); + }; + } + isSetupDone = true; + let refCount = 0; + return { + ok: true, + requestPlugins, + runOnEndCallbacks, + pluginRefs: { + ref() { + if (++refCount === 1) + pluginCallbacks.set(buildKey, callback); + }, + unref() { + if (--refCount === 0) + pluginCallbacks.delete(buildKey); } } }; - requestCallbacksByKey[buildKey] = requestCallbacks; - buildRefs.ref(); - buildOrContextImpl( - callName, - buildKey, - sendRequest, - sendResponse, - buildRefs, - streamIn, - requestCallbacks, - options, - isTTY2, - defaultWD2, - (err, res) => { - try { - callback(err, res); - } finally { - buildRefs.unref(); - } + }; + let buildServeData = (refs, options, request, key) => { + let keys = {}; + let port = getFlag(options, keys, "port", mustBeInteger); + let host = getFlag(options, keys, "host", mustBeString); + let servedir = getFlag(options, keys, "servedir", mustBeString); + let onRequest = getFlag(options, keys, "onRequest", mustBeFunction); + let onWait; + let wait = new Promise((resolve, reject) => { + onWait = (error) => { + serveCallbacks.delete(key); + if (error !== null) + reject(new Error(error)); + else + resolve(); + }; + }); + request.serve = {}; + checkForInvalidFlags(options, keys, `in serve() call`); + if (port !== void 0) + request.serve.port = port; + if (host !== void 0) + request.serve.host = host; + if (servedir !== void 0) + request.serve.servedir = servedir; + serveCallbacks.set(key, { + onRequest, + onWait + }); + return { + wait, + stop() { + sendRequest(refs, { command: "serve-stop", key }, () => { + }); } - ); + }; + }; + const buildLogLevelDefault = "warning"; + const transformLogLevelDefault = "silent"; + let buildOrServe = (args) => { + let key = nextBuildKey++; + const details = createObjectStash(); + let plugins; + let { refs, options, isTTY: isTTY2, callback } = args; + if (typeof options === "object") { + let value = options.plugins; + if (value !== void 0) { + if (!Array.isArray(value)) + throw new Error(`"plugins" must be an array`); + plugins = value; + } + } + let logPluginError = (e, pluginName, note, done) => { + let flags = []; + try { + pushLogFlags(flags, options, {}, isTTY2, buildLogLevelDefault); + } catch { + } + const message = extractErrorMessageV8(e, streamIn, details, note, pluginName); + sendRequest(refs, { command: "error", flags, error: message }, () => { + message.detail = details.load(message.detail); + done(message); + }); + }; + let handleError = (e, pluginName) => { + logPluginError(e, pluginName, void 0, (error) => { + callback(failureErrorWithLog("Build failed", [error], []), null); + }); + }; + if (plugins && plugins.length > 0) { + if (streamIn.isSync) + return handleError(new Error("Cannot use plugins in synchronous API calls"), ""); + handlePlugins(options, plugins, key, details, refs).then((result) => { + if (!result.ok) { + handleError(result.error, result.pluginName); + } else { + try { + buildOrServeContinue(__spreadProps(__spreadValues({}, args), { + key, + details, + logPluginError, + requestPlugins: result.requestPlugins, + runOnEndCallbacks: result.runOnEndCallbacks, + pluginRefs: result.pluginRefs + })); + } catch (e) { + handleError(e, ""); + } + } + }, (e) => handleError(e, "")); + } else { + try { + buildOrServeContinue(__spreadProps(__spreadValues({}, args), { + key, + details, + logPluginError, + requestPlugins: null, + runOnEndCallbacks: (result, logPluginError2, done) => done(), + pluginRefs: null + })); + } catch (e) { + handleError(e, ""); + } + } + }; + let buildOrServeContinue = ({ + callName, + refs: callerRefs, + serveOptions, + options, + isTTY: isTTY2, + defaultWD: defaultWD2, + callback, + key, + details, + logPluginError, + requestPlugins, + runOnEndCallbacks, + pluginRefs + }) => { + const refs = { + ref() { + if (pluginRefs) + pluginRefs.ref(); + if (callerRefs) + callerRefs.ref(); + }, + unref() { + if (pluginRefs) + pluginRefs.unref(); + if (callerRefs) + callerRefs.unref(); + } + }; + let writeDefault = !streamIn.isBrowser; + let { + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir, + incremental, + nodePaths, + watch + } = flagsForBuildOptions(callName, options, isTTY2, buildLogLevelDefault, writeDefault); + let request = { + command: "build", + key, + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir: absWorkingDir || defaultWD2, + incremental, + nodePaths + }; + if (requestPlugins) + request.plugins = requestPlugins; + let serve2 = serveOptions && buildServeData(refs, serveOptions, request, key); + let rebuild; + let stop; + let copyResponseToResult = (response, result) => { + if (response.outputFiles) + result.outputFiles = response.outputFiles.map(convertOutputFiles); + if (response.metafile) + result.metafile = JSON.parse(response.metafile); + if (response.writeToStdout !== void 0) + console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, "")); + }; + let buildResponseToResult = (response, callback2) => { + let result = { + errors: replaceDetailsInMessages(response.errors, details), + warnings: replaceDetailsInMessages(response.warnings, details) + }; + copyResponseToResult(response, result); + runOnEndCallbacks(result, logPluginError, () => { + if (result.errors.length > 0) { + return callback2(failureErrorWithLog("Build failed", result.errors, result.warnings), null); + } + if (response.rebuild) { + if (!rebuild) { + let isDisposed = false; + rebuild = () => new Promise((resolve, reject) => { + if (isDisposed || isClosed) + throw new Error("Cannot rebuild"); + sendRequest(refs, { command: "rebuild", key }, (error2, response2) => { + if (error2) { + const message = { pluginName: "", text: error2, location: null, notes: [], detail: void 0 }; + return callback2(failureErrorWithLog("Build failed", [message], []), null); + } + buildResponseToResult(response2, (error3, result3) => { + if (error3) + reject(error3); + else + resolve(result3); + }); + }); + }); + refs.ref(); + rebuild.dispose = () => { + if (isDisposed) + return; + isDisposed = true; + sendRequest(refs, { command: "rebuild-dispose", key }, () => { + }); + refs.unref(); + }; + } + result.rebuild = rebuild; + } + if (response.watch) { + if (!stop) { + let isStopped = false; + refs.ref(); + stop = () => { + if (isStopped) + return; + isStopped = true; + watchCallbacks.delete(key); + sendRequest(refs, { command: "watch-stop", key }, () => { + }); + refs.unref(); + }; + if (watch) { + watchCallbacks.set(key, (serviceStopError, watchResponse) => { + if (serviceStopError) { + if (watch.onRebuild) + watch.onRebuild(serviceStopError, null); + return; + } + let result2 = { + errors: replaceDetailsInMessages(watchResponse.errors, details), + warnings: replaceDetailsInMessages(watchResponse.warnings, details) + }; + copyResponseToResult(watchResponse, result2); + runOnEndCallbacks(result2, logPluginError, () => { + if (result2.errors.length > 0) { + if (watch.onRebuild) + watch.onRebuild(failureErrorWithLog("Build failed", result2.errors, result2.warnings), null); + return; + } + if (watchResponse.rebuildID !== void 0) + result2.rebuild = rebuild; + result2.stop = stop; + if (watch.onRebuild) + watch.onRebuild(null, result2); + }); + }); + } + } + result.stop = stop; + } + callback2(null, result); + }); + }; + if (write && streamIn.isBrowser) + throw new Error(`Cannot enable "write" in the browser`); + if (incremental && streamIn.isSync) + throw new Error(`Cannot use "incremental" with a synchronous build`); + if (watch && streamIn.isSync) + throw new Error(`Cannot use "watch" with a synchronous build`); + sendRequest(refs, request, (error, response) => { + if (error) + return callback(new Error(error), null); + if (serve2) { + let serveResponse = response; + let isStopped = false; + refs.ref(); + let result = { + port: serveResponse.port, + host: serveResponse.host, + wait: serve2.wait, + stop() { + if (isStopped) + return; + isStopped = true; + serve2.stop(); + refs.unref(); + } + }; + refs.ref(); + serve2.wait.then(refs.unref, refs.unref); + return callback(null, result); + } + return buildResponseToResult(response, callback); + }); }; let transform2 = ({ callName, refs, input, options, isTTY: isTTY2, fs: fs3, callback }) => { const details = createObjectStash(); let start = (inputPath) => { try { - if (typeof input !== "string" && !(input instanceof Uint8Array)) - throw new Error('The input to "transform" must be a string or a Uint8Array'); - let { - flags, - mangleCache - } = flagsForTransformOptions(callName, options, isTTY2, transformLogLevelDefault); + if (typeof input !== "string") + throw new Error('The input to "transform" must be a string'); + let flags = flagsForTransformOptions(callName, options, isTTY2, transformLogLevelDefault); let request = { command: "transform", flags, inputFS: inputPath !== null, - input: inputPath !== null ? encodeUTF8(inputPath) : typeof input === "string" ? encodeUTF8(input) : input + input: inputPath !== null ? inputPath : input }; - if (mangleCache) request.mangleCache = mangleCache; sendRequest(refs, request, (error, response) => { - if (error) return callback(new Error(error), null); + if (error) + return callback(new Error(error), null); let errors = replaceDetailsInMessages(response.errors, details); let warnings = replaceDetailsInMessages(response.warnings, details); let outstanding = 1; - let next = () => { - if (--outstanding === 0) { - let result = { - warnings, - code: response.code, - map: response.map, - mangleCache: void 0, - legalComments: void 0 - }; - if ("legalComments" in response) result.legalComments = response == null ? void 0 : response.legalComments; - if (response.mangleCache) result.mangleCache = response == null ? void 0 : response.mangleCache; - callback(null, result); - } - }; - if (errors.length > 0) return callback(failureErrorWithLog("Transform failed", errors, warnings), null); + let next = () => --outstanding === 0 && callback(null, { warnings, code: response.code, map: response.map }); + if (errors.length > 0) + return callback(failureErrorWithLog("Transform failed", errors, warnings), null); if (response.codeFS) { outstanding++; fs3.readFile(response.code, (err, contents) => { @@ -790,35 +1381,43 @@ function createChannel(streamIn) { }); } }; - if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) { + if (typeof input === "string" && input.length > 1024 * 1024) { let next = start; start = () => fs3.writeFile(input, next); } start(null); }; let formatMessages2 = ({ callName, refs, messages, options, callback }) => { - if (!options) throw new Error(`Missing second argument in ${callName}() call`); + let result = sanitizeMessages(messages, "messages", null, ""); + if (!options) + throw new Error(`Missing second argument in ${callName}() call`); let keys = {}; let kind = getFlag(options, keys, "kind", mustBeString); let color = getFlag(options, keys, "color", mustBeBoolean); let terminalWidth = getFlag(options, keys, "terminalWidth", mustBeInteger); checkForInvalidFlags(options, keys, `in ${callName}() call`); - if (kind === void 0) throw new Error(`Missing "kind" in ${callName}() call`); - if (kind !== "error" && kind !== "warning") throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`); + if (kind === void 0) + throw new Error(`Missing "kind" in ${callName}() call`); + if (kind !== "error" && kind !== "warning") + throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`); let request = { command: "format-msgs", - messages: sanitizeMessages(messages, "messages", null, "", terminalWidth), + messages: result, isWarning: kind === "warning" }; - if (color !== void 0) request.color = color; - if (terminalWidth !== void 0) request.terminalWidth = terminalWidth; + if (color !== void 0) + request.color = color; + if (terminalWidth !== void 0) + request.terminalWidth = terminalWidth; sendRequest(refs, request, (error, response) => { - if (error) return callback(new Error(error), null); + if (error) + return callback(new Error(error), null); callback(null, response.messages); }); }; let analyzeMetafile2 = ({ callName, refs, metafile, options, callback }) => { - if (options === void 0) options = {}; + if (options === void 0) + options = {}; let keys = {}; let color = getFlag(options, keys, "color", mustBeBoolean); let verbose = getFlag(options, keys, "verbose", mustBeBoolean); @@ -827,10 +1426,13 @@ function createChannel(streamIn) { command: "analyze-metafile", metafile }; - if (color !== void 0) request.color = color; - if (verbose !== void 0) request.verbose = verbose; + if (color !== void 0) + request.color = color; + if (verbose !== void 0) + request.verbose = verbose; sendRequest(refs, request, (error, response) => { - if (error) return callback(new Error(error), null); + if (error) + return callback(new Error(error), null); callback(null, response.result); }); }; @@ -838,548 +1440,23 @@ function createChannel(streamIn) { readFromStdout, afterClose, service: { - buildOrContext, + buildOrServe, transform: transform2, formatMessages: formatMessages2, analyzeMetafile: analyzeMetafile2 } }; } -function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, options, isTTY2, defaultWD2, callback) { - const details = createObjectStash(); - const isContext = callName === "context"; - const handleError = (e, pluginName) => { - const flags = []; - try { - pushLogFlags(flags, options, {}, isTTY2, buildLogLevelDefault); - } catch { - } - const message = extractErrorMessageV8(e, streamIn, details, void 0, pluginName); - sendRequest(refs, { command: "error", flags, error: message }, () => { - message.detail = details.load(message.detail); - callback(failureErrorWithLog(isContext ? "Context failed" : "Build failed", [message], []), null); - }); - }; - let plugins; - if (typeof options === "object") { - const value = options.plugins; - if (value !== void 0) { - if (!Array.isArray(value)) return handleError(new Error(`"plugins" must be an array`), ""); - plugins = value; - } - } - if (plugins && plugins.length > 0) { - if (streamIn.isSync) return handleError(new Error("Cannot use plugins in synchronous API calls"), ""); - handlePlugins( - buildKey, - sendRequest, - sendResponse, - refs, - streamIn, - requestCallbacks, - options, - plugins, - details - ).then( - (result) => { - if (!result.ok) return handleError(result.error, result.pluginName); - try { - buildOrContextContinue(result.requestPlugins, result.runOnEndCallbacks, result.scheduleOnDisposeCallbacks); - } catch (e) { - handleError(e, ""); - } - }, - (e) => handleError(e, "") - ); - return; - } - try { - buildOrContextContinue(null, (result, done) => done([], []), () => { - }); - } catch (e) { - handleError(e, ""); - } - function buildOrContextContinue(requestPlugins, runOnEndCallbacks, scheduleOnDisposeCallbacks) { - const writeDefault = streamIn.hasFS; - const { - entries, - flags, - write, - stdinContents, - stdinResolveDir, - absWorkingDir, - nodePaths, - mangleCache - } = flagsForBuildOptions(callName, options, isTTY2, buildLogLevelDefault, writeDefault); - if (write && !streamIn.hasFS) throw new Error(`The "write" option is unavailable in this environment`); - const request = { - command: "build", - key: buildKey, - entries, - flags, - write, - stdinContents, - stdinResolveDir, - absWorkingDir: absWorkingDir || defaultWD2, - nodePaths, - context: isContext - }; - if (requestPlugins) request.plugins = requestPlugins; - if (mangleCache) request.mangleCache = mangleCache; - const buildResponseToResult = (response, callback2) => { - const result = { - errors: replaceDetailsInMessages(response.errors, details), - warnings: replaceDetailsInMessages(response.warnings, details), - outputFiles: void 0, - metafile: void 0, - mangleCache: void 0 - }; - const originalErrors = result.errors.slice(); - const originalWarnings = result.warnings.slice(); - if (response.outputFiles) result.outputFiles = response.outputFiles.map(convertOutputFiles); - if (response.metafile) result.metafile = JSON.parse(response.metafile); - if (response.mangleCache) result.mangleCache = response.mangleCache; - if (response.writeToStdout !== void 0) console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, "")); - runOnEndCallbacks(result, (onEndErrors, onEndWarnings) => { - if (originalErrors.length > 0 || onEndErrors.length > 0) { - const error = failureErrorWithLog("Build failed", originalErrors.concat(onEndErrors), originalWarnings.concat(onEndWarnings)); - return callback2(error, null, onEndErrors, onEndWarnings); - } - callback2(null, result, onEndErrors, onEndWarnings); - }); - }; - let latestResultPromise; - let provideLatestResult; - if (isContext) - requestCallbacks["on-end"] = (id, request2) => new Promise((resolve) => { - buildResponseToResult(request2, (err, result, onEndErrors, onEndWarnings) => { - const response = { - errors: onEndErrors, - warnings: onEndWarnings - }; - if (provideLatestResult) provideLatestResult(err, result); - latestResultPromise = void 0; - provideLatestResult = void 0; - sendResponse(id, response); - resolve(); - }); - }); - sendRequest(refs, request, (error, response) => { - if (error) return callback(new Error(error), null); - if (!isContext) { - return buildResponseToResult(response, (err, res) => { - scheduleOnDisposeCallbacks(); - return callback(err, res); - }); - } - if (response.errors.length > 0) { - return callback(failureErrorWithLog("Context failed", response.errors, response.warnings), null); - } - let didDispose = false; - const result = { - rebuild: () => { - if (!latestResultPromise) latestResultPromise = new Promise((resolve, reject) => { - let settlePromise; - provideLatestResult = (err, result2) => { - if (!settlePromise) settlePromise = () => err ? reject(err) : resolve(result2); - }; - const triggerAnotherBuild = () => { - const request2 = { - command: "rebuild", - key: buildKey - }; - sendRequest(refs, request2, (error2, response2) => { - if (error2) { - reject(new Error(error2)); - } else if (settlePromise) { - settlePromise(); - } else { - triggerAnotherBuild(); - } - }); - }; - triggerAnotherBuild(); - }); - return latestResultPromise; - }, - watch: (options2 = {}) => new Promise((resolve, reject) => { - if (!streamIn.hasFS) throw new Error(`Cannot use the "watch" API in this environment`); - const keys = {}; - checkForInvalidFlags(options2, keys, `in watch() call`); - const request2 = { - command: "watch", - key: buildKey - }; - sendRequest(refs, request2, (error2) => { - if (error2) reject(new Error(error2)); - else resolve(void 0); - }); - }), - serve: (options2 = {}) => new Promise((resolve, reject) => { - if (!streamIn.hasFS) throw new Error(`Cannot use the "serve" API in this environment`); - const keys = {}; - const port = getFlag(options2, keys, "port", mustBeInteger); - const host = getFlag(options2, keys, "host", mustBeString); - const servedir = getFlag(options2, keys, "servedir", mustBeString); - const keyfile = getFlag(options2, keys, "keyfile", mustBeString); - const certfile = getFlag(options2, keys, "certfile", mustBeString); - const fallback = getFlag(options2, keys, "fallback", mustBeString); - const onRequest = getFlag(options2, keys, "onRequest", mustBeFunction); - checkForInvalidFlags(options2, keys, `in serve() call`); - const request2 = { - command: "serve", - key: buildKey, - onRequest: !!onRequest - }; - if (port !== void 0) request2.port = port; - if (host !== void 0) request2.host = host; - if (servedir !== void 0) request2.servedir = servedir; - if (keyfile !== void 0) request2.keyfile = keyfile; - if (certfile !== void 0) request2.certfile = certfile; - if (fallback !== void 0) request2.fallback = fallback; - sendRequest(refs, request2, (error2, response2) => { - if (error2) return reject(new Error(error2)); - if (onRequest) { - requestCallbacks["serve-request"] = (id, request3) => { - onRequest(request3.args); - sendResponse(id, {}); - }; - } - resolve(response2); - }); - }), - cancel: () => new Promise((resolve) => { - if (didDispose) return resolve(); - const request2 = { - command: "cancel", - key: buildKey - }; - sendRequest(refs, request2, () => { - resolve(); - }); - }), - dispose: () => new Promise((resolve) => { - if (didDispose) return resolve(); - didDispose = true; - const request2 = { - command: "dispose", - key: buildKey - }; - sendRequest(refs, request2, () => { - resolve(); - scheduleOnDisposeCallbacks(); - refs.unref(); - }); - }) - }; - refs.ref(); - callback(null, result); - }); - } -} -var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, initialOptions, plugins, details) => { - let onStartCallbacks = []; - let onEndCallbacks = []; - let onResolveCallbacks = {}; - let onLoadCallbacks = {}; - let onDisposeCallbacks = []; - let nextCallbackID = 0; - let i = 0; - let requestPlugins = []; - let isSetupDone = false; - plugins = [...plugins]; - for (let item of plugins) { - let keys = {}; - if (typeof item !== "object") throw new Error(`Plugin at index ${i} must be an object`); - const name = getFlag(item, keys, "name", mustBeString); - if (typeof name !== "string" || name === "") throw new Error(`Plugin at index ${i} is missing a name`); - try { - let setup = getFlag(item, keys, "setup", mustBeFunction); - if (typeof setup !== "function") throw new Error(`Plugin is missing a setup function`); - checkForInvalidFlags(item, keys, `on plugin ${quote(name)}`); - let plugin = { - name, - onStart: false, - onEnd: false, - onResolve: [], - onLoad: [] - }; - i++; - let resolve = (path3, options = {}) => { - if (!isSetupDone) throw new Error('Cannot call "resolve" before plugin setup has completed'); - if (typeof path3 !== "string") throw new Error(`The path to resolve must be a string`); - let keys2 = /* @__PURE__ */ Object.create(null); - let pluginName = getFlag(options, keys2, "pluginName", mustBeString); - let importer = getFlag(options, keys2, "importer", mustBeString); - let namespace = getFlag(options, keys2, "namespace", mustBeString); - let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString); - let kind = getFlag(options, keys2, "kind", mustBeString); - let pluginData = getFlag(options, keys2, "pluginData", canBeAnything); - let importAttributes = getFlag(options, keys2, "with", mustBeObject); - checkForInvalidFlags(options, keys2, "in resolve() call"); - return new Promise((resolve2, reject) => { - const request = { - command: "resolve", - path: path3, - key: buildKey, - pluginName: name - }; - if (pluginName != null) request.pluginName = pluginName; - if (importer != null) request.importer = importer; - if (namespace != null) request.namespace = namespace; - if (resolveDir != null) request.resolveDir = resolveDir; - if (kind != null) request.kind = kind; - else throw new Error(`Must specify "kind" when calling "resolve"`); - if (pluginData != null) request.pluginData = details.store(pluginData); - if (importAttributes != null) request.with = sanitizeStringMap(importAttributes, "with"); - sendRequest(refs, request, (error, response) => { - if (error !== null) reject(new Error(error)); - else resolve2({ - errors: replaceDetailsInMessages(response.errors, details), - warnings: replaceDetailsInMessages(response.warnings, details), - path: response.path, - external: response.external, - sideEffects: response.sideEffects, - namespace: response.namespace, - suffix: response.suffix, - pluginData: details.load(response.pluginData) - }); - }); - }); - }; - let promise = setup({ - initialOptions, - resolve, - onStart(callback) { - let registeredText = `This error came from the "onStart" callback registered here:`; - let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart"); - onStartCallbacks.push({ name, callback, note: registeredNote }); - plugin.onStart = true; - }, - onEnd(callback) { - let registeredText = `This error came from the "onEnd" callback registered here:`; - let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd"); - onEndCallbacks.push({ name, callback, note: registeredNote }); - plugin.onEnd = true; - }, - onResolve(options, callback) { - let registeredText = `This error came from the "onResolve" callback registered here:`; - let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve"); - let keys2 = {}; - let filter = getFlag(options, keys2, "filter", mustBeRegExp); - let namespace = getFlag(options, keys2, "namespace", mustBeString); - checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${quote(name)}`); - if (filter == null) throw new Error(`onResolve() call is missing a filter`); - let id = nextCallbackID++; - onResolveCallbacks[id] = { name, callback, note: registeredNote }; - plugin.onResolve.push({ id, filter: filter.source, namespace: namespace || "" }); - }, - onLoad(options, callback) { - let registeredText = `This error came from the "onLoad" callback registered here:`; - let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad"); - let keys2 = {}; - let filter = getFlag(options, keys2, "filter", mustBeRegExp); - let namespace = getFlag(options, keys2, "namespace", mustBeString); - checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${quote(name)}`); - if (filter == null) throw new Error(`onLoad() call is missing a filter`); - let id = nextCallbackID++; - onLoadCallbacks[id] = { name, callback, note: registeredNote }; - plugin.onLoad.push({ id, filter: filter.source, namespace: namespace || "" }); - }, - onDispose(callback) { - onDisposeCallbacks.push(callback); - }, - esbuild: streamIn.esbuild - }); - if (promise) await promise; - requestPlugins.push(plugin); - } catch (e) { - return { ok: false, error: e, pluginName: name }; - } - } - requestCallbacks["on-start"] = async (id, request) => { - details.clear(); - let response = { errors: [], warnings: [] }; - await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => { - try { - let result = await callback(); - if (result != null) { - if (typeof result !== "object") throw new Error(`Expected onStart() callback in plugin ${quote(name)} to return an object`); - let keys = {}; - let errors = getFlag(result, keys, "errors", mustBeArray); - let warnings = getFlag(result, keys, "warnings", mustBeArray); - checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${quote(name)}`); - if (errors != null) response.errors.push(...sanitizeMessages(errors, "errors", details, name, void 0)); - if (warnings != null) response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name, void 0)); - } - } catch (e) { - response.errors.push(extractErrorMessageV8(e, streamIn, details, note && note(), name)); - } - })); - sendResponse(id, response); - }; - requestCallbacks["on-resolve"] = async (id, request) => { - let response = {}, name = "", callback, note; - for (let id2 of request.ids) { - try { - ({ name, callback, note } = onResolveCallbacks[id2]); - let result = await callback({ - path: request.path, - importer: request.importer, - namespace: request.namespace, - resolveDir: request.resolveDir, - kind: request.kind, - pluginData: details.load(request.pluginData), - with: request.with - }); - if (result != null) { - if (typeof result !== "object") throw new Error(`Expected onResolve() callback in plugin ${quote(name)} to return an object`); - let keys = {}; - let pluginName = getFlag(result, keys, "pluginName", mustBeString); - let path3 = getFlag(result, keys, "path", mustBeString); - let namespace = getFlag(result, keys, "namespace", mustBeString); - let suffix = getFlag(result, keys, "suffix", mustBeString); - let external = getFlag(result, keys, "external", mustBeBoolean); - let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean); - let pluginData = getFlag(result, keys, "pluginData", canBeAnything); - let errors = getFlag(result, keys, "errors", mustBeArray); - let warnings = getFlag(result, keys, "warnings", mustBeArray); - let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray); - let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray); - checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${quote(name)}`); - response.id = id2; - if (pluginName != null) response.pluginName = pluginName; - if (path3 != null) response.path = path3; - if (namespace != null) response.namespace = namespace; - if (suffix != null) response.suffix = suffix; - if (external != null) response.external = external; - if (sideEffects != null) response.sideEffects = sideEffects; - if (pluginData != null) response.pluginData = details.store(pluginData); - if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0); - if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); - if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); - if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); - break; - } - } catch (e) { - response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; - break; - } - } - sendResponse(id, response); - }; - requestCallbacks["on-load"] = async (id, request) => { - let response = {}, name = "", callback, note; - for (let id2 of request.ids) { - try { - ({ name, callback, note } = onLoadCallbacks[id2]); - let result = await callback({ - path: request.path, - namespace: request.namespace, - suffix: request.suffix, - pluginData: details.load(request.pluginData), - with: request.with - }); - if (result != null) { - if (typeof result !== "object") throw new Error(`Expected onLoad() callback in plugin ${quote(name)} to return an object`); - let keys = {}; - let pluginName = getFlag(result, keys, "pluginName", mustBeString); - let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array); - let resolveDir = getFlag(result, keys, "resolveDir", mustBeString); - let pluginData = getFlag(result, keys, "pluginData", canBeAnything); - let loader = getFlag(result, keys, "loader", mustBeString); - let errors = getFlag(result, keys, "errors", mustBeArray); - let warnings = getFlag(result, keys, "warnings", mustBeArray); - let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray); - let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray); - checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${quote(name)}`); - response.id = id2; - if (pluginName != null) response.pluginName = pluginName; - if (contents instanceof Uint8Array) response.contents = contents; - else if (contents != null) response.contents = encodeUTF8(contents); - if (resolveDir != null) response.resolveDir = resolveDir; - if (pluginData != null) response.pluginData = details.store(pluginData); - if (loader != null) response.loader = loader; - if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0); - if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); - if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); - if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); - break; - } - } catch (e) { - response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; - break; - } - } - sendResponse(id, response); - }; - let runOnEndCallbacks = (result, done) => done([], []); - if (onEndCallbacks.length > 0) { - runOnEndCallbacks = (result, done) => { - (async () => { - const onEndErrors = []; - const onEndWarnings = []; - for (const { name, callback, note } of onEndCallbacks) { - let newErrors; - let newWarnings; - try { - const value = await callback(result); - if (value != null) { - if (typeof value !== "object") throw new Error(`Expected onEnd() callback in plugin ${quote(name)} to return an object`); - let keys = {}; - let errors = getFlag(value, keys, "errors", mustBeArray); - let warnings = getFlag(value, keys, "warnings", mustBeArray); - checkForInvalidFlags(value, keys, `from onEnd() callback in plugin ${quote(name)}`); - if (errors != null) newErrors = sanitizeMessages(errors, "errors", details, name, void 0); - if (warnings != null) newWarnings = sanitizeMessages(warnings, "warnings", details, name, void 0); - } - } catch (e) { - newErrors = [extractErrorMessageV8(e, streamIn, details, note && note(), name)]; - } - if (newErrors) { - onEndErrors.push(...newErrors); - try { - result.errors.push(...newErrors); - } catch { - } - } - if (newWarnings) { - onEndWarnings.push(...newWarnings); - try { - result.warnings.push(...newWarnings); - } catch { - } - } - } - done(onEndErrors, onEndWarnings); - })(); - }; - } - let scheduleOnDisposeCallbacks = () => { - for (const cb of onDisposeCallbacks) { - setTimeout(() => cb(), 0); - } - }; - isSetupDone = true; - return { - ok: true, - requestPlugins, - runOnEndCallbacks, - scheduleOnDisposeCallbacks - }; -}; function createObjectStash() { const map = /* @__PURE__ */ new Map(); let nextID = 0; return { - clear() { - map.clear(); - }, load(id) { return map.get(id); }, store(value) { - if (value === void 0) return -1; + if (value === void 0) + return -1; const id = nextID++; map.set(id, value); return id; @@ -1390,7 +1467,8 @@ function extractCallerV8(e, streamIn, ident) { let note; let tried = false; return () => { - if (tried) return note; + if (tried) + return note; tried = true; try { let lines = (e.stack + "").split("\n"); @@ -1415,14 +1493,15 @@ function extractErrorMessageV8(e, streamIn, stash, note, pluginName) { location = parseStackLinesV8(streamIn, (e.stack + "").split("\n"), ""); } catch { } - return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 }; + return { pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 }; } function parseStackLinesV8(streamIn, lines, ident) { let at = " at "; if (streamIn.readFileSync && !lines[0].startsWith(at) && lines[1].startsWith(at)) { for (let i = 1; i < lines.length; i++) { let line = lines[i]; - if (!line.startsWith(at)) continue; + if (!line.startsWith(at)) + continue; line = line.slice(at.length); while (true) { let match = /^(?:new |async )?\S+ \((.*)\)$/.exec(line); @@ -1464,28 +1543,20 @@ function parseStackLinesV8(streamIn, lines, ident) { } function failureErrorWithLog(text, errors, warnings) { let limit = 5; - text += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => { - if (i === limit) return "\n..."; - if (!e.location) return ` + let summary = errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => { + if (i === limit) + return "\n..."; + if (!e.location) + return ` error: ${e.text}`; let { file, line, column } = e.location; let pluginText = e.pluginName ? `[plugin: ${e.pluginName}] ` : ""; return ` ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`; }).join(""); - let error = new Error(text); - for (const [key, value] of [["errors", errors], ["warnings", warnings]]) { - Object.defineProperty(error, key, { - configurable: true, - enumerable: true, - get: () => value, - set: (value2) => Object.defineProperty(error, key, { - configurable: true, - enumerable: true, - value: value2 - }) - }); - } + let error = new Error(`${text}${summary}`); + error.errors = errors; + error.warnings = warnings; return error; } function replaceDetailsInMessages(messages, stash) { @@ -1494,8 +1565,9 @@ function replaceDetailsInMessages(messages, stash) { } return messages; } -function sanitizeLocation(location, where, terminalWidth) { - if (location == null) return null; +function sanitizeLocation(location, where) { + if (location == null) + return null; let keys = {}; let file = getFlag(location, keys, "file", mustBeString); let namespace = getFlag(location, keys, "namespace", mustBeString); @@ -1505,15 +1577,6 @@ function sanitizeLocation(location, where, terminalWidth) { let lineText = getFlag(location, keys, "lineText", mustBeString); let suggestion = getFlag(location, keys, "suggestion", mustBeString); checkForInvalidFlags(location, keys, where); - if (lineText) { - const relevantASCII = lineText.slice( - 0, - (column && column > 0 ? column : 0) + (length && length > 0 ? length : 0) + (terminalWidth && terminalWidth > 0 ? terminalWidth : 80) - ); - if (!/[\x7F-\uFFFF]/.test(relevantASCII) && !/\n/.test(lineText)) { - lineText = relevantASCII; - } - } return { file: file || "", namespace: namespace || "", @@ -1524,12 +1587,11 @@ function sanitizeLocation(location, where, terminalWidth) { suggestion: suggestion || "" }; } -function sanitizeMessages(messages, property, stash, fallbackPluginName, terminalWidth) { +function sanitizeMessages(messages, property, stash, fallbackPluginName) { let messagesClone = []; let index = 0; for (const message of messages) { let keys = {}; - let id = getFlag(message, keys, "id", mustBeString); let pluginName = getFlag(message, keys, "pluginName", mustBeString); let text = getFlag(message, keys, "text", mustBeString); let location = getFlag(message, keys, "location", mustBeObjectOrNull); @@ -1546,15 +1608,14 @@ function sanitizeMessages(messages, property, stash, fallbackPluginName, termina checkForInvalidFlags(note, noteKeys, where); notesClone.push({ text: noteText || "", - location: sanitizeLocation(noteLocation, where, terminalWidth) + location: sanitizeLocation(noteLocation, where) }); } } messagesClone.push({ - id: id || "", pluginName: pluginName || fallbackPluginName, text: text || "", - location: sanitizeLocation(location, where, terminalWidth), + location: sanitizeLocation(location, where), notes: notesClone, detail: stash ? stash.store(detail) : -1 }); @@ -1565,32 +1626,20 @@ function sanitizeMessages(messages, property, stash, fallbackPluginName, termina function sanitizeStringArray(values, property) { const result = []; for (const value of values) { - if (typeof value !== "string") throw new Error(`${quote(property)} must be an array of strings`); + if (typeof value !== "string") + throw new Error(`${JSON.stringify(property)} must be an array of strings`); result.push(value); } return result; } -function sanitizeStringMap(map, property) { - const result = /* @__PURE__ */ Object.create(null); - for (const key in map) { - const value = map[key]; - if (typeof value !== "string") throw new Error(`key ${quote(key)} in object ${quote(property)} must be a string`); - result[key] = value; - } - return result; -} -function convertOutputFiles({ path: path3, contents, hash }) { +function convertOutputFiles({ path: path3, contents }) { let text = null; return { path: path3, contents, - hash, get text() { - const binary = this.contents; - if (text === null || binary !== contents) { - contents = binary; - text = decodeUTF8(binary); - } + if (text === null) + text = decodeUTF8(contents); return text; } }; @@ -1601,43 +1650,31 @@ var fs = require("fs"); var os = require("os"); var path = require("path"); var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; -var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; -var packageDarwin_arm64 = "@esbuild/darwin-arm64"; -var packageDarwin_x64 = "@esbuild/darwin-x64"; var knownWindowsPackages = { - "win32 arm64 LE": "@esbuild/win32-arm64", - "win32 ia32 LE": "@esbuild/win32-ia32", - "win32 x64 LE": "@esbuild/win32-x64" + "win32 arm64 LE": "esbuild-windows-arm64", + "win32 ia32 LE": "esbuild-windows-32", + "win32 x64 LE": "esbuild-windows-64" }; var knownUnixlikePackages = { - "aix ppc64 BE": "@esbuild/aix-ppc64", - "android arm64 LE": "@esbuild/android-arm64", - "darwin arm64 LE": "@esbuild/darwin-arm64", - "darwin x64 LE": "@esbuild/darwin-x64", - "freebsd arm64 LE": "@esbuild/freebsd-arm64", - "freebsd x64 LE": "@esbuild/freebsd-x64", - "linux arm LE": "@esbuild/linux-arm", - "linux arm64 LE": "@esbuild/linux-arm64", - "linux ia32 LE": "@esbuild/linux-ia32", - "linux mips64el LE": "@esbuild/linux-mips64el", - "linux ppc64 LE": "@esbuild/linux-ppc64", - "linux riscv64 LE": "@esbuild/linux-riscv64", - "linux s390x BE": "@esbuild/linux-s390x", - "linux x64 LE": "@esbuild/linux-x64", - "linux loong64 LE": "@esbuild/linux-loong64", - "netbsd x64 LE": "@esbuild/netbsd-x64", - "openbsd arm64 LE": "@esbuild/openbsd-arm64", - "openbsd x64 LE": "@esbuild/openbsd-x64", - "sunos x64 LE": "@esbuild/sunos-x64" -}; -var knownWebAssemblyFallbackPackages = { - "android arm LE": "@esbuild/android-arm", - "android x64 LE": "@esbuild/android-x64" + "android arm64 LE": "esbuild-android-arm64", + "darwin arm64 LE": "esbuild-darwin-arm64", + "darwin x64 LE": "esbuild-darwin-64", + "freebsd arm64 LE": "esbuild-freebsd-arm64", + "freebsd x64 LE": "esbuild-freebsd-64", + "linux arm LE": "esbuild-linux-arm", + "linux arm64 LE": "esbuild-linux-arm64", + "linux ia32 LE": "esbuild-linux-32", + "linux mips64el LE": "esbuild-linux-mips64le", + "linux ppc64 LE": "esbuild-linux-ppc64le", + "linux s390x BE": "esbuild-linux-s390x", + "linux x64 LE": "esbuild-linux-64", + "netbsd x64 LE": "esbuild-netbsd-64", + "openbsd x64 LE": "esbuild-openbsd-64", + "sunos x64 LE": "esbuild-sunos-64" }; function pkgAndSubpathForCurrentPlatform() { let pkg; let subpath; - let isWASM = false; let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; if (platformKey in knownWindowsPackages) { pkg = knownWindowsPackages[platformKey]; @@ -1645,14 +1682,10 @@ function pkgAndSubpathForCurrentPlatform() { } else if (platformKey in knownUnixlikePackages) { pkg = knownUnixlikePackages[platformKey]; subpath = "bin/esbuild"; - } else if (platformKey in knownWebAssemblyFallbackPackages) { - pkg = knownWebAssemblyFallbackPackages[platformKey]; - subpath = "bin/esbuild"; - isWASM = true; } else { throw new Error(`Unsupported platform: ${platformKey}`); } - return { pkg, subpath, isWASM }; + return { pkg, subpath }; } function pkgForSomeOtherPlatform() { const libMainJS = require.resolve("esbuild"); @@ -1661,14 +1694,16 @@ function pkgForSomeOtherPlatform() { for (const unixKey in knownUnixlikePackages) { try { const pkg = knownUnixlikePackages[unixKey]; - if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) + return pkg; } catch { } } for (const windowsKey in knownWindowsPackages) { try { const pkg = knownWindowsPackages[windowsKey]; - if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) + return pkg; } catch { } } @@ -1677,17 +1712,13 @@ function pkgForSomeOtherPlatform() { } function downloadedBinPath(pkg, subpath) { const esbuildLibDir = path.dirname(require.resolve("esbuild")); - return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); + return path.join(esbuildLibDir, `downloaded-${pkg}-${path.basename(subpath)}`); } function generateBinPath() { - if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { - if (!fs.existsSync(ESBUILD_BINARY_PATH)) { - console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); - } else { - return { binPath: ESBUILD_BINARY_PATH, isWASM: false }; - } + if (ESBUILD_BINARY_PATH) { + return ESBUILD_BINARY_PATH; } - const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform(); + const { pkg, subpath } = pkgAndSubpathForCurrentPlatform(); let binPath; try { binPath = require.resolve(`${pkg}/${subpath}`); @@ -1699,7 +1730,11 @@ function generateBinPath() { } catch { const otherPkg = pkgForSomeOtherPlatform(); if (otherPkg) { - let suggestions = ` + throw new Error(` +You installed esbuild on another platform than the one you're currently using. +This won't work because esbuild is written with native code and needs to +install a platform-specific binary executable. + Specifically the "${otherPkg}" package is present but this platform needs the "${pkg}" package instead. People often get into this situation by installing esbuild on Windows or macOS and copying "node_modules" @@ -1709,40 +1744,14 @@ Windows and WSL environments. If you are installing with npm, you can try not copying the "node_modules" directory when you copy the files over, and running "npm ci" or "npm install" on the destination platform after the copy. Or you could consider using yarn -instead of npm which has built-in support for installing a package on multiple +instead which has built-in support for installing a package on multiple platforms simultaneously. If you are installing with yarn, you can try listing both this platform and the other platform in your ".yarnrc.yml" file using the "supportedArchitectures" feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures Keep in mind that this means multiple copies of esbuild will be present. -`; - if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) { - suggestions = ` -Specifically the "${otherPkg}" package is present but this platform -needs the "${pkg}" package instead. People often get into this -situation by installing esbuild with npm running inside of Rosetta 2 and then -trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta -2 is Apple's on-the-fly x86_64-to-arm64 translation service). -If you are installing with npm, you can try ensuring that both npm and node are -not running under Rosetta 2 and then reinstalling esbuild. This likely involves -changing how you installed npm and/or node. For example, installing node with -the universal installer here should work: https://nodejs.org/en/download/. Or -you could consider using yarn instead of npm which has built-in support for -installing a package on multiple platforms simultaneously. - -If you are installing with yarn, you can try listing both "arm64" and "x64" -in your ".yarnrc.yml" file using the "supportedArchitectures" feature: -https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures -Keep in mind that this means multiple copies of esbuild will be present. -`; - } - throw new Error(` -You installed esbuild for another platform than the one you're currently using. -This won't work because esbuild is written with native code and needs to -install a platform-specific binary executable. -${suggestions} Another alternative is to use the "esbuild-wasm" package instead, which works the same way on all platforms. But it comes with a heavy performance cost and can sometimes be 10x slower than the "esbuild" package, so you may also not @@ -1752,37 +1761,28 @@ want to do that. throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild. If you are installing esbuild with npm, make sure that you don't specify the -"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature -of "package.json" is used by esbuild to install the correct binary executable -for your current platform.`); +"--no-optional" flag. The "optionalDependencies" package.json feature is used +by esbuild to install the correct binary executable for your current platform.`); } throw e; } } - if (/\.zip\//.test(binPath)) { - let pnpapi; - try { - pnpapi = require("pnpapi"); - } catch (e) { - } - if (pnpapi) { - const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation; - const binTargetPath = path.join( - root, - "node_modules", - ".cache", - "esbuild", - `pnpapi-${pkg.replace("/", "-")}-${"0.24.0"}-${path.basename(subpath)}` - ); - if (!fs.existsSync(binTargetPath)) { - fs.mkdirSync(path.dirname(binTargetPath), { recursive: true }); - fs.copyFileSync(binPath, binTargetPath); - fs.chmodSync(binTargetPath, 493); - } - return { binPath: binTargetPath, isWASM }; - } + let isYarnPnP = false; + try { + require("pnpapi"); + isYarnPnP = true; + } catch (e) { } - return { binPath, isWASM }; + if (isYarnPnP) { + const esbuildLibDir = path.dirname(require.resolve("esbuild")); + const binTargetPath = path.join(esbuildLibDir, `pnpapi-${pkg}-${path.basename(subpath)}`); + if (!fs.existsSync(binTargetPath)) { + fs.copyFileSync(binPath, binTargetPath); + fs.chmodSync(binTargetPath, 493); + } + return binTargetPath; + } + return binPath; } // lib/npm/node.ts @@ -1799,33 +1799,22 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") { } catch { } let [major, minor] = process.versions.node.split("."); - if ( - // { if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) { - throw new Error( - `The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle. + throw new Error(`The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle. -More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.` - ); +More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.`); } if (false) { return ["node", [path2.join(__dirname, "..", "bin", "esbuild")]]; - } else { - const { binPath, isWASM } = generateBinPath(); - if (isWASM) { - return ["node", [binPath]]; - } else { - return [binPath, []]; - } } + return [generateBinPath(), []]; }; var isTTY = () => tty.isatty(2); var fsSync = { @@ -1874,26 +1863,29 @@ var fsAsync = { } } }; -var version = "0.24.0"; +var version = "0.14.13"; var build = (options) => ensureServiceIsRunning().build(options); -var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions); +var serve = (serveOptions, buildOptions) => ensureServiceIsRunning().serve(serveOptions, buildOptions); var transform = (input, options) => ensureServiceIsRunning().transform(input, options); var formatMessages = (messages, options) => ensureServiceIsRunning().formatMessages(messages, options); var analyzeMetafile = (messages, options) => ensureServiceIsRunning().analyzeMetafile(messages, options); var buildSync = (options) => { if (worker_threads && !isInternalWorkerThread) { - if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + if (!workerThreadService) + workerThreadService = startWorkerThreadService(worker_threads); return workerThreadService.buildSync(options); } let result; - runServiceSync((service) => service.buildOrContext({ + runServiceSync((service) => service.buildOrServe({ callName: "buildSync", refs: null, + serveOptions: null, options, isTTY: isTTY(), defaultWD, callback: (err, res) => { - if (err) throw err; + if (err) + throw err; result = res; } })); @@ -1901,7 +1893,8 @@ var buildSync = (options) => { }; var transformSync = (input, options) => { if (worker_threads && !isInternalWorkerThread) { - if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + if (!workerThreadService) + workerThreadService = startWorkerThreadService(worker_threads); return workerThreadService.transformSync(input, options); } let result; @@ -1913,7 +1906,8 @@ var transformSync = (input, options) => { isTTY: isTTY(), fs: fsSync, callback: (err, res) => { - if (err) throw err; + if (err) + throw err; result = res; } })); @@ -1921,7 +1915,8 @@ var transformSync = (input, options) => { }; var formatMessagesSync = (messages, options) => { if (worker_threads && !isInternalWorkerThread) { - if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + if (!workerThreadService) + workerThreadService = startWorkerThreadService(worker_threads); return workerThreadService.formatMessagesSync(messages, options); } let result; @@ -1931,7 +1926,8 @@ var formatMessagesSync = (messages, options) => { messages, options, callback: (err, res) => { - if (err) throw err; + if (err) + throw err; result = res; } })); @@ -1939,7 +1935,8 @@ var formatMessagesSync = (messages, options) => { }; var analyzeMetafileSync = (metafile, options) => { if (worker_threads && !isInternalWorkerThread) { - if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + if (!workerThreadService) + workerThreadService = startWorkerThreadService(worker_threads); return workerThreadService.analyzeMetafileSync(metafile, options); } let result; @@ -1949,64 +1946,50 @@ var analyzeMetafileSync = (metafile, options) => { metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), options, callback: (err, res) => { - if (err) throw err; + if (err) + throw err; result = res; } })); return result; }; -var stop = () => { - if (stopService) stopService(); - if (workerThreadService) workerThreadService.stop(); - return Promise.resolve(); -}; var initializeWasCalled = false; var initialize = (options) => { options = validateInitializeOptions(options || {}); - if (options.wasmURL) throw new Error(`The "wasmURL" option only works in the browser`); - if (options.wasmModule) throw new Error(`The "wasmModule" option only works in the browser`); - if (options.worker) throw new Error(`The "worker" option only works in the browser`); - if (initializeWasCalled) throw new Error('Cannot call "initialize" more than once'); + if (options.wasmURL) + throw new Error(`The "wasmURL" option only works in the browser`); + if (options.worker) + throw new Error(`The "worker" option only works in the browser`); + if (initializeWasCalled) + throw new Error('Cannot call "initialize" more than once'); ensureServiceIsRunning(); initializeWasCalled = true; return Promise.resolve(); }; var defaultWD = process.cwd(); var longLivedService; -var stopService; var ensureServiceIsRunning = () => { - if (longLivedService) return longLivedService; + if (longLivedService) + return longLivedService; let [command, args] = esbuildCommandAndArgs(); - let child = child_process.spawn(command, args.concat(`--service=${"0.24.0"}`, "--ping"), { + let child = child_process.spawn(command, args.concat(`--service=${"0.14.13"}`, "--ping"), { windowsHide: true, stdio: ["pipe", "pipe", "inherit"], cwd: defaultWD }); let { readFromStdout, afterClose, service } = createChannel({ writeToStdin(bytes) { - child.stdin.write(bytes, (err) => { - if (err) afterClose(err); - }); + child.stdin.write(bytes); }, readFileSync: fs2.readFileSync, isSync: false, - hasFS: true, + isBrowser: false, esbuild: node_exports }); - child.stdin.on("error", afterClose); - child.on("error", afterClose); const stdin = child.stdin; const stdout = child.stdout; stdout.on("data", readFromStdout); stdout.on("end", afterClose); - stopService = () => { - stdin.destroy(); - stdout.destroy(); - child.kill(); - initializeWasCalled = false; - longLivedService = void 0; - stopService = void 0; - }; let refCount = 0; child.unref(); if (stdin.unref) { @@ -2017,54 +2000,70 @@ var ensureServiceIsRunning = () => { } const refs = { ref() { - if (++refCount === 1) child.ref(); + if (++refCount === 1) + child.ref(); }, unref() { - if (--refCount === 0) child.unref(); + if (--refCount === 0) + child.unref(); } }; longLivedService = { - build: (options) => new Promise((resolve, reject) => { - service.buildOrContext({ - callName: "build", + build: (options) => { + return new Promise((resolve, reject) => { + service.buildOrServe({ + callName: "build", + refs, + serveOptions: null, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => err ? reject(err) : resolve(res) + }); + }); + }, + serve: (serveOptions, buildOptions) => { + if (serveOptions === null || typeof serveOptions !== "object") + throw new Error("The first argument must be an object"); + return new Promise((resolve, reject) => service.buildOrServe({ + callName: "serve", refs, - options, + serveOptions, + options: buildOptions, isTTY: isTTY(), defaultWD, callback: (err, res) => err ? reject(err) : resolve(res) - }); - }), - context: (options) => new Promise((resolve, reject) => service.buildOrContext({ - callName: "context", - refs, - options, - isTTY: isTTY(), - defaultWD, - callback: (err, res) => err ? reject(err) : resolve(res) - })), - transform: (input, options) => new Promise((resolve, reject) => service.transform({ - callName: "transform", - refs, - input, - options: options || {}, - isTTY: isTTY(), - fs: fsAsync, - callback: (err, res) => err ? reject(err) : resolve(res) - })), - formatMessages: (messages, options) => new Promise((resolve, reject) => service.formatMessages({ - callName: "formatMessages", - refs, - messages, - options, - callback: (err, res) => err ? reject(err) : resolve(res) - })), - analyzeMetafile: (metafile, options) => new Promise((resolve, reject) => service.analyzeMetafile({ - callName: "analyzeMetafile", - refs, - metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), - options, - callback: (err, res) => err ? reject(err) : resolve(res) - })) + })); + }, + transform: (input, options) => { + return new Promise((resolve, reject) => service.transform({ + callName: "transform", + refs, + input, + options: options || {}, + isTTY: isTTY(), + fs: fsAsync, + callback: (err, res) => err ? reject(err) : resolve(res) + })); + }, + formatMessages: (messages, options) => { + return new Promise((resolve, reject) => service.formatMessages({ + callName: "formatMessages", + refs, + messages, + options, + callback: (err, res) => err ? reject(err) : resolve(res) + })); + }, + analyzeMetafile: (metafile, options) => { + return new Promise((resolve, reject) => service.analyzeMetafile({ + callName: "analyzeMetafile", + refs, + metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), + options, + callback: (err, res) => err ? reject(err) : resolve(res) + })); + } }; return longLivedService; }; @@ -2073,26 +2072,23 @@ var runServiceSync = (callback) => { let stdin = new Uint8Array(); let { readFromStdout, afterClose, service } = createChannel({ writeToStdin(bytes) { - if (stdin.length !== 0) throw new Error("Must run at most one command"); + if (stdin.length !== 0) + throw new Error("Must run at most one command"); stdin = bytes; }, isSync: true, - hasFS: true, + isBrowser: false, esbuild: node_exports }); callback(service); - let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.24.0"}`), { + let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.14.13"}`), { cwd: defaultWD, windowsHide: true, input: stdin, - // We don't know how large the output could be. If it's too large, the - // command will fail with ENOBUFS. Reserve 16mb for now since that feels - // like it should be enough. Also allow overriding this with an environment - // variable. maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024 }); readFromStdout(stdout); - afterClose(null); + afterClose(); }; var randomFileName = () => { return path2.join(os2.tmpdir(), `esbuild-${crypto.randomBytes(32).toString("hex")}`); @@ -2101,32 +2097,32 @@ var workerThreadService = null; var startWorkerThreadService = (worker_threads2) => { let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel(); let worker = new worker_threads2.Worker(__filename, { - workerData: { workerPort, defaultWD, esbuildVersion: "0.24.0" }, + workerData: { workerPort, defaultWD, esbuildVersion: "0.14.13" }, transferList: [workerPort], - // From node's documentation: https://nodejs.org/api/worker_threads.html - // - // Take care when launching worker threads from preload scripts (scripts loaded - // and run using the `-r` command line flag). Unless the `execArgv` option is - // explicitly set, new Worker threads automatically inherit the command line flags - // from the running process and will preload the same preload scripts as the main - // thread. If the preload script unconditionally launches a worker thread, every - // thread spawned will spawn another until the application crashes. - // execArgv: [] }); let nextID = 0; + let wasStopped = false; let fakeBuildError = (text) => { let error = new Error(`Build failed with 1 error: error: ${text}`); - let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }]; + let errors = [{ pluginName: "", text, location: null, notes: [], detail: void 0 }]; error.errors = errors; error.warnings = []; return error; }; let validateBuildSyncOptions = (options) => { - if (!options) return; + if (!options) + return; let plugins = options.plugins; - if (plugins && plugins.length > 0) throw fakeBuildError(`Cannot use plugins in synchronous API calls`); + let incremental = options.incremental; + let watch = options.watch; + if (plugins && plugins.length > 0) + throw fakeBuildError(`Cannot use plugins in synchronous API calls`); + if (incremental) + throw fakeBuildError(`Cannot use "incremental" with a synchronous build`); + if (watch) + throw fakeBuildError(`Cannot use "watch" with a synchronous build`); }; let applyProperties = (object, properties) => { for (let key in properties) { @@ -2134,15 +2130,19 @@ error: ${text}`); } }; let runCallSync = (command, args) => { + if (wasStopped) + throw new Error("The service was stopped"); let id = nextID++; let sharedBuffer = new SharedArrayBuffer(8); let sharedBufferView = new Int32Array(sharedBuffer); let msg = { sharedBuffer, id, command, args }; worker.postMessage(msg); let status = Atomics.wait(sharedBufferView, 0, 0); - if (status !== "ok" && status !== "not-equal") throw new Error("Internal error: Atomics.wait() failed: " + status); + if (status !== "ok" && status !== "not-equal") + throw new Error("Internal error: Atomics.wait() failed: " + status); let { message: { id: id2, resolve, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort); - if (id !== id2) throw new Error(`Internal error: Expected id ${id} but got id ${id2}`); + if (id !== id2) + throw new Error(`Internal error: Expected id ${id} but got id ${id2}`); if (reject) { applyProperties(reject, properties); throw reject; @@ -2163,16 +2163,14 @@ error: ${text}`); }, analyzeMetafileSync(metafile, options) { return runCallSync("analyzeMetafile", [metafile, options]); - }, - stop() { - worker.terminate(); - workerThreadService = null; } }; }; var startSyncServiceWorker = () => { let workerPort = worker_threads.workerData.workerPort; let parentPort = worker_threads.parentPort; + let service = ensureServiceIsRunning(); + defaultWD = worker_threads.workerData.defaultWD; let extractProperties = (object) => { let properties = {}; if (object && typeof object === "object") { @@ -2182,62 +2180,49 @@ var startSyncServiceWorker = () => { } return properties; }; - try { - let service = ensureServiceIsRunning(); - defaultWD = worker_threads.workerData.defaultWD; - parentPort.on("message", (msg) => { - (async () => { - let { sharedBuffer, id, command, args } = msg; - let sharedBufferView = new Int32Array(sharedBuffer); - try { - switch (command) { - case "build": - workerPort.postMessage({ id, resolve: await service.build(args[0]) }); - break; - case "transform": - workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) }); - break; - case "formatMessages": - workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) }); - break; - case "analyzeMetafile": - workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) }); - break; - default: - throw new Error(`Invalid command: ${command}`); - } - } catch (reject) { - workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); - } - Atomics.add(sharedBufferView, 0, 1); - Atomics.notify(sharedBufferView, 0, Infinity); - })(); - }); - } catch (reject) { - parentPort.on("message", (msg) => { - let { sharedBuffer, id } = msg; + parentPort.on("message", (msg) => { + (async () => { + let { sharedBuffer, id, command, args } = msg; let sharedBufferView = new Int32Array(sharedBuffer); - workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); + try { + switch (command) { + case "build": + workerPort.postMessage({ id, resolve: await service.build(args[0]) }); + break; + case "transform": + workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) }); + break; + case "formatMessages": + workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) }); + break; + case "analyzeMetafile": + workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) }); + break; + default: + throw new Error(`Invalid command: ${command}`); + } + } catch (reject) { + workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); + } Atomics.add(sharedBufferView, 0, 1); Atomics.notify(sharedBufferView, 0, Infinity); - }); - } + })(); + }); }; if (isInternalWorkerThread) { startSyncServiceWorker(); } -var node_default = node_exports; +module.exports = __toCommonJS(node_exports); // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { analyzeMetafile, analyzeMetafileSync, build, buildSync, - context, formatMessages, formatMessagesSync, initialize, - stop, + serve, transform, transformSync, version diff --git a/node_modules/esbuild/package.json b/node_modules/esbuild/package.json index 720860facb..5b534509a3 100644 --- a/node_modules/esbuild/package.json +++ b/node_modules/esbuild/package.json @@ -1,47 +1,35 @@ { "name": "esbuild", - "version": "0.24.0", + "version": "0.14.13", "description": "An extremely fast JavaScript and CSS bundler and minifier.", - "repository": { - "type": "git", - "url": "git+https://github.com/evanw/esbuild.git" - }, + "repository": "https://github.com/evanw/esbuild", "scripts": { "postinstall": "node install.js" }, "main": "lib/main.js", "types": "lib/main.d.ts", - "engines": { - "node": ">=18" - }, "bin": { "esbuild": "bin/esbuild" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" + "esbuild-android-arm64": "0.14.13", + "esbuild-darwin-64": "0.14.13", + "esbuild-darwin-arm64": "0.14.13", + "esbuild-freebsd-64": "0.14.13", + "esbuild-freebsd-arm64": "0.14.13", + "esbuild-linux-32": "0.14.13", + "esbuild-linux-64": "0.14.13", + "esbuild-linux-arm": "0.14.13", + "esbuild-linux-arm64": "0.14.13", + "esbuild-linux-mips64le": "0.14.13", + "esbuild-linux-ppc64le": "0.14.13", + "esbuild-linux-s390x": "0.14.13", + "esbuild-netbsd-64": "0.14.13", + "esbuild-openbsd-64": "0.14.13", + "esbuild-sunos-64": "0.14.13", + "esbuild-windows-32": "0.14.13", + "esbuild-windows-64": "0.14.13", + "esbuild-windows-arm64": "0.14.13" }, "license": "MIT" } diff --git a/node_modules/get-intrinsic/package.json b/node_modules/get-intrinsic/package.json index 263acf9b06..568dff9972 100644 --- a/node_modules/get-intrinsic/package.json +++ b/node_modules/get-intrinsic/package.json @@ -1,93 +1,93 @@ { - "name": "get-intrinsic", - "version": "1.2.4", - "description": "Get and robustly cache all JS language-level intrinsics at first require time", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=.js,.mjs .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/get-intrinsic.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "es", - "js", - "intrinsic", - "getintrinsic", - "es-abstract" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/get-intrinsic/issues" - }, - "homepage": "https://github.com/ljharb/get-intrinsic#readme", - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "call-bind": "^1.0.5", - "es-abstract": "^1.22.3", - "es-value-fixtures": "^1.4.2", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "make-async-function": "^1.0.0", - "make-async-generator-function": "^1.0.0", - "make-generator-function": "^2.0.0", - "mock-property": "^1.0.3", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "object-inspect": "^1.13.1", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "testling": { - "files": "test/GetIntrinsic.js" - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } + "name": "get-intrinsic", + "version": "1.2.4", + "description": "Get and robustly cache all JS language-level intrinsics at first require time", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=.js,.mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/get-intrinsic.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "es", + "js", + "intrinsic", + "getintrinsic", + "es-abstract" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/get-intrinsic/issues" + }, + "homepage": "https://github.com/ljharb/get-intrinsic#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "call-bind": "^1.0.5", + "es-abstract": "^1.22.3", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "make-async-function": "^1.0.0", + "make-async-generator-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "mock-property": "^1.0.3", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "testling": { + "files": "test/GetIntrinsic.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } } diff --git a/node_modules/gopd/package.json b/node_modules/gopd/package.json index 7879d9622b..d5e1fa4a27 100644 --- a/node_modules/gopd/package.json +++ b/node_modules/gopd/package.json @@ -1,71 +1,71 @@ { - "name": "gopd", - "version": "1.0.1", - "description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "lint": "eslint --ext=js,mjs .", - "postlint": "evalmd README.md", - "pretest": "npm run lint", - "tests-only": "tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/gopd.git" - }, - "keywords": [ - "ecmascript", - "javascript", - "getownpropertydescriptor", - "property", - "descriptor" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/gopd/issues" - }, - "homepage": "https://github.com/ljharb/gopd#readme", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.0.0", - "aud": "^2.0.1", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.0", - "safe-publish-latest": "^2.0.0", - "tape": "^5.6.1" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } + "name": "gopd", + "version": "1.0.1", + "description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "postlint": "evalmd README.md", + "pretest": "npm run lint", + "tests-only": "tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/gopd.git" + }, + "keywords": [ + "ecmascript", + "javascript", + "getownpropertydescriptor", + "property", + "descriptor" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/gopd/issues" + }, + "homepage": "https://github.com/ljharb/gopd#readme", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } } diff --git a/node_modules/has-property-descriptors/package.json b/node_modules/has-property-descriptors/package.json index 094b5b3a9c..7e70218b47 100644 --- a/node_modules/has-property-descriptors/package.json +++ b/node_modules/has-property-descriptors/package.json @@ -1,77 +1,77 @@ { - "name": "has-property-descriptors", - "version": "1.0.2", - "description": "Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run lint", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/inspect-js/has-property-descriptors.git" - }, - "keywords": [ - "property", - "descriptors", - "has", - "environment", - "env", - "defineProperty", - "getOwnPropertyDescriptor" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/inspect-js/has-property-descriptors/issues" - }, - "homepage": "https://github.com/inspect-js/has-property-descriptors#readme", - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.4" - }, - "dependencies": { - "es-define-property": "^1.0.0" - }, - "testling": { - "files": "test/index.js" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } + "name": "has-property-descriptors", + "version": "1.0.2", + "description": "Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/has-property-descriptors.git" + }, + "keywords": [ + "property", + "descriptors", + "has", + "environment", + "env", + "defineProperty", + "getOwnPropertyDescriptor" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/has-property-descriptors/issues" + }, + "homepage": "https://github.com/inspect-js/has-property-descriptors#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4" + }, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } } diff --git a/node_modules/has-proto/package.json b/node_modules/has-proto/package.json index 01f1707364..9d37e4ed18 100644 --- a/node_modules/has-proto/package.json +++ b/node_modules/has-proto/package.json @@ -1,78 +1,78 @@ { - "name": "has-proto", - "version": "1.0.3", - "description": "Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p .", - "pretest": "npm run lint", - "tests-only": "tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/inspect-js/has-proto.git" - }, - "keywords": [ - "prototype", - "proto", - "set", - "get", - "__proto__", - "getPrototypeOf", - "setPrototypeOf", - "has" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/inspect-js/has-proto/issues" - }, - "homepage": "https://github.com/inspect-js/has-proto#readme", - "testling": { - "files": "test/index.js" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "@types/tape": "^5.6.4", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.5", - "typescript": "next" - }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } + "name": "has-proto", + "version": "1.0.3", + "description": "Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p .", + "pretest": "npm run lint", + "tests-only": "tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/has-proto.git" + }, + "keywords": [ + "prototype", + "proto", + "set", + "get", + "__proto__", + "getPrototypeOf", + "setPrototypeOf", + "has" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/has-proto/issues" + }, + "homepage": "https://github.com/inspect-js/has-proto#readme", + "testling": { + "files": "test/index.js" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } } diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json index 3da92dd8fc..fe7004a10b 100644 --- a/node_modules/has-symbols/package.json +++ b/node_modules/has-symbols/package.json @@ -1,101 +1,101 @@ { - "name": "has-symbols", - "version": "1.0.3", - "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", - "main": "index.js", - "scripts": { - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run --silent lint", - "test": "npm run tests-only", - "posttest": "aud --production", - "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams", - "test:stock": "nyc node test", - "test:staging": "nyc node --harmony --es-staging test", - "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", - "test:shams:corejs": "nyc node test/shams/core-js.js", - "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", - "lint": "eslint --ext=js,mjs .", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git://github.com/inspect-js/has-symbols.git" - }, - "keywords": [ - "Symbol", - "symbols", - "typeof", - "sham", - "polyfill", - "native", - "core-js", - "ES6" - ], - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/has-symbols/issues" - }, - "homepage": "https://github.com/ljharb/has-symbols#readme", - "devDependencies": { - "@ljharb/eslint-config": "^20.2.3", - "aud": "^2.0.0", - "auto-changelog": "^2.4.0", - "core-js": "^2.6.12", - "eslint": "=8.8.0", - "get-own-property-symbols": "^0.9.5", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.5.2" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "greenkeeper": { - "ignore": [ - "core-js" - ] - } + "name": "has-symbols", + "version": "1.0.3", + "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams", + "test:stock": "nyc node test", + "test:staging": "nyc node --harmony --es-staging test", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "nyc node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/has-symbols.git" + }, + "keywords": [ + "Symbol", + "symbols", + "typeof", + "sham", + "polyfill", + "native", + "core-js", + "ES6" + ], + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/has-symbols/issues" + }, + "homepage": "https://github.com/ljharb/has-symbols#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.2.3", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "core-js": "^2.6.12", + "eslint": "=8.8.0", + "get-own-property-symbols": "^0.9.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "greenkeeper": { + "ignore": [ + "core-js" + ] + } } diff --git a/node_modules/hasown/package.json b/node_modules/hasown/package.json index e2621471bf..8502e13dd5 100644 --- a/node_modules/hasown/package.json +++ b/node_modules/hasown/package.json @@ -1,92 +1,92 @@ { - "name": "hasown", - "version": "2.0.2", - "description": "A robust, ES3 compatible, \"has own property\" predicate.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "types": "index.d.ts", - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "npm run tsc", - "pretest": "npm run lint", - "tsc": "tsc -p .", - "posttsc": "attw -P", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/inspect-js/hasOwn.git" - }, - "keywords": [ - "has", - "hasOwnProperty", - "hasOwn", - "has-own", - "own", - "has", - "property", - "in", - "javascript", - "ecmascript" - ], - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/inspect-js/hasOwn/issues" - }, - "homepage": "https://github.com/inspect-js/hasOwn#readme", - "dependencies": { - "function-bind": "^1.1.2" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.15.1", - "@ljharb/eslint-config": "^21.1.0", - "@ljharb/tsconfig": "^0.2.0", - "@types/function-bind": "^1.1.10", - "@types/mock-property": "^1.0.2", - "@types/tape": "^5.6.4", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "mock-property": "^1.0.3", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.5", - "typescript": "next" - }, - "engines": { - "node": ">= 0.4" - }, - "testling": { - "files": "test/index.js" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows", - "test" - ] - } + "name": "hasown", + "version": "2.0.2", + "description": "A robust, ES3 compatible, \"has own property\" predicate.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "types": "index.d.ts", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "npm run tsc", + "pretest": "npm run lint", + "tsc": "tsc -p .", + "posttsc": "attw -P", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/hasOwn.git" + }, + "keywords": [ + "has", + "hasOwnProperty", + "hasOwn", + "has-own", + "own", + "has", + "property", + "in", + "javascript", + "ecmascript" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/hasOwn/issues" + }, + "homepage": "https://github.com/inspect-js/hasOwn#readme", + "dependencies": { + "function-bind": "^1.1.2" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.15.1", + "@ljharb/eslint-config": "^21.1.0", + "@ljharb/tsconfig": "^0.2.0", + "@types/function-bind": "^1.1.10", + "@types/mock-property": "^1.0.2", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "mock-property": "^1.0.3", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test" + ] + } } diff --git a/node_modules/micromatch/package.json b/node_modules/micromatch/package.json index 80aa03b2a7..d5558bb949 100644 --- a/node_modules/micromatch/package.json +++ b/node_modules/micromatch/package.json @@ -11,9 +11,9 @@ "Brian Woodward (https://twitter.com/doowb)", "Devon Govett (http://badassjs.com)", "Elan Shanker (https://github.com/es128)", - "Fabr\u00edcio Matt\u00e9 (https://ultcombo.js.org)", + "Fabrício Matté (https://ultcombo.js.org)", "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Martin Kol\u00e1rik (https://kolarik.sk)", + "Martin Kolárik (https://kolarik.sk)", "Olsten Larck (https://i.am.charlike.online)", "Paul Miller (paulmillr.com)", "Tom Byrer (https://github.com/tomByrer)", diff --git a/node_modules/qs/package.json b/node_modules/qs/package.json index 02b92ab70d..6dae052173 100644 --- a/node_modules/qs/package.json +++ b/node_modules/qs/package.json @@ -1,91 +1,91 @@ { - "name": "qs", - "description": "A querystring parser that supports nesting and arrays, with a depth limit", - "homepage": "https://github.com/ljharb/qs", - "version": "6.13.0", - "repository": { - "type": "git", - "url": "https://github.com/ljharb/qs.git" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "main": "lib/index.js", - "sideEffects": false, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" + "name": "qs", + "description": "A querystring parser that supports nesting and arrays, with a depth limit", + "homepage": "https://github.com/ljharb/qs", + "version": "6.13.0", + "repository": { + "type": "git", + "url": "https://github.com/ljharb/qs.git" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "main": "lib/index.js", + "sideEffects": false, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "keywords": [ + "querystring", + "qs", + "query", + "url", + "parse", + "stringify" + ], + "engines": { + "node": ">=0.6" + }, + "dependencies": { + "side-channel": "^1.0.6" + }, + "devDependencies": { + "@browserify/envify": "^6.0.0", + "@browserify/uglifyify": "^6.0.0", + "@ljharb/eslint-config": "^21.1.1", + "browserify": "^16.5.2", + "bundle-collapser": "^1.4.0", + "common-shakeify": "~1.0.0", + "eclint": "^2.8.1", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "glob": "=10.3.7", + "has-override-mistake": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-symbols": "^1.0.3", + "iconv-lite": "^0.5.1", + "in-publish": "^2.0.1", + "jackspeak": "=2.1.1", + "mkdirp": "^0.5.5", + "mock-property": "^1.0.3", + "module-deps": "^6.2.3", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.2", + "qs-iconv": "^1.0.4", + "safe-publish-latest": "^2.0.0", + "safer-buffer": "^2.1.2", + "tape": "^5.8.1", + "unassertify": "^3.0.1" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated && npm run dist", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent readme && npm run --silent lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "npx npm@'>=10.2' audit --production", + "readme": "evalmd README.md", + "postlint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", + "lint": "eslint --ext=js,mjs .", + "dist": "mkdirp dist && browserify --standalone Qs -g unassertify -g @browserify/envify -g [@browserify/uglifyify --mangle.keep_fnames --compress.keep_fnames --format.indent_level=1 --compress.arrows=false --compress.passes=4 --compress.typeofs=false] -p common-shakeify -p bundle-collapser/plugin lib/index.js > dist/qs.js" + }, + "license": "BSD-3-Clause", + "publishConfig": { + "ignore": [ + "!dist/*", + "bower.json", + "component.json", + ".github/workflows", + "logos", + "tea.yaml" + ] } - ], - "keywords": [ - "querystring", - "qs", - "query", - "url", - "parse", - "stringify" - ], - "engines": { - "node": ">=0.6" - }, - "dependencies": { - "side-channel": "^1.0.6" - }, - "devDependencies": { - "@browserify/envify": "^6.0.0", - "@browserify/uglifyify": "^6.0.0", - "@ljharb/eslint-config": "^21.1.1", - "browserify": "^16.5.2", - "bundle-collapser": "^1.4.0", - "common-shakeify": "~1.0.0", - "eclint": "^2.8.1", - "es-value-fixtures": "^1.4.2", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "for-each": "^0.3.3", - "glob": "=10.3.7", - "has-override-mistake": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "has-symbols": "^1.0.3", - "iconv-lite": "^0.5.1", - "in-publish": "^2.0.1", - "jackspeak": "=2.1.1", - "mkdirp": "^0.5.5", - "mock-property": "^1.0.3", - "module-deps": "^6.2.3", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "object-inspect": "^1.13.2", - "qs-iconv": "^1.0.4", - "safe-publish-latest": "^2.0.0", - "safer-buffer": "^2.1.2", - "tape": "^5.8.1", - "unassertify": "^3.0.1" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated && npm run dist", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run --silent readme && npm run --silent lint", - "test": "npm run tests-only", - "tests-only": "nyc tape 'test/**/*.js'", - "posttest": "npx npm@'>=10.2' audit --production", - "readme": "evalmd README.md", - "postlint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", - "lint": "eslint --ext=js,mjs .", - "dist": "mkdirp dist && browserify --standalone Qs -g unassertify -g @browserify/envify -g [@browserify/uglifyify --mangle.keep_fnames --compress.keep_fnames --format.indent_level=1 --compress.arrows=false --compress.passes=4 --compress.typeofs=false] -p common-shakeify -p bundle-collapser/plugin lib/index.js > dist/qs.js" - }, - "license": "BSD-3-Clause", - "publishConfig": { - "ignore": [ - "!dist/*", - "bower.json", - "component.json", - ".github/workflows", - "logos", - "tea.yaml" - ] - } } diff --git a/node_modules/recast/node_modules/tslib/modules/index.d.ts b/node_modules/recast/node_modules/tslib/modules/index.d.ts index 3244fabeec..0fedae881e 100644 --- a/node_modules/recast/node_modules/tslib/modules/index.d.ts +++ b/node_modules/recast/node_modules/tslib/modules/index.d.ts @@ -33,6 +33,5 @@ export { __createBinding, __addDisposableResource, __disposeResources, - __rewriteRelativeImportExtension, } from '../tslib.js'; export * as default from '../tslib.js'; diff --git a/node_modules/recast/node_modules/tslib/modules/index.js b/node_modules/recast/node_modules/tslib/modules/index.js index f4f9a06d2a..0c9dcd5f59 100644 --- a/node_modules/recast/node_modules/tslib/modules/index.js +++ b/node_modules/recast/node_modules/tslib/modules/index.js @@ -31,7 +31,6 @@ const { __classPrivateFieldIn, __addDisposableResource, __disposeResources, - __rewriteRelativeImportExtension, } = tslib; export { __extends, @@ -65,6 +64,5 @@ export { __classPrivateFieldIn, __addDisposableResource, __disposeResources, - __rewriteRelativeImportExtension, }; export default tslib; diff --git a/node_modules/recast/node_modules/tslib/package.json b/node_modules/recast/node_modules/tslib/package.json index ee7ce69718..88f67e7f8b 100644 --- a/node_modules/recast/node_modules/tslib/package.json +++ b/node_modules/recast/node_modules/tslib/package.json @@ -2,7 +2,7 @@ "name": "tslib", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "2.8.0", + "version": "2.7.0", "license": "0BSD", "description": "Runtime library for TypeScript helper functions", "keywords": [ diff --git a/node_modules/recast/node_modules/tslib/tslib.d.ts b/node_modules/recast/node_modules/tslib/tslib.d.ts index 9c27e05864..7fdf69c113 100644 --- a/node_modules/recast/node_modules/tslib/tslib.d.ts +++ b/node_modules/recast/node_modules/tslib/tslib.d.ts @@ -451,10 +451,3 @@ export declare function __addDisposableResource(env: { stack: { value?: unkno * @seealso {@link __addDisposableResource} */ export declare function __disposeResources(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }): any; - -/** - * Transforms a relative import specifier ending in a non-declaration TypeScript file extension to its JavaScript file extension counterpart. - * @param path The import specifier. - * @param preserveJsx Causes '*.tsx' to transform to '*.jsx' instead of '*.js'. Should be true when `--jsx` is set to `preserve`. - */ -export declare function __rewriteRelativeImportExtension(path: string, preserveJsx?: boolean): string; \ No newline at end of file diff --git a/node_modules/recast/node_modules/tslib/tslib.es6.js b/node_modules/recast/node_modules/tslib/tslib.es6.js index 2cc91e2ad5..6e2bd871c1 100644 --- a/node_modules/recast/node_modules/tslib/tslib.es6.js +++ b/node_modules/recast/node_modules/tslib/tslib.es6.js @@ -348,25 +348,12 @@ export function __disposeResources(env) { return next(); } -export function __rewriteRelativeImportExtension(path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; -} - export default { __extends: __extends, __assign: __assign, __rest: __rest, __decorate: __decorate, __param: __param, - __esDecorate: __esDecorate, - __runInitializers: __runInitializers, - __propKey: __propKey, - __setFunctionName: __setFunctionName, __metadata: __metadata, __awaiter: __awaiter, __generator: __generator, @@ -389,5 +376,4 @@ export default { __classPrivateFieldIn: __classPrivateFieldIn, __addDisposableResource: __addDisposableResource, __disposeResources: __disposeResources, - __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, }; diff --git a/node_modules/recast/node_modules/tslib/tslib.es6.mjs b/node_modules/recast/node_modules/tslib/tslib.es6.mjs index a1d9ef56b2..17bb2ff8f2 100644 --- a/node_modules/recast/node_modules/tslib/tslib.es6.mjs +++ b/node_modules/recast/node_modules/tslib/tslib.es6.mjs @@ -347,25 +347,12 @@ export function __disposeResources(env) { return next(); } -export function __rewriteRelativeImportExtension(path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; -} - export default { __extends, __assign, __rest, __decorate, __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, __metadata, __awaiter, __generator, @@ -388,5 +375,4 @@ export default { __classPrivateFieldIn, __addDisposableResource, __disposeResources, - __rewriteRelativeImportExtension, }; diff --git a/node_modules/recast/node_modules/tslib/tslib.js b/node_modules/recast/node_modules/tslib/tslib.js index 66fee315d2..bf17a4d8c6 100644 --- a/node_modules/recast/node_modules/tslib/tslib.js +++ b/node_modules/recast/node_modules/tslib/tslib.js @@ -44,7 +44,6 @@ var __classPrivateFieldIn; var __createBinding; var __addDisposableResource; var __disposeResources; -var __rewriteRelativeImportExtension; (function (factory) { var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; if (typeof define === "function" && define.amd) { @@ -396,15 +395,6 @@ var __rewriteRelativeImportExtension; return next(); }; - __rewriteRelativeImportExtension = function (path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; - }; - exporter("__extends", __extends); exporter("__assign", __assign); exporter("__rest", __rest); @@ -436,40 +426,4 @@ var __rewriteRelativeImportExtension; exporter("__classPrivateFieldIn", __classPrivateFieldIn); exporter("__addDisposableResource", __addDisposableResource); exporter("__disposeResources", __disposeResources); - exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); -}); - -0 && (module.exports = { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __createBinding, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, }); diff --git a/node_modules/rollup/dist/es/package.json b/node_modules/rollup/dist/es/package.json index 3dbc1ca591..7c34deb583 100644 --- a/node_modules/rollup/dist/es/package.json +++ b/node_modules/rollup/dist/es/package.json @@ -1,3 +1 @@ -{ - "type": "module" -} +{"type":"module"} \ No newline at end of file diff --git a/node_modules/set-function-length/package.json b/node_modules/set-function-length/package.json index 585c9c87c8..f6b88819a6 100644 --- a/node_modules/set-function-length/package.json +++ b/node_modules/set-function-length/package.json @@ -1,102 +1,102 @@ { - "name": "set-function-length", - "version": "1.2.2", - "description": "Set a function's length property", - "main": "index.js", - "exports": { - ".": "./index.js", - "./env": "./env.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "directories": { - "test": "test" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "tsc": "tsc -p .", - "posttsc": "attw -P", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "npm run tsc", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/set-function-length.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "set", - "function", - "length", - "function.length" - ], - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/set-function-length/issues" - }, - "homepage": "https://github.com/ljharb/set-function-length#readme", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.15.1", - "@ljharb/eslint-config": "^21.1.0", - "@ljharb/tsconfig": "^0.1.1", - "@types/call-bind": "^1.0.5", - "@types/define-properties": "^1.1.5", - "@types/es-value-fixtures": "^1.4.4", - "@types/for-each": "^0.3.3", - "@types/function-bind": "^1.1.10", - "@types/gopd": "^1.0.3", - "@types/has-property-descriptors": "^1.0.3", - "@types/object-inspect": "^1.8.4", - "@types/tape": "^5.6.4", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "call-bind": "^1.0.7", - "es-value-fixtures": "^1.4.2", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "for-each": "^0.3.3", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "object-inspect": "^1.13.1", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.5", - "typescript": "next" - }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows", - "test" - ] - } + "name": "set-function-length", + "version": "1.2.2", + "description": "Set a function's length property", + "main": "index.js", + "exports": { + ".": "./index.js", + "./env": "./env.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "directories": { + "test": "test" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "tsc": "tsc -p .", + "posttsc": "attw -P", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "npm run tsc", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/set-function-length.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "set", + "function", + "length", + "function.length" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/set-function-length/issues" + }, + "homepage": "https://github.com/ljharb/set-function-length#readme", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.15.1", + "@ljharb/eslint-config": "^21.1.0", + "@ljharb/tsconfig": "^0.1.1", + "@types/call-bind": "^1.0.5", + "@types/define-properties": "^1.1.5", + "@types/es-value-fixtures": "^1.4.4", + "@types/for-each": "^0.3.3", + "@types/function-bind": "^1.1.10", + "@types/gopd": "^1.0.3", + "@types/has-property-descriptors": "^1.0.3", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "call-bind": "^1.0.7", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test" + ] + } } diff --git a/node_modules/side-channel/package.json b/node_modules/side-channel/package.json index d698b052c2..02cffca6c8 100644 --- a/node_modules/side-channel/package.json +++ b/node_modules/side-channel/package.json @@ -1,84 +1,84 @@ { - "name": "side-channel", - "version": "1.0.6", - "description": "Store information about any JS value in a side channel. Uses WeakMap if available.", - "main": "index.js", - "exports": { - "./package.json": "./package.json", - ".": "./index.js" - }, - "types": "./index.d.ts", - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/side-channel.git" - }, - "keywords": [ - "weakmap", - "map", - "side", - "channel", - "metadata" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/side-channel/issues" - }, - "homepage": "https://github.com/ljharb/side-channel#readme", - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "@types/call-bind": "^1.0.5", - "@types/get-intrinsic": "^1.2.2", - "@types/object-inspect": "^1.8.4", - "@types/tape": "^5.6.4", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "eclint": "^2.8.1", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.5", - "typescript": "next" - }, - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } + "name": "side-channel", + "version": "1.0.6", + "description": "Store information about any JS value in a side channel. Uses WeakMap if available.", + "main": "index.js", + "exports": { + "./package.json": "./package.json", + ".": "./index.js" + }, + "types": "./index.d.ts", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/side-channel.git" + }, + "keywords": [ + "weakmap", + "map", + "side", + "channel", + "metadata" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/side-channel/issues" + }, + "homepage": "https://github.com/ljharb/side-channel#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/call-bind": "^1.0.5", + "@types/get-intrinsic": "^1.2.2", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } } diff --git a/package-lock.json b/package-lock.json index a497762e2d..9e01a1e26d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "chokidar": "3.5.2", "cssnano": "5.1.14", "cssnano-preset-lite": "2.1.3", - "esbuild": "0.24.0", + "esbuild": "0.14.13", "escodegen": "2.0.0", "eslint": "8.19.0", "eslint-plugin-import": "2.25.4", @@ -465,414 +465,6 @@ "node": ">=16" } }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2faix-ppc64/-/aix-ppc64-0.24.0.tgz", - "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fandroid-arm/-/android-arm-0.24.0.tgz", - "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fandroid-arm64/-/android-arm64-0.24.0.tgz", - "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fandroid-x64/-/android-x64-0.24.0.tgz", - "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fdarwin-arm64/-/darwin-arm64-0.24.0.tgz", - "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fdarwin-x64/-/darwin-x64-0.24.0.tgz", - "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2ffreebsd-arm64/-/freebsd-arm64-0.24.0.tgz", - "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2ffreebsd-x64/-/freebsd-x64-0.24.0.tgz", - "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-arm/-/linux-arm-0.24.0.tgz", - "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-arm64/-/linux-arm64-0.24.0.tgz", - "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-ia32/-/linux-ia32-0.24.0.tgz", - "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-loong64/-/linux-loong64-0.24.0.tgz", - "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-mips64el/-/linux-mips64el-0.24.0.tgz", - "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-ppc64/-/linux-ppc64-0.24.0.tgz", - "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-riscv64/-/linux-riscv64-0.24.0.tgz", - "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-s390x/-/linux-s390x-0.24.0.tgz", - "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-x64/-/linux-x64-0.24.0.tgz", - "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fnetbsd-x64/-/netbsd-x64-0.24.0.tgz", - "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fopenbsd-arm64/-/openbsd-arm64-0.24.0.tgz", - "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fopenbsd-x64/-/openbsd-x64-0.24.0.tgz", - "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fsunos-x64/-/sunos-x64-0.24.0.tgz", - "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fwin32-arm64/-/win32-arm64-0.24.0.tgz", - "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fwin32-ia32/-/win32-ia32-0.24.0.tgz", - "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fwin32-x64/-/win32-x64-0.24.0.tgz", - "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://npm.skia.org/chrome-devtools/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -1994,9 +1586,9 @@ } }, "node_modules/ast-types/node_modules/tslib": { - "version": "2.8.0", - "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "version": "2.7.0", + "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", "dev": true, "license": "0BSD" }, @@ -3136,9 +2728,9 @@ } }, "node_modules/degenerator/node_modules/tslib": { - "version": "2.8.0", - "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "version": "2.7.0", + "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", "dev": true, "license": "0BSD" }, @@ -3420,45 +3012,269 @@ } }, "node_modules/esbuild": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/esbuild/-/esbuild-0.24.0.tgz", - "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild/-/esbuild-0.14.13.tgz", + "integrity": "sha512-FIxvAdj3i2oHA6ex+E67bG7zlSTO+slt8kU2ogHDgGtrQLy2HNChv3PYjiFTYkt8hZbEAniZCXVeHn+FrHt7dA==", "dev": true, "hasInstallScript": true, - "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, - "engines": { - "node": ">=18" - }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" + "esbuild-android-arm64": "0.14.13", + "esbuild-darwin-64": "0.14.13", + "esbuild-darwin-arm64": "0.14.13", + "esbuild-freebsd-64": "0.14.13", + "esbuild-freebsd-arm64": "0.14.13", + "esbuild-linux-32": "0.14.13", + "esbuild-linux-64": "0.14.13", + "esbuild-linux-arm": "0.14.13", + "esbuild-linux-arm64": "0.14.13", + "esbuild-linux-mips64le": "0.14.13", + "esbuild-linux-ppc64le": "0.14.13", + "esbuild-linux-s390x": "0.14.13", + "esbuild-netbsd-64": "0.14.13", + "esbuild-openbsd-64": "0.14.13", + "esbuild-sunos-64": "0.14.13", + "esbuild-windows-32": "0.14.13", + "esbuild-windows-64": "0.14.13", + "esbuild-windows-arm64": "0.14.13" } }, + "node_modules/esbuild-android-arm64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-android-arm64/-/esbuild-android-arm64-0.14.13.tgz", + "integrity": "sha512-rhtwl+KJ3BzzXkK09N3/YbEF1i5WhriysJEStoeWNBzchx9hlmzyWmDGQQhu56HF78ua3JrVPyLOsdLGvtMvxQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/esbuild-darwin-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-darwin-64/-/esbuild-darwin-64-0.14.13.tgz", + "integrity": "sha512-Fl47xIt5RMu50WIgMU93kwmUUJb+BPuL8R895n/aBNQqavS+KUMpLPoqKGABBV4myfx/fnAD/97X8Gt1C1YW6w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/esbuild-darwin-arm64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.13.tgz", + "integrity": "sha512-UttqKRFXsWvuivcyAbFmo54vdkC9Me1ZYQNuoz/uBYDbkb2MgqKYG2+xoVKPBhLvhT0CKM5QGKD81flMH5BE6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/esbuild-freebsd-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.13.tgz", + "integrity": "sha512-dlIhPFSp29Yq2TPh7Cm3/4M0uKjlfvOylHVNCRvRNiOvDbBol6/NZ3kLisczms+Yra0rxVapBPN1oMbSMuts9g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/esbuild-freebsd-arm64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.13.tgz", + "integrity": "sha512-bNOHLu7Oq6RwaAMnwPbJ40DVGPl9GlAOnfH/dFZ792f8hFEbopkbtVzo1SU1jjfY3TGLWOgqHNWxPxx1N7Au+g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/esbuild-linux-32": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-32/-/esbuild-linux-32-0.14.13.tgz", + "integrity": "sha512-WzXyBx6zx16adGi7wPBvH2lRCBzYMcqnBRrJ8ciLIqYyruGvprZocX1nFWfiexjLcFxIElWnMNPX6LG7ULqyXA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-64/-/esbuild-linux-64-0.14.13.tgz", + "integrity": "sha512-P6OFAfcoUvE7g9h/0UKm3qagvTovwqpCF1wbFLWe/BcCY8BS1bR/+SxUjCeKX2BcpIsg4/43ezHDE/ntg/iOpw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-arm": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-arm/-/esbuild-linux-arm-0.14.13.tgz", + "integrity": "sha512-4jmm0UySCg3Wi6FEBS7jpiPb1IyckI5um5kzYRwulHxPzkiokd6cgpcsTakR4/Y84UEicS8LnFAghHhXHZhbFg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-arm64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.13.tgz", + "integrity": "sha512-k/uIvmkm4mc7vyMvJVwILgGxi2F+FuvLdmESIIWoHrnxEfEekC5AWpI/R6GQ2OMfp8snebSQLs8KL05QPnt1zA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-mips64le": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.13.tgz", + "integrity": "sha512-vwYtgjQ1TRlUGL88km9wH9TjXsdZyZ/Xht1ASptg5XGRlqGquVjLGH11PfLLunoMdkQ0YTXR68b4l5gRfjVbyg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-ppc64le": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.13.tgz", + "integrity": "sha512-0KqDSIkZaYugtcdpFCd3eQ38Fg6TzhxmOpkhDIKNTwD/W2RoXeiS+Z4y5yQ3oysb/ySDOxWkwNqTdXS4sz2LdQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-linux-s390x": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.13.tgz", + "integrity": "sha512-bG20i7d0CN97fwPN9LaLe64E2IrI0fPZWEcoiff9hzzsvo/fQCx0YjMbPC2T3gqQ48QZRltdU9hQilTjHk3geQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/esbuild-netbsd-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.13.tgz", + "integrity": "sha512-jz96PQb0ltqyqLggPpcRbWxzLvWHvrZBHZQyjcOzKRDqg1fR/R1y10b1Cuv84xoIbdAf+ceNUJkMN21FfR9G2g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ] + }, + "node_modules/esbuild-openbsd-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.13.tgz", + "integrity": "sha512-bp6zSo3kDCXKPM5MmVUg6DEpt+yXDx37iDGzNTn3Kf9xh6d0cdITxUC4Bx6S3Di79GVYubWs+wNjSRVFIJpryw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/esbuild-sunos-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-sunos-64/-/esbuild-sunos-64-0.14.13.tgz", + "integrity": "sha512-08Fne1T9QHYxUnu55sV9V4i/yECADOaI1zMGET2YUa8SRkib10i80hc89U7U/G02DxpN/KUJMWEGq2wKTn0QFQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ] + }, + "node_modules/esbuild-windows-32": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-windows-32/-/esbuild-windows-32-0.14.13.tgz", + "integrity": "sha512-MW3BMIi9+fzTyDdljH0ftfT/qlD3t+aVzle1O+zZ2MgHRMQD20JwWgyqoJXhe6uDVyunrAUbcjH3qTIEZN3isg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/esbuild-windows-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-windows-64/-/esbuild-windows-64-0.14.13.tgz", + "integrity": "sha512-d7+0N+EOgBKdi/nMxlQ8QA5xHBlpcLtSrYnHsA+Xp4yZk28dYfRw1+embsHf5uN5/1iPvrJwPrcpgDH1xyy4JA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/esbuild-windows-arm64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.13.tgz", + "integrity": "sha512-oX5hmgXk9yNKbb5AxThzRQm/E9kiHyDll7JJeyeT1fuGENTifv33f0INCpjBQ+Ty5ChKc84++ZQTEBwLCA12Kw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://npm.skia.org/chrome-devtools/escalade/-/escalade-3.1.1.tgz", @@ -7877,9 +7693,9 @@ } }, "node_modules/recast/node_modules/tslib": { - "version": "2.8.0", - "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "version": "2.7.0", + "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", "dev": true, "license": "0BSD" }, @@ -9988,174 +9804,6 @@ "jsdoc-type-pratt-parser": "~4.0.0" } }, - "@esbuild/aix-ppc64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2faix-ppc64/-/aix-ppc64-0.24.0.tgz", - "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", - "dev": true, - "optional": true - }, - "@esbuild/android-arm": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fandroid-arm/-/android-arm-0.24.0.tgz", - "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", - "dev": true, - "optional": true - }, - "@esbuild/android-arm64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fandroid-arm64/-/android-arm64-0.24.0.tgz", - "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", - "dev": true, - "optional": true - }, - "@esbuild/android-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fandroid-x64/-/android-x64-0.24.0.tgz", - "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-arm64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fdarwin-arm64/-/darwin-arm64-0.24.0.tgz", - "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fdarwin-x64/-/darwin-x64-0.24.0.tgz", - "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-arm64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2ffreebsd-arm64/-/freebsd-arm64-0.24.0.tgz", - "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2ffreebsd-x64/-/freebsd-x64-0.24.0.tgz", - "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-arm/-/linux-arm-0.24.0.tgz", - "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-arm64/-/linux-arm64-0.24.0.tgz", - "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ia32": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-ia32/-/linux-ia32-0.24.0.tgz", - "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", - "dev": true, - "optional": true - }, - "@esbuild/linux-loong64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-loong64/-/linux-loong64-0.24.0.tgz", - "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", - "dev": true, - "optional": true - }, - "@esbuild/linux-mips64el": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-mips64el/-/linux-mips64el-0.24.0.tgz", - "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ppc64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-ppc64/-/linux-ppc64-0.24.0.tgz", - "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-riscv64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-riscv64/-/linux-riscv64-0.24.0.tgz", - "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", - "dev": true, - "optional": true - }, - "@esbuild/linux-s390x": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-s390x/-/linux-s390x-0.24.0.tgz", - "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", - "dev": true, - "optional": true - }, - "@esbuild/linux-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2flinux-x64/-/linux-x64-0.24.0.tgz", - "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", - "dev": true, - "optional": true - }, - "@esbuild/netbsd-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fnetbsd-x64/-/netbsd-x64-0.24.0.tgz", - "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", - "dev": true, - "optional": true - }, - "@esbuild/openbsd-arm64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fopenbsd-arm64/-/openbsd-arm64-0.24.0.tgz", - "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", - "dev": true, - "optional": true - }, - "@esbuild/openbsd-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fopenbsd-x64/-/openbsd-x64-0.24.0.tgz", - "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", - "dev": true, - "optional": true - }, - "@esbuild/sunos-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fsunos-x64/-/sunos-x64-0.24.0.tgz", - "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", - "dev": true, - "optional": true - }, - "@esbuild/win32-arm64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fwin32-arm64/-/win32-arm64-0.24.0.tgz", - "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", - "dev": true, - "optional": true - }, - "@esbuild/win32-ia32": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fwin32-ia32/-/win32-ia32-0.24.0.tgz", - "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", - "dev": true, - "optional": true - }, - "@esbuild/win32-x64": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/@esbuild%2fwin32-x64/-/win32-x64-0.24.0.tgz", - "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", - "dev": true, - "optional": true - }, "@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://npm.skia.org/chrome-devtools/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -11008,9 +10656,9 @@ }, "dependencies": { "tslib": { - "version": "2.8.0", - "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "version": "2.7.0", + "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", "dev": true } } @@ -11832,9 +11480,9 @@ "dev": true }, "tslib": { - "version": "2.8.0", - "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "version": "2.7.0", + "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", "dev": true } } @@ -12066,37 +11714,157 @@ } }, "esbuild": { - "version": "0.24.0", - "resolved": "https://npm.skia.org/chrome-devtools/esbuild/-/esbuild-0.24.0.tgz", - "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild/-/esbuild-0.14.13.tgz", + "integrity": "sha512-FIxvAdj3i2oHA6ex+E67bG7zlSTO+slt8kU2ogHDgGtrQLy2HNChv3PYjiFTYkt8hZbEAniZCXVeHn+FrHt7dA==", "dev": true, "requires": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" + "esbuild-android-arm64": "0.14.13", + "esbuild-darwin-64": "0.14.13", + "esbuild-darwin-arm64": "0.14.13", + "esbuild-freebsd-64": "0.14.13", + "esbuild-freebsd-arm64": "0.14.13", + "esbuild-linux-32": "0.14.13", + "esbuild-linux-64": "0.14.13", + "esbuild-linux-arm": "0.14.13", + "esbuild-linux-arm64": "0.14.13", + "esbuild-linux-mips64le": "0.14.13", + "esbuild-linux-ppc64le": "0.14.13", + "esbuild-linux-s390x": "0.14.13", + "esbuild-netbsd-64": "0.14.13", + "esbuild-openbsd-64": "0.14.13", + "esbuild-sunos-64": "0.14.13", + "esbuild-windows-32": "0.14.13", + "esbuild-windows-64": "0.14.13", + "esbuild-windows-arm64": "0.14.13" } }, + "esbuild-android-arm64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-android-arm64/-/esbuild-android-arm64-0.14.13.tgz", + "integrity": "sha512-rhtwl+KJ3BzzXkK09N3/YbEF1i5WhriysJEStoeWNBzchx9hlmzyWmDGQQhu56HF78ua3JrVPyLOsdLGvtMvxQ==", + "dev": true, + "optional": true + }, + "esbuild-darwin-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-darwin-64/-/esbuild-darwin-64-0.14.13.tgz", + "integrity": "sha512-Fl47xIt5RMu50WIgMU93kwmUUJb+BPuL8R895n/aBNQqavS+KUMpLPoqKGABBV4myfx/fnAD/97X8Gt1C1YW6w==", + "dev": true, + "optional": true + }, + "esbuild-darwin-arm64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.13.tgz", + "integrity": "sha512-UttqKRFXsWvuivcyAbFmo54vdkC9Me1ZYQNuoz/uBYDbkb2MgqKYG2+xoVKPBhLvhT0CKM5QGKD81flMH5BE6A==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.13.tgz", + "integrity": "sha512-dlIhPFSp29Yq2TPh7Cm3/4M0uKjlfvOylHVNCRvRNiOvDbBol6/NZ3kLisczms+Yra0rxVapBPN1oMbSMuts9g==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-arm64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.13.tgz", + "integrity": "sha512-bNOHLu7Oq6RwaAMnwPbJ40DVGPl9GlAOnfH/dFZ792f8hFEbopkbtVzo1SU1jjfY3TGLWOgqHNWxPxx1N7Au+g==", + "dev": true, + "optional": true + }, + "esbuild-linux-32": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-32/-/esbuild-linux-32-0.14.13.tgz", + "integrity": "sha512-WzXyBx6zx16adGi7wPBvH2lRCBzYMcqnBRrJ8ciLIqYyruGvprZocX1nFWfiexjLcFxIElWnMNPX6LG7ULqyXA==", + "dev": true, + "optional": true + }, + "esbuild-linux-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-64/-/esbuild-linux-64-0.14.13.tgz", + "integrity": "sha512-P6OFAfcoUvE7g9h/0UKm3qagvTovwqpCF1wbFLWe/BcCY8BS1bR/+SxUjCeKX2BcpIsg4/43ezHDE/ntg/iOpw==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-arm/-/esbuild-linux-arm-0.14.13.tgz", + "integrity": "sha512-4jmm0UySCg3Wi6FEBS7jpiPb1IyckI5um5kzYRwulHxPzkiokd6cgpcsTakR4/Y84UEicS8LnFAghHhXHZhbFg==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.13.tgz", + "integrity": "sha512-k/uIvmkm4mc7vyMvJVwILgGxi2F+FuvLdmESIIWoHrnxEfEekC5AWpI/R6GQ2OMfp8snebSQLs8KL05QPnt1zA==", + "dev": true, + "optional": true + }, + "esbuild-linux-mips64le": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.13.tgz", + "integrity": "sha512-vwYtgjQ1TRlUGL88km9wH9TjXsdZyZ/Xht1ASptg5XGRlqGquVjLGH11PfLLunoMdkQ0YTXR68b4l5gRfjVbyg==", + "dev": true, + "optional": true + }, + "esbuild-linux-ppc64le": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.13.tgz", + "integrity": "sha512-0KqDSIkZaYugtcdpFCd3eQ38Fg6TzhxmOpkhDIKNTwD/W2RoXeiS+Z4y5yQ3oysb/ySDOxWkwNqTdXS4sz2LdQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-s390x": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.13.tgz", + "integrity": "sha512-bG20i7d0CN97fwPN9LaLe64E2IrI0fPZWEcoiff9hzzsvo/fQCx0YjMbPC2T3gqQ48QZRltdU9hQilTjHk3geQ==", + "dev": true, + "optional": true + }, + "esbuild-netbsd-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.13.tgz", + "integrity": "sha512-jz96PQb0ltqyqLggPpcRbWxzLvWHvrZBHZQyjcOzKRDqg1fR/R1y10b1Cuv84xoIbdAf+ceNUJkMN21FfR9G2g==", + "dev": true, + "optional": true + }, + "esbuild-openbsd-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.13.tgz", + "integrity": "sha512-bp6zSo3kDCXKPM5MmVUg6DEpt+yXDx37iDGzNTn3Kf9xh6d0cdITxUC4Bx6S3Di79GVYubWs+wNjSRVFIJpryw==", + "dev": true, + "optional": true + }, + "esbuild-sunos-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-sunos-64/-/esbuild-sunos-64-0.14.13.tgz", + "integrity": "sha512-08Fne1T9QHYxUnu55sV9V4i/yECADOaI1zMGET2YUa8SRkib10i80hc89U7U/G02DxpN/KUJMWEGq2wKTn0QFQ==", + "dev": true, + "optional": true + }, + "esbuild-windows-32": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-windows-32/-/esbuild-windows-32-0.14.13.tgz", + "integrity": "sha512-MW3BMIi9+fzTyDdljH0ftfT/qlD3t+aVzle1O+zZ2MgHRMQD20JwWgyqoJXhe6uDVyunrAUbcjH3qTIEZN3isg==", + "dev": true, + "optional": true + }, + "esbuild-windows-64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-windows-64/-/esbuild-windows-64-0.14.13.tgz", + "integrity": "sha512-d7+0N+EOgBKdi/nMxlQ8QA5xHBlpcLtSrYnHsA+Xp4yZk28dYfRw1+embsHf5uN5/1iPvrJwPrcpgDH1xyy4JA==", + "dev": true, + "optional": true + }, + "esbuild-windows-arm64": { + "version": "0.14.13", + "resolved": "https://npm.skia.org/chrome-devtools/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.13.tgz", + "integrity": "sha512-oX5hmgXk9yNKbb5AxThzRQm/E9kiHyDll7JJeyeT1fuGENTifv33f0INCpjBQ+Ty5ChKc84++ZQTEBwLCA12Kw==", + "dev": true, + "optional": true + }, "escalade": { "version": "3.1.1", "resolved": "https://npm.skia.org/chrome-devtools/escalade/-/escalade-3.1.1.tgz", @@ -15355,9 +15123,9 @@ }, "dependencies": { "tslib": { - "version": "2.8.0", - "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "version": "2.7.0", + "resolved": "https://npm.skia.org/chrome-devtools/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", "dev": true } } diff --git a/package.json b/package.json index c45a3633e2..f1b112b48a 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "chokidar": "3.5.2", "cssnano": "5.1.14", "cssnano-preset-lite": "2.1.3", - "esbuild": "0.24.0", + "esbuild": "0.14.13", "escodegen": "2.0.0", "eslint": "8.19.0", "eslint-plugin-import": "2.25.4",