@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
|
@@ -386684,9 +386684,9 @@ var require_devkit = __commonJS({
|
|
|
386684
386684
|
}
|
|
386685
386685
|
});
|
|
386686
386686
|
|
|
386687
|
-
// 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.
|
|
386687
|
+
// 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
|
|
386688
386688
|
var require_load_ts_transformers = __commonJS({
|
|
386689
|
-
"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.
|
|
386689
|
+
"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) {
|
|
386690
386690
|
"use strict";
|
|
386691
386691
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
386692
386692
|
exports2.loadTsTransformers = void 0;
|
|
@@ -386751,9 +386751,9 @@ var require_load_ts_transformers = __commonJS({
|
|
|
386751
386751
|
}
|
|
386752
386752
|
});
|
|
386753
386753
|
|
|
386754
|
-
// 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.
|
|
386754
|
+
// 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
|
|
386755
386755
|
var require_get_custom_transformers_factory = __commonJS({
|
|
386756
|
-
"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.
|
|
386756
|
+
"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) {
|
|
386757
386757
|
"use strict";
|
|
386758
386758
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
386759
386759
|
exports2.getCustomTrasformersFactory = void 0;
|
|
@@ -389315,9 +389315,9 @@ var require_out8 = __commonJS({
|
|
|
389315
389315
|
}
|
|
389316
389316
|
});
|
|
389317
389317
|
|
|
389318
|
-
// 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.
|
|
389318
|
+
// 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
|
|
389319
389319
|
var require_assets = __commonJS({
|
|
389320
|
-
"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.
|
|
389320
|
+
"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) {
|
|
389321
389321
|
"use strict";
|
|
389322
389322
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
389323
389323
|
exports2.assetGlobsToFiles = void 0;
|
|
@@ -389356,9 +389356,9 @@ var require_assets = __commonJS({
|
|
|
389356
389356
|
}
|
|
389357
389357
|
});
|
|
389358
389358
|
|
|
389359
|
-
// 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.
|
|
389359
|
+
// 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
|
|
389360
389360
|
var require_normalize_options = __commonJS({
|
|
389361
|
-
"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.
|
|
389361
|
+
"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) {
|
|
389362
389362
|
"use strict";
|
|
389363
389363
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
389364
389364
|
exports2.normalizeOptions = void 0;
|
|
@@ -391781,2412 +391781,6 @@ var require_lib6 = __commonJS({
|
|
|
391781
391781
|
}
|
|
391782
391782
|
});
|
|
391783
391783
|
|
|
391784
|
-
// node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js
|
|
391785
|
-
var require_main2 = __commonJS({
|
|
391786
|
-
"node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js"(exports2, module2) {
|
|
391787
|
-
"use strict";
|
|
391788
|
-
var __defProp4 = Object.defineProperty;
|
|
391789
|
-
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
391790
|
-
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
391791
|
-
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
391792
|
-
var __export4 = (target, all) => {
|
|
391793
|
-
for (var name in all)
|
|
391794
|
-
__defProp4(target, name, { get: all[name], enumerable: true });
|
|
391795
|
-
};
|
|
391796
|
-
var __copyProps3 = (to3, from, except, desc) => {
|
|
391797
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
391798
|
-
for (let key2 of __getOwnPropNames3(from))
|
|
391799
|
-
if (!__hasOwnProp3.call(to3, key2) && key2 !== except)
|
|
391800
|
-
__defProp4(to3, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc3(from, key2)) || desc.enumerable });
|
|
391801
|
-
}
|
|
391802
|
-
return to3;
|
|
391803
|
-
};
|
|
391804
|
-
var __toCommonJS2 = (mod) => __copyProps3(__defProp4({}, "__esModule", { value: true }), mod);
|
|
391805
|
-
var node_exports = {};
|
|
391806
|
-
__export4(node_exports, {
|
|
391807
|
-
analyzeMetafile: () => analyzeMetafile,
|
|
391808
|
-
analyzeMetafileSync: () => analyzeMetafileSync,
|
|
391809
|
-
build: () => build2,
|
|
391810
|
-
buildSync: () => buildSync,
|
|
391811
|
-
context: () => context,
|
|
391812
|
-
default: () => node_default,
|
|
391813
|
-
formatMessages: () => formatMessages,
|
|
391814
|
-
formatMessagesSync: () => formatMessagesSync,
|
|
391815
|
-
initialize: () => initialize,
|
|
391816
|
-
stop: () => stop,
|
|
391817
|
-
transform: () => transform2,
|
|
391818
|
-
transformSync: () => transformSync,
|
|
391819
|
-
version: () => version
|
|
391820
|
-
});
|
|
391821
|
-
module2.exports = __toCommonJS2(node_exports);
|
|
391822
|
-
function encodePacket(packet) {
|
|
391823
|
-
let visit = (value) => {
|
|
391824
|
-
if (value === null) {
|
|
391825
|
-
bb.write8(0);
|
|
391826
|
-
} else if (typeof value === "boolean") {
|
|
391827
|
-
bb.write8(1);
|
|
391828
|
-
bb.write8(+value);
|
|
391829
|
-
} else if (typeof value === "number") {
|
|
391830
|
-
bb.write8(2);
|
|
391831
|
-
bb.write32(value | 0);
|
|
391832
|
-
} else if (typeof value === "string") {
|
|
391833
|
-
bb.write8(3);
|
|
391834
|
-
bb.write(encodeUTF8(value));
|
|
391835
|
-
} else if (value instanceof Uint8Array) {
|
|
391836
|
-
bb.write8(4);
|
|
391837
|
-
bb.write(value);
|
|
391838
|
-
} else if (value instanceof Array) {
|
|
391839
|
-
bb.write8(5);
|
|
391840
|
-
bb.write32(value.length);
|
|
391841
|
-
for (let item of value) {
|
|
391842
|
-
visit(item);
|
|
391843
|
-
}
|
|
391844
|
-
} else {
|
|
391845
|
-
let keys = Object.keys(value);
|
|
391846
|
-
bb.write8(6);
|
|
391847
|
-
bb.write32(keys.length);
|
|
391848
|
-
for (let key2 of keys) {
|
|
391849
|
-
bb.write(encodeUTF8(key2));
|
|
391850
|
-
visit(value[key2]);
|
|
391851
|
-
}
|
|
391852
|
-
}
|
|
391853
|
-
};
|
|
391854
|
-
let bb = new ByteBuffer();
|
|
391855
|
-
bb.write32(0);
|
|
391856
|
-
bb.write32(packet.id << 1 | +!packet.isRequest);
|
|
391857
|
-
visit(packet.value);
|
|
391858
|
-
writeUInt32LE(bb.buf, bb.len - 4, 0);
|
|
391859
|
-
return bb.buf.subarray(0, bb.len);
|
|
391860
|
-
}
|
|
391861
|
-
function decodePacket(bytes) {
|
|
391862
|
-
let visit = () => {
|
|
391863
|
-
switch (bb.read8()) {
|
|
391864
|
-
case 0:
|
|
391865
|
-
return null;
|
|
391866
|
-
case 1:
|
|
391867
|
-
return !!bb.read8();
|
|
391868
|
-
case 2:
|
|
391869
|
-
return bb.read32();
|
|
391870
|
-
case 3:
|
|
391871
|
-
return decodeUTF8(bb.read());
|
|
391872
|
-
case 4:
|
|
391873
|
-
return bb.read();
|
|
391874
|
-
case 5: {
|
|
391875
|
-
let count = bb.read32();
|
|
391876
|
-
let value2 = [];
|
|
391877
|
-
for (let i3 = 0; i3 < count; i3++) {
|
|
391878
|
-
value2.push(visit());
|
|
391879
|
-
}
|
|
391880
|
-
return value2;
|
|
391881
|
-
}
|
|
391882
|
-
case 6: {
|
|
391883
|
-
let count = bb.read32();
|
|
391884
|
-
let value2 = {};
|
|
391885
|
-
for (let i3 = 0; i3 < count; i3++) {
|
|
391886
|
-
value2[decodeUTF8(bb.read())] = visit();
|
|
391887
|
-
}
|
|
391888
|
-
return value2;
|
|
391889
|
-
}
|
|
391890
|
-
default:
|
|
391891
|
-
throw new Error("Invalid packet");
|
|
391892
|
-
}
|
|
391893
|
-
};
|
|
391894
|
-
let bb = new ByteBuffer(bytes);
|
|
391895
|
-
let id = bb.read32();
|
|
391896
|
-
let isRequest = (id & 1) === 0;
|
|
391897
|
-
id >>>= 1;
|
|
391898
|
-
let value = visit();
|
|
391899
|
-
if (bb.ptr !== bytes.length) {
|
|
391900
|
-
throw new Error("Invalid packet");
|
|
391901
|
-
}
|
|
391902
|
-
return { id, isRequest, value };
|
|
391903
|
-
}
|
|
391904
|
-
var ByteBuffer = class {
|
|
391905
|
-
constructor(buf = new Uint8Array(1024)) {
|
|
391906
|
-
this.buf = buf;
|
|
391907
|
-
this.len = 0;
|
|
391908
|
-
this.ptr = 0;
|
|
391909
|
-
}
|
|
391910
|
-
_write(delta) {
|
|
391911
|
-
if (this.len + delta > this.buf.length) {
|
|
391912
|
-
let clone = new Uint8Array((this.len + delta) * 2);
|
|
391913
|
-
clone.set(this.buf);
|
|
391914
|
-
this.buf = clone;
|
|
391915
|
-
}
|
|
391916
|
-
this.len += delta;
|
|
391917
|
-
return this.len - delta;
|
|
391918
|
-
}
|
|
391919
|
-
write8(value) {
|
|
391920
|
-
let offset = this._write(1);
|
|
391921
|
-
this.buf[offset] = value;
|
|
391922
|
-
}
|
|
391923
|
-
write32(value) {
|
|
391924
|
-
let offset = this._write(4);
|
|
391925
|
-
writeUInt32LE(this.buf, value, offset);
|
|
391926
|
-
}
|
|
391927
|
-
write(bytes) {
|
|
391928
|
-
let offset = this._write(4 + bytes.length);
|
|
391929
|
-
writeUInt32LE(this.buf, bytes.length, offset);
|
|
391930
|
-
this.buf.set(bytes, offset + 4);
|
|
391931
|
-
}
|
|
391932
|
-
_read(delta) {
|
|
391933
|
-
if (this.ptr + delta > this.buf.length) {
|
|
391934
|
-
throw new Error("Invalid packet");
|
|
391935
|
-
}
|
|
391936
|
-
this.ptr += delta;
|
|
391937
|
-
return this.ptr - delta;
|
|
391938
|
-
}
|
|
391939
|
-
read8() {
|
|
391940
|
-
return this.buf[this._read(1)];
|
|
391941
|
-
}
|
|
391942
|
-
read32() {
|
|
391943
|
-
return readUInt32LE(this.buf, this._read(4));
|
|
391944
|
-
}
|
|
391945
|
-
read() {
|
|
391946
|
-
let length = this.read32();
|
|
391947
|
-
let bytes = new Uint8Array(length);
|
|
391948
|
-
let ptr = this._read(bytes.length);
|
|
391949
|
-
bytes.set(this.buf.subarray(ptr, ptr + length));
|
|
391950
|
-
return bytes;
|
|
391951
|
-
}
|
|
391952
|
-
};
|
|
391953
|
-
var encodeUTF8;
|
|
391954
|
-
var decodeUTF8;
|
|
391955
|
-
var encodeInvariant;
|
|
391956
|
-
if (typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined") {
|
|
391957
|
-
let encoder = new TextEncoder();
|
|
391958
|
-
let decoder = new TextDecoder();
|
|
391959
|
-
encodeUTF8 = (text) => encoder.encode(text);
|
|
391960
|
-
decodeUTF8 = (bytes) => decoder.decode(bytes);
|
|
391961
|
-
encodeInvariant = 'new TextEncoder().encode("")';
|
|
391962
|
-
} else if (typeof Buffer !== "undefined") {
|
|
391963
|
-
encodeUTF8 = (text) => Buffer.from(text);
|
|
391964
|
-
decodeUTF8 = (bytes) => {
|
|
391965
|
-
let { buffer: buffer2, byteOffset, byteLength } = bytes;
|
|
391966
|
-
return Buffer.from(buffer2, byteOffset, byteLength).toString();
|
|
391967
|
-
};
|
|
391968
|
-
encodeInvariant = 'Buffer.from("")';
|
|
391969
|
-
} else {
|
|
391970
|
-
throw new Error("No UTF-8 codec found");
|
|
391971
|
-
}
|
|
391972
|
-
if (!(encodeUTF8("") instanceof Uint8Array))
|
|
391973
|
-
throw new Error(`Invariant violation: "${encodeInvariant} instanceof Uint8Array" is incorrectly false
|
|
391974
|
-
|
|
391975
|
-
This indicates that your JavaScript environment is broken. You cannot use
|
|
391976
|
-
esbuild in this environment because esbuild relies on this invariant. This
|
|
391977
|
-
is not a problem with esbuild. You need to fix your environment instead.
|
|
391978
|
-
`);
|
|
391979
|
-
function readUInt32LE(buffer2, offset) {
|
|
391980
|
-
return buffer2[offset++] | buffer2[offset++] << 8 | buffer2[offset++] << 16 | buffer2[offset++] << 24;
|
|
391981
|
-
}
|
|
391982
|
-
function writeUInt32LE(buffer2, value, offset) {
|
|
391983
|
-
buffer2[offset++] = value;
|
|
391984
|
-
buffer2[offset++] = value >> 8;
|
|
391985
|
-
buffer2[offset++] = value >> 16;
|
|
391986
|
-
buffer2[offset++] = value >> 24;
|
|
391987
|
-
}
|
|
391988
|
-
var quote2 = JSON.stringify;
|
|
391989
|
-
var buildLogLevelDefault = "warning";
|
|
391990
|
-
var transformLogLevelDefault = "silent";
|
|
391991
|
-
function validateTarget(target) {
|
|
391992
|
-
validateStringValue(target, "target");
|
|
391993
|
-
if (target.indexOf(",") >= 0)
|
|
391994
|
-
throw new Error(`Invalid target: ${target}`);
|
|
391995
|
-
return target;
|
|
391996
|
-
}
|
|
391997
|
-
var canBeAnything = () => null;
|
|
391998
|
-
var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean";
|
|
391999
|
-
var mustBeString = (value) => typeof value === "string" ? null : "a string";
|
|
392000
|
-
var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object";
|
|
392001
|
-
var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer";
|
|
392002
|
-
var mustBeFunction = (value) => typeof value === "function" ? null : "a function";
|
|
392003
|
-
var mustBeArray = (value) => Array.isArray(value) ? null : "an array";
|
|
392004
|
-
var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object";
|
|
392005
|
-
var mustBeEntryPoints = (value) => typeof value === "object" && value !== null ? null : "an array or an object";
|
|
392006
|
-
var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module";
|
|
392007
|
-
var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null";
|
|
392008
|
-
var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean";
|
|
392009
|
-
var mustBeStringOrObject = (value) => typeof value === "string" || typeof value === "object" && value !== null && !Array.isArray(value) ? null : "a string or an object";
|
|
392010
|
-
var mustBeStringOrArray = (value) => typeof value === "string" || Array.isArray(value) ? null : "a string or an array";
|
|
392011
|
-
var mustBeStringOrUint8Array = (value) => typeof value === "string" || value instanceof Uint8Array ? null : "a string or a Uint8Array";
|
|
392012
|
-
var mustBeStringOrURL = (value) => typeof value === "string" || value instanceof URL ? null : "a string or a URL";
|
|
392013
|
-
function getFlag(object, keys, key2, mustBeFn) {
|
|
392014
|
-
let value = object[key2];
|
|
392015
|
-
keys[key2 + ""] = true;
|
|
392016
|
-
if (value === void 0)
|
|
392017
|
-
return void 0;
|
|
392018
|
-
let mustBe = mustBeFn(value);
|
|
392019
|
-
if (mustBe !== null)
|
|
392020
|
-
throw new Error(`${quote2(key2)} must be ${mustBe}`);
|
|
392021
|
-
return value;
|
|
392022
|
-
}
|
|
392023
|
-
function checkForInvalidFlags(object, keys, where) {
|
|
392024
|
-
for (let key2 in object) {
|
|
392025
|
-
if (!(key2 in keys)) {
|
|
392026
|
-
throw new Error(`Invalid option ${where}: ${quote2(key2)}`);
|
|
392027
|
-
}
|
|
392028
|
-
}
|
|
392029
|
-
}
|
|
392030
|
-
function validateInitializeOptions(options8) {
|
|
392031
|
-
let keys = /* @__PURE__ */ Object.create(null);
|
|
392032
|
-
let wasmURL = getFlag(options8, keys, "wasmURL", mustBeStringOrURL);
|
|
392033
|
-
let wasmModule = getFlag(options8, keys, "wasmModule", mustBeWebAssemblyModule);
|
|
392034
|
-
let worker = getFlag(options8, keys, "worker", mustBeBoolean);
|
|
392035
|
-
checkForInvalidFlags(options8, keys, "in initialize() call");
|
|
392036
|
-
return {
|
|
392037
|
-
wasmURL,
|
|
392038
|
-
wasmModule,
|
|
392039
|
-
worker
|
|
392040
|
-
};
|
|
392041
|
-
}
|
|
392042
|
-
function validateMangleCache(mangleCache) {
|
|
392043
|
-
let validated;
|
|
392044
|
-
if (mangleCache !== void 0) {
|
|
392045
|
-
validated = /* @__PURE__ */ Object.create(null);
|
|
392046
|
-
for (let key2 in mangleCache) {
|
|
392047
|
-
let value = mangleCache[key2];
|
|
392048
|
-
if (typeof value === "string" || value === false) {
|
|
392049
|
-
validated[key2] = value;
|
|
392050
|
-
} else {
|
|
392051
|
-
throw new Error(`Expected ${quote2(key2)} in mangle cache to map to either a string or false`);
|
|
392052
|
-
}
|
|
392053
|
-
}
|
|
392054
|
-
}
|
|
392055
|
-
return validated;
|
|
392056
|
-
}
|
|
392057
|
-
function pushLogFlags(flags, options8, keys, isTTY2, logLevelDefault) {
|
|
392058
|
-
let color = getFlag(options8, keys, "color", mustBeBoolean);
|
|
392059
|
-
let logLevel = getFlag(options8, keys, "logLevel", mustBeString);
|
|
392060
|
-
let logLimit = getFlag(options8, keys, "logLimit", mustBeInteger);
|
|
392061
|
-
if (color !== void 0)
|
|
392062
|
-
flags.push(`--color=${color}`);
|
|
392063
|
-
else if (isTTY2)
|
|
392064
|
-
flags.push(`--color=true`);
|
|
392065
|
-
flags.push(`--log-level=${logLevel || logLevelDefault}`);
|
|
392066
|
-
flags.push(`--log-limit=${logLimit || 0}`);
|
|
392067
|
-
}
|
|
392068
|
-
function validateStringValue(value, what, key2) {
|
|
392069
|
-
if (typeof value !== "string") {
|
|
392070
|
-
throw new Error(`Expected value for ${what}${key2 !== void 0 ? " " + quote2(key2) : ""} to be a string, got ${typeof value} instead`);
|
|
392071
|
-
}
|
|
392072
|
-
return value;
|
|
392073
|
-
}
|
|
392074
|
-
function pushCommonFlags(flags, options8, keys) {
|
|
392075
|
-
let legalComments = getFlag(options8, keys, "legalComments", mustBeString);
|
|
392076
|
-
let sourceRoot = getFlag(options8, keys, "sourceRoot", mustBeString);
|
|
392077
|
-
let sourcesContent = getFlag(options8, keys, "sourcesContent", mustBeBoolean);
|
|
392078
|
-
let target = getFlag(options8, keys, "target", mustBeStringOrArray);
|
|
392079
|
-
let format3 = getFlag(options8, keys, "format", mustBeString);
|
|
392080
|
-
let globalName = getFlag(options8, keys, "globalName", mustBeString);
|
|
392081
|
-
let mangleProps = getFlag(options8, keys, "mangleProps", mustBeRegExp);
|
|
392082
|
-
let reserveProps = getFlag(options8, keys, "reserveProps", mustBeRegExp);
|
|
392083
|
-
let mangleQuoted = getFlag(options8, keys, "mangleQuoted", mustBeBoolean);
|
|
392084
|
-
let minify = getFlag(options8, keys, "minify", mustBeBoolean);
|
|
392085
|
-
let minifySyntax = getFlag(options8, keys, "minifySyntax", mustBeBoolean);
|
|
392086
|
-
let minifyWhitespace = getFlag(options8, keys, "minifyWhitespace", mustBeBoolean);
|
|
392087
|
-
let minifyIdentifiers = getFlag(options8, keys, "minifyIdentifiers", mustBeBoolean);
|
|
392088
|
-
let lineLimit = getFlag(options8, keys, "lineLimit", mustBeInteger);
|
|
392089
|
-
let drop = getFlag(options8, keys, "drop", mustBeArray);
|
|
392090
|
-
let dropLabels = getFlag(options8, keys, "dropLabels", mustBeArray);
|
|
392091
|
-
let charset = getFlag(options8, keys, "charset", mustBeString);
|
|
392092
|
-
let treeShaking = getFlag(options8, keys, "treeShaking", mustBeBoolean);
|
|
392093
|
-
let ignoreAnnotations = getFlag(options8, keys, "ignoreAnnotations", mustBeBoolean);
|
|
392094
|
-
let jsx = getFlag(options8, keys, "jsx", mustBeString);
|
|
392095
|
-
let jsxFactory = getFlag(options8, keys, "jsxFactory", mustBeString);
|
|
392096
|
-
let jsxFragment = getFlag(options8, keys, "jsxFragment", mustBeString);
|
|
392097
|
-
let jsxImportSource = getFlag(options8, keys, "jsxImportSource", mustBeString);
|
|
392098
|
-
let jsxDev = getFlag(options8, keys, "jsxDev", mustBeBoolean);
|
|
392099
|
-
let jsxSideEffects = getFlag(options8, keys, "jsxSideEffects", mustBeBoolean);
|
|
392100
|
-
let define2 = getFlag(options8, keys, "define", mustBeObject);
|
|
392101
|
-
let logOverride = getFlag(options8, keys, "logOverride", mustBeObject);
|
|
392102
|
-
let supported = getFlag(options8, keys, "supported", mustBeObject);
|
|
392103
|
-
let pure = getFlag(options8, keys, "pure", mustBeArray);
|
|
392104
|
-
let keepNames = getFlag(options8, keys, "keepNames", mustBeBoolean);
|
|
392105
|
-
let platform = getFlag(options8, keys, "platform", mustBeString);
|
|
392106
|
-
let tsconfigRaw = getFlag(options8, keys, "tsconfigRaw", mustBeStringOrObject);
|
|
392107
|
-
if (legalComments)
|
|
392108
|
-
flags.push(`--legal-comments=${legalComments}`);
|
|
392109
|
-
if (sourceRoot !== void 0)
|
|
392110
|
-
flags.push(`--source-root=${sourceRoot}`);
|
|
392111
|
-
if (sourcesContent !== void 0)
|
|
392112
|
-
flags.push(`--sources-content=${sourcesContent}`);
|
|
392113
|
-
if (target) {
|
|
392114
|
-
if (Array.isArray(target))
|
|
392115
|
-
flags.push(`--target=${Array.from(target).map(validateTarget).join(",")}`);
|
|
392116
|
-
else
|
|
392117
|
-
flags.push(`--target=${validateTarget(target)}`);
|
|
392118
|
-
}
|
|
392119
|
-
if (format3)
|
|
392120
|
-
flags.push(`--format=${format3}`);
|
|
392121
|
-
if (globalName)
|
|
392122
|
-
flags.push(`--global-name=${globalName}`);
|
|
392123
|
-
if (platform)
|
|
392124
|
-
flags.push(`--platform=${platform}`);
|
|
392125
|
-
if (tsconfigRaw)
|
|
392126
|
-
flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`);
|
|
392127
|
-
if (minify)
|
|
392128
|
-
flags.push("--minify");
|
|
392129
|
-
if (minifySyntax)
|
|
392130
|
-
flags.push("--minify-syntax");
|
|
392131
|
-
if (minifyWhitespace)
|
|
392132
|
-
flags.push("--minify-whitespace");
|
|
392133
|
-
if (minifyIdentifiers)
|
|
392134
|
-
flags.push("--minify-identifiers");
|
|
392135
|
-
if (lineLimit)
|
|
392136
|
-
flags.push(`--line-limit=${lineLimit}`);
|
|
392137
|
-
if (charset)
|
|
392138
|
-
flags.push(`--charset=${charset}`);
|
|
392139
|
-
if (treeShaking !== void 0)
|
|
392140
|
-
flags.push(`--tree-shaking=${treeShaking}`);
|
|
392141
|
-
if (ignoreAnnotations)
|
|
392142
|
-
flags.push(`--ignore-annotations`);
|
|
392143
|
-
if (drop)
|
|
392144
|
-
for (let what of drop)
|
|
392145
|
-
flags.push(`--drop:${validateStringValue(what, "drop")}`);
|
|
392146
|
-
if (dropLabels)
|
|
392147
|
-
flags.push(`--drop-labels=${Array.from(dropLabels).map((what) => validateStringValue(what, "dropLabels")).join(",")}`);
|
|
392148
|
-
if (mangleProps)
|
|
392149
|
-
flags.push(`--mangle-props=${mangleProps.source}`);
|
|
392150
|
-
if (reserveProps)
|
|
392151
|
-
flags.push(`--reserve-props=${reserveProps.source}`);
|
|
392152
|
-
if (mangleQuoted !== void 0)
|
|
392153
|
-
flags.push(`--mangle-quoted=${mangleQuoted}`);
|
|
392154
|
-
if (jsx)
|
|
392155
|
-
flags.push(`--jsx=${jsx}`);
|
|
392156
|
-
if (jsxFactory)
|
|
392157
|
-
flags.push(`--jsx-factory=${jsxFactory}`);
|
|
392158
|
-
if (jsxFragment)
|
|
392159
|
-
flags.push(`--jsx-fragment=${jsxFragment}`);
|
|
392160
|
-
if (jsxImportSource)
|
|
392161
|
-
flags.push(`--jsx-import-source=${jsxImportSource}`);
|
|
392162
|
-
if (jsxDev)
|
|
392163
|
-
flags.push(`--jsx-dev`);
|
|
392164
|
-
if (jsxSideEffects)
|
|
392165
|
-
flags.push(`--jsx-side-effects`);
|
|
392166
|
-
if (define2) {
|
|
392167
|
-
for (let key2 in define2) {
|
|
392168
|
-
if (key2.indexOf("=") >= 0)
|
|
392169
|
-
throw new Error(`Invalid define: ${key2}`);
|
|
392170
|
-
flags.push(`--define:${key2}=${validateStringValue(define2[key2], "define", key2)}`);
|
|
392171
|
-
}
|
|
392172
|
-
}
|
|
392173
|
-
if (logOverride) {
|
|
392174
|
-
for (let key2 in logOverride) {
|
|
392175
|
-
if (key2.indexOf("=") >= 0)
|
|
392176
|
-
throw new Error(`Invalid log override: ${key2}`);
|
|
392177
|
-
flags.push(`--log-override:${key2}=${validateStringValue(logOverride[key2], "log override", key2)}`);
|
|
392178
|
-
}
|
|
392179
|
-
}
|
|
392180
|
-
if (supported) {
|
|
392181
|
-
for (let key2 in supported) {
|
|
392182
|
-
if (key2.indexOf("=") >= 0)
|
|
392183
|
-
throw new Error(`Invalid supported: ${key2}`);
|
|
392184
|
-
const value = supported[key2];
|
|
392185
|
-
if (typeof value !== "boolean")
|
|
392186
|
-
throw new Error(`Expected value for supported ${quote2(key2)} to be a boolean, got ${typeof value} instead`);
|
|
392187
|
-
flags.push(`--supported:${key2}=${value}`);
|
|
392188
|
-
}
|
|
392189
|
-
}
|
|
392190
|
-
if (pure)
|
|
392191
|
-
for (let fn6 of pure)
|
|
392192
|
-
flags.push(`--pure:${validateStringValue(fn6, "pure")}`);
|
|
392193
|
-
if (keepNames)
|
|
392194
|
-
flags.push(`--keep-names`);
|
|
392195
|
-
}
|
|
392196
|
-
function flagsForBuildOptions(callName, options8, isTTY2, logLevelDefault, writeDefault) {
|
|
392197
|
-
var _a22;
|
|
392198
|
-
let flags = [];
|
|
392199
|
-
let entries = [];
|
|
392200
|
-
let keys = /* @__PURE__ */ Object.create(null);
|
|
392201
|
-
let stdinContents = null;
|
|
392202
|
-
let stdinResolveDir = null;
|
|
392203
|
-
pushLogFlags(flags, options8, keys, isTTY2, logLevelDefault);
|
|
392204
|
-
pushCommonFlags(flags, options8, keys);
|
|
392205
|
-
let sourcemap = getFlag(options8, keys, "sourcemap", mustBeStringOrBoolean);
|
|
392206
|
-
let bundle = getFlag(options8, keys, "bundle", mustBeBoolean);
|
|
392207
|
-
let splitting = getFlag(options8, keys, "splitting", mustBeBoolean);
|
|
392208
|
-
let preserveSymlinks = getFlag(options8, keys, "preserveSymlinks", mustBeBoolean);
|
|
392209
|
-
let metafile = getFlag(options8, keys, "metafile", mustBeBoolean);
|
|
392210
|
-
let outfile = getFlag(options8, keys, "outfile", mustBeString);
|
|
392211
|
-
let outdir = getFlag(options8, keys, "outdir", mustBeString);
|
|
392212
|
-
let outbase = getFlag(options8, keys, "outbase", mustBeString);
|
|
392213
|
-
let tsconfig = getFlag(options8, keys, "tsconfig", mustBeString);
|
|
392214
|
-
let resolveExtensions = getFlag(options8, keys, "resolveExtensions", mustBeArray);
|
|
392215
|
-
let nodePathsInput = getFlag(options8, keys, "nodePaths", mustBeArray);
|
|
392216
|
-
let mainFields = getFlag(options8, keys, "mainFields", mustBeArray);
|
|
392217
|
-
let conditions = getFlag(options8, keys, "conditions", mustBeArray);
|
|
392218
|
-
let external = getFlag(options8, keys, "external", mustBeArray);
|
|
392219
|
-
let packages = getFlag(options8, keys, "packages", mustBeString);
|
|
392220
|
-
let alias = getFlag(options8, keys, "alias", mustBeObject);
|
|
392221
|
-
let loader2 = getFlag(options8, keys, "loader", mustBeObject);
|
|
392222
|
-
let outExtension2 = getFlag(options8, keys, "outExtension", mustBeObject);
|
|
392223
|
-
let publicPath = getFlag(options8, keys, "publicPath", mustBeString);
|
|
392224
|
-
let entryNames = getFlag(options8, keys, "entryNames", mustBeString);
|
|
392225
|
-
let chunkNames = getFlag(options8, keys, "chunkNames", mustBeString);
|
|
392226
|
-
let assetNames = getFlag(options8, keys, "assetNames", mustBeString);
|
|
392227
|
-
let inject = getFlag(options8, keys, "inject", mustBeArray);
|
|
392228
|
-
let banner = getFlag(options8, keys, "banner", mustBeObject);
|
|
392229
|
-
let footer = getFlag(options8, keys, "footer", mustBeObject);
|
|
392230
|
-
let entryPoints = getFlag(options8, keys, "entryPoints", mustBeEntryPoints);
|
|
392231
|
-
let absWorkingDir = getFlag(options8, keys, "absWorkingDir", mustBeString);
|
|
392232
|
-
let stdin2 = getFlag(options8, keys, "stdin", mustBeObject);
|
|
392233
|
-
let write = (_a22 = getFlag(options8, keys, "write", mustBeBoolean)) != null ? _a22 : writeDefault;
|
|
392234
|
-
let allowOverwrite = getFlag(options8, keys, "allowOverwrite", mustBeBoolean);
|
|
392235
|
-
let mangleCache = getFlag(options8, keys, "mangleCache", mustBeObject);
|
|
392236
|
-
keys.plugins = true;
|
|
392237
|
-
checkForInvalidFlags(options8, keys, `in ${callName}() call`);
|
|
392238
|
-
if (sourcemap)
|
|
392239
|
-
flags.push(`--sourcemap${sourcemap === true ? "" : `=${sourcemap}`}`);
|
|
392240
|
-
if (bundle)
|
|
392241
|
-
flags.push("--bundle");
|
|
392242
|
-
if (allowOverwrite)
|
|
392243
|
-
flags.push("--allow-overwrite");
|
|
392244
|
-
if (splitting)
|
|
392245
|
-
flags.push("--splitting");
|
|
392246
|
-
if (preserveSymlinks)
|
|
392247
|
-
flags.push("--preserve-symlinks");
|
|
392248
|
-
if (metafile)
|
|
392249
|
-
flags.push(`--metafile`);
|
|
392250
|
-
if (outfile)
|
|
392251
|
-
flags.push(`--outfile=${outfile}`);
|
|
392252
|
-
if (outdir)
|
|
392253
|
-
flags.push(`--outdir=${outdir}`);
|
|
392254
|
-
if (outbase)
|
|
392255
|
-
flags.push(`--outbase=${outbase}`);
|
|
392256
|
-
if (tsconfig)
|
|
392257
|
-
flags.push(`--tsconfig=${tsconfig}`);
|
|
392258
|
-
if (packages)
|
|
392259
|
-
flags.push(`--packages=${packages}`);
|
|
392260
|
-
if (resolveExtensions) {
|
|
392261
|
-
let values = [];
|
|
392262
|
-
for (let value of resolveExtensions) {
|
|
392263
|
-
validateStringValue(value, "resolve extension");
|
|
392264
|
-
if (value.indexOf(",") >= 0)
|
|
392265
|
-
throw new Error(`Invalid resolve extension: ${value}`);
|
|
392266
|
-
values.push(value);
|
|
392267
|
-
}
|
|
392268
|
-
flags.push(`--resolve-extensions=${values.join(",")}`);
|
|
392269
|
-
}
|
|
392270
|
-
if (publicPath)
|
|
392271
|
-
flags.push(`--public-path=${publicPath}`);
|
|
392272
|
-
if (entryNames)
|
|
392273
|
-
flags.push(`--entry-names=${entryNames}`);
|
|
392274
|
-
if (chunkNames)
|
|
392275
|
-
flags.push(`--chunk-names=${chunkNames}`);
|
|
392276
|
-
if (assetNames)
|
|
392277
|
-
flags.push(`--asset-names=${assetNames}`);
|
|
392278
|
-
if (mainFields) {
|
|
392279
|
-
let values = [];
|
|
392280
|
-
for (let value of mainFields) {
|
|
392281
|
-
validateStringValue(value, "main field");
|
|
392282
|
-
if (value.indexOf(",") >= 0)
|
|
392283
|
-
throw new Error(`Invalid main field: ${value}`);
|
|
392284
|
-
values.push(value);
|
|
392285
|
-
}
|
|
392286
|
-
flags.push(`--main-fields=${values.join(",")}`);
|
|
392287
|
-
}
|
|
392288
|
-
if (conditions) {
|
|
392289
|
-
let values = [];
|
|
392290
|
-
for (let value of conditions) {
|
|
392291
|
-
validateStringValue(value, "condition");
|
|
392292
|
-
if (value.indexOf(",") >= 0)
|
|
392293
|
-
throw new Error(`Invalid condition: ${value}`);
|
|
392294
|
-
values.push(value);
|
|
392295
|
-
}
|
|
392296
|
-
flags.push(`--conditions=${values.join(",")}`);
|
|
392297
|
-
}
|
|
392298
|
-
if (external)
|
|
392299
|
-
for (let name of external)
|
|
392300
|
-
flags.push(`--external:${validateStringValue(name, "external")}`);
|
|
392301
|
-
if (alias) {
|
|
392302
|
-
for (let old in alias) {
|
|
392303
|
-
if (old.indexOf("=") >= 0)
|
|
392304
|
-
throw new Error(`Invalid package name in alias: ${old}`);
|
|
392305
|
-
flags.push(`--alias:${old}=${validateStringValue(alias[old], "alias", old)}`);
|
|
392306
|
-
}
|
|
392307
|
-
}
|
|
392308
|
-
if (banner) {
|
|
392309
|
-
for (let type2 in banner) {
|
|
392310
|
-
if (type2.indexOf("=") >= 0)
|
|
392311
|
-
throw new Error(`Invalid banner file type: ${type2}`);
|
|
392312
|
-
flags.push(`--banner:${type2}=${validateStringValue(banner[type2], "banner", type2)}`);
|
|
392313
|
-
}
|
|
392314
|
-
}
|
|
392315
|
-
if (footer) {
|
|
392316
|
-
for (let type2 in footer) {
|
|
392317
|
-
if (type2.indexOf("=") >= 0)
|
|
392318
|
-
throw new Error(`Invalid footer file type: ${type2}`);
|
|
392319
|
-
flags.push(`--footer:${type2}=${validateStringValue(footer[type2], "footer", type2)}`);
|
|
392320
|
-
}
|
|
392321
|
-
}
|
|
392322
|
-
if (inject)
|
|
392323
|
-
for (let path32 of inject)
|
|
392324
|
-
flags.push(`--inject:${validateStringValue(path32, "inject")}`);
|
|
392325
|
-
if (loader2) {
|
|
392326
|
-
for (let ext2 in loader2) {
|
|
392327
|
-
if (ext2.indexOf("=") >= 0)
|
|
392328
|
-
throw new Error(`Invalid loader extension: ${ext2}`);
|
|
392329
|
-
flags.push(`--loader:${ext2}=${validateStringValue(loader2[ext2], "loader", ext2)}`);
|
|
392330
|
-
}
|
|
392331
|
-
}
|
|
392332
|
-
if (outExtension2) {
|
|
392333
|
-
for (let ext2 in outExtension2) {
|
|
392334
|
-
if (ext2.indexOf("=") >= 0)
|
|
392335
|
-
throw new Error(`Invalid out extension: ${ext2}`);
|
|
392336
|
-
flags.push(`--out-extension:${ext2}=${validateStringValue(outExtension2[ext2], "out extension", ext2)}`);
|
|
392337
|
-
}
|
|
392338
|
-
}
|
|
392339
|
-
if (entryPoints) {
|
|
392340
|
-
if (Array.isArray(entryPoints)) {
|
|
392341
|
-
for (let i3 = 0, n = entryPoints.length; i3 < n; i3++) {
|
|
392342
|
-
let entryPoint = entryPoints[i3];
|
|
392343
|
-
if (typeof entryPoint === "object" && entryPoint !== null) {
|
|
392344
|
-
let entryPointKeys = /* @__PURE__ */ Object.create(null);
|
|
392345
|
-
let input = getFlag(entryPoint, entryPointKeys, "in", mustBeString);
|
|
392346
|
-
let output = getFlag(entryPoint, entryPointKeys, "out", mustBeString);
|
|
392347
|
-
checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i3);
|
|
392348
|
-
if (input === void 0)
|
|
392349
|
-
throw new Error('Missing property "in" for entry point at index ' + i3);
|
|
392350
|
-
if (output === void 0)
|
|
392351
|
-
throw new Error('Missing property "out" for entry point at index ' + i3);
|
|
392352
|
-
entries.push([output, input]);
|
|
392353
|
-
} else {
|
|
392354
|
-
entries.push(["", validateStringValue(entryPoint, "entry point at index " + i3)]);
|
|
392355
|
-
}
|
|
392356
|
-
}
|
|
392357
|
-
} else {
|
|
392358
|
-
for (let key2 in entryPoints) {
|
|
392359
|
-
entries.push([key2, validateStringValue(entryPoints[key2], "entry point", key2)]);
|
|
392360
|
-
}
|
|
392361
|
-
}
|
|
392362
|
-
}
|
|
392363
|
-
if (stdin2) {
|
|
392364
|
-
let stdinKeys = /* @__PURE__ */ Object.create(null);
|
|
392365
|
-
let contents = getFlag(stdin2, stdinKeys, "contents", mustBeStringOrUint8Array);
|
|
392366
|
-
let resolveDir = getFlag(stdin2, stdinKeys, "resolveDir", mustBeString);
|
|
392367
|
-
let sourcefile = getFlag(stdin2, stdinKeys, "sourcefile", mustBeString);
|
|
392368
|
-
let loader22 = getFlag(stdin2, stdinKeys, "loader", mustBeString);
|
|
392369
|
-
checkForInvalidFlags(stdin2, stdinKeys, 'in "stdin" object');
|
|
392370
|
-
if (sourcefile)
|
|
392371
|
-
flags.push(`--sourcefile=${sourcefile}`);
|
|
392372
|
-
if (loader22)
|
|
392373
|
-
flags.push(`--loader=${loader22}`);
|
|
392374
|
-
if (resolveDir)
|
|
392375
|
-
stdinResolveDir = resolveDir;
|
|
392376
|
-
if (typeof contents === "string")
|
|
392377
|
-
stdinContents = encodeUTF8(contents);
|
|
392378
|
-
else if (contents instanceof Uint8Array)
|
|
392379
|
-
stdinContents = contents;
|
|
392380
|
-
}
|
|
392381
|
-
let nodePaths = [];
|
|
392382
|
-
if (nodePathsInput) {
|
|
392383
|
-
for (let value of nodePathsInput) {
|
|
392384
|
-
value += "";
|
|
392385
|
-
nodePaths.push(value);
|
|
392386
|
-
}
|
|
392387
|
-
}
|
|
392388
|
-
return {
|
|
392389
|
-
entries,
|
|
392390
|
-
flags,
|
|
392391
|
-
write,
|
|
392392
|
-
stdinContents,
|
|
392393
|
-
stdinResolveDir,
|
|
392394
|
-
absWorkingDir,
|
|
392395
|
-
nodePaths,
|
|
392396
|
-
mangleCache: validateMangleCache(mangleCache)
|
|
392397
|
-
};
|
|
392398
|
-
}
|
|
392399
|
-
function flagsForTransformOptions(callName, options8, isTTY2, logLevelDefault) {
|
|
392400
|
-
let flags = [];
|
|
392401
|
-
let keys = /* @__PURE__ */ Object.create(null);
|
|
392402
|
-
pushLogFlags(flags, options8, keys, isTTY2, logLevelDefault);
|
|
392403
|
-
pushCommonFlags(flags, options8, keys);
|
|
392404
|
-
let sourcemap = getFlag(options8, keys, "sourcemap", mustBeStringOrBoolean);
|
|
392405
|
-
let sourcefile = getFlag(options8, keys, "sourcefile", mustBeString);
|
|
392406
|
-
let loader2 = getFlag(options8, keys, "loader", mustBeString);
|
|
392407
|
-
let banner = getFlag(options8, keys, "banner", mustBeString);
|
|
392408
|
-
let footer = getFlag(options8, keys, "footer", mustBeString);
|
|
392409
|
-
let mangleCache = getFlag(options8, keys, "mangleCache", mustBeObject);
|
|
392410
|
-
checkForInvalidFlags(options8, keys, `in ${callName}() call`);
|
|
392411
|
-
if (sourcemap)
|
|
392412
|
-
flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`);
|
|
392413
|
-
if (sourcefile)
|
|
392414
|
-
flags.push(`--sourcefile=${sourcefile}`);
|
|
392415
|
-
if (loader2)
|
|
392416
|
-
flags.push(`--loader=${loader2}`);
|
|
392417
|
-
if (banner)
|
|
392418
|
-
flags.push(`--banner=${banner}`);
|
|
392419
|
-
if (footer)
|
|
392420
|
-
flags.push(`--footer=${footer}`);
|
|
392421
|
-
return {
|
|
392422
|
-
flags,
|
|
392423
|
-
mangleCache: validateMangleCache(mangleCache)
|
|
392424
|
-
};
|
|
392425
|
-
}
|
|
392426
|
-
function createChannel(streamIn) {
|
|
392427
|
-
const requestCallbacksByKey = {};
|
|
392428
|
-
const closeData = { didClose: false, reason: "" };
|
|
392429
|
-
let responseCallbacks = {};
|
|
392430
|
-
let nextRequestID = 0;
|
|
392431
|
-
let nextBuildKey = 0;
|
|
392432
|
-
let stdout = new Uint8Array(16 * 1024);
|
|
392433
|
-
let stdoutUsed = 0;
|
|
392434
|
-
let readFromStdout = (chunk) => {
|
|
392435
|
-
let limit = stdoutUsed + chunk.length;
|
|
392436
|
-
if (limit > stdout.length) {
|
|
392437
|
-
let swap = new Uint8Array(limit * 2);
|
|
392438
|
-
swap.set(stdout);
|
|
392439
|
-
stdout = swap;
|
|
392440
|
-
}
|
|
392441
|
-
stdout.set(chunk, stdoutUsed);
|
|
392442
|
-
stdoutUsed += chunk.length;
|
|
392443
|
-
let offset = 0;
|
|
392444
|
-
while (offset + 4 <= stdoutUsed) {
|
|
392445
|
-
let length = readUInt32LE(stdout, offset);
|
|
392446
|
-
if (offset + 4 + length > stdoutUsed) {
|
|
392447
|
-
break;
|
|
392448
|
-
}
|
|
392449
|
-
offset += 4;
|
|
392450
|
-
handleIncomingPacket(stdout.subarray(offset, offset + length));
|
|
392451
|
-
offset += length;
|
|
392452
|
-
}
|
|
392453
|
-
if (offset > 0) {
|
|
392454
|
-
stdout.copyWithin(0, offset, stdoutUsed);
|
|
392455
|
-
stdoutUsed -= offset;
|
|
392456
|
-
}
|
|
392457
|
-
};
|
|
392458
|
-
let afterClose = (error) => {
|
|
392459
|
-
closeData.didClose = true;
|
|
392460
|
-
if (error)
|
|
392461
|
-
closeData.reason = ": " + (error.message || error);
|
|
392462
|
-
const text = "The service was stopped" + closeData.reason;
|
|
392463
|
-
for (let id in responseCallbacks) {
|
|
392464
|
-
responseCallbacks[id](text, null);
|
|
392465
|
-
}
|
|
392466
|
-
responseCallbacks = {};
|
|
392467
|
-
};
|
|
392468
|
-
let sendRequest = (refs, value, callback) => {
|
|
392469
|
-
if (closeData.didClose)
|
|
392470
|
-
return callback("The service is no longer running" + closeData.reason, null);
|
|
392471
|
-
let id = nextRequestID++;
|
|
392472
|
-
responseCallbacks[id] = (error, response) => {
|
|
392473
|
-
try {
|
|
392474
|
-
callback(error, response);
|
|
392475
|
-
} finally {
|
|
392476
|
-
if (refs)
|
|
392477
|
-
refs.unref();
|
|
392478
|
-
}
|
|
392479
|
-
};
|
|
392480
|
-
if (refs)
|
|
392481
|
-
refs.ref();
|
|
392482
|
-
streamIn.writeToStdin(encodePacket({ id, isRequest: true, value }));
|
|
392483
|
-
};
|
|
392484
|
-
let sendResponse = (id, value) => {
|
|
392485
|
-
if (closeData.didClose)
|
|
392486
|
-
throw new Error("The service is no longer running" + closeData.reason);
|
|
392487
|
-
streamIn.writeToStdin(encodePacket({ id, isRequest: false, value }));
|
|
392488
|
-
};
|
|
392489
|
-
let handleRequest = async (id, request) => {
|
|
392490
|
-
try {
|
|
392491
|
-
if (request.command === "ping") {
|
|
392492
|
-
sendResponse(id, {});
|
|
392493
|
-
return;
|
|
392494
|
-
}
|
|
392495
|
-
if (typeof request.key === "number") {
|
|
392496
|
-
const requestCallbacks = requestCallbacksByKey[request.key];
|
|
392497
|
-
if (!requestCallbacks) {
|
|
392498
|
-
return;
|
|
392499
|
-
}
|
|
392500
|
-
const callback = requestCallbacks[request.command];
|
|
392501
|
-
if (callback) {
|
|
392502
|
-
await callback(id, request);
|
|
392503
|
-
return;
|
|
392504
|
-
}
|
|
392505
|
-
}
|
|
392506
|
-
throw new Error(`Invalid command: ` + request.command);
|
|
392507
|
-
} catch (e3) {
|
|
392508
|
-
const errors = [extractErrorMessageV8(e3, streamIn, null, void 0, "")];
|
|
392509
|
-
try {
|
|
392510
|
-
sendResponse(id, { errors });
|
|
392511
|
-
} catch {
|
|
392512
|
-
}
|
|
392513
|
-
}
|
|
392514
|
-
};
|
|
392515
|
-
let isFirstPacket = true;
|
|
392516
|
-
let handleIncomingPacket = (bytes) => {
|
|
392517
|
-
if (isFirstPacket) {
|
|
392518
|
-
isFirstPacket = false;
|
|
392519
|
-
let binaryVersion = String.fromCharCode(...bytes);
|
|
392520
|
-
if (binaryVersion !== "0.19.12") {
|
|
392521
|
-
throw new Error(`Cannot start service: Host version "${"0.19.12"}" does not match binary version ${quote2(binaryVersion)}`);
|
|
392522
|
-
}
|
|
392523
|
-
return;
|
|
392524
|
-
}
|
|
392525
|
-
let packet = decodePacket(bytes);
|
|
392526
|
-
if (packet.isRequest) {
|
|
392527
|
-
handleRequest(packet.id, packet.value);
|
|
392528
|
-
} else {
|
|
392529
|
-
let callback = responseCallbacks[packet.id];
|
|
392530
|
-
delete responseCallbacks[packet.id];
|
|
392531
|
-
if (packet.value.error)
|
|
392532
|
-
callback(packet.value.error, {});
|
|
392533
|
-
else
|
|
392534
|
-
callback(null, packet.value);
|
|
392535
|
-
}
|
|
392536
|
-
};
|
|
392537
|
-
let buildOrContext = ({ callName, refs, options: options8, isTTY: isTTY2, defaultWD: defaultWD2, callback }) => {
|
|
392538
|
-
let refCount = 0;
|
|
392539
|
-
const buildKey = nextBuildKey++;
|
|
392540
|
-
const requestCallbacks = {};
|
|
392541
|
-
const buildRefs = {
|
|
392542
|
-
ref() {
|
|
392543
|
-
if (++refCount === 1) {
|
|
392544
|
-
if (refs)
|
|
392545
|
-
refs.ref();
|
|
392546
|
-
}
|
|
392547
|
-
},
|
|
392548
|
-
unref() {
|
|
392549
|
-
if (--refCount === 0) {
|
|
392550
|
-
delete requestCallbacksByKey[buildKey];
|
|
392551
|
-
if (refs)
|
|
392552
|
-
refs.unref();
|
|
392553
|
-
}
|
|
392554
|
-
}
|
|
392555
|
-
};
|
|
392556
|
-
requestCallbacksByKey[buildKey] = requestCallbacks;
|
|
392557
|
-
buildRefs.ref();
|
|
392558
|
-
buildOrContextImpl(
|
|
392559
|
-
callName,
|
|
392560
|
-
buildKey,
|
|
392561
|
-
sendRequest,
|
|
392562
|
-
sendResponse,
|
|
392563
|
-
buildRefs,
|
|
392564
|
-
streamIn,
|
|
392565
|
-
requestCallbacks,
|
|
392566
|
-
options8,
|
|
392567
|
-
isTTY2,
|
|
392568
|
-
defaultWD2,
|
|
392569
|
-
(err, res) => {
|
|
392570
|
-
try {
|
|
392571
|
-
callback(err, res);
|
|
392572
|
-
} finally {
|
|
392573
|
-
buildRefs.unref();
|
|
392574
|
-
}
|
|
392575
|
-
}
|
|
392576
|
-
);
|
|
392577
|
-
};
|
|
392578
|
-
let transform22 = ({ callName, refs, input, options: options8, isTTY: isTTY2, fs: fs33, callback }) => {
|
|
392579
|
-
const details = createObjectStash();
|
|
392580
|
-
let start = (inputPath) => {
|
|
392581
|
-
try {
|
|
392582
|
-
if (typeof input !== "string" && !(input instanceof Uint8Array))
|
|
392583
|
-
throw new Error('The input to "transform" must be a string or a Uint8Array');
|
|
392584
|
-
let {
|
|
392585
|
-
flags,
|
|
392586
|
-
mangleCache
|
|
392587
|
-
} = flagsForTransformOptions(callName, options8, isTTY2, transformLogLevelDefault);
|
|
392588
|
-
let request = {
|
|
392589
|
-
command: "transform",
|
|
392590
|
-
flags,
|
|
392591
|
-
inputFS: inputPath !== null,
|
|
392592
|
-
input: inputPath !== null ? encodeUTF8(inputPath) : typeof input === "string" ? encodeUTF8(input) : input
|
|
392593
|
-
};
|
|
392594
|
-
if (mangleCache)
|
|
392595
|
-
request.mangleCache = mangleCache;
|
|
392596
|
-
sendRequest(refs, request, (error, response) => {
|
|
392597
|
-
if (error)
|
|
392598
|
-
return callback(new Error(error), null);
|
|
392599
|
-
let errors = replaceDetailsInMessages(response.errors, details);
|
|
392600
|
-
let warnings = replaceDetailsInMessages(response.warnings, details);
|
|
392601
|
-
let outstanding = 1;
|
|
392602
|
-
let next = () => {
|
|
392603
|
-
if (--outstanding === 0) {
|
|
392604
|
-
let result = {
|
|
392605
|
-
warnings,
|
|
392606
|
-
code: response.code,
|
|
392607
|
-
map: response.map,
|
|
392608
|
-
mangleCache: void 0,
|
|
392609
|
-
legalComments: void 0
|
|
392610
|
-
};
|
|
392611
|
-
if ("legalComments" in response)
|
|
392612
|
-
result.legalComments = response == null ? void 0 : response.legalComments;
|
|
392613
|
-
if (response.mangleCache)
|
|
392614
|
-
result.mangleCache = response == null ? void 0 : response.mangleCache;
|
|
392615
|
-
callback(null, result);
|
|
392616
|
-
}
|
|
392617
|
-
};
|
|
392618
|
-
if (errors.length > 0)
|
|
392619
|
-
return callback(failureErrorWithLog("Transform failed", errors, warnings), null);
|
|
392620
|
-
if (response.codeFS) {
|
|
392621
|
-
outstanding++;
|
|
392622
|
-
fs33.readFile(response.code, (err, contents) => {
|
|
392623
|
-
if (err !== null) {
|
|
392624
|
-
callback(err, null);
|
|
392625
|
-
} else {
|
|
392626
|
-
response.code = contents;
|
|
392627
|
-
next();
|
|
392628
|
-
}
|
|
392629
|
-
});
|
|
392630
|
-
}
|
|
392631
|
-
if (response.mapFS) {
|
|
392632
|
-
outstanding++;
|
|
392633
|
-
fs33.readFile(response.map, (err, contents) => {
|
|
392634
|
-
if (err !== null) {
|
|
392635
|
-
callback(err, null);
|
|
392636
|
-
} else {
|
|
392637
|
-
response.map = contents;
|
|
392638
|
-
next();
|
|
392639
|
-
}
|
|
392640
|
-
});
|
|
392641
|
-
}
|
|
392642
|
-
next();
|
|
392643
|
-
});
|
|
392644
|
-
} catch (e3) {
|
|
392645
|
-
let flags = [];
|
|
392646
|
-
try {
|
|
392647
|
-
pushLogFlags(flags, options8, {}, isTTY2, transformLogLevelDefault);
|
|
392648
|
-
} catch {
|
|
392649
|
-
}
|
|
392650
|
-
const error = extractErrorMessageV8(e3, streamIn, details, void 0, "");
|
|
392651
|
-
sendRequest(refs, { command: "error", flags, error }, () => {
|
|
392652
|
-
error.detail = details.load(error.detail);
|
|
392653
|
-
callback(failureErrorWithLog("Transform failed", [error], []), null);
|
|
392654
|
-
});
|
|
392655
|
-
}
|
|
392656
|
-
};
|
|
392657
|
-
if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) {
|
|
392658
|
-
let next = start;
|
|
392659
|
-
start = () => fs33.writeFile(input, next);
|
|
392660
|
-
}
|
|
392661
|
-
start(null);
|
|
392662
|
-
};
|
|
392663
|
-
let formatMessages2 = ({ callName, refs, messages: messages2, options: options8, callback }) => {
|
|
392664
|
-
if (!options8)
|
|
392665
|
-
throw new Error(`Missing second argument in ${callName}() call`);
|
|
392666
|
-
let keys = {};
|
|
392667
|
-
let kind = getFlag(options8, keys, "kind", mustBeString);
|
|
392668
|
-
let color = getFlag(options8, keys, "color", mustBeBoolean);
|
|
392669
|
-
let terminalWidth = getFlag(options8, keys, "terminalWidth", mustBeInteger);
|
|
392670
|
-
checkForInvalidFlags(options8, keys, `in ${callName}() call`);
|
|
392671
|
-
if (kind === void 0)
|
|
392672
|
-
throw new Error(`Missing "kind" in ${callName}() call`);
|
|
392673
|
-
if (kind !== "error" && kind !== "warning")
|
|
392674
|
-
throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`);
|
|
392675
|
-
let request = {
|
|
392676
|
-
command: "format-msgs",
|
|
392677
|
-
messages: sanitizeMessages(messages2, "messages", null, "", terminalWidth),
|
|
392678
|
-
isWarning: kind === "warning"
|
|
392679
|
-
};
|
|
392680
|
-
if (color !== void 0)
|
|
392681
|
-
request.color = color;
|
|
392682
|
-
if (terminalWidth !== void 0)
|
|
392683
|
-
request.terminalWidth = terminalWidth;
|
|
392684
|
-
sendRequest(refs, request, (error, response) => {
|
|
392685
|
-
if (error)
|
|
392686
|
-
return callback(new Error(error), null);
|
|
392687
|
-
callback(null, response.messages);
|
|
392688
|
-
});
|
|
392689
|
-
};
|
|
392690
|
-
let analyzeMetafile2 = ({ callName, refs, metafile, options: options8, callback }) => {
|
|
392691
|
-
if (options8 === void 0)
|
|
392692
|
-
options8 = {};
|
|
392693
|
-
let keys = {};
|
|
392694
|
-
let color = getFlag(options8, keys, "color", mustBeBoolean);
|
|
392695
|
-
let verbose = getFlag(options8, keys, "verbose", mustBeBoolean);
|
|
392696
|
-
checkForInvalidFlags(options8, keys, `in ${callName}() call`);
|
|
392697
|
-
let request = {
|
|
392698
|
-
command: "analyze-metafile",
|
|
392699
|
-
metafile
|
|
392700
|
-
};
|
|
392701
|
-
if (color !== void 0)
|
|
392702
|
-
request.color = color;
|
|
392703
|
-
if (verbose !== void 0)
|
|
392704
|
-
request.verbose = verbose;
|
|
392705
|
-
sendRequest(refs, request, (error, response) => {
|
|
392706
|
-
if (error)
|
|
392707
|
-
return callback(new Error(error), null);
|
|
392708
|
-
callback(null, response.result);
|
|
392709
|
-
});
|
|
392710
|
-
};
|
|
392711
|
-
return {
|
|
392712
|
-
readFromStdout,
|
|
392713
|
-
afterClose,
|
|
392714
|
-
service: {
|
|
392715
|
-
buildOrContext,
|
|
392716
|
-
transform: transform22,
|
|
392717
|
-
formatMessages: formatMessages2,
|
|
392718
|
-
analyzeMetafile: analyzeMetafile2
|
|
392719
|
-
}
|
|
392720
|
-
};
|
|
392721
|
-
}
|
|
392722
|
-
function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, options8, isTTY2, defaultWD2, callback) {
|
|
392723
|
-
const details = createObjectStash();
|
|
392724
|
-
const isContext = callName === "context";
|
|
392725
|
-
const handleError = (e3, pluginName) => {
|
|
392726
|
-
const flags = [];
|
|
392727
|
-
try {
|
|
392728
|
-
pushLogFlags(flags, options8, {}, isTTY2, buildLogLevelDefault);
|
|
392729
|
-
} catch {
|
|
392730
|
-
}
|
|
392731
|
-
const message = extractErrorMessageV8(e3, streamIn, details, void 0, pluginName);
|
|
392732
|
-
sendRequest(refs, { command: "error", flags, error: message }, () => {
|
|
392733
|
-
message.detail = details.load(message.detail);
|
|
392734
|
-
callback(failureErrorWithLog(isContext ? "Context failed" : "Build failed", [message], []), null);
|
|
392735
|
-
});
|
|
392736
|
-
};
|
|
392737
|
-
let plugins;
|
|
392738
|
-
if (typeof options8 === "object") {
|
|
392739
|
-
const value = options8.plugins;
|
|
392740
|
-
if (value !== void 0) {
|
|
392741
|
-
if (!Array.isArray(value))
|
|
392742
|
-
return handleError(new Error(`"plugins" must be an array`), "");
|
|
392743
|
-
plugins = value;
|
|
392744
|
-
}
|
|
392745
|
-
}
|
|
392746
|
-
if (plugins && plugins.length > 0) {
|
|
392747
|
-
if (streamIn.isSync)
|
|
392748
|
-
return handleError(new Error("Cannot use plugins in synchronous API calls"), "");
|
|
392749
|
-
handlePlugins(
|
|
392750
|
-
buildKey,
|
|
392751
|
-
sendRequest,
|
|
392752
|
-
sendResponse,
|
|
392753
|
-
refs,
|
|
392754
|
-
streamIn,
|
|
392755
|
-
requestCallbacks,
|
|
392756
|
-
options8,
|
|
392757
|
-
plugins,
|
|
392758
|
-
details
|
|
392759
|
-
).then(
|
|
392760
|
-
(result) => {
|
|
392761
|
-
if (!result.ok)
|
|
392762
|
-
return handleError(result.error, result.pluginName);
|
|
392763
|
-
try {
|
|
392764
|
-
buildOrContextContinue(result.requestPlugins, result.runOnEndCallbacks, result.scheduleOnDisposeCallbacks);
|
|
392765
|
-
} catch (e3) {
|
|
392766
|
-
handleError(e3, "");
|
|
392767
|
-
}
|
|
392768
|
-
},
|
|
392769
|
-
(e3) => handleError(e3, "")
|
|
392770
|
-
);
|
|
392771
|
-
return;
|
|
392772
|
-
}
|
|
392773
|
-
try {
|
|
392774
|
-
buildOrContextContinue(null, (result, done) => done([], []), () => {
|
|
392775
|
-
});
|
|
392776
|
-
} catch (e3) {
|
|
392777
|
-
handleError(e3, "");
|
|
392778
|
-
}
|
|
392779
|
-
function buildOrContextContinue(requestPlugins, runOnEndCallbacks, scheduleOnDisposeCallbacks) {
|
|
392780
|
-
const writeDefault = streamIn.hasFS;
|
|
392781
|
-
const {
|
|
392782
|
-
entries,
|
|
392783
|
-
flags,
|
|
392784
|
-
write,
|
|
392785
|
-
stdinContents,
|
|
392786
|
-
stdinResolveDir,
|
|
392787
|
-
absWorkingDir,
|
|
392788
|
-
nodePaths,
|
|
392789
|
-
mangleCache
|
|
392790
|
-
} = flagsForBuildOptions(callName, options8, isTTY2, buildLogLevelDefault, writeDefault);
|
|
392791
|
-
if (write && !streamIn.hasFS)
|
|
392792
|
-
throw new Error(`The "write" option is unavailable in this environment`);
|
|
392793
|
-
const request = {
|
|
392794
|
-
command: "build",
|
|
392795
|
-
key: buildKey,
|
|
392796
|
-
entries,
|
|
392797
|
-
flags,
|
|
392798
|
-
write,
|
|
392799
|
-
stdinContents,
|
|
392800
|
-
stdinResolveDir,
|
|
392801
|
-
absWorkingDir: absWorkingDir || defaultWD2,
|
|
392802
|
-
nodePaths,
|
|
392803
|
-
context: isContext
|
|
392804
|
-
};
|
|
392805
|
-
if (requestPlugins)
|
|
392806
|
-
request.plugins = requestPlugins;
|
|
392807
|
-
if (mangleCache)
|
|
392808
|
-
request.mangleCache = mangleCache;
|
|
392809
|
-
const buildResponseToResult = (response, callback2) => {
|
|
392810
|
-
const result = {
|
|
392811
|
-
errors: replaceDetailsInMessages(response.errors, details),
|
|
392812
|
-
warnings: replaceDetailsInMessages(response.warnings, details),
|
|
392813
|
-
outputFiles: void 0,
|
|
392814
|
-
metafile: void 0,
|
|
392815
|
-
mangleCache: void 0
|
|
392816
|
-
};
|
|
392817
|
-
const originalErrors = result.errors.slice();
|
|
392818
|
-
const originalWarnings = result.warnings.slice();
|
|
392819
|
-
if (response.outputFiles)
|
|
392820
|
-
result.outputFiles = response.outputFiles.map(convertOutputFiles);
|
|
392821
|
-
if (response.metafile)
|
|
392822
|
-
result.metafile = JSON.parse(response.metafile);
|
|
392823
|
-
if (response.mangleCache)
|
|
392824
|
-
result.mangleCache = response.mangleCache;
|
|
392825
|
-
if (response.writeToStdout !== void 0)
|
|
392826
|
-
console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, ""));
|
|
392827
|
-
runOnEndCallbacks(result, (onEndErrors, onEndWarnings) => {
|
|
392828
|
-
if (originalErrors.length > 0 || onEndErrors.length > 0) {
|
|
392829
|
-
const error = failureErrorWithLog("Build failed", originalErrors.concat(onEndErrors), originalWarnings.concat(onEndWarnings));
|
|
392830
|
-
return callback2(error, null, onEndErrors, onEndWarnings);
|
|
392831
|
-
}
|
|
392832
|
-
callback2(null, result, onEndErrors, onEndWarnings);
|
|
392833
|
-
});
|
|
392834
|
-
};
|
|
392835
|
-
let latestResultPromise;
|
|
392836
|
-
let provideLatestResult;
|
|
392837
|
-
if (isContext)
|
|
392838
|
-
requestCallbacks["on-end"] = (id, request2) => new Promise((resolve3) => {
|
|
392839
|
-
buildResponseToResult(request2, (err, result, onEndErrors, onEndWarnings) => {
|
|
392840
|
-
const response = {
|
|
392841
|
-
errors: onEndErrors,
|
|
392842
|
-
warnings: onEndWarnings
|
|
392843
|
-
};
|
|
392844
|
-
if (provideLatestResult)
|
|
392845
|
-
provideLatestResult(err, result);
|
|
392846
|
-
latestResultPromise = void 0;
|
|
392847
|
-
provideLatestResult = void 0;
|
|
392848
|
-
sendResponse(id, response);
|
|
392849
|
-
resolve3();
|
|
392850
|
-
});
|
|
392851
|
-
});
|
|
392852
|
-
sendRequest(refs, request, (error, response) => {
|
|
392853
|
-
if (error)
|
|
392854
|
-
return callback(new Error(error), null);
|
|
392855
|
-
if (!isContext) {
|
|
392856
|
-
return buildResponseToResult(response, (err, res) => {
|
|
392857
|
-
scheduleOnDisposeCallbacks();
|
|
392858
|
-
return callback(err, res);
|
|
392859
|
-
});
|
|
392860
|
-
}
|
|
392861
|
-
if (response.errors.length > 0) {
|
|
392862
|
-
return callback(failureErrorWithLog("Context failed", response.errors, response.warnings), null);
|
|
392863
|
-
}
|
|
392864
|
-
let didDispose = false;
|
|
392865
|
-
const result = {
|
|
392866
|
-
rebuild: () => {
|
|
392867
|
-
if (!latestResultPromise)
|
|
392868
|
-
latestResultPromise = new Promise((resolve3, reject) => {
|
|
392869
|
-
let settlePromise;
|
|
392870
|
-
provideLatestResult = (err, result2) => {
|
|
392871
|
-
if (!settlePromise)
|
|
392872
|
-
settlePromise = () => err ? reject(err) : resolve3(result2);
|
|
392873
|
-
};
|
|
392874
|
-
const triggerAnotherBuild = () => {
|
|
392875
|
-
const request2 = {
|
|
392876
|
-
command: "rebuild",
|
|
392877
|
-
key: buildKey
|
|
392878
|
-
};
|
|
392879
|
-
sendRequest(refs, request2, (error2, response2) => {
|
|
392880
|
-
if (error2) {
|
|
392881
|
-
reject(new Error(error2));
|
|
392882
|
-
} else if (settlePromise) {
|
|
392883
|
-
settlePromise();
|
|
392884
|
-
} else {
|
|
392885
|
-
triggerAnotherBuild();
|
|
392886
|
-
}
|
|
392887
|
-
});
|
|
392888
|
-
};
|
|
392889
|
-
triggerAnotherBuild();
|
|
392890
|
-
});
|
|
392891
|
-
return latestResultPromise;
|
|
392892
|
-
},
|
|
392893
|
-
watch: (options22 = {}) => new Promise((resolve3, reject) => {
|
|
392894
|
-
if (!streamIn.hasFS)
|
|
392895
|
-
throw new Error(`Cannot use the "watch" API in this environment`);
|
|
392896
|
-
const keys = {};
|
|
392897
|
-
checkForInvalidFlags(options22, keys, `in watch() call`);
|
|
392898
|
-
const request2 = {
|
|
392899
|
-
command: "watch",
|
|
392900
|
-
key: buildKey
|
|
392901
|
-
};
|
|
392902
|
-
sendRequest(refs, request2, (error2) => {
|
|
392903
|
-
if (error2)
|
|
392904
|
-
reject(new Error(error2));
|
|
392905
|
-
else
|
|
392906
|
-
resolve3(void 0);
|
|
392907
|
-
});
|
|
392908
|
-
}),
|
|
392909
|
-
serve: (options22 = {}) => new Promise((resolve3, reject) => {
|
|
392910
|
-
if (!streamIn.hasFS)
|
|
392911
|
-
throw new Error(`Cannot use the "serve" API in this environment`);
|
|
392912
|
-
const keys = {};
|
|
392913
|
-
const port = getFlag(options22, keys, "port", mustBeInteger);
|
|
392914
|
-
const host = getFlag(options22, keys, "host", mustBeString);
|
|
392915
|
-
const servedir = getFlag(options22, keys, "servedir", mustBeString);
|
|
392916
|
-
const keyfile = getFlag(options22, keys, "keyfile", mustBeString);
|
|
392917
|
-
const certfile = getFlag(options22, keys, "certfile", mustBeString);
|
|
392918
|
-
const fallback = getFlag(options22, keys, "fallback", mustBeString);
|
|
392919
|
-
const onRequest = getFlag(options22, keys, "onRequest", mustBeFunction);
|
|
392920
|
-
checkForInvalidFlags(options22, keys, `in serve() call`);
|
|
392921
|
-
const request2 = {
|
|
392922
|
-
command: "serve",
|
|
392923
|
-
key: buildKey,
|
|
392924
|
-
onRequest: !!onRequest
|
|
392925
|
-
};
|
|
392926
|
-
if (port !== void 0)
|
|
392927
|
-
request2.port = port;
|
|
392928
|
-
if (host !== void 0)
|
|
392929
|
-
request2.host = host;
|
|
392930
|
-
if (servedir !== void 0)
|
|
392931
|
-
request2.servedir = servedir;
|
|
392932
|
-
if (keyfile !== void 0)
|
|
392933
|
-
request2.keyfile = keyfile;
|
|
392934
|
-
if (certfile !== void 0)
|
|
392935
|
-
request2.certfile = certfile;
|
|
392936
|
-
if (fallback !== void 0)
|
|
392937
|
-
request2.fallback = fallback;
|
|
392938
|
-
sendRequest(refs, request2, (error2, response2) => {
|
|
392939
|
-
if (error2)
|
|
392940
|
-
return reject(new Error(error2));
|
|
392941
|
-
if (onRequest) {
|
|
392942
|
-
requestCallbacks["serve-request"] = (id, request3) => {
|
|
392943
|
-
onRequest(request3.args);
|
|
392944
|
-
sendResponse(id, {});
|
|
392945
|
-
};
|
|
392946
|
-
}
|
|
392947
|
-
resolve3(response2);
|
|
392948
|
-
});
|
|
392949
|
-
}),
|
|
392950
|
-
cancel: () => new Promise((resolve3) => {
|
|
392951
|
-
if (didDispose)
|
|
392952
|
-
return resolve3();
|
|
392953
|
-
const request2 = {
|
|
392954
|
-
command: "cancel",
|
|
392955
|
-
key: buildKey
|
|
392956
|
-
};
|
|
392957
|
-
sendRequest(refs, request2, () => {
|
|
392958
|
-
resolve3();
|
|
392959
|
-
});
|
|
392960
|
-
}),
|
|
392961
|
-
dispose: () => new Promise((resolve3) => {
|
|
392962
|
-
if (didDispose)
|
|
392963
|
-
return resolve3();
|
|
392964
|
-
didDispose = true;
|
|
392965
|
-
const request2 = {
|
|
392966
|
-
command: "dispose",
|
|
392967
|
-
key: buildKey
|
|
392968
|
-
};
|
|
392969
|
-
sendRequest(refs, request2, () => {
|
|
392970
|
-
resolve3();
|
|
392971
|
-
scheduleOnDisposeCallbacks();
|
|
392972
|
-
refs.unref();
|
|
392973
|
-
});
|
|
392974
|
-
})
|
|
392975
|
-
};
|
|
392976
|
-
refs.ref();
|
|
392977
|
-
callback(null, result);
|
|
392978
|
-
});
|
|
392979
|
-
}
|
|
392980
|
-
}
|
|
392981
|
-
var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, initialOptions, plugins, details) => {
|
|
392982
|
-
let onStartCallbacks = [];
|
|
392983
|
-
let onEndCallbacks = [];
|
|
392984
|
-
let onResolveCallbacks = {};
|
|
392985
|
-
let onLoadCallbacks = {};
|
|
392986
|
-
let onDisposeCallbacks = [];
|
|
392987
|
-
let nextCallbackID = 0;
|
|
392988
|
-
let i3 = 0;
|
|
392989
|
-
let requestPlugins = [];
|
|
392990
|
-
let isSetupDone = false;
|
|
392991
|
-
plugins = [...plugins];
|
|
392992
|
-
for (let item of plugins) {
|
|
392993
|
-
let keys = {};
|
|
392994
|
-
if (typeof item !== "object")
|
|
392995
|
-
throw new Error(`Plugin at index ${i3} must be an object`);
|
|
392996
|
-
const name = getFlag(item, keys, "name", mustBeString);
|
|
392997
|
-
if (typeof name !== "string" || name === "")
|
|
392998
|
-
throw new Error(`Plugin at index ${i3} is missing a name`);
|
|
392999
|
-
try {
|
|
393000
|
-
let setup = getFlag(item, keys, "setup", mustBeFunction);
|
|
393001
|
-
if (typeof setup !== "function")
|
|
393002
|
-
throw new Error(`Plugin is missing a setup function`);
|
|
393003
|
-
checkForInvalidFlags(item, keys, `on plugin ${quote2(name)}`);
|
|
393004
|
-
let plugin = {
|
|
393005
|
-
name,
|
|
393006
|
-
onStart: false,
|
|
393007
|
-
onEnd: false,
|
|
393008
|
-
onResolve: [],
|
|
393009
|
-
onLoad: []
|
|
393010
|
-
};
|
|
393011
|
-
i3++;
|
|
393012
|
-
let resolve3 = (path32, options8 = {}) => {
|
|
393013
|
-
if (!isSetupDone)
|
|
393014
|
-
throw new Error('Cannot call "resolve" before plugin setup has completed');
|
|
393015
|
-
if (typeof path32 !== "string")
|
|
393016
|
-
throw new Error(`The path to resolve must be a string`);
|
|
393017
|
-
let keys2 = /* @__PURE__ */ Object.create(null);
|
|
393018
|
-
let pluginName = getFlag(options8, keys2, "pluginName", mustBeString);
|
|
393019
|
-
let importer = getFlag(options8, keys2, "importer", mustBeString);
|
|
393020
|
-
let namespace = getFlag(options8, keys2, "namespace", mustBeString);
|
|
393021
|
-
let resolveDir = getFlag(options8, keys2, "resolveDir", mustBeString);
|
|
393022
|
-
let kind = getFlag(options8, keys2, "kind", mustBeString);
|
|
393023
|
-
let pluginData = getFlag(options8, keys2, "pluginData", canBeAnything);
|
|
393024
|
-
checkForInvalidFlags(options8, keys2, "in resolve() call");
|
|
393025
|
-
return new Promise((resolve22, reject) => {
|
|
393026
|
-
const request = {
|
|
393027
|
-
command: "resolve",
|
|
393028
|
-
path: path32,
|
|
393029
|
-
key: buildKey,
|
|
393030
|
-
pluginName: name
|
|
393031
|
-
};
|
|
393032
|
-
if (pluginName != null)
|
|
393033
|
-
request.pluginName = pluginName;
|
|
393034
|
-
if (importer != null)
|
|
393035
|
-
request.importer = importer;
|
|
393036
|
-
if (namespace != null)
|
|
393037
|
-
request.namespace = namespace;
|
|
393038
|
-
if (resolveDir != null)
|
|
393039
|
-
request.resolveDir = resolveDir;
|
|
393040
|
-
if (kind != null)
|
|
393041
|
-
request.kind = kind;
|
|
393042
|
-
else
|
|
393043
|
-
throw new Error(`Must specify "kind" when calling "resolve"`);
|
|
393044
|
-
if (pluginData != null)
|
|
393045
|
-
request.pluginData = details.store(pluginData);
|
|
393046
|
-
sendRequest(refs, request, (error, response) => {
|
|
393047
|
-
if (error !== null)
|
|
393048
|
-
reject(new Error(error));
|
|
393049
|
-
else
|
|
393050
|
-
resolve22({
|
|
393051
|
-
errors: replaceDetailsInMessages(response.errors, details),
|
|
393052
|
-
warnings: replaceDetailsInMessages(response.warnings, details),
|
|
393053
|
-
path: response.path,
|
|
393054
|
-
external: response.external,
|
|
393055
|
-
sideEffects: response.sideEffects,
|
|
393056
|
-
namespace: response.namespace,
|
|
393057
|
-
suffix: response.suffix,
|
|
393058
|
-
pluginData: details.load(response.pluginData)
|
|
393059
|
-
});
|
|
393060
|
-
});
|
|
393061
|
-
});
|
|
393062
|
-
};
|
|
393063
|
-
let promise = setup({
|
|
393064
|
-
initialOptions,
|
|
393065
|
-
resolve: resolve3,
|
|
393066
|
-
onStart(callback) {
|
|
393067
|
-
let registeredText = `This error came from the "onStart" callback registered here:`;
|
|
393068
|
-
let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart");
|
|
393069
|
-
onStartCallbacks.push({ name, callback, note: registeredNote });
|
|
393070
|
-
plugin.onStart = true;
|
|
393071
|
-
},
|
|
393072
|
-
onEnd(callback) {
|
|
393073
|
-
let registeredText = `This error came from the "onEnd" callback registered here:`;
|
|
393074
|
-
let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd");
|
|
393075
|
-
onEndCallbacks.push({ name, callback, note: registeredNote });
|
|
393076
|
-
plugin.onEnd = true;
|
|
393077
|
-
},
|
|
393078
|
-
onResolve(options8, callback) {
|
|
393079
|
-
let registeredText = `This error came from the "onResolve" callback registered here:`;
|
|
393080
|
-
let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve");
|
|
393081
|
-
let keys2 = {};
|
|
393082
|
-
let filter3 = getFlag(options8, keys2, "filter", mustBeRegExp);
|
|
393083
|
-
let namespace = getFlag(options8, keys2, "namespace", mustBeString);
|
|
393084
|
-
checkForInvalidFlags(options8, keys2, `in onResolve() call for plugin ${quote2(name)}`);
|
|
393085
|
-
if (filter3 == null)
|
|
393086
|
-
throw new Error(`onResolve() call is missing a filter`);
|
|
393087
|
-
let id = nextCallbackID++;
|
|
393088
|
-
onResolveCallbacks[id] = { name, callback, note: registeredNote };
|
|
393089
|
-
plugin.onResolve.push({ id, filter: filter3.source, namespace: namespace || "" });
|
|
393090
|
-
},
|
|
393091
|
-
onLoad(options8, callback) {
|
|
393092
|
-
let registeredText = `This error came from the "onLoad" callback registered here:`;
|
|
393093
|
-
let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad");
|
|
393094
|
-
let keys2 = {};
|
|
393095
|
-
let filter3 = getFlag(options8, keys2, "filter", mustBeRegExp);
|
|
393096
|
-
let namespace = getFlag(options8, keys2, "namespace", mustBeString);
|
|
393097
|
-
checkForInvalidFlags(options8, keys2, `in onLoad() call for plugin ${quote2(name)}`);
|
|
393098
|
-
if (filter3 == null)
|
|
393099
|
-
throw new Error(`onLoad() call is missing a filter`);
|
|
393100
|
-
let id = nextCallbackID++;
|
|
393101
|
-
onLoadCallbacks[id] = { name, callback, note: registeredNote };
|
|
393102
|
-
plugin.onLoad.push({ id, filter: filter3.source, namespace: namespace || "" });
|
|
393103
|
-
},
|
|
393104
|
-
onDispose(callback) {
|
|
393105
|
-
onDisposeCallbacks.push(callback);
|
|
393106
|
-
},
|
|
393107
|
-
esbuild: streamIn.esbuild
|
|
393108
|
-
});
|
|
393109
|
-
if (promise)
|
|
393110
|
-
await promise;
|
|
393111
|
-
requestPlugins.push(plugin);
|
|
393112
|
-
} catch (e3) {
|
|
393113
|
-
return { ok: false, error: e3, pluginName: name };
|
|
393114
|
-
}
|
|
393115
|
-
}
|
|
393116
|
-
requestCallbacks["on-start"] = async (id, request) => {
|
|
393117
|
-
let response = { errors: [], warnings: [] };
|
|
393118
|
-
await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => {
|
|
393119
|
-
try {
|
|
393120
|
-
let result = await callback();
|
|
393121
|
-
if (result != null) {
|
|
393122
|
-
if (typeof result !== "object")
|
|
393123
|
-
throw new Error(`Expected onStart() callback in plugin ${quote2(name)} to return an object`);
|
|
393124
|
-
let keys = {};
|
|
393125
|
-
let errors = getFlag(result, keys, "errors", mustBeArray);
|
|
393126
|
-
let warnings = getFlag(result, keys, "warnings", mustBeArray);
|
|
393127
|
-
checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${quote2(name)}`);
|
|
393128
|
-
if (errors != null)
|
|
393129
|
-
response.errors.push(...sanitizeMessages(errors, "errors", details, name, void 0));
|
|
393130
|
-
if (warnings != null)
|
|
393131
|
-
response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name, void 0));
|
|
393132
|
-
}
|
|
393133
|
-
} catch (e3) {
|
|
393134
|
-
response.errors.push(extractErrorMessageV8(e3, streamIn, details, note && note(), name));
|
|
393135
|
-
}
|
|
393136
|
-
}));
|
|
393137
|
-
sendResponse(id, response);
|
|
393138
|
-
};
|
|
393139
|
-
requestCallbacks["on-resolve"] = async (id, request) => {
|
|
393140
|
-
let response = {}, name = "", callback, note;
|
|
393141
|
-
for (let id2 of request.ids) {
|
|
393142
|
-
try {
|
|
393143
|
-
({ name, callback, note } = onResolveCallbacks[id2]);
|
|
393144
|
-
let result = await callback({
|
|
393145
|
-
path: request.path,
|
|
393146
|
-
importer: request.importer,
|
|
393147
|
-
namespace: request.namespace,
|
|
393148
|
-
resolveDir: request.resolveDir,
|
|
393149
|
-
kind: request.kind,
|
|
393150
|
-
pluginData: details.load(request.pluginData)
|
|
393151
|
-
});
|
|
393152
|
-
if (result != null) {
|
|
393153
|
-
if (typeof result !== "object")
|
|
393154
|
-
throw new Error(`Expected onResolve() callback in plugin ${quote2(name)} to return an object`);
|
|
393155
|
-
let keys = {};
|
|
393156
|
-
let pluginName = getFlag(result, keys, "pluginName", mustBeString);
|
|
393157
|
-
let path32 = getFlag(result, keys, "path", mustBeString);
|
|
393158
|
-
let namespace = getFlag(result, keys, "namespace", mustBeString);
|
|
393159
|
-
let suffix = getFlag(result, keys, "suffix", mustBeString);
|
|
393160
|
-
let external = getFlag(result, keys, "external", mustBeBoolean);
|
|
393161
|
-
let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean);
|
|
393162
|
-
let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
|
|
393163
|
-
let errors = getFlag(result, keys, "errors", mustBeArray);
|
|
393164
|
-
let warnings = getFlag(result, keys, "warnings", mustBeArray);
|
|
393165
|
-
let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray);
|
|
393166
|
-
let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray);
|
|
393167
|
-
checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${quote2(name)}`);
|
|
393168
|
-
response.id = id2;
|
|
393169
|
-
if (pluginName != null)
|
|
393170
|
-
response.pluginName = pluginName;
|
|
393171
|
-
if (path32 != null)
|
|
393172
|
-
response.path = path32;
|
|
393173
|
-
if (namespace != null)
|
|
393174
|
-
response.namespace = namespace;
|
|
393175
|
-
if (suffix != null)
|
|
393176
|
-
response.suffix = suffix;
|
|
393177
|
-
if (external != null)
|
|
393178
|
-
response.external = external;
|
|
393179
|
-
if (sideEffects != null)
|
|
393180
|
-
response.sideEffects = sideEffects;
|
|
393181
|
-
if (pluginData != null)
|
|
393182
|
-
response.pluginData = details.store(pluginData);
|
|
393183
|
-
if (errors != null)
|
|
393184
|
-
response.errors = sanitizeMessages(errors, "errors", details, name, void 0);
|
|
393185
|
-
if (warnings != null)
|
|
393186
|
-
response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0);
|
|
393187
|
-
if (watchFiles != null)
|
|
393188
|
-
response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
|
|
393189
|
-
if (watchDirs != null)
|
|
393190
|
-
response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
|
|
393191
|
-
break;
|
|
393192
|
-
}
|
|
393193
|
-
} catch (e3) {
|
|
393194
|
-
response = { id: id2, errors: [extractErrorMessageV8(e3, streamIn, details, note && note(), name)] };
|
|
393195
|
-
break;
|
|
393196
|
-
}
|
|
393197
|
-
}
|
|
393198
|
-
sendResponse(id, response);
|
|
393199
|
-
};
|
|
393200
|
-
requestCallbacks["on-load"] = async (id, request) => {
|
|
393201
|
-
let response = {}, name = "", callback, note;
|
|
393202
|
-
for (let id2 of request.ids) {
|
|
393203
|
-
try {
|
|
393204
|
-
({ name, callback, note } = onLoadCallbacks[id2]);
|
|
393205
|
-
let result = await callback({
|
|
393206
|
-
path: request.path,
|
|
393207
|
-
namespace: request.namespace,
|
|
393208
|
-
suffix: request.suffix,
|
|
393209
|
-
pluginData: details.load(request.pluginData),
|
|
393210
|
-
with: request.with
|
|
393211
|
-
});
|
|
393212
|
-
if (result != null) {
|
|
393213
|
-
if (typeof result !== "object")
|
|
393214
|
-
throw new Error(`Expected onLoad() callback in plugin ${quote2(name)} to return an object`);
|
|
393215
|
-
let keys = {};
|
|
393216
|
-
let pluginName = getFlag(result, keys, "pluginName", mustBeString);
|
|
393217
|
-
let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array);
|
|
393218
|
-
let resolveDir = getFlag(result, keys, "resolveDir", mustBeString);
|
|
393219
|
-
let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
|
|
393220
|
-
let loader2 = getFlag(result, keys, "loader", mustBeString);
|
|
393221
|
-
let errors = getFlag(result, keys, "errors", mustBeArray);
|
|
393222
|
-
let warnings = getFlag(result, keys, "warnings", mustBeArray);
|
|
393223
|
-
let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray);
|
|
393224
|
-
let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray);
|
|
393225
|
-
checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${quote2(name)}`);
|
|
393226
|
-
response.id = id2;
|
|
393227
|
-
if (pluginName != null)
|
|
393228
|
-
response.pluginName = pluginName;
|
|
393229
|
-
if (contents instanceof Uint8Array)
|
|
393230
|
-
response.contents = contents;
|
|
393231
|
-
else if (contents != null)
|
|
393232
|
-
response.contents = encodeUTF8(contents);
|
|
393233
|
-
if (resolveDir != null)
|
|
393234
|
-
response.resolveDir = resolveDir;
|
|
393235
|
-
if (pluginData != null)
|
|
393236
|
-
response.pluginData = details.store(pluginData);
|
|
393237
|
-
if (loader2 != null)
|
|
393238
|
-
response.loader = loader2;
|
|
393239
|
-
if (errors != null)
|
|
393240
|
-
response.errors = sanitizeMessages(errors, "errors", details, name, void 0);
|
|
393241
|
-
if (warnings != null)
|
|
393242
|
-
response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0);
|
|
393243
|
-
if (watchFiles != null)
|
|
393244
|
-
response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
|
|
393245
|
-
if (watchDirs != null)
|
|
393246
|
-
response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
|
|
393247
|
-
break;
|
|
393248
|
-
}
|
|
393249
|
-
} catch (e3) {
|
|
393250
|
-
response = { id: id2, errors: [extractErrorMessageV8(e3, streamIn, details, note && note(), name)] };
|
|
393251
|
-
break;
|
|
393252
|
-
}
|
|
393253
|
-
}
|
|
393254
|
-
sendResponse(id, response);
|
|
393255
|
-
};
|
|
393256
|
-
let runOnEndCallbacks = (result, done) => done([], []);
|
|
393257
|
-
if (onEndCallbacks.length > 0) {
|
|
393258
|
-
runOnEndCallbacks = (result, done) => {
|
|
393259
|
-
(async () => {
|
|
393260
|
-
const onEndErrors = [];
|
|
393261
|
-
const onEndWarnings = [];
|
|
393262
|
-
for (const { name, callback, note } of onEndCallbacks) {
|
|
393263
|
-
let newErrors;
|
|
393264
|
-
let newWarnings;
|
|
393265
|
-
try {
|
|
393266
|
-
const value = await callback(result);
|
|
393267
|
-
if (value != null) {
|
|
393268
|
-
if (typeof value !== "object")
|
|
393269
|
-
throw new Error(`Expected onEnd() callback in plugin ${quote2(name)} to return an object`);
|
|
393270
|
-
let keys = {};
|
|
393271
|
-
let errors = getFlag(value, keys, "errors", mustBeArray);
|
|
393272
|
-
let warnings = getFlag(value, keys, "warnings", mustBeArray);
|
|
393273
|
-
checkForInvalidFlags(value, keys, `from onEnd() callback in plugin ${quote2(name)}`);
|
|
393274
|
-
if (errors != null)
|
|
393275
|
-
newErrors = sanitizeMessages(errors, "errors", details, name, void 0);
|
|
393276
|
-
if (warnings != null)
|
|
393277
|
-
newWarnings = sanitizeMessages(warnings, "warnings", details, name, void 0);
|
|
393278
|
-
}
|
|
393279
|
-
} catch (e3) {
|
|
393280
|
-
newErrors = [extractErrorMessageV8(e3, streamIn, details, note && note(), name)];
|
|
393281
|
-
}
|
|
393282
|
-
if (newErrors) {
|
|
393283
|
-
onEndErrors.push(...newErrors);
|
|
393284
|
-
try {
|
|
393285
|
-
result.errors.push(...newErrors);
|
|
393286
|
-
} catch {
|
|
393287
|
-
}
|
|
393288
|
-
}
|
|
393289
|
-
if (newWarnings) {
|
|
393290
|
-
onEndWarnings.push(...newWarnings);
|
|
393291
|
-
try {
|
|
393292
|
-
result.warnings.push(...newWarnings);
|
|
393293
|
-
} catch {
|
|
393294
|
-
}
|
|
393295
|
-
}
|
|
393296
|
-
}
|
|
393297
|
-
done(onEndErrors, onEndWarnings);
|
|
393298
|
-
})();
|
|
393299
|
-
};
|
|
393300
|
-
}
|
|
393301
|
-
let scheduleOnDisposeCallbacks = () => {
|
|
393302
|
-
for (const cb of onDisposeCallbacks) {
|
|
393303
|
-
setTimeout(() => cb(), 0);
|
|
393304
|
-
}
|
|
393305
|
-
};
|
|
393306
|
-
isSetupDone = true;
|
|
393307
|
-
return {
|
|
393308
|
-
ok: true,
|
|
393309
|
-
requestPlugins,
|
|
393310
|
-
runOnEndCallbacks,
|
|
393311
|
-
scheduleOnDisposeCallbacks
|
|
393312
|
-
};
|
|
393313
|
-
};
|
|
393314
|
-
function createObjectStash() {
|
|
393315
|
-
const map2 = /* @__PURE__ */ new Map();
|
|
393316
|
-
let nextID = 0;
|
|
393317
|
-
return {
|
|
393318
|
-
load(id) {
|
|
393319
|
-
return map2.get(id);
|
|
393320
|
-
},
|
|
393321
|
-
store(value) {
|
|
393322
|
-
if (value === void 0)
|
|
393323
|
-
return -1;
|
|
393324
|
-
const id = nextID++;
|
|
393325
|
-
map2.set(id, value);
|
|
393326
|
-
return id;
|
|
393327
|
-
}
|
|
393328
|
-
};
|
|
393329
|
-
}
|
|
393330
|
-
function extractCallerV8(e3, streamIn, ident) {
|
|
393331
|
-
let note;
|
|
393332
|
-
let tried = false;
|
|
393333
|
-
return () => {
|
|
393334
|
-
if (tried)
|
|
393335
|
-
return note;
|
|
393336
|
-
tried = true;
|
|
393337
|
-
try {
|
|
393338
|
-
let lines = (e3.stack + "").split("\n");
|
|
393339
|
-
lines.splice(1, 1);
|
|
393340
|
-
let location = parseStackLinesV8(streamIn, lines, ident);
|
|
393341
|
-
if (location) {
|
|
393342
|
-
note = { text: e3.message, location };
|
|
393343
|
-
return note;
|
|
393344
|
-
}
|
|
393345
|
-
} catch {
|
|
393346
|
-
}
|
|
393347
|
-
};
|
|
393348
|
-
}
|
|
393349
|
-
function extractErrorMessageV8(e3, streamIn, stash, note, pluginName) {
|
|
393350
|
-
let text = "Internal error";
|
|
393351
|
-
let location = null;
|
|
393352
|
-
try {
|
|
393353
|
-
text = (e3 && e3.message || e3) + "";
|
|
393354
|
-
} catch {
|
|
393355
|
-
}
|
|
393356
|
-
try {
|
|
393357
|
-
location = parseStackLinesV8(streamIn, (e3.stack + "").split("\n"), "");
|
|
393358
|
-
} catch {
|
|
393359
|
-
}
|
|
393360
|
-
return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e3) : -1 };
|
|
393361
|
-
}
|
|
393362
|
-
function parseStackLinesV8(streamIn, lines, ident) {
|
|
393363
|
-
let at8 = " at ";
|
|
393364
|
-
if (streamIn.readFileSync && !lines[0].startsWith(at8) && lines[1].startsWith(at8)) {
|
|
393365
|
-
for (let i3 = 1; i3 < lines.length; i3++) {
|
|
393366
|
-
let line3 = lines[i3];
|
|
393367
|
-
if (!line3.startsWith(at8))
|
|
393368
|
-
continue;
|
|
393369
|
-
line3 = line3.slice(at8.length);
|
|
393370
|
-
while (true) {
|
|
393371
|
-
let match2 = /^(?:new |async )?\S+ \((.*)\)$/.exec(line3);
|
|
393372
|
-
if (match2) {
|
|
393373
|
-
line3 = match2[1];
|
|
393374
|
-
continue;
|
|
393375
|
-
}
|
|
393376
|
-
match2 = /^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(line3);
|
|
393377
|
-
if (match2) {
|
|
393378
|
-
line3 = match2[1];
|
|
393379
|
-
continue;
|
|
393380
|
-
}
|
|
393381
|
-
match2 = /^(\S+):(\d+):(\d+)$/.exec(line3);
|
|
393382
|
-
if (match2) {
|
|
393383
|
-
let contents;
|
|
393384
|
-
try {
|
|
393385
|
-
contents = streamIn.readFileSync(match2[1], "utf8");
|
|
393386
|
-
} catch {
|
|
393387
|
-
break;
|
|
393388
|
-
}
|
|
393389
|
-
let lineText = contents.split(/\r\n|\r|\n|\u2028|\u2029/)[+match2[2] - 1] || "";
|
|
393390
|
-
let column2 = +match2[3] - 1;
|
|
393391
|
-
let length = lineText.slice(column2, column2 + ident.length) === ident ? ident.length : 0;
|
|
393392
|
-
return {
|
|
393393
|
-
file: match2[1],
|
|
393394
|
-
namespace: "file",
|
|
393395
|
-
line: +match2[2],
|
|
393396
|
-
column: encodeUTF8(lineText.slice(0, column2)).length,
|
|
393397
|
-
length: encodeUTF8(lineText.slice(column2, column2 + length)).length,
|
|
393398
|
-
lineText: lineText + "\n" + lines.slice(1).join("\n"),
|
|
393399
|
-
suggestion: ""
|
|
393400
|
-
};
|
|
393401
|
-
}
|
|
393402
|
-
break;
|
|
393403
|
-
}
|
|
393404
|
-
}
|
|
393405
|
-
}
|
|
393406
|
-
return null;
|
|
393407
|
-
}
|
|
393408
|
-
function failureErrorWithLog(text, errors, warnings) {
|
|
393409
|
-
let limit = 5;
|
|
393410
|
-
text += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e3, i3) => {
|
|
393411
|
-
if (i3 === limit)
|
|
393412
|
-
return "\n...";
|
|
393413
|
-
if (!e3.location)
|
|
393414
|
-
return `
|
|
393415
|
-
error: ${e3.text}`;
|
|
393416
|
-
let { file, line: line3, column: column2 } = e3.location;
|
|
393417
|
-
let pluginText = e3.pluginName ? `[plugin: ${e3.pluginName}] ` : "";
|
|
393418
|
-
return `
|
|
393419
|
-
${file}:${line3}:${column2}: ERROR: ${pluginText}${e3.text}`;
|
|
393420
|
-
}).join("");
|
|
393421
|
-
let error = new Error(text);
|
|
393422
|
-
for (const [key2, value] of [["errors", errors], ["warnings", warnings]]) {
|
|
393423
|
-
Object.defineProperty(error, key2, {
|
|
393424
|
-
configurable: true,
|
|
393425
|
-
enumerable: true,
|
|
393426
|
-
get: () => value,
|
|
393427
|
-
set: (value2) => Object.defineProperty(error, key2, {
|
|
393428
|
-
configurable: true,
|
|
393429
|
-
enumerable: true,
|
|
393430
|
-
value: value2
|
|
393431
|
-
})
|
|
393432
|
-
});
|
|
393433
|
-
}
|
|
393434
|
-
return error;
|
|
393435
|
-
}
|
|
393436
|
-
function replaceDetailsInMessages(messages2, stash) {
|
|
393437
|
-
for (const message of messages2) {
|
|
393438
|
-
message.detail = stash.load(message.detail);
|
|
393439
|
-
}
|
|
393440
|
-
return messages2;
|
|
393441
|
-
}
|
|
393442
|
-
function sanitizeLocation(location, where, terminalWidth) {
|
|
393443
|
-
if (location == null)
|
|
393444
|
-
return null;
|
|
393445
|
-
let keys = {};
|
|
393446
|
-
let file = getFlag(location, keys, "file", mustBeString);
|
|
393447
|
-
let namespace = getFlag(location, keys, "namespace", mustBeString);
|
|
393448
|
-
let line3 = getFlag(location, keys, "line", mustBeInteger);
|
|
393449
|
-
let column2 = getFlag(location, keys, "column", mustBeInteger);
|
|
393450
|
-
let length = getFlag(location, keys, "length", mustBeInteger);
|
|
393451
|
-
let lineText = getFlag(location, keys, "lineText", mustBeString);
|
|
393452
|
-
let suggestion = getFlag(location, keys, "suggestion", mustBeString);
|
|
393453
|
-
checkForInvalidFlags(location, keys, where);
|
|
393454
|
-
if (lineText) {
|
|
393455
|
-
const relevantASCII = lineText.slice(
|
|
393456
|
-
0,
|
|
393457
|
-
(column2 && column2 > 0 ? column2 : 0) + (length && length > 0 ? length : 0) + (terminalWidth && terminalWidth > 0 ? terminalWidth : 80)
|
|
393458
|
-
);
|
|
393459
|
-
if (!/[\x7F-\uFFFF]/.test(relevantASCII) && !/\n/.test(lineText)) {
|
|
393460
|
-
lineText = relevantASCII;
|
|
393461
|
-
}
|
|
393462
|
-
}
|
|
393463
|
-
return {
|
|
393464
|
-
file: file || "",
|
|
393465
|
-
namespace: namespace || "",
|
|
393466
|
-
line: line3 || 0,
|
|
393467
|
-
column: column2 || 0,
|
|
393468
|
-
length: length || 0,
|
|
393469
|
-
lineText: lineText || "",
|
|
393470
|
-
suggestion: suggestion || ""
|
|
393471
|
-
};
|
|
393472
|
-
}
|
|
393473
|
-
function sanitizeMessages(messages2, property, stash, fallbackPluginName, terminalWidth) {
|
|
393474
|
-
let messagesClone = [];
|
|
393475
|
-
let index = 0;
|
|
393476
|
-
for (const message of messages2) {
|
|
393477
|
-
let keys = {};
|
|
393478
|
-
let id = getFlag(message, keys, "id", mustBeString);
|
|
393479
|
-
let pluginName = getFlag(message, keys, "pluginName", mustBeString);
|
|
393480
|
-
let text = getFlag(message, keys, "text", mustBeString);
|
|
393481
|
-
let location = getFlag(message, keys, "location", mustBeObjectOrNull);
|
|
393482
|
-
let notes = getFlag(message, keys, "notes", mustBeArray);
|
|
393483
|
-
let detail = getFlag(message, keys, "detail", canBeAnything);
|
|
393484
|
-
let where = `in element ${index} of "${property}"`;
|
|
393485
|
-
checkForInvalidFlags(message, keys, where);
|
|
393486
|
-
let notesClone = [];
|
|
393487
|
-
if (notes) {
|
|
393488
|
-
for (const note of notes) {
|
|
393489
|
-
let noteKeys = {};
|
|
393490
|
-
let noteText = getFlag(note, noteKeys, "text", mustBeString);
|
|
393491
|
-
let noteLocation = getFlag(note, noteKeys, "location", mustBeObjectOrNull);
|
|
393492
|
-
checkForInvalidFlags(note, noteKeys, where);
|
|
393493
|
-
notesClone.push({
|
|
393494
|
-
text: noteText || "",
|
|
393495
|
-
location: sanitizeLocation(noteLocation, where, terminalWidth)
|
|
393496
|
-
});
|
|
393497
|
-
}
|
|
393498
|
-
}
|
|
393499
|
-
messagesClone.push({
|
|
393500
|
-
id: id || "",
|
|
393501
|
-
pluginName: pluginName || fallbackPluginName,
|
|
393502
|
-
text: text || "",
|
|
393503
|
-
location: sanitizeLocation(location, where, terminalWidth),
|
|
393504
|
-
notes: notesClone,
|
|
393505
|
-
detail: stash ? stash.store(detail) : -1
|
|
393506
|
-
});
|
|
393507
|
-
index++;
|
|
393508
|
-
}
|
|
393509
|
-
return messagesClone;
|
|
393510
|
-
}
|
|
393511
|
-
function sanitizeStringArray(values, property) {
|
|
393512
|
-
const result = [];
|
|
393513
|
-
for (const value of values) {
|
|
393514
|
-
if (typeof value !== "string")
|
|
393515
|
-
throw new Error(`${quote2(property)} must be an array of strings`);
|
|
393516
|
-
result.push(value);
|
|
393517
|
-
}
|
|
393518
|
-
return result;
|
|
393519
|
-
}
|
|
393520
|
-
function convertOutputFiles({ path: path32, contents, hash }) {
|
|
393521
|
-
let text = null;
|
|
393522
|
-
return {
|
|
393523
|
-
path: path32,
|
|
393524
|
-
contents,
|
|
393525
|
-
hash,
|
|
393526
|
-
get text() {
|
|
393527
|
-
const binary2 = this.contents;
|
|
393528
|
-
if (text === null || binary2 !== contents) {
|
|
393529
|
-
contents = binary2;
|
|
393530
|
-
text = decodeUTF8(binary2);
|
|
393531
|
-
}
|
|
393532
|
-
return text;
|
|
393533
|
-
}
|
|
393534
|
-
};
|
|
393535
|
-
}
|
|
393536
|
-
var fs7 = require("fs");
|
|
393537
|
-
var os6 = require("os");
|
|
393538
|
-
var path14 = require("path");
|
|
393539
|
-
var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
|
|
393540
|
-
var isValidBinaryPath = (x5) => !!x5 && x5 !== "/usr/bin/esbuild";
|
|
393541
|
-
var packageDarwin_arm64 = "@esbuild/darwin-arm64";
|
|
393542
|
-
var packageDarwin_x64 = "@esbuild/darwin-x64";
|
|
393543
|
-
var knownWindowsPackages = {
|
|
393544
|
-
"win32 arm64 LE": "@esbuild/win32-arm64",
|
|
393545
|
-
"win32 ia32 LE": "@esbuild/win32-ia32",
|
|
393546
|
-
"win32 x64 LE": "@esbuild/win32-x64"
|
|
393547
|
-
};
|
|
393548
|
-
var knownUnixlikePackages = {
|
|
393549
|
-
"aix ppc64 BE": "@esbuild/aix-ppc64",
|
|
393550
|
-
"android arm64 LE": "@esbuild/android-arm64",
|
|
393551
|
-
"darwin arm64 LE": "@esbuild/darwin-arm64",
|
|
393552
|
-
"darwin x64 LE": "@esbuild/darwin-x64",
|
|
393553
|
-
"freebsd arm64 LE": "@esbuild/freebsd-arm64",
|
|
393554
|
-
"freebsd x64 LE": "@esbuild/freebsd-x64",
|
|
393555
|
-
"linux arm LE": "@esbuild/linux-arm",
|
|
393556
|
-
"linux arm64 LE": "@esbuild/linux-arm64",
|
|
393557
|
-
"linux ia32 LE": "@esbuild/linux-ia32",
|
|
393558
|
-
"linux mips64el LE": "@esbuild/linux-mips64el",
|
|
393559
|
-
"linux ppc64 LE": "@esbuild/linux-ppc64",
|
|
393560
|
-
"linux riscv64 LE": "@esbuild/linux-riscv64",
|
|
393561
|
-
"linux s390x BE": "@esbuild/linux-s390x",
|
|
393562
|
-
"linux x64 LE": "@esbuild/linux-x64",
|
|
393563
|
-
"linux loong64 LE": "@esbuild/linux-loong64",
|
|
393564
|
-
"netbsd x64 LE": "@esbuild/netbsd-x64",
|
|
393565
|
-
"openbsd x64 LE": "@esbuild/openbsd-x64",
|
|
393566
|
-
"sunos x64 LE": "@esbuild/sunos-x64"
|
|
393567
|
-
};
|
|
393568
|
-
var knownWebAssemblyFallbackPackages = {
|
|
393569
|
-
"android arm LE": "@esbuild/android-arm",
|
|
393570
|
-
"android x64 LE": "@esbuild/android-x64"
|
|
393571
|
-
};
|
|
393572
|
-
function pkgAndSubpathForCurrentPlatform() {
|
|
393573
|
-
let pkg;
|
|
393574
|
-
let subpath;
|
|
393575
|
-
let isWASM = false;
|
|
393576
|
-
let platformKey = `${process.platform} ${os6.arch()} ${os6.endianness()}`;
|
|
393577
|
-
if (platformKey in knownWindowsPackages) {
|
|
393578
|
-
pkg = knownWindowsPackages[platformKey];
|
|
393579
|
-
subpath = "esbuild.exe";
|
|
393580
|
-
} else if (platformKey in knownUnixlikePackages) {
|
|
393581
|
-
pkg = knownUnixlikePackages[platformKey];
|
|
393582
|
-
subpath = "bin/esbuild";
|
|
393583
|
-
} else if (platformKey in knownWebAssemblyFallbackPackages) {
|
|
393584
|
-
pkg = knownWebAssemblyFallbackPackages[platformKey];
|
|
393585
|
-
subpath = "bin/esbuild";
|
|
393586
|
-
isWASM = true;
|
|
393587
|
-
} else {
|
|
393588
|
-
throw new Error(`Unsupported platform: ${platformKey}`);
|
|
393589
|
-
}
|
|
393590
|
-
return { pkg, subpath, isWASM };
|
|
393591
|
-
}
|
|
393592
|
-
function pkgForSomeOtherPlatform() {
|
|
393593
|
-
const libMainJS = require.resolve("esbuild");
|
|
393594
|
-
const nodeModulesDirectory = path14.dirname(path14.dirname(path14.dirname(libMainJS)));
|
|
393595
|
-
if (path14.basename(nodeModulesDirectory) === "node_modules") {
|
|
393596
|
-
for (const unixKey in knownUnixlikePackages) {
|
|
393597
|
-
try {
|
|
393598
|
-
const pkg = knownUnixlikePackages[unixKey];
|
|
393599
|
-
if (fs7.existsSync(path14.join(nodeModulesDirectory, pkg)))
|
|
393600
|
-
return pkg;
|
|
393601
|
-
} catch {
|
|
393602
|
-
}
|
|
393603
|
-
}
|
|
393604
|
-
for (const windowsKey in knownWindowsPackages) {
|
|
393605
|
-
try {
|
|
393606
|
-
const pkg = knownWindowsPackages[windowsKey];
|
|
393607
|
-
if (fs7.existsSync(path14.join(nodeModulesDirectory, pkg)))
|
|
393608
|
-
return pkg;
|
|
393609
|
-
} catch {
|
|
393610
|
-
}
|
|
393611
|
-
}
|
|
393612
|
-
}
|
|
393613
|
-
return null;
|
|
393614
|
-
}
|
|
393615
|
-
function downloadedBinPath(pkg, subpath) {
|
|
393616
|
-
const esbuildLibDir = path14.dirname(require.resolve("esbuild"));
|
|
393617
|
-
return path14.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path14.basename(subpath)}`);
|
|
393618
|
-
}
|
|
393619
|
-
function generateBinPath() {
|
|
393620
|
-
if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
|
|
393621
|
-
if (!fs7.existsSync(ESBUILD_BINARY_PATH)) {
|
|
393622
|
-
console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
|
|
393623
|
-
} else {
|
|
393624
|
-
return { binPath: ESBUILD_BINARY_PATH, isWASM: false };
|
|
393625
|
-
}
|
|
393626
|
-
}
|
|
393627
|
-
const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform();
|
|
393628
|
-
let binPath;
|
|
393629
|
-
try {
|
|
393630
|
-
binPath = require.resolve(`${pkg}/${subpath}`);
|
|
393631
|
-
} catch (e3) {
|
|
393632
|
-
binPath = downloadedBinPath(pkg, subpath);
|
|
393633
|
-
if (!fs7.existsSync(binPath)) {
|
|
393634
|
-
try {
|
|
393635
|
-
require.resolve(pkg);
|
|
393636
|
-
} catch {
|
|
393637
|
-
const otherPkg = pkgForSomeOtherPlatform();
|
|
393638
|
-
if (otherPkg) {
|
|
393639
|
-
let suggestions = `
|
|
393640
|
-
Specifically the "${otherPkg}" package is present but this platform
|
|
393641
|
-
needs the "${pkg}" package instead. People often get into this
|
|
393642
|
-
situation by installing esbuild on Windows or macOS and copying "node_modules"
|
|
393643
|
-
into a Docker image that runs Linux, or by copying "node_modules" between
|
|
393644
|
-
Windows and WSL environments.
|
|
393645
|
-
|
|
393646
|
-
If you are installing with npm, you can try not copying the "node_modules"
|
|
393647
|
-
directory when you copy the files over, and running "npm ci" or "npm install"
|
|
393648
|
-
on the destination platform after the copy. Or you could consider using yarn
|
|
393649
|
-
instead of npm which has built-in support for installing a package on multiple
|
|
393650
|
-
platforms simultaneously.
|
|
393651
|
-
|
|
393652
|
-
If you are installing with yarn, you can try listing both this platform and the
|
|
393653
|
-
other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
|
|
393654
|
-
feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
|
|
393655
|
-
Keep in mind that this means multiple copies of esbuild will be present.
|
|
393656
|
-
`;
|
|
393657
|
-
if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) {
|
|
393658
|
-
suggestions = `
|
|
393659
|
-
Specifically the "${otherPkg}" package is present but this platform
|
|
393660
|
-
needs the "${pkg}" package instead. People often get into this
|
|
393661
|
-
situation by installing esbuild with npm running inside of Rosetta 2 and then
|
|
393662
|
-
trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
|
|
393663
|
-
2 is Apple's on-the-fly x86_64-to-arm64 translation service).
|
|
393664
|
-
|
|
393665
|
-
If you are installing with npm, you can try ensuring that both npm and node are
|
|
393666
|
-
not running under Rosetta 2 and then reinstalling esbuild. This likely involves
|
|
393667
|
-
changing how you installed npm and/or node. For example, installing node with
|
|
393668
|
-
the universal installer here should work: https://nodejs.org/en/download/. Or
|
|
393669
|
-
you could consider using yarn instead of npm which has built-in support for
|
|
393670
|
-
installing a package on multiple platforms simultaneously.
|
|
393671
|
-
|
|
393672
|
-
If you are installing with yarn, you can try listing both "arm64" and "x64"
|
|
393673
|
-
in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
|
|
393674
|
-
https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
|
|
393675
|
-
Keep in mind that this means multiple copies of esbuild will be present.
|
|
393676
|
-
`;
|
|
393677
|
-
}
|
|
393678
|
-
throw new Error(`
|
|
393679
|
-
You installed esbuild for another platform than the one you're currently using.
|
|
393680
|
-
This won't work because esbuild is written with native code and needs to
|
|
393681
|
-
install a platform-specific binary executable.
|
|
393682
|
-
${suggestions}
|
|
393683
|
-
Another alternative is to use the "esbuild-wasm" package instead, which works
|
|
393684
|
-
the same way on all platforms. But it comes with a heavy performance cost and
|
|
393685
|
-
can sometimes be 10x slower than the "esbuild" package, so you may also not
|
|
393686
|
-
want to do that.
|
|
393687
|
-
`);
|
|
393688
|
-
}
|
|
393689
|
-
throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild.
|
|
393690
|
-
|
|
393691
|
-
If you are installing esbuild with npm, make sure that you don't specify the
|
|
393692
|
-
"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature
|
|
393693
|
-
of "package.json" is used by esbuild to install the correct binary executable
|
|
393694
|
-
for your current platform.`);
|
|
393695
|
-
}
|
|
393696
|
-
throw e3;
|
|
393697
|
-
}
|
|
393698
|
-
}
|
|
393699
|
-
if (/\.zip\//.test(binPath)) {
|
|
393700
|
-
let pnpapi;
|
|
393701
|
-
try {
|
|
393702
|
-
pnpapi = require("pnpapi");
|
|
393703
|
-
} catch (e3) {
|
|
393704
|
-
}
|
|
393705
|
-
if (pnpapi) {
|
|
393706
|
-
const root2 = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
|
|
393707
|
-
const binTargetPath = path14.join(
|
|
393708
|
-
root2,
|
|
393709
|
-
"node_modules",
|
|
393710
|
-
".cache",
|
|
393711
|
-
"esbuild",
|
|
393712
|
-
`pnpapi-${pkg.replace("/", "-")}-${"0.19.12"}-${path14.basename(subpath)}`
|
|
393713
|
-
);
|
|
393714
|
-
if (!fs7.existsSync(binTargetPath)) {
|
|
393715
|
-
fs7.mkdirSync(path14.dirname(binTargetPath), { recursive: true });
|
|
393716
|
-
fs7.copyFileSync(binPath, binTargetPath);
|
|
393717
|
-
fs7.chmodSync(binTargetPath, 493);
|
|
393718
|
-
}
|
|
393719
|
-
return { binPath: binTargetPath, isWASM };
|
|
393720
|
-
}
|
|
393721
|
-
}
|
|
393722
|
-
return { binPath, isWASM };
|
|
393723
|
-
}
|
|
393724
|
-
var child_process = require("child_process");
|
|
393725
|
-
var crypto = require("crypto");
|
|
393726
|
-
var path22 = require("path");
|
|
393727
|
-
var fs23 = require("fs");
|
|
393728
|
-
var os22 = require("os");
|
|
393729
|
-
var tty2 = require("tty");
|
|
393730
|
-
var worker_threads;
|
|
393731
|
-
if (process.env.ESBUILD_WORKER_THREADS !== "0") {
|
|
393732
|
-
try {
|
|
393733
|
-
worker_threads = require("worker_threads");
|
|
393734
|
-
} catch {
|
|
393735
|
-
}
|
|
393736
|
-
let [major, minor] = process.versions.node.split(".");
|
|
393737
|
-
if (
|
|
393738
|
-
// <v12.17.0 does not work
|
|
393739
|
-
+major < 12 || +major === 12 && +minor < 17 || +major === 13 && +minor < 13
|
|
393740
|
-
) {
|
|
393741
|
-
worker_threads = void 0;
|
|
393742
|
-
}
|
|
393743
|
-
}
|
|
393744
|
-
var _a3;
|
|
393745
|
-
var isInternalWorkerThread = ((_a3 = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a3.esbuildVersion) === "0.19.12";
|
|
393746
|
-
var esbuildCommandAndArgs = () => {
|
|
393747
|
-
if ((!ESBUILD_BINARY_PATH || false) && (path22.basename(__filename) !== "main.js" || path22.basename(__dirname) !== "lib")) {
|
|
393748
|
-
throw new Error(
|
|
393749
|
-
`The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle.
|
|
393750
|
-
|
|
393751
|
-
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.`
|
|
393752
|
-
);
|
|
393753
|
-
}
|
|
393754
|
-
if (false) {
|
|
393755
|
-
return ["node", [path22.join(__dirname, "..", "bin", "esbuild")]];
|
|
393756
|
-
} else {
|
|
393757
|
-
const { binPath, isWASM } = generateBinPath();
|
|
393758
|
-
if (isWASM) {
|
|
393759
|
-
return ["node", [binPath]];
|
|
393760
|
-
} else {
|
|
393761
|
-
return [binPath, []];
|
|
393762
|
-
}
|
|
393763
|
-
}
|
|
393764
|
-
};
|
|
393765
|
-
var isTTY = () => tty2.isatty(2);
|
|
393766
|
-
var fsSync = {
|
|
393767
|
-
readFile(tempFile, callback) {
|
|
393768
|
-
try {
|
|
393769
|
-
let contents = fs23.readFileSync(tempFile, "utf8");
|
|
393770
|
-
try {
|
|
393771
|
-
fs23.unlinkSync(tempFile);
|
|
393772
|
-
} catch {
|
|
393773
|
-
}
|
|
393774
|
-
callback(null, contents);
|
|
393775
|
-
} catch (err) {
|
|
393776
|
-
callback(err, null);
|
|
393777
|
-
}
|
|
393778
|
-
},
|
|
393779
|
-
writeFile(contents, callback) {
|
|
393780
|
-
try {
|
|
393781
|
-
let tempFile = randomFileName();
|
|
393782
|
-
fs23.writeFileSync(tempFile, contents);
|
|
393783
|
-
callback(tempFile);
|
|
393784
|
-
} catch {
|
|
393785
|
-
callback(null);
|
|
393786
|
-
}
|
|
393787
|
-
}
|
|
393788
|
-
};
|
|
393789
|
-
var fsAsync = {
|
|
393790
|
-
readFile(tempFile, callback) {
|
|
393791
|
-
try {
|
|
393792
|
-
fs23.readFile(tempFile, "utf8", (err, contents) => {
|
|
393793
|
-
try {
|
|
393794
|
-
fs23.unlink(tempFile, () => callback(err, contents));
|
|
393795
|
-
} catch {
|
|
393796
|
-
callback(err, contents);
|
|
393797
|
-
}
|
|
393798
|
-
});
|
|
393799
|
-
} catch (err) {
|
|
393800
|
-
callback(err, null);
|
|
393801
|
-
}
|
|
393802
|
-
},
|
|
393803
|
-
writeFile(contents, callback) {
|
|
393804
|
-
try {
|
|
393805
|
-
let tempFile = randomFileName();
|
|
393806
|
-
fs23.writeFile(tempFile, contents, (err) => err !== null ? callback(null) : callback(tempFile));
|
|
393807
|
-
} catch {
|
|
393808
|
-
callback(null);
|
|
393809
|
-
}
|
|
393810
|
-
}
|
|
393811
|
-
};
|
|
393812
|
-
var version = "0.19.12";
|
|
393813
|
-
var build2 = (options8) => ensureServiceIsRunning().build(options8);
|
|
393814
|
-
var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
|
|
393815
|
-
var transform2 = (input, options8) => ensureServiceIsRunning().transform(input, options8);
|
|
393816
|
-
var formatMessages = (messages2, options8) => ensureServiceIsRunning().formatMessages(messages2, options8);
|
|
393817
|
-
var analyzeMetafile = (messages2, options8) => ensureServiceIsRunning().analyzeMetafile(messages2, options8);
|
|
393818
|
-
var buildSync = (options8) => {
|
|
393819
|
-
if (worker_threads && !isInternalWorkerThread) {
|
|
393820
|
-
if (!workerThreadService)
|
|
393821
|
-
workerThreadService = startWorkerThreadService(worker_threads);
|
|
393822
|
-
return workerThreadService.buildSync(options8);
|
|
393823
|
-
}
|
|
393824
|
-
let result;
|
|
393825
|
-
runServiceSync((service) => service.buildOrContext({
|
|
393826
|
-
callName: "buildSync",
|
|
393827
|
-
refs: null,
|
|
393828
|
-
options: options8,
|
|
393829
|
-
isTTY: isTTY(),
|
|
393830
|
-
defaultWD,
|
|
393831
|
-
callback: (err, res) => {
|
|
393832
|
-
if (err)
|
|
393833
|
-
throw err;
|
|
393834
|
-
result = res;
|
|
393835
|
-
}
|
|
393836
|
-
}));
|
|
393837
|
-
return result;
|
|
393838
|
-
};
|
|
393839
|
-
var transformSync = (input, options8) => {
|
|
393840
|
-
if (worker_threads && !isInternalWorkerThread) {
|
|
393841
|
-
if (!workerThreadService)
|
|
393842
|
-
workerThreadService = startWorkerThreadService(worker_threads);
|
|
393843
|
-
return workerThreadService.transformSync(input, options8);
|
|
393844
|
-
}
|
|
393845
|
-
let result;
|
|
393846
|
-
runServiceSync((service) => service.transform({
|
|
393847
|
-
callName: "transformSync",
|
|
393848
|
-
refs: null,
|
|
393849
|
-
input,
|
|
393850
|
-
options: options8 || {},
|
|
393851
|
-
isTTY: isTTY(),
|
|
393852
|
-
fs: fsSync,
|
|
393853
|
-
callback: (err, res) => {
|
|
393854
|
-
if (err)
|
|
393855
|
-
throw err;
|
|
393856
|
-
result = res;
|
|
393857
|
-
}
|
|
393858
|
-
}));
|
|
393859
|
-
return result;
|
|
393860
|
-
};
|
|
393861
|
-
var formatMessagesSync = (messages2, options8) => {
|
|
393862
|
-
if (worker_threads && !isInternalWorkerThread) {
|
|
393863
|
-
if (!workerThreadService)
|
|
393864
|
-
workerThreadService = startWorkerThreadService(worker_threads);
|
|
393865
|
-
return workerThreadService.formatMessagesSync(messages2, options8);
|
|
393866
|
-
}
|
|
393867
|
-
let result;
|
|
393868
|
-
runServiceSync((service) => service.formatMessages({
|
|
393869
|
-
callName: "formatMessagesSync",
|
|
393870
|
-
refs: null,
|
|
393871
|
-
messages: messages2,
|
|
393872
|
-
options: options8,
|
|
393873
|
-
callback: (err, res) => {
|
|
393874
|
-
if (err)
|
|
393875
|
-
throw err;
|
|
393876
|
-
result = res;
|
|
393877
|
-
}
|
|
393878
|
-
}));
|
|
393879
|
-
return result;
|
|
393880
|
-
};
|
|
393881
|
-
var analyzeMetafileSync = (metafile, options8) => {
|
|
393882
|
-
if (worker_threads && !isInternalWorkerThread) {
|
|
393883
|
-
if (!workerThreadService)
|
|
393884
|
-
workerThreadService = startWorkerThreadService(worker_threads);
|
|
393885
|
-
return workerThreadService.analyzeMetafileSync(metafile, options8);
|
|
393886
|
-
}
|
|
393887
|
-
let result;
|
|
393888
|
-
runServiceSync((service) => service.analyzeMetafile({
|
|
393889
|
-
callName: "analyzeMetafileSync",
|
|
393890
|
-
refs: null,
|
|
393891
|
-
metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile),
|
|
393892
|
-
options: options8,
|
|
393893
|
-
callback: (err, res) => {
|
|
393894
|
-
if (err)
|
|
393895
|
-
throw err;
|
|
393896
|
-
result = res;
|
|
393897
|
-
}
|
|
393898
|
-
}));
|
|
393899
|
-
return result;
|
|
393900
|
-
};
|
|
393901
|
-
var stop = () => {
|
|
393902
|
-
if (stopService)
|
|
393903
|
-
stopService();
|
|
393904
|
-
if (workerThreadService)
|
|
393905
|
-
workerThreadService.stop();
|
|
393906
|
-
};
|
|
393907
|
-
var initializeWasCalled = false;
|
|
393908
|
-
var initialize = (options8) => {
|
|
393909
|
-
options8 = validateInitializeOptions(options8 || {});
|
|
393910
|
-
if (options8.wasmURL)
|
|
393911
|
-
throw new Error(`The "wasmURL" option only works in the browser`);
|
|
393912
|
-
if (options8.wasmModule)
|
|
393913
|
-
throw new Error(`The "wasmModule" option only works in the browser`);
|
|
393914
|
-
if (options8.worker)
|
|
393915
|
-
throw new Error(`The "worker" option only works in the browser`);
|
|
393916
|
-
if (initializeWasCalled)
|
|
393917
|
-
throw new Error('Cannot call "initialize" more than once');
|
|
393918
|
-
ensureServiceIsRunning();
|
|
393919
|
-
initializeWasCalled = true;
|
|
393920
|
-
return Promise.resolve();
|
|
393921
|
-
};
|
|
393922
|
-
var defaultWD = process.cwd();
|
|
393923
|
-
var longLivedService;
|
|
393924
|
-
var stopService;
|
|
393925
|
-
var ensureServiceIsRunning = () => {
|
|
393926
|
-
if (longLivedService)
|
|
393927
|
-
return longLivedService;
|
|
393928
|
-
let [command, args] = esbuildCommandAndArgs();
|
|
393929
|
-
let child = child_process.spawn(command, args.concat(`--service=${"0.19.12"}`, "--ping"), {
|
|
393930
|
-
windowsHide: true,
|
|
393931
|
-
stdio: ["pipe", "pipe", "inherit"],
|
|
393932
|
-
cwd: defaultWD
|
|
393933
|
-
});
|
|
393934
|
-
let { readFromStdout, afterClose, service } = createChannel({
|
|
393935
|
-
writeToStdin(bytes) {
|
|
393936
|
-
child.stdin.write(bytes, (err) => {
|
|
393937
|
-
if (err)
|
|
393938
|
-
afterClose(err);
|
|
393939
|
-
});
|
|
393940
|
-
},
|
|
393941
|
-
readFileSync: fs23.readFileSync,
|
|
393942
|
-
isSync: false,
|
|
393943
|
-
hasFS: true,
|
|
393944
|
-
esbuild: node_exports
|
|
393945
|
-
});
|
|
393946
|
-
child.stdin.on("error", afterClose);
|
|
393947
|
-
child.on("error", afterClose);
|
|
393948
|
-
const stdin2 = child.stdin;
|
|
393949
|
-
const stdout = child.stdout;
|
|
393950
|
-
stdout.on("data", readFromStdout);
|
|
393951
|
-
stdout.on("end", afterClose);
|
|
393952
|
-
stopService = () => {
|
|
393953
|
-
stdin2.destroy();
|
|
393954
|
-
stdout.destroy();
|
|
393955
|
-
child.kill();
|
|
393956
|
-
initializeWasCalled = false;
|
|
393957
|
-
longLivedService = void 0;
|
|
393958
|
-
stopService = void 0;
|
|
393959
|
-
};
|
|
393960
|
-
let refCount = 0;
|
|
393961
|
-
child.unref();
|
|
393962
|
-
if (stdin2.unref) {
|
|
393963
|
-
stdin2.unref();
|
|
393964
|
-
}
|
|
393965
|
-
if (stdout.unref) {
|
|
393966
|
-
stdout.unref();
|
|
393967
|
-
}
|
|
393968
|
-
const refs = {
|
|
393969
|
-
ref() {
|
|
393970
|
-
if (++refCount === 1)
|
|
393971
|
-
child.ref();
|
|
393972
|
-
},
|
|
393973
|
-
unref() {
|
|
393974
|
-
if (--refCount === 0)
|
|
393975
|
-
child.unref();
|
|
393976
|
-
}
|
|
393977
|
-
};
|
|
393978
|
-
longLivedService = {
|
|
393979
|
-
build: (options8) => new Promise((resolve3, reject) => {
|
|
393980
|
-
service.buildOrContext({
|
|
393981
|
-
callName: "build",
|
|
393982
|
-
refs,
|
|
393983
|
-
options: options8,
|
|
393984
|
-
isTTY: isTTY(),
|
|
393985
|
-
defaultWD,
|
|
393986
|
-
callback: (err, res) => err ? reject(err) : resolve3(res)
|
|
393987
|
-
});
|
|
393988
|
-
}),
|
|
393989
|
-
context: (options8) => new Promise((resolve3, reject) => service.buildOrContext({
|
|
393990
|
-
callName: "context",
|
|
393991
|
-
refs,
|
|
393992
|
-
options: options8,
|
|
393993
|
-
isTTY: isTTY(),
|
|
393994
|
-
defaultWD,
|
|
393995
|
-
callback: (err, res) => err ? reject(err) : resolve3(res)
|
|
393996
|
-
})),
|
|
393997
|
-
transform: (input, options8) => new Promise((resolve3, reject) => service.transform({
|
|
393998
|
-
callName: "transform",
|
|
393999
|
-
refs,
|
|
394000
|
-
input,
|
|
394001
|
-
options: options8 || {},
|
|
394002
|
-
isTTY: isTTY(),
|
|
394003
|
-
fs: fsAsync,
|
|
394004
|
-
callback: (err, res) => err ? reject(err) : resolve3(res)
|
|
394005
|
-
})),
|
|
394006
|
-
formatMessages: (messages2, options8) => new Promise((resolve3, reject) => service.formatMessages({
|
|
394007
|
-
callName: "formatMessages",
|
|
394008
|
-
refs,
|
|
394009
|
-
messages: messages2,
|
|
394010
|
-
options: options8,
|
|
394011
|
-
callback: (err, res) => err ? reject(err) : resolve3(res)
|
|
394012
|
-
})),
|
|
394013
|
-
analyzeMetafile: (metafile, options8) => new Promise((resolve3, reject) => service.analyzeMetafile({
|
|
394014
|
-
callName: "analyzeMetafile",
|
|
394015
|
-
refs,
|
|
394016
|
-
metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile),
|
|
394017
|
-
options: options8,
|
|
394018
|
-
callback: (err, res) => err ? reject(err) : resolve3(res)
|
|
394019
|
-
}))
|
|
394020
|
-
};
|
|
394021
|
-
return longLivedService;
|
|
394022
|
-
};
|
|
394023
|
-
var runServiceSync = (callback) => {
|
|
394024
|
-
let [command, args] = esbuildCommandAndArgs();
|
|
394025
|
-
let stdin2 = new Uint8Array();
|
|
394026
|
-
let { readFromStdout, afterClose, service } = createChannel({
|
|
394027
|
-
writeToStdin(bytes) {
|
|
394028
|
-
if (stdin2.length !== 0)
|
|
394029
|
-
throw new Error("Must run at most one command");
|
|
394030
|
-
stdin2 = bytes;
|
|
394031
|
-
},
|
|
394032
|
-
isSync: true,
|
|
394033
|
-
hasFS: true,
|
|
394034
|
-
esbuild: node_exports
|
|
394035
|
-
});
|
|
394036
|
-
callback(service);
|
|
394037
|
-
let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.19.12"}`), {
|
|
394038
|
-
cwd: defaultWD,
|
|
394039
|
-
windowsHide: true,
|
|
394040
|
-
input: stdin2,
|
|
394041
|
-
// We don't know how large the output could be. If it's too large, the
|
|
394042
|
-
// command will fail with ENOBUFS. Reserve 16mb for now since that feels
|
|
394043
|
-
// like it should be enough. Also allow overriding this with an environment
|
|
394044
|
-
// variable.
|
|
394045
|
-
maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024
|
|
394046
|
-
});
|
|
394047
|
-
readFromStdout(stdout);
|
|
394048
|
-
afterClose(null);
|
|
394049
|
-
};
|
|
394050
|
-
var randomFileName = () => {
|
|
394051
|
-
return path22.join(os22.tmpdir(), `esbuild-${crypto.randomBytes(32).toString("hex")}`);
|
|
394052
|
-
};
|
|
394053
|
-
var workerThreadService = null;
|
|
394054
|
-
var startWorkerThreadService = (worker_threads2) => {
|
|
394055
|
-
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
|
|
394056
|
-
let worker = new worker_threads2.Worker(__filename, {
|
|
394057
|
-
workerData: { workerPort, defaultWD, esbuildVersion: "0.19.12" },
|
|
394058
|
-
transferList: [workerPort],
|
|
394059
|
-
// From node's documentation: https://nodejs.org/api/worker_threads.html
|
|
394060
|
-
//
|
|
394061
|
-
// Take care when launching worker threads from preload scripts (scripts loaded
|
|
394062
|
-
// and run using the `-r` command line flag). Unless the `execArgv` option is
|
|
394063
|
-
// explicitly set, new Worker threads automatically inherit the command line flags
|
|
394064
|
-
// from the running process and will preload the same preload scripts as the main
|
|
394065
|
-
// thread. If the preload script unconditionally launches a worker thread, every
|
|
394066
|
-
// thread spawned will spawn another until the application crashes.
|
|
394067
|
-
//
|
|
394068
|
-
execArgv: []
|
|
394069
|
-
});
|
|
394070
|
-
let nextID = 0;
|
|
394071
|
-
let fakeBuildError = (text) => {
|
|
394072
|
-
let error = new Error(`Build failed with 1 error:
|
|
394073
|
-
error: ${text}`);
|
|
394074
|
-
let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }];
|
|
394075
|
-
error.errors = errors;
|
|
394076
|
-
error.warnings = [];
|
|
394077
|
-
return error;
|
|
394078
|
-
};
|
|
394079
|
-
let validateBuildSyncOptions = (options8) => {
|
|
394080
|
-
if (!options8)
|
|
394081
|
-
return;
|
|
394082
|
-
let plugins = options8.plugins;
|
|
394083
|
-
if (plugins && plugins.length > 0)
|
|
394084
|
-
throw fakeBuildError(`Cannot use plugins in synchronous API calls`);
|
|
394085
|
-
};
|
|
394086
|
-
let applyProperties = (object, properties) => {
|
|
394087
|
-
for (let key2 in properties) {
|
|
394088
|
-
object[key2] = properties[key2];
|
|
394089
|
-
}
|
|
394090
|
-
};
|
|
394091
|
-
let runCallSync = (command, args) => {
|
|
394092
|
-
let id = nextID++;
|
|
394093
|
-
let sharedBuffer = new SharedArrayBuffer(8);
|
|
394094
|
-
let sharedBufferView = new Int32Array(sharedBuffer);
|
|
394095
|
-
let msg = { sharedBuffer, id, command, args };
|
|
394096
|
-
worker.postMessage(msg);
|
|
394097
|
-
let status = Atomics.wait(sharedBufferView, 0, 0);
|
|
394098
|
-
if (status !== "ok" && status !== "not-equal")
|
|
394099
|
-
throw new Error("Internal error: Atomics.wait() failed: " + status);
|
|
394100
|
-
let { message: { id: id2, resolve: resolve3, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort);
|
|
394101
|
-
if (id !== id2)
|
|
394102
|
-
throw new Error(`Internal error: Expected id ${id} but got id ${id2}`);
|
|
394103
|
-
if (reject) {
|
|
394104
|
-
applyProperties(reject, properties);
|
|
394105
|
-
throw reject;
|
|
394106
|
-
}
|
|
394107
|
-
return resolve3;
|
|
394108
|
-
};
|
|
394109
|
-
worker.unref();
|
|
394110
|
-
return {
|
|
394111
|
-
buildSync(options8) {
|
|
394112
|
-
validateBuildSyncOptions(options8);
|
|
394113
|
-
return runCallSync("build", [options8]);
|
|
394114
|
-
},
|
|
394115
|
-
transformSync(input, options8) {
|
|
394116
|
-
return runCallSync("transform", [input, options8]);
|
|
394117
|
-
},
|
|
394118
|
-
formatMessagesSync(messages2, options8) {
|
|
394119
|
-
return runCallSync("formatMessages", [messages2, options8]);
|
|
394120
|
-
},
|
|
394121
|
-
analyzeMetafileSync(metafile, options8) {
|
|
394122
|
-
return runCallSync("analyzeMetafile", [metafile, options8]);
|
|
394123
|
-
},
|
|
394124
|
-
stop() {
|
|
394125
|
-
worker.terminate();
|
|
394126
|
-
workerThreadService = null;
|
|
394127
|
-
}
|
|
394128
|
-
};
|
|
394129
|
-
};
|
|
394130
|
-
var startSyncServiceWorker = () => {
|
|
394131
|
-
let workerPort = worker_threads.workerData.workerPort;
|
|
394132
|
-
let parentPort = worker_threads.parentPort;
|
|
394133
|
-
let extractProperties = (object) => {
|
|
394134
|
-
let properties = {};
|
|
394135
|
-
if (object && typeof object === "object") {
|
|
394136
|
-
for (let key2 in object) {
|
|
394137
|
-
properties[key2] = object[key2];
|
|
394138
|
-
}
|
|
394139
|
-
}
|
|
394140
|
-
return properties;
|
|
394141
|
-
};
|
|
394142
|
-
try {
|
|
394143
|
-
let service = ensureServiceIsRunning();
|
|
394144
|
-
defaultWD = worker_threads.workerData.defaultWD;
|
|
394145
|
-
parentPort.on("message", (msg) => {
|
|
394146
|
-
(async () => {
|
|
394147
|
-
let { sharedBuffer, id, command, args } = msg;
|
|
394148
|
-
let sharedBufferView = new Int32Array(sharedBuffer);
|
|
394149
|
-
try {
|
|
394150
|
-
switch (command) {
|
|
394151
|
-
case "build":
|
|
394152
|
-
workerPort.postMessage({ id, resolve: await service.build(args[0]) });
|
|
394153
|
-
break;
|
|
394154
|
-
case "transform":
|
|
394155
|
-
workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) });
|
|
394156
|
-
break;
|
|
394157
|
-
case "formatMessages":
|
|
394158
|
-
workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) });
|
|
394159
|
-
break;
|
|
394160
|
-
case "analyzeMetafile":
|
|
394161
|
-
workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) });
|
|
394162
|
-
break;
|
|
394163
|
-
default:
|
|
394164
|
-
throw new Error(`Invalid command: ${command}`);
|
|
394165
|
-
}
|
|
394166
|
-
} catch (reject) {
|
|
394167
|
-
workerPort.postMessage({ id, reject, properties: extractProperties(reject) });
|
|
394168
|
-
}
|
|
394169
|
-
Atomics.add(sharedBufferView, 0, 1);
|
|
394170
|
-
Atomics.notify(sharedBufferView, 0, Infinity);
|
|
394171
|
-
})();
|
|
394172
|
-
});
|
|
394173
|
-
} catch (reject) {
|
|
394174
|
-
parentPort.on("message", (msg) => {
|
|
394175
|
-
let { sharedBuffer, id } = msg;
|
|
394176
|
-
let sharedBufferView = new Int32Array(sharedBuffer);
|
|
394177
|
-
workerPort.postMessage({ id, reject, properties: extractProperties(reject) });
|
|
394178
|
-
Atomics.add(sharedBufferView, 0, 1);
|
|
394179
|
-
Atomics.notify(sharedBufferView, 0, Infinity);
|
|
394180
|
-
});
|
|
394181
|
-
}
|
|
394182
|
-
};
|
|
394183
|
-
if (isInternalWorkerThread) {
|
|
394184
|
-
startSyncServiceWorker();
|
|
394185
|
-
}
|
|
394186
|
-
var node_default = node_exports;
|
|
394187
|
-
}
|
|
394188
|
-
});
|
|
394189
|
-
|
|
394190
391784
|
// node_modules/.pnpm/load-tsconfig@0.2.5/node_modules/load-tsconfig/dist/index.cjs
|
|
394191
391785
|
var require_dist3 = __commonJS({
|
|
394192
391786
|
"node_modules/.pnpm/load-tsconfig@0.2.5/node_modules/load-tsconfig/dist/index.cjs"(exports2, module2) {
|
|
@@ -394436,7 +392030,7 @@ var require_dist4 = __commonJS({
|
|
|
394436
392030
|
var import_fs22 = __toESM3(require("fs"), 1);
|
|
394437
392031
|
var import_path22 = __toESM3(require("path"), 1);
|
|
394438
392032
|
var import_url13 = require("url");
|
|
394439
|
-
var import_esbuild =
|
|
392033
|
+
var import_esbuild = require("esbuild");
|
|
394440
392034
|
var import_load_tsconfig = require_dist3();
|
|
394441
392035
|
var import_fs5 = __toESM3(require("fs"), 1);
|
|
394442
392036
|
var import_path13 = __toESM3(require("path"), 1);
|
|
@@ -395790,7 +393384,7 @@ var require_signals2 = __commonJS({
|
|
|
395790
393384
|
});
|
|
395791
393385
|
|
|
395792
393386
|
// node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js
|
|
395793
|
-
var
|
|
393387
|
+
var require_main2 = __commonJS({
|
|
395794
393388
|
"node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js"(exports2) {
|
|
395795
393389
|
"use strict";
|
|
395796
393390
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -395850,7 +393444,7 @@ var require_main3 = __commonJS({
|
|
|
395850
393444
|
var require_error4 = __commonJS({
|
|
395851
393445
|
"node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js"(exports2, module2) {
|
|
395852
393446
|
"use strict";
|
|
395853
|
-
var { signalsByName } =
|
|
393447
|
+
var { signalsByName } = require_main2();
|
|
395854
393448
|
var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => {
|
|
395855
393449
|
if (timedOut) {
|
|
395856
393450
|
return `timed out after ${timeout} milliseconds`;
|
|
@@ -446921,7 +444515,7 @@ var require_dist7 = __commonJS({
|
|
|
446921
444515
|
var _execa2 = _interopRequireDefault(_execa);
|
|
446922
444516
|
var _treekill = require_tree_kill();
|
|
446923
444517
|
var _treekill2 = _interopRequireDefault(_treekill);
|
|
446924
|
-
var _esbuild =
|
|
444518
|
+
var _esbuild = require("esbuild");
|
|
446925
444519
|
var nodeProtocolPlugin = () => {
|
|
446926
444520
|
const nodeProtocol = "node:";
|
|
446927
444521
|
return {
|
|
@@ -448554,9 +446148,9 @@ var require_dist7 = __commonJS({
|
|
|
448554
446148
|
}
|
|
448555
446149
|
});
|
|
448556
446150
|
|
|
448557
|
-
// 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.
|
|
446151
|
+
// 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
|
|
448558
446152
|
var require_package4 = __commonJS({
|
|
448559
|
-
"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.
|
|
446153
|
+
"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) {
|
|
448560
446154
|
module2.exports = {
|
|
448561
446155
|
name: "@nx/js",
|
|
448562
446156
|
version: "18.0.4",
|
|
@@ -448636,9 +446230,9 @@ var require_package4 = __commonJS({
|
|
|
448636
446230
|
}
|
|
448637
446231
|
});
|
|
448638
446232
|
|
|
448639
|
-
// 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.
|
|
446233
|
+
// 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
|
|
448640
446234
|
var require_versions2 = __commonJS({
|
|
448641
|
-
"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.
|
|
446235
|
+
"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) {
|
|
448642
446236
|
"use strict";
|
|
448643
446237
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
448644
446238
|
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;
|
|
@@ -448657,9 +446251,9 @@ var require_versions2 = __commonJS({
|
|
|
448657
446251
|
}
|
|
448658
446252
|
});
|
|
448659
446253
|
|
|
448660
|
-
// 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.
|
|
446254
|
+
// 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
|
|
448661
446255
|
var require_add_tslib_dependencies = __commonJS({
|
|
448662
|
-
"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.
|
|
446256
|
+
"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) {
|
|
448663
446257
|
"use strict";
|
|
448664
446258
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
448665
446259
|
exports2.addTsLibDependencies = void 0;
|
|
@@ -448674,9 +446268,9 @@ var require_add_tslib_dependencies = __commonJS({
|
|
|
448674
446268
|
}
|
|
448675
446269
|
});
|
|
448676
446270
|
|
|
448677
|
-
// 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.
|
|
446271
|
+
// 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
|
|
448678
446272
|
var require_print_diagnostics = __commonJS({
|
|
448679
|
-
"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.
|
|
446273
|
+
"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) {
|
|
448680
446274
|
"use strict";
|
|
448681
446275
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
448682
446276
|
exports2.printDiagnostics = void 0;
|
|
@@ -448699,9 +446293,9 @@ var require_print_diagnostics = __commonJS({
|
|
|
448699
446293
|
}
|
|
448700
446294
|
});
|
|
448701
446295
|
|
|
448702
|
-
// 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.
|
|
446296
|
+
// 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
|
|
448703
446297
|
var require_identifiers3 = __commonJS({
|
|
448704
|
-
"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.
|
|
446298
|
+
"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) {
|
|
448705
446299
|
"use strict";
|
|
448706
446300
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
448707
446301
|
exports2.isKeyword = exports2.isReservedWord = void 0;
|
|
@@ -448753,9 +446347,9 @@ var require_identifiers3 = __commonJS({
|
|
|
448753
446347
|
}
|
|
448754
446348
|
});
|
|
448755
446349
|
|
|
448756
|
-
// 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.
|
|
446350
|
+
// 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
|
|
448757
446351
|
var require_highlight = __commonJS({
|
|
448758
|
-
"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.
|
|
446352
|
+
"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) {
|
|
448759
446353
|
"use strict";
|
|
448760
446354
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
448761
446355
|
exports2.highlight = void 0;
|
|
@@ -448820,9 +446414,9 @@ var require_highlight = __commonJS({
|
|
|
448820
446414
|
}
|
|
448821
446415
|
});
|
|
448822
446416
|
|
|
448823
|
-
// 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.
|
|
446417
|
+
// 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
|
|
448824
446418
|
var require_ensure_typescript = __commonJS({
|
|
448825
|
-
"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.
|
|
446419
|
+
"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) {
|
|
448826
446420
|
"use strict";
|
|
448827
446421
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
448828
446422
|
exports2.ensureTypescript = void 0;
|
|
@@ -448835,9 +446429,9 @@ var require_ensure_typescript = __commonJS({
|
|
|
448835
446429
|
}
|
|
448836
446430
|
});
|
|
448837
446431
|
|
|
448838
|
-
// 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.
|
|
446432
|
+
// 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
|
|
448839
446433
|
var require_ts_config = __commonJS({
|
|
448840
|
-
"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.
|
|
446434
|
+
"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) {
|
|
448841
446435
|
"use strict";
|
|
448842
446436
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
448843
446437
|
exports2.readTsConfigPaths = exports2.addTsConfigPath = exports2.getRootTsConfigFileName = exports2.getRootTsConfigPath = exports2.getRelativePathToRootTsConfig = exports2.getRootTsConfigPathInTree = exports2.readTsConfig = void 0;
|
|
@@ -448921,9 +446515,9 @@ var require_ts_config = __commonJS({
|
|
|
448921
446515
|
}
|
|
448922
446516
|
});
|
|
448923
446517
|
|
|
448924
|
-
// 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.
|
|
446518
|
+
// 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
|
|
448925
446519
|
var require_run_type_check = __commonJS({
|
|
448926
|
-
"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.
|
|
446520
|
+
"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) {
|
|
448927
446521
|
"use strict";
|
|
448928
446522
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
448929
446523
|
exports2.getFormattedDiagnostic = exports2.runTypeCheck = exports2.runTypeCheckWatch = void 0;
|
|
@@ -449039,9 +446633,9 @@ var require_run_type_check = __commonJS({
|
|
|
449039
446633
|
}
|
|
449040
446634
|
});
|
|
449041
446635
|
|
|
449042
|
-
// 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.
|
|
446636
|
+
// 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
|
|
449043
446637
|
var require_get_source_nodes = __commonJS({
|
|
449044
|
-
"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.
|
|
446638
|
+
"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) {
|
|
449045
446639
|
"use strict";
|
|
449046
446640
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
449047
446641
|
exports2.getSourceNodes = void 0;
|
|
@@ -449063,9 +446657,9 @@ var require_get_source_nodes = __commonJS({
|
|
|
449063
446657
|
}
|
|
449064
446658
|
});
|
|
449065
446659
|
|
|
449066
|
-
// 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.
|
|
446660
|
+
// 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
|
|
449067
446661
|
var require_get_swcrc_path = __commonJS({
|
|
449068
|
-
"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.
|
|
446662
|
+
"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) {
|
|
449069
446663
|
"use strict";
|
|
449070
446664
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
449071
446665
|
exports2.getSwcrcPath = void 0;
|
|
@@ -449077,9 +446671,9 @@ var require_get_swcrc_path = __commonJS({
|
|
|
449077
446671
|
}
|
|
449078
446672
|
});
|
|
449079
446673
|
|
|
449080
|
-
// 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.
|
|
446674
|
+
// 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
|
|
449081
446675
|
var require_compiler_helper_dependency = __commonJS({
|
|
449082
|
-
"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.
|
|
446676
|
+
"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) {
|
|
449083
446677
|
"use strict";
|
|
449084
446678
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
449085
446679
|
exports2.getHelperDependenciesFromProjectGraph = exports2.getHelperDependency = exports2.HelperDependency = void 0;
|
|
@@ -449178,9 +446772,9 @@ var require_compiler_helper_dependency = __commonJS({
|
|
|
449178
446772
|
}
|
|
449179
446773
|
});
|
|
449180
446774
|
|
|
449181
|
-
// 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.
|
|
446775
|
+
// 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
|
|
449182
446776
|
var require_create_ts_config = __commonJS({
|
|
449183
|
-
"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.
|
|
446777
|
+
"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) {
|
|
449184
446778
|
"use strict";
|
|
449185
446779
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
449186
446780
|
exports2.extractTsConfigBase = exports2.tsConfigBaseOptions = void 0;
|
|
@@ -449230,9 +446824,9 @@ var require_create_ts_config = __commonJS({
|
|
|
449230
446824
|
}
|
|
449231
446825
|
});
|
|
449232
446826
|
|
|
449233
|
-
// 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.
|
|
446827
|
+
// 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
|
|
449234
446828
|
var require_ast_utils = __commonJS({
|
|
449235
|
-
"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.
|
|
446829
|
+
"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) {
|
|
449236
446830
|
"use strict";
|
|
449237
446831
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
449238
446832
|
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;
|
|
@@ -449471,9 +447065,9 @@ ${opts.methodHeader} {}
|
|
|
449471
447065
|
}
|
|
449472
447066
|
});
|
|
449473
447067
|
|
|
449474
|
-
// 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.
|
|
447068
|
+
// 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
|
|
449475
447069
|
var require_watch_for_single_file_changes = __commonJS({
|
|
449476
|
-
"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.
|
|
447070
|
+
"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) {
|
|
449477
447071
|
"use strict";
|
|
449478
447072
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
449479
447073
|
exports2.watchForSingleFileChanges = void 0;
|
|
@@ -449497,9 +447091,9 @@ var require_watch_for_single_file_changes = __commonJS({
|
|
|
449497
447091
|
}
|
|
449498
447092
|
});
|
|
449499
447093
|
|
|
449500
|
-
// 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.
|
|
447094
|
+
// 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
|
|
449501
447095
|
var require_get_main_file_dir = __commonJS({
|
|
449502
|
-
"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.
|
|
447096
|
+
"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) {
|
|
449503
447097
|
"use strict";
|
|
449504
447098
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
449505
447099
|
exports2.getRelativeDirectoryToProjectRoot = void 0;
|
|
@@ -449514,9 +447108,9 @@ var require_get_main_file_dir = __commonJS({
|
|
|
449514
447108
|
}
|
|
449515
447109
|
});
|
|
449516
447110
|
|
|
449517
|
-
// 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.
|
|
447111
|
+
// 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
|
|
449518
447112
|
var require_update_package_json = __commonJS({
|
|
449519
|
-
"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.
|
|
447113
|
+
"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) {
|
|
449520
447114
|
"use strict";
|
|
449521
447115
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
449522
447116
|
exports2.getUpdatedPackageJsonContent = exports2.getExports = exports2.updatePackageJson = void 0;
|
|
@@ -449674,9 +447268,9 @@ var require_update_package_json = __commonJS({
|
|
|
449674
447268
|
}
|
|
449675
447269
|
});
|
|
449676
447270
|
|
|
449677
|
-
// 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.
|
|
447271
|
+
// 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
|
|
449678
447272
|
var require_buildable_libs_utils = __commonJS({
|
|
449679
|
-
"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.
|
|
447273
|
+
"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) {
|
|
449680
447274
|
"use strict";
|
|
449681
447275
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
449682
447276
|
exports2.updateBuildableProjectPackageJsonDependencies = exports2.updatePaths = exports2.findMissingBuildDependencies = exports2.checkDependentProjectsHaveBeenBuilt = exports2.createTmpTsConfig = exports2.computeCompilerOptionsPaths = exports2.calculateDependenciesFromTaskGraph = exports2.calculateProjectDependencies = exports2.calculateProjectBuildableDependencies = void 0;
|
|
@@ -450000,9 +447594,9 @@ var require_buildable_libs_utils = __commonJS({
|
|
|
450000
447594
|
}
|
|
450001
447595
|
});
|
|
450002
447596
|
|
|
450003
|
-
// 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.
|
|
447597
|
+
// 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
|
|
450004
447598
|
var require_check_dependencies = __commonJS({
|
|
450005
|
-
"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.
|
|
447599
|
+
"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) {
|
|
450006
447600
|
"use strict";
|
|
450007
447601
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
450008
447602
|
exports2.checkDependencies = void 0;
|
|
@@ -450029,9 +447623,9 @@ var require_check_dependencies = __commonJS({
|
|
|
450029
447623
|
}
|
|
450030
447624
|
});
|
|
450031
447625
|
|
|
450032
|
-
// 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.
|
|
447626
|
+
// 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
|
|
450033
447627
|
var require_package_json2 = __commonJS({
|
|
450034
|
-
"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.
|
|
447628
|
+
"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) {
|
|
450035
447629
|
"use strict";
|
|
450036
447630
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
450037
447631
|
exports2.copyPackageJson = void 0;
|
|
@@ -451611,9 +449205,9 @@ var require_cjs2 = __commonJS({
|
|
|
451611
449205
|
}
|
|
451612
449206
|
});
|
|
451613
449207
|
|
|
451614
|
-
// 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.
|
|
449208
|
+
// 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
|
|
451615
449209
|
var require_copy_assets_handler = __commonJS({
|
|
451616
|
-
"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.
|
|
449210
|
+
"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) {
|
|
451617
449211
|
"use strict";
|
|
451618
449212
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
451619
449213
|
exports2.CopyAssetsHandler = exports2.defaultFileEventHandler = void 0;
|
|
@@ -451760,9 +449354,9 @@ var require_copy_assets_handler = __commonJS({
|
|
|
451760
449354
|
}
|
|
451761
449355
|
});
|
|
451762
449356
|
|
|
451763
|
-
// 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.
|
|
449357
|
+
// 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
|
|
451764
449358
|
var require_assets2 = __commonJS({
|
|
451765
|
-
"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.
|
|
449359
|
+
"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) {
|
|
451766
449360
|
"use strict";
|
|
451767
449361
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
451768
449362
|
exports2.copyAssets = void 0;
|
|
@@ -451792,9 +449386,9 @@ var require_assets2 = __commonJS({
|
|
|
451792
449386
|
}
|
|
451793
449387
|
});
|
|
451794
449388
|
|
|
451795
|
-
// 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.
|
|
449389
|
+
// 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
|
|
451796
449390
|
var require_create_entry_points = __commonJS({
|
|
451797
|
-
"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.
|
|
449391
|
+
"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) {
|
|
451798
449392
|
"use strict";
|
|
451799
449393
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
451800
449394
|
exports2.createEntryPoints = void 0;
|
|
@@ -456669,9 +454263,9 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
456669
454263
|
}
|
|
456670
454264
|
});
|
|
456671
454265
|
|
|
456672
|
-
// 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.
|
|
454266
|
+
// 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
|
|
456673
454267
|
var require_minimal_publish_script = __commonJS({
|
|
456674
|
-
"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.
|
|
454268
|
+
"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) {
|
|
456675
454269
|
"use strict";
|
|
456676
454270
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
456677
454271
|
exports2.addMinimalPublishScript = void 0;
|
|
@@ -456749,9 +454343,9 @@ execSync(\`npm publish --access public --tag \${tag}\`);
|
|
|
456749
454343
|
}
|
|
456750
454344
|
});
|
|
456751
454345
|
|
|
456752
|
-
// 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.
|
|
454346
|
+
// 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
|
|
456753
454347
|
var require_add_swc_config = __commonJS({
|
|
456754
|
-
"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.
|
|
454348
|
+
"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) {
|
|
456755
454349
|
"use strict";
|
|
456756
454350
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
456757
454351
|
exports2.addSwcConfig = exports2.defaultExclude = void 0;
|
|
@@ -456796,9 +454390,9 @@ var require_add_swc_config = __commonJS({
|
|
|
456796
454390
|
}
|
|
456797
454391
|
});
|
|
456798
454392
|
|
|
456799
|
-
// 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.
|
|
454393
|
+
// 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
|
|
456800
454394
|
var require_add_swc_dependencies = __commonJS({
|
|
456801
|
-
"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.
|
|
454395
|
+
"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) {
|
|
456802
454396
|
"use strict";
|
|
456803
454397
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
456804
454398
|
exports2.addSwcRegisterDependencies = exports2.addSwcDependencies = void 0;
|
|
@@ -456844,9 +454438,9 @@ var require_semver4 = __commonJS({
|
|
|
456844
454438
|
}
|
|
456845
454439
|
});
|
|
456846
454440
|
|
|
456847
|
-
// 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.
|
|
454441
|
+
// 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
|
|
456848
454442
|
var require_init = __commonJS({
|
|
456849
|
-
"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.
|
|
454443
|
+
"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) {
|
|
456850
454444
|
"use strict";
|
|
456851
454445
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
456852
454446
|
exports2.initGenerator = void 0;
|
|
@@ -456953,9 +454547,9 @@ var require_init = __commonJS({
|
|
|
456953
454547
|
}
|
|
456954
454548
|
});
|
|
456955
454549
|
|
|
456956
|
-
// 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.
|
|
454550
|
+
// 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
|
|
456957
454551
|
var require_generator = __commonJS({
|
|
456958
|
-
"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.
|
|
454552
|
+
"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) {
|
|
456959
454553
|
"use strict";
|
|
456960
454554
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
456961
454555
|
exports2.setupVerdaccio = void 0;
|
|
@@ -457054,9 +454648,9 @@ var require_add_build_target_defaults = __commonJS({
|
|
|
457054
454648
|
}
|
|
457055
454649
|
});
|
|
457056
454650
|
|
|
457057
|
-
// 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.
|
|
454651
|
+
// 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
|
|
457058
454652
|
var require_flat_config = __commonJS({
|
|
457059
|
-
"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.
|
|
454653
|
+
"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) {
|
|
457060
454654
|
"use strict";
|
|
457061
454655
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
457062
454656
|
exports2.useFlatConfig = void 0;
|
|
@@ -457067,9 +454661,9 @@ var require_flat_config = __commonJS({
|
|
|
457067
454661
|
}
|
|
457068
454662
|
});
|
|
457069
454663
|
|
|
457070
|
-
// 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.
|
|
454664
|
+
// 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
|
|
457071
454665
|
var require_path_utils = __commonJS({
|
|
457072
|
-
"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.
|
|
454666
|
+
"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) {
|
|
457073
454667
|
"use strict";
|
|
457074
454668
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
457075
454669
|
exports2.mapFilePath = exports2.updateFiles = void 0;
|
|
@@ -457099,9 +454693,9 @@ var require_path_utils = __commonJS({
|
|
|
457099
454693
|
}
|
|
457100
454694
|
});
|
|
457101
454695
|
|
|
457102
|
-
// 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.
|
|
454696
|
+
// 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
|
|
457103
454697
|
var require_ast_utils2 = __commonJS({
|
|
457104
|
-
"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.
|
|
454698
|
+
"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) {
|
|
457105
454699
|
"use strict";
|
|
457106
454700
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
457107
454701
|
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;
|
|
@@ -457558,9 +455152,9 @@ const compat = new FlatCompat({
|
|
|
457558
455152
|
}
|
|
457559
455153
|
});
|
|
457560
455154
|
|
|
457561
|
-
// 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.
|
|
455155
|
+
// 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
|
|
457562
455156
|
var require_config_file = __commonJS({
|
|
457563
|
-
"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.
|
|
455157
|
+
"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) {
|
|
457564
455158
|
"use strict";
|
|
457565
455159
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
457566
455160
|
exports2.isFlatConfig = exports2.findBaseEslintFile = exports2.baseEsLintFlatConfigFile = exports2.baseEsLintConfigFile = exports2.ESLINT_CONFIG_FILENAMES = void 0;
|
|
@@ -457599,9 +455193,9 @@ var require_config_file = __commonJS({
|
|
|
457599
455193
|
}
|
|
457600
455194
|
});
|
|
457601
455195
|
|
|
457602
|
-
// 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.
|
|
455196
|
+
// 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
|
|
457603
455197
|
var require_eslint_file = __commonJS({
|
|
457604
|
-
"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.
|
|
455198
|
+
"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) {
|
|
457605
455199
|
"use strict";
|
|
457606
455200
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
457607
455201
|
exports2.getPluginImport = exports2.addIgnoresToLintConfig = exports2.addPluginsToLintConfig = exports2.addExtendsToLintConfig = exports2.replaceOverridesInLintConfig = exports2.lintConfigHasOverride = exports2.updateOverrideInLintConfig = exports2.addOverrideToLintConfig = exports2.updateRelativePathsInConfig = exports2.isEslintConfigSupported = exports2.findEslintFile = void 0;
|
|
@@ -457866,9 +455460,9 @@ var require_eslint_file = __commonJS({
|
|
|
457866
455460
|
}
|
|
457867
455461
|
});
|
|
457868
455462
|
|
|
457869
|
-
// 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.
|
|
455463
|
+
// 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
|
|
457870
455464
|
var require_library = __commonJS({
|
|
457871
|
-
"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.
|
|
455465
|
+
"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) {
|
|
457872
455466
|
"use strict";
|
|
457873
455467
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
457874
455468
|
exports2.addLint = exports2.libraryGeneratorInternal = exports2.libraryGenerator = void 0;
|
|
@@ -458423,9 +456017,9 @@ var require_library = __commonJS({
|
|
|
458423
456017
|
}
|
|
458424
456018
|
});
|
|
458425
456019
|
|
|
458426
|
-
// 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.
|
|
456020
|
+
// 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
|
|
458427
456021
|
var require_src6 = __commonJS({
|
|
458428
|
-
"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.
|
|
456022
|
+
"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) {
|
|
458429
456023
|
"use strict";
|
|
458430
456024
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
458431
456025
|
exports2.createPackageJson = exports2.getLockFileName = exports2.createLockFile = exports2.initGenerator = exports2.libraryGenerator = void 0;
|
|
@@ -458975,10 +456569,6 @@ function getNormalizedTsConfig(context, workspaceRoot, outputPath, options8) {
|
|
|
458975
456569
|
outDir: outputPath,
|
|
458976
456570
|
rootDir: workspaceRoot,
|
|
458977
456571
|
baseUrl: workspaceRoot,
|
|
458978
|
-
target: "esnext",
|
|
458979
|
-
module: "esnext",
|
|
458980
|
-
moduleResolution: "node",
|
|
458981
|
-
lib: ["lib.esnext.d.ts", "lib.dom.d.ts", "lib.dom.iterable.d.ts"],
|
|
458982
456572
|
noEmit: false,
|
|
458983
456573
|
esModuleInterop: true,
|
|
458984
456574
|
downlevelIteration: true,
|