@storm-software/workspace-tools 1.60.19 → 1.60.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +3 -65
- package/index.js +108 -2518
- package/meta.json +1 -1
- package/package.json +2 -5
- package/src/base/index.js +90 -90
- package/src/executors/tsup/executor.js +82 -2492
- package/src/executors/tsup-browser/executor.js +82 -2492
- package/src/executors/tsup-neutral/executor.js +82 -2492
- package/src/executors/tsup-node/executor.js +82 -2492
- package/src/generators/browser-library/generator.js +90 -90
- package/src/generators/neutral-library/generator.js +90 -90
- package/src/generators/node-library/generator.js +90 -90
- package/src/generators/release-version/generator.js +8 -8
- package/src/utils/index.js +12 -2422
|
@@ -171950,9 +171950,9 @@ var require_devkit = __commonJS({
|
|
|
171950
171950
|
}
|
|
171951
171951
|
});
|
|
171952
171952
|
|
|
171953
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
171953
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/package.json
|
|
171954
171954
|
var require_package4 = __commonJS({
|
|
171955
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
171955
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/package.json"(exports2, module2) {
|
|
171956
171956
|
module2.exports = {
|
|
171957
171957
|
name: "@nx/js",
|
|
171958
171958
|
version: "18.0.4",
|
|
@@ -172032,9 +172032,9 @@ var require_package4 = __commonJS({
|
|
|
172032
172032
|
}
|
|
172033
172033
|
});
|
|
172034
172034
|
|
|
172035
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172035
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/versions.js
|
|
172036
172036
|
var require_versions2 = __commonJS({
|
|
172037
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172037
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/versions.js"(exports2) {
|
|
172038
172038
|
"use strict";
|
|
172039
172039
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
172040
172040
|
exports2.supportedTypescriptVersions = exports2.typescriptVersion = exports2.verdaccioVersion = exports2.typesNodeVersion = exports2.tsLibVersion = exports2.swcNodeVersion = exports2.swcHelpersVersion = exports2.swcCoreVersion = exports2.swcCliVersion = exports2.prettierVersion = exports2.esbuildVersion = exports2.nxVersion = void 0;
|
|
@@ -172053,9 +172053,9 @@ var require_versions2 = __commonJS({
|
|
|
172053
172053
|
}
|
|
172054
172054
|
});
|
|
172055
172055
|
|
|
172056
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172056
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/add-tslib-dependencies.js
|
|
172057
172057
|
var require_add_tslib_dependencies = __commonJS({
|
|
172058
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172058
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/add-tslib-dependencies.js"(exports2) {
|
|
172059
172059
|
"use strict";
|
|
172060
172060
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
172061
172061
|
exports2.addTsLibDependencies = void 0;
|
|
@@ -172070,9 +172070,9 @@ var require_add_tslib_dependencies = __commonJS({
|
|
|
172070
172070
|
}
|
|
172071
172071
|
});
|
|
172072
172072
|
|
|
172073
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172073
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/load-ts-transformers.js
|
|
172074
172074
|
var require_load_ts_transformers = __commonJS({
|
|
172075
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172075
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/load-ts-transformers.js"(exports2, module2) {
|
|
172076
172076
|
"use strict";
|
|
172077
172077
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
172078
172078
|
exports2.loadTsTransformers = void 0;
|
|
@@ -172137,9 +172137,9 @@ var require_load_ts_transformers = __commonJS({
|
|
|
172137
172137
|
}
|
|
172138
172138
|
});
|
|
172139
172139
|
|
|
172140
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172140
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/print-diagnostics.js
|
|
172141
172141
|
var require_print_diagnostics = __commonJS({
|
|
172142
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172142
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/print-diagnostics.js"(exports2) {
|
|
172143
172143
|
"use strict";
|
|
172144
172144
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
172145
172145
|
exports2.printDiagnostics = void 0;
|
|
@@ -172192,9 +172192,9 @@ var require_js_tokens2 = __commonJS({
|
|
|
172192
172192
|
}
|
|
172193
172193
|
});
|
|
172194
172194
|
|
|
172195
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172195
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/code-frames/identifiers.js
|
|
172196
172196
|
var require_identifiers3 = __commonJS({
|
|
172197
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172197
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/code-frames/identifiers.js"(exports2) {
|
|
172198
172198
|
"use strict";
|
|
172199
172199
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
172200
172200
|
exports2.isKeyword = exports2.isReservedWord = void 0;
|
|
@@ -172246,9 +172246,9 @@ var require_identifiers3 = __commonJS({
|
|
|
172246
172246
|
}
|
|
172247
172247
|
});
|
|
172248
172248
|
|
|
172249
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172249
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/code-frames/highlight.js
|
|
172250
172250
|
var require_highlight = __commonJS({
|
|
172251
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172251
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/code-frames/highlight.js"(exports2) {
|
|
172252
172252
|
"use strict";
|
|
172253
172253
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
172254
172254
|
exports2.highlight = void 0;
|
|
@@ -172313,9 +172313,9 @@ var require_highlight = __commonJS({
|
|
|
172313
172313
|
}
|
|
172314
172314
|
});
|
|
172315
172315
|
|
|
172316
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172316
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/ensure-typescript.js
|
|
172317
172317
|
var require_ensure_typescript = __commonJS({
|
|
172318
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
172318
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/ensure-typescript.js"(exports2) {
|
|
172319
172319
|
"use strict";
|
|
172320
172320
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
172321
172321
|
exports2.ensureTypescript = void 0;
|
|
@@ -375005,9 +375005,9 @@ ${e3.message}`;
|
|
|
375005
375005
|
}
|
|
375006
375006
|
});
|
|
375007
375007
|
|
|
375008
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375008
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/ts-config.js
|
|
375009
375009
|
var require_ts_config = __commonJS({
|
|
375010
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375010
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/ts-config.js"(exports2) {
|
|
375011
375011
|
"use strict";
|
|
375012
375012
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
375013
375013
|
exports2.readTsConfigPaths = exports2.addTsConfigPath = exports2.getRootTsConfigFileName = exports2.getRootTsConfigPath = exports2.getRelativePathToRootTsConfig = exports2.getRootTsConfigPathInTree = exports2.readTsConfig = void 0;
|
|
@@ -375091,9 +375091,9 @@ var require_ts_config = __commonJS({
|
|
|
375091
375091
|
}
|
|
375092
375092
|
});
|
|
375093
375093
|
|
|
375094
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375094
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/run-type-check.js
|
|
375095
375095
|
var require_run_type_check = __commonJS({
|
|
375096
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375096
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/run-type-check.js"(exports2) {
|
|
375097
375097
|
"use strict";
|
|
375098
375098
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
375099
375099
|
exports2.getFormattedDiagnostic = exports2.runTypeCheck = exports2.runTypeCheckWatch = void 0;
|
|
@@ -375209,9 +375209,9 @@ var require_run_type_check = __commonJS({
|
|
|
375209
375209
|
}
|
|
375210
375210
|
});
|
|
375211
375211
|
|
|
375212
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375212
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/get-source-nodes.js
|
|
375213
375213
|
var require_get_source_nodes = __commonJS({
|
|
375214
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375214
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/get-source-nodes.js"(exports2) {
|
|
375215
375215
|
"use strict";
|
|
375216
375216
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
375217
375217
|
exports2.getSourceNodes = void 0;
|
|
@@ -375233,9 +375233,9 @@ var require_get_source_nodes = __commonJS({
|
|
|
375233
375233
|
}
|
|
375234
375234
|
});
|
|
375235
375235
|
|
|
375236
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375236
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/swc/get-swcrc-path.js
|
|
375237
375237
|
var require_get_swcrc_path = __commonJS({
|
|
375238
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375238
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/swc/get-swcrc-path.js"(exports2) {
|
|
375239
375239
|
"use strict";
|
|
375240
375240
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
375241
375241
|
exports2.getSwcrcPath = void 0;
|
|
@@ -375247,9 +375247,9 @@ var require_get_swcrc_path = __commonJS({
|
|
|
375247
375247
|
}
|
|
375248
375248
|
});
|
|
375249
375249
|
|
|
375250
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375250
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/compiler-helper-dependency.js
|
|
375251
375251
|
var require_compiler_helper_dependency = __commonJS({
|
|
375252
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375252
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/compiler-helper-dependency.js"(exports2) {
|
|
375253
375253
|
"use strict";
|
|
375254
375254
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
375255
375255
|
exports2.getHelperDependenciesFromProjectGraph = exports2.getHelperDependency = exports2.HelperDependency = void 0;
|
|
@@ -375348,9 +375348,9 @@ var require_compiler_helper_dependency = __commonJS({
|
|
|
375348
375348
|
}
|
|
375349
375349
|
});
|
|
375350
375350
|
|
|
375351
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375351
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/create-ts-config.js
|
|
375352
375352
|
var require_create_ts_config = __commonJS({
|
|
375353
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375353
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/create-ts-config.js"(exports2) {
|
|
375354
375354
|
"use strict";
|
|
375355
375355
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
375356
375356
|
exports2.extractTsConfigBase = exports2.tsConfigBaseOptions = void 0;
|
|
@@ -375400,9 +375400,9 @@ var require_create_ts_config = __commonJS({
|
|
|
375400
375400
|
}
|
|
375401
375401
|
});
|
|
375402
375402
|
|
|
375403
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375403
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/ast-utils.js
|
|
375404
375404
|
var require_ast_utils = __commonJS({
|
|
375405
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375405
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/typescript/ast-utils.js"(exports2) {
|
|
375406
375406
|
"use strict";
|
|
375407
375407
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
375408
375408
|
exports2.findNodes = exports2.findClass = exports2.addMethod = exports2.addParameterToConstructor = exports2.replaceNodeValue = exports2.getImport = exports2.addGlobal = exports2.insertImport = exports2.removeChange = exports2.replaceChange = exports2.insertChange = exports2.resolveModuleByImport = void 0;
|
|
@@ -375641,9 +375641,9 @@ ${opts.methodHeader} {}
|
|
|
375641
375641
|
}
|
|
375642
375642
|
});
|
|
375643
375643
|
|
|
375644
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375644
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/watch-for-single-file-changes.js
|
|
375645
375645
|
var require_watch_for_single_file_changes = __commonJS({
|
|
375646
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
375646
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/watch-for-single-file-changes.js"(exports2) {
|
|
375647
375647
|
"use strict";
|
|
375648
375648
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
375649
375649
|
exports2.watchForSingleFileChanges = void 0;
|
|
@@ -377866,9 +377866,9 @@ var require_lib4 = __commonJS({
|
|
|
377866
377866
|
}
|
|
377867
377867
|
});
|
|
377868
377868
|
|
|
377869
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
377869
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/get-main-file-dir.js
|
|
377870
377870
|
var require_get_main_file_dir = __commonJS({
|
|
377871
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
377871
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/get-main-file-dir.js"(exports2) {
|
|
377872
377872
|
"use strict";
|
|
377873
377873
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
377874
377874
|
exports2.getRelativeDirectoryToProjectRoot = void 0;
|
|
@@ -377883,9 +377883,9 @@ var require_get_main_file_dir = __commonJS({
|
|
|
377883
377883
|
}
|
|
377884
377884
|
});
|
|
377885
377885
|
|
|
377886
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
377886
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/package-json/update-package-json.js
|
|
377887
377887
|
var require_update_package_json = __commonJS({
|
|
377888
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
377888
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/package-json/update-package-json.js"(exports2) {
|
|
377889
377889
|
"use strict";
|
|
377890
377890
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
377891
377891
|
exports2.getUpdatedPackageJsonContent = exports2.getExports = exports2.updatePackageJson = void 0;
|
|
@@ -378043,9 +378043,9 @@ var require_update_package_json = __commonJS({
|
|
|
378043
378043
|
}
|
|
378044
378044
|
});
|
|
378045
378045
|
|
|
378046
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
378046
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/buildable-libs-utils.js
|
|
378047
378047
|
var require_buildable_libs_utils = __commonJS({
|
|
378048
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
378048
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/buildable-libs-utils.js"(exports2) {
|
|
378049
378049
|
"use strict";
|
|
378050
378050
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
378051
378051
|
exports2.updateBuildableProjectPackageJsonDependencies = exports2.updatePaths = exports2.findMissingBuildDependencies = exports2.checkDependentProjectsHaveBeenBuilt = exports2.createTmpTsConfig = exports2.computeCompilerOptionsPaths = exports2.calculateDependenciesFromTaskGraph = exports2.calculateProjectDependencies = exports2.calculateProjectBuildableDependencies = void 0;
|
|
@@ -378369,9 +378369,9 @@ var require_buildable_libs_utils = __commonJS({
|
|
|
378369
378369
|
}
|
|
378370
378370
|
});
|
|
378371
378371
|
|
|
378372
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
378372
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/check-dependencies.js
|
|
378373
378373
|
var require_check_dependencies = __commonJS({
|
|
378374
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
378374
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/check-dependencies.js"(exports2) {
|
|
378375
378375
|
"use strict";
|
|
378376
378376
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
378377
378377
|
exports2.checkDependencies = void 0;
|
|
@@ -378398,9 +378398,9 @@ var require_check_dependencies = __commonJS({
|
|
|
378398
378398
|
}
|
|
378399
378399
|
});
|
|
378400
378400
|
|
|
378401
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
378401
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/package-json/index.js
|
|
378402
378402
|
var require_package_json2 = __commonJS({
|
|
378403
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
378403
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/package-json/index.js"(exports2) {
|
|
378404
378404
|
"use strict";
|
|
378405
378405
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
378406
378406
|
exports2.copyPackageJson = void 0;
|
|
@@ -382525,9 +382525,9 @@ var require_out8 = __commonJS({
|
|
|
382525
382525
|
}
|
|
382526
382526
|
});
|
|
382527
382527
|
|
|
382528
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
382528
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/assets/copy-assets-handler.js
|
|
382529
382529
|
var require_copy_assets_handler = __commonJS({
|
|
382530
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
382530
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/assets/copy-assets-handler.js"(exports2) {
|
|
382531
382531
|
"use strict";
|
|
382532
382532
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
382533
382533
|
exports2.CopyAssetsHandler = exports2.defaultFileEventHandler = void 0;
|
|
@@ -382674,9 +382674,9 @@ var require_copy_assets_handler = __commonJS({
|
|
|
382674
382674
|
}
|
|
382675
382675
|
});
|
|
382676
382676
|
|
|
382677
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
382677
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/assets/index.js
|
|
382678
382678
|
var require_assets = __commonJS({
|
|
382679
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
382679
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/assets/index.js"(exports2) {
|
|
382680
382680
|
"use strict";
|
|
382681
382681
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
382682
382682
|
exports2.copyAssets = void 0;
|
|
@@ -382706,9 +382706,9 @@ var require_assets = __commonJS({
|
|
|
382706
382706
|
}
|
|
382707
382707
|
});
|
|
382708
382708
|
|
|
382709
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
382709
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/package-json/create-entry-points.js
|
|
382710
382710
|
var require_create_entry_points = __commonJS({
|
|
382711
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
382711
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/package-json/create-entry-points.js"(exports2) {
|
|
382712
382712
|
"use strict";
|
|
382713
382713
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
382714
382714
|
exports2.createEntryPoints = void 0;
|
|
@@ -387583,9 +387583,9 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
387583
387583
|
}
|
|
387584
387584
|
});
|
|
387585
387585
|
|
|
387586
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
387586
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/minimal-publish-script.js
|
|
387587
387587
|
var require_minimal_publish_script = __commonJS({
|
|
387588
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
387588
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/minimal-publish-script.js"(exports2) {
|
|
387589
387589
|
"use strict";
|
|
387590
387590
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
387591
387591
|
exports2.addMinimalPublishScript = void 0;
|
|
@@ -387663,9 +387663,9 @@ execSync(\`npm publish --access public --tag \${tag}\`);
|
|
|
387663
387663
|
}
|
|
387664
387664
|
});
|
|
387665
387665
|
|
|
387666
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
387666
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/swc/add-swc-config.js
|
|
387667
387667
|
var require_add_swc_config = __commonJS({
|
|
387668
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
387668
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/swc/add-swc-config.js"(exports2) {
|
|
387669
387669
|
"use strict";
|
|
387670
387670
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
387671
387671
|
exports2.addSwcConfig = exports2.defaultExclude = void 0;
|
|
@@ -387710,9 +387710,9 @@ var require_add_swc_config = __commonJS({
|
|
|
387710
387710
|
}
|
|
387711
387711
|
});
|
|
387712
387712
|
|
|
387713
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
387713
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/swc/add-swc-dependencies.js
|
|
387714
387714
|
var require_add_swc_dependencies = __commonJS({
|
|
387715
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
387715
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/swc/add-swc-dependencies.js"(exports2) {
|
|
387716
387716
|
"use strict";
|
|
387717
387717
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
387718
387718
|
exports2.addSwcRegisterDependencies = exports2.addSwcDependencies = void 0;
|
|
@@ -387758,9 +387758,9 @@ var require_semver4 = __commonJS({
|
|
|
387758
387758
|
}
|
|
387759
387759
|
});
|
|
387760
387760
|
|
|
387761
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
387761
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/generators/init/init.js
|
|
387762
387762
|
var require_init = __commonJS({
|
|
387763
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
387763
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/generators/init/init.js"(exports2) {
|
|
387764
387764
|
"use strict";
|
|
387765
387765
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
387766
387766
|
exports2.initGenerator = void 0;
|
|
@@ -387867,9 +387867,9 @@ var require_init = __commonJS({
|
|
|
387867
387867
|
}
|
|
387868
387868
|
});
|
|
387869
387869
|
|
|
387870
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
387870
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/generators/setup-verdaccio/generator.js
|
|
387871
387871
|
var require_generator = __commonJS({
|
|
387872
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
387872
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/generators/setup-verdaccio/generator.js"(exports2) {
|
|
387873
387873
|
"use strict";
|
|
387874
387874
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
387875
387875
|
exports2.setupVerdaccio = void 0;
|
|
@@ -387968,9 +387968,9 @@ var require_add_build_target_defaults = __commonJS({
|
|
|
387968
387968
|
}
|
|
387969
387969
|
});
|
|
387970
387970
|
|
|
387971
|
-
// node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.
|
|
387971
|
+
// node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.1_47lwvlodqoflmqpbzda7delm3e/node_modules/@nx/eslint/src/utils/flat-config.js
|
|
387972
387972
|
var require_flat_config = __commonJS({
|
|
387973
|
-
"node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.
|
|
387973
|
+
"node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.1_47lwvlodqoflmqpbzda7delm3e/node_modules/@nx/eslint/src/utils/flat-config.js"(exports2) {
|
|
387974
387974
|
"use strict";
|
|
387975
387975
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
387976
387976
|
exports2.useFlatConfig = void 0;
|
|
@@ -387981,9 +387981,9 @@ var require_flat_config = __commonJS({
|
|
|
387981
387981
|
}
|
|
387982
387982
|
});
|
|
387983
387983
|
|
|
387984
|
-
// node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.
|
|
387984
|
+
// node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.1_47lwvlodqoflmqpbzda7delm3e/node_modules/@nx/eslint/src/generators/utils/flat-config/path-utils.js
|
|
387985
387985
|
var require_path_utils = __commonJS({
|
|
387986
|
-
"node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.
|
|
387986
|
+
"node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.1_47lwvlodqoflmqpbzda7delm3e/node_modules/@nx/eslint/src/generators/utils/flat-config/path-utils.js"(exports2) {
|
|
387987
387987
|
"use strict";
|
|
387988
387988
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
387989
387989
|
exports2.mapFilePath = exports2.updateFiles = void 0;
|
|
@@ -388013,9 +388013,9 @@ var require_path_utils = __commonJS({
|
|
|
388013
388013
|
}
|
|
388014
388014
|
});
|
|
388015
388015
|
|
|
388016
|
-
// node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.
|
|
388016
|
+
// node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.1_47lwvlodqoflmqpbzda7delm3e/node_modules/@nx/eslint/src/generators/utils/flat-config/ast-utils.js
|
|
388017
388017
|
var require_ast_utils2 = __commonJS({
|
|
388018
|
-
"node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.
|
|
388018
|
+
"node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.1_47lwvlodqoflmqpbzda7delm3e/node_modules/@nx/eslint/src/generators/utils/flat-config/ast-utils.js"(exports2) {
|
|
388019
388019
|
"use strict";
|
|
388020
388020
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
388021
388021
|
exports2.generateAst = exports2.mapFilePaths = exports2.generateFlatOverride = exports2.generateRequire = exports2.stringifyNodeList = exports2.generatePluginExtendsElement = exports2.generateSpreadElement = exports2.createNodeList = exports2.addCompatToFlatConfig = exports2.addPluginsToExportsBlock = exports2.removeCompatExtends = exports2.removePlugin = exports2.addBlockToFlatConfigExport = exports2.addImportToFlatConfig = exports2.replaceOverride = exports2.hasOverride = exports2.removeOverridesFromLintConfig = void 0;
|
|
@@ -388472,9 +388472,9 @@ const compat = new FlatCompat({
|
|
|
388472
388472
|
}
|
|
388473
388473
|
});
|
|
388474
388474
|
|
|
388475
|
-
// node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.
|
|
388475
|
+
// node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.1_47lwvlodqoflmqpbzda7delm3e/node_modules/@nx/eslint/src/utils/config-file.js
|
|
388476
388476
|
var require_config_file = __commonJS({
|
|
388477
|
-
"node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.
|
|
388477
|
+
"node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.1_47lwvlodqoflmqpbzda7delm3e/node_modules/@nx/eslint/src/utils/config-file.js"(exports2) {
|
|
388478
388478
|
"use strict";
|
|
388479
388479
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
388480
388480
|
exports2.isFlatConfig = exports2.findBaseEslintFile = exports2.baseEsLintFlatConfigFile = exports2.baseEsLintConfigFile = exports2.ESLINT_CONFIG_FILENAMES = void 0;
|
|
@@ -388513,9 +388513,9 @@ var require_config_file = __commonJS({
|
|
|
388513
388513
|
}
|
|
388514
388514
|
});
|
|
388515
388515
|
|
|
388516
|
-
// node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.
|
|
388516
|
+
// node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.1_47lwvlodqoflmqpbzda7delm3e/node_modules/@nx/eslint/src/generators/utils/eslint-file.js
|
|
388517
388517
|
var require_eslint_file = __commonJS({
|
|
388518
|
-
"node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.
|
|
388518
|
+
"node_modules/.pnpm/@nx+eslint@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.1_47lwvlodqoflmqpbzda7delm3e/node_modules/@nx/eslint/src/generators/utils/eslint-file.js"(exports2) {
|
|
388519
388519
|
"use strict";
|
|
388520
388520
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
388521
388521
|
exports2.getPluginImport = exports2.addIgnoresToLintConfig = exports2.addPluginsToLintConfig = exports2.addExtendsToLintConfig = exports2.replaceOverridesInLintConfig = exports2.lintConfigHasOverride = exports2.updateOverrideInLintConfig = exports2.addOverrideToLintConfig = exports2.updateRelativePathsInConfig = exports2.isEslintConfigSupported = exports2.findEslintFile = void 0;
|
|
@@ -388780,9 +388780,9 @@ var require_eslint_file = __commonJS({
|
|
|
388780
388780
|
}
|
|
388781
388781
|
});
|
|
388782
388782
|
|
|
388783
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
388783
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/generators/library/library.js
|
|
388784
388784
|
var require_library = __commonJS({
|
|
388785
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
388785
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/generators/library/library.js"(exports2) {
|
|
388786
388786
|
"use strict";
|
|
388787
388787
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
388788
388788
|
exports2.addLint = exports2.libraryGeneratorInternal = exports2.libraryGenerator = void 0;
|
|
@@ -389337,9 +389337,9 @@ var require_library = __commonJS({
|
|
|
389337
389337
|
}
|
|
389338
389338
|
});
|
|
389339
389339
|
|
|
389340
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
389340
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/index.js
|
|
389341
389341
|
var require_src5 = __commonJS({
|
|
389342
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
389342
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/index.js"(exports2) {
|
|
389343
389343
|
"use strict";
|
|
389344
389344
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
389345
389345
|
exports2.createPackageJson = exports2.getLockFileName = exports2.createLockFile = exports2.initGenerator = exports2.libraryGenerator = void 0;
|
|
@@ -399207,9 +399207,9 @@ var require_src6 = __commonJS({
|
|
|
399207
399207
|
}
|
|
399208
399208
|
});
|
|
399209
399209
|
|
|
399210
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
399210
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/executors/tsc/lib/get-custom-transformers-factory.js
|
|
399211
399211
|
var require_get_custom_transformers_factory = __commonJS({
|
|
399212
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
399212
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/executors/tsc/lib/get-custom-transformers-factory.js"(exports2) {
|
|
399213
399213
|
"use strict";
|
|
399214
399214
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
399215
399215
|
exports2.getCustomTrasformersFactory = void 0;
|
|
@@ -399226,9 +399226,9 @@ var require_get_custom_transformers_factory = __commonJS({
|
|
|
399226
399226
|
}
|
|
399227
399227
|
});
|
|
399228
399228
|
|
|
399229
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
399229
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/assets/assets.js
|
|
399230
399230
|
var require_assets2 = __commonJS({
|
|
399231
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
399231
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/utils/assets/assets.js"(exports2) {
|
|
399232
399232
|
"use strict";
|
|
399233
399233
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
399234
399234
|
exports2.assetGlobsToFiles = void 0;
|
|
@@ -399267,9 +399267,9 @@ var require_assets2 = __commonJS({
|
|
|
399267
399267
|
}
|
|
399268
399268
|
});
|
|
399269
399269
|
|
|
399270
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
399270
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/executors/tsc/lib/normalize-options.js
|
|
399271
399271
|
var require_normalize_options = __commonJS({
|
|
399272
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.
|
|
399272
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.3.106_@swc+wasm@1.4.2_@types+node@20.11.20_ofs2qcbkp26ipfo6i6vsjilnfm/node_modules/@nx/js/src/executors/tsc/lib/normalize-options.js"(exports2) {
|
|
399273
399273
|
"use strict";
|
|
399274
399274
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
399275
399275
|
exports2.normalizeOptions = void 0;
|
|
@@ -401692,2412 +401692,6 @@ var require_lib8 = __commonJS({
|
|
|
401692
401692
|
}
|
|
401693
401693
|
});
|
|
401694
401694
|
|
|
401695
|
-
// node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js
|
|
401696
|
-
var require_main2 = __commonJS({
|
|
401697
|
-
"node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js"(exports2, module2) {
|
|
401698
|
-
"use strict";
|
|
401699
|
-
var __defProp4 = Object.defineProperty;
|
|
401700
|
-
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
401701
|
-
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
401702
|
-
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
401703
|
-
var __export4 = (target, all) => {
|
|
401704
|
-
for (var name in all)
|
|
401705
|
-
__defProp4(target, name, { get: all[name], enumerable: true });
|
|
401706
|
-
};
|
|
401707
|
-
var __copyProps3 = (to3, from, except, desc) => {
|
|
401708
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
401709
|
-
for (let key2 of __getOwnPropNames3(from))
|
|
401710
|
-
if (!__hasOwnProp3.call(to3, key2) && key2 !== except)
|
|
401711
|
-
__defProp4(to3, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc3(from, key2)) || desc.enumerable });
|
|
401712
|
-
}
|
|
401713
|
-
return to3;
|
|
401714
|
-
};
|
|
401715
|
-
var __toCommonJS2 = (mod) => __copyProps3(__defProp4({}, "__esModule", { value: true }), mod);
|
|
401716
|
-
var node_exports = {};
|
|
401717
|
-
__export4(node_exports, {
|
|
401718
|
-
analyzeMetafile: () => analyzeMetafile,
|
|
401719
|
-
analyzeMetafileSync: () => analyzeMetafileSync,
|
|
401720
|
-
build: () => build2,
|
|
401721
|
-
buildSync: () => buildSync,
|
|
401722
|
-
context: () => context,
|
|
401723
|
-
default: () => node_default,
|
|
401724
|
-
formatMessages: () => formatMessages,
|
|
401725
|
-
formatMessagesSync: () => formatMessagesSync,
|
|
401726
|
-
initialize: () => initialize,
|
|
401727
|
-
stop: () => stop,
|
|
401728
|
-
transform: () => transform2,
|
|
401729
|
-
transformSync: () => transformSync,
|
|
401730
|
-
version: () => version
|
|
401731
|
-
});
|
|
401732
|
-
module2.exports = __toCommonJS2(node_exports);
|
|
401733
|
-
function encodePacket(packet) {
|
|
401734
|
-
let visit = (value) => {
|
|
401735
|
-
if (value === null) {
|
|
401736
|
-
bb.write8(0);
|
|
401737
|
-
} else if (typeof value === "boolean") {
|
|
401738
|
-
bb.write8(1);
|
|
401739
|
-
bb.write8(+value);
|
|
401740
|
-
} else if (typeof value === "number") {
|
|
401741
|
-
bb.write8(2);
|
|
401742
|
-
bb.write32(value | 0);
|
|
401743
|
-
} else if (typeof value === "string") {
|
|
401744
|
-
bb.write8(3);
|
|
401745
|
-
bb.write(encodeUTF8(value));
|
|
401746
|
-
} else if (value instanceof Uint8Array) {
|
|
401747
|
-
bb.write8(4);
|
|
401748
|
-
bb.write(value);
|
|
401749
|
-
} else if (value instanceof Array) {
|
|
401750
|
-
bb.write8(5);
|
|
401751
|
-
bb.write32(value.length);
|
|
401752
|
-
for (let item of value) {
|
|
401753
|
-
visit(item);
|
|
401754
|
-
}
|
|
401755
|
-
} else {
|
|
401756
|
-
let keys = Object.keys(value);
|
|
401757
|
-
bb.write8(6);
|
|
401758
|
-
bb.write32(keys.length);
|
|
401759
|
-
for (let key2 of keys) {
|
|
401760
|
-
bb.write(encodeUTF8(key2));
|
|
401761
|
-
visit(value[key2]);
|
|
401762
|
-
}
|
|
401763
|
-
}
|
|
401764
|
-
};
|
|
401765
|
-
let bb = new ByteBuffer();
|
|
401766
|
-
bb.write32(0);
|
|
401767
|
-
bb.write32(packet.id << 1 | +!packet.isRequest);
|
|
401768
|
-
visit(packet.value);
|
|
401769
|
-
writeUInt32LE(bb.buf, bb.len - 4, 0);
|
|
401770
|
-
return bb.buf.subarray(0, bb.len);
|
|
401771
|
-
}
|
|
401772
|
-
function decodePacket(bytes) {
|
|
401773
|
-
let visit = () => {
|
|
401774
|
-
switch (bb.read8()) {
|
|
401775
|
-
case 0:
|
|
401776
|
-
return null;
|
|
401777
|
-
case 1:
|
|
401778
|
-
return !!bb.read8();
|
|
401779
|
-
case 2:
|
|
401780
|
-
return bb.read32();
|
|
401781
|
-
case 3:
|
|
401782
|
-
return decodeUTF8(bb.read());
|
|
401783
|
-
case 4:
|
|
401784
|
-
return bb.read();
|
|
401785
|
-
case 5: {
|
|
401786
|
-
let count = bb.read32();
|
|
401787
|
-
let value2 = [];
|
|
401788
|
-
for (let i3 = 0; i3 < count; i3++) {
|
|
401789
|
-
value2.push(visit());
|
|
401790
|
-
}
|
|
401791
|
-
return value2;
|
|
401792
|
-
}
|
|
401793
|
-
case 6: {
|
|
401794
|
-
let count = bb.read32();
|
|
401795
|
-
let value2 = {};
|
|
401796
|
-
for (let i3 = 0; i3 < count; i3++) {
|
|
401797
|
-
value2[decodeUTF8(bb.read())] = visit();
|
|
401798
|
-
}
|
|
401799
|
-
return value2;
|
|
401800
|
-
}
|
|
401801
|
-
default:
|
|
401802
|
-
throw new Error("Invalid packet");
|
|
401803
|
-
}
|
|
401804
|
-
};
|
|
401805
|
-
let bb = new ByteBuffer(bytes);
|
|
401806
|
-
let id = bb.read32();
|
|
401807
|
-
let isRequest = (id & 1) === 0;
|
|
401808
|
-
id >>>= 1;
|
|
401809
|
-
let value = visit();
|
|
401810
|
-
if (bb.ptr !== bytes.length) {
|
|
401811
|
-
throw new Error("Invalid packet");
|
|
401812
|
-
}
|
|
401813
|
-
return { id, isRequest, value };
|
|
401814
|
-
}
|
|
401815
|
-
var ByteBuffer = class {
|
|
401816
|
-
constructor(buf = new Uint8Array(1024)) {
|
|
401817
|
-
this.buf = buf;
|
|
401818
|
-
this.len = 0;
|
|
401819
|
-
this.ptr = 0;
|
|
401820
|
-
}
|
|
401821
|
-
_write(delta) {
|
|
401822
|
-
if (this.len + delta > this.buf.length) {
|
|
401823
|
-
let clone = new Uint8Array((this.len + delta) * 2);
|
|
401824
|
-
clone.set(this.buf);
|
|
401825
|
-
this.buf = clone;
|
|
401826
|
-
}
|
|
401827
|
-
this.len += delta;
|
|
401828
|
-
return this.len - delta;
|
|
401829
|
-
}
|
|
401830
|
-
write8(value) {
|
|
401831
|
-
let offset = this._write(1);
|
|
401832
|
-
this.buf[offset] = value;
|
|
401833
|
-
}
|
|
401834
|
-
write32(value) {
|
|
401835
|
-
let offset = this._write(4);
|
|
401836
|
-
writeUInt32LE(this.buf, value, offset);
|
|
401837
|
-
}
|
|
401838
|
-
write(bytes) {
|
|
401839
|
-
let offset = this._write(4 + bytes.length);
|
|
401840
|
-
writeUInt32LE(this.buf, bytes.length, offset);
|
|
401841
|
-
this.buf.set(bytes, offset + 4);
|
|
401842
|
-
}
|
|
401843
|
-
_read(delta) {
|
|
401844
|
-
if (this.ptr + delta > this.buf.length) {
|
|
401845
|
-
throw new Error("Invalid packet");
|
|
401846
|
-
}
|
|
401847
|
-
this.ptr += delta;
|
|
401848
|
-
return this.ptr - delta;
|
|
401849
|
-
}
|
|
401850
|
-
read8() {
|
|
401851
|
-
return this.buf[this._read(1)];
|
|
401852
|
-
}
|
|
401853
|
-
read32() {
|
|
401854
|
-
return readUInt32LE(this.buf, this._read(4));
|
|
401855
|
-
}
|
|
401856
|
-
read() {
|
|
401857
|
-
let length = this.read32();
|
|
401858
|
-
let bytes = new Uint8Array(length);
|
|
401859
|
-
let ptr = this._read(bytes.length);
|
|
401860
|
-
bytes.set(this.buf.subarray(ptr, ptr + length));
|
|
401861
|
-
return bytes;
|
|
401862
|
-
}
|
|
401863
|
-
};
|
|
401864
|
-
var encodeUTF8;
|
|
401865
|
-
var decodeUTF8;
|
|
401866
|
-
var encodeInvariant;
|
|
401867
|
-
if (typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined") {
|
|
401868
|
-
let encoder = new TextEncoder();
|
|
401869
|
-
let decoder = new TextDecoder();
|
|
401870
|
-
encodeUTF8 = (text) => encoder.encode(text);
|
|
401871
|
-
decodeUTF8 = (bytes) => decoder.decode(bytes);
|
|
401872
|
-
encodeInvariant = 'new TextEncoder().encode("")';
|
|
401873
|
-
} else if (typeof Buffer !== "undefined") {
|
|
401874
|
-
encodeUTF8 = (text) => Buffer.from(text);
|
|
401875
|
-
decodeUTF8 = (bytes) => {
|
|
401876
|
-
let { buffer: buffer2, byteOffset, byteLength } = bytes;
|
|
401877
|
-
return Buffer.from(buffer2, byteOffset, byteLength).toString();
|
|
401878
|
-
};
|
|
401879
|
-
encodeInvariant = 'Buffer.from("")';
|
|
401880
|
-
} else {
|
|
401881
|
-
throw new Error("No UTF-8 codec found");
|
|
401882
|
-
}
|
|
401883
|
-
if (!(encodeUTF8("") instanceof Uint8Array))
|
|
401884
|
-
throw new Error(`Invariant violation: "${encodeInvariant} instanceof Uint8Array" is incorrectly false
|
|
401885
|
-
|
|
401886
|
-
This indicates that your JavaScript environment is broken. You cannot use
|
|
401887
|
-
esbuild in this environment because esbuild relies on this invariant. This
|
|
401888
|
-
is not a problem with esbuild. You need to fix your environment instead.
|
|
401889
|
-
`);
|
|
401890
|
-
function readUInt32LE(buffer2, offset) {
|
|
401891
|
-
return buffer2[offset++] | buffer2[offset++] << 8 | buffer2[offset++] << 16 | buffer2[offset++] << 24;
|
|
401892
|
-
}
|
|
401893
|
-
function writeUInt32LE(buffer2, value, offset) {
|
|
401894
|
-
buffer2[offset++] = value;
|
|
401895
|
-
buffer2[offset++] = value >> 8;
|
|
401896
|
-
buffer2[offset++] = value >> 16;
|
|
401897
|
-
buffer2[offset++] = value >> 24;
|
|
401898
|
-
}
|
|
401899
|
-
var quote2 = JSON.stringify;
|
|
401900
|
-
var buildLogLevelDefault = "warning";
|
|
401901
|
-
var transformLogLevelDefault = "silent";
|
|
401902
|
-
function validateTarget(target) {
|
|
401903
|
-
validateStringValue(target, "target");
|
|
401904
|
-
if (target.indexOf(",") >= 0)
|
|
401905
|
-
throw new Error(`Invalid target: ${target}`);
|
|
401906
|
-
return target;
|
|
401907
|
-
}
|
|
401908
|
-
var canBeAnything = () => null;
|
|
401909
|
-
var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean";
|
|
401910
|
-
var mustBeString = (value) => typeof value === "string" ? null : "a string";
|
|
401911
|
-
var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object";
|
|
401912
|
-
var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer";
|
|
401913
|
-
var mustBeFunction = (value) => typeof value === "function" ? null : "a function";
|
|
401914
|
-
var mustBeArray = (value) => Array.isArray(value) ? null : "an array";
|
|
401915
|
-
var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object";
|
|
401916
|
-
var mustBeEntryPoints = (value) => typeof value === "object" && value !== null ? null : "an array or an object";
|
|
401917
|
-
var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module";
|
|
401918
|
-
var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null";
|
|
401919
|
-
var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean";
|
|
401920
|
-
var mustBeStringOrObject = (value) => typeof value === "string" || typeof value === "object" && value !== null && !Array.isArray(value) ? null : "a string or an object";
|
|
401921
|
-
var mustBeStringOrArray = (value) => typeof value === "string" || Array.isArray(value) ? null : "a string or an array";
|
|
401922
|
-
var mustBeStringOrUint8Array = (value) => typeof value === "string" || value instanceof Uint8Array ? null : "a string or a Uint8Array";
|
|
401923
|
-
var mustBeStringOrURL = (value) => typeof value === "string" || value instanceof URL ? null : "a string or a URL";
|
|
401924
|
-
function getFlag(object, keys, key2, mustBeFn) {
|
|
401925
|
-
let value = object[key2];
|
|
401926
|
-
keys[key2 + ""] = true;
|
|
401927
|
-
if (value === void 0)
|
|
401928
|
-
return void 0;
|
|
401929
|
-
let mustBe = mustBeFn(value);
|
|
401930
|
-
if (mustBe !== null)
|
|
401931
|
-
throw new Error(`${quote2(key2)} must be ${mustBe}`);
|
|
401932
|
-
return value;
|
|
401933
|
-
}
|
|
401934
|
-
function checkForInvalidFlags(object, keys, where) {
|
|
401935
|
-
for (let key2 in object) {
|
|
401936
|
-
if (!(key2 in keys)) {
|
|
401937
|
-
throw new Error(`Invalid option ${where}: ${quote2(key2)}`);
|
|
401938
|
-
}
|
|
401939
|
-
}
|
|
401940
|
-
}
|
|
401941
|
-
function validateInitializeOptions(options8) {
|
|
401942
|
-
let keys = /* @__PURE__ */ Object.create(null);
|
|
401943
|
-
let wasmURL = getFlag(options8, keys, "wasmURL", mustBeStringOrURL);
|
|
401944
|
-
let wasmModule = getFlag(options8, keys, "wasmModule", mustBeWebAssemblyModule);
|
|
401945
|
-
let worker = getFlag(options8, keys, "worker", mustBeBoolean);
|
|
401946
|
-
checkForInvalidFlags(options8, keys, "in initialize() call");
|
|
401947
|
-
return {
|
|
401948
|
-
wasmURL,
|
|
401949
|
-
wasmModule,
|
|
401950
|
-
worker
|
|
401951
|
-
};
|
|
401952
|
-
}
|
|
401953
|
-
function validateMangleCache(mangleCache) {
|
|
401954
|
-
let validated;
|
|
401955
|
-
if (mangleCache !== void 0) {
|
|
401956
|
-
validated = /* @__PURE__ */ Object.create(null);
|
|
401957
|
-
for (let key2 in mangleCache) {
|
|
401958
|
-
let value = mangleCache[key2];
|
|
401959
|
-
if (typeof value === "string" || value === false) {
|
|
401960
|
-
validated[key2] = value;
|
|
401961
|
-
} else {
|
|
401962
|
-
throw new Error(`Expected ${quote2(key2)} in mangle cache to map to either a string or false`);
|
|
401963
|
-
}
|
|
401964
|
-
}
|
|
401965
|
-
}
|
|
401966
|
-
return validated;
|
|
401967
|
-
}
|
|
401968
|
-
function pushLogFlags(flags, options8, keys, isTTY2, logLevelDefault) {
|
|
401969
|
-
let color = getFlag(options8, keys, "color", mustBeBoolean);
|
|
401970
|
-
let logLevel = getFlag(options8, keys, "logLevel", mustBeString);
|
|
401971
|
-
let logLimit = getFlag(options8, keys, "logLimit", mustBeInteger);
|
|
401972
|
-
if (color !== void 0)
|
|
401973
|
-
flags.push(`--color=${color}`);
|
|
401974
|
-
else if (isTTY2)
|
|
401975
|
-
flags.push(`--color=true`);
|
|
401976
|
-
flags.push(`--log-level=${logLevel || logLevelDefault}`);
|
|
401977
|
-
flags.push(`--log-limit=${logLimit || 0}`);
|
|
401978
|
-
}
|
|
401979
|
-
function validateStringValue(value, what, key2) {
|
|
401980
|
-
if (typeof value !== "string") {
|
|
401981
|
-
throw new Error(`Expected value for ${what}${key2 !== void 0 ? " " + quote2(key2) : ""} to be a string, got ${typeof value} instead`);
|
|
401982
|
-
}
|
|
401983
|
-
return value;
|
|
401984
|
-
}
|
|
401985
|
-
function pushCommonFlags(flags, options8, keys) {
|
|
401986
|
-
let legalComments = getFlag(options8, keys, "legalComments", mustBeString);
|
|
401987
|
-
let sourceRoot = getFlag(options8, keys, "sourceRoot", mustBeString);
|
|
401988
|
-
let sourcesContent = getFlag(options8, keys, "sourcesContent", mustBeBoolean);
|
|
401989
|
-
let target = getFlag(options8, keys, "target", mustBeStringOrArray);
|
|
401990
|
-
let format3 = getFlag(options8, keys, "format", mustBeString);
|
|
401991
|
-
let globalName = getFlag(options8, keys, "globalName", mustBeString);
|
|
401992
|
-
let mangleProps = getFlag(options8, keys, "mangleProps", mustBeRegExp);
|
|
401993
|
-
let reserveProps = getFlag(options8, keys, "reserveProps", mustBeRegExp);
|
|
401994
|
-
let mangleQuoted = getFlag(options8, keys, "mangleQuoted", mustBeBoolean);
|
|
401995
|
-
let minify = getFlag(options8, keys, "minify", mustBeBoolean);
|
|
401996
|
-
let minifySyntax = getFlag(options8, keys, "minifySyntax", mustBeBoolean);
|
|
401997
|
-
let minifyWhitespace = getFlag(options8, keys, "minifyWhitespace", mustBeBoolean);
|
|
401998
|
-
let minifyIdentifiers = getFlag(options8, keys, "minifyIdentifiers", mustBeBoolean);
|
|
401999
|
-
let lineLimit = getFlag(options8, keys, "lineLimit", mustBeInteger);
|
|
402000
|
-
let drop = getFlag(options8, keys, "drop", mustBeArray);
|
|
402001
|
-
let dropLabels = getFlag(options8, keys, "dropLabels", mustBeArray);
|
|
402002
|
-
let charset = getFlag(options8, keys, "charset", mustBeString);
|
|
402003
|
-
let treeShaking = getFlag(options8, keys, "treeShaking", mustBeBoolean);
|
|
402004
|
-
let ignoreAnnotations = getFlag(options8, keys, "ignoreAnnotations", mustBeBoolean);
|
|
402005
|
-
let jsx = getFlag(options8, keys, "jsx", mustBeString);
|
|
402006
|
-
let jsxFactory = getFlag(options8, keys, "jsxFactory", mustBeString);
|
|
402007
|
-
let jsxFragment = getFlag(options8, keys, "jsxFragment", mustBeString);
|
|
402008
|
-
let jsxImportSource = getFlag(options8, keys, "jsxImportSource", mustBeString);
|
|
402009
|
-
let jsxDev = getFlag(options8, keys, "jsxDev", mustBeBoolean);
|
|
402010
|
-
let jsxSideEffects = getFlag(options8, keys, "jsxSideEffects", mustBeBoolean);
|
|
402011
|
-
let define2 = getFlag(options8, keys, "define", mustBeObject);
|
|
402012
|
-
let logOverride = getFlag(options8, keys, "logOverride", mustBeObject);
|
|
402013
|
-
let supported = getFlag(options8, keys, "supported", mustBeObject);
|
|
402014
|
-
let pure = getFlag(options8, keys, "pure", mustBeArray);
|
|
402015
|
-
let keepNames = getFlag(options8, keys, "keepNames", mustBeBoolean);
|
|
402016
|
-
let platform = getFlag(options8, keys, "platform", mustBeString);
|
|
402017
|
-
let tsconfigRaw = getFlag(options8, keys, "tsconfigRaw", mustBeStringOrObject);
|
|
402018
|
-
if (legalComments)
|
|
402019
|
-
flags.push(`--legal-comments=${legalComments}`);
|
|
402020
|
-
if (sourceRoot !== void 0)
|
|
402021
|
-
flags.push(`--source-root=${sourceRoot}`);
|
|
402022
|
-
if (sourcesContent !== void 0)
|
|
402023
|
-
flags.push(`--sources-content=${sourcesContent}`);
|
|
402024
|
-
if (target) {
|
|
402025
|
-
if (Array.isArray(target))
|
|
402026
|
-
flags.push(`--target=${Array.from(target).map(validateTarget).join(",")}`);
|
|
402027
|
-
else
|
|
402028
|
-
flags.push(`--target=${validateTarget(target)}`);
|
|
402029
|
-
}
|
|
402030
|
-
if (format3)
|
|
402031
|
-
flags.push(`--format=${format3}`);
|
|
402032
|
-
if (globalName)
|
|
402033
|
-
flags.push(`--global-name=${globalName}`);
|
|
402034
|
-
if (platform)
|
|
402035
|
-
flags.push(`--platform=${platform}`);
|
|
402036
|
-
if (tsconfigRaw)
|
|
402037
|
-
flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`);
|
|
402038
|
-
if (minify)
|
|
402039
|
-
flags.push("--minify");
|
|
402040
|
-
if (minifySyntax)
|
|
402041
|
-
flags.push("--minify-syntax");
|
|
402042
|
-
if (minifyWhitespace)
|
|
402043
|
-
flags.push("--minify-whitespace");
|
|
402044
|
-
if (minifyIdentifiers)
|
|
402045
|
-
flags.push("--minify-identifiers");
|
|
402046
|
-
if (lineLimit)
|
|
402047
|
-
flags.push(`--line-limit=${lineLimit}`);
|
|
402048
|
-
if (charset)
|
|
402049
|
-
flags.push(`--charset=${charset}`);
|
|
402050
|
-
if (treeShaking !== void 0)
|
|
402051
|
-
flags.push(`--tree-shaking=${treeShaking}`);
|
|
402052
|
-
if (ignoreAnnotations)
|
|
402053
|
-
flags.push(`--ignore-annotations`);
|
|
402054
|
-
if (drop)
|
|
402055
|
-
for (let what of drop)
|
|
402056
|
-
flags.push(`--drop:${validateStringValue(what, "drop")}`);
|
|
402057
|
-
if (dropLabels)
|
|
402058
|
-
flags.push(`--drop-labels=${Array.from(dropLabels).map((what) => validateStringValue(what, "dropLabels")).join(",")}`);
|
|
402059
|
-
if (mangleProps)
|
|
402060
|
-
flags.push(`--mangle-props=${mangleProps.source}`);
|
|
402061
|
-
if (reserveProps)
|
|
402062
|
-
flags.push(`--reserve-props=${reserveProps.source}`);
|
|
402063
|
-
if (mangleQuoted !== void 0)
|
|
402064
|
-
flags.push(`--mangle-quoted=${mangleQuoted}`);
|
|
402065
|
-
if (jsx)
|
|
402066
|
-
flags.push(`--jsx=${jsx}`);
|
|
402067
|
-
if (jsxFactory)
|
|
402068
|
-
flags.push(`--jsx-factory=${jsxFactory}`);
|
|
402069
|
-
if (jsxFragment)
|
|
402070
|
-
flags.push(`--jsx-fragment=${jsxFragment}`);
|
|
402071
|
-
if (jsxImportSource)
|
|
402072
|
-
flags.push(`--jsx-import-source=${jsxImportSource}`);
|
|
402073
|
-
if (jsxDev)
|
|
402074
|
-
flags.push(`--jsx-dev`);
|
|
402075
|
-
if (jsxSideEffects)
|
|
402076
|
-
flags.push(`--jsx-side-effects`);
|
|
402077
|
-
if (define2) {
|
|
402078
|
-
for (let key2 in define2) {
|
|
402079
|
-
if (key2.indexOf("=") >= 0)
|
|
402080
|
-
throw new Error(`Invalid define: ${key2}`);
|
|
402081
|
-
flags.push(`--define:${key2}=${validateStringValue(define2[key2], "define", key2)}`);
|
|
402082
|
-
}
|
|
402083
|
-
}
|
|
402084
|
-
if (logOverride) {
|
|
402085
|
-
for (let key2 in logOverride) {
|
|
402086
|
-
if (key2.indexOf("=") >= 0)
|
|
402087
|
-
throw new Error(`Invalid log override: ${key2}`);
|
|
402088
|
-
flags.push(`--log-override:${key2}=${validateStringValue(logOverride[key2], "log override", key2)}`);
|
|
402089
|
-
}
|
|
402090
|
-
}
|
|
402091
|
-
if (supported) {
|
|
402092
|
-
for (let key2 in supported) {
|
|
402093
|
-
if (key2.indexOf("=") >= 0)
|
|
402094
|
-
throw new Error(`Invalid supported: ${key2}`);
|
|
402095
|
-
const value = supported[key2];
|
|
402096
|
-
if (typeof value !== "boolean")
|
|
402097
|
-
throw new Error(`Expected value for supported ${quote2(key2)} to be a boolean, got ${typeof value} instead`);
|
|
402098
|
-
flags.push(`--supported:${key2}=${value}`);
|
|
402099
|
-
}
|
|
402100
|
-
}
|
|
402101
|
-
if (pure)
|
|
402102
|
-
for (let fn6 of pure)
|
|
402103
|
-
flags.push(`--pure:${validateStringValue(fn6, "pure")}`);
|
|
402104
|
-
if (keepNames)
|
|
402105
|
-
flags.push(`--keep-names`);
|
|
402106
|
-
}
|
|
402107
|
-
function flagsForBuildOptions(callName, options8, isTTY2, logLevelDefault, writeDefault) {
|
|
402108
|
-
var _a22;
|
|
402109
|
-
let flags = [];
|
|
402110
|
-
let entries = [];
|
|
402111
|
-
let keys = /* @__PURE__ */ Object.create(null);
|
|
402112
|
-
let stdinContents = null;
|
|
402113
|
-
let stdinResolveDir = null;
|
|
402114
|
-
pushLogFlags(flags, options8, keys, isTTY2, logLevelDefault);
|
|
402115
|
-
pushCommonFlags(flags, options8, keys);
|
|
402116
|
-
let sourcemap = getFlag(options8, keys, "sourcemap", mustBeStringOrBoolean);
|
|
402117
|
-
let bundle = getFlag(options8, keys, "bundle", mustBeBoolean);
|
|
402118
|
-
let splitting = getFlag(options8, keys, "splitting", mustBeBoolean);
|
|
402119
|
-
let preserveSymlinks = getFlag(options8, keys, "preserveSymlinks", mustBeBoolean);
|
|
402120
|
-
let metafile = getFlag(options8, keys, "metafile", mustBeBoolean);
|
|
402121
|
-
let outfile = getFlag(options8, keys, "outfile", mustBeString);
|
|
402122
|
-
let outdir = getFlag(options8, keys, "outdir", mustBeString);
|
|
402123
|
-
let outbase = getFlag(options8, keys, "outbase", mustBeString);
|
|
402124
|
-
let tsconfig = getFlag(options8, keys, "tsconfig", mustBeString);
|
|
402125
|
-
let resolveExtensions = getFlag(options8, keys, "resolveExtensions", mustBeArray);
|
|
402126
|
-
let nodePathsInput = getFlag(options8, keys, "nodePaths", mustBeArray);
|
|
402127
|
-
let mainFields = getFlag(options8, keys, "mainFields", mustBeArray);
|
|
402128
|
-
let conditions = getFlag(options8, keys, "conditions", mustBeArray);
|
|
402129
|
-
let external = getFlag(options8, keys, "external", mustBeArray);
|
|
402130
|
-
let packages = getFlag(options8, keys, "packages", mustBeString);
|
|
402131
|
-
let alias = getFlag(options8, keys, "alias", mustBeObject);
|
|
402132
|
-
let loader2 = getFlag(options8, keys, "loader", mustBeObject);
|
|
402133
|
-
let outExtension2 = getFlag(options8, keys, "outExtension", mustBeObject);
|
|
402134
|
-
let publicPath = getFlag(options8, keys, "publicPath", mustBeString);
|
|
402135
|
-
let entryNames = getFlag(options8, keys, "entryNames", mustBeString);
|
|
402136
|
-
let chunkNames = getFlag(options8, keys, "chunkNames", mustBeString);
|
|
402137
|
-
let assetNames = getFlag(options8, keys, "assetNames", mustBeString);
|
|
402138
|
-
let inject = getFlag(options8, keys, "inject", mustBeArray);
|
|
402139
|
-
let banner = getFlag(options8, keys, "banner", mustBeObject);
|
|
402140
|
-
let footer = getFlag(options8, keys, "footer", mustBeObject);
|
|
402141
|
-
let entryPoints = getFlag(options8, keys, "entryPoints", mustBeEntryPoints);
|
|
402142
|
-
let absWorkingDir = getFlag(options8, keys, "absWorkingDir", mustBeString);
|
|
402143
|
-
let stdin2 = getFlag(options8, keys, "stdin", mustBeObject);
|
|
402144
|
-
let write = (_a22 = getFlag(options8, keys, "write", mustBeBoolean)) != null ? _a22 : writeDefault;
|
|
402145
|
-
let allowOverwrite = getFlag(options8, keys, "allowOverwrite", mustBeBoolean);
|
|
402146
|
-
let mangleCache = getFlag(options8, keys, "mangleCache", mustBeObject);
|
|
402147
|
-
keys.plugins = true;
|
|
402148
|
-
checkForInvalidFlags(options8, keys, `in ${callName}() call`);
|
|
402149
|
-
if (sourcemap)
|
|
402150
|
-
flags.push(`--sourcemap${sourcemap === true ? "" : `=${sourcemap}`}`);
|
|
402151
|
-
if (bundle)
|
|
402152
|
-
flags.push("--bundle");
|
|
402153
|
-
if (allowOverwrite)
|
|
402154
|
-
flags.push("--allow-overwrite");
|
|
402155
|
-
if (splitting)
|
|
402156
|
-
flags.push("--splitting");
|
|
402157
|
-
if (preserveSymlinks)
|
|
402158
|
-
flags.push("--preserve-symlinks");
|
|
402159
|
-
if (metafile)
|
|
402160
|
-
flags.push(`--metafile`);
|
|
402161
|
-
if (outfile)
|
|
402162
|
-
flags.push(`--outfile=${outfile}`);
|
|
402163
|
-
if (outdir)
|
|
402164
|
-
flags.push(`--outdir=${outdir}`);
|
|
402165
|
-
if (outbase)
|
|
402166
|
-
flags.push(`--outbase=${outbase}`);
|
|
402167
|
-
if (tsconfig)
|
|
402168
|
-
flags.push(`--tsconfig=${tsconfig}`);
|
|
402169
|
-
if (packages)
|
|
402170
|
-
flags.push(`--packages=${packages}`);
|
|
402171
|
-
if (resolveExtensions) {
|
|
402172
|
-
let values = [];
|
|
402173
|
-
for (let value of resolveExtensions) {
|
|
402174
|
-
validateStringValue(value, "resolve extension");
|
|
402175
|
-
if (value.indexOf(",") >= 0)
|
|
402176
|
-
throw new Error(`Invalid resolve extension: ${value}`);
|
|
402177
|
-
values.push(value);
|
|
402178
|
-
}
|
|
402179
|
-
flags.push(`--resolve-extensions=${values.join(",")}`);
|
|
402180
|
-
}
|
|
402181
|
-
if (publicPath)
|
|
402182
|
-
flags.push(`--public-path=${publicPath}`);
|
|
402183
|
-
if (entryNames)
|
|
402184
|
-
flags.push(`--entry-names=${entryNames}`);
|
|
402185
|
-
if (chunkNames)
|
|
402186
|
-
flags.push(`--chunk-names=${chunkNames}`);
|
|
402187
|
-
if (assetNames)
|
|
402188
|
-
flags.push(`--asset-names=${assetNames}`);
|
|
402189
|
-
if (mainFields) {
|
|
402190
|
-
let values = [];
|
|
402191
|
-
for (let value of mainFields) {
|
|
402192
|
-
validateStringValue(value, "main field");
|
|
402193
|
-
if (value.indexOf(",") >= 0)
|
|
402194
|
-
throw new Error(`Invalid main field: ${value}`);
|
|
402195
|
-
values.push(value);
|
|
402196
|
-
}
|
|
402197
|
-
flags.push(`--main-fields=${values.join(",")}`);
|
|
402198
|
-
}
|
|
402199
|
-
if (conditions) {
|
|
402200
|
-
let values = [];
|
|
402201
|
-
for (let value of conditions) {
|
|
402202
|
-
validateStringValue(value, "condition");
|
|
402203
|
-
if (value.indexOf(",") >= 0)
|
|
402204
|
-
throw new Error(`Invalid condition: ${value}`);
|
|
402205
|
-
values.push(value);
|
|
402206
|
-
}
|
|
402207
|
-
flags.push(`--conditions=${values.join(",")}`);
|
|
402208
|
-
}
|
|
402209
|
-
if (external)
|
|
402210
|
-
for (let name of external)
|
|
402211
|
-
flags.push(`--external:${validateStringValue(name, "external")}`);
|
|
402212
|
-
if (alias) {
|
|
402213
|
-
for (let old in alias) {
|
|
402214
|
-
if (old.indexOf("=") >= 0)
|
|
402215
|
-
throw new Error(`Invalid package name in alias: ${old}`);
|
|
402216
|
-
flags.push(`--alias:${old}=${validateStringValue(alias[old], "alias", old)}`);
|
|
402217
|
-
}
|
|
402218
|
-
}
|
|
402219
|
-
if (banner) {
|
|
402220
|
-
for (let type2 in banner) {
|
|
402221
|
-
if (type2.indexOf("=") >= 0)
|
|
402222
|
-
throw new Error(`Invalid banner file type: ${type2}`);
|
|
402223
|
-
flags.push(`--banner:${type2}=${validateStringValue(banner[type2], "banner", type2)}`);
|
|
402224
|
-
}
|
|
402225
|
-
}
|
|
402226
|
-
if (footer) {
|
|
402227
|
-
for (let type2 in footer) {
|
|
402228
|
-
if (type2.indexOf("=") >= 0)
|
|
402229
|
-
throw new Error(`Invalid footer file type: ${type2}`);
|
|
402230
|
-
flags.push(`--footer:${type2}=${validateStringValue(footer[type2], "footer", type2)}`);
|
|
402231
|
-
}
|
|
402232
|
-
}
|
|
402233
|
-
if (inject)
|
|
402234
|
-
for (let path32 of inject)
|
|
402235
|
-
flags.push(`--inject:${validateStringValue(path32, "inject")}`);
|
|
402236
|
-
if (loader2) {
|
|
402237
|
-
for (let ext2 in loader2) {
|
|
402238
|
-
if (ext2.indexOf("=") >= 0)
|
|
402239
|
-
throw new Error(`Invalid loader extension: ${ext2}`);
|
|
402240
|
-
flags.push(`--loader:${ext2}=${validateStringValue(loader2[ext2], "loader", ext2)}`);
|
|
402241
|
-
}
|
|
402242
|
-
}
|
|
402243
|
-
if (outExtension2) {
|
|
402244
|
-
for (let ext2 in outExtension2) {
|
|
402245
|
-
if (ext2.indexOf("=") >= 0)
|
|
402246
|
-
throw new Error(`Invalid out extension: ${ext2}`);
|
|
402247
|
-
flags.push(`--out-extension:${ext2}=${validateStringValue(outExtension2[ext2], "out extension", ext2)}`);
|
|
402248
|
-
}
|
|
402249
|
-
}
|
|
402250
|
-
if (entryPoints) {
|
|
402251
|
-
if (Array.isArray(entryPoints)) {
|
|
402252
|
-
for (let i3 = 0, n = entryPoints.length; i3 < n; i3++) {
|
|
402253
|
-
let entryPoint = entryPoints[i3];
|
|
402254
|
-
if (typeof entryPoint === "object" && entryPoint !== null) {
|
|
402255
|
-
let entryPointKeys = /* @__PURE__ */ Object.create(null);
|
|
402256
|
-
let input = getFlag(entryPoint, entryPointKeys, "in", mustBeString);
|
|
402257
|
-
let output = getFlag(entryPoint, entryPointKeys, "out", mustBeString);
|
|
402258
|
-
checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i3);
|
|
402259
|
-
if (input === void 0)
|
|
402260
|
-
throw new Error('Missing property "in" for entry point at index ' + i3);
|
|
402261
|
-
if (output === void 0)
|
|
402262
|
-
throw new Error('Missing property "out" for entry point at index ' + i3);
|
|
402263
|
-
entries.push([output, input]);
|
|
402264
|
-
} else {
|
|
402265
|
-
entries.push(["", validateStringValue(entryPoint, "entry point at index " + i3)]);
|
|
402266
|
-
}
|
|
402267
|
-
}
|
|
402268
|
-
} else {
|
|
402269
|
-
for (let key2 in entryPoints) {
|
|
402270
|
-
entries.push([key2, validateStringValue(entryPoints[key2], "entry point", key2)]);
|
|
402271
|
-
}
|
|
402272
|
-
}
|
|
402273
|
-
}
|
|
402274
|
-
if (stdin2) {
|
|
402275
|
-
let stdinKeys = /* @__PURE__ */ Object.create(null);
|
|
402276
|
-
let contents = getFlag(stdin2, stdinKeys, "contents", mustBeStringOrUint8Array);
|
|
402277
|
-
let resolveDir = getFlag(stdin2, stdinKeys, "resolveDir", mustBeString);
|
|
402278
|
-
let sourcefile = getFlag(stdin2, stdinKeys, "sourcefile", mustBeString);
|
|
402279
|
-
let loader22 = getFlag(stdin2, stdinKeys, "loader", mustBeString);
|
|
402280
|
-
checkForInvalidFlags(stdin2, stdinKeys, 'in "stdin" object');
|
|
402281
|
-
if (sourcefile)
|
|
402282
|
-
flags.push(`--sourcefile=${sourcefile}`);
|
|
402283
|
-
if (loader22)
|
|
402284
|
-
flags.push(`--loader=${loader22}`);
|
|
402285
|
-
if (resolveDir)
|
|
402286
|
-
stdinResolveDir = resolveDir;
|
|
402287
|
-
if (typeof contents === "string")
|
|
402288
|
-
stdinContents = encodeUTF8(contents);
|
|
402289
|
-
else if (contents instanceof Uint8Array)
|
|
402290
|
-
stdinContents = contents;
|
|
402291
|
-
}
|
|
402292
|
-
let nodePaths = [];
|
|
402293
|
-
if (nodePathsInput) {
|
|
402294
|
-
for (let value of nodePathsInput) {
|
|
402295
|
-
value += "";
|
|
402296
|
-
nodePaths.push(value);
|
|
402297
|
-
}
|
|
402298
|
-
}
|
|
402299
|
-
return {
|
|
402300
|
-
entries,
|
|
402301
|
-
flags,
|
|
402302
|
-
write,
|
|
402303
|
-
stdinContents,
|
|
402304
|
-
stdinResolveDir,
|
|
402305
|
-
absWorkingDir,
|
|
402306
|
-
nodePaths,
|
|
402307
|
-
mangleCache: validateMangleCache(mangleCache)
|
|
402308
|
-
};
|
|
402309
|
-
}
|
|
402310
|
-
function flagsForTransformOptions(callName, options8, isTTY2, logLevelDefault) {
|
|
402311
|
-
let flags = [];
|
|
402312
|
-
let keys = /* @__PURE__ */ Object.create(null);
|
|
402313
|
-
pushLogFlags(flags, options8, keys, isTTY2, logLevelDefault);
|
|
402314
|
-
pushCommonFlags(flags, options8, keys);
|
|
402315
|
-
let sourcemap = getFlag(options8, keys, "sourcemap", mustBeStringOrBoolean);
|
|
402316
|
-
let sourcefile = getFlag(options8, keys, "sourcefile", mustBeString);
|
|
402317
|
-
let loader2 = getFlag(options8, keys, "loader", mustBeString);
|
|
402318
|
-
let banner = getFlag(options8, keys, "banner", mustBeString);
|
|
402319
|
-
let footer = getFlag(options8, keys, "footer", mustBeString);
|
|
402320
|
-
let mangleCache = getFlag(options8, keys, "mangleCache", mustBeObject);
|
|
402321
|
-
checkForInvalidFlags(options8, keys, `in ${callName}() call`);
|
|
402322
|
-
if (sourcemap)
|
|
402323
|
-
flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`);
|
|
402324
|
-
if (sourcefile)
|
|
402325
|
-
flags.push(`--sourcefile=${sourcefile}`);
|
|
402326
|
-
if (loader2)
|
|
402327
|
-
flags.push(`--loader=${loader2}`);
|
|
402328
|
-
if (banner)
|
|
402329
|
-
flags.push(`--banner=${banner}`);
|
|
402330
|
-
if (footer)
|
|
402331
|
-
flags.push(`--footer=${footer}`);
|
|
402332
|
-
return {
|
|
402333
|
-
flags,
|
|
402334
|
-
mangleCache: validateMangleCache(mangleCache)
|
|
402335
|
-
};
|
|
402336
|
-
}
|
|
402337
|
-
function createChannel(streamIn) {
|
|
402338
|
-
const requestCallbacksByKey = {};
|
|
402339
|
-
const closeData = { didClose: false, reason: "" };
|
|
402340
|
-
let responseCallbacks = {};
|
|
402341
|
-
let nextRequestID = 0;
|
|
402342
|
-
let nextBuildKey = 0;
|
|
402343
|
-
let stdout = new Uint8Array(16 * 1024);
|
|
402344
|
-
let stdoutUsed = 0;
|
|
402345
|
-
let readFromStdout = (chunk) => {
|
|
402346
|
-
let limit = stdoutUsed + chunk.length;
|
|
402347
|
-
if (limit > stdout.length) {
|
|
402348
|
-
let swap = new Uint8Array(limit * 2);
|
|
402349
|
-
swap.set(stdout);
|
|
402350
|
-
stdout = swap;
|
|
402351
|
-
}
|
|
402352
|
-
stdout.set(chunk, stdoutUsed);
|
|
402353
|
-
stdoutUsed += chunk.length;
|
|
402354
|
-
let offset = 0;
|
|
402355
|
-
while (offset + 4 <= stdoutUsed) {
|
|
402356
|
-
let length = readUInt32LE(stdout, offset);
|
|
402357
|
-
if (offset + 4 + length > stdoutUsed) {
|
|
402358
|
-
break;
|
|
402359
|
-
}
|
|
402360
|
-
offset += 4;
|
|
402361
|
-
handleIncomingPacket(stdout.subarray(offset, offset + length));
|
|
402362
|
-
offset += length;
|
|
402363
|
-
}
|
|
402364
|
-
if (offset > 0) {
|
|
402365
|
-
stdout.copyWithin(0, offset, stdoutUsed);
|
|
402366
|
-
stdoutUsed -= offset;
|
|
402367
|
-
}
|
|
402368
|
-
};
|
|
402369
|
-
let afterClose = (error) => {
|
|
402370
|
-
closeData.didClose = true;
|
|
402371
|
-
if (error)
|
|
402372
|
-
closeData.reason = ": " + (error.message || error);
|
|
402373
|
-
const text = "The service was stopped" + closeData.reason;
|
|
402374
|
-
for (let id in responseCallbacks) {
|
|
402375
|
-
responseCallbacks[id](text, null);
|
|
402376
|
-
}
|
|
402377
|
-
responseCallbacks = {};
|
|
402378
|
-
};
|
|
402379
|
-
let sendRequest = (refs, value, callback) => {
|
|
402380
|
-
if (closeData.didClose)
|
|
402381
|
-
return callback("The service is no longer running" + closeData.reason, null);
|
|
402382
|
-
let id = nextRequestID++;
|
|
402383
|
-
responseCallbacks[id] = (error, response) => {
|
|
402384
|
-
try {
|
|
402385
|
-
callback(error, response);
|
|
402386
|
-
} finally {
|
|
402387
|
-
if (refs)
|
|
402388
|
-
refs.unref();
|
|
402389
|
-
}
|
|
402390
|
-
};
|
|
402391
|
-
if (refs)
|
|
402392
|
-
refs.ref();
|
|
402393
|
-
streamIn.writeToStdin(encodePacket({ id, isRequest: true, value }));
|
|
402394
|
-
};
|
|
402395
|
-
let sendResponse = (id, value) => {
|
|
402396
|
-
if (closeData.didClose)
|
|
402397
|
-
throw new Error("The service is no longer running" + closeData.reason);
|
|
402398
|
-
streamIn.writeToStdin(encodePacket({ id, isRequest: false, value }));
|
|
402399
|
-
};
|
|
402400
|
-
let handleRequest = async (id, request) => {
|
|
402401
|
-
try {
|
|
402402
|
-
if (request.command === "ping") {
|
|
402403
|
-
sendResponse(id, {});
|
|
402404
|
-
return;
|
|
402405
|
-
}
|
|
402406
|
-
if (typeof request.key === "number") {
|
|
402407
|
-
const requestCallbacks = requestCallbacksByKey[request.key];
|
|
402408
|
-
if (!requestCallbacks) {
|
|
402409
|
-
return;
|
|
402410
|
-
}
|
|
402411
|
-
const callback = requestCallbacks[request.command];
|
|
402412
|
-
if (callback) {
|
|
402413
|
-
await callback(id, request);
|
|
402414
|
-
return;
|
|
402415
|
-
}
|
|
402416
|
-
}
|
|
402417
|
-
throw new Error(`Invalid command: ` + request.command);
|
|
402418
|
-
} catch (e3) {
|
|
402419
|
-
const errors = [extractErrorMessageV8(e3, streamIn, null, void 0, "")];
|
|
402420
|
-
try {
|
|
402421
|
-
sendResponse(id, { errors });
|
|
402422
|
-
} catch {
|
|
402423
|
-
}
|
|
402424
|
-
}
|
|
402425
|
-
};
|
|
402426
|
-
let isFirstPacket = true;
|
|
402427
|
-
let handleIncomingPacket = (bytes) => {
|
|
402428
|
-
if (isFirstPacket) {
|
|
402429
|
-
isFirstPacket = false;
|
|
402430
|
-
let binaryVersion = String.fromCharCode(...bytes);
|
|
402431
|
-
if (binaryVersion !== "0.19.12") {
|
|
402432
|
-
throw new Error(`Cannot start service: Host version "${"0.19.12"}" does not match binary version ${quote2(binaryVersion)}`);
|
|
402433
|
-
}
|
|
402434
|
-
return;
|
|
402435
|
-
}
|
|
402436
|
-
let packet = decodePacket(bytes);
|
|
402437
|
-
if (packet.isRequest) {
|
|
402438
|
-
handleRequest(packet.id, packet.value);
|
|
402439
|
-
} else {
|
|
402440
|
-
let callback = responseCallbacks[packet.id];
|
|
402441
|
-
delete responseCallbacks[packet.id];
|
|
402442
|
-
if (packet.value.error)
|
|
402443
|
-
callback(packet.value.error, {});
|
|
402444
|
-
else
|
|
402445
|
-
callback(null, packet.value);
|
|
402446
|
-
}
|
|
402447
|
-
};
|
|
402448
|
-
let buildOrContext = ({ callName, refs, options: options8, isTTY: isTTY2, defaultWD: defaultWD2, callback }) => {
|
|
402449
|
-
let refCount = 0;
|
|
402450
|
-
const buildKey = nextBuildKey++;
|
|
402451
|
-
const requestCallbacks = {};
|
|
402452
|
-
const buildRefs = {
|
|
402453
|
-
ref() {
|
|
402454
|
-
if (++refCount === 1) {
|
|
402455
|
-
if (refs)
|
|
402456
|
-
refs.ref();
|
|
402457
|
-
}
|
|
402458
|
-
},
|
|
402459
|
-
unref() {
|
|
402460
|
-
if (--refCount === 0) {
|
|
402461
|
-
delete requestCallbacksByKey[buildKey];
|
|
402462
|
-
if (refs)
|
|
402463
|
-
refs.unref();
|
|
402464
|
-
}
|
|
402465
|
-
}
|
|
402466
|
-
};
|
|
402467
|
-
requestCallbacksByKey[buildKey] = requestCallbacks;
|
|
402468
|
-
buildRefs.ref();
|
|
402469
|
-
buildOrContextImpl(
|
|
402470
|
-
callName,
|
|
402471
|
-
buildKey,
|
|
402472
|
-
sendRequest,
|
|
402473
|
-
sendResponse,
|
|
402474
|
-
buildRefs,
|
|
402475
|
-
streamIn,
|
|
402476
|
-
requestCallbacks,
|
|
402477
|
-
options8,
|
|
402478
|
-
isTTY2,
|
|
402479
|
-
defaultWD2,
|
|
402480
|
-
(err, res) => {
|
|
402481
|
-
try {
|
|
402482
|
-
callback(err, res);
|
|
402483
|
-
} finally {
|
|
402484
|
-
buildRefs.unref();
|
|
402485
|
-
}
|
|
402486
|
-
}
|
|
402487
|
-
);
|
|
402488
|
-
};
|
|
402489
|
-
let transform22 = ({ callName, refs, input, options: options8, isTTY: isTTY2, fs: fs33, callback }) => {
|
|
402490
|
-
const details = createObjectStash();
|
|
402491
|
-
let start = (inputPath) => {
|
|
402492
|
-
try {
|
|
402493
|
-
if (typeof input !== "string" && !(input instanceof Uint8Array))
|
|
402494
|
-
throw new Error('The input to "transform" must be a string or a Uint8Array');
|
|
402495
|
-
let {
|
|
402496
|
-
flags,
|
|
402497
|
-
mangleCache
|
|
402498
|
-
} = flagsForTransformOptions(callName, options8, isTTY2, transformLogLevelDefault);
|
|
402499
|
-
let request = {
|
|
402500
|
-
command: "transform",
|
|
402501
|
-
flags,
|
|
402502
|
-
inputFS: inputPath !== null,
|
|
402503
|
-
input: inputPath !== null ? encodeUTF8(inputPath) : typeof input === "string" ? encodeUTF8(input) : input
|
|
402504
|
-
};
|
|
402505
|
-
if (mangleCache)
|
|
402506
|
-
request.mangleCache = mangleCache;
|
|
402507
|
-
sendRequest(refs, request, (error, response) => {
|
|
402508
|
-
if (error)
|
|
402509
|
-
return callback(new Error(error), null);
|
|
402510
|
-
let errors = replaceDetailsInMessages(response.errors, details);
|
|
402511
|
-
let warnings = replaceDetailsInMessages(response.warnings, details);
|
|
402512
|
-
let outstanding = 1;
|
|
402513
|
-
let next = () => {
|
|
402514
|
-
if (--outstanding === 0) {
|
|
402515
|
-
let result = {
|
|
402516
|
-
warnings,
|
|
402517
|
-
code: response.code,
|
|
402518
|
-
map: response.map,
|
|
402519
|
-
mangleCache: void 0,
|
|
402520
|
-
legalComments: void 0
|
|
402521
|
-
};
|
|
402522
|
-
if ("legalComments" in response)
|
|
402523
|
-
result.legalComments = response == null ? void 0 : response.legalComments;
|
|
402524
|
-
if (response.mangleCache)
|
|
402525
|
-
result.mangleCache = response == null ? void 0 : response.mangleCache;
|
|
402526
|
-
callback(null, result);
|
|
402527
|
-
}
|
|
402528
|
-
};
|
|
402529
|
-
if (errors.length > 0)
|
|
402530
|
-
return callback(failureErrorWithLog("Transform failed", errors, warnings), null);
|
|
402531
|
-
if (response.codeFS) {
|
|
402532
|
-
outstanding++;
|
|
402533
|
-
fs33.readFile(response.code, (err, contents) => {
|
|
402534
|
-
if (err !== null) {
|
|
402535
|
-
callback(err, null);
|
|
402536
|
-
} else {
|
|
402537
|
-
response.code = contents;
|
|
402538
|
-
next();
|
|
402539
|
-
}
|
|
402540
|
-
});
|
|
402541
|
-
}
|
|
402542
|
-
if (response.mapFS) {
|
|
402543
|
-
outstanding++;
|
|
402544
|
-
fs33.readFile(response.map, (err, contents) => {
|
|
402545
|
-
if (err !== null) {
|
|
402546
|
-
callback(err, null);
|
|
402547
|
-
} else {
|
|
402548
|
-
response.map = contents;
|
|
402549
|
-
next();
|
|
402550
|
-
}
|
|
402551
|
-
});
|
|
402552
|
-
}
|
|
402553
|
-
next();
|
|
402554
|
-
});
|
|
402555
|
-
} catch (e3) {
|
|
402556
|
-
let flags = [];
|
|
402557
|
-
try {
|
|
402558
|
-
pushLogFlags(flags, options8, {}, isTTY2, transformLogLevelDefault);
|
|
402559
|
-
} catch {
|
|
402560
|
-
}
|
|
402561
|
-
const error = extractErrorMessageV8(e3, streamIn, details, void 0, "");
|
|
402562
|
-
sendRequest(refs, { command: "error", flags, error }, () => {
|
|
402563
|
-
error.detail = details.load(error.detail);
|
|
402564
|
-
callback(failureErrorWithLog("Transform failed", [error], []), null);
|
|
402565
|
-
});
|
|
402566
|
-
}
|
|
402567
|
-
};
|
|
402568
|
-
if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) {
|
|
402569
|
-
let next = start;
|
|
402570
|
-
start = () => fs33.writeFile(input, next);
|
|
402571
|
-
}
|
|
402572
|
-
start(null);
|
|
402573
|
-
};
|
|
402574
|
-
let formatMessages2 = ({ callName, refs, messages: messages2, options: options8, callback }) => {
|
|
402575
|
-
if (!options8)
|
|
402576
|
-
throw new Error(`Missing second argument in ${callName}() call`);
|
|
402577
|
-
let keys = {};
|
|
402578
|
-
let kind = getFlag(options8, keys, "kind", mustBeString);
|
|
402579
|
-
let color = getFlag(options8, keys, "color", mustBeBoolean);
|
|
402580
|
-
let terminalWidth = getFlag(options8, keys, "terminalWidth", mustBeInteger);
|
|
402581
|
-
checkForInvalidFlags(options8, keys, `in ${callName}() call`);
|
|
402582
|
-
if (kind === void 0)
|
|
402583
|
-
throw new Error(`Missing "kind" in ${callName}() call`);
|
|
402584
|
-
if (kind !== "error" && kind !== "warning")
|
|
402585
|
-
throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`);
|
|
402586
|
-
let request = {
|
|
402587
|
-
command: "format-msgs",
|
|
402588
|
-
messages: sanitizeMessages(messages2, "messages", null, "", terminalWidth),
|
|
402589
|
-
isWarning: kind === "warning"
|
|
402590
|
-
};
|
|
402591
|
-
if (color !== void 0)
|
|
402592
|
-
request.color = color;
|
|
402593
|
-
if (terminalWidth !== void 0)
|
|
402594
|
-
request.terminalWidth = terminalWidth;
|
|
402595
|
-
sendRequest(refs, request, (error, response) => {
|
|
402596
|
-
if (error)
|
|
402597
|
-
return callback(new Error(error), null);
|
|
402598
|
-
callback(null, response.messages);
|
|
402599
|
-
});
|
|
402600
|
-
};
|
|
402601
|
-
let analyzeMetafile2 = ({ callName, refs, metafile, options: options8, callback }) => {
|
|
402602
|
-
if (options8 === void 0)
|
|
402603
|
-
options8 = {};
|
|
402604
|
-
let keys = {};
|
|
402605
|
-
let color = getFlag(options8, keys, "color", mustBeBoolean);
|
|
402606
|
-
let verbose = getFlag(options8, keys, "verbose", mustBeBoolean);
|
|
402607
|
-
checkForInvalidFlags(options8, keys, `in ${callName}() call`);
|
|
402608
|
-
let request = {
|
|
402609
|
-
command: "analyze-metafile",
|
|
402610
|
-
metafile
|
|
402611
|
-
};
|
|
402612
|
-
if (color !== void 0)
|
|
402613
|
-
request.color = color;
|
|
402614
|
-
if (verbose !== void 0)
|
|
402615
|
-
request.verbose = verbose;
|
|
402616
|
-
sendRequest(refs, request, (error, response) => {
|
|
402617
|
-
if (error)
|
|
402618
|
-
return callback(new Error(error), null);
|
|
402619
|
-
callback(null, response.result);
|
|
402620
|
-
});
|
|
402621
|
-
};
|
|
402622
|
-
return {
|
|
402623
|
-
readFromStdout,
|
|
402624
|
-
afterClose,
|
|
402625
|
-
service: {
|
|
402626
|
-
buildOrContext,
|
|
402627
|
-
transform: transform22,
|
|
402628
|
-
formatMessages: formatMessages2,
|
|
402629
|
-
analyzeMetafile: analyzeMetafile2
|
|
402630
|
-
}
|
|
402631
|
-
};
|
|
402632
|
-
}
|
|
402633
|
-
function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, options8, isTTY2, defaultWD2, callback) {
|
|
402634
|
-
const details = createObjectStash();
|
|
402635
|
-
const isContext = callName === "context";
|
|
402636
|
-
const handleError = (e3, pluginName) => {
|
|
402637
|
-
const flags = [];
|
|
402638
|
-
try {
|
|
402639
|
-
pushLogFlags(flags, options8, {}, isTTY2, buildLogLevelDefault);
|
|
402640
|
-
} catch {
|
|
402641
|
-
}
|
|
402642
|
-
const message = extractErrorMessageV8(e3, streamIn, details, void 0, pluginName);
|
|
402643
|
-
sendRequest(refs, { command: "error", flags, error: message }, () => {
|
|
402644
|
-
message.detail = details.load(message.detail);
|
|
402645
|
-
callback(failureErrorWithLog(isContext ? "Context failed" : "Build failed", [message], []), null);
|
|
402646
|
-
});
|
|
402647
|
-
};
|
|
402648
|
-
let plugins;
|
|
402649
|
-
if (typeof options8 === "object") {
|
|
402650
|
-
const value = options8.plugins;
|
|
402651
|
-
if (value !== void 0) {
|
|
402652
|
-
if (!Array.isArray(value))
|
|
402653
|
-
return handleError(new Error(`"plugins" must be an array`), "");
|
|
402654
|
-
plugins = value;
|
|
402655
|
-
}
|
|
402656
|
-
}
|
|
402657
|
-
if (plugins && plugins.length > 0) {
|
|
402658
|
-
if (streamIn.isSync)
|
|
402659
|
-
return handleError(new Error("Cannot use plugins in synchronous API calls"), "");
|
|
402660
|
-
handlePlugins(
|
|
402661
|
-
buildKey,
|
|
402662
|
-
sendRequest,
|
|
402663
|
-
sendResponse,
|
|
402664
|
-
refs,
|
|
402665
|
-
streamIn,
|
|
402666
|
-
requestCallbacks,
|
|
402667
|
-
options8,
|
|
402668
|
-
plugins,
|
|
402669
|
-
details
|
|
402670
|
-
).then(
|
|
402671
|
-
(result) => {
|
|
402672
|
-
if (!result.ok)
|
|
402673
|
-
return handleError(result.error, result.pluginName);
|
|
402674
|
-
try {
|
|
402675
|
-
buildOrContextContinue(result.requestPlugins, result.runOnEndCallbacks, result.scheduleOnDisposeCallbacks);
|
|
402676
|
-
} catch (e3) {
|
|
402677
|
-
handleError(e3, "");
|
|
402678
|
-
}
|
|
402679
|
-
},
|
|
402680
|
-
(e3) => handleError(e3, "")
|
|
402681
|
-
);
|
|
402682
|
-
return;
|
|
402683
|
-
}
|
|
402684
|
-
try {
|
|
402685
|
-
buildOrContextContinue(null, (result, done) => done([], []), () => {
|
|
402686
|
-
});
|
|
402687
|
-
} catch (e3) {
|
|
402688
|
-
handleError(e3, "");
|
|
402689
|
-
}
|
|
402690
|
-
function buildOrContextContinue(requestPlugins, runOnEndCallbacks, scheduleOnDisposeCallbacks) {
|
|
402691
|
-
const writeDefault = streamIn.hasFS;
|
|
402692
|
-
const {
|
|
402693
|
-
entries,
|
|
402694
|
-
flags,
|
|
402695
|
-
write,
|
|
402696
|
-
stdinContents,
|
|
402697
|
-
stdinResolveDir,
|
|
402698
|
-
absWorkingDir,
|
|
402699
|
-
nodePaths,
|
|
402700
|
-
mangleCache
|
|
402701
|
-
} = flagsForBuildOptions(callName, options8, isTTY2, buildLogLevelDefault, writeDefault);
|
|
402702
|
-
if (write && !streamIn.hasFS)
|
|
402703
|
-
throw new Error(`The "write" option is unavailable in this environment`);
|
|
402704
|
-
const request = {
|
|
402705
|
-
command: "build",
|
|
402706
|
-
key: buildKey,
|
|
402707
|
-
entries,
|
|
402708
|
-
flags,
|
|
402709
|
-
write,
|
|
402710
|
-
stdinContents,
|
|
402711
|
-
stdinResolveDir,
|
|
402712
|
-
absWorkingDir: absWorkingDir || defaultWD2,
|
|
402713
|
-
nodePaths,
|
|
402714
|
-
context: isContext
|
|
402715
|
-
};
|
|
402716
|
-
if (requestPlugins)
|
|
402717
|
-
request.plugins = requestPlugins;
|
|
402718
|
-
if (mangleCache)
|
|
402719
|
-
request.mangleCache = mangleCache;
|
|
402720
|
-
const buildResponseToResult = (response, callback2) => {
|
|
402721
|
-
const result = {
|
|
402722
|
-
errors: replaceDetailsInMessages(response.errors, details),
|
|
402723
|
-
warnings: replaceDetailsInMessages(response.warnings, details),
|
|
402724
|
-
outputFiles: void 0,
|
|
402725
|
-
metafile: void 0,
|
|
402726
|
-
mangleCache: void 0
|
|
402727
|
-
};
|
|
402728
|
-
const originalErrors = result.errors.slice();
|
|
402729
|
-
const originalWarnings = result.warnings.slice();
|
|
402730
|
-
if (response.outputFiles)
|
|
402731
|
-
result.outputFiles = response.outputFiles.map(convertOutputFiles);
|
|
402732
|
-
if (response.metafile)
|
|
402733
|
-
result.metafile = JSON.parse(response.metafile);
|
|
402734
|
-
if (response.mangleCache)
|
|
402735
|
-
result.mangleCache = response.mangleCache;
|
|
402736
|
-
if (response.writeToStdout !== void 0)
|
|
402737
|
-
console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, ""));
|
|
402738
|
-
runOnEndCallbacks(result, (onEndErrors, onEndWarnings) => {
|
|
402739
|
-
if (originalErrors.length > 0 || onEndErrors.length > 0) {
|
|
402740
|
-
const error = failureErrorWithLog("Build failed", originalErrors.concat(onEndErrors), originalWarnings.concat(onEndWarnings));
|
|
402741
|
-
return callback2(error, null, onEndErrors, onEndWarnings);
|
|
402742
|
-
}
|
|
402743
|
-
callback2(null, result, onEndErrors, onEndWarnings);
|
|
402744
|
-
});
|
|
402745
|
-
};
|
|
402746
|
-
let latestResultPromise;
|
|
402747
|
-
let provideLatestResult;
|
|
402748
|
-
if (isContext)
|
|
402749
|
-
requestCallbacks["on-end"] = (id, request2) => new Promise((resolve3) => {
|
|
402750
|
-
buildResponseToResult(request2, (err, result, onEndErrors, onEndWarnings) => {
|
|
402751
|
-
const response = {
|
|
402752
|
-
errors: onEndErrors,
|
|
402753
|
-
warnings: onEndWarnings
|
|
402754
|
-
};
|
|
402755
|
-
if (provideLatestResult)
|
|
402756
|
-
provideLatestResult(err, result);
|
|
402757
|
-
latestResultPromise = void 0;
|
|
402758
|
-
provideLatestResult = void 0;
|
|
402759
|
-
sendResponse(id, response);
|
|
402760
|
-
resolve3();
|
|
402761
|
-
});
|
|
402762
|
-
});
|
|
402763
|
-
sendRequest(refs, request, (error, response) => {
|
|
402764
|
-
if (error)
|
|
402765
|
-
return callback(new Error(error), null);
|
|
402766
|
-
if (!isContext) {
|
|
402767
|
-
return buildResponseToResult(response, (err, res) => {
|
|
402768
|
-
scheduleOnDisposeCallbacks();
|
|
402769
|
-
return callback(err, res);
|
|
402770
|
-
});
|
|
402771
|
-
}
|
|
402772
|
-
if (response.errors.length > 0) {
|
|
402773
|
-
return callback(failureErrorWithLog("Context failed", response.errors, response.warnings), null);
|
|
402774
|
-
}
|
|
402775
|
-
let didDispose = false;
|
|
402776
|
-
const result = {
|
|
402777
|
-
rebuild: () => {
|
|
402778
|
-
if (!latestResultPromise)
|
|
402779
|
-
latestResultPromise = new Promise((resolve3, reject) => {
|
|
402780
|
-
let settlePromise;
|
|
402781
|
-
provideLatestResult = (err, result2) => {
|
|
402782
|
-
if (!settlePromise)
|
|
402783
|
-
settlePromise = () => err ? reject(err) : resolve3(result2);
|
|
402784
|
-
};
|
|
402785
|
-
const triggerAnotherBuild = () => {
|
|
402786
|
-
const request2 = {
|
|
402787
|
-
command: "rebuild",
|
|
402788
|
-
key: buildKey
|
|
402789
|
-
};
|
|
402790
|
-
sendRequest(refs, request2, (error2, response2) => {
|
|
402791
|
-
if (error2) {
|
|
402792
|
-
reject(new Error(error2));
|
|
402793
|
-
} else if (settlePromise) {
|
|
402794
|
-
settlePromise();
|
|
402795
|
-
} else {
|
|
402796
|
-
triggerAnotherBuild();
|
|
402797
|
-
}
|
|
402798
|
-
});
|
|
402799
|
-
};
|
|
402800
|
-
triggerAnotherBuild();
|
|
402801
|
-
});
|
|
402802
|
-
return latestResultPromise;
|
|
402803
|
-
},
|
|
402804
|
-
watch: (options22 = {}) => new Promise((resolve3, reject) => {
|
|
402805
|
-
if (!streamIn.hasFS)
|
|
402806
|
-
throw new Error(`Cannot use the "watch" API in this environment`);
|
|
402807
|
-
const keys = {};
|
|
402808
|
-
checkForInvalidFlags(options22, keys, `in watch() call`);
|
|
402809
|
-
const request2 = {
|
|
402810
|
-
command: "watch",
|
|
402811
|
-
key: buildKey
|
|
402812
|
-
};
|
|
402813
|
-
sendRequest(refs, request2, (error2) => {
|
|
402814
|
-
if (error2)
|
|
402815
|
-
reject(new Error(error2));
|
|
402816
|
-
else
|
|
402817
|
-
resolve3(void 0);
|
|
402818
|
-
});
|
|
402819
|
-
}),
|
|
402820
|
-
serve: (options22 = {}) => new Promise((resolve3, reject) => {
|
|
402821
|
-
if (!streamIn.hasFS)
|
|
402822
|
-
throw new Error(`Cannot use the "serve" API in this environment`);
|
|
402823
|
-
const keys = {};
|
|
402824
|
-
const port = getFlag(options22, keys, "port", mustBeInteger);
|
|
402825
|
-
const host = getFlag(options22, keys, "host", mustBeString);
|
|
402826
|
-
const servedir = getFlag(options22, keys, "servedir", mustBeString);
|
|
402827
|
-
const keyfile = getFlag(options22, keys, "keyfile", mustBeString);
|
|
402828
|
-
const certfile = getFlag(options22, keys, "certfile", mustBeString);
|
|
402829
|
-
const fallback = getFlag(options22, keys, "fallback", mustBeString);
|
|
402830
|
-
const onRequest = getFlag(options22, keys, "onRequest", mustBeFunction);
|
|
402831
|
-
checkForInvalidFlags(options22, keys, `in serve() call`);
|
|
402832
|
-
const request2 = {
|
|
402833
|
-
command: "serve",
|
|
402834
|
-
key: buildKey,
|
|
402835
|
-
onRequest: !!onRequest
|
|
402836
|
-
};
|
|
402837
|
-
if (port !== void 0)
|
|
402838
|
-
request2.port = port;
|
|
402839
|
-
if (host !== void 0)
|
|
402840
|
-
request2.host = host;
|
|
402841
|
-
if (servedir !== void 0)
|
|
402842
|
-
request2.servedir = servedir;
|
|
402843
|
-
if (keyfile !== void 0)
|
|
402844
|
-
request2.keyfile = keyfile;
|
|
402845
|
-
if (certfile !== void 0)
|
|
402846
|
-
request2.certfile = certfile;
|
|
402847
|
-
if (fallback !== void 0)
|
|
402848
|
-
request2.fallback = fallback;
|
|
402849
|
-
sendRequest(refs, request2, (error2, response2) => {
|
|
402850
|
-
if (error2)
|
|
402851
|
-
return reject(new Error(error2));
|
|
402852
|
-
if (onRequest) {
|
|
402853
|
-
requestCallbacks["serve-request"] = (id, request3) => {
|
|
402854
|
-
onRequest(request3.args);
|
|
402855
|
-
sendResponse(id, {});
|
|
402856
|
-
};
|
|
402857
|
-
}
|
|
402858
|
-
resolve3(response2);
|
|
402859
|
-
});
|
|
402860
|
-
}),
|
|
402861
|
-
cancel: () => new Promise((resolve3) => {
|
|
402862
|
-
if (didDispose)
|
|
402863
|
-
return resolve3();
|
|
402864
|
-
const request2 = {
|
|
402865
|
-
command: "cancel",
|
|
402866
|
-
key: buildKey
|
|
402867
|
-
};
|
|
402868
|
-
sendRequest(refs, request2, () => {
|
|
402869
|
-
resolve3();
|
|
402870
|
-
});
|
|
402871
|
-
}),
|
|
402872
|
-
dispose: () => new Promise((resolve3) => {
|
|
402873
|
-
if (didDispose)
|
|
402874
|
-
return resolve3();
|
|
402875
|
-
didDispose = true;
|
|
402876
|
-
const request2 = {
|
|
402877
|
-
command: "dispose",
|
|
402878
|
-
key: buildKey
|
|
402879
|
-
};
|
|
402880
|
-
sendRequest(refs, request2, () => {
|
|
402881
|
-
resolve3();
|
|
402882
|
-
scheduleOnDisposeCallbacks();
|
|
402883
|
-
refs.unref();
|
|
402884
|
-
});
|
|
402885
|
-
})
|
|
402886
|
-
};
|
|
402887
|
-
refs.ref();
|
|
402888
|
-
callback(null, result);
|
|
402889
|
-
});
|
|
402890
|
-
}
|
|
402891
|
-
}
|
|
402892
|
-
var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, initialOptions, plugins, details) => {
|
|
402893
|
-
let onStartCallbacks = [];
|
|
402894
|
-
let onEndCallbacks = [];
|
|
402895
|
-
let onResolveCallbacks = {};
|
|
402896
|
-
let onLoadCallbacks = {};
|
|
402897
|
-
let onDisposeCallbacks = [];
|
|
402898
|
-
let nextCallbackID = 0;
|
|
402899
|
-
let i3 = 0;
|
|
402900
|
-
let requestPlugins = [];
|
|
402901
|
-
let isSetupDone = false;
|
|
402902
|
-
plugins = [...plugins];
|
|
402903
|
-
for (let item of plugins) {
|
|
402904
|
-
let keys = {};
|
|
402905
|
-
if (typeof item !== "object")
|
|
402906
|
-
throw new Error(`Plugin at index ${i3} must be an object`);
|
|
402907
|
-
const name = getFlag(item, keys, "name", mustBeString);
|
|
402908
|
-
if (typeof name !== "string" || name === "")
|
|
402909
|
-
throw new Error(`Plugin at index ${i3} is missing a name`);
|
|
402910
|
-
try {
|
|
402911
|
-
let setup = getFlag(item, keys, "setup", mustBeFunction);
|
|
402912
|
-
if (typeof setup !== "function")
|
|
402913
|
-
throw new Error(`Plugin is missing a setup function`);
|
|
402914
|
-
checkForInvalidFlags(item, keys, `on plugin ${quote2(name)}`);
|
|
402915
|
-
let plugin = {
|
|
402916
|
-
name,
|
|
402917
|
-
onStart: false,
|
|
402918
|
-
onEnd: false,
|
|
402919
|
-
onResolve: [],
|
|
402920
|
-
onLoad: []
|
|
402921
|
-
};
|
|
402922
|
-
i3++;
|
|
402923
|
-
let resolve3 = (path32, options8 = {}) => {
|
|
402924
|
-
if (!isSetupDone)
|
|
402925
|
-
throw new Error('Cannot call "resolve" before plugin setup has completed');
|
|
402926
|
-
if (typeof path32 !== "string")
|
|
402927
|
-
throw new Error(`The path to resolve must be a string`);
|
|
402928
|
-
let keys2 = /* @__PURE__ */ Object.create(null);
|
|
402929
|
-
let pluginName = getFlag(options8, keys2, "pluginName", mustBeString);
|
|
402930
|
-
let importer = getFlag(options8, keys2, "importer", mustBeString);
|
|
402931
|
-
let namespace = getFlag(options8, keys2, "namespace", mustBeString);
|
|
402932
|
-
let resolveDir = getFlag(options8, keys2, "resolveDir", mustBeString);
|
|
402933
|
-
let kind = getFlag(options8, keys2, "kind", mustBeString);
|
|
402934
|
-
let pluginData = getFlag(options8, keys2, "pluginData", canBeAnything);
|
|
402935
|
-
checkForInvalidFlags(options8, keys2, "in resolve() call");
|
|
402936
|
-
return new Promise((resolve22, reject) => {
|
|
402937
|
-
const request = {
|
|
402938
|
-
command: "resolve",
|
|
402939
|
-
path: path32,
|
|
402940
|
-
key: buildKey,
|
|
402941
|
-
pluginName: name
|
|
402942
|
-
};
|
|
402943
|
-
if (pluginName != null)
|
|
402944
|
-
request.pluginName = pluginName;
|
|
402945
|
-
if (importer != null)
|
|
402946
|
-
request.importer = importer;
|
|
402947
|
-
if (namespace != null)
|
|
402948
|
-
request.namespace = namespace;
|
|
402949
|
-
if (resolveDir != null)
|
|
402950
|
-
request.resolveDir = resolveDir;
|
|
402951
|
-
if (kind != null)
|
|
402952
|
-
request.kind = kind;
|
|
402953
|
-
else
|
|
402954
|
-
throw new Error(`Must specify "kind" when calling "resolve"`);
|
|
402955
|
-
if (pluginData != null)
|
|
402956
|
-
request.pluginData = details.store(pluginData);
|
|
402957
|
-
sendRequest(refs, request, (error, response) => {
|
|
402958
|
-
if (error !== null)
|
|
402959
|
-
reject(new Error(error));
|
|
402960
|
-
else
|
|
402961
|
-
resolve22({
|
|
402962
|
-
errors: replaceDetailsInMessages(response.errors, details),
|
|
402963
|
-
warnings: replaceDetailsInMessages(response.warnings, details),
|
|
402964
|
-
path: response.path,
|
|
402965
|
-
external: response.external,
|
|
402966
|
-
sideEffects: response.sideEffects,
|
|
402967
|
-
namespace: response.namespace,
|
|
402968
|
-
suffix: response.suffix,
|
|
402969
|
-
pluginData: details.load(response.pluginData)
|
|
402970
|
-
});
|
|
402971
|
-
});
|
|
402972
|
-
});
|
|
402973
|
-
};
|
|
402974
|
-
let promise = setup({
|
|
402975
|
-
initialOptions,
|
|
402976
|
-
resolve: resolve3,
|
|
402977
|
-
onStart(callback) {
|
|
402978
|
-
let registeredText = `This error came from the "onStart" callback registered here:`;
|
|
402979
|
-
let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart");
|
|
402980
|
-
onStartCallbacks.push({ name, callback, note: registeredNote });
|
|
402981
|
-
plugin.onStart = true;
|
|
402982
|
-
},
|
|
402983
|
-
onEnd(callback) {
|
|
402984
|
-
let registeredText = `This error came from the "onEnd" callback registered here:`;
|
|
402985
|
-
let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd");
|
|
402986
|
-
onEndCallbacks.push({ name, callback, note: registeredNote });
|
|
402987
|
-
plugin.onEnd = true;
|
|
402988
|
-
},
|
|
402989
|
-
onResolve(options8, callback) {
|
|
402990
|
-
let registeredText = `This error came from the "onResolve" callback registered here:`;
|
|
402991
|
-
let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve");
|
|
402992
|
-
let keys2 = {};
|
|
402993
|
-
let filter3 = getFlag(options8, keys2, "filter", mustBeRegExp);
|
|
402994
|
-
let namespace = getFlag(options8, keys2, "namespace", mustBeString);
|
|
402995
|
-
checkForInvalidFlags(options8, keys2, `in onResolve() call for plugin ${quote2(name)}`);
|
|
402996
|
-
if (filter3 == null)
|
|
402997
|
-
throw new Error(`onResolve() call is missing a filter`);
|
|
402998
|
-
let id = nextCallbackID++;
|
|
402999
|
-
onResolveCallbacks[id] = { name, callback, note: registeredNote };
|
|
403000
|
-
plugin.onResolve.push({ id, filter: filter3.source, namespace: namespace || "" });
|
|
403001
|
-
},
|
|
403002
|
-
onLoad(options8, callback) {
|
|
403003
|
-
let registeredText = `This error came from the "onLoad" callback registered here:`;
|
|
403004
|
-
let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad");
|
|
403005
|
-
let keys2 = {};
|
|
403006
|
-
let filter3 = getFlag(options8, keys2, "filter", mustBeRegExp);
|
|
403007
|
-
let namespace = getFlag(options8, keys2, "namespace", mustBeString);
|
|
403008
|
-
checkForInvalidFlags(options8, keys2, `in onLoad() call for plugin ${quote2(name)}`);
|
|
403009
|
-
if (filter3 == null)
|
|
403010
|
-
throw new Error(`onLoad() call is missing a filter`);
|
|
403011
|
-
let id = nextCallbackID++;
|
|
403012
|
-
onLoadCallbacks[id] = { name, callback, note: registeredNote };
|
|
403013
|
-
plugin.onLoad.push({ id, filter: filter3.source, namespace: namespace || "" });
|
|
403014
|
-
},
|
|
403015
|
-
onDispose(callback) {
|
|
403016
|
-
onDisposeCallbacks.push(callback);
|
|
403017
|
-
},
|
|
403018
|
-
esbuild: streamIn.esbuild
|
|
403019
|
-
});
|
|
403020
|
-
if (promise)
|
|
403021
|
-
await promise;
|
|
403022
|
-
requestPlugins.push(plugin);
|
|
403023
|
-
} catch (e3) {
|
|
403024
|
-
return { ok: false, error: e3, pluginName: name };
|
|
403025
|
-
}
|
|
403026
|
-
}
|
|
403027
|
-
requestCallbacks["on-start"] = async (id, request) => {
|
|
403028
|
-
let response = { errors: [], warnings: [] };
|
|
403029
|
-
await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => {
|
|
403030
|
-
try {
|
|
403031
|
-
let result = await callback();
|
|
403032
|
-
if (result != null) {
|
|
403033
|
-
if (typeof result !== "object")
|
|
403034
|
-
throw new Error(`Expected onStart() callback in plugin ${quote2(name)} to return an object`);
|
|
403035
|
-
let keys = {};
|
|
403036
|
-
let errors = getFlag(result, keys, "errors", mustBeArray);
|
|
403037
|
-
let warnings = getFlag(result, keys, "warnings", mustBeArray);
|
|
403038
|
-
checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${quote2(name)}`);
|
|
403039
|
-
if (errors != null)
|
|
403040
|
-
response.errors.push(...sanitizeMessages(errors, "errors", details, name, void 0));
|
|
403041
|
-
if (warnings != null)
|
|
403042
|
-
response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name, void 0));
|
|
403043
|
-
}
|
|
403044
|
-
} catch (e3) {
|
|
403045
|
-
response.errors.push(extractErrorMessageV8(e3, streamIn, details, note && note(), name));
|
|
403046
|
-
}
|
|
403047
|
-
}));
|
|
403048
|
-
sendResponse(id, response);
|
|
403049
|
-
};
|
|
403050
|
-
requestCallbacks["on-resolve"] = async (id, request) => {
|
|
403051
|
-
let response = {}, name = "", callback, note;
|
|
403052
|
-
for (let id2 of request.ids) {
|
|
403053
|
-
try {
|
|
403054
|
-
({ name, callback, note } = onResolveCallbacks[id2]);
|
|
403055
|
-
let result = await callback({
|
|
403056
|
-
path: request.path,
|
|
403057
|
-
importer: request.importer,
|
|
403058
|
-
namespace: request.namespace,
|
|
403059
|
-
resolveDir: request.resolveDir,
|
|
403060
|
-
kind: request.kind,
|
|
403061
|
-
pluginData: details.load(request.pluginData)
|
|
403062
|
-
});
|
|
403063
|
-
if (result != null) {
|
|
403064
|
-
if (typeof result !== "object")
|
|
403065
|
-
throw new Error(`Expected onResolve() callback in plugin ${quote2(name)} to return an object`);
|
|
403066
|
-
let keys = {};
|
|
403067
|
-
let pluginName = getFlag(result, keys, "pluginName", mustBeString);
|
|
403068
|
-
let path32 = getFlag(result, keys, "path", mustBeString);
|
|
403069
|
-
let namespace = getFlag(result, keys, "namespace", mustBeString);
|
|
403070
|
-
let suffix = getFlag(result, keys, "suffix", mustBeString);
|
|
403071
|
-
let external = getFlag(result, keys, "external", mustBeBoolean);
|
|
403072
|
-
let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean);
|
|
403073
|
-
let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
|
|
403074
|
-
let errors = getFlag(result, keys, "errors", mustBeArray);
|
|
403075
|
-
let warnings = getFlag(result, keys, "warnings", mustBeArray);
|
|
403076
|
-
let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray);
|
|
403077
|
-
let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray);
|
|
403078
|
-
checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${quote2(name)}`);
|
|
403079
|
-
response.id = id2;
|
|
403080
|
-
if (pluginName != null)
|
|
403081
|
-
response.pluginName = pluginName;
|
|
403082
|
-
if (path32 != null)
|
|
403083
|
-
response.path = path32;
|
|
403084
|
-
if (namespace != null)
|
|
403085
|
-
response.namespace = namespace;
|
|
403086
|
-
if (suffix != null)
|
|
403087
|
-
response.suffix = suffix;
|
|
403088
|
-
if (external != null)
|
|
403089
|
-
response.external = external;
|
|
403090
|
-
if (sideEffects != null)
|
|
403091
|
-
response.sideEffects = sideEffects;
|
|
403092
|
-
if (pluginData != null)
|
|
403093
|
-
response.pluginData = details.store(pluginData);
|
|
403094
|
-
if (errors != null)
|
|
403095
|
-
response.errors = sanitizeMessages(errors, "errors", details, name, void 0);
|
|
403096
|
-
if (warnings != null)
|
|
403097
|
-
response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0);
|
|
403098
|
-
if (watchFiles != null)
|
|
403099
|
-
response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
|
|
403100
|
-
if (watchDirs != null)
|
|
403101
|
-
response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
|
|
403102
|
-
break;
|
|
403103
|
-
}
|
|
403104
|
-
} catch (e3) {
|
|
403105
|
-
response = { id: id2, errors: [extractErrorMessageV8(e3, streamIn, details, note && note(), name)] };
|
|
403106
|
-
break;
|
|
403107
|
-
}
|
|
403108
|
-
}
|
|
403109
|
-
sendResponse(id, response);
|
|
403110
|
-
};
|
|
403111
|
-
requestCallbacks["on-load"] = async (id, request) => {
|
|
403112
|
-
let response = {}, name = "", callback, note;
|
|
403113
|
-
for (let id2 of request.ids) {
|
|
403114
|
-
try {
|
|
403115
|
-
({ name, callback, note } = onLoadCallbacks[id2]);
|
|
403116
|
-
let result = await callback({
|
|
403117
|
-
path: request.path,
|
|
403118
|
-
namespace: request.namespace,
|
|
403119
|
-
suffix: request.suffix,
|
|
403120
|
-
pluginData: details.load(request.pluginData),
|
|
403121
|
-
with: request.with
|
|
403122
|
-
});
|
|
403123
|
-
if (result != null) {
|
|
403124
|
-
if (typeof result !== "object")
|
|
403125
|
-
throw new Error(`Expected onLoad() callback in plugin ${quote2(name)} to return an object`);
|
|
403126
|
-
let keys = {};
|
|
403127
|
-
let pluginName = getFlag(result, keys, "pluginName", mustBeString);
|
|
403128
|
-
let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array);
|
|
403129
|
-
let resolveDir = getFlag(result, keys, "resolveDir", mustBeString);
|
|
403130
|
-
let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
|
|
403131
|
-
let loader2 = getFlag(result, keys, "loader", mustBeString);
|
|
403132
|
-
let errors = getFlag(result, keys, "errors", mustBeArray);
|
|
403133
|
-
let warnings = getFlag(result, keys, "warnings", mustBeArray);
|
|
403134
|
-
let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray);
|
|
403135
|
-
let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray);
|
|
403136
|
-
checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${quote2(name)}`);
|
|
403137
|
-
response.id = id2;
|
|
403138
|
-
if (pluginName != null)
|
|
403139
|
-
response.pluginName = pluginName;
|
|
403140
|
-
if (contents instanceof Uint8Array)
|
|
403141
|
-
response.contents = contents;
|
|
403142
|
-
else if (contents != null)
|
|
403143
|
-
response.contents = encodeUTF8(contents);
|
|
403144
|
-
if (resolveDir != null)
|
|
403145
|
-
response.resolveDir = resolveDir;
|
|
403146
|
-
if (pluginData != null)
|
|
403147
|
-
response.pluginData = details.store(pluginData);
|
|
403148
|
-
if (loader2 != null)
|
|
403149
|
-
response.loader = loader2;
|
|
403150
|
-
if (errors != null)
|
|
403151
|
-
response.errors = sanitizeMessages(errors, "errors", details, name, void 0);
|
|
403152
|
-
if (warnings != null)
|
|
403153
|
-
response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0);
|
|
403154
|
-
if (watchFiles != null)
|
|
403155
|
-
response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
|
|
403156
|
-
if (watchDirs != null)
|
|
403157
|
-
response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
|
|
403158
|
-
break;
|
|
403159
|
-
}
|
|
403160
|
-
} catch (e3) {
|
|
403161
|
-
response = { id: id2, errors: [extractErrorMessageV8(e3, streamIn, details, note && note(), name)] };
|
|
403162
|
-
break;
|
|
403163
|
-
}
|
|
403164
|
-
}
|
|
403165
|
-
sendResponse(id, response);
|
|
403166
|
-
};
|
|
403167
|
-
let runOnEndCallbacks = (result, done) => done([], []);
|
|
403168
|
-
if (onEndCallbacks.length > 0) {
|
|
403169
|
-
runOnEndCallbacks = (result, done) => {
|
|
403170
|
-
(async () => {
|
|
403171
|
-
const onEndErrors = [];
|
|
403172
|
-
const onEndWarnings = [];
|
|
403173
|
-
for (const { name, callback, note } of onEndCallbacks) {
|
|
403174
|
-
let newErrors;
|
|
403175
|
-
let newWarnings;
|
|
403176
|
-
try {
|
|
403177
|
-
const value = await callback(result);
|
|
403178
|
-
if (value != null) {
|
|
403179
|
-
if (typeof value !== "object")
|
|
403180
|
-
throw new Error(`Expected onEnd() callback in plugin ${quote2(name)} to return an object`);
|
|
403181
|
-
let keys = {};
|
|
403182
|
-
let errors = getFlag(value, keys, "errors", mustBeArray);
|
|
403183
|
-
let warnings = getFlag(value, keys, "warnings", mustBeArray);
|
|
403184
|
-
checkForInvalidFlags(value, keys, `from onEnd() callback in plugin ${quote2(name)}`);
|
|
403185
|
-
if (errors != null)
|
|
403186
|
-
newErrors = sanitizeMessages(errors, "errors", details, name, void 0);
|
|
403187
|
-
if (warnings != null)
|
|
403188
|
-
newWarnings = sanitizeMessages(warnings, "warnings", details, name, void 0);
|
|
403189
|
-
}
|
|
403190
|
-
} catch (e3) {
|
|
403191
|
-
newErrors = [extractErrorMessageV8(e3, streamIn, details, note && note(), name)];
|
|
403192
|
-
}
|
|
403193
|
-
if (newErrors) {
|
|
403194
|
-
onEndErrors.push(...newErrors);
|
|
403195
|
-
try {
|
|
403196
|
-
result.errors.push(...newErrors);
|
|
403197
|
-
} catch {
|
|
403198
|
-
}
|
|
403199
|
-
}
|
|
403200
|
-
if (newWarnings) {
|
|
403201
|
-
onEndWarnings.push(...newWarnings);
|
|
403202
|
-
try {
|
|
403203
|
-
result.warnings.push(...newWarnings);
|
|
403204
|
-
} catch {
|
|
403205
|
-
}
|
|
403206
|
-
}
|
|
403207
|
-
}
|
|
403208
|
-
done(onEndErrors, onEndWarnings);
|
|
403209
|
-
})();
|
|
403210
|
-
};
|
|
403211
|
-
}
|
|
403212
|
-
let scheduleOnDisposeCallbacks = () => {
|
|
403213
|
-
for (const cb of onDisposeCallbacks) {
|
|
403214
|
-
setTimeout(() => cb(), 0);
|
|
403215
|
-
}
|
|
403216
|
-
};
|
|
403217
|
-
isSetupDone = true;
|
|
403218
|
-
return {
|
|
403219
|
-
ok: true,
|
|
403220
|
-
requestPlugins,
|
|
403221
|
-
runOnEndCallbacks,
|
|
403222
|
-
scheduleOnDisposeCallbacks
|
|
403223
|
-
};
|
|
403224
|
-
};
|
|
403225
|
-
function createObjectStash() {
|
|
403226
|
-
const map2 = /* @__PURE__ */ new Map();
|
|
403227
|
-
let nextID = 0;
|
|
403228
|
-
return {
|
|
403229
|
-
load(id) {
|
|
403230
|
-
return map2.get(id);
|
|
403231
|
-
},
|
|
403232
|
-
store(value) {
|
|
403233
|
-
if (value === void 0)
|
|
403234
|
-
return -1;
|
|
403235
|
-
const id = nextID++;
|
|
403236
|
-
map2.set(id, value);
|
|
403237
|
-
return id;
|
|
403238
|
-
}
|
|
403239
|
-
};
|
|
403240
|
-
}
|
|
403241
|
-
function extractCallerV8(e3, streamIn, ident) {
|
|
403242
|
-
let note;
|
|
403243
|
-
let tried = false;
|
|
403244
|
-
return () => {
|
|
403245
|
-
if (tried)
|
|
403246
|
-
return note;
|
|
403247
|
-
tried = true;
|
|
403248
|
-
try {
|
|
403249
|
-
let lines = (e3.stack + "").split("\n");
|
|
403250
|
-
lines.splice(1, 1);
|
|
403251
|
-
let location = parseStackLinesV8(streamIn, lines, ident);
|
|
403252
|
-
if (location) {
|
|
403253
|
-
note = { text: e3.message, location };
|
|
403254
|
-
return note;
|
|
403255
|
-
}
|
|
403256
|
-
} catch {
|
|
403257
|
-
}
|
|
403258
|
-
};
|
|
403259
|
-
}
|
|
403260
|
-
function extractErrorMessageV8(e3, streamIn, stash, note, pluginName) {
|
|
403261
|
-
let text = "Internal error";
|
|
403262
|
-
let location = null;
|
|
403263
|
-
try {
|
|
403264
|
-
text = (e3 && e3.message || e3) + "";
|
|
403265
|
-
} catch {
|
|
403266
|
-
}
|
|
403267
|
-
try {
|
|
403268
|
-
location = parseStackLinesV8(streamIn, (e3.stack + "").split("\n"), "");
|
|
403269
|
-
} catch {
|
|
403270
|
-
}
|
|
403271
|
-
return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e3) : -1 };
|
|
403272
|
-
}
|
|
403273
|
-
function parseStackLinesV8(streamIn, lines, ident) {
|
|
403274
|
-
let at8 = " at ";
|
|
403275
|
-
if (streamIn.readFileSync && !lines[0].startsWith(at8) && lines[1].startsWith(at8)) {
|
|
403276
|
-
for (let i3 = 1; i3 < lines.length; i3++) {
|
|
403277
|
-
let line3 = lines[i3];
|
|
403278
|
-
if (!line3.startsWith(at8))
|
|
403279
|
-
continue;
|
|
403280
|
-
line3 = line3.slice(at8.length);
|
|
403281
|
-
while (true) {
|
|
403282
|
-
let match2 = /^(?:new |async )?\S+ \((.*)\)$/.exec(line3);
|
|
403283
|
-
if (match2) {
|
|
403284
|
-
line3 = match2[1];
|
|
403285
|
-
continue;
|
|
403286
|
-
}
|
|
403287
|
-
match2 = /^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(line3);
|
|
403288
|
-
if (match2) {
|
|
403289
|
-
line3 = match2[1];
|
|
403290
|
-
continue;
|
|
403291
|
-
}
|
|
403292
|
-
match2 = /^(\S+):(\d+):(\d+)$/.exec(line3);
|
|
403293
|
-
if (match2) {
|
|
403294
|
-
let contents;
|
|
403295
|
-
try {
|
|
403296
|
-
contents = streamIn.readFileSync(match2[1], "utf8");
|
|
403297
|
-
} catch {
|
|
403298
|
-
break;
|
|
403299
|
-
}
|
|
403300
|
-
let lineText = contents.split(/\r\n|\r|\n|\u2028|\u2029/)[+match2[2] - 1] || "";
|
|
403301
|
-
let column2 = +match2[3] - 1;
|
|
403302
|
-
let length = lineText.slice(column2, column2 + ident.length) === ident ? ident.length : 0;
|
|
403303
|
-
return {
|
|
403304
|
-
file: match2[1],
|
|
403305
|
-
namespace: "file",
|
|
403306
|
-
line: +match2[2],
|
|
403307
|
-
column: encodeUTF8(lineText.slice(0, column2)).length,
|
|
403308
|
-
length: encodeUTF8(lineText.slice(column2, column2 + length)).length,
|
|
403309
|
-
lineText: lineText + "\n" + lines.slice(1).join("\n"),
|
|
403310
|
-
suggestion: ""
|
|
403311
|
-
};
|
|
403312
|
-
}
|
|
403313
|
-
break;
|
|
403314
|
-
}
|
|
403315
|
-
}
|
|
403316
|
-
}
|
|
403317
|
-
return null;
|
|
403318
|
-
}
|
|
403319
|
-
function failureErrorWithLog(text, errors, warnings) {
|
|
403320
|
-
let limit = 5;
|
|
403321
|
-
text += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e3, i3) => {
|
|
403322
|
-
if (i3 === limit)
|
|
403323
|
-
return "\n...";
|
|
403324
|
-
if (!e3.location)
|
|
403325
|
-
return `
|
|
403326
|
-
error: ${e3.text}`;
|
|
403327
|
-
let { file, line: line3, column: column2 } = e3.location;
|
|
403328
|
-
let pluginText = e3.pluginName ? `[plugin: ${e3.pluginName}] ` : "";
|
|
403329
|
-
return `
|
|
403330
|
-
${file}:${line3}:${column2}: ERROR: ${pluginText}${e3.text}`;
|
|
403331
|
-
}).join("");
|
|
403332
|
-
let error = new Error(text);
|
|
403333
|
-
for (const [key2, value] of [["errors", errors], ["warnings", warnings]]) {
|
|
403334
|
-
Object.defineProperty(error, key2, {
|
|
403335
|
-
configurable: true,
|
|
403336
|
-
enumerable: true,
|
|
403337
|
-
get: () => value,
|
|
403338
|
-
set: (value2) => Object.defineProperty(error, key2, {
|
|
403339
|
-
configurable: true,
|
|
403340
|
-
enumerable: true,
|
|
403341
|
-
value: value2
|
|
403342
|
-
})
|
|
403343
|
-
});
|
|
403344
|
-
}
|
|
403345
|
-
return error;
|
|
403346
|
-
}
|
|
403347
|
-
function replaceDetailsInMessages(messages2, stash) {
|
|
403348
|
-
for (const message of messages2) {
|
|
403349
|
-
message.detail = stash.load(message.detail);
|
|
403350
|
-
}
|
|
403351
|
-
return messages2;
|
|
403352
|
-
}
|
|
403353
|
-
function sanitizeLocation(location, where, terminalWidth) {
|
|
403354
|
-
if (location == null)
|
|
403355
|
-
return null;
|
|
403356
|
-
let keys = {};
|
|
403357
|
-
let file = getFlag(location, keys, "file", mustBeString);
|
|
403358
|
-
let namespace = getFlag(location, keys, "namespace", mustBeString);
|
|
403359
|
-
let line3 = getFlag(location, keys, "line", mustBeInteger);
|
|
403360
|
-
let column2 = getFlag(location, keys, "column", mustBeInteger);
|
|
403361
|
-
let length = getFlag(location, keys, "length", mustBeInteger);
|
|
403362
|
-
let lineText = getFlag(location, keys, "lineText", mustBeString);
|
|
403363
|
-
let suggestion = getFlag(location, keys, "suggestion", mustBeString);
|
|
403364
|
-
checkForInvalidFlags(location, keys, where);
|
|
403365
|
-
if (lineText) {
|
|
403366
|
-
const relevantASCII = lineText.slice(
|
|
403367
|
-
0,
|
|
403368
|
-
(column2 && column2 > 0 ? column2 : 0) + (length && length > 0 ? length : 0) + (terminalWidth && terminalWidth > 0 ? terminalWidth : 80)
|
|
403369
|
-
);
|
|
403370
|
-
if (!/[\x7F-\uFFFF]/.test(relevantASCII) && !/\n/.test(lineText)) {
|
|
403371
|
-
lineText = relevantASCII;
|
|
403372
|
-
}
|
|
403373
|
-
}
|
|
403374
|
-
return {
|
|
403375
|
-
file: file || "",
|
|
403376
|
-
namespace: namespace || "",
|
|
403377
|
-
line: line3 || 0,
|
|
403378
|
-
column: column2 || 0,
|
|
403379
|
-
length: length || 0,
|
|
403380
|
-
lineText: lineText || "",
|
|
403381
|
-
suggestion: suggestion || ""
|
|
403382
|
-
};
|
|
403383
|
-
}
|
|
403384
|
-
function sanitizeMessages(messages2, property, stash, fallbackPluginName, terminalWidth) {
|
|
403385
|
-
let messagesClone = [];
|
|
403386
|
-
let index = 0;
|
|
403387
|
-
for (const message of messages2) {
|
|
403388
|
-
let keys = {};
|
|
403389
|
-
let id = getFlag(message, keys, "id", mustBeString);
|
|
403390
|
-
let pluginName = getFlag(message, keys, "pluginName", mustBeString);
|
|
403391
|
-
let text = getFlag(message, keys, "text", mustBeString);
|
|
403392
|
-
let location = getFlag(message, keys, "location", mustBeObjectOrNull);
|
|
403393
|
-
let notes = getFlag(message, keys, "notes", mustBeArray);
|
|
403394
|
-
let detail = getFlag(message, keys, "detail", canBeAnything);
|
|
403395
|
-
let where = `in element ${index} of "${property}"`;
|
|
403396
|
-
checkForInvalidFlags(message, keys, where);
|
|
403397
|
-
let notesClone = [];
|
|
403398
|
-
if (notes) {
|
|
403399
|
-
for (const note of notes) {
|
|
403400
|
-
let noteKeys = {};
|
|
403401
|
-
let noteText = getFlag(note, noteKeys, "text", mustBeString);
|
|
403402
|
-
let noteLocation = getFlag(note, noteKeys, "location", mustBeObjectOrNull);
|
|
403403
|
-
checkForInvalidFlags(note, noteKeys, where);
|
|
403404
|
-
notesClone.push({
|
|
403405
|
-
text: noteText || "",
|
|
403406
|
-
location: sanitizeLocation(noteLocation, where, terminalWidth)
|
|
403407
|
-
});
|
|
403408
|
-
}
|
|
403409
|
-
}
|
|
403410
|
-
messagesClone.push({
|
|
403411
|
-
id: id || "",
|
|
403412
|
-
pluginName: pluginName || fallbackPluginName,
|
|
403413
|
-
text: text || "",
|
|
403414
|
-
location: sanitizeLocation(location, where, terminalWidth),
|
|
403415
|
-
notes: notesClone,
|
|
403416
|
-
detail: stash ? stash.store(detail) : -1
|
|
403417
|
-
});
|
|
403418
|
-
index++;
|
|
403419
|
-
}
|
|
403420
|
-
return messagesClone;
|
|
403421
|
-
}
|
|
403422
|
-
function sanitizeStringArray(values, property) {
|
|
403423
|
-
const result = [];
|
|
403424
|
-
for (const value of values) {
|
|
403425
|
-
if (typeof value !== "string")
|
|
403426
|
-
throw new Error(`${quote2(property)} must be an array of strings`);
|
|
403427
|
-
result.push(value);
|
|
403428
|
-
}
|
|
403429
|
-
return result;
|
|
403430
|
-
}
|
|
403431
|
-
function convertOutputFiles({ path: path32, contents, hash }) {
|
|
403432
|
-
let text = null;
|
|
403433
|
-
return {
|
|
403434
|
-
path: path32,
|
|
403435
|
-
contents,
|
|
403436
|
-
hash,
|
|
403437
|
-
get text() {
|
|
403438
|
-
const binary2 = this.contents;
|
|
403439
|
-
if (text === null || binary2 !== contents) {
|
|
403440
|
-
contents = binary2;
|
|
403441
|
-
text = decodeUTF8(binary2);
|
|
403442
|
-
}
|
|
403443
|
-
return text;
|
|
403444
|
-
}
|
|
403445
|
-
};
|
|
403446
|
-
}
|
|
403447
|
-
var fs7 = require("fs");
|
|
403448
|
-
var os6 = require("os");
|
|
403449
|
-
var path14 = require("path");
|
|
403450
|
-
var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
|
|
403451
|
-
var isValidBinaryPath = (x5) => !!x5 && x5 !== "/usr/bin/esbuild";
|
|
403452
|
-
var packageDarwin_arm64 = "@esbuild/darwin-arm64";
|
|
403453
|
-
var packageDarwin_x64 = "@esbuild/darwin-x64";
|
|
403454
|
-
var knownWindowsPackages = {
|
|
403455
|
-
"win32 arm64 LE": "@esbuild/win32-arm64",
|
|
403456
|
-
"win32 ia32 LE": "@esbuild/win32-ia32",
|
|
403457
|
-
"win32 x64 LE": "@esbuild/win32-x64"
|
|
403458
|
-
};
|
|
403459
|
-
var knownUnixlikePackages = {
|
|
403460
|
-
"aix ppc64 BE": "@esbuild/aix-ppc64",
|
|
403461
|
-
"android arm64 LE": "@esbuild/android-arm64",
|
|
403462
|
-
"darwin arm64 LE": "@esbuild/darwin-arm64",
|
|
403463
|
-
"darwin x64 LE": "@esbuild/darwin-x64",
|
|
403464
|
-
"freebsd arm64 LE": "@esbuild/freebsd-arm64",
|
|
403465
|
-
"freebsd x64 LE": "@esbuild/freebsd-x64",
|
|
403466
|
-
"linux arm LE": "@esbuild/linux-arm",
|
|
403467
|
-
"linux arm64 LE": "@esbuild/linux-arm64",
|
|
403468
|
-
"linux ia32 LE": "@esbuild/linux-ia32",
|
|
403469
|
-
"linux mips64el LE": "@esbuild/linux-mips64el",
|
|
403470
|
-
"linux ppc64 LE": "@esbuild/linux-ppc64",
|
|
403471
|
-
"linux riscv64 LE": "@esbuild/linux-riscv64",
|
|
403472
|
-
"linux s390x BE": "@esbuild/linux-s390x",
|
|
403473
|
-
"linux x64 LE": "@esbuild/linux-x64",
|
|
403474
|
-
"linux loong64 LE": "@esbuild/linux-loong64",
|
|
403475
|
-
"netbsd x64 LE": "@esbuild/netbsd-x64",
|
|
403476
|
-
"openbsd x64 LE": "@esbuild/openbsd-x64",
|
|
403477
|
-
"sunos x64 LE": "@esbuild/sunos-x64"
|
|
403478
|
-
};
|
|
403479
|
-
var knownWebAssemblyFallbackPackages = {
|
|
403480
|
-
"android arm LE": "@esbuild/android-arm",
|
|
403481
|
-
"android x64 LE": "@esbuild/android-x64"
|
|
403482
|
-
};
|
|
403483
|
-
function pkgAndSubpathForCurrentPlatform() {
|
|
403484
|
-
let pkg;
|
|
403485
|
-
let subpath;
|
|
403486
|
-
let isWASM = false;
|
|
403487
|
-
let platformKey = `${process.platform} ${os6.arch()} ${os6.endianness()}`;
|
|
403488
|
-
if (platformKey in knownWindowsPackages) {
|
|
403489
|
-
pkg = knownWindowsPackages[platformKey];
|
|
403490
|
-
subpath = "esbuild.exe";
|
|
403491
|
-
} else if (platformKey in knownUnixlikePackages) {
|
|
403492
|
-
pkg = knownUnixlikePackages[platformKey];
|
|
403493
|
-
subpath = "bin/esbuild";
|
|
403494
|
-
} else if (platformKey in knownWebAssemblyFallbackPackages) {
|
|
403495
|
-
pkg = knownWebAssemblyFallbackPackages[platformKey];
|
|
403496
|
-
subpath = "bin/esbuild";
|
|
403497
|
-
isWASM = true;
|
|
403498
|
-
} else {
|
|
403499
|
-
throw new Error(`Unsupported platform: ${platformKey}`);
|
|
403500
|
-
}
|
|
403501
|
-
return { pkg, subpath, isWASM };
|
|
403502
|
-
}
|
|
403503
|
-
function pkgForSomeOtherPlatform() {
|
|
403504
|
-
const libMainJS = require.resolve("esbuild");
|
|
403505
|
-
const nodeModulesDirectory = path14.dirname(path14.dirname(path14.dirname(libMainJS)));
|
|
403506
|
-
if (path14.basename(nodeModulesDirectory) === "node_modules") {
|
|
403507
|
-
for (const unixKey in knownUnixlikePackages) {
|
|
403508
|
-
try {
|
|
403509
|
-
const pkg = knownUnixlikePackages[unixKey];
|
|
403510
|
-
if (fs7.existsSync(path14.join(nodeModulesDirectory, pkg)))
|
|
403511
|
-
return pkg;
|
|
403512
|
-
} catch {
|
|
403513
|
-
}
|
|
403514
|
-
}
|
|
403515
|
-
for (const windowsKey in knownWindowsPackages) {
|
|
403516
|
-
try {
|
|
403517
|
-
const pkg = knownWindowsPackages[windowsKey];
|
|
403518
|
-
if (fs7.existsSync(path14.join(nodeModulesDirectory, pkg)))
|
|
403519
|
-
return pkg;
|
|
403520
|
-
} catch {
|
|
403521
|
-
}
|
|
403522
|
-
}
|
|
403523
|
-
}
|
|
403524
|
-
return null;
|
|
403525
|
-
}
|
|
403526
|
-
function downloadedBinPath(pkg, subpath) {
|
|
403527
|
-
const esbuildLibDir = path14.dirname(require.resolve("esbuild"));
|
|
403528
|
-
return path14.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path14.basename(subpath)}`);
|
|
403529
|
-
}
|
|
403530
|
-
function generateBinPath() {
|
|
403531
|
-
if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
|
|
403532
|
-
if (!fs7.existsSync(ESBUILD_BINARY_PATH)) {
|
|
403533
|
-
console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
|
|
403534
|
-
} else {
|
|
403535
|
-
return { binPath: ESBUILD_BINARY_PATH, isWASM: false };
|
|
403536
|
-
}
|
|
403537
|
-
}
|
|
403538
|
-
const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform();
|
|
403539
|
-
let binPath;
|
|
403540
|
-
try {
|
|
403541
|
-
binPath = require.resolve(`${pkg}/${subpath}`);
|
|
403542
|
-
} catch (e3) {
|
|
403543
|
-
binPath = downloadedBinPath(pkg, subpath);
|
|
403544
|
-
if (!fs7.existsSync(binPath)) {
|
|
403545
|
-
try {
|
|
403546
|
-
require.resolve(pkg);
|
|
403547
|
-
} catch {
|
|
403548
|
-
const otherPkg = pkgForSomeOtherPlatform();
|
|
403549
|
-
if (otherPkg) {
|
|
403550
|
-
let suggestions = `
|
|
403551
|
-
Specifically the "${otherPkg}" package is present but this platform
|
|
403552
|
-
needs the "${pkg}" package instead. People often get into this
|
|
403553
|
-
situation by installing esbuild on Windows or macOS and copying "node_modules"
|
|
403554
|
-
into a Docker image that runs Linux, or by copying "node_modules" between
|
|
403555
|
-
Windows and WSL environments.
|
|
403556
|
-
|
|
403557
|
-
If you are installing with npm, you can try not copying the "node_modules"
|
|
403558
|
-
directory when you copy the files over, and running "npm ci" or "npm install"
|
|
403559
|
-
on the destination platform after the copy. Or you could consider using yarn
|
|
403560
|
-
instead of npm which has built-in support for installing a package on multiple
|
|
403561
|
-
platforms simultaneously.
|
|
403562
|
-
|
|
403563
|
-
If you are installing with yarn, you can try listing both this platform and the
|
|
403564
|
-
other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
|
|
403565
|
-
feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
|
|
403566
|
-
Keep in mind that this means multiple copies of esbuild will be present.
|
|
403567
|
-
`;
|
|
403568
|
-
if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) {
|
|
403569
|
-
suggestions = `
|
|
403570
|
-
Specifically the "${otherPkg}" package is present but this platform
|
|
403571
|
-
needs the "${pkg}" package instead. People often get into this
|
|
403572
|
-
situation by installing esbuild with npm running inside of Rosetta 2 and then
|
|
403573
|
-
trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
|
|
403574
|
-
2 is Apple's on-the-fly x86_64-to-arm64 translation service).
|
|
403575
|
-
|
|
403576
|
-
If you are installing with npm, you can try ensuring that both npm and node are
|
|
403577
|
-
not running under Rosetta 2 and then reinstalling esbuild. This likely involves
|
|
403578
|
-
changing how you installed npm and/or node. For example, installing node with
|
|
403579
|
-
the universal installer here should work: https://nodejs.org/en/download/. Or
|
|
403580
|
-
you could consider using yarn instead of npm which has built-in support for
|
|
403581
|
-
installing a package on multiple platforms simultaneously.
|
|
403582
|
-
|
|
403583
|
-
If you are installing with yarn, you can try listing both "arm64" and "x64"
|
|
403584
|
-
in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
|
|
403585
|
-
https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
|
|
403586
|
-
Keep in mind that this means multiple copies of esbuild will be present.
|
|
403587
|
-
`;
|
|
403588
|
-
}
|
|
403589
|
-
throw new Error(`
|
|
403590
|
-
You installed esbuild for another platform than the one you're currently using.
|
|
403591
|
-
This won't work because esbuild is written with native code and needs to
|
|
403592
|
-
install a platform-specific binary executable.
|
|
403593
|
-
${suggestions}
|
|
403594
|
-
Another alternative is to use the "esbuild-wasm" package instead, which works
|
|
403595
|
-
the same way on all platforms. But it comes with a heavy performance cost and
|
|
403596
|
-
can sometimes be 10x slower than the "esbuild" package, so you may also not
|
|
403597
|
-
want to do that.
|
|
403598
|
-
`);
|
|
403599
|
-
}
|
|
403600
|
-
throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild.
|
|
403601
|
-
|
|
403602
|
-
If you are installing esbuild with npm, make sure that you don't specify the
|
|
403603
|
-
"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature
|
|
403604
|
-
of "package.json" is used by esbuild to install the correct binary executable
|
|
403605
|
-
for your current platform.`);
|
|
403606
|
-
}
|
|
403607
|
-
throw e3;
|
|
403608
|
-
}
|
|
403609
|
-
}
|
|
403610
|
-
if (/\.zip\//.test(binPath)) {
|
|
403611
|
-
let pnpapi;
|
|
403612
|
-
try {
|
|
403613
|
-
pnpapi = require("pnpapi");
|
|
403614
|
-
} catch (e3) {
|
|
403615
|
-
}
|
|
403616
|
-
if (pnpapi) {
|
|
403617
|
-
const root2 = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
|
|
403618
|
-
const binTargetPath = path14.join(
|
|
403619
|
-
root2,
|
|
403620
|
-
"node_modules",
|
|
403621
|
-
".cache",
|
|
403622
|
-
"esbuild",
|
|
403623
|
-
`pnpapi-${pkg.replace("/", "-")}-${"0.19.12"}-${path14.basename(subpath)}`
|
|
403624
|
-
);
|
|
403625
|
-
if (!fs7.existsSync(binTargetPath)) {
|
|
403626
|
-
fs7.mkdirSync(path14.dirname(binTargetPath), { recursive: true });
|
|
403627
|
-
fs7.copyFileSync(binPath, binTargetPath);
|
|
403628
|
-
fs7.chmodSync(binTargetPath, 493);
|
|
403629
|
-
}
|
|
403630
|
-
return { binPath: binTargetPath, isWASM };
|
|
403631
|
-
}
|
|
403632
|
-
}
|
|
403633
|
-
return { binPath, isWASM };
|
|
403634
|
-
}
|
|
403635
|
-
var child_process = require("child_process");
|
|
403636
|
-
var crypto = require("crypto");
|
|
403637
|
-
var path22 = require("path");
|
|
403638
|
-
var fs23 = require("fs");
|
|
403639
|
-
var os22 = require("os");
|
|
403640
|
-
var tty2 = require("tty");
|
|
403641
|
-
var worker_threads;
|
|
403642
|
-
if (process.env.ESBUILD_WORKER_THREADS !== "0") {
|
|
403643
|
-
try {
|
|
403644
|
-
worker_threads = require("worker_threads");
|
|
403645
|
-
} catch {
|
|
403646
|
-
}
|
|
403647
|
-
let [major, minor] = process.versions.node.split(".");
|
|
403648
|
-
if (
|
|
403649
|
-
// <v12.17.0 does not work
|
|
403650
|
-
+major < 12 || +major === 12 && +minor < 17 || +major === 13 && +minor < 13
|
|
403651
|
-
) {
|
|
403652
|
-
worker_threads = void 0;
|
|
403653
|
-
}
|
|
403654
|
-
}
|
|
403655
|
-
var _a3;
|
|
403656
|
-
var isInternalWorkerThread = ((_a3 = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a3.esbuildVersion) === "0.19.12";
|
|
403657
|
-
var esbuildCommandAndArgs = () => {
|
|
403658
|
-
if ((!ESBUILD_BINARY_PATH || false) && (path22.basename(__filename) !== "main.js" || path22.basename(__dirname) !== "lib")) {
|
|
403659
|
-
throw new Error(
|
|
403660
|
-
`The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle.
|
|
403661
|
-
|
|
403662
|
-
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.`
|
|
403663
|
-
);
|
|
403664
|
-
}
|
|
403665
|
-
if (false) {
|
|
403666
|
-
return ["node", [path22.join(__dirname, "..", "bin", "esbuild")]];
|
|
403667
|
-
} else {
|
|
403668
|
-
const { binPath, isWASM } = generateBinPath();
|
|
403669
|
-
if (isWASM) {
|
|
403670
|
-
return ["node", [binPath]];
|
|
403671
|
-
} else {
|
|
403672
|
-
return [binPath, []];
|
|
403673
|
-
}
|
|
403674
|
-
}
|
|
403675
|
-
};
|
|
403676
|
-
var isTTY = () => tty2.isatty(2);
|
|
403677
|
-
var fsSync = {
|
|
403678
|
-
readFile(tempFile, callback) {
|
|
403679
|
-
try {
|
|
403680
|
-
let contents = fs23.readFileSync(tempFile, "utf8");
|
|
403681
|
-
try {
|
|
403682
|
-
fs23.unlinkSync(tempFile);
|
|
403683
|
-
} catch {
|
|
403684
|
-
}
|
|
403685
|
-
callback(null, contents);
|
|
403686
|
-
} catch (err) {
|
|
403687
|
-
callback(err, null);
|
|
403688
|
-
}
|
|
403689
|
-
},
|
|
403690
|
-
writeFile(contents, callback) {
|
|
403691
|
-
try {
|
|
403692
|
-
let tempFile = randomFileName();
|
|
403693
|
-
fs23.writeFileSync(tempFile, contents);
|
|
403694
|
-
callback(tempFile);
|
|
403695
|
-
} catch {
|
|
403696
|
-
callback(null);
|
|
403697
|
-
}
|
|
403698
|
-
}
|
|
403699
|
-
};
|
|
403700
|
-
var fsAsync = {
|
|
403701
|
-
readFile(tempFile, callback) {
|
|
403702
|
-
try {
|
|
403703
|
-
fs23.readFile(tempFile, "utf8", (err, contents) => {
|
|
403704
|
-
try {
|
|
403705
|
-
fs23.unlink(tempFile, () => callback(err, contents));
|
|
403706
|
-
} catch {
|
|
403707
|
-
callback(err, contents);
|
|
403708
|
-
}
|
|
403709
|
-
});
|
|
403710
|
-
} catch (err) {
|
|
403711
|
-
callback(err, null);
|
|
403712
|
-
}
|
|
403713
|
-
},
|
|
403714
|
-
writeFile(contents, callback) {
|
|
403715
|
-
try {
|
|
403716
|
-
let tempFile = randomFileName();
|
|
403717
|
-
fs23.writeFile(tempFile, contents, (err) => err !== null ? callback(null) : callback(tempFile));
|
|
403718
|
-
} catch {
|
|
403719
|
-
callback(null);
|
|
403720
|
-
}
|
|
403721
|
-
}
|
|
403722
|
-
};
|
|
403723
|
-
var version = "0.19.12";
|
|
403724
|
-
var build2 = (options8) => ensureServiceIsRunning().build(options8);
|
|
403725
|
-
var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
|
|
403726
|
-
var transform2 = (input, options8) => ensureServiceIsRunning().transform(input, options8);
|
|
403727
|
-
var formatMessages = (messages2, options8) => ensureServiceIsRunning().formatMessages(messages2, options8);
|
|
403728
|
-
var analyzeMetafile = (messages2, options8) => ensureServiceIsRunning().analyzeMetafile(messages2, options8);
|
|
403729
|
-
var buildSync = (options8) => {
|
|
403730
|
-
if (worker_threads && !isInternalWorkerThread) {
|
|
403731
|
-
if (!workerThreadService)
|
|
403732
|
-
workerThreadService = startWorkerThreadService(worker_threads);
|
|
403733
|
-
return workerThreadService.buildSync(options8);
|
|
403734
|
-
}
|
|
403735
|
-
let result;
|
|
403736
|
-
runServiceSync((service) => service.buildOrContext({
|
|
403737
|
-
callName: "buildSync",
|
|
403738
|
-
refs: null,
|
|
403739
|
-
options: options8,
|
|
403740
|
-
isTTY: isTTY(),
|
|
403741
|
-
defaultWD,
|
|
403742
|
-
callback: (err, res) => {
|
|
403743
|
-
if (err)
|
|
403744
|
-
throw err;
|
|
403745
|
-
result = res;
|
|
403746
|
-
}
|
|
403747
|
-
}));
|
|
403748
|
-
return result;
|
|
403749
|
-
};
|
|
403750
|
-
var transformSync = (input, options8) => {
|
|
403751
|
-
if (worker_threads && !isInternalWorkerThread) {
|
|
403752
|
-
if (!workerThreadService)
|
|
403753
|
-
workerThreadService = startWorkerThreadService(worker_threads);
|
|
403754
|
-
return workerThreadService.transformSync(input, options8);
|
|
403755
|
-
}
|
|
403756
|
-
let result;
|
|
403757
|
-
runServiceSync((service) => service.transform({
|
|
403758
|
-
callName: "transformSync",
|
|
403759
|
-
refs: null,
|
|
403760
|
-
input,
|
|
403761
|
-
options: options8 || {},
|
|
403762
|
-
isTTY: isTTY(),
|
|
403763
|
-
fs: fsSync,
|
|
403764
|
-
callback: (err, res) => {
|
|
403765
|
-
if (err)
|
|
403766
|
-
throw err;
|
|
403767
|
-
result = res;
|
|
403768
|
-
}
|
|
403769
|
-
}));
|
|
403770
|
-
return result;
|
|
403771
|
-
};
|
|
403772
|
-
var formatMessagesSync = (messages2, options8) => {
|
|
403773
|
-
if (worker_threads && !isInternalWorkerThread) {
|
|
403774
|
-
if (!workerThreadService)
|
|
403775
|
-
workerThreadService = startWorkerThreadService(worker_threads);
|
|
403776
|
-
return workerThreadService.formatMessagesSync(messages2, options8);
|
|
403777
|
-
}
|
|
403778
|
-
let result;
|
|
403779
|
-
runServiceSync((service) => service.formatMessages({
|
|
403780
|
-
callName: "formatMessagesSync",
|
|
403781
|
-
refs: null,
|
|
403782
|
-
messages: messages2,
|
|
403783
|
-
options: options8,
|
|
403784
|
-
callback: (err, res) => {
|
|
403785
|
-
if (err)
|
|
403786
|
-
throw err;
|
|
403787
|
-
result = res;
|
|
403788
|
-
}
|
|
403789
|
-
}));
|
|
403790
|
-
return result;
|
|
403791
|
-
};
|
|
403792
|
-
var analyzeMetafileSync = (metafile, options8) => {
|
|
403793
|
-
if (worker_threads && !isInternalWorkerThread) {
|
|
403794
|
-
if (!workerThreadService)
|
|
403795
|
-
workerThreadService = startWorkerThreadService(worker_threads);
|
|
403796
|
-
return workerThreadService.analyzeMetafileSync(metafile, options8);
|
|
403797
|
-
}
|
|
403798
|
-
let result;
|
|
403799
|
-
runServiceSync((service) => service.analyzeMetafile({
|
|
403800
|
-
callName: "analyzeMetafileSync",
|
|
403801
|
-
refs: null,
|
|
403802
|
-
metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile),
|
|
403803
|
-
options: options8,
|
|
403804
|
-
callback: (err, res) => {
|
|
403805
|
-
if (err)
|
|
403806
|
-
throw err;
|
|
403807
|
-
result = res;
|
|
403808
|
-
}
|
|
403809
|
-
}));
|
|
403810
|
-
return result;
|
|
403811
|
-
};
|
|
403812
|
-
var stop = () => {
|
|
403813
|
-
if (stopService)
|
|
403814
|
-
stopService();
|
|
403815
|
-
if (workerThreadService)
|
|
403816
|
-
workerThreadService.stop();
|
|
403817
|
-
};
|
|
403818
|
-
var initializeWasCalled = false;
|
|
403819
|
-
var initialize = (options8) => {
|
|
403820
|
-
options8 = validateInitializeOptions(options8 || {});
|
|
403821
|
-
if (options8.wasmURL)
|
|
403822
|
-
throw new Error(`The "wasmURL" option only works in the browser`);
|
|
403823
|
-
if (options8.wasmModule)
|
|
403824
|
-
throw new Error(`The "wasmModule" option only works in the browser`);
|
|
403825
|
-
if (options8.worker)
|
|
403826
|
-
throw new Error(`The "worker" option only works in the browser`);
|
|
403827
|
-
if (initializeWasCalled)
|
|
403828
|
-
throw new Error('Cannot call "initialize" more than once');
|
|
403829
|
-
ensureServiceIsRunning();
|
|
403830
|
-
initializeWasCalled = true;
|
|
403831
|
-
return Promise.resolve();
|
|
403832
|
-
};
|
|
403833
|
-
var defaultWD = process.cwd();
|
|
403834
|
-
var longLivedService;
|
|
403835
|
-
var stopService;
|
|
403836
|
-
var ensureServiceIsRunning = () => {
|
|
403837
|
-
if (longLivedService)
|
|
403838
|
-
return longLivedService;
|
|
403839
|
-
let [command, args] = esbuildCommandAndArgs();
|
|
403840
|
-
let child = child_process.spawn(command, args.concat(`--service=${"0.19.12"}`, "--ping"), {
|
|
403841
|
-
windowsHide: true,
|
|
403842
|
-
stdio: ["pipe", "pipe", "inherit"],
|
|
403843
|
-
cwd: defaultWD
|
|
403844
|
-
});
|
|
403845
|
-
let { readFromStdout, afterClose, service } = createChannel({
|
|
403846
|
-
writeToStdin(bytes) {
|
|
403847
|
-
child.stdin.write(bytes, (err) => {
|
|
403848
|
-
if (err)
|
|
403849
|
-
afterClose(err);
|
|
403850
|
-
});
|
|
403851
|
-
},
|
|
403852
|
-
readFileSync: fs23.readFileSync,
|
|
403853
|
-
isSync: false,
|
|
403854
|
-
hasFS: true,
|
|
403855
|
-
esbuild: node_exports
|
|
403856
|
-
});
|
|
403857
|
-
child.stdin.on("error", afterClose);
|
|
403858
|
-
child.on("error", afterClose);
|
|
403859
|
-
const stdin2 = child.stdin;
|
|
403860
|
-
const stdout = child.stdout;
|
|
403861
|
-
stdout.on("data", readFromStdout);
|
|
403862
|
-
stdout.on("end", afterClose);
|
|
403863
|
-
stopService = () => {
|
|
403864
|
-
stdin2.destroy();
|
|
403865
|
-
stdout.destroy();
|
|
403866
|
-
child.kill();
|
|
403867
|
-
initializeWasCalled = false;
|
|
403868
|
-
longLivedService = void 0;
|
|
403869
|
-
stopService = void 0;
|
|
403870
|
-
};
|
|
403871
|
-
let refCount = 0;
|
|
403872
|
-
child.unref();
|
|
403873
|
-
if (stdin2.unref) {
|
|
403874
|
-
stdin2.unref();
|
|
403875
|
-
}
|
|
403876
|
-
if (stdout.unref) {
|
|
403877
|
-
stdout.unref();
|
|
403878
|
-
}
|
|
403879
|
-
const refs = {
|
|
403880
|
-
ref() {
|
|
403881
|
-
if (++refCount === 1)
|
|
403882
|
-
child.ref();
|
|
403883
|
-
},
|
|
403884
|
-
unref() {
|
|
403885
|
-
if (--refCount === 0)
|
|
403886
|
-
child.unref();
|
|
403887
|
-
}
|
|
403888
|
-
};
|
|
403889
|
-
longLivedService = {
|
|
403890
|
-
build: (options8) => new Promise((resolve3, reject) => {
|
|
403891
|
-
service.buildOrContext({
|
|
403892
|
-
callName: "build",
|
|
403893
|
-
refs,
|
|
403894
|
-
options: options8,
|
|
403895
|
-
isTTY: isTTY(),
|
|
403896
|
-
defaultWD,
|
|
403897
|
-
callback: (err, res) => err ? reject(err) : resolve3(res)
|
|
403898
|
-
});
|
|
403899
|
-
}),
|
|
403900
|
-
context: (options8) => new Promise((resolve3, reject) => service.buildOrContext({
|
|
403901
|
-
callName: "context",
|
|
403902
|
-
refs,
|
|
403903
|
-
options: options8,
|
|
403904
|
-
isTTY: isTTY(),
|
|
403905
|
-
defaultWD,
|
|
403906
|
-
callback: (err, res) => err ? reject(err) : resolve3(res)
|
|
403907
|
-
})),
|
|
403908
|
-
transform: (input, options8) => new Promise((resolve3, reject) => service.transform({
|
|
403909
|
-
callName: "transform",
|
|
403910
|
-
refs,
|
|
403911
|
-
input,
|
|
403912
|
-
options: options8 || {},
|
|
403913
|
-
isTTY: isTTY(),
|
|
403914
|
-
fs: fsAsync,
|
|
403915
|
-
callback: (err, res) => err ? reject(err) : resolve3(res)
|
|
403916
|
-
})),
|
|
403917
|
-
formatMessages: (messages2, options8) => new Promise((resolve3, reject) => service.formatMessages({
|
|
403918
|
-
callName: "formatMessages",
|
|
403919
|
-
refs,
|
|
403920
|
-
messages: messages2,
|
|
403921
|
-
options: options8,
|
|
403922
|
-
callback: (err, res) => err ? reject(err) : resolve3(res)
|
|
403923
|
-
})),
|
|
403924
|
-
analyzeMetafile: (metafile, options8) => new Promise((resolve3, reject) => service.analyzeMetafile({
|
|
403925
|
-
callName: "analyzeMetafile",
|
|
403926
|
-
refs,
|
|
403927
|
-
metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile),
|
|
403928
|
-
options: options8,
|
|
403929
|
-
callback: (err, res) => err ? reject(err) : resolve3(res)
|
|
403930
|
-
}))
|
|
403931
|
-
};
|
|
403932
|
-
return longLivedService;
|
|
403933
|
-
};
|
|
403934
|
-
var runServiceSync = (callback) => {
|
|
403935
|
-
let [command, args] = esbuildCommandAndArgs();
|
|
403936
|
-
let stdin2 = new Uint8Array();
|
|
403937
|
-
let { readFromStdout, afterClose, service } = createChannel({
|
|
403938
|
-
writeToStdin(bytes) {
|
|
403939
|
-
if (stdin2.length !== 0)
|
|
403940
|
-
throw new Error("Must run at most one command");
|
|
403941
|
-
stdin2 = bytes;
|
|
403942
|
-
},
|
|
403943
|
-
isSync: true,
|
|
403944
|
-
hasFS: true,
|
|
403945
|
-
esbuild: node_exports
|
|
403946
|
-
});
|
|
403947
|
-
callback(service);
|
|
403948
|
-
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.19.12"}`), {
|
|
403949
|
-
cwd: defaultWD,
|
|
403950
|
-
windowsHide: true,
|
|
403951
|
-
input: stdin2,
|
|
403952
|
-
// We don't know how large the output could be. If it's too large, the
|
|
403953
|
-
// command will fail with ENOBUFS. Reserve 16mb for now since that feels
|
|
403954
|
-
// like it should be enough. Also allow overriding this with an environment
|
|
403955
|
-
// variable.
|
|
403956
|
-
maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024
|
|
403957
|
-
});
|
|
403958
|
-
readFromStdout(stdout);
|
|
403959
|
-
afterClose(null);
|
|
403960
|
-
};
|
|
403961
|
-
var randomFileName = () => {
|
|
403962
|
-
return path22.join(os22.tmpdir(), `esbuild-${crypto.randomBytes(32).toString("hex")}`);
|
|
403963
|
-
};
|
|
403964
|
-
var workerThreadService = null;
|
|
403965
|
-
var startWorkerThreadService = (worker_threads2) => {
|
|
403966
|
-
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
|
|
403967
|
-
let worker = new worker_threads2.Worker(__filename, {
|
|
403968
|
-
workerData: { workerPort, defaultWD, esbuildVersion: "0.19.12" },
|
|
403969
|
-
transferList: [workerPort],
|
|
403970
|
-
// From node's documentation: https://nodejs.org/api/worker_threads.html
|
|
403971
|
-
//
|
|
403972
|
-
// Take care when launching worker threads from preload scripts (scripts loaded
|
|
403973
|
-
// and run using the `-r` command line flag). Unless the `execArgv` option is
|
|
403974
|
-
// explicitly set, new Worker threads automatically inherit the command line flags
|
|
403975
|
-
// from the running process and will preload the same preload scripts as the main
|
|
403976
|
-
// thread. If the preload script unconditionally launches a worker thread, every
|
|
403977
|
-
// thread spawned will spawn another until the application crashes.
|
|
403978
|
-
//
|
|
403979
|
-
execArgv: []
|
|
403980
|
-
});
|
|
403981
|
-
let nextID = 0;
|
|
403982
|
-
let fakeBuildError = (text) => {
|
|
403983
|
-
let error = new Error(`Build failed with 1 error:
|
|
403984
|
-
error: ${text}`);
|
|
403985
|
-
let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }];
|
|
403986
|
-
error.errors = errors;
|
|
403987
|
-
error.warnings = [];
|
|
403988
|
-
return error;
|
|
403989
|
-
};
|
|
403990
|
-
let validateBuildSyncOptions = (options8) => {
|
|
403991
|
-
if (!options8)
|
|
403992
|
-
return;
|
|
403993
|
-
let plugins = options8.plugins;
|
|
403994
|
-
if (plugins && plugins.length > 0)
|
|
403995
|
-
throw fakeBuildError(`Cannot use plugins in synchronous API calls`);
|
|
403996
|
-
};
|
|
403997
|
-
let applyProperties = (object, properties) => {
|
|
403998
|
-
for (let key2 in properties) {
|
|
403999
|
-
object[key2] = properties[key2];
|
|
404000
|
-
}
|
|
404001
|
-
};
|
|
404002
|
-
let runCallSync = (command, args) => {
|
|
404003
|
-
let id = nextID++;
|
|
404004
|
-
let sharedBuffer = new SharedArrayBuffer(8);
|
|
404005
|
-
let sharedBufferView = new Int32Array(sharedBuffer);
|
|
404006
|
-
let msg = { sharedBuffer, id, command, args };
|
|
404007
|
-
worker.postMessage(msg);
|
|
404008
|
-
let status = Atomics.wait(sharedBufferView, 0, 0);
|
|
404009
|
-
if (status !== "ok" && status !== "not-equal")
|
|
404010
|
-
throw new Error("Internal error: Atomics.wait() failed: " + status);
|
|
404011
|
-
let { message: { id: id2, resolve: resolve3, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort);
|
|
404012
|
-
if (id !== id2)
|
|
404013
|
-
throw new Error(`Internal error: Expected id ${id} but got id ${id2}`);
|
|
404014
|
-
if (reject) {
|
|
404015
|
-
applyProperties(reject, properties);
|
|
404016
|
-
throw reject;
|
|
404017
|
-
}
|
|
404018
|
-
return resolve3;
|
|
404019
|
-
};
|
|
404020
|
-
worker.unref();
|
|
404021
|
-
return {
|
|
404022
|
-
buildSync(options8) {
|
|
404023
|
-
validateBuildSyncOptions(options8);
|
|
404024
|
-
return runCallSync("build", [options8]);
|
|
404025
|
-
},
|
|
404026
|
-
transformSync(input, options8) {
|
|
404027
|
-
return runCallSync("transform", [input, options8]);
|
|
404028
|
-
},
|
|
404029
|
-
formatMessagesSync(messages2, options8) {
|
|
404030
|
-
return runCallSync("formatMessages", [messages2, options8]);
|
|
404031
|
-
},
|
|
404032
|
-
analyzeMetafileSync(metafile, options8) {
|
|
404033
|
-
return runCallSync("analyzeMetafile", [metafile, options8]);
|
|
404034
|
-
},
|
|
404035
|
-
stop() {
|
|
404036
|
-
worker.terminate();
|
|
404037
|
-
workerThreadService = null;
|
|
404038
|
-
}
|
|
404039
|
-
};
|
|
404040
|
-
};
|
|
404041
|
-
var startSyncServiceWorker = () => {
|
|
404042
|
-
let workerPort = worker_threads.workerData.workerPort;
|
|
404043
|
-
let parentPort = worker_threads.parentPort;
|
|
404044
|
-
let extractProperties = (object) => {
|
|
404045
|
-
let properties = {};
|
|
404046
|
-
if (object && typeof object === "object") {
|
|
404047
|
-
for (let key2 in object) {
|
|
404048
|
-
properties[key2] = object[key2];
|
|
404049
|
-
}
|
|
404050
|
-
}
|
|
404051
|
-
return properties;
|
|
404052
|
-
};
|
|
404053
|
-
try {
|
|
404054
|
-
let service = ensureServiceIsRunning();
|
|
404055
|
-
defaultWD = worker_threads.workerData.defaultWD;
|
|
404056
|
-
parentPort.on("message", (msg) => {
|
|
404057
|
-
(async () => {
|
|
404058
|
-
let { sharedBuffer, id, command, args } = msg;
|
|
404059
|
-
let sharedBufferView = new Int32Array(sharedBuffer);
|
|
404060
|
-
try {
|
|
404061
|
-
switch (command) {
|
|
404062
|
-
case "build":
|
|
404063
|
-
workerPort.postMessage({ id, resolve: await service.build(args[0]) });
|
|
404064
|
-
break;
|
|
404065
|
-
case "transform":
|
|
404066
|
-
workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) });
|
|
404067
|
-
break;
|
|
404068
|
-
case "formatMessages":
|
|
404069
|
-
workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) });
|
|
404070
|
-
break;
|
|
404071
|
-
case "analyzeMetafile":
|
|
404072
|
-
workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) });
|
|
404073
|
-
break;
|
|
404074
|
-
default:
|
|
404075
|
-
throw new Error(`Invalid command: ${command}`);
|
|
404076
|
-
}
|
|
404077
|
-
} catch (reject) {
|
|
404078
|
-
workerPort.postMessage({ id, reject, properties: extractProperties(reject) });
|
|
404079
|
-
}
|
|
404080
|
-
Atomics.add(sharedBufferView, 0, 1);
|
|
404081
|
-
Atomics.notify(sharedBufferView, 0, Infinity);
|
|
404082
|
-
})();
|
|
404083
|
-
});
|
|
404084
|
-
} catch (reject) {
|
|
404085
|
-
parentPort.on("message", (msg) => {
|
|
404086
|
-
let { sharedBuffer, id } = msg;
|
|
404087
|
-
let sharedBufferView = new Int32Array(sharedBuffer);
|
|
404088
|
-
workerPort.postMessage({ id, reject, properties: extractProperties(reject) });
|
|
404089
|
-
Atomics.add(sharedBufferView, 0, 1);
|
|
404090
|
-
Atomics.notify(sharedBufferView, 0, Infinity);
|
|
404091
|
-
});
|
|
404092
|
-
}
|
|
404093
|
-
};
|
|
404094
|
-
if (isInternalWorkerThread) {
|
|
404095
|
-
startSyncServiceWorker();
|
|
404096
|
-
}
|
|
404097
|
-
var node_default = node_exports;
|
|
404098
|
-
}
|
|
404099
|
-
});
|
|
404100
|
-
|
|
404101
401695
|
// node_modules/.pnpm/load-tsconfig@0.2.5/node_modules/load-tsconfig/dist/index.cjs
|
|
404102
401696
|
var require_dist3 = __commonJS({
|
|
404103
401697
|
"node_modules/.pnpm/load-tsconfig@0.2.5/node_modules/load-tsconfig/dist/index.cjs"(exports2, module2) {
|
|
@@ -404347,7 +401941,7 @@ var require_dist4 = __commonJS({
|
|
|
404347
401941
|
var import_fs22 = __toESM3(require("fs"), 1);
|
|
404348
401942
|
var import_path22 = __toESM3(require("path"), 1);
|
|
404349
401943
|
var import_url13 = require("url");
|
|
404350
|
-
var import_esbuild =
|
|
401944
|
+
var import_esbuild = require("esbuild");
|
|
404351
401945
|
var import_load_tsconfig = require_dist3();
|
|
404352
401946
|
var import_fs5 = __toESM3(require("fs"), 1);
|
|
404353
401947
|
var import_path13 = __toESM3(require("path"), 1);
|
|
@@ -405701,7 +403295,7 @@ var require_signals2 = __commonJS({
|
|
|
405701
403295
|
});
|
|
405702
403296
|
|
|
405703
403297
|
// node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js
|
|
405704
|
-
var
|
|
403298
|
+
var require_main2 = __commonJS({
|
|
405705
403299
|
"node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js"(exports2) {
|
|
405706
403300
|
"use strict";
|
|
405707
403301
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -405761,7 +403355,7 @@ var require_main3 = __commonJS({
|
|
|
405761
403355
|
var require_error4 = __commonJS({
|
|
405762
403356
|
"node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js"(exports2, module2) {
|
|
405763
403357
|
"use strict";
|
|
405764
|
-
var { signalsByName } =
|
|
403358
|
+
var { signalsByName } = require_main2();
|
|
405765
403359
|
var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => {
|
|
405766
403360
|
if (timedOut) {
|
|
405767
403361
|
return `timed out after ${timeout} milliseconds`;
|
|
@@ -456832,7 +454426,7 @@ var require_dist7 = __commonJS({
|
|
|
456832
454426
|
var _execa2 = _interopRequireDefault(_execa);
|
|
456833
454427
|
var _treekill = require_tree_kill();
|
|
456834
454428
|
var _treekill2 = _interopRequireDefault(_treekill);
|
|
456835
|
-
var _esbuild =
|
|
454429
|
+
var _esbuild = require("esbuild");
|
|
456836
454430
|
var nodeProtocolPlugin = () => {
|
|
456837
454431
|
const nodeProtocol = "node:";
|
|
456838
454432
|
return {
|
|
@@ -465167,10 +462761,6 @@ function getNormalizedTsConfig(context, workspaceRoot, outputPath, options8) {
|
|
|
465167
462761
|
outDir: outputPath,
|
|
465168
462762
|
rootDir: workspaceRoot,
|
|
465169
462763
|
baseUrl: workspaceRoot,
|
|
465170
|
-
target: "esnext",
|
|
465171
|
-
module: "esnext",
|
|
465172
|
-
moduleResolution: "node",
|
|
465173
|
-
lib: ["lib.esnext.d.ts", "lib.dom.d.ts", "lib.dom.iterable.d.ts"],
|
|
465174
462764
|
noEmit: false,
|
|
465175
462765
|
esModuleInterop: true,
|
|
465176
462766
|
downlevelIteration: true,
|