@storm-software/workspace-tools 1.12.3 → 1.12.5
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 +14 -0
- package/README.md +1 -1
- package/index.js +770 -18
- package/meta.json +1 -1
- package/package.json +2 -1
- package/src/executors/tsup/executor.js +770 -18
- package/src/executors/tsup/get-config.js +769 -17
package/index.js
CHANGED
|
@@ -408390,9 +408390,9 @@ var require_brace_expansion2 = __commonJS({
|
|
|
408390
408390
|
}
|
|
408391
408391
|
});
|
|
408392
408392
|
|
|
408393
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
408393
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=tocwzkjm26qsyozdkdwrhijyge_@microsoft+api-extractor@7.38.3_@swc+core@1._5hmoeoccsx3kt3yjnysqqiv3vu/node_modules/tsup/dist/chunk-EPAEWGCP.js
|
|
408394
408394
|
var require_chunk_EPAEWGCP = __commonJS({
|
|
408395
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
408395
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=tocwzkjm26qsyozdkdwrhijyge_@microsoft+api-extractor@7.38.3_@swc+core@1._5hmoeoccsx3kt3yjnysqqiv3vu/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
|
|
408396
408396
|
"use strict";
|
|
408397
408397
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
408398
408398
|
var version = "8.0.0";
|
|
@@ -410039,9 +410039,9 @@ var require_resolve_from = __commonJS({
|
|
|
410039
410039
|
}
|
|
410040
410040
|
});
|
|
410041
410041
|
|
|
410042
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
410042
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=tocwzkjm26qsyozdkdwrhijyge_@microsoft+api-extractor@7.38.3_@swc+core@1._5hmoeoccsx3kt3yjnysqqiv3vu/node_modules/tsup/dist/chunk-GQ77QZBO.js
|
|
410043
410043
|
var require_chunk_GQ77QZBO = __commonJS({
|
|
410044
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
410044
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=tocwzkjm26qsyozdkdwrhijyge_@microsoft+api-extractor@7.38.3_@swc+core@1._5hmoeoccsx3kt3yjnysqqiv3vu/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
|
|
410045
410045
|
"use strict";
|
|
410046
410046
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
410047
410047
|
function _interopRequireDefault(obj) {
|
|
@@ -410319,9 +410319,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
410319
410319
|
}
|
|
410320
410320
|
});
|
|
410321
410321
|
|
|
410322
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
410322
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=tocwzkjm26qsyozdkdwrhijyge_@microsoft+api-extractor@7.38.3_@swc+core@1._5hmoeoccsx3kt3yjnysqqiv3vu/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
410323
410323
|
var require_chunk_UIX4URMV = __commonJS({
|
|
410324
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
410324
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=tocwzkjm26qsyozdkdwrhijyge_@microsoft+api-extractor@7.38.3_@swc+core@1._5hmoeoccsx3kt3yjnysqqiv3vu/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
|
|
410325
410325
|
"use strict";
|
|
410326
410326
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
410327
410327
|
function _interopRequireWildcard(obj) {
|
|
@@ -411255,9 +411255,9 @@ var require_dist2 = __commonJS({
|
|
|
411255
411255
|
}
|
|
411256
411256
|
});
|
|
411257
411257
|
|
|
411258
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
411258
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=tocwzkjm26qsyozdkdwrhijyge_@microsoft+api-extractor@7.38.3_@swc+core@1._5hmoeoccsx3kt3yjnysqqiv3vu/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
411259
411259
|
var require_chunk_7G76EW2R = __commonJS({
|
|
411260
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
411260
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=tocwzkjm26qsyozdkdwrhijyge_@microsoft+api-extractor@7.38.3_@swc+core@1._5hmoeoccsx3kt3yjnysqqiv3vu/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
|
|
411261
411261
|
"use strict";
|
|
411262
411262
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
411263
411263
|
function _interopRequireDefault(obj) {
|
|
@@ -462650,6 +462650,731 @@ var require_rollup2 = __commonJS({
|
|
|
462650
462650
|
}
|
|
462651
462651
|
});
|
|
462652
462652
|
|
|
462653
|
+
// node_modules/.pnpm/@typescript+vfs@1.5.0/node_modules/@typescript/vfs/dist/vfs.cjs.production.min.js
|
|
462654
|
+
var require_vfs_cjs_production_min = __commonJS({
|
|
462655
|
+
"node_modules/.pnpm/@typescript+vfs@1.5.0/node_modules/@typescript/vfs/dist/vfs.cjs.production.min.js"(exports) {
|
|
462656
|
+
"use strict";
|
|
462657
|
+
function e() {
|
|
462658
|
+
return (e = Object.assign || function(e2) {
|
|
462659
|
+
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
462660
|
+
var r2 = arguments[t2];
|
|
462661
|
+
for (var i2 in r2)
|
|
462662
|
+
Object.prototype.hasOwnProperty.call(r2, i2) && (e2[i2] = r2[i2]);
|
|
462663
|
+
}
|
|
462664
|
+
return e2;
|
|
462665
|
+
}).apply(this, arguments);
|
|
462666
|
+
}
|
|
462667
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
462668
|
+
var t = false;
|
|
462669
|
+
try {
|
|
462670
|
+
t = "undefined" != typeof localStorage;
|
|
462671
|
+
} catch (e2) {
|
|
462672
|
+
}
|
|
462673
|
+
var r = "undefined" != typeof process;
|
|
462674
|
+
var i = t && localStorage.getItem("DEBUG") || r && process.env.DEBUG ? console.log : function(e2) {
|
|
462675
|
+
return "";
|
|
462676
|
+
};
|
|
462677
|
+
var n = function(e2, t2) {
|
|
462678
|
+
var r2, i2 = e2.lib || [], n2 = ["lib.d.ts", "lib.decorators.d.ts", "lib.decorators.legacy.d.ts", "lib.dom.d.ts", "lib.dom.iterable.d.ts", "lib.webworker.d.ts", "lib.webworker.importscripts.d.ts", "lib.webworker.iterable.d.ts", "lib.scripthost.d.ts", "lib.es5.d.ts", "lib.es6.d.ts", "lib.es2015.collection.d.ts", "lib.es2015.core.d.ts", "lib.es2015.d.ts", "lib.es2015.generator.d.ts", "lib.es2015.iterable.d.ts", "lib.es2015.promise.d.ts", "lib.es2015.proxy.d.ts", "lib.es2015.reflect.d.ts", "lib.es2015.symbol.d.ts", "lib.es2015.symbol.wellknown.d.ts", "lib.es2016.array.include.d.ts", "lib.es2016.d.ts", "lib.es2016.full.d.ts", "lib.es2017.d.ts", "lib.es2017.date.d.ts", "lib.es2017.full.d.ts", "lib.es2017.intl.d.ts", "lib.es2017.object.d.ts", "lib.es2017.sharedmemory.d.ts", "lib.es2017.string.d.ts", "lib.es2017.typedarrays.d.ts", "lib.es2018.asyncgenerator.d.ts", "lib.es2018.asynciterable.d.ts", "lib.es2018.d.ts", "lib.es2018.full.d.ts", "lib.es2018.intl.d.ts", "lib.es2018.promise.d.ts", "lib.es2018.regexp.d.ts", "lib.es2019.array.d.ts", "lib.es2019.d.ts", "lib.es2019.full.d.ts", "lib.es2019.intl.d.ts", "lib.es2019.object.d.ts", "lib.es2019.string.d.ts", "lib.es2019.symbol.d.ts", "lib.es2020.bigint.d.ts", "lib.es2020.d.ts", "lib.es2020.date.d.ts", "lib.es2020.full.d.ts", "lib.es2020.intl.d.ts", "lib.es2020.number.d.ts", "lib.es2020.promise.d.ts", "lib.es2020.sharedmemory.d.ts", "lib.es2020.string.d.ts", "lib.es2020.symbol.wellknown.d.ts", "lib.es2021.d.ts", "lib.es2021.full.d.ts", "lib.es2021.intl.d.ts", "lib.es2021.promise.d.ts", "lib.es2021.string.d.ts", "lib.es2021.weakref.d.ts", "lib.es2022.array.d.ts", "lib.es2022.d.ts", "lib.es2022.error.d.ts", "lib.es2022.full.d.ts", "lib.es2022.intl.d.ts", "lib.es2022.object.d.ts", "lib.es2022.regexp.d.ts", "lib.es2022.sharedmemory.d.ts", "lib.es2022.string.d.ts", "lib.es2023.array.d.ts", "lib.es2023.collection.d.ts", "lib.es2023.d.ts", "lib.es2023.full.d.ts", "lib.esnext.array.d.ts", "lib.esnext.asynciterable.d.ts", "lib.esnext.bigint.d.ts", "lib.esnext.d.ts", "lib.esnext.decorators.d.ts", "lib.esnext.disposable.d.ts", "lib.esnext.full.d.ts", "lib.esnext.intl.d.ts", "lib.esnext.promise.d.ts", "lib.esnext.string.d.ts", "lib.esnext.symbol.d.ts", "lib.esnext.weakref.d.ts"], s2 = t2.ScriptTarget[e2.target || t2.ScriptTarget.ES5], o2 = n2.filter(function(e3) {
|
|
462679
|
+
return e3.startsWith("lib." + s2.toLowerCase());
|
|
462680
|
+
}), l2 = n2.indexOf(o2.pop()), a2 = ((r2 = i2.map(function(e3) {
|
|
462681
|
+
var t3 = n2.filter(function(t4) {
|
|
462682
|
+
return t4.startsWith("lib." + e3.toLowerCase());
|
|
462683
|
+
});
|
|
462684
|
+
return 0 === t3.length ? 0 : n2.indexOf(t3.pop());
|
|
462685
|
+
})) && r2.length ? r2.reduce(function(e3, t3) {
|
|
462686
|
+
return t3 > e3 ? t3 : e3;
|
|
462687
|
+
}) : void 0) || 0, u2 = Math.max(l2, a2);
|
|
462688
|
+
return n2.slice(0, u2 + 1);
|
|
462689
|
+
};
|
|
462690
|
+
var s = function(e2, t2) {
|
|
462691
|
+
var r2 = f(), i2 = b();
|
|
462692
|
+
(function e3(t3) {
|
|
462693
|
+
var n2 = [];
|
|
462694
|
+
return i2.readdirSync(t3).forEach(function(s2) {
|
|
462695
|
+
s2 = r2.join(t3, s2);
|
|
462696
|
+
var o2 = i2.statSync(s2);
|
|
462697
|
+
o2 && o2.isDirectory() ? n2 = n2.concat(e3(s2)) : n2.push(s2);
|
|
462698
|
+
}), n2;
|
|
462699
|
+
})(t2).forEach(function(n2) {
|
|
462700
|
+
var s2 = "/node_modules/@types" + n2.replace(t2, ""), o2 = i2.readFileSync(n2, "utf8");
|
|
462701
|
+
[".ts", ".tsx"].includes(r2.extname(s2)) && e2.set(s2, o2);
|
|
462702
|
+
});
|
|
462703
|
+
};
|
|
462704
|
+
function o(e2) {
|
|
462705
|
+
throw new Error("Method '" + e2 + "' is not implemented.");
|
|
462706
|
+
}
|
|
462707
|
+
function l(e2, t2) {
|
|
462708
|
+
return function() {
|
|
462709
|
+
for (var r2 = arguments.length, n2 = new Array(r2), s2 = 0; s2 < r2; s2++)
|
|
462710
|
+
n2[s2] = arguments[s2];
|
|
462711
|
+
var o2 = t2.apply(void 0, n2), l2 = "string" == typeof o2 ? o2.slice(0, 80) + "..." : o2;
|
|
462712
|
+
return i.apply(void 0, ["> " + e2].concat(n2)), i("< " + l2), o2;
|
|
462713
|
+
};
|
|
462714
|
+
}
|
|
462715
|
+
var a = function(t2) {
|
|
462716
|
+
return e({}, t2.getDefaultCompilerOptions(), { jsx: t2.JsxEmit.React, strict: true, esModuleInterop: true, module: t2.ModuleKind.ESNext, suppressOutputPathCheck: true, skipLibCheck: true, skipDefaultLibCheck: true, moduleResolution: t2.ModuleResolutionKind.NodeJs });
|
|
462717
|
+
};
|
|
462718
|
+
var u = function(e2) {
|
|
462719
|
+
return e2.replace("/", "/lib.").toLowerCase();
|
|
462720
|
+
};
|
|
462721
|
+
function c(t2, r2, i2) {
|
|
462722
|
+
var n2 = /* @__PURE__ */ new Map();
|
|
462723
|
+
return { compilerHost: e({}, t2, { getCanonicalFileName: function(e2) {
|
|
462724
|
+
return e2;
|
|
462725
|
+
}, getDefaultLibFileName: function() {
|
|
462726
|
+
return "/" + i2.getDefaultLibFileName(r2);
|
|
462727
|
+
}, getDirectories: function() {
|
|
462728
|
+
return [];
|
|
462729
|
+
}, getNewLine: function() {
|
|
462730
|
+
return t2.newLine;
|
|
462731
|
+
}, getSourceFile: function(e2) {
|
|
462732
|
+
return n2.get(e2) || (s2 = i2.createSourceFile(e2, t2.readFile(e2), r2.target || a(i2).target, false), n2.set(s2.fileName, s2), s2);
|
|
462733
|
+
var s2;
|
|
462734
|
+
}, useCaseSensitiveFileNames: function() {
|
|
462735
|
+
return t2.useCaseSensitiveFileNames;
|
|
462736
|
+
} }), updateFile: function(e2) {
|
|
462737
|
+
var r3 = n2.has(e2.fileName);
|
|
462738
|
+
return t2.writeFile(e2.fileName, e2.text), n2.set(e2.fileName, e2), r3;
|
|
462739
|
+
} };
|
|
462740
|
+
}
|
|
462741
|
+
function d(t2, r2, i2, n2, s2) {
|
|
462742
|
+
var o2 = [].concat(r2), l2 = c(t2, i2, n2), a2 = l2.compilerHost, u2 = l2.updateFile, d2 = /* @__PURE__ */ new Map(), f2 = 0;
|
|
462743
|
+
return { languageServiceHost: e({}, a2, { getProjectVersion: function() {
|
|
462744
|
+
return f2.toString();
|
|
462745
|
+
}, getCompilationSettings: function() {
|
|
462746
|
+
return i2;
|
|
462747
|
+
}, getCustomTransformers: function() {
|
|
462748
|
+
return s2;
|
|
462749
|
+
}, getScriptFileNames: function() {
|
|
462750
|
+
return o2.slice();
|
|
462751
|
+
}, getScriptSnapshot: function(e2) {
|
|
462752
|
+
var r3 = t2.readFile(e2);
|
|
462753
|
+
if (r3)
|
|
462754
|
+
return n2.ScriptSnapshot.fromString(r3);
|
|
462755
|
+
}, getScriptVersion: function(e2) {
|
|
462756
|
+
return d2.get(e2) || "0";
|
|
462757
|
+
}, writeFile: t2.writeFile }), updateFile: function(e2) {
|
|
462758
|
+
f2++, d2.set(e2.fileName, f2.toString()), o2.includes(e2.fileName) || o2.push(e2.fileName), u2(e2);
|
|
462759
|
+
} };
|
|
462760
|
+
}
|
|
462761
|
+
var f = function() {
|
|
462762
|
+
return require(String.fromCharCode(112, 97, 116, 104));
|
|
462763
|
+
};
|
|
462764
|
+
var b = function() {
|
|
462765
|
+
return require(String.fromCharCode(102, 115));
|
|
462766
|
+
};
|
|
462767
|
+
exports.addAllFilesFromFolder = s, exports.addFilesForTypesIntoFolder = function(e2) {
|
|
462768
|
+
return s(e2, "node_modules/@types");
|
|
462769
|
+
}, exports.createDefaultMapFromCDN = function(e2, t2, r2, i2, s2, o2, l2) {
|
|
462770
|
+
var a2 = o2 || fetch, u2 = /* @__PURE__ */ new Map(), c2 = n(e2, i2), d2 = "https://typescript.azureedge.net/cdn/" + t2 + "/typescript/lib/";
|
|
462771
|
+
return (r2 ? function() {
|
|
462772
|
+
var e3 = l2 || localStorage;
|
|
462773
|
+
return Object.keys(e3).forEach(function(r3) {
|
|
462774
|
+
r3.startsWith("ts-lib-") && !r3.startsWith("ts-lib-" + t2) && e3.removeItem(r3);
|
|
462775
|
+
}), Promise.all(c2.map(function(r3) {
|
|
462776
|
+
var i3, n2 = "ts-lib-" + t2 + "-" + r3, o3 = e3.getItem(n2);
|
|
462777
|
+
return o3 ? Promise.resolve((i3 = o3, s2 ? s2.decompressFromUTF16(i3) : i3)) : a2(d2 + r3).then(function(e4) {
|
|
462778
|
+
return e4.text();
|
|
462779
|
+
}).then(function(t3) {
|
|
462780
|
+
var r4;
|
|
462781
|
+
return e3.setItem(n2, (r4 = t3, s2 ? s2.compressToUTF16(r4) : r4)), t3;
|
|
462782
|
+
}).catch(function() {
|
|
462783
|
+
});
|
|
462784
|
+
})).then(function(e4) {
|
|
462785
|
+
e4.forEach(function(e5, t3) {
|
|
462786
|
+
e5 && u2.set("/" + c2[t3], e5);
|
|
462787
|
+
});
|
|
462788
|
+
});
|
|
462789
|
+
} : function() {
|
|
462790
|
+
return Promise.all(c2.map(function(e3) {
|
|
462791
|
+
return a2(d2 + e3).then(function(e4) {
|
|
462792
|
+
return e4.text();
|
|
462793
|
+
});
|
|
462794
|
+
})).then(function(e3) {
|
|
462795
|
+
e3.forEach(function(e4, t3) {
|
|
462796
|
+
return u2.set("/" + c2[t3], e4);
|
|
462797
|
+
});
|
|
462798
|
+
}).catch(function() {
|
|
462799
|
+
});
|
|
462800
|
+
})().then(function() {
|
|
462801
|
+
return u2;
|
|
462802
|
+
});
|
|
462803
|
+
}, exports.createDefaultMapFromNodeModules = function(e2, t2, r2) {
|
|
462804
|
+
var i2 = f(), n2 = b(), s2 = n2.readdirSync(r2 || i2.dirname(require.resolve("typescript"))).filter(function(e3) {
|
|
462805
|
+
return e3.startsWith("lib.") && e3.endsWith(".d.ts");
|
|
462806
|
+
}), o2 = /* @__PURE__ */ new Map();
|
|
462807
|
+
return s2.forEach(function(e3) {
|
|
462808
|
+
o2.set("/" + e3, function(e4) {
|
|
462809
|
+
var t3 = r2 || i2.dirname(require.resolve("typescript"));
|
|
462810
|
+
return n2.readFileSync(i2.join(t3, e4), "utf8");
|
|
462811
|
+
}(e3));
|
|
462812
|
+
}), o2;
|
|
462813
|
+
}, exports.createFSBackedSystem = function(e2, t2, r2, i2) {
|
|
462814
|
+
var n2 = t2 + "/vfs", s2 = f(), a2 = r2.sys, u2 = null != i2 ? i2 : s2.dirname(require.resolve("typescript"));
|
|
462815
|
+
return { name: "fs-vfs", root: n2, args: [], createDirectory: function() {
|
|
462816
|
+
return o("createDirectory");
|
|
462817
|
+
}, directoryExists: l("directoryExists", function(t3) {
|
|
462818
|
+
return Array.from(e2.keys()).some(function(e3) {
|
|
462819
|
+
return e3.startsWith(t3);
|
|
462820
|
+
}) || a2.directoryExists(t3);
|
|
462821
|
+
}), exit: a2.exit, fileExists: l("fileExists", function(t3) {
|
|
462822
|
+
if (e2.has(t3))
|
|
462823
|
+
return true;
|
|
462824
|
+
if (t3.includes("tsconfig.json") || t3.includes("tsconfig.json"))
|
|
462825
|
+
return false;
|
|
462826
|
+
if (t3.startsWith("/lib")) {
|
|
462827
|
+
var r3 = u2 + "/" + t3.replace("/", "");
|
|
462828
|
+
return a2.fileExists(r3);
|
|
462829
|
+
}
|
|
462830
|
+
return a2.fileExists(t3);
|
|
462831
|
+
}), getCurrentDirectory: function() {
|
|
462832
|
+
return n2;
|
|
462833
|
+
}, getDirectories: a2.getDirectories, getExecutingFilePath: function() {
|
|
462834
|
+
return o("getExecutingFilePath");
|
|
462835
|
+
}, readDirectory: l("readDirectory", function() {
|
|
462836
|
+
return "/" === (arguments.length <= 0 ? void 0 : arguments[0]) ? Array.from(e2.keys()) : a2.readDirectory.apply(a2, arguments);
|
|
462837
|
+
}), readFile: l("readFile", function(t3) {
|
|
462838
|
+
if (e2.has(t3))
|
|
462839
|
+
return e2.get(t3);
|
|
462840
|
+
if (t3.startsWith("/lib")) {
|
|
462841
|
+
var r3 = u2 + "/" + t3.replace("/", ""), i3 = a2.readFile(r3);
|
|
462842
|
+
if (!i3) {
|
|
462843
|
+
var n3 = a2.readDirectory(u2);
|
|
462844
|
+
throw new Error("TSVFS: A request was made for " + r3 + " but there wasn't a file found in the file map. You likely have a mismatch in the compiler options for the CDN download vs the compiler program. Existing Libs: " + n3 + ".");
|
|
462845
|
+
}
|
|
462846
|
+
return i3;
|
|
462847
|
+
}
|
|
462848
|
+
return a2.readFile(t3);
|
|
462849
|
+
}), resolvePath: function(t3) {
|
|
462850
|
+
return e2.has(t3) ? t3 : a2.resolvePath(t3);
|
|
462851
|
+
}, newLine: "\n", useCaseSensitiveFileNames: true, write: function() {
|
|
462852
|
+
return o("write");
|
|
462853
|
+
}, writeFile: function(t3, r3) {
|
|
462854
|
+
e2.set(t3, r3);
|
|
462855
|
+
} };
|
|
462856
|
+
}, exports.createSystem = function(e2) {
|
|
462857
|
+
return { args: [], createDirectory: function() {
|
|
462858
|
+
return o("createDirectory");
|
|
462859
|
+
}, directoryExists: l("directoryExists", function(t2) {
|
|
462860
|
+
return Array.from(e2.keys()).some(function(e3) {
|
|
462861
|
+
return e3.startsWith(t2);
|
|
462862
|
+
});
|
|
462863
|
+
}), exit: function() {
|
|
462864
|
+
return o("exit");
|
|
462865
|
+
}, fileExists: l("fileExists", function(t2) {
|
|
462866
|
+
return e2.has(t2) || e2.has(u(t2));
|
|
462867
|
+
}), getCurrentDirectory: function() {
|
|
462868
|
+
return "/";
|
|
462869
|
+
}, getDirectories: function() {
|
|
462870
|
+
return [];
|
|
462871
|
+
}, getExecutingFilePath: function() {
|
|
462872
|
+
return o("getExecutingFilePath");
|
|
462873
|
+
}, readDirectory: l("readDirectory", function(t2) {
|
|
462874
|
+
return "/" === t2 ? Array.from(e2.keys()) : [];
|
|
462875
|
+
}), readFile: l("readFile", function(t2) {
|
|
462876
|
+
return e2.get(t2) || e2.get(u(t2));
|
|
462877
|
+
}), resolvePath: function(e3) {
|
|
462878
|
+
return e3;
|
|
462879
|
+
}, newLine: "\n", useCaseSensitiveFileNames: true, write: function() {
|
|
462880
|
+
return o("write");
|
|
462881
|
+
}, writeFile: function(t2, r2) {
|
|
462882
|
+
e2.set(t2, r2);
|
|
462883
|
+
} };
|
|
462884
|
+
}, exports.createVirtualCompilerHost = c, exports.createVirtualLanguageServiceHost = d, exports.createVirtualTypeScriptEnvironment = function(t2, r2, i2, n2, s2) {
|
|
462885
|
+
void 0 === n2 && (n2 = {});
|
|
462886
|
+
var o2 = e({}, a(i2), n2), l2 = d(t2, r2, o2, i2, s2), u2 = l2.updateFile, f2 = i2.createLanguageService(l2.languageServiceHost), b2 = f2.getCompilerOptionsDiagnostics();
|
|
462887
|
+
if (b2.length) {
|
|
462888
|
+
var p = c(t2, n2, i2);
|
|
462889
|
+
throw new Error(i2.formatDiagnostics(b2, p.compilerHost));
|
|
462890
|
+
}
|
|
462891
|
+
return { name: "vfs", sys: t2, languageService: f2, getSourceFile: function(e2) {
|
|
462892
|
+
var t3;
|
|
462893
|
+
return null == (t3 = f2.getProgram()) ? void 0 : t3.getSourceFile(e2);
|
|
462894
|
+
}, createFile: function(e2, t3) {
|
|
462895
|
+
u2(i2.createSourceFile(e2, t3, o2.target, false));
|
|
462896
|
+
}, updateFile: function(e2, t3, r3) {
|
|
462897
|
+
var n3 = f2.getProgram().getSourceFile(e2);
|
|
462898
|
+
if (!n3)
|
|
462899
|
+
throw new Error("Did not find a source file for " + e2);
|
|
462900
|
+
var s3 = n3.text, o3 = null != r3 ? r3 : i2.createTextSpan(0, s3.length), l3 = s3.slice(0, o3.start) + t3 + s3.slice(o3.start + o3.length), a2 = i2.updateSourceFile(n3, l3, { span: o3, newLength: t3.length });
|
|
462901
|
+
u2(a2);
|
|
462902
|
+
} };
|
|
462903
|
+
}, exports.knownLibFilesForCompilerOptions = n;
|
|
462904
|
+
}
|
|
462905
|
+
});
|
|
462906
|
+
|
|
462907
|
+
// node_modules/.pnpm/@typescript+vfs@1.5.0/node_modules/@typescript/vfs/dist/vfs.cjs.development.js
|
|
462908
|
+
var require_vfs_cjs_development = __commonJS({
|
|
462909
|
+
"node_modules/.pnpm/@typescript+vfs@1.5.0/node_modules/@typescript/vfs/dist/vfs.cjs.development.js"(exports) {
|
|
462910
|
+
"use strict";
|
|
462911
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
462912
|
+
function _extends() {
|
|
462913
|
+
_extends = Object.assign || function(target) {
|
|
462914
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
462915
|
+
var source = arguments[i];
|
|
462916
|
+
for (var key in source) {
|
|
462917
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
462918
|
+
target[key] = source[key];
|
|
462919
|
+
}
|
|
462920
|
+
}
|
|
462921
|
+
}
|
|
462922
|
+
return target;
|
|
462923
|
+
};
|
|
462924
|
+
return _extends.apply(this, arguments);
|
|
462925
|
+
}
|
|
462926
|
+
var hasLocalStorage = false;
|
|
462927
|
+
try {
|
|
462928
|
+
hasLocalStorage = typeof localStorage !== "undefined";
|
|
462929
|
+
} catch (error) {
|
|
462930
|
+
}
|
|
462931
|
+
var hasProcess = typeof process !== "undefined";
|
|
462932
|
+
var shouldDebug = hasLocalStorage && /* @__PURE__ */ localStorage.getItem("DEBUG") || hasProcess && process.env.DEBUG;
|
|
462933
|
+
var debugLog = shouldDebug ? console.log : function(_message) {
|
|
462934
|
+
return "";
|
|
462935
|
+
};
|
|
462936
|
+
function createVirtualTypeScriptEnvironment(sys, rootFiles, ts, compilerOptions, customTransformers) {
|
|
462937
|
+
if (compilerOptions === void 0) {
|
|
462938
|
+
compilerOptions = {};
|
|
462939
|
+
}
|
|
462940
|
+
var mergedCompilerOpts = _extends({}, defaultCompilerOptions(ts), compilerOptions);
|
|
462941
|
+
var _createVirtualLanguag = createVirtualLanguageServiceHost(sys, rootFiles, mergedCompilerOpts, ts, customTransformers), languageServiceHost = _createVirtualLanguag.languageServiceHost, _updateFile = _createVirtualLanguag.updateFile;
|
|
462942
|
+
var languageService = ts.createLanguageService(languageServiceHost);
|
|
462943
|
+
var diagnostics = languageService.getCompilerOptionsDiagnostics();
|
|
462944
|
+
if (diagnostics.length) {
|
|
462945
|
+
var compilerHost = createVirtualCompilerHost(sys, compilerOptions, ts);
|
|
462946
|
+
throw new Error(ts.formatDiagnostics(diagnostics, compilerHost.compilerHost));
|
|
462947
|
+
}
|
|
462948
|
+
return {
|
|
462949
|
+
// @ts-ignore
|
|
462950
|
+
name: "vfs",
|
|
462951
|
+
sys,
|
|
462952
|
+
languageService,
|
|
462953
|
+
getSourceFile: function getSourceFile(fileName) {
|
|
462954
|
+
var _languageService$getP;
|
|
462955
|
+
return (_languageService$getP = languageService.getProgram()) == null ? void 0 : _languageService$getP.getSourceFile(fileName);
|
|
462956
|
+
},
|
|
462957
|
+
createFile: function createFile(fileName, content) {
|
|
462958
|
+
_updateFile(ts.createSourceFile(fileName, content, mergedCompilerOpts.target, false));
|
|
462959
|
+
},
|
|
462960
|
+
updateFile: function updateFile(fileName, content, optPrevTextSpan) {
|
|
462961
|
+
var prevSourceFile = languageService.getProgram().getSourceFile(fileName);
|
|
462962
|
+
if (!prevSourceFile) {
|
|
462963
|
+
throw new Error("Did not find a source file for " + fileName);
|
|
462964
|
+
}
|
|
462965
|
+
var prevFullContents = prevSourceFile.text;
|
|
462966
|
+
var prevTextSpan = optPrevTextSpan != null ? optPrevTextSpan : ts.createTextSpan(0, prevFullContents.length);
|
|
462967
|
+
var newText = prevFullContents.slice(0, prevTextSpan.start) + content + prevFullContents.slice(prevTextSpan.start + prevTextSpan.length);
|
|
462968
|
+
var newSourceFile = ts.updateSourceFile(prevSourceFile, newText, {
|
|
462969
|
+
span: prevTextSpan,
|
|
462970
|
+
newLength: content.length
|
|
462971
|
+
});
|
|
462972
|
+
_updateFile(newSourceFile);
|
|
462973
|
+
}
|
|
462974
|
+
};
|
|
462975
|
+
}
|
|
462976
|
+
var knownLibFilesForCompilerOptions = function knownLibFilesForCompilerOptions2(compilerOptions, ts) {
|
|
462977
|
+
var target = compilerOptions.target || ts.ScriptTarget.ES5;
|
|
462978
|
+
var lib = compilerOptions.lib || [];
|
|
462979
|
+
var files = ["lib.d.ts", "lib.decorators.d.ts", "lib.decorators.legacy.d.ts", "lib.dom.d.ts", "lib.dom.iterable.d.ts", "lib.webworker.d.ts", "lib.webworker.importscripts.d.ts", "lib.webworker.iterable.d.ts", "lib.scripthost.d.ts", "lib.es5.d.ts", "lib.es6.d.ts", "lib.es2015.collection.d.ts", "lib.es2015.core.d.ts", "lib.es2015.d.ts", "lib.es2015.generator.d.ts", "lib.es2015.iterable.d.ts", "lib.es2015.promise.d.ts", "lib.es2015.proxy.d.ts", "lib.es2015.reflect.d.ts", "lib.es2015.symbol.d.ts", "lib.es2015.symbol.wellknown.d.ts", "lib.es2016.array.include.d.ts", "lib.es2016.d.ts", "lib.es2016.full.d.ts", "lib.es2017.d.ts", "lib.es2017.date.d.ts", "lib.es2017.full.d.ts", "lib.es2017.intl.d.ts", "lib.es2017.object.d.ts", "lib.es2017.sharedmemory.d.ts", "lib.es2017.string.d.ts", "lib.es2017.typedarrays.d.ts", "lib.es2018.asyncgenerator.d.ts", "lib.es2018.asynciterable.d.ts", "lib.es2018.d.ts", "lib.es2018.full.d.ts", "lib.es2018.intl.d.ts", "lib.es2018.promise.d.ts", "lib.es2018.regexp.d.ts", "lib.es2019.array.d.ts", "lib.es2019.d.ts", "lib.es2019.full.d.ts", "lib.es2019.intl.d.ts", "lib.es2019.object.d.ts", "lib.es2019.string.d.ts", "lib.es2019.symbol.d.ts", "lib.es2020.bigint.d.ts", "lib.es2020.d.ts", "lib.es2020.date.d.ts", "lib.es2020.full.d.ts", "lib.es2020.intl.d.ts", "lib.es2020.number.d.ts", "lib.es2020.promise.d.ts", "lib.es2020.sharedmemory.d.ts", "lib.es2020.string.d.ts", "lib.es2020.symbol.wellknown.d.ts", "lib.es2021.d.ts", "lib.es2021.full.d.ts", "lib.es2021.intl.d.ts", "lib.es2021.promise.d.ts", "lib.es2021.string.d.ts", "lib.es2021.weakref.d.ts", "lib.es2022.array.d.ts", "lib.es2022.d.ts", "lib.es2022.error.d.ts", "lib.es2022.full.d.ts", "lib.es2022.intl.d.ts", "lib.es2022.object.d.ts", "lib.es2022.regexp.d.ts", "lib.es2022.sharedmemory.d.ts", "lib.es2022.string.d.ts", "lib.es2023.array.d.ts", "lib.es2023.collection.d.ts", "lib.es2023.d.ts", "lib.es2023.full.d.ts", "lib.esnext.array.d.ts", "lib.esnext.asynciterable.d.ts", "lib.esnext.bigint.d.ts", "lib.esnext.d.ts", "lib.esnext.decorators.d.ts", "lib.esnext.disposable.d.ts", "lib.esnext.full.d.ts", "lib.esnext.intl.d.ts", "lib.esnext.promise.d.ts", "lib.esnext.string.d.ts", "lib.esnext.symbol.d.ts", "lib.esnext.weakref.d.ts"];
|
|
462980
|
+
var targetToCut = ts.ScriptTarget[target];
|
|
462981
|
+
var matches = files.filter(function(f) {
|
|
462982
|
+
return f.startsWith("lib." + targetToCut.toLowerCase());
|
|
462983
|
+
});
|
|
462984
|
+
var targetCutIndex = files.indexOf(matches.pop());
|
|
462985
|
+
var getMax = function getMax2(array) {
|
|
462986
|
+
return array && array.length ? array.reduce(function(max, current) {
|
|
462987
|
+
return current > max ? current : max;
|
|
462988
|
+
}) : void 0;
|
|
462989
|
+
};
|
|
462990
|
+
var indexesForCutting = lib.map(function(lib2) {
|
|
462991
|
+
var matches2 = files.filter(function(f) {
|
|
462992
|
+
return f.startsWith("lib." + lib2.toLowerCase());
|
|
462993
|
+
});
|
|
462994
|
+
if (matches2.length === 0)
|
|
462995
|
+
return 0;
|
|
462996
|
+
var cutIndex = files.indexOf(matches2.pop());
|
|
462997
|
+
return cutIndex;
|
|
462998
|
+
});
|
|
462999
|
+
var libCutIndex = getMax(indexesForCutting) || 0;
|
|
463000
|
+
var finalCutIndex = Math.max(targetCutIndex, libCutIndex);
|
|
463001
|
+
return files.slice(0, finalCutIndex + 1);
|
|
463002
|
+
};
|
|
463003
|
+
var createDefaultMapFromNodeModules = function createDefaultMapFromNodeModules2(_compilerOptions, _ts, tsLibDirectory) {
|
|
463004
|
+
var path2 = requirePath();
|
|
463005
|
+
var fs = requireFS();
|
|
463006
|
+
var getLib = function getLib2(name) {
|
|
463007
|
+
var lib = tsLibDirectory || path2.dirname(require.resolve("typescript"));
|
|
463008
|
+
return fs.readFileSync(path2.join(lib, name), "utf8");
|
|
463009
|
+
};
|
|
463010
|
+
var libFiles = fs.readdirSync(tsLibDirectory || path2.dirname(require.resolve("typescript")));
|
|
463011
|
+
var knownLibFiles = libFiles.filter(function(f) {
|
|
463012
|
+
return f.startsWith("lib.") && f.endsWith(".d.ts");
|
|
463013
|
+
});
|
|
463014
|
+
var fsMap = /* @__PURE__ */ new Map();
|
|
463015
|
+
knownLibFiles.forEach(function(lib) {
|
|
463016
|
+
fsMap.set("/" + lib, getLib(lib));
|
|
463017
|
+
});
|
|
463018
|
+
return fsMap;
|
|
463019
|
+
};
|
|
463020
|
+
var addAllFilesFromFolder = function addAllFilesFromFolder2(map, workingDir) {
|
|
463021
|
+
var path2 = requirePath();
|
|
463022
|
+
var fs = requireFS();
|
|
463023
|
+
var walk = function walk2(dir) {
|
|
463024
|
+
var results = [];
|
|
463025
|
+
var list = fs.readdirSync(dir);
|
|
463026
|
+
list.forEach(function(file) {
|
|
463027
|
+
file = path2.join(dir, file);
|
|
463028
|
+
var stat = fs.statSync(file);
|
|
463029
|
+
if (stat && stat.isDirectory()) {
|
|
463030
|
+
results = results.concat(walk2(file));
|
|
463031
|
+
} else {
|
|
463032
|
+
results.push(file);
|
|
463033
|
+
}
|
|
463034
|
+
});
|
|
463035
|
+
return results;
|
|
463036
|
+
};
|
|
463037
|
+
var allFiles = walk(workingDir);
|
|
463038
|
+
allFiles.forEach(function(lib) {
|
|
463039
|
+
var fsPath = "/node_modules/@types" + lib.replace(workingDir, "");
|
|
463040
|
+
var content = fs.readFileSync(lib, "utf8");
|
|
463041
|
+
var validExtensions = [".ts", ".tsx"];
|
|
463042
|
+
if (validExtensions.includes(path2.extname(fsPath))) {
|
|
463043
|
+
map.set(fsPath, content);
|
|
463044
|
+
}
|
|
463045
|
+
});
|
|
463046
|
+
};
|
|
463047
|
+
var addFilesForTypesIntoFolder = function addFilesForTypesIntoFolder2(map) {
|
|
463048
|
+
return addAllFilesFromFolder(map, "node_modules/@types");
|
|
463049
|
+
};
|
|
463050
|
+
var createDefaultMapFromCDN = function createDefaultMapFromCDN2(options, version, cache, ts, lzstring, fetcher, storer) {
|
|
463051
|
+
var fetchlike = fetcher || fetch;
|
|
463052
|
+
var fsMap = /* @__PURE__ */ new Map();
|
|
463053
|
+
var files = knownLibFilesForCompilerOptions(options, ts);
|
|
463054
|
+
var prefix = "https://typescript.azureedge.net/cdn/" + version + "/typescript/lib/";
|
|
463055
|
+
function zip(str) {
|
|
463056
|
+
return lzstring ? lzstring.compressToUTF16(str) : str;
|
|
463057
|
+
}
|
|
463058
|
+
function unzip(str) {
|
|
463059
|
+
return lzstring ? lzstring.decompressFromUTF16(str) : str;
|
|
463060
|
+
}
|
|
463061
|
+
function uncached() {
|
|
463062
|
+
return Promise.all(files.map(function(lib) {
|
|
463063
|
+
return fetchlike(prefix + lib).then(function(resp) {
|
|
463064
|
+
return resp.text();
|
|
463065
|
+
});
|
|
463066
|
+
})).then(function(contents) {
|
|
463067
|
+
contents.forEach(function(text, index) {
|
|
463068
|
+
return fsMap.set("/" + files[index], text);
|
|
463069
|
+
});
|
|
463070
|
+
})["catch"](function() {
|
|
463071
|
+
});
|
|
463072
|
+
}
|
|
463073
|
+
function cached() {
|
|
463074
|
+
var storelike = storer || localStorage;
|
|
463075
|
+
var keys = Object.keys(storelike);
|
|
463076
|
+
keys.forEach(function(key) {
|
|
463077
|
+
if (key.startsWith("ts-lib-") && !key.startsWith("ts-lib-" + version)) {
|
|
463078
|
+
storelike.removeItem(key);
|
|
463079
|
+
}
|
|
463080
|
+
});
|
|
463081
|
+
return Promise.all(files.map(function(lib) {
|
|
463082
|
+
var cacheKey = "ts-lib-" + version + "-" + lib;
|
|
463083
|
+
var content = storelike.getItem(cacheKey);
|
|
463084
|
+
if (!content) {
|
|
463085
|
+
return fetchlike(prefix + lib).then(function(resp) {
|
|
463086
|
+
return resp.text();
|
|
463087
|
+
}).then(function(t) {
|
|
463088
|
+
storelike.setItem(cacheKey, zip(t));
|
|
463089
|
+
return t;
|
|
463090
|
+
})["catch"](function() {
|
|
463091
|
+
});
|
|
463092
|
+
} else {
|
|
463093
|
+
return Promise.resolve(unzip(content));
|
|
463094
|
+
}
|
|
463095
|
+
})).then(function(contents) {
|
|
463096
|
+
contents.forEach(function(text, index) {
|
|
463097
|
+
if (text) {
|
|
463098
|
+
var name = "/" + files[index];
|
|
463099
|
+
fsMap.set(name, text);
|
|
463100
|
+
}
|
|
463101
|
+
});
|
|
463102
|
+
});
|
|
463103
|
+
}
|
|
463104
|
+
var func = cache ? cached : uncached;
|
|
463105
|
+
return func().then(function() {
|
|
463106
|
+
return fsMap;
|
|
463107
|
+
});
|
|
463108
|
+
};
|
|
463109
|
+
function notImplemented(methodName) {
|
|
463110
|
+
throw new Error("Method '" + methodName + "' is not implemented.");
|
|
463111
|
+
}
|
|
463112
|
+
function audit(name, fn) {
|
|
463113
|
+
return function() {
|
|
463114
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
463115
|
+
args[_key] = arguments[_key];
|
|
463116
|
+
}
|
|
463117
|
+
var res = fn.apply(void 0, args);
|
|
463118
|
+
var smallres = typeof res === "string" ? res.slice(0, 80) + "..." : res;
|
|
463119
|
+
debugLog.apply(void 0, ["> " + name].concat(args));
|
|
463120
|
+
debugLog("< " + smallres);
|
|
463121
|
+
return res;
|
|
463122
|
+
};
|
|
463123
|
+
}
|
|
463124
|
+
var defaultCompilerOptions = function defaultCompilerOptions2(ts) {
|
|
463125
|
+
return _extends({}, ts.getDefaultCompilerOptions(), {
|
|
463126
|
+
jsx: ts.JsxEmit.React,
|
|
463127
|
+
strict: true,
|
|
463128
|
+
esModuleInterop: true,
|
|
463129
|
+
module: ts.ModuleKind.ESNext,
|
|
463130
|
+
suppressOutputPathCheck: true,
|
|
463131
|
+
skipLibCheck: true,
|
|
463132
|
+
skipDefaultLibCheck: true,
|
|
463133
|
+
moduleResolution: ts.ModuleResolutionKind.NodeJs
|
|
463134
|
+
});
|
|
463135
|
+
};
|
|
463136
|
+
var libize = function libize2(path2) {
|
|
463137
|
+
return path2.replace("/", "/lib.").toLowerCase();
|
|
463138
|
+
};
|
|
463139
|
+
function createSystem(files) {
|
|
463140
|
+
return {
|
|
463141
|
+
args: [],
|
|
463142
|
+
createDirectory: function createDirectory() {
|
|
463143
|
+
return notImplemented("createDirectory");
|
|
463144
|
+
},
|
|
463145
|
+
// TODO: could make a real file tree
|
|
463146
|
+
directoryExists: audit("directoryExists", function(directory) {
|
|
463147
|
+
return Array.from(files.keys()).some(function(path2) {
|
|
463148
|
+
return path2.startsWith(directory);
|
|
463149
|
+
});
|
|
463150
|
+
}),
|
|
463151
|
+
exit: function exit() {
|
|
463152
|
+
return notImplemented("exit");
|
|
463153
|
+
},
|
|
463154
|
+
fileExists: audit("fileExists", function(fileName) {
|
|
463155
|
+
return files.has(fileName) || files.has(libize(fileName));
|
|
463156
|
+
}),
|
|
463157
|
+
getCurrentDirectory: function getCurrentDirectory() {
|
|
463158
|
+
return "/";
|
|
463159
|
+
},
|
|
463160
|
+
getDirectories: function getDirectories() {
|
|
463161
|
+
return [];
|
|
463162
|
+
},
|
|
463163
|
+
getExecutingFilePath: function getExecutingFilePath() {
|
|
463164
|
+
return notImplemented("getExecutingFilePath");
|
|
463165
|
+
},
|
|
463166
|
+
readDirectory: audit("readDirectory", function(directory) {
|
|
463167
|
+
return directory === "/" ? Array.from(files.keys()) : [];
|
|
463168
|
+
}),
|
|
463169
|
+
readFile: audit("readFile", function(fileName) {
|
|
463170
|
+
return files.get(fileName) || files.get(libize(fileName));
|
|
463171
|
+
}),
|
|
463172
|
+
resolvePath: function resolvePath(path2) {
|
|
463173
|
+
return path2;
|
|
463174
|
+
},
|
|
463175
|
+
newLine: "\n",
|
|
463176
|
+
useCaseSensitiveFileNames: true,
|
|
463177
|
+
write: function write() {
|
|
463178
|
+
return notImplemented("write");
|
|
463179
|
+
},
|
|
463180
|
+
writeFile: function writeFile(fileName, contents) {
|
|
463181
|
+
files.set(fileName, contents);
|
|
463182
|
+
}
|
|
463183
|
+
};
|
|
463184
|
+
}
|
|
463185
|
+
function createFSBackedSystem(files, _projectRoot, ts, tsLibDirectory) {
|
|
463186
|
+
var root = _projectRoot + "/vfs";
|
|
463187
|
+
var path2 = requirePath();
|
|
463188
|
+
var nodeSys = ts.sys;
|
|
463189
|
+
var tsLib = tsLibDirectory != null ? tsLibDirectory : path2.dirname(require.resolve("typescript"));
|
|
463190
|
+
return {
|
|
463191
|
+
// @ts-ignore
|
|
463192
|
+
name: "fs-vfs",
|
|
463193
|
+
root,
|
|
463194
|
+
args: [],
|
|
463195
|
+
createDirectory: function createDirectory() {
|
|
463196
|
+
return notImplemented("createDirectory");
|
|
463197
|
+
},
|
|
463198
|
+
// TODO: could make a real file tree
|
|
463199
|
+
directoryExists: audit("directoryExists", function(directory) {
|
|
463200
|
+
return Array.from(files.keys()).some(function(path3) {
|
|
463201
|
+
return path3.startsWith(directory);
|
|
463202
|
+
}) || nodeSys.directoryExists(directory);
|
|
463203
|
+
}),
|
|
463204
|
+
exit: nodeSys.exit,
|
|
463205
|
+
fileExists: audit("fileExists", function(fileName) {
|
|
463206
|
+
if (files.has(fileName))
|
|
463207
|
+
return true;
|
|
463208
|
+
if (fileName.includes("tsconfig.json") || fileName.includes("tsconfig.json"))
|
|
463209
|
+
return false;
|
|
463210
|
+
if (fileName.startsWith("/lib")) {
|
|
463211
|
+
var tsLibName = tsLib + "/" + fileName.replace("/", "");
|
|
463212
|
+
return nodeSys.fileExists(tsLibName);
|
|
463213
|
+
}
|
|
463214
|
+
return nodeSys.fileExists(fileName);
|
|
463215
|
+
}),
|
|
463216
|
+
getCurrentDirectory: function getCurrentDirectory() {
|
|
463217
|
+
return root;
|
|
463218
|
+
},
|
|
463219
|
+
getDirectories: nodeSys.getDirectories,
|
|
463220
|
+
getExecutingFilePath: function getExecutingFilePath() {
|
|
463221
|
+
return notImplemented("getExecutingFilePath");
|
|
463222
|
+
},
|
|
463223
|
+
readDirectory: audit("readDirectory", function() {
|
|
463224
|
+
if ((arguments.length <= 0 ? void 0 : arguments[0]) === "/") {
|
|
463225
|
+
return Array.from(files.keys());
|
|
463226
|
+
} else {
|
|
463227
|
+
return nodeSys.readDirectory.apply(nodeSys, arguments);
|
|
463228
|
+
}
|
|
463229
|
+
}),
|
|
463230
|
+
readFile: audit("readFile", function(fileName) {
|
|
463231
|
+
if (files.has(fileName))
|
|
463232
|
+
return files.get(fileName);
|
|
463233
|
+
if (fileName.startsWith("/lib")) {
|
|
463234
|
+
var tsLibName = tsLib + "/" + fileName.replace("/", "");
|
|
463235
|
+
var result = nodeSys.readFile(tsLibName);
|
|
463236
|
+
if (!result) {
|
|
463237
|
+
var libs = nodeSys.readDirectory(tsLib);
|
|
463238
|
+
throw new Error("TSVFS: A request was made for " + tsLibName + " but there wasn't a file found in the file map. You likely have a mismatch in the compiler options for the CDN download vs the compiler program. Existing Libs: " + libs + ".");
|
|
463239
|
+
}
|
|
463240
|
+
return result;
|
|
463241
|
+
}
|
|
463242
|
+
return nodeSys.readFile(fileName);
|
|
463243
|
+
}),
|
|
463244
|
+
resolvePath: function resolvePath(path3) {
|
|
463245
|
+
if (files.has(path3))
|
|
463246
|
+
return path3;
|
|
463247
|
+
return nodeSys.resolvePath(path3);
|
|
463248
|
+
},
|
|
463249
|
+
newLine: "\n",
|
|
463250
|
+
useCaseSensitiveFileNames: true,
|
|
463251
|
+
write: function write() {
|
|
463252
|
+
return notImplemented("write");
|
|
463253
|
+
},
|
|
463254
|
+
writeFile: function writeFile(fileName, contents) {
|
|
463255
|
+
files.set(fileName, contents);
|
|
463256
|
+
}
|
|
463257
|
+
};
|
|
463258
|
+
}
|
|
463259
|
+
function createVirtualCompilerHost(sys, compilerOptions, ts) {
|
|
463260
|
+
var sourceFiles = /* @__PURE__ */ new Map();
|
|
463261
|
+
var save = function save2(sourceFile) {
|
|
463262
|
+
sourceFiles.set(sourceFile.fileName, sourceFile);
|
|
463263
|
+
return sourceFile;
|
|
463264
|
+
};
|
|
463265
|
+
var vHost = {
|
|
463266
|
+
compilerHost: _extends({}, sys, {
|
|
463267
|
+
getCanonicalFileName: function getCanonicalFileName(fileName) {
|
|
463268
|
+
return fileName;
|
|
463269
|
+
},
|
|
463270
|
+
getDefaultLibFileName: function getDefaultLibFileName() {
|
|
463271
|
+
return "/" + ts.getDefaultLibFileName(compilerOptions);
|
|
463272
|
+
},
|
|
463273
|
+
// getDefaultLibLocation: () => '/',
|
|
463274
|
+
getDirectories: function getDirectories() {
|
|
463275
|
+
return [];
|
|
463276
|
+
},
|
|
463277
|
+
getNewLine: function getNewLine() {
|
|
463278
|
+
return sys.newLine;
|
|
463279
|
+
},
|
|
463280
|
+
getSourceFile: function getSourceFile(fileName) {
|
|
463281
|
+
return sourceFiles.get(fileName) || save(ts.createSourceFile(fileName, sys.readFile(fileName), compilerOptions.target || defaultCompilerOptions(ts).target, false));
|
|
463282
|
+
},
|
|
463283
|
+
useCaseSensitiveFileNames: function useCaseSensitiveFileNames() {
|
|
463284
|
+
return sys.useCaseSensitiveFileNames;
|
|
463285
|
+
}
|
|
463286
|
+
}),
|
|
463287
|
+
updateFile: function updateFile(sourceFile) {
|
|
463288
|
+
var alreadyExists = sourceFiles.has(sourceFile.fileName);
|
|
463289
|
+
sys.writeFile(sourceFile.fileName, sourceFile.text);
|
|
463290
|
+
sourceFiles.set(sourceFile.fileName, sourceFile);
|
|
463291
|
+
return alreadyExists;
|
|
463292
|
+
}
|
|
463293
|
+
};
|
|
463294
|
+
return vHost;
|
|
463295
|
+
}
|
|
463296
|
+
function createVirtualLanguageServiceHost(sys, rootFiles, compilerOptions, ts, customTransformers) {
|
|
463297
|
+
var fileNames = [].concat(rootFiles);
|
|
463298
|
+
var _createVirtualCompile = createVirtualCompilerHost(sys, compilerOptions, ts), compilerHost = _createVirtualCompile.compilerHost, _updateFile2 = _createVirtualCompile.updateFile;
|
|
463299
|
+
var fileVersions = /* @__PURE__ */ new Map();
|
|
463300
|
+
var projectVersion = 0;
|
|
463301
|
+
var languageServiceHost = _extends({}, compilerHost, {
|
|
463302
|
+
getProjectVersion: function getProjectVersion() {
|
|
463303
|
+
return projectVersion.toString();
|
|
463304
|
+
},
|
|
463305
|
+
getCompilationSettings: function getCompilationSettings() {
|
|
463306
|
+
return compilerOptions;
|
|
463307
|
+
},
|
|
463308
|
+
getCustomTransformers: function getCustomTransformers() {
|
|
463309
|
+
return customTransformers;
|
|
463310
|
+
},
|
|
463311
|
+
// A couple weeks of 4.8 TypeScript nightlies had a bug where the Program's
|
|
463312
|
+
// list of files was just a reference to the array returned by this host method,
|
|
463313
|
+
// which means mutations by the host that ought to result in a new Program being
|
|
463314
|
+
// created were not detected, since the old list of files and the new list of files
|
|
463315
|
+
// were in fact a reference to the same underlying array. That was fixed in
|
|
463316
|
+
// https://github.com/microsoft/TypeScript/pull/49813, but since the twoslash runner
|
|
463317
|
+
// is used in bisecting for changes, it needs to guard against being busted in that
|
|
463318
|
+
// couple-week period, so we defensively make a slice here.
|
|
463319
|
+
getScriptFileNames: function getScriptFileNames() {
|
|
463320
|
+
return fileNames.slice();
|
|
463321
|
+
},
|
|
463322
|
+
getScriptSnapshot: function getScriptSnapshot(fileName) {
|
|
463323
|
+
var contents = sys.readFile(fileName);
|
|
463324
|
+
if (contents) {
|
|
463325
|
+
return ts.ScriptSnapshot.fromString(contents);
|
|
463326
|
+
}
|
|
463327
|
+
return;
|
|
463328
|
+
},
|
|
463329
|
+
getScriptVersion: function getScriptVersion(fileName) {
|
|
463330
|
+
return fileVersions.get(fileName) || "0";
|
|
463331
|
+
},
|
|
463332
|
+
writeFile: sys.writeFile
|
|
463333
|
+
});
|
|
463334
|
+
var lsHost = {
|
|
463335
|
+
languageServiceHost,
|
|
463336
|
+
updateFile: function updateFile(sourceFile) {
|
|
463337
|
+
projectVersion++;
|
|
463338
|
+
fileVersions.set(sourceFile.fileName, projectVersion.toString());
|
|
463339
|
+
if (!fileNames.includes(sourceFile.fileName)) {
|
|
463340
|
+
fileNames.push(sourceFile.fileName);
|
|
463341
|
+
}
|
|
463342
|
+
_updateFile2(sourceFile);
|
|
463343
|
+
}
|
|
463344
|
+
};
|
|
463345
|
+
return lsHost;
|
|
463346
|
+
}
|
|
463347
|
+
var requirePath = function requirePath2() {
|
|
463348
|
+
return require(String.fromCharCode(112, 97, 116, 104));
|
|
463349
|
+
};
|
|
463350
|
+
var requireFS = function requireFS2() {
|
|
463351
|
+
return require(String.fromCharCode(102, 115));
|
|
463352
|
+
};
|
|
463353
|
+
exports.addAllFilesFromFolder = addAllFilesFromFolder;
|
|
463354
|
+
exports.addFilesForTypesIntoFolder = addFilesForTypesIntoFolder;
|
|
463355
|
+
exports.createDefaultMapFromCDN = createDefaultMapFromCDN;
|
|
463356
|
+
exports.createDefaultMapFromNodeModules = createDefaultMapFromNodeModules;
|
|
463357
|
+
exports.createFSBackedSystem = createFSBackedSystem;
|
|
463358
|
+
exports.createSystem = createSystem;
|
|
463359
|
+
exports.createVirtualCompilerHost = createVirtualCompilerHost;
|
|
463360
|
+
exports.createVirtualLanguageServiceHost = createVirtualLanguageServiceHost;
|
|
463361
|
+
exports.createVirtualTypeScriptEnvironment = createVirtualTypeScriptEnvironment;
|
|
463362
|
+
exports.knownLibFilesForCompilerOptions = knownLibFilesForCompilerOptions;
|
|
463363
|
+
}
|
|
463364
|
+
});
|
|
463365
|
+
|
|
463366
|
+
// node_modules/.pnpm/@typescript+vfs@1.5.0/node_modules/@typescript/vfs/dist/index.js
|
|
463367
|
+
var require_dist5 = __commonJS({
|
|
463368
|
+
"node_modules/.pnpm/@typescript+vfs@1.5.0/node_modules/@typescript/vfs/dist/index.js"(exports, module2) {
|
|
463369
|
+
"use strict";
|
|
463370
|
+
if (process.env.NODE_ENV === "production") {
|
|
463371
|
+
module2.exports = require_vfs_cjs_production_min();
|
|
463372
|
+
} else {
|
|
463373
|
+
module2.exports = require_vfs_cjs_development();
|
|
463374
|
+
}
|
|
463375
|
+
}
|
|
463376
|
+
});
|
|
463377
|
+
|
|
462653
463378
|
// node_modules/.pnpm/readdirp@3.6.0/node_modules/readdirp/index.js
|
|
462654
463379
|
var require_readdirp = __commonJS({
|
|
462655
463380
|
"node_modules/.pnpm/readdirp@3.6.0/node_modules/readdirp/index.js"(exports, module2) {
|
|
@@ -465063,9 +465788,9 @@ var require_chokidar = __commonJS({
|
|
|
465063
465788
|
}
|
|
465064
465789
|
});
|
|
465065
465790
|
|
|
465066
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
465067
|
-
var
|
|
465068
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
465791
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=tocwzkjm26qsyozdkdwrhijyge_@microsoft+api-extractor@7.38.3_@swc+core@1._5hmoeoccsx3kt3yjnysqqiv3vu/node_modules/tsup/dist/index.js
|
|
465792
|
+
var require_dist6 = __commonJS({
|
|
465793
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=tocwzkjm26qsyozdkdwrhijyge_@microsoft+api-extractor@7.38.3_@swc+core@1._5hmoeoccsx3kt3yjnysqqiv3vu/node_modules/tsup/dist/index.js"(exports) {
|
|
465069
465794
|
"use strict";
|
|
465070
465795
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
465071
465796
|
function _interopRequireDefault(obj) {
|
|
@@ -467231,6 +467956,8 @@ var require_dist5 = __commonJS({
|
|
|
467231
467956
|
};
|
|
467232
467957
|
var _typescript = require_typescript();
|
|
467233
467958
|
var _typescript2 = _interopRequireDefault(_typescript);
|
|
467959
|
+
var _tsvfs = require_dist5();
|
|
467960
|
+
var _tsvfs2 = _interopRequireDefault(_tsvfs);
|
|
467234
467961
|
var logger = _chunk7G76EW2Rjs.createLogger.call(void 0);
|
|
467235
467962
|
var AliasPool = (_class = class {
|
|
467236
467963
|
constructor() {
|
|
@@ -467350,7 +468077,14 @@ var require_dist5 = __commonJS({
|
|
|
467350
468077
|
}
|
|
467351
468078
|
return fileMapping;
|
|
467352
468079
|
}
|
|
467353
|
-
|
|
468080
|
+
var getLib = (name) => {
|
|
468081
|
+
const lib = _path.dirname.call(void 0, require.resolve("typescript"));
|
|
468082
|
+
return _fs2.default.readFileSync(_path.join(lib, name), "utf8");
|
|
468083
|
+
};
|
|
468084
|
+
var addLib = (name, map) => {
|
|
468085
|
+
map.set("/" + name, getLib(name));
|
|
468086
|
+
};
|
|
468087
|
+
async function emit(options, compilerOptions, tsconfig) {
|
|
467354
468088
|
logger.info("tsc", `Trying to find ${tsconfig || "tsconfig.json"}`);
|
|
467355
468089
|
let rawTsconfig = _bundlerequire.loadTsConfig.call(
|
|
467356
468090
|
void 0,
|
|
@@ -467379,6 +468113,7 @@ var require_dist5 = __commonJS({
|
|
|
467379
468113
|
...rawTsconfig.data.compilerOptions,
|
|
467380
468114
|
// Enable declaration emit and disable javascript emit
|
|
467381
468115
|
outDir: options.outDir,
|
|
468116
|
+
allowJs: true,
|
|
467382
468117
|
noEmit: false,
|
|
467383
468118
|
declaration: true,
|
|
467384
468119
|
declarationMap: true,
|
|
@@ -467406,12 +468141,29 @@ var require_dist5 = __commonJS({
|
|
|
467406
468141
|
options.workspaceRoot ? options.workspaceRoot : tsconfig ? _path.dirname.call(void 0, tsconfig) : options.projectRoot
|
|
467407
468142
|
);
|
|
467408
468143
|
logger.info("tsc", parsedTsconfig);
|
|
467409
|
-
|
|
467410
|
-
let program = _typescript2.default.createProgram(
|
|
467411
|
-
parsedTsconfig.fileNames,
|
|
468144
|
+
const fsMap = await _tsvfs2.createDefaultMapFromCDN(
|
|
467412
468145
|
parsedTsconfig.options,
|
|
467413
|
-
|
|
468146
|
+
_typescript2.default.version,
|
|
468147
|
+
true,
|
|
468148
|
+
_typescript2.default
|
|
468149
|
+
);
|
|
468150
|
+
logger.info("tsc", "Created FS Map");
|
|
468151
|
+
parsedTsconfig.options.lib.forEach((lib) => addLib(lib, fsMap));
|
|
468152
|
+
logger.info("tsc", "Added libs to FS Map");
|
|
468153
|
+
const system = _tsvfs2.createSystem(fsMap);
|
|
468154
|
+
logger.info("tsc", "Created virtual file system");
|
|
468155
|
+
const host = _tsvfs2.createVirtualCompilerHost(
|
|
468156
|
+
system,
|
|
468157
|
+
parsedTsconfig.options,
|
|
468158
|
+
_typescript2.default
|
|
467414
468159
|
);
|
|
468160
|
+
logger.info("tsc", "Created virtual compiler host");
|
|
468161
|
+
const program = _typescript2.default.createProgram({
|
|
468162
|
+
rootNames: [...fsMap.keys()],
|
|
468163
|
+
options: parsedTsconfig.options,
|
|
468164
|
+
host
|
|
468165
|
+
});
|
|
468166
|
+
logger.info("tsc", "Created program");
|
|
467415
468167
|
logger.info("tsc", "Emitting DTS files with the following options: ");
|
|
467416
468168
|
logger.info("tsc", parsedTsconfig.options);
|
|
467417
468169
|
let fileMapping = emitDtsFiles(program, host, options);
|
|
@@ -474222,13 +474974,13 @@ glob.glob = glob;
|
|
|
474222
474974
|
var import_project_graph = require("nx/src/project-graph/project-graph");
|
|
474223
474975
|
var import_fileutils = require("nx/src/utils/fileutils");
|
|
474224
474976
|
var import_prettier = require("prettier");
|
|
474225
|
-
var import_tsup2 = __toESM(
|
|
474977
|
+
var import_tsup2 = __toESM(require_dist6());
|
|
474226
474978
|
|
|
474227
474979
|
// packages/workspace-tools/src/utils/get-workspace-root.ts
|
|
474228
474980
|
var import_find_workspace_root = require("nx/src/utils/find-workspace-root.js");
|
|
474229
474981
|
|
|
474230
474982
|
// packages/workspace-tools/src/executors/tsup/get-config.ts
|
|
474231
|
-
var import_tsup = __toESM(
|
|
474983
|
+
var import_tsup = __toESM(require_dist6());
|
|
474232
474984
|
|
|
474233
474985
|
// packages/workspace-tools/src/generators/init/init.ts
|
|
474234
474986
|
var import_devkit2 = __toESM(require_devkit());
|