@storm-software/tsdown 0.27.16 → 0.27.18
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/tsdown.cjs +3 -1
- package/dist/build.cjs +3 -3
- package/dist/build.js +2 -2
- package/dist/{chunk-SRDH3VQ5.js → chunk-DE3S3NQO.js} +25 -14
- package/dist/{chunk-WAL2QM22.js → chunk-MZ443ZDH.js} +11 -3
- package/dist/{chunk-HBRFPU3J.cjs → chunk-RHDQ3DQN.cjs} +11 -3
- package/dist/{chunk-YDB6OO6Q.cjs → chunk-WEF5QCAP.cjs} +119 -108
- package/dist/clean.cjs +2 -2
- package/dist/clean.d.cts +5 -5
- package/dist/clean.d.ts +5 -5
- package/dist/clean.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +2 -2
- package/package.json +2 -2
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/tsdown.cjs
CHANGED
|
@@ -364,7 +364,9 @@ async function createProgram(config) {
|
|
|
364
364
|
const root = (0, import_find_workspace_root2.findWorkspaceRootSafe)();
|
|
365
365
|
process.env.STORM_WORKSPACE_ROOT ??= root;
|
|
366
366
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root;
|
|
367
|
-
|
|
367
|
+
if (root) {
|
|
368
|
+
process.chdir(root);
|
|
369
|
+
}
|
|
368
370
|
const program = new import_commander.Command("storm-tsdown");
|
|
369
371
|
program.version("1.0.0", "-v --version", "display CLI version");
|
|
370
372
|
program.description("\u26A1 Run the Storm TSDown pipeline").showHelpAfterError().showSuggestionAfterError();
|
package/dist/build.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkWEF5QCAPcjs = require('./chunk-WEF5QCAP.cjs');
|
|
5
|
+
require('./chunk-RHDQ3DQN.cjs');
|
|
6
6
|
require('./chunk-DEWYQH4B.cjs');
|
|
7
7
|
require('./chunk-USNT2KNT.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.build =
|
|
11
|
+
exports.build = _chunkWEF5QCAPcjs.build; exports.cleanOutputPath = _chunkWEF5QCAPcjs.cleanOutputPath;
|
package/dist/build.js
CHANGED
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
STORM_DEFAULT_DOCS,
|
|
5
5
|
STORM_DEFAULT_HOMEPAGE,
|
|
6
6
|
STORM_DEFAULT_LICENSING,
|
|
7
|
-
StormConfigSchema,
|
|
8
7
|
cleanDirectories,
|
|
9
8
|
correctPaths,
|
|
10
9
|
findWorkspaceRoot,
|
|
@@ -15,12 +14,13 @@ import {
|
|
|
15
14
|
getStopwatch,
|
|
16
15
|
isVerbose,
|
|
17
16
|
joinPaths,
|
|
17
|
+
stormWorkspaceConfigSchema,
|
|
18
18
|
writeDebug,
|
|
19
19
|
writeFatal,
|
|
20
20
|
writeSuccess,
|
|
21
21
|
writeTrace,
|
|
22
22
|
writeWarning
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MZ443ZDH.js";
|
|
24
24
|
import {
|
|
25
25
|
DEFAULT_BUILD_OPTIONS
|
|
26
26
|
} from "./chunk-PR5HLZXS.js";
|
|
@@ -150,13 +150,13 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
|
|
|
150
150
|
return ret;
|
|
151
151
|
}, []);
|
|
152
152
|
packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
|
|
153
|
-
if (!ret[localPackage.name] && !implicitDependencies?.includes(localPackage.name)) {
|
|
154
|
-
ret[localPackage.name] =
|
|
153
|
+
if (!ret[localPackage.name] && !implicitDependencies?.includes(localPackage.name) && packageJson.devDependencies?.[localPackage.name] === void 0) {
|
|
154
|
+
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
155
155
|
}
|
|
156
156
|
return ret;
|
|
157
157
|
}, packageJson.dependencies ?? {});
|
|
158
158
|
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
159
|
-
if (!ret[localPackage.name] && implicitDependencies?.includes(localPackage.name)) {
|
|
159
|
+
if (!ret[localPackage.name] && implicitDependencies?.includes(localPackage.name) && packageJson.dependencies?.[localPackage.name] === void 0) {
|
|
160
160
|
ret[localPackage.name] = localPackage.version || "0.0.1";
|
|
161
161
|
}
|
|
162
162
|
return ret;
|
|
@@ -324,6 +324,10 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
324
324
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
325
325
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
326
326
|
},
|
|
327
|
+
error: {
|
|
328
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
329
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
330
|
+
},
|
|
327
331
|
account: {
|
|
328
332
|
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
329
333
|
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
@@ -497,6 +501,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
497
501
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
498
502
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
499
503
|
}
|
|
504
|
+
if (config.error) {
|
|
505
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
506
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
507
|
+
}
|
|
500
508
|
if (config.release) {
|
|
501
509
|
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
502
510
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
@@ -627,7 +635,7 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
627
635
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
|
|
628
636
|
}
|
|
629
637
|
if (config.registry.container) {
|
|
630
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.
|
|
638
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
|
|
631
639
|
}
|
|
632
640
|
}
|
|
633
641
|
if (config.logLevel) {
|
|
@@ -747,7 +755,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
747
755
|
// ../config-tools/src/create-storm-config.ts
|
|
748
756
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
749
757
|
var _static_cache = void 0;
|
|
750
|
-
var
|
|
758
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
751
759
|
let result;
|
|
752
760
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
753
761
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -762,7 +770,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
762
770
|
logLevel: "all"
|
|
763
771
|
});
|
|
764
772
|
}
|
|
765
|
-
result = await
|
|
773
|
+
result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
|
|
766
774
|
result.workspaceRoot ??= _workspaceRoot;
|
|
767
775
|
} else {
|
|
768
776
|
result = _static_cache.data;
|
|
@@ -778,7 +786,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
778
786
|
data: result
|
|
779
787
|
};
|
|
780
788
|
return result;
|
|
781
|
-
}, "
|
|
789
|
+
}, "createStormWorkspaceConfig");
|
|
782
790
|
var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
783
791
|
const extension_cache_key = {
|
|
784
792
|
extensionName
|
|
@@ -793,19 +801,19 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
793
801
|
_extension_cache.set(extension_cache_key, extension);
|
|
794
802
|
return extension;
|
|
795
803
|
}, "createConfigExtension");
|
|
796
|
-
var
|
|
797
|
-
const config = await
|
|
804
|
+
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
805
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
798
806
|
setConfigEnv(config);
|
|
799
807
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
800
808
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
801
809
|
${formatLogMessage(config)}`, config);
|
|
802
810
|
}
|
|
803
811
|
return config;
|
|
804
|
-
}, "
|
|
812
|
+
}, "loadStormWorkspaceConfig");
|
|
805
813
|
|
|
806
814
|
// ../config-tools/src/get-config.ts
|
|
807
815
|
var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
|
|
808
|
-
return
|
|
816
|
+
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
809
817
|
}, "getConfig");
|
|
810
818
|
|
|
811
819
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
@@ -845,7 +853,10 @@ var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRo
|
|
|
845
853
|
return ret;
|
|
846
854
|
}, []));
|
|
847
855
|
} else {
|
|
848
|
-
|
|
856
|
+
writeDebug(`Trying to add entry point ${entryPoint}"`, config);
|
|
857
|
+
if (!paths.includes(entryPoint)) {
|
|
858
|
+
paths.push(entryPoint);
|
|
859
|
+
}
|
|
849
860
|
}
|
|
850
861
|
return paths;
|
|
851
862
|
}));
|
|
@@ -157,7 +157,11 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
157
157
|
log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
158
158
|
build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
159
159
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
160
|
-
var
|
|
160
|
+
var errorConfigSchema = z.object({
|
|
161
|
+
codesFile: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("The path to the workspace's error codes JSON file"),
|
|
162
|
+
url: z.string().trim().url().optional().describe("A URL to a page that looks up the workspace's error messages given a specific error code")
|
|
163
|
+
}).describe("The workspace's error config used during the error process");
|
|
164
|
+
var stormWorkspaceConfigSchema = z.object({
|
|
161
165
|
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
162
166
|
extends: ExtendsSchema.optional(),
|
|
163
167
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
@@ -175,6 +179,7 @@ var StormConfigSchema = z.object({
|
|
|
175
179
|
bot: WorkspaceBotConfigSchema,
|
|
176
180
|
release: WorkspaceReleaseConfigSchema,
|
|
177
181
|
account: WorkspaceAccountConfigSchema,
|
|
182
|
+
error: errorConfigSchema,
|
|
178
183
|
mode: z.enum([
|
|
179
184
|
"development",
|
|
180
185
|
"staging",
|
|
@@ -512,7 +517,10 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
512
517
|
license,
|
|
513
518
|
homepage,
|
|
514
519
|
docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
515
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license
|
|
520
|
+
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
521
|
+
error: {
|
|
522
|
+
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
523
|
+
}
|
|
516
524
|
};
|
|
517
525
|
}, "getDefaultConfig");
|
|
518
526
|
|
|
@@ -754,7 +762,7 @@ export {
|
|
|
754
762
|
STORM_DEFAULT_DOCS,
|
|
755
763
|
STORM_DEFAULT_HOMEPAGE,
|
|
756
764
|
STORM_DEFAULT_LICENSING,
|
|
757
|
-
|
|
765
|
+
stormWorkspaceConfigSchema,
|
|
758
766
|
COLOR_KEYS,
|
|
759
767
|
correctPaths,
|
|
760
768
|
joinPaths,
|
|
@@ -157,7 +157,11 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
|
157
157
|
log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
158
158
|
build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
159
159
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
160
|
-
var
|
|
160
|
+
var errorConfigSchema = _zod2.default.object({
|
|
161
|
+
codesFile: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("The path to the workspace's error codes JSON file"),
|
|
162
|
+
url: _zod2.default.string().trim().url().optional().describe("A URL to a page that looks up the workspace's error messages given a specific error code")
|
|
163
|
+
}).describe("The workspace's error config used during the error process");
|
|
164
|
+
var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
161
165
|
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
162
166
|
extends: ExtendsSchema.optional(),
|
|
163
167
|
name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
@@ -175,6 +179,7 @@ var StormConfigSchema = _zod2.default.object({
|
|
|
175
179
|
bot: WorkspaceBotConfigSchema,
|
|
176
180
|
release: WorkspaceReleaseConfigSchema,
|
|
177
181
|
account: WorkspaceAccountConfigSchema,
|
|
182
|
+
error: errorConfigSchema,
|
|
178
183
|
mode: _zod2.default.enum([
|
|
179
184
|
"development",
|
|
180
185
|
"staging",
|
|
@@ -512,7 +517,10 @@ var getDefaultConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, asy
|
|
|
512
517
|
license,
|
|
513
518
|
homepage,
|
|
514
519
|
docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
515
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license
|
|
520
|
+
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
521
|
+
error: {
|
|
522
|
+
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
523
|
+
}
|
|
516
524
|
};
|
|
517
525
|
}, "getDefaultConfig");
|
|
518
526
|
|
|
@@ -772,4 +780,4 @@ _chunkUSNT2KNTcjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
|
772
780
|
|
|
773
781
|
|
|
774
782
|
|
|
775
|
-
exports.LogLevel = LogLevel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.
|
|
783
|
+
exports.LogLevel = LogLevel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.stormWorkspaceConfigSchema = stormWorkspaceConfigSchema; exports.COLOR_KEYS = COLOR_KEYS; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.findWorkspaceRoot = findWorkspaceRoot; exports.getDefaultConfig = getDefaultConfig; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.isVerbose = isVerbose; exports.writeFatal = writeFatal; exports.writeWarning = writeWarning; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage; exports.clean = clean; exports.cleanDirectories = cleanDirectories;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkRHDQ3DQNcjs = require('./chunk-RHDQ3DQN.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
var _chunkDEWYQH4Bcjs = require('./chunk-DEWYQH4B.cjs');
|
|
@@ -79,8 +79,8 @@ var copyAssets = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (co
|
|
|
79
79
|
output: "src/"
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
82
|
+
_chunkRHDQ3DQNcjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
83
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkRHDQ3DQNcjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
84
84
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
85
85
|
projectDir: projectRoot,
|
|
86
86
|
rootDir: config.workspaceRoot,
|
|
@@ -89,12 +89,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
89
89
|
});
|
|
90
90
|
await assetHandler.processAllAssetsOnce();
|
|
91
91
|
if (includeSrc === true) {
|
|
92
|
-
|
|
92
|
+
_chunkRHDQ3DQNcjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkRHDQ3DQNcjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
93
93
|
const files = await _glob.glob.call(void 0, [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
_chunkRHDQ3DQNcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
95
|
+
_chunkRHDQ3DQNcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
96
|
+
_chunkRHDQ3DQNcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
97
|
+
_chunkRHDQ3DQNcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
98
98
|
]);
|
|
99
99
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
100
100
|
|
|
@@ -117,7 +117,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
|
|
|
117
117
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _ => _.node, 'access', _2 => _2.data, 'optionalAccess', _3 => _3.root]) !== projectRoot && _optionalChain([dep, 'access', _4 => _4.node, 'access', _5 => _5.data, 'optionalAccess', _6 => _6.root]) !== workspaceRoot)) {
|
|
118
118
|
const projectNode = project.node;
|
|
119
119
|
if (projectNode.data.root) {
|
|
120
|
-
const projectPackageJsonPath =
|
|
120
|
+
const projectPackageJsonPath = _chunkRHDQ3DQNcjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
|
|
121
121
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
122
122
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
123
123
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -128,8 +128,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
if (localPackages.length > 0) {
|
|
131
|
-
|
|
132
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
131
|
+
_chunkRHDQ3DQNcjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
132
|
+
const projectJsonFile = await _promises.readFile.call(void 0, _chunkRHDQ3DQNcjs.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
133
133
|
const projectJson = JSON.parse(projectJsonFile);
|
|
134
134
|
const projectName2 = projectJson.name;
|
|
135
135
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
@@ -138,7 +138,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
|
|
|
138
138
|
}
|
|
139
139
|
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _9 => _9.projects, 'optionalAccess', _10 => _10[projectName2], 'access', _11 => _11.implicitDependencies, 'optionalAccess', _12 => _12.reduce, 'call', _13 => _13((ret, dep) => {
|
|
140
140
|
if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
|
|
141
|
-
const depPackageJsonPath =
|
|
141
|
+
const depPackageJsonPath = _chunkRHDQ3DQNcjs.joinPaths.call(void 0, workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
|
|
142
142
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
143
143
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
144
144
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
@@ -150,25 +150,25 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
|
|
|
150
150
|
return ret;
|
|
151
151
|
}, [])]);
|
|
152
152
|
packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
|
|
153
|
-
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _16 => _16.includes, 'call', _17 => _17(localPackage.name)])) {
|
|
154
|
-
ret[localPackage.name] =
|
|
153
|
+
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _16 => _16.includes, 'call', _17 => _17(localPackage.name)]) && _optionalChain([packageJson, 'access', _18 => _18.devDependencies, 'optionalAccess', _19 => _19[localPackage.name]]) === void 0) {
|
|
154
|
+
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
155
155
|
}
|
|
156
156
|
return ret;
|
|
157
157
|
}, _nullishCoalesce(packageJson.dependencies, () => ( {})));
|
|
158
158
|
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
159
|
-
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess',
|
|
159
|
+
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _20 => _20.includes, 'call', _21 => _21(localPackage.name)]) && _optionalChain([packageJson, 'access', _22 => _22.dependencies, 'optionalAccess', _23 => _23[localPackage.name]]) === void 0) {
|
|
160
160
|
ret[localPackage.name] = localPackage.version || "0.0.1";
|
|
161
161
|
}
|
|
162
162
|
return ret;
|
|
163
163
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
164
164
|
} else {
|
|
165
|
-
|
|
165
|
+
_chunkRHDQ3DQNcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
166
166
|
}
|
|
167
167
|
return packageJson;
|
|
168
168
|
}, "addPackageDependencies");
|
|
169
169
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
170
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
171
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
170
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkRHDQ3DQNcjs.findWorkspaceRoot.call(void 0, );
|
|
171
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkRHDQ3DQNcjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
172
172
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
173
173
|
packageJson.type ??= "module";
|
|
174
174
|
packageJson.sideEffects ??= false;
|
|
@@ -177,7 +177,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.cal
|
|
|
177
177
|
if (distSrc.startsWith("/")) {
|
|
178
178
|
distSrc = distSrc.substring(1);
|
|
179
179
|
}
|
|
180
|
-
packageJson.source ??= `${
|
|
180
|
+
packageJson.source ??= `${_chunkRHDQ3DQNcjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
181
181
|
}
|
|
182
182
|
packageJson.files ??= [
|
|
183
183
|
"dist/**/*"
|
|
@@ -208,7 +208,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.cal
|
|
|
208
208
|
];
|
|
209
209
|
}
|
|
210
210
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
211
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
211
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkRHDQ3DQNcjs.joinPaths.call(void 0, "packages", projectName);
|
|
212
212
|
return packageJson;
|
|
213
213
|
}, "addWorkspacePackageJsonFields");
|
|
214
214
|
var addPackageJsonExport = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
@@ -236,16 +236,16 @@ var addPackageJsonExport = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
|
|
|
236
236
|
var _c12 = require('c12');
|
|
237
237
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
238
238
|
var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
239
|
-
const workspacePath = filePath ||
|
|
239
|
+
const workspacePath = filePath || _chunkRHDQ3DQNcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
240
240
|
const configs = await Promise.all([
|
|
241
241
|
_c12.loadConfig.call(void 0, {
|
|
242
242
|
cwd: workspacePath,
|
|
243
243
|
packageJson: true,
|
|
244
244
|
name: fileName,
|
|
245
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
245
|
+
envName: _optionalChain([fileName, 'optionalAccess', _24 => _24.toUpperCase, 'call', _25 => _25()]),
|
|
246
246
|
jitiOptions: {
|
|
247
247
|
debug: false,
|
|
248
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
248
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkRHDQ3DQNcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
249
249
|
},
|
|
250
250
|
...options
|
|
251
251
|
}),
|
|
@@ -253,10 +253,10 @@ var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
|
|
|
253
253
|
cwd: workspacePath,
|
|
254
254
|
packageJson: true,
|
|
255
255
|
name: fileName,
|
|
256
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
256
|
+
envName: _optionalChain([fileName, 'optionalAccess', _26 => _26.toUpperCase, 'call', _27 => _27()]),
|
|
257
257
|
jitiOptions: {
|
|
258
258
|
debug: false,
|
|
259
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
259
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkRHDQ3DQNcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
260
260
|
},
|
|
261
261
|
configFile: fileName,
|
|
262
262
|
...options
|
|
@@ -265,21 +265,21 @@ var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
|
|
|
265
265
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
266
266
|
}, "getConfigFileByName");
|
|
267
267
|
var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
268
|
-
const workspacePath = filePath ? filePath :
|
|
268
|
+
const workspacePath = filePath ? filePath : _chunkRHDQ3DQNcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
269
269
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
270
270
|
let config = result.config;
|
|
271
271
|
const configFile = result.configFile;
|
|
272
272
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
273
|
-
|
|
273
|
+
_chunkRHDQ3DQNcjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
274
274
|
logLevel: "all"
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
277
|
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
278
278
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
279
279
|
for (const result2 of results) {
|
|
280
|
-
if (_optionalChain([result2, 'optionalAccess',
|
|
280
|
+
if (_optionalChain([result2, 'optionalAccess', _28 => _28.config]) && _optionalChain([result2, 'optionalAccess', _29 => _29.configFile]) && Object.keys(result2.config).length > 0) {
|
|
281
281
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
282
|
-
|
|
282
|
+
_chunkRHDQ3DQNcjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
283
283
|
logLevel: "all"
|
|
284
284
|
});
|
|
285
285
|
}
|
|
@@ -324,6 +324,10 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
|
|
|
324
324
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
325
325
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
326
326
|
},
|
|
327
|
+
error: {
|
|
328
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
329
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
330
|
+
},
|
|
327
331
|
account: {
|
|
328
332
|
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
329
333
|
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
@@ -341,15 +345,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
|
|
|
341
345
|
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
342
346
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
343
347
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
344
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
345
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
348
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkRHDQ3DQNcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
349
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkRHDQ3DQNcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
346
350
|
directories: {
|
|
347
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
348
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
349
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
350
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
351
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
352
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
351
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkRHDQ3DQNcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
352
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkRHDQ3DQNcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
353
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkRHDQ3DQNcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
354
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkRHDQ3DQNcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
355
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkRHDQ3DQNcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
356
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkRHDQ3DQNcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
353
357
|
},
|
|
354
358
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
355
359
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -372,24 +376,24 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
|
|
|
372
376
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
373
377
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
374
378
|
},
|
|
375
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ?
|
|
379
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunkRHDQ3DQNcjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
376
380
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
377
381
|
};
|
|
378
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
382
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkRHDQ3DQNcjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
379
383
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
380
384
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
381
385
|
return ret;
|
|
382
386
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
383
|
-
if (config.docs ===
|
|
384
|
-
if (config.homepage ===
|
|
385
|
-
config.docs = `${
|
|
387
|
+
if (config.docs === _chunkRHDQ3DQNcjs.STORM_DEFAULT_DOCS) {
|
|
388
|
+
if (config.homepage === _chunkRHDQ3DQNcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
389
|
+
config.docs = `${_chunkRHDQ3DQNcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
386
390
|
} else {
|
|
387
391
|
config.docs = `${config.homepage}/docs`;
|
|
388
392
|
}
|
|
389
393
|
}
|
|
390
|
-
if (config.licensing ===
|
|
391
|
-
if (config.homepage ===
|
|
392
|
-
config.licensing = `${
|
|
394
|
+
if (config.licensing === _chunkRHDQ3DQNcjs.STORM_DEFAULT_LICENSING) {
|
|
395
|
+
if (config.homepage === _chunkRHDQ3DQNcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
396
|
+
config.licensing = `${_chunkRHDQ3DQNcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
393
397
|
} else {
|
|
394
398
|
config.licensing = `${config.homepage}/docs`;
|
|
395
399
|
}
|
|
@@ -463,13 +467,13 @@ var getBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(v
|
|
|
463
467
|
var setExtensionEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (extensionName, extension) => {
|
|
464
468
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
465
469
|
if (extension[key]) {
|
|
466
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess',
|
|
470
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _30 => _30.replace, 'call', _31 => _31(/([A-Z])+/g, (input) => input ? _optionalChain([input, 'access', _32 => _32[0], 'optionalAccess', _33 => _33.toUpperCase, 'call', _34 => _34()]) + input.slice(1) : ""), 'access', _35 => _35.split, 'call', _36 => _36(/(?=[A-Z])|[.\-\s_]/), 'access', _37 => _37.map, 'call', _38 => _38((x) => x.toLowerCase())]), () => ( []));
|
|
467
471
|
let extensionKey;
|
|
468
472
|
if (result.length === 0) {
|
|
469
473
|
return;
|
|
470
474
|
}
|
|
471
475
|
if (result.length === 1) {
|
|
472
|
-
extensionKey = _nullishCoalesce(_optionalChain([result, 'access',
|
|
476
|
+
extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _39 => _39[0], 'optionalAccess', _40 => _40.toUpperCase, 'call', _41 => _41()]), () => ( ""));
|
|
473
477
|
} else {
|
|
474
478
|
extensionKey = result.reduce((ret, part) => {
|
|
475
479
|
return `${ret}_${part.toLowerCase()}`;
|
|
@@ -497,6 +501,10 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
|
|
|
497
501
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
498
502
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
499
503
|
}
|
|
504
|
+
if (config.error) {
|
|
505
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
506
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
507
|
+
}
|
|
500
508
|
if (config.release) {
|
|
501
509
|
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
502
510
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
@@ -555,31 +563,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
|
|
|
555
563
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
556
564
|
}
|
|
557
565
|
if (config.configFile) {
|
|
558
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
566
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkRHDQ3DQNcjs.correctPaths.call(void 0, config.configFile);
|
|
559
567
|
}
|
|
560
568
|
if (config.workspaceRoot) {
|
|
561
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
562
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
563
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
569
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkRHDQ3DQNcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
570
|
+
process.env.NX_WORKSPACE_ROOT = _chunkRHDQ3DQNcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
571
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkRHDQ3DQNcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
564
572
|
}
|
|
565
573
|
if (config.directories) {
|
|
566
574
|
if (!config.skipCache && config.directories.cache) {
|
|
567
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
575
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkRHDQ3DQNcjs.correctPaths.call(void 0, config.directories.cache);
|
|
568
576
|
}
|
|
569
577
|
if (config.directories.data) {
|
|
570
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
578
|
+
process.env[`${prefix}DATA_DIR`] = _chunkRHDQ3DQNcjs.correctPaths.call(void 0, config.directories.data);
|
|
571
579
|
}
|
|
572
580
|
if (config.directories.config) {
|
|
573
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
581
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkRHDQ3DQNcjs.correctPaths.call(void 0, config.directories.config);
|
|
574
582
|
}
|
|
575
583
|
if (config.directories.temp) {
|
|
576
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
584
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkRHDQ3DQNcjs.correctPaths.call(void 0, config.directories.temp);
|
|
577
585
|
}
|
|
578
586
|
if (config.directories.log) {
|
|
579
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
587
|
+
process.env[`${prefix}LOG_DIR`] = _chunkRHDQ3DQNcjs.correctPaths.call(void 0, config.directories.log);
|
|
580
588
|
}
|
|
581
589
|
if (config.directories.build) {
|
|
582
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
590
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkRHDQ3DQNcjs.correctPaths.call(void 0, config.directories.build);
|
|
583
591
|
}
|
|
584
592
|
}
|
|
585
593
|
if (config.skipCache !== void 0) {
|
|
@@ -594,7 +602,7 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
|
|
|
594
602
|
process.env.NODE_ENV = config.mode;
|
|
595
603
|
process.env.ENVIRONMENT = config.mode;
|
|
596
604
|
}
|
|
597
|
-
if (_optionalChain([config, 'access',
|
|
605
|
+
if (_optionalChain([config, 'access', _42 => _42.colors, 'optionalAccess', _43 => _43.base, 'optionalAccess', _44 => _44.light]) || _optionalChain([config, 'access', _45 => _45.colors, 'optionalAccess', _46 => _46.base, 'optionalAccess', _47 => _47.dark])) {
|
|
598
606
|
for (const key of Object.keys(config.colors)) {
|
|
599
607
|
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
600
608
|
}
|
|
@@ -627,14 +635,14 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
|
|
|
627
635
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
|
|
628
636
|
}
|
|
629
637
|
if (config.registry.container) {
|
|
630
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.
|
|
638
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
|
|
631
639
|
}
|
|
632
640
|
}
|
|
633
641
|
if (config.logLevel) {
|
|
634
642
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
635
643
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
636
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
637
|
-
process.env.RUST_BACKTRACE =
|
|
644
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunkRHDQ3DQNcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkRHDQ3DQNcjs.LogLevel.DEBUG ? true : false);
|
|
645
|
+
process.env.RUST_BACKTRACE = _chunkRHDQ3DQNcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkRHDQ3DQNcjs.LogLevel.DEBUG ? "full" : "none";
|
|
638
646
|
}
|
|
639
647
|
if (config.skipConfigLogging !== void 0) {
|
|
640
648
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
@@ -647,7 +655,7 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
|
|
|
647
655
|
}
|
|
648
656
|
}, "setConfigEnv");
|
|
649
657
|
var setThemeColorConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (prefix, config) => {
|
|
650
|
-
return _optionalChain([config, 'optionalAccess',
|
|
658
|
+
return _optionalChain([config, 'optionalAccess', _48 => _48.light, 'optionalAccess', _49 => _49.brand]) || _optionalChain([config, 'optionalAccess', _50 => _50.dark, 'optionalAccess', _51 => _51.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
651
659
|
}, "setThemeColorConfigEnv");
|
|
652
660
|
var setSingleThemeColorConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (prefix, config) => {
|
|
653
661
|
if (config.dark) {
|
|
@@ -747,22 +755,22 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(v
|
|
|
747
755
|
// ../config-tools/src/create-storm-config.ts
|
|
748
756
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
749
757
|
var _static_cache = void 0;
|
|
750
|
-
var
|
|
758
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
751
759
|
let result;
|
|
752
|
-
if (!_optionalChain([_static_cache, 'optionalAccess',
|
|
760
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _52 => _52.data]) || !_optionalChain([_static_cache, 'optionalAccess', _53 => _53.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
753
761
|
let _workspaceRoot = workspaceRoot;
|
|
754
762
|
if (!_workspaceRoot) {
|
|
755
|
-
_workspaceRoot =
|
|
763
|
+
_workspaceRoot = _chunkRHDQ3DQNcjs.findWorkspaceRoot.call(void 0, );
|
|
756
764
|
}
|
|
757
765
|
const configEnv = getConfigEnv();
|
|
758
|
-
const defaultConfig = await
|
|
766
|
+
const defaultConfig = await _chunkRHDQ3DQNcjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
759
767
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
760
768
|
if (!configFile && !skipLogs) {
|
|
761
|
-
|
|
769
|
+
_chunkRHDQ3DQNcjs.writeWarning.call(void 0, "No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
762
770
|
logLevel: "all"
|
|
763
771
|
});
|
|
764
772
|
}
|
|
765
|
-
result = await
|
|
773
|
+
result = await _chunkRHDQ3DQNcjs.stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
766
774
|
result.workspaceRoot ??= _workspaceRoot;
|
|
767
775
|
} else {
|
|
768
776
|
result = _static_cache.data;
|
|
@@ -778,7 +786,7 @@ var createStormConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, as
|
|
|
778
786
|
data: result
|
|
779
787
|
};
|
|
780
788
|
return result;
|
|
781
|
-
}, "
|
|
789
|
+
}, "createStormWorkspaceConfig");
|
|
782
790
|
var createConfigExtension = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (extensionName, schema) => {
|
|
783
791
|
const extension_cache_key = {
|
|
784
792
|
extensionName
|
|
@@ -793,25 +801,25 @@ var createConfigExtension = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0
|
|
|
793
801
|
_extension_cache.set(extension_cache_key, extension);
|
|
794
802
|
return extension;
|
|
795
803
|
}, "createConfigExtension");
|
|
796
|
-
var
|
|
797
|
-
const config = await
|
|
804
|
+
var loadStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
|
|
805
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
798
806
|
setConfigEnv(config);
|
|
799
807
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
800
|
-
|
|
801
|
-
${
|
|
808
|
+
_chunkRHDQ3DQNcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
809
|
+
${_chunkRHDQ3DQNcjs.formatLogMessage.call(void 0, config)}`, config);
|
|
802
810
|
}
|
|
803
811
|
return config;
|
|
804
|
-
}, "
|
|
812
|
+
}, "loadStormWorkspaceConfig");
|
|
805
813
|
|
|
806
814
|
// ../config-tools/src/get-config.ts
|
|
807
815
|
var getConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (workspaceRoot, skipLogs = false) => {
|
|
808
|
-
return
|
|
816
|
+
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
809
817
|
}, "getConfig");
|
|
810
818
|
|
|
811
819
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
812
820
|
|
|
813
821
|
var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
814
|
-
const workspaceRoot = config.workspaceRoot ||
|
|
822
|
+
const workspaceRoot = config.workspaceRoot || _chunkRHDQ3DQNcjs.findWorkspaceRoot.call(void 0, );
|
|
815
823
|
const entryPoints = [];
|
|
816
824
|
if (entry) {
|
|
817
825
|
if (typeof entry === "string") {
|
|
@@ -823,7 +831,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
823
831
|
}
|
|
824
832
|
}
|
|
825
833
|
if (emitOnAll) {
|
|
826
|
-
entryPoints.push(
|
|
834
|
+
entryPoints.push(_chunkRHDQ3DQNcjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
827
835
|
}
|
|
828
836
|
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
829
837
|
const paths = [];
|
|
@@ -835,9 +843,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
835
843
|
]
|
|
836
844
|
});
|
|
837
845
|
paths.push(...files.reduce((ret, filePath) => {
|
|
838
|
-
const result =
|
|
846
|
+
const result = _chunkRHDQ3DQNcjs.correctPaths.call(void 0, _chunkRHDQ3DQNcjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkRHDQ3DQNcjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkRHDQ3DQNcjs.correctPaths.call(void 0, projectRoot), ""));
|
|
839
847
|
if (result) {
|
|
840
|
-
|
|
848
|
+
_chunkRHDQ3DQNcjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkRHDQ3DQNcjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
841
849
|
if (!paths.includes(result)) {
|
|
842
850
|
paths.push(result);
|
|
843
851
|
}
|
|
@@ -845,7 +853,10 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
845
853
|
return ret;
|
|
846
854
|
}, []));
|
|
847
855
|
} else {
|
|
848
|
-
|
|
856
|
+
_chunkRHDQ3DQNcjs.writeDebug.call(void 0, `Trying to add entry point ${entryPoint}"`, config);
|
|
857
|
+
if (!paths.includes(entryPoint)) {
|
|
858
|
+
paths.push(entryPoint);
|
|
859
|
+
}
|
|
849
860
|
}
|
|
850
861
|
return paths;
|
|
851
862
|
}));
|
|
@@ -893,12 +904,12 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
893
904
|
throw new Error("Cannot find Nx workspace root");
|
|
894
905
|
}
|
|
895
906
|
const config = await getConfig(workspaceRoot.dir);
|
|
896
|
-
|
|
897
|
-
const stopwatch =
|
|
907
|
+
_chunkRHDQ3DQNcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
908
|
+
const stopwatch = _chunkRHDQ3DQNcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
898
909
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
899
910
|
exitOnError: true
|
|
900
911
|
});
|
|
901
|
-
const projectJsonPath =
|
|
912
|
+
const projectJsonPath = _chunkRHDQ3DQNcjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
|
|
902
913
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
903
914
|
throw new Error("Cannot find project.json configuration");
|
|
904
915
|
}
|
|
@@ -906,13 +917,13 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
906
917
|
const projectJson = JSON.parse(projectJsonFile);
|
|
907
918
|
const projectName = projectJson.name;
|
|
908
919
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
909
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
920
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _54 => _54.projects, 'optionalAccess', _55 => _55[projectName]])) {
|
|
910
921
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
911
922
|
}
|
|
912
923
|
const options = _defu2.default.call(void 0, userOptions, _chunkDEWYQH4Bcjs.DEFAULT_BUILD_OPTIONS);
|
|
913
924
|
options.name ??= `${projectName}-${options.format}`;
|
|
914
925
|
options.target ??= DEFAULT_TARGET;
|
|
915
|
-
const packageJsonPath =
|
|
926
|
+
const packageJsonPath = _chunkRHDQ3DQNcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
916
927
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
917
928
|
throw new Error("Cannot find package.json configuration");
|
|
918
929
|
}
|
|
@@ -921,20 +932,20 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
921
932
|
...options,
|
|
922
933
|
config,
|
|
923
934
|
...userOptions,
|
|
924
|
-
tsconfig:
|
|
935
|
+
tsconfig: _chunkRHDQ3DQNcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
925
936
|
format: options.format || "cjs",
|
|
926
937
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
927
938
|
"./src/index.ts"
|
|
928
939
|
], userOptions.emitOnAll),
|
|
929
|
-
outdir: userOptions.outputPath ||
|
|
940
|
+
outdir: userOptions.outputPath || _chunkRHDQ3DQNcjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
930
941
|
plugins: [],
|
|
931
942
|
name: userOptions.name || projectName,
|
|
932
943
|
projectConfigurations,
|
|
933
944
|
projectName,
|
|
934
945
|
projectGraph,
|
|
935
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
946
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkRHDQ3DQNcjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
936
947
|
minify: userOptions.minify || !userOptions.debug,
|
|
937
|
-
verbose: userOptions.verbose ||
|
|
948
|
+
verbose: userOptions.verbose || _chunkRHDQ3DQNcjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
938
949
|
includeSrc: userOptions.includeSrc === true,
|
|
939
950
|
metafile: userOptions.metafile !== false,
|
|
940
951
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -968,14 +979,14 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
968
979
|
return result;
|
|
969
980
|
}, "resolveOptions");
|
|
970
981
|
async function generatePackageJson(options) {
|
|
971
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
972
|
-
|
|
973
|
-
const stopwatch =
|
|
974
|
-
const packageJsonPath =
|
|
982
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkRHDQ3DQNcjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
983
|
+
_chunkRHDQ3DQNcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
984
|
+
const stopwatch = _chunkRHDQ3DQNcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
985
|
+
const packageJsonPath = _chunkRHDQ3DQNcjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
975
986
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
976
987
|
throw new Error("Cannot find package.json configuration");
|
|
977
988
|
}
|
|
978
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
989
|
+
const packageJsonFile = await _promises2.default.readFile(_chunkRHDQ3DQNcjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
979
990
|
if (!packageJsonFile) {
|
|
980
991
|
throw new Error("Cannot find package.json configuration file");
|
|
981
992
|
}
|
|
@@ -1014,15 +1025,15 @@ async function generatePackageJson(options) {
|
|
|
1014
1025
|
}
|
|
1015
1026
|
return ret;
|
|
1016
1027
|
}, packageJson.exports);
|
|
1017
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1028
|
+
await _devkit.writeJsonFile.call(void 0, _chunkRHDQ3DQNcjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
1018
1029
|
stopwatch();
|
|
1019
1030
|
}
|
|
1020
1031
|
return options;
|
|
1021
1032
|
}
|
|
1022
1033
|
_chunkUSNT2KNTcjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
1023
1034
|
async function executeTSDown(options) {
|
|
1024
|
-
|
|
1025
|
-
const stopwatch =
|
|
1035
|
+
_chunkRHDQ3DQNcjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
1036
|
+
const stopwatch = _chunkRHDQ3DQNcjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1026
1037
|
await _tsdown.build.call(void 0, {
|
|
1027
1038
|
...options,
|
|
1028
1039
|
entry: options.entryPoints,
|
|
@@ -1034,30 +1045,30 @@ async function executeTSDown(options) {
|
|
|
1034
1045
|
}
|
|
1035
1046
|
_chunkUSNT2KNTcjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
1036
1047
|
async function copyBuildAssets(options) {
|
|
1037
|
-
|
|
1038
|
-
const stopwatch =
|
|
1048
|
+
_chunkRHDQ3DQNcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
1049
|
+
const stopwatch = _chunkRHDQ3DQNcjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1039
1050
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.sourceRoot, true, false);
|
|
1040
1051
|
stopwatch();
|
|
1041
1052
|
return options;
|
|
1042
1053
|
}
|
|
1043
1054
|
_chunkUSNT2KNTcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
1044
1055
|
async function reportResults(options) {
|
|
1045
|
-
|
|
1056
|
+
_chunkRHDQ3DQNcjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
1046
1057
|
}
|
|
1047
1058
|
_chunkUSNT2KNTcjs.__name.call(void 0, reportResults, "reportResults");
|
|
1048
1059
|
async function cleanOutputPath(options) {
|
|
1049
1060
|
if (options.clean !== false && options.outdir) {
|
|
1050
|
-
|
|
1051
|
-
const stopwatch =
|
|
1052
|
-
await
|
|
1061
|
+
_chunkRHDQ3DQNcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
|
|
1062
|
+
const stopwatch = _chunkRHDQ3DQNcjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1063
|
+
await _chunkRHDQ3DQNcjs.cleanDirectories.call(void 0, options.name, options.outdir, options.config);
|
|
1053
1064
|
stopwatch();
|
|
1054
1065
|
}
|
|
1055
1066
|
return options;
|
|
1056
1067
|
}
|
|
1057
1068
|
_chunkUSNT2KNTcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1058
1069
|
async function build(options) {
|
|
1059
|
-
|
|
1060
|
-
const stopwatch =
|
|
1070
|
+
_chunkRHDQ3DQNcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1071
|
+
const stopwatch = _chunkRHDQ3DQNcjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1061
1072
|
try {
|
|
1062
1073
|
const opts = Array.isArray(options) ? options : [
|
|
1063
1074
|
options
|
|
@@ -1075,11 +1086,11 @@ async function build(options) {
|
|
|
1075
1086
|
await reportResults(opt);
|
|
1076
1087
|
}));
|
|
1077
1088
|
} else {
|
|
1078
|
-
|
|
1089
|
+
_chunkRHDQ3DQNcjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
1079
1090
|
}
|
|
1080
|
-
|
|
1091
|
+
_chunkRHDQ3DQNcjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1081
1092
|
} catch (error) {
|
|
1082
|
-
|
|
1093
|
+
_chunkRHDQ3DQNcjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
1083
1094
|
throw error;
|
|
1084
1095
|
} finally {
|
|
1085
1096
|
stopwatch();
|
package/dist/clean.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkRHDQ3DQNcjs = require('./chunk-RHDQ3DQN.cjs');
|
|
5
5
|
require('./chunk-USNT2KNT.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.clean =
|
|
9
|
+
exports.clean = _chunkRHDQ3DQNcjs.clean; exports.cleanDirectories = _chunkRHDQ3DQNcjs.cleanDirectories;
|
package/dist/clean.d.cts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StormWorkspaceConfig } from '@storm-software/config';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Clean the TSDown output path
|
|
5
5
|
*
|
|
6
6
|
* @param name - The name of the executor
|
|
7
7
|
* @param directory - The directory to clean
|
|
8
|
-
* @param config - The
|
|
8
|
+
* @param config - The StormWorkspaceConfig object
|
|
9
9
|
*/
|
|
10
|
-
declare function clean(name: string | undefined, directory: string, config?:
|
|
10
|
+
declare function clean(name: string | undefined, directory: string, config?: StormWorkspaceConfig): Promise<void>;
|
|
11
11
|
/**
|
|
12
12
|
* Clean the TSDown output path
|
|
13
13
|
*
|
|
14
14
|
* @param name - The name of the executor
|
|
15
15
|
* @param directory - The directory to clean
|
|
16
|
-
* @param config - The
|
|
16
|
+
* @param config - The StormWorkspaceConfig object
|
|
17
17
|
*/
|
|
18
|
-
declare function cleanDirectories(name: string | undefined, directory: string, config?:
|
|
18
|
+
declare function cleanDirectories(name: string | undefined, directory: string, config?: StormWorkspaceConfig): Promise<void>;
|
|
19
19
|
|
|
20
20
|
export { clean, cleanDirectories };
|
package/dist/clean.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StormWorkspaceConfig } from '@storm-software/config';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Clean the TSDown output path
|
|
5
5
|
*
|
|
6
6
|
* @param name - The name of the executor
|
|
7
7
|
* @param directory - The directory to clean
|
|
8
|
-
* @param config - The
|
|
8
|
+
* @param config - The StormWorkspaceConfig object
|
|
9
9
|
*/
|
|
10
|
-
declare function clean(name: string | undefined, directory: string, config?:
|
|
10
|
+
declare function clean(name: string | undefined, directory: string, config?: StormWorkspaceConfig): Promise<void>;
|
|
11
11
|
/**
|
|
12
12
|
* Clean the TSDown output path
|
|
13
13
|
*
|
|
14
14
|
* @param name - The name of the executor
|
|
15
15
|
* @param directory - The directory to clean
|
|
16
|
-
* @param config - The
|
|
16
|
+
* @param config - The StormWorkspaceConfig object
|
|
17
17
|
*/
|
|
18
|
-
declare function cleanDirectories(name: string | undefined, directory: string, config?:
|
|
18
|
+
declare function cleanDirectories(name: string | undefined, directory: string, config?: StormWorkspaceConfig): Promise<void>;
|
|
19
19
|
|
|
20
20
|
export { clean, cleanDirectories };
|
package/dist/clean.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkWEF5QCAPcjs = require('./chunk-WEF5QCAP.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkRHDQ3DQNcjs = require('./chunk-RHDQ3DQN.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunkDEWYQH4Bcjs = require('./chunk-DEWYQH4B.cjs');
|
|
@@ -17,4 +17,4 @@ require('./chunk-SFZRYJZ2.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
exports.DEFAULT_BUILD_OPTIONS = _chunkDEWYQH4Bcjs.DEFAULT_BUILD_OPTIONS; exports.build =
|
|
20
|
+
exports.DEFAULT_BUILD_OPTIONS = _chunkDEWYQH4Bcjs.DEFAULT_BUILD_OPTIONS; exports.build = _chunkWEF5QCAPcjs.build; exports.clean = _chunkRHDQ3DQNcjs.clean; exports.cleanDirectories = _chunkRHDQ3DQNcjs.cleanDirectories; exports.cleanOutputPath = _chunkWEF5QCAPcjs.cleanOutputPath;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build,
|
|
3
3
|
cleanOutputPath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DE3S3NQO.js";
|
|
5
5
|
import {
|
|
6
6
|
clean,
|
|
7
7
|
cleanDirectories
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MZ443ZDH.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_BUILD_OPTIONS
|
|
11
11
|
} from "./chunk-PR5HLZXS.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/tsdown",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing `tsdown` utilities for building Storm Software libraries and applications",
|
|
6
6
|
"repository": {
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"@nx/js": "20.6.0",
|
|
173
173
|
"@types/node": "^22.10.2",
|
|
174
174
|
"defu": "6.1.4",
|
|
175
|
-
"rollup": "4.29.1",
|
|
175
|
+
"rollup": "^4.29.1",
|
|
176
176
|
"spdx-exceptions": "^2.5.0",
|
|
177
177
|
"spdx-license-ids": "^3.0.20",
|
|
178
178
|
"tsdown": "0.5.3"
|