@storm-software/esbuild 0.47.6 → 0.47.8
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/README.md +1 -1
- package/bin/esbuild.cjs +79 -190
- package/dist/assets.cjs +6 -6
- package/dist/assets.js +5 -5
- package/dist/build.cjs +12 -13
- package/dist/build.js +11 -12
- package/dist/chunk-35CZ4A75.cjs +94 -0
- package/dist/{chunk-WQ3UV5CE.cjs → chunk-3IYN4AMY.cjs} +64 -64
- package/dist/{chunk-46KVHK5G.cjs → chunk-4WZ6P6VK.cjs} +2 -2
- package/dist/{chunk-KVRTFBTL.js → chunk-4ZDNVWJS.js} +2 -2
- package/dist/{chunk-L6FX7336.js → chunk-AVHH6S4L.js} +5 -5
- package/dist/{chunk-VJHTVG7F.js → chunk-C53NNT43.js} +4 -4
- package/dist/{chunk-IPGUYQJR.js → chunk-DQCFGOUF.js} +3 -3
- package/dist/{chunk-ZKNTC3HX.js → chunk-E7YPFD24.js} +1 -1
- package/dist/{chunk-QVVISOIX.cjs → chunk-FJY2SITF.cjs} +5 -5
- package/dist/{chunk-ZTXUCRQI.cjs → chunk-HLI6PFBX.cjs} +87 -85
- package/dist/chunk-KOTL3LZB.cjs +6 -0
- package/dist/{chunk-VAO4QKEE.js → chunk-KSMSESIB.js} +10 -41
- package/dist/{chunk-ZDESEGGN.js → chunk-LVW5LEAH.js} +2 -2
- package/dist/{chunk-KN6VYOCG.cjs → chunk-MFN3SHAN.cjs} +18 -18
- package/dist/{chunk-KRQE5BEE.cjs → chunk-NNPOK4ZA.cjs} +2 -2
- package/dist/{chunk-47WNZ6KT.js → chunk-NO5VVOAS.js} +2 -2
- package/dist/{chunk-KVLFERWL.cjs → chunk-NXEDGL2L.cjs} +5 -5
- package/dist/{chunk-RXXWO456.js → chunk-OHR2A47N.js} +1 -1
- package/dist/{chunk-ICYKKALZ.cjs → chunk-RHU3X337.cjs} +7 -7
- package/dist/{chunk-X7PWPAJM.cjs → chunk-SUEOLCXE.cjs} +9 -9
- package/dist/{chunk-KANU5TF6.js → chunk-U7RMK5ET.js} +15 -15
- package/dist/{chunk-AQMXDBIP.js → chunk-UUUQVVRP.js} +1 -1
- package/dist/{chunk-BGYYR2GS.js → chunk-V4V6EEGM.js} +9 -7
- package/dist/{chunk-3AGYI4VF.cjs → chunk-WTG24PW3.cjs} +13 -13
- package/dist/clean.cjs +4 -4
- package/dist/clean.js +3 -3
- package/dist/config.cjs +6 -6
- package/dist/config.js +5 -5
- package/dist/context.cjs +7 -7
- package/dist/context.js +6 -6
- package/dist/index.cjs +14 -15
- package/dist/index.js +12 -13
- package/dist/package-json.cjs +6 -6
- package/dist/package-json.js +5 -5
- package/dist/plugins/deps-check.cjs +91 -5
- package/dist/plugins/deps-check.js +90 -4
- package/dist/plugins/resolve-paths.cjs +11 -11
- package/dist/plugins/resolve-paths.js +2 -2
- package/dist/tsup.cjs +5 -5
- package/dist/tsup.js +4 -4
- package/dist/types.cjs +2 -2
- package/dist/types.js +2 -2
- package/dist/watch.cjs +6 -6
- package/dist/watch.js +2 -2
- package/package.json +9 -9
- package/dist/chunk-2SJSYCMS.cjs +0 -6
- package/dist/chunk-EK3ZTIFX.cjs +0 -125
- package/dist/chunk-FRKTWYQJ.js +0 -95
- package/dist/chunk-PFWT2TZY.cjs +0 -95
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/bin/esbuild.cjs
CHANGED
|
@@ -907,12 +907,12 @@ function parseTree(text, errors = [], options = ParseOptions.DEFAULT) {
|
|
|
907
907
|
}
|
|
908
908
|
return result;
|
|
909
909
|
}
|
|
910
|
-
function findNodeAtLocation(root,
|
|
910
|
+
function findNodeAtLocation(root, path) {
|
|
911
911
|
if (!root) {
|
|
912
912
|
return void 0;
|
|
913
913
|
}
|
|
914
914
|
let node = root;
|
|
915
|
-
for (let segment of
|
|
915
|
+
for (let segment of path) {
|
|
916
916
|
if (typeof segment === "string") {
|
|
917
917
|
if (node.type !== "object" || !Array.isArray(node.children)) {
|
|
918
918
|
return void 0;
|
|
@@ -942,17 +942,17 @@ function getNodePath(node) {
|
|
|
942
942
|
if (!node.parent || !node.parent.children) {
|
|
943
943
|
return [];
|
|
944
944
|
}
|
|
945
|
-
const
|
|
945
|
+
const path = getNodePath(node.parent);
|
|
946
946
|
if (node.parent.type === "property") {
|
|
947
947
|
const key = node.parent.children[0].value;
|
|
948
|
-
|
|
948
|
+
path.push(key);
|
|
949
949
|
} else if (node.parent.type === "array") {
|
|
950
950
|
const index = node.parent.children.indexOf(node);
|
|
951
951
|
if (index !== -1) {
|
|
952
|
-
|
|
952
|
+
path.push(index);
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
|
-
return
|
|
955
|
+
return path;
|
|
956
956
|
}
|
|
957
957
|
function getNodeValue(node) {
|
|
958
958
|
switch (node.type) {
|
|
@@ -1335,14 +1335,14 @@ var init_parser = __esm({
|
|
|
1335
1335
|
|
|
1336
1336
|
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/edit.js
|
|
1337
1337
|
function setProperty(text, originalPath, value, options) {
|
|
1338
|
-
const
|
|
1338
|
+
const path = originalPath.slice();
|
|
1339
1339
|
const errors = [];
|
|
1340
1340
|
const root = parseTree(text, errors);
|
|
1341
1341
|
let parent = void 0;
|
|
1342
1342
|
let lastSegment = void 0;
|
|
1343
|
-
while (
|
|
1344
|
-
lastSegment =
|
|
1345
|
-
parent = findNodeAtLocation(root,
|
|
1343
|
+
while (path.length > 0) {
|
|
1344
|
+
lastSegment = path.pop();
|
|
1345
|
+
parent = findNodeAtLocation(root, path);
|
|
1346
1346
|
if (parent === void 0 && value !== void 0) {
|
|
1347
1347
|
if (typeof lastSegment === "string") {
|
|
1348
1348
|
value = { [lastSegment]: value };
|
|
@@ -1545,8 +1545,8 @@ function printParseErrorCode(code) {
|
|
|
1545
1545
|
function format2(documentText, range, options) {
|
|
1546
1546
|
return format(documentText, range, options);
|
|
1547
1547
|
}
|
|
1548
|
-
function modify(text,
|
|
1549
|
-
return setProperty(text,
|
|
1548
|
+
function modify(text, path, value, options) {
|
|
1549
|
+
return setProperty(text, path, value, options);
|
|
1550
1550
|
}
|
|
1551
1551
|
function applyEdits(text, edits) {
|
|
1552
1552
|
let sortedEdits = edits.slice(0).sort((a, b) => {
|
|
@@ -1645,7 +1645,7 @@ var require_build = __commonJS({
|
|
|
1645
1645
|
var CR = "\r";
|
|
1646
1646
|
var LinesAndColumns = (
|
|
1647
1647
|
/** @class */
|
|
1648
|
-
function() {
|
|
1648
|
+
(function() {
|
|
1649
1649
|
function LinesAndColumns2(string) {
|
|
1650
1650
|
this.length = string.length;
|
|
1651
1651
|
var offsets = [0];
|
|
@@ -1697,7 +1697,7 @@ var require_build = __commonJS({
|
|
|
1697
1697
|
return nextOffset - offset;
|
|
1698
1698
|
};
|
|
1699
1699
|
return LinesAndColumns2;
|
|
1700
|
-
}()
|
|
1700
|
+
})()
|
|
1701
1701
|
);
|
|
1702
1702
|
exports2.LinesAndColumns = LinesAndColumns;
|
|
1703
1703
|
}
|
|
@@ -2573,15 +2573,15 @@ var require_route = __commonJS({
|
|
|
2573
2573
|
};
|
|
2574
2574
|
}
|
|
2575
2575
|
function wrapConversion(toModel, graph) {
|
|
2576
|
-
const
|
|
2576
|
+
const path = [graph[toModel].parent, toModel];
|
|
2577
2577
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
2578
2578
|
let cur = graph[toModel].parent;
|
|
2579
2579
|
while (graph[cur].parent) {
|
|
2580
|
-
|
|
2580
|
+
path.unshift(graph[cur].parent);
|
|
2581
2581
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
2582
2582
|
cur = graph[cur].parent;
|
|
2583
2583
|
}
|
|
2584
|
-
fn.conversion =
|
|
2584
|
+
fn.conversion = path;
|
|
2585
2585
|
return fn;
|
|
2586
2586
|
}
|
|
2587
2587
|
module2.exports = function(fromModel) {
|
|
@@ -3480,7 +3480,7 @@ var require_buffer_list = __commonJS({
|
|
|
3480
3480
|
function copyBuffer(src, target, offset) {
|
|
3481
3481
|
Buffer2.prototype.copy.call(src, target, offset);
|
|
3482
3482
|
}
|
|
3483
|
-
module2.exports = /* @__PURE__ */ function() {
|
|
3483
|
+
module2.exports = /* @__PURE__ */ (function() {
|
|
3484
3484
|
function BufferList() {
|
|
3485
3485
|
_classCallCheck(this, BufferList);
|
|
3486
3486
|
this.head = null;
|
|
@@ -3642,7 +3642,7 @@ var require_buffer_list = __commonJS({
|
|
|
3642
3642
|
}
|
|
3643
3643
|
}]);
|
|
3644
3644
|
return BufferList;
|
|
3645
|
-
}();
|
|
3645
|
+
})();
|
|
3646
3646
|
}
|
|
3647
3647
|
});
|
|
3648
3648
|
|
|
@@ -5777,11 +5777,11 @@ var require_stream_readable = __commonJS({
|
|
|
5777
5777
|
});
|
|
5778
5778
|
for (var i in stream) {
|
|
5779
5779
|
if (this[i] === void 0 && typeof stream[i] === "function") {
|
|
5780
|
-
this[i] = /* @__PURE__ */ function methodWrap(method) {
|
|
5780
|
+
this[i] = /* @__PURE__ */ (function methodWrap(method) {
|
|
5781
5781
|
return function methodWrapReturnFunction() {
|
|
5782
5782
|
return stream[method].apply(stream, arguments);
|
|
5783
5783
|
};
|
|
5784
|
-
}(i);
|
|
5784
|
+
})(i);
|
|
5785
5785
|
}
|
|
5786
5786
|
}
|
|
5787
5787
|
for (var n = 0; n < kProxyEvents.length; n++) {
|
|
@@ -9722,7 +9722,7 @@ var require_dumper = __commonJS({
|
|
|
9722
9722
|
return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
|
|
9723
9723
|
}
|
|
9724
9724
|
function writeScalar(state, string, level, iskey, inblock, singleLO) {
|
|
9725
|
-
state.dump = function() {
|
|
9725
|
+
state.dump = (function() {
|
|
9726
9726
|
if (string.length === 0) {
|
|
9727
9727
|
return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
|
|
9728
9728
|
}
|
|
@@ -9760,7 +9760,7 @@ var require_dumper = __commonJS({
|
|
|
9760
9760
|
default:
|
|
9761
9761
|
throw new YAMLException("impossible error: invalid scalar style");
|
|
9762
9762
|
}
|
|
9763
|
-
}();
|
|
9763
|
+
})();
|
|
9764
9764
|
}
|
|
9765
9765
|
function blockHeader(string, indentPerLevel) {
|
|
9766
9766
|
var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
|
|
@@ -9774,12 +9774,12 @@ var require_dumper = __commonJS({
|
|
|
9774
9774
|
}
|
|
9775
9775
|
function foldString(string, width) {
|
|
9776
9776
|
var lineRe = /(\n+)([^\n]*)/g;
|
|
9777
|
-
var result = function() {
|
|
9777
|
+
var result = (function() {
|
|
9778
9778
|
var nextLF = string.indexOf("\n");
|
|
9779
9779
|
nextLF = nextLF !== -1 ? nextLF : string.length;
|
|
9780
9780
|
lineRe.lastIndex = nextLF;
|
|
9781
9781
|
return foldLine(string.slice(0, nextLF), width);
|
|
9782
|
-
}();
|
|
9782
|
+
})();
|
|
9783
9783
|
var prevMoreIndented = string[0] === "\n" || string[0] === " ";
|
|
9784
9784
|
var moreIndented;
|
|
9785
9785
|
var match;
|
|
@@ -10148,56 +10148,56 @@ var require_fileutils = __commonJS({
|
|
|
10148
10148
|
var path_1 = require("path");
|
|
10149
10149
|
var tar = require_tar_stream();
|
|
10150
10150
|
var zlib_1 = require("zlib");
|
|
10151
|
-
function readJsonFile(
|
|
10152
|
-
const content = (0, node_fs_1.readFileSync)(
|
|
10151
|
+
function readJsonFile(path, options) {
|
|
10152
|
+
const content = (0, node_fs_1.readFileSync)(path, "utf-8");
|
|
10153
10153
|
if (options) {
|
|
10154
10154
|
options.endsWithNewline = content.charCodeAt(content.length - 1) === 10;
|
|
10155
10155
|
}
|
|
10156
10156
|
try {
|
|
10157
10157
|
return (0, json_1.parseJson)(content, options);
|
|
10158
10158
|
} catch (e) {
|
|
10159
|
-
e.message = e.message.replace("JSON",
|
|
10159
|
+
e.message = e.message.replace("JSON", path);
|
|
10160
10160
|
throw e;
|
|
10161
10161
|
}
|
|
10162
10162
|
}
|
|
10163
|
-
function readYamlFile(
|
|
10164
|
-
const content = (0, node_fs_1.readFileSync)(
|
|
10163
|
+
function readYamlFile(path, options) {
|
|
10164
|
+
const content = (0, node_fs_1.readFileSync)(path, "utf-8");
|
|
10165
10165
|
const { load } = require_js_yaml();
|
|
10166
|
-
return load(content, { ...options, filename:
|
|
10166
|
+
return load(content, { ...options, filename: path });
|
|
10167
10167
|
}
|
|
10168
|
-
function writeJsonFile2(
|
|
10169
|
-
(0, node_fs_1.mkdirSync)((0, path_1.dirname)(
|
|
10168
|
+
function writeJsonFile2(path, data, options) {
|
|
10169
|
+
(0, node_fs_1.mkdirSync)((0, path_1.dirname)(path), { recursive: true });
|
|
10170
10170
|
const serializedJson = (0, json_1.serializeJson)(data, options);
|
|
10171
10171
|
const content = options?.appendNewLine ? `${serializedJson}
|
|
10172
10172
|
` : serializedJson;
|
|
10173
|
-
(0, node_fs_1.writeFileSync)(
|
|
10173
|
+
(0, node_fs_1.writeFileSync)(path, content, { encoding: "utf-8" });
|
|
10174
10174
|
}
|
|
10175
|
-
async function writeJsonFileAsync(
|
|
10176
|
-
await (0, promises_1.mkdir)((0, path_1.dirname)(
|
|
10175
|
+
async function writeJsonFileAsync(path, data, options) {
|
|
10176
|
+
await (0, promises_1.mkdir)((0, path_1.dirname)(path), { recursive: true });
|
|
10177
10177
|
const serializedJson = (0, json_1.serializeJson)(data, options);
|
|
10178
10178
|
const content = options?.appendNewLine ? `${serializedJson}
|
|
10179
10179
|
` : serializedJson;
|
|
10180
|
-
await (0, promises_1.writeFile)(
|
|
10180
|
+
await (0, promises_1.writeFile)(path, content, { encoding: "utf-8" });
|
|
10181
10181
|
}
|
|
10182
|
-
function directoryExists(
|
|
10182
|
+
function directoryExists(path) {
|
|
10183
10183
|
try {
|
|
10184
|
-
return (0, node_fs_1.statSync)(
|
|
10184
|
+
return (0, node_fs_1.statSync)(path).isDirectory();
|
|
10185
10185
|
} catch {
|
|
10186
10186
|
return false;
|
|
10187
10187
|
}
|
|
10188
10188
|
}
|
|
10189
|
-
function fileExists(
|
|
10189
|
+
function fileExists(path) {
|
|
10190
10190
|
try {
|
|
10191
|
-
return (0, node_fs_1.statSync)(
|
|
10191
|
+
return (0, node_fs_1.statSync)(path).isFile();
|
|
10192
10192
|
} catch {
|
|
10193
10193
|
return false;
|
|
10194
10194
|
}
|
|
10195
10195
|
}
|
|
10196
|
-
function createDirectory(
|
|
10197
|
-
(0, node_fs_1.mkdirSync)(
|
|
10196
|
+
function createDirectory(path) {
|
|
10197
|
+
(0, node_fs_1.mkdirSync)(path, { recursive: true });
|
|
10198
10198
|
}
|
|
10199
|
-
function isRelativePath(
|
|
10200
|
-
return
|
|
10199
|
+
function isRelativePath(path) {
|
|
10200
|
+
return path === "." || path === ".." || path.startsWith("./") || path.startsWith("../");
|
|
10201
10201
|
}
|
|
10202
10202
|
async function extractFileFromTarball(tarballPath, file, destinationFilePath) {
|
|
10203
10203
|
return new Promise((resolve, reject) => {
|
|
@@ -10228,8 +10228,8 @@ var require_fileutils = __commonJS({
|
|
|
10228
10228
|
(0, node_fs_1.createReadStream)(tarballPath).pipe((0, zlib_1.createGunzip)()).pipe(tarExtractStream);
|
|
10229
10229
|
});
|
|
10230
10230
|
}
|
|
10231
|
-
function readFileIfExisting(
|
|
10232
|
-
return (0, node_fs_1.existsSync)(
|
|
10231
|
+
function readFileIfExisting(path) {
|
|
10232
|
+
return (0, node_fs_1.existsSync)(path) ? (0, node_fs_1.readFileSync)(path, "utf-8") : "";
|
|
10233
10233
|
}
|
|
10234
10234
|
}
|
|
10235
10235
|
});
|
|
@@ -10242,7 +10242,7 @@ var require_workspace_root = __commonJS({
|
|
|
10242
10242
|
exports2.workspaceRoot = void 0;
|
|
10243
10243
|
exports2.setWorkspaceRoot = setWorkspaceRoot;
|
|
10244
10244
|
exports2.workspaceRootInner = workspaceRootInner;
|
|
10245
|
-
var
|
|
10245
|
+
var path = require("path");
|
|
10246
10246
|
var fileutils_1 = require_fileutils();
|
|
10247
10247
|
exports2.workspaceRoot = workspaceRootInner(process.cwd(), process.cwd());
|
|
10248
10248
|
function setWorkspaceRoot(root) {
|
|
@@ -10251,19 +10251,19 @@ var require_workspace_root = __commonJS({
|
|
|
10251
10251
|
function workspaceRootInner(dir, candidateRoot) {
|
|
10252
10252
|
if (process.env.NX_WORKSPACE_ROOT_PATH)
|
|
10253
10253
|
return process.env.NX_WORKSPACE_ROOT_PATH;
|
|
10254
|
-
if (
|
|
10254
|
+
if (path.dirname(dir) === dir)
|
|
10255
10255
|
return candidateRoot;
|
|
10256
10256
|
const matches = [
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10257
|
+
path.join(dir, "nx.json"),
|
|
10258
|
+
path.join(dir, "nx"),
|
|
10259
|
+
path.join(dir, "nx.bat")
|
|
10260
10260
|
];
|
|
10261
10261
|
if (matches.some((x) => (0, fileutils_1.fileExists)(x))) {
|
|
10262
10262
|
return dir;
|
|
10263
|
-
} else if ((0, fileutils_1.fileExists)(
|
|
10264
|
-
return workspaceRootInner(
|
|
10263
|
+
} else if ((0, fileutils_1.fileExists)(path.join(dir, "node_modules", "nx", "package.json"))) {
|
|
10264
|
+
return workspaceRootInner(path.dirname(dir), dir);
|
|
10265
10265
|
} else {
|
|
10266
|
-
return workspaceRootInner(
|
|
10266
|
+
return workspaceRootInner(path.dirname(dir), candidateRoot);
|
|
10267
10267
|
}
|
|
10268
10268
|
}
|
|
10269
10269
|
}
|
|
@@ -10301,15 +10301,13 @@ var require_find_workspace_root = __commonJS({
|
|
|
10301
10301
|
|
|
10302
10302
|
// bin/esbuild.ts
|
|
10303
10303
|
var import_get_config2 = require("@storm-software/config-tools/get-config");
|
|
10304
|
-
var
|
|
10304
|
+
var import_console7 = require("@storm-software/config-tools/logger/console");
|
|
10305
10305
|
var import_find_workspace_root2 = require("@storm-software/config-tools/utilities/find-workspace-root");
|
|
10306
10306
|
var import_process_handler = require("@storm-software/config-tools/utilities/process-handler");
|
|
10307
10307
|
var import_commander = require("commander");
|
|
10308
10308
|
|
|
10309
10309
|
// src/build.ts
|
|
10310
|
-
var
|
|
10311
|
-
var esbuild = __toESM(require("esbuild"), 1);
|
|
10312
|
-
var import_globby = require("globby");
|
|
10310
|
+
var import_console6 = require("@storm-software/config-tools/logger/console");
|
|
10313
10311
|
|
|
10314
10312
|
// src/assets.ts
|
|
10315
10313
|
var import_build_tools = require("@storm-software/build-tools");
|
|
@@ -10627,99 +10625,16 @@ async function generatePackageJson(context) {
|
|
|
10627
10625
|
return context;
|
|
10628
10626
|
}
|
|
10629
10627
|
|
|
10630
|
-
// src/plugins/deps-check.ts
|
|
10631
|
-
var import_console5 = require("@storm-software/config-tools/logger/console");
|
|
10632
|
-
var import_node_module = require("module");
|
|
10633
|
-
var import_node_path = __toESM(require("path"), 1);
|
|
10634
|
-
var unusedIgnore = [
|
|
10635
|
-
// these are our dev dependencies
|
|
10636
|
-
/@types\/.*?/,
|
|
10637
|
-
/@typescript-eslint.*?/,
|
|
10638
|
-
/eslint.*?/,
|
|
10639
|
-
"esbuild",
|
|
10640
|
-
"husky",
|
|
10641
|
-
"is-ci",
|
|
10642
|
-
"lint-staged",
|
|
10643
|
-
"prettier",
|
|
10644
|
-
"typescript",
|
|
10645
|
-
"ts-node",
|
|
10646
|
-
"ts-jest",
|
|
10647
|
-
"@swc/core",
|
|
10648
|
-
"@swc/jest",
|
|
10649
|
-
"jest",
|
|
10650
|
-
// these are missing 3rd party deps
|
|
10651
|
-
"spdx-exceptions",
|
|
10652
|
-
"spdx-license-ids",
|
|
10653
|
-
// type-only, so it is not detected
|
|
10654
|
-
"ts-toolbelt",
|
|
10655
|
-
// these are indirectly used by build
|
|
10656
|
-
"buffer"
|
|
10657
|
-
];
|
|
10658
|
-
var missingIgnore = [".prisma", "@prisma/client", "ts-toolbelt"];
|
|
10659
|
-
var depsCheckPlugin = (bundle) => ({
|
|
10660
|
-
name: "storm:deps-check",
|
|
10661
|
-
setup(build3) {
|
|
10662
|
-
const pkgJsonPath = import_node_path.default.join(process.cwd(), "package.json");
|
|
10663
|
-
const pkgContents = require(pkgJsonPath);
|
|
10664
|
-
const regDependencies = Object.keys(pkgContents["dependencies"] ?? {});
|
|
10665
|
-
const devDependencies = Object.keys(pkgContents["devDependencies"] ?? {});
|
|
10666
|
-
const peerDependencies = Object.keys(pkgContents["peerDependencies"] ?? {});
|
|
10667
|
-
const dependencies = [
|
|
10668
|
-
...regDependencies,
|
|
10669
|
-
...bundle ? devDependencies : []
|
|
10670
|
-
];
|
|
10671
|
-
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
10672
|
-
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
10673
|
-
build3.onResolve({ filter: onlyPackages }, (args) => {
|
|
10674
|
-
if (args.importer.includes(process.cwd())) {
|
|
10675
|
-
if (args.path[0] === "@") {
|
|
10676
|
-
const [org, pkg] = args.path.split("/");
|
|
10677
|
-
collectedDependencies.add(`${org}/${pkg}`);
|
|
10678
|
-
} else {
|
|
10679
|
-
const [pkg] = args.path.split("/");
|
|
10680
|
-
collectedDependencies.add(pkg);
|
|
10681
|
-
}
|
|
10682
|
-
}
|
|
10683
|
-
return { external: true };
|
|
10684
|
-
});
|
|
10685
|
-
build3.onEnd(() => {
|
|
10686
|
-
const unusedDependencies = [...dependencies].filter((dep) => {
|
|
10687
|
-
return !collectedDependencies.has(dep) || import_node_module.builtinModules.includes(dep);
|
|
10688
|
-
});
|
|
10689
|
-
const missingDependencies = [...collectedDependencies].filter((dep) => {
|
|
10690
|
-
return !dependencies.includes(dep) && !import_node_module.builtinModules.includes(dep);
|
|
10691
|
-
});
|
|
10692
|
-
const filteredUnusedDeps = unusedDependencies.filter((dep) => {
|
|
10693
|
-
return !unusedIgnore.some((pattern) => dep.match(pattern));
|
|
10694
|
-
});
|
|
10695
|
-
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
10696
|
-
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
10697
|
-
});
|
|
10698
|
-
(0, import_console5.writeWarning)(
|
|
10699
|
-
`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
|
|
10700
|
-
);
|
|
10701
|
-
(0, import_console5.writeError)(
|
|
10702
|
-
`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
|
|
10703
|
-
);
|
|
10704
|
-
if (filteredMissingDeps.length > 0) {
|
|
10705
|
-
throw new Error(`Missing dependencies detected - please install them:
|
|
10706
|
-
${JSON.stringify(filteredMissingDeps)}
|
|
10707
|
-
`);
|
|
10708
|
-
}
|
|
10709
|
-
});
|
|
10710
|
-
}
|
|
10711
|
-
});
|
|
10712
|
-
|
|
10713
10628
|
// src/tsup.ts
|
|
10714
|
-
var
|
|
10629
|
+
var import_console5 = require("@storm-software/config-tools/logger/console");
|
|
10715
10630
|
var import_correct_paths3 = require("@storm-software/config-tools/utilities/correct-paths");
|
|
10716
10631
|
var import_tsup = require("tsup");
|
|
10717
10632
|
async function executeTsup(context) {
|
|
10718
|
-
(0,
|
|
10633
|
+
(0, import_console5.writeDebug)(
|
|
10719
10634
|
` \u{1F680} Running ${context.options.name} build`,
|
|
10720
10635
|
context.workspaceConfig
|
|
10721
10636
|
);
|
|
10722
|
-
const stopwatch = (0,
|
|
10637
|
+
const stopwatch = (0, import_console5.getStopwatch)(`${context.options.name} build`);
|
|
10723
10638
|
await (0, import_tsup.build)({
|
|
10724
10639
|
...context.options,
|
|
10725
10640
|
outDir: context.options.distDir ? (0, import_correct_paths3.joinPaths)(context.outputPath, context.options.distDir) : context.outputPath,
|
|
@@ -10733,17 +10648,17 @@ async function executeTsup(context) {
|
|
|
10733
10648
|
async function reportResults(context) {
|
|
10734
10649
|
if (context.result?.errors.length === 0) {
|
|
10735
10650
|
if (context.result.warnings.length > 0) {
|
|
10736
|
-
(0,
|
|
10651
|
+
(0, import_console6.writeWarning)(
|
|
10737
10652
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
10738
10653
|
context.workspaceConfig
|
|
10739
10654
|
);
|
|
10740
10655
|
}
|
|
10741
|
-
(0,
|
|
10656
|
+
(0, import_console6.writeSuccess)(
|
|
10742
10657
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
10743
10658
|
context.workspaceConfig
|
|
10744
10659
|
);
|
|
10745
10660
|
} else if (context.result?.errors && context.result?.errors.length > 0) {
|
|
10746
|
-
(0,
|
|
10661
|
+
(0, import_console6.writeError)(
|
|
10747
10662
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
10748
10663
|
context.workspaceConfig
|
|
10749
10664
|
);
|
|
@@ -10752,47 +10667,21 @@ async function reportResults(context) {
|
|
|
10752
10667
|
);
|
|
10753
10668
|
}
|
|
10754
10669
|
}
|
|
10755
|
-
async function dependencyCheck(options) {
|
|
10756
|
-
if (process.env.DEV === "true") {
|
|
10757
|
-
return void 0;
|
|
10758
|
-
}
|
|
10759
|
-
if (process.env.CI && !process.env.BUILDKITE) {
|
|
10760
|
-
return void 0;
|
|
10761
|
-
}
|
|
10762
|
-
const buildPromise = esbuild.build({
|
|
10763
|
-
entryPoints: (0, import_globby.globbySync)("**/*.{j,t}s", {
|
|
10764
|
-
// We don't check dependencies in ecosystem tests because tests are isolated from the build.
|
|
10765
|
-
ignore: ["./src/__tests__/**/*", "./tests/e2e/**/*", "./dist/**/*"],
|
|
10766
|
-
gitignore: true
|
|
10767
|
-
}),
|
|
10768
|
-
logLevel: "silent",
|
|
10769
|
-
// there will be errors
|
|
10770
|
-
bundle: true,
|
|
10771
|
-
// we bundle to get everything
|
|
10772
|
-
write: false,
|
|
10773
|
-
// no need to write for analysis
|
|
10774
|
-
outdir: "out",
|
|
10775
|
-
plugins: [depsCheckPlugin(options.bundle)]
|
|
10776
|
-
});
|
|
10777
|
-
await buildPromise.catch(() => {
|
|
10778
|
-
});
|
|
10779
|
-
return void 0;
|
|
10780
|
-
}
|
|
10781
10670
|
async function cleanOutputPath(context) {
|
|
10782
10671
|
if (context.clean !== false && context.outputPath) {
|
|
10783
|
-
(0,
|
|
10672
|
+
(0, import_console6.writeDebug)(
|
|
10784
10673
|
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
10785
10674
|
context.workspaceConfig
|
|
10786
10675
|
);
|
|
10787
|
-
const stopwatch = (0,
|
|
10676
|
+
const stopwatch = (0, import_console6.getStopwatch)(`${context.options.name} output clean`);
|
|
10788
10677
|
await cleanDirectories(context.outputPath);
|
|
10789
10678
|
stopwatch();
|
|
10790
10679
|
}
|
|
10791
10680
|
return context;
|
|
10792
10681
|
}
|
|
10793
|
-
async function
|
|
10794
|
-
(0,
|
|
10795
|
-
const stopwatch = (0,
|
|
10682
|
+
async function build(options) {
|
|
10683
|
+
(0, import_console6.writeDebug)(` \u26A1 Executing Storm ESBuild pipeline`);
|
|
10684
|
+
const stopwatch = (0, import_console6.getStopwatch)("ESBuild pipeline");
|
|
10796
10685
|
try {
|
|
10797
10686
|
const opts = Array.isArray(options) ? options : [options];
|
|
10798
10687
|
if (opts.length === 0) {
|
|
@@ -10801,15 +10690,15 @@ async function build2(options) {
|
|
|
10801
10690
|
const context = await resolveContext(options);
|
|
10802
10691
|
await cleanOutputPath(context);
|
|
10803
10692
|
await Promise.all([
|
|
10804
|
-
dependencyCheck(context.options),
|
|
10693
|
+
// dependencyCheck(context.options),
|
|
10805
10694
|
generatePackageJson(context),
|
|
10806
10695
|
copyBuildAssets(context),
|
|
10807
10696
|
executeTsup(context)
|
|
10808
10697
|
]);
|
|
10809
10698
|
await reportResults(context);
|
|
10810
|
-
(0,
|
|
10699
|
+
(0, import_console6.writeSuccess)(" \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
10811
10700
|
} catch (error) {
|
|
10812
|
-
(0,
|
|
10701
|
+
(0, import_console6.writeFatal)(
|
|
10813
10702
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
10814
10703
|
);
|
|
10815
10704
|
throw error;
|
|
@@ -10821,7 +10710,7 @@ async function build2(options) {
|
|
|
10821
10710
|
// bin/esbuild.ts
|
|
10822
10711
|
async function createProgram(config) {
|
|
10823
10712
|
try {
|
|
10824
|
-
(0,
|
|
10713
|
+
(0, import_console7.writeInfo)("\u26A1 Running Storm ESBuild pipeline", config);
|
|
10825
10714
|
const root = (0, import_find_workspace_root2.findWorkspaceRootSafe)();
|
|
10826
10715
|
process.env.STORM_WORKSPACE_ROOT ??= root;
|
|
10827
10716
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root;
|
|
@@ -10949,7 +10838,7 @@ async function createProgram(config) {
|
|
|
10949
10838
|
).addOption(nameOption).action(cleanAction(config));
|
|
10950
10839
|
return program;
|
|
10951
10840
|
} catch (e) {
|
|
10952
|
-
(0,
|
|
10841
|
+
(0, import_console7.writeFatal)(
|
|
10953
10842
|
`A fatal error occurred while running the program: ${e.message}`,
|
|
10954
10843
|
config
|
|
10955
10844
|
);
|
|
@@ -10958,12 +10847,12 @@ async function createProgram(config) {
|
|
|
10958
10847
|
}
|
|
10959
10848
|
var buildAction = (config) => async (options) => {
|
|
10960
10849
|
try {
|
|
10961
|
-
await
|
|
10850
|
+
await build({
|
|
10962
10851
|
...options,
|
|
10963
10852
|
format: options.format
|
|
10964
10853
|
});
|
|
10965
10854
|
} catch (e) {
|
|
10966
|
-
(0,
|
|
10855
|
+
(0, import_console7.writeFatal)(
|
|
10967
10856
|
`A fatal error occurred while cleaning the ESBuild output directory: ${e.message}`,
|
|
10968
10857
|
config
|
|
10969
10858
|
);
|
|
@@ -10975,7 +10864,7 @@ var cleanAction = (config) => async (options) => {
|
|
|
10975
10864
|
try {
|
|
10976
10865
|
await clean(options.name, options.output, config);
|
|
10977
10866
|
} catch (e) {
|
|
10978
|
-
(0,
|
|
10867
|
+
(0, import_console7.writeFatal)(
|
|
10979
10868
|
`A fatal error occurred while cleaning the ESBuild output directory: ${e.message}`,
|
|
10980
10869
|
config
|
|
10981
10870
|
);
|
|
@@ -10985,18 +10874,18 @@ var cleanAction = (config) => async (options) => {
|
|
|
10985
10874
|
};
|
|
10986
10875
|
void (async () => {
|
|
10987
10876
|
const config = await (0, import_get_config2.getConfig)();
|
|
10988
|
-
const stopwatch = (0,
|
|
10877
|
+
const stopwatch = (0, import_console7.getStopwatch)("Storm ESBuild executable");
|
|
10989
10878
|
try {
|
|
10990
10879
|
(0, import_process_handler.handleProcess)(config);
|
|
10991
10880
|
const program = await createProgram(config);
|
|
10992
10881
|
await program.parseAsync(process.argv);
|
|
10993
|
-
(0,
|
|
10882
|
+
(0, import_console7.writeSuccess)(
|
|
10994
10883
|
`\u{1F389} Storm ESBuild executable has completed successfully!`,
|
|
10995
10884
|
config
|
|
10996
10885
|
);
|
|
10997
10886
|
(0, import_process_handler.exitWithSuccess)(config);
|
|
10998
10887
|
} catch (error) {
|
|
10999
|
-
(0,
|
|
10888
|
+
(0, import_console7.writeFatal)(
|
|
11000
10889
|
`A fatal error occurred while running Storm ESBuild executable:
|
|
11001
10890
|
|
|
11002
10891
|
${error.message}`,
|
package/dist/assets.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
3
|
+
var _chunkRHU3X337cjs = require('./chunk-RHU3X337.cjs');
|
|
4
|
+
require('./chunk-HLI6PFBX.cjs');
|
|
5
|
+
require('./chunk-NNPOK4ZA.cjs');
|
|
6
|
+
require('./chunk-SUEOLCXE.cjs');
|
|
7
|
+
require('./chunk-4WZ6P6VK.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.copyBuildAssets =
|
|
10
|
+
exports.copyBuildAssets = _chunkRHU3X337cjs.copyBuildAssets;
|
package/dist/assets.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copyBuildAssets
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-DQCFGOUF.js";
|
|
4
|
+
import "./chunk-V4V6EEGM.js";
|
|
5
|
+
import "./chunk-UUUQVVRP.js";
|
|
6
|
+
import "./chunk-E7YPFD24.js";
|
|
7
|
+
import "./chunk-4ZDNVWJS.js";
|
|
8
8
|
export {
|
|
9
9
|
copyBuildAssets
|
|
10
10
|
};
|
package/dist/build.cjs
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-46KVHK5G.cjs');
|
|
3
|
+
var _chunk35CZ4A75cjs = require('./chunk-35CZ4A75.cjs');
|
|
4
|
+
require('./chunk-RHU3X337.cjs');
|
|
5
|
+
require('./chunk-NXEDGL2L.cjs');
|
|
6
|
+
require('./chunk-MFN3SHAN.cjs');
|
|
7
|
+
require('./chunk-FJY2SITF.cjs');
|
|
8
|
+
require('./chunk-WTG24PW3.cjs');
|
|
9
|
+
require('./chunk-HLI6PFBX.cjs');
|
|
10
|
+
require('./chunk-3IYN4AMY.cjs');
|
|
11
|
+
require('./chunk-NNPOK4ZA.cjs');
|
|
12
|
+
require('./chunk-SUEOLCXE.cjs');
|
|
13
|
+
require('./chunk-4WZ6P6VK.cjs');
|
|
15
14
|
|
|
16
15
|
|
|
17
|
-
exports.build =
|
|
16
|
+
exports.build = _chunk35CZ4A75cjs.build;
|