@storm-software/workspace-tools 1.62.9 → 1.62.11
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 +26 -0
- package/index.js +40 -37
- package/meta.json +1 -1
- package/package.json +2 -3
- package/src/executors/tsup/executor.js +28 -28
- package/src/executors/tsup-browser/executor.js +40 -33
- package/src/executors/tsup-neutral/executor.js +40 -33
- package/src/executors/tsup-node/executor.js +40 -33
- package/src/generators/preset/generator.js +0 -4
- package/src/utils/index.js +40 -33
package/src/utils/index.js
CHANGED
|
@@ -399948,9 +399948,9 @@ var require_normalize_options = __commonJS({
|
|
|
399948
399948
|
}
|
|
399949
399949
|
});
|
|
399950
399950
|
|
|
399951
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
399951
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-EPAEWGCP.js
|
|
399952
399952
|
var require_chunk_EPAEWGCP = __commonJS({
|
|
399953
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
399953
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports2) {
|
|
399954
399954
|
"use strict";
|
|
399955
399955
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
399956
399956
|
var version = "8.0.0";
|
|
@@ -401597,9 +401597,9 @@ var require_resolve_from = __commonJS({
|
|
|
401597
401597
|
}
|
|
401598
401598
|
});
|
|
401599
401599
|
|
|
401600
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
401600
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-GQ77QZBO.js
|
|
401601
401601
|
var require_chunk_GQ77QZBO = __commonJS({
|
|
401602
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
401602
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports2) {
|
|
401603
401603
|
"use strict";
|
|
401604
401604
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
401605
401605
|
function _interopRequireDefault(obj) {
|
|
@@ -401877,9 +401877,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
401877
401877
|
}
|
|
401878
401878
|
});
|
|
401879
401879
|
|
|
401880
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
401880
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
401881
401881
|
var require_chunk_UIX4URMV = __commonJS({
|
|
401882
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
401882
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports2) {
|
|
401883
401883
|
"use strict";
|
|
401884
401884
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
401885
401885
|
function _interopRequireWildcard(obj) {
|
|
@@ -405219,9 +405219,9 @@ var require_dist3 = __commonJS({
|
|
|
405219
405219
|
}
|
|
405220
405220
|
});
|
|
405221
405221
|
|
|
405222
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
405222
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
405223
405223
|
var require_chunk_7G76EW2R = __commonJS({
|
|
405224
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
405224
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports2) {
|
|
405225
405225
|
"use strict";
|
|
405226
405226
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
405227
405227
|
function _interopRequireDefault(obj) {
|
|
@@ -452291,7 +452291,7 @@ ${outro}`;
|
|
|
452291
452291
|
await promises.mkdir(node_path.dirname(fileName), { recursive: true });
|
|
452292
452292
|
return promises.writeFile(fileName, outputFile.type === "asset" ? outputFile.source : outputFile.code);
|
|
452293
452293
|
}
|
|
452294
|
-
function
|
|
452294
|
+
function defineConfig(options8) {
|
|
452295
452295
|
return options8;
|
|
452296
452296
|
}
|
|
452297
452297
|
exports2.blue = blue;
|
|
@@ -452300,7 +452300,7 @@ ${outro}`;
|
|
|
452300
452300
|
exports2.createFilter = createFilter;
|
|
452301
452301
|
exports2.cyan = cyan$1;
|
|
452302
452302
|
exports2.cyan$1 = cyan;
|
|
452303
|
-
exports2.defineConfig =
|
|
452303
|
+
exports2.defineConfig = defineConfig;
|
|
452304
452304
|
exports2.ensureArray = ensureArray$1;
|
|
452305
452305
|
exports2.getAugmentedNamespace = getAugmentedNamespace;
|
|
452306
452306
|
exports2.getNewArray = getNewArray;
|
|
@@ -456304,9 +456304,9 @@ var require_rollup2 = __commonJS({
|
|
|
456304
456304
|
}
|
|
456305
456305
|
});
|
|
456306
456306
|
|
|
456307
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
456307
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/index.js
|
|
456308
456308
|
var require_dist6 = __commonJS({
|
|
456309
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1.
|
|
456309
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=fecszixvz36nsmruxbct32ggt4_@microsoft+api-extractor@7.40.1_@swc+core@1._cvnwl4sfoqdlyxchryxvqgzdae/node_modules/tsup/dist/index.js"(exports2) {
|
|
456310
456310
|
"use strict";
|
|
456311
456311
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
456312
456312
|
function _interopRequireDefault(obj) {
|
|
@@ -458869,7 +458869,7 @@ var require_dist6 = __commonJS({
|
|
|
458869
458869
|
}
|
|
458870
458870
|
};
|
|
458871
458871
|
};
|
|
458872
|
-
var
|
|
458872
|
+
var defineConfig = (options8) => options8;
|
|
458873
458873
|
var isTaskkillCmdProcessNotFoundError = (err) => {
|
|
458874
458874
|
return process.platform === "win32" && "cmd" in err && "code" in err && typeof err.cmd === "string" && err.cmd.startsWith("taskkill") && err.code === 128;
|
|
458875
458875
|
};
|
|
@@ -459174,7 +459174,7 @@ var require_dist6 = __commonJS({
|
|
|
459174
459174
|
);
|
|
459175
459175
|
}
|
|
459176
459176
|
exports2.build = build2;
|
|
459177
|
-
exports2.defineConfig =
|
|
459177
|
+
exports2.defineConfig = defineConfig;
|
|
459178
459178
|
}
|
|
459179
459179
|
});
|
|
459180
459180
|
|
|
@@ -459335,23 +459335,30 @@ var getFileBanner = (name, commentStart = "//") => {
|
|
|
459335
459335
|
while (name.length + padding.length < 12) {
|
|
459336
459336
|
padding += " ";
|
|
459337
459337
|
}
|
|
459338
|
+
let titleName = process.env.STORM_NAMESPACE ?? "";
|
|
459339
|
+
if (titleName) {
|
|
459340
|
+
if (titleName?.startsWith("@")) {
|
|
459341
|
+
titleName = titleName.slice(1);
|
|
459342
|
+
}
|
|
459343
|
+
titleName = (titleName.charAt(0).toUpperCase() + titleName.slice(1)).split("-").filter((word) => word && word.length > 0).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
459344
|
+
}
|
|
459338
459345
|
return `
|
|
459339
459346
|
|
|
459340
459347
|
${commentStart} -------------------------------------------------------------------
|
|
459341
459348
|
${commentStart}
|
|
459342
459349
|
${commentStart} ${padding}Storm Software
|
|
459343
|
-
${commentStart} \u26A1 ${
|
|
459350
|
+
${commentStart} \u26A1 ${titleName ? `${titleName} - ` : ""}${name}
|
|
459344
459351
|
${commentStart}
|
|
459345
|
-
${commentStart} This code was released as part of the ${
|
|
459352
|
+
${commentStart} This code was released as part of the ${titleName ? `${titleName} ` : ""}project. ${titleName ? titleName : "This project"}
|
|
459346
459353
|
${commentStart} is maintained by Storm Software under the ${process.env.STORM_LICENSE ?? "Apache License 2.0"}, and is
|
|
459347
459354
|
${commentStart} free for commercial and private use. For more information, please visit
|
|
459348
459355
|
${commentStart} our licensing page.
|
|
459349
459356
|
${commentStart}
|
|
459350
459357
|
${commentStart} Website: ${process.env.STORM_HOMEPAGE ?? "https://stormsoftware.org"}
|
|
459351
459358
|
${commentStart} Repository: ${process.env.STORM_REPOSITORY ?? "https://github.com/storm-software/storm-stack"}
|
|
459352
|
-
${commentStart} Documentation: https://stormsoftware.org/docs
|
|
459353
|
-
${commentStart} Contact: https://stormsoftware.org/contact
|
|
459354
|
-
${commentStart} Licensing: https://stormsoftware.org/licensing
|
|
459359
|
+
${commentStart} Documentation: https://stormsoftware.org/docs${titleName?.startsWith("@") ? `/${titleName.slice(1)}` : ""}
|
|
459360
|
+
${commentStart} Contact: ${process.env.STORM_HOMEPAGE ? process.env.STORM_HOMEPAGE.endsWith("/") ? process.env.STORM_HOMEPAGE.slice(-1) : process.env.STORM_HOMEPAGE : "https://stormsoftware.org"}/contact
|
|
459361
|
+
${commentStart} Licensing: ${process.env.STORM_HOMEPAGE ? process.env.STORM_HOMEPAGE.endsWith("/") ? process.env.STORM_HOMEPAGE.slice(-1) : process.env.STORM_HOMEPAGE : "https://stormsoftware.org"}/licensing
|
|
459355
459362
|
${commentStart}
|
|
459356
459363
|
${commentStart} -------------------------------------------------------------------
|
|
459357
459364
|
|
|
@@ -459495,7 +459502,6 @@ var environmentPlugin = (data) => ({
|
|
|
459495
459502
|
});
|
|
459496
459503
|
|
|
459497
459504
|
// packages/workspace-tools/src/utils/run-tsup-build.ts
|
|
459498
|
-
var import_tsup = __toESM(require_dist6());
|
|
459499
459505
|
var import_typescript = __toESM(require_typescript());
|
|
459500
459506
|
|
|
459501
459507
|
// packages/workspace-tools/src/base/get-tsup-config.ts
|
|
@@ -459609,7 +459615,7 @@ var outExtension = ({ format: format3 }) => {
|
|
|
459609
459615
|
var applyDefaultOptions = (options8) => {
|
|
459610
459616
|
options8.entry ??= "{sourceRoot}/index.ts";
|
|
459611
459617
|
options8.outputPath ??= "dist/{projectRoot}";
|
|
459612
|
-
options8.tsConfig ??= "tsconfig.json";
|
|
459618
|
+
options8.tsConfig ??= "{projectRoot}/tsconfig.json";
|
|
459613
459619
|
options8.generatePackageJson ??= true;
|
|
459614
459620
|
options8.splitting ??= true;
|
|
459615
459621
|
options8.treeshake ??= true;
|
|
@@ -459640,7 +459646,8 @@ var applyDefaultOptions = (options8) => {
|
|
|
459640
459646
|
return options8;
|
|
459641
459647
|
};
|
|
459642
459648
|
var runTsupBuild = async (context, config, options8) => {
|
|
459643
|
-
const {
|
|
459649
|
+
const { writeInfo, writeWarning, findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
459650
|
+
const { build: tsup, defineConfig } = await Promise.resolve().then(() => __toESM(require_dist6()));
|
|
459644
459651
|
const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
|
|
459645
459652
|
const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
|
|
459646
459653
|
ret[key2] = options8.env?.[key2];
|
|
@@ -459655,7 +459662,6 @@ var runTsupBuild = async (context, config, options8) => {
|
|
|
459655
459662
|
options8.plugins?.push(environmentPlugin(stormEnv));
|
|
459656
459663
|
const getConfigOptions = {
|
|
459657
459664
|
...options8,
|
|
459658
|
-
main: context.main,
|
|
459659
459665
|
entry: {
|
|
459660
459666
|
[removeExtension(
|
|
459661
459667
|
context.main?.split(context.main?.includes(import_node_path2.sep) ? import_node_path2.sep : context.main?.includes("/") ? "/" : "\\")?.pop()
|
|
@@ -459687,13 +459693,14 @@ var runTsupBuild = async (context, config, options8) => {
|
|
|
459687
459693
|
)
|
|
459688
459694
|
),
|
|
459689
459695
|
banner: options8.banner ? {
|
|
459690
|
-
js:
|
|
459696
|
+
js: `
|
|
459691
459697
|
|
|
459692
|
-
`,
|
|
459693
|
-
css: `/*
|
|
459694
459698
|
${options8.banner}
|
|
459695
459699
|
|
|
459700
|
+
`,
|
|
459701
|
+
css: `/*
|
|
459696
459702
|
|
|
459703
|
+
${options8.banner}
|
|
459697
459704
|
|
|
459698
459705
|
*/`
|
|
459699
459706
|
} : void 0,
|
|
@@ -459702,18 +459709,18 @@ ${options8.banner}
|
|
|
459702
459709
|
if (options8.getConfig) {
|
|
459703
459710
|
writeInfo(config, "\u26A1 Running the Build process");
|
|
459704
459711
|
const getConfigFns = [options8.getConfig];
|
|
459705
|
-
const tsupConfig =
|
|
459712
|
+
const tsupConfig = defineConfig(
|
|
459706
459713
|
getConfigFns.map(
|
|
459707
459714
|
(getConfigFn) => getConfig(workspaceRoot, context.projectRoot, getConfigFn, getConfigOptions)
|
|
459708
459715
|
)
|
|
459709
459716
|
);
|
|
459710
459717
|
if (_isFunction(tsupConfig)) {
|
|
459711
459718
|
const tsupOptions = await Promise.resolve(tsupConfig({}));
|
|
459712
|
-
await build(tsupOptions, config);
|
|
459719
|
+
await build(tsup, tsupOptions, config);
|
|
459713
459720
|
} else {
|
|
459714
|
-
await build(tsupConfig, config);
|
|
459721
|
+
await build(tsup, tsupConfig, config);
|
|
459715
459722
|
}
|
|
459716
|
-
} else
|
|
459723
|
+
} else {
|
|
459717
459724
|
writeWarning(
|
|
459718
459725
|
config,
|
|
459719
459726
|
"The Build process did not run because no `getConfig` parameter was provided"
|
|
@@ -459748,10 +459755,10 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options8) {
|
|
|
459748
459755
|
}
|
|
459749
459756
|
return tsConfig;
|
|
459750
459757
|
}
|
|
459751
|
-
var build = async (options8, config) => {
|
|
459758
|
+
var build = async (tsup, options8, config) => {
|
|
459752
459759
|
const { writeDebug } = await import("@storm-software/config-tools");
|
|
459753
459760
|
if (Array.isArray(options8)) {
|
|
459754
|
-
await Promise.all(options8.map((buildOptions) => build(buildOptions, config)));
|
|
459761
|
+
await Promise.all(options8.map((buildOptions) => build(tsup, buildOptions, config)));
|
|
459755
459762
|
} else {
|
|
459756
459763
|
let tsupOptions = options8;
|
|
459757
459764
|
if (_isFunction(tsupOptions)) {
|
|
@@ -459765,7 +459772,7 @@ ${!_isFunction(tsupOptions) ? Object.keys(tsupOptions).map(
|
|
|
459765
459772
|
).join("\n") : "<function>"}
|
|
459766
459773
|
`
|
|
459767
459774
|
);
|
|
459768
|
-
await (
|
|
459775
|
+
await tsup(tsupOptions);
|
|
459769
459776
|
}
|
|
459770
459777
|
};
|
|
459771
459778
|
var _isPrimitive = (value) => {
|