@storm-software/tsdown 0.25.4 → 0.26.0
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 +1 -1
- package/dist/build.cjs +4 -4
- package/dist/build.js +3 -3
- package/dist/{chunk-HHKOI5VG.cjs → chunk-3CBTBP2Q.cjs} +96 -96
- package/dist/{chunk-Q4766PGX.js → chunk-5EZLMSEY.js} +2 -2
- package/dist/{chunk-J6TMG3TT.js → chunk-A2FKBNGG.js} +8 -8
- package/dist/{chunk-5KRF6IVW.cjs → chunk-DEWYQH4B.cjs} +1 -1
- package/dist/{chunk-UQLCBJOS.js → chunk-PR5HLZXS.js} +1 -1
- package/dist/{chunk-Y2EXVHUW.cjs → chunk-WZ5EOU2V.cjs} +2 -2
- package/dist/clean.cjs +2 -2
- package/dist/clean.js +1 -1
- package/dist/config.cjs +2 -2
- package/dist/config.d.cts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.js +3 -3
- package/package.json +2 -6
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
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-
|
|
6
|
-
require('./chunk-
|
|
4
|
+
var _chunk3CBTBP2Qcjs = require('./chunk-3CBTBP2Q.cjs');
|
|
5
|
+
require('./chunk-WZ5EOU2V.cjs');
|
|
6
|
+
require('./chunk-DEWYQH4B.cjs');
|
|
7
7
|
require('./chunk-USNT2KNT.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.build =
|
|
11
|
+
exports.build = _chunk3CBTBP2Qcjs.build; exports.cleanOutputPath = _chunk3CBTBP2Qcjs.cleanOutputPath;
|
package/dist/build.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build,
|
|
3
3
|
cleanOutputPath
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-A2FKBNGG.js";
|
|
5
|
+
import "./chunk-5EZLMSEY.js";
|
|
6
|
+
import "./chunk-PR5HLZXS.js";
|
|
7
7
|
import "./chunk-SHUYVCID.js";
|
|
8
8
|
export {
|
|
9
9
|
build,
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkWZ5EOU2Vcjs = require('./chunk-WZ5EOU2V.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkDEWYQH4Bcjs = require('./chunk-DEWYQH4B.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.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
|
+
_chunkWZ5EOU2Vcjs.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} -> ${_chunkWZ5EOU2Vcjs.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
|
+
_chunkWZ5EOU2Vcjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkWZ5EOU2Vcjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
93
93
|
const files = await _glob.glob.call(void 0, [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
_chunkWZ5EOU2Vcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
95
|
+
_chunkWZ5EOU2Vcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
96
|
+
_chunkWZ5EOU2Vcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
97
|
+
_chunkWZ5EOU2Vcjs.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" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
|
|
118
118
|
const projectNode = project.node;
|
|
119
119
|
if (projectNode.data.root) {
|
|
120
|
-
const projectPackageJsonPath =
|
|
120
|
+
const projectPackageJsonPath = _chunkWZ5EOU2Vcjs.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
|
+
_chunkWZ5EOU2Vcjs.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, _chunkWZ5EOU2Vcjs.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', _3 => _3.projects, 'optionalAccess', _4 => _4[projectName2], 'access', _5 => _5.implicitDependencies, 'optionalAccess', _6 => _6.reduce, 'call', _7 => _7((ret, dep) => {
|
|
140
140
|
if (_optionalChain([projectConfigurations, 'access', _8 => _8.projects, 'optionalAccess', _9 => _9[dep]])) {
|
|
141
|
-
const depPackageJsonPath =
|
|
141
|
+
const depPackageJsonPath = _chunkWZ5EOU2Vcjs.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);
|
|
@@ -162,13 +162,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
|
|
|
162
162
|
return ret;
|
|
163
163
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
164
164
|
} else {
|
|
165
|
-
|
|
165
|
+
_chunkWZ5EOU2Vcjs.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 : _chunkWZ5EOU2Vcjs.findWorkspaceRoot.call(void 0, );
|
|
171
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkWZ5EOU2Vcjs.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 ??= `${_chunkWZ5EOU2Vcjs.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 : _chunkWZ5EOU2Vcjs.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,7 +236,7 @@ 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 || _chunkWZ5EOU2Vcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
240
240
|
const configs = await Promise.all([
|
|
241
241
|
_c12.loadConfig.call(void 0, {
|
|
242
242
|
cwd: workspacePath,
|
|
@@ -245,7 +245,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
|
|
|
245
245
|
envName: _optionalChain([fileName, 'optionalAccess', _14 => _14.toUpperCase, 'call', _15 => _15()]),
|
|
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 : _chunkWZ5EOU2Vcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
249
249
|
},
|
|
250
250
|
...options
|
|
251
251
|
}),
|
|
@@ -256,7 +256,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
|
|
|
256
256
|
envName: _optionalChain([fileName, 'optionalAccess', _16 => _16.toUpperCase, 'call', _17 => _17()]),
|
|
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 : _chunkWZ5EOU2Vcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
260
260
|
},
|
|
261
261
|
configFile: fileName,
|
|
262
262
|
...options
|
|
@@ -265,12 +265,12 @@ 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 : _chunkWZ5EOU2Vcjs.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
|
+
_chunkWZ5EOU2Vcjs.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
|
}
|
|
@@ -279,7 +279,7 @@ var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
279
279
|
for (const result2 of results) {
|
|
280
280
|
if (_optionalChain([result2, 'optionalAccess', _18 => _18.config]) && _optionalChain([result2, 'optionalAccess', _19 => _19.configFile]) && Object.keys(result2.config).length > 0) {
|
|
281
281
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
282
|
-
|
|
282
|
+
_chunkWZ5EOU2Vcjs.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
|
}
|
|
@@ -327,18 +327,18 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
|
|
|
327
327
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
328
328
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
329
329
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
330
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
331
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
330
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
331
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
332
332
|
directories: {
|
|
333
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
334
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
335
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
336
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
337
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
338
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
333
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
334
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
335
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
336
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
337
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
338
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
339
339
|
},
|
|
340
340
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
341
|
-
|
|
341
|
+
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
342
342
|
// ci:
|
|
343
343
|
// process.env[`${prefix}CI`] !== undefined
|
|
344
344
|
// ? Boolean(
|
|
@@ -358,24 +358,24 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
|
|
|
358
358
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
359
359
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
360
360
|
},
|
|
361
|
-
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`])) ?
|
|
361
|
+
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`])) ? _chunkWZ5EOU2Vcjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
362
362
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
363
363
|
};
|
|
364
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
364
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkWZ5EOU2Vcjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
365
365
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
366
366
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
367
367
|
return ret;
|
|
368
368
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
369
|
-
if (config.docs ===
|
|
370
|
-
if (config.homepage ===
|
|
371
|
-
config.docs = `${
|
|
369
|
+
if (config.docs === _chunkWZ5EOU2Vcjs.STORM_DEFAULT_DOCS) {
|
|
370
|
+
if (config.homepage === _chunkWZ5EOU2Vcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
371
|
+
config.docs = `${_chunkWZ5EOU2Vcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
372
372
|
} else {
|
|
373
373
|
config.docs = `${config.homepage}/docs`;
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
if (config.licensing ===
|
|
377
|
-
if (config.homepage ===
|
|
378
|
-
config.licensing = `${
|
|
376
|
+
if (config.licensing === _chunkWZ5EOU2Vcjs.STORM_DEFAULT_LICENSING) {
|
|
377
|
+
if (config.homepage === _chunkWZ5EOU2Vcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
378
|
+
config.licensing = `${_chunkWZ5EOU2Vcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
379
379
|
} else {
|
|
380
380
|
config.licensing = `${config.homepage}/docs`;
|
|
381
381
|
}
|
|
@@ -513,31 +513,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
|
|
|
513
513
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
514
514
|
}
|
|
515
515
|
if (config.configFile) {
|
|
516
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
516
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, config.configFile);
|
|
517
517
|
}
|
|
518
518
|
if (config.workspaceRoot) {
|
|
519
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
520
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
521
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
519
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
520
|
+
process.env.NX_WORKSPACE_ROOT = _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
521
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
522
522
|
}
|
|
523
523
|
if (config.directories) {
|
|
524
524
|
if (!config.skipCache && config.directories.cache) {
|
|
525
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
525
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, config.directories.cache);
|
|
526
526
|
}
|
|
527
527
|
if (config.directories.data) {
|
|
528
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
528
|
+
process.env[`${prefix}DATA_DIR`] = _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, config.directories.data);
|
|
529
529
|
}
|
|
530
530
|
if (config.directories.config) {
|
|
531
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
531
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, config.directories.config);
|
|
532
532
|
}
|
|
533
533
|
if (config.directories.temp) {
|
|
534
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
534
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, config.directories.temp);
|
|
535
535
|
}
|
|
536
536
|
if (config.directories.log) {
|
|
537
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
537
|
+
process.env[`${prefix}LOG_DIR`] = _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, config.directories.log);
|
|
538
538
|
}
|
|
539
539
|
if (config.directories.build) {
|
|
540
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
540
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, config.directories.build);
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
if (config.skipCache !== void 0) {
|
|
@@ -547,10 +547,10 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
|
|
|
547
547
|
process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
if (config.
|
|
551
|
-
process.env[`${prefix}
|
|
552
|
-
process.env.NODE_ENV = config.
|
|
553
|
-
process.env.ENVIRONMENT = config.
|
|
550
|
+
if (config.mode) {
|
|
551
|
+
process.env[`${prefix}MODE`] = config.mode;
|
|
552
|
+
process.env.NODE_ENV = config.mode;
|
|
553
|
+
process.env.ENVIRONMENT = config.mode;
|
|
554
554
|
}
|
|
555
555
|
if (_optionalChain([config, 'access', _32 => _32.colors, 'optionalAccess', _33 => _33.base, 'optionalAccess', _34 => _34.light]) || _optionalChain([config, 'access', _35 => _35.colors, 'optionalAccess', _36 => _36.base, 'optionalAccess', _37 => _37.dark])) {
|
|
556
556
|
for (const key of Object.keys(config.colors)) {
|
|
@@ -591,8 +591,8 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
|
|
|
591
591
|
if (config.logLevel) {
|
|
592
592
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
593
593
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
594
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
595
|
-
process.env.RUST_BACKTRACE =
|
|
594
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunkWZ5EOU2Vcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkWZ5EOU2Vcjs.LogLevel.DEBUG ? true : false);
|
|
595
|
+
process.env.RUST_BACKTRACE = _chunkWZ5EOU2Vcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkWZ5EOU2Vcjs.LogLevel.DEBUG ? "full" : "none";
|
|
596
596
|
}
|
|
597
597
|
if (config.skipConfigLogging !== void 0) {
|
|
598
598
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
@@ -708,17 +708,17 @@ var createStormConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, as
|
|
|
708
708
|
if (!_optionalChain([_static_cache, 'optionalAccess', _42 => _42.data]) || !_optionalChain([_static_cache, 'optionalAccess', _43 => _43.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
709
709
|
let _workspaceRoot = workspaceRoot;
|
|
710
710
|
if (!_workspaceRoot) {
|
|
711
|
-
_workspaceRoot =
|
|
711
|
+
_workspaceRoot = _chunkWZ5EOU2Vcjs.findWorkspaceRoot.call(void 0, );
|
|
712
712
|
}
|
|
713
713
|
const configEnv = getConfigEnv();
|
|
714
|
-
const defaultConfig = await
|
|
714
|
+
const defaultConfig = await _chunkWZ5EOU2Vcjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
715
715
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
716
716
|
if (!configFile && !skipLogs) {
|
|
717
|
-
|
|
717
|
+
_chunkWZ5EOU2Vcjs.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", {
|
|
718
718
|
logLevel: "all"
|
|
719
719
|
});
|
|
720
720
|
}
|
|
721
|
-
result = await
|
|
721
|
+
result = await _chunkWZ5EOU2Vcjs.StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
722
722
|
result.workspaceRoot ??= _workspaceRoot;
|
|
723
723
|
} else {
|
|
724
724
|
result = _static_cache.data;
|
|
@@ -753,8 +753,8 @@ var loadStormConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, asyn
|
|
|
753
753
|
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
754
754
|
setConfigEnv(config);
|
|
755
755
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
756
|
-
|
|
757
|
-
${
|
|
756
|
+
_chunkWZ5EOU2Vcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
757
|
+
${_chunkWZ5EOU2Vcjs.formatLogMessage.call(void 0, config)}`, config);
|
|
758
758
|
}
|
|
759
759
|
return config;
|
|
760
760
|
}, "loadStormConfig");
|
|
@@ -767,7 +767,7 @@ var getConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (workspace
|
|
|
767
767
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
768
768
|
|
|
769
769
|
var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
770
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
770
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkWZ5EOU2Vcjs.findWorkspaceRoot.call(void 0, );
|
|
771
771
|
const entryPoints = [];
|
|
772
772
|
if (entry) {
|
|
773
773
|
if (Array.isArray(entry)) {
|
|
@@ -779,7 +779,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
781
|
if (emitOnAll) {
|
|
782
|
-
entryPoints.push(
|
|
782
|
+
entryPoints.push(_chunkWZ5EOU2Vcjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
783
783
|
}
|
|
784
784
|
const results = [];
|
|
785
785
|
for (const entryPoint in entryPoints) {
|
|
@@ -788,9 +788,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
788
788
|
withFileTypes: true
|
|
789
789
|
});
|
|
790
790
|
results.push(...files.reduce((ret, filePath) => {
|
|
791
|
-
const result =
|
|
791
|
+
const result = _chunkWZ5EOU2Vcjs.correctPaths.call(void 0, _chunkWZ5EOU2Vcjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkWZ5EOU2Vcjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkWZ5EOU2Vcjs.correctPaths.call(void 0, projectRoot), ""));
|
|
792
792
|
if (result) {
|
|
793
|
-
|
|
793
|
+
_chunkWZ5EOU2Vcjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkWZ5EOU2Vcjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
794
794
|
if (!results.includes(result)) {
|
|
795
795
|
results.push(result);
|
|
796
796
|
}
|
|
@@ -810,7 +810,7 @@ var getEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (builder, opt
|
|
|
810
810
|
STORM_BUILD: builder,
|
|
811
811
|
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
812
812
|
STORM_NAME: options.name,
|
|
813
|
-
|
|
813
|
+
STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
|
|
814
814
|
STORM_PLATFORM: options.platform,
|
|
815
815
|
STORM_FORMAT: JSON.stringify(options.format),
|
|
816
816
|
STORM_TARGET: JSON.stringify(options.target),
|
|
@@ -838,12 +838,12 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
838
838
|
throw new Error("Cannot find Nx workspace root");
|
|
839
839
|
}
|
|
840
840
|
const config = await getConfig(workspaceRoot.dir);
|
|
841
|
-
|
|
842
|
-
const stopwatch =
|
|
841
|
+
_chunkWZ5EOU2Vcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
842
|
+
const stopwatch = _chunkWZ5EOU2Vcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
843
843
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
844
844
|
exitOnError: true
|
|
845
845
|
});
|
|
846
|
-
const projectJsonPath =
|
|
846
|
+
const projectJsonPath = _chunkWZ5EOU2Vcjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
|
|
847
847
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
848
848
|
throw new Error("Cannot find project.json configuration");
|
|
849
849
|
}
|
|
@@ -854,10 +854,10 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
854
854
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _44 => _44.projects, 'optionalAccess', _45 => _45[projectName]])) {
|
|
855
855
|
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.");
|
|
856
856
|
}
|
|
857
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
857
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkDEWYQH4Bcjs.DEFAULT_BUILD_OPTIONS);
|
|
858
858
|
options.name ??= `${projectName}-${options.format}`;
|
|
859
859
|
options.target ??= DEFAULT_TARGET;
|
|
860
|
-
const packageJsonPath =
|
|
860
|
+
const packageJsonPath = _chunkWZ5EOU2Vcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
861
861
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
862
862
|
throw new Error("Cannot find package.json configuration");
|
|
863
863
|
}
|
|
@@ -866,20 +866,20 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
866
866
|
...options,
|
|
867
867
|
config,
|
|
868
868
|
...userOptions,
|
|
869
|
-
tsconfig:
|
|
869
|
+
tsconfig: _chunkWZ5EOU2Vcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
870
870
|
format: options.format || "cjs",
|
|
871
871
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
872
872
|
"./src/index.ts"
|
|
873
873
|
], userOptions.emitOnAll),
|
|
874
|
-
outdir: userOptions.outputPath ||
|
|
874
|
+
outdir: userOptions.outputPath || _chunkWZ5EOU2Vcjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
875
875
|
plugins: [],
|
|
876
876
|
name: userOptions.name || projectName,
|
|
877
877
|
projectConfigurations,
|
|
878
878
|
projectName,
|
|
879
879
|
projectGraph,
|
|
880
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
880
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkWZ5EOU2Vcjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
881
881
|
minify: userOptions.minify || !userOptions.debug,
|
|
882
|
-
verbose: userOptions.verbose ||
|
|
882
|
+
verbose: userOptions.verbose || _chunkWZ5EOU2Vcjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
883
883
|
includeSrc: userOptions.includeSrc === true,
|
|
884
884
|
metafile: userOptions.metafile !== false,
|
|
885
885
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -913,14 +913,14 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
913
913
|
return result;
|
|
914
914
|
}, "resolveOptions");
|
|
915
915
|
async function generatePackageJson(options) {
|
|
916
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
917
|
-
|
|
918
|
-
const stopwatch =
|
|
919
|
-
const packageJsonPath =
|
|
916
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkWZ5EOU2Vcjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
917
|
+
_chunkWZ5EOU2Vcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
918
|
+
const stopwatch = _chunkWZ5EOU2Vcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
919
|
+
const packageJsonPath = _chunkWZ5EOU2Vcjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
920
920
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
921
921
|
throw new Error("Cannot find package.json configuration");
|
|
922
922
|
}
|
|
923
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
923
|
+
const packageJsonFile = await _promises2.default.readFile(_chunkWZ5EOU2Vcjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
924
924
|
if (!packageJsonFile) {
|
|
925
925
|
throw new Error("Cannot find package.json configuration file");
|
|
926
926
|
}
|
|
@@ -959,15 +959,15 @@ async function generatePackageJson(options) {
|
|
|
959
959
|
}
|
|
960
960
|
return ret;
|
|
961
961
|
}, packageJson.exports);
|
|
962
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
962
|
+
await _devkit.writeJsonFile.call(void 0, _chunkWZ5EOU2Vcjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
963
963
|
stopwatch();
|
|
964
964
|
}
|
|
965
965
|
return options;
|
|
966
966
|
}
|
|
967
967
|
_chunkUSNT2KNTcjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
968
968
|
async function executeTSDown(options) {
|
|
969
|
-
|
|
970
|
-
const stopwatch =
|
|
969
|
+
_chunkWZ5EOU2Vcjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
970
|
+
const stopwatch = _chunkWZ5EOU2Vcjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
971
971
|
await _tsdown.build.call(void 0, {
|
|
972
972
|
...options,
|
|
973
973
|
entry: options.entryPoints,
|
|
@@ -979,30 +979,30 @@ async function executeTSDown(options) {
|
|
|
979
979
|
}
|
|
980
980
|
_chunkUSNT2KNTcjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
981
981
|
async function copyBuildAssets(options) {
|
|
982
|
-
|
|
983
|
-
const stopwatch =
|
|
982
|
+
_chunkWZ5EOU2Vcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
983
|
+
const stopwatch = _chunkWZ5EOU2Vcjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
984
984
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.sourceRoot, true, false);
|
|
985
985
|
stopwatch();
|
|
986
986
|
return options;
|
|
987
987
|
}
|
|
988
988
|
_chunkUSNT2KNTcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
989
989
|
async function reportResults(options) {
|
|
990
|
-
|
|
990
|
+
_chunkWZ5EOU2Vcjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
991
991
|
}
|
|
992
992
|
_chunkUSNT2KNTcjs.__name.call(void 0, reportResults, "reportResults");
|
|
993
993
|
async function cleanOutputPath(options) {
|
|
994
994
|
if (options.clean !== false && options.outdir) {
|
|
995
|
-
|
|
996
|
-
const stopwatch =
|
|
997
|
-
await
|
|
995
|
+
_chunkWZ5EOU2Vcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
|
|
996
|
+
const stopwatch = _chunkWZ5EOU2Vcjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
997
|
+
await _chunkWZ5EOU2Vcjs.cleanDirectories.call(void 0, options.name, options.outdir, options.config);
|
|
998
998
|
stopwatch();
|
|
999
999
|
}
|
|
1000
1000
|
return options;
|
|
1001
1001
|
}
|
|
1002
1002
|
_chunkUSNT2KNTcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1003
1003
|
async function build(options) {
|
|
1004
|
-
|
|
1005
|
-
const stopwatch =
|
|
1004
|
+
_chunkWZ5EOU2Vcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1005
|
+
const stopwatch = _chunkWZ5EOU2Vcjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1006
1006
|
try {
|
|
1007
1007
|
const opts = Array.isArray(options) ? options : [
|
|
1008
1008
|
options
|
|
@@ -1020,11 +1020,11 @@ async function build(options) {
|
|
|
1020
1020
|
await reportResults(opt);
|
|
1021
1021
|
}));
|
|
1022
1022
|
} else {
|
|
1023
|
-
|
|
1023
|
+
_chunkWZ5EOU2Vcjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
1024
1024
|
}
|
|
1025
|
-
|
|
1025
|
+
_chunkWZ5EOU2Vcjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1026
1026
|
} catch (error) {
|
|
1027
|
-
|
|
1027
|
+
_chunkWZ5EOU2Vcjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1028
1028
|
throw error;
|
|
1029
1029
|
} finally {
|
|
1030
1030
|
stopwatch();
|
|
@@ -144,11 +144,11 @@ var StormConfigSchema = z.object({
|
|
|
144
144
|
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
145
145
|
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
146
146
|
bot: WorkspaceBotConfigSchema,
|
|
147
|
-
|
|
147
|
+
mode: z.enum([
|
|
148
148
|
"development",
|
|
149
149
|
"staging",
|
|
150
150
|
"production"
|
|
151
|
-
]).default("production").describe("The current runtime environment
|
|
151
|
+
]).default("production").describe("The current runtime environment mode for the package"),
|
|
152
152
|
workspaceRoot: z.string().trim().default("").describe("The root directory of the workspace"),
|
|
153
153
|
externalPackagePatterns: z.array(z.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
154
154
|
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
writeSuccess,
|
|
21
21
|
writeTrace,
|
|
22
22
|
writeWarning
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-5EZLMSEY.js";
|
|
24
24
|
import {
|
|
25
25
|
DEFAULT_BUILD_OPTIONS
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-PR5HLZXS.js";
|
|
27
27
|
import {
|
|
28
28
|
__name
|
|
29
29
|
} from "./chunk-SHUYVCID.js";
|
|
@@ -338,7 +338,7 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
338
338
|
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
339
339
|
},
|
|
340
340
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
341
|
-
|
|
341
|
+
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
342
342
|
// ci:
|
|
343
343
|
// process.env[`${prefix}CI`] !== undefined
|
|
344
344
|
// ? Boolean(
|
|
@@ -547,10 +547,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
547
547
|
process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
if (config.
|
|
551
|
-
process.env[`${prefix}
|
|
552
|
-
process.env.NODE_ENV = config.
|
|
553
|
-
process.env.ENVIRONMENT = config.
|
|
550
|
+
if (config.mode) {
|
|
551
|
+
process.env[`${prefix}MODE`] = config.mode;
|
|
552
|
+
process.env.NODE_ENV = config.mode;
|
|
553
|
+
process.env.ENVIRONMENT = config.mode;
|
|
554
554
|
}
|
|
555
555
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
556
556
|
for (const key of Object.keys(config.colors)) {
|
|
@@ -810,7 +810,7 @@ var getEnv = /* @__PURE__ */ __name((builder, options) => {
|
|
|
810
810
|
STORM_BUILD: builder,
|
|
811
811
|
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
812
812
|
STORM_NAME: options.name,
|
|
813
|
-
|
|
813
|
+
STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
|
|
814
814
|
STORM_PLATFORM: options.platform,
|
|
815
815
|
STORM_FORMAT: JSON.stringify(options.format),
|
|
816
816
|
STORM_TARGET: JSON.stringify(options.target),
|
|
@@ -144,11 +144,11 @@ var StormConfigSchema = _zod2.default.object({
|
|
|
144
144
|
preid: _zod2.default.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
145
145
|
owner: _zod2.default.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
146
146
|
bot: WorkspaceBotConfigSchema,
|
|
147
|
-
|
|
147
|
+
mode: _zod2.default.enum([
|
|
148
148
|
"development",
|
|
149
149
|
"staging",
|
|
150
150
|
"production"
|
|
151
|
-
]).default("production").describe("The current runtime environment
|
|
151
|
+
]).default("production").describe("The current runtime environment mode for the package"),
|
|
152
152
|
workspaceRoot: _zod2.default.string().trim().default("").describe("The root directory of the workspace"),
|
|
153
153
|
externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
154
154
|
skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
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 _chunkWZ5EOU2Vcjs = require('./chunk-WZ5EOU2V.cjs');
|
|
5
5
|
require('./chunk-USNT2KNT.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.clean =
|
|
9
|
+
exports.clean = _chunkWZ5EOU2Vcjs.clean; exports.cleanDirectories = _chunkWZ5EOU2Vcjs.cleanDirectories;
|
package/dist/clean.js
CHANGED
package/dist/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkDEWYQH4Bcjs = require('./chunk-DEWYQH4B.cjs');
|
|
4
4
|
require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.DEFAULT_BUILD_OPTIONS =
|
|
7
|
+
exports.DEFAULT_BUILD_OPTIONS = _chunkDEWYQH4Bcjs.DEFAULT_BUILD_OPTIONS;
|
package/dist/config.d.cts
CHANGED
|
@@ -3,6 +3,6 @@ import '@nx/devkit';
|
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
4
|
import 'tsdown';
|
|
5
5
|
|
|
6
|
-
declare const DEFAULT_BUILD_OPTIONS: Required<Pick<TSDownResolvedOptions, "platform" | "target" | "format" | "tsconfig" | "
|
|
6
|
+
declare const DEFAULT_BUILD_OPTIONS: Required<Pick<TSDownResolvedOptions, "platform" | "target" | "format" | "tsconfig" | "mode" | "unused" | "globalName" | "injectShims" | "watch" | "bundle" | "treeshake" | "clean" | "debug">>;
|
|
7
7
|
|
|
8
8
|
export { DEFAULT_BUILD_OPTIONS };
|
package/dist/config.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import '@nx/devkit';
|
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
4
|
import 'tsdown';
|
|
5
5
|
|
|
6
|
-
declare const DEFAULT_BUILD_OPTIONS: Required<Pick<TSDownResolvedOptions, "platform" | "target" | "format" | "tsconfig" | "
|
|
6
|
+
declare const DEFAULT_BUILD_OPTIONS: Required<Pick<TSDownResolvedOptions, "platform" | "target" | "format" | "tsconfig" | "mode" | "unused" | "globalName" | "injectShims" | "watch" | "bundle" | "treeshake" | "clean" | "debug">>;
|
|
7
7
|
|
|
8
8
|
export { DEFAULT_BUILD_OPTIONS };
|
package/dist/config.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk3CBTBP2Qcjs = require('./chunk-3CBTBP2Q.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkWZ5EOU2Vcjs = require('./chunk-WZ5EOU2V.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkDEWYQH4Bcjs = require('./chunk-DEWYQH4B.cjs');
|
|
12
12
|
require('./chunk-USNT2KNT.cjs');
|
|
13
13
|
require('./chunk-SFZRYJZ2.cjs');
|
|
14
14
|
|
|
@@ -17,4 +17,4 @@ require('./chunk-SFZRYJZ2.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
exports.DEFAULT_BUILD_OPTIONS =
|
|
20
|
+
exports.DEFAULT_BUILD_OPTIONS = _chunkDEWYQH4Bcjs.DEFAULT_BUILD_OPTIONS; exports.build = _chunk3CBTBP2Qcjs.build; exports.clean = _chunkWZ5EOU2Vcjs.clean; exports.cleanDirectories = _chunkWZ5EOU2Vcjs.cleanDirectories; exports.cleanOutputPath = _chunk3CBTBP2Qcjs.cleanOutputPath;
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build,
|
|
3
3
|
cleanOutputPath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-A2FKBNGG.js";
|
|
5
5
|
import {
|
|
6
6
|
clean,
|
|
7
7
|
cleanDirectories
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5EZLMSEY.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_BUILD_OPTIONS
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PR5HLZXS.js";
|
|
12
12
|
import "./chunk-SHUYVCID.js";
|
|
13
13
|
import "./chunk-GGNOJ77I.js";
|
|
14
14
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/tsdown",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing `tsdown` utilities for building Storm Software libraries and applications",
|
|
6
6
|
"repository": {
|
|
@@ -42,11 +42,7 @@
|
|
|
42
42
|
"private": false,
|
|
43
43
|
"packageManager": "pnpm@10.3.0",
|
|
44
44
|
"engines": { "node": ">=22.4.0", "pnpm": ">=10.3.0" },
|
|
45
|
-
"bin": {
|
|
46
|
-
"storm-tsdown": "./bin/tsdown.js",
|
|
47
|
-
"storm-tsdown-cjs": "./bin/tsdown.cjs",
|
|
48
|
-
"storm-tsdown-esm": "./bin/tsdown.js"
|
|
49
|
-
},
|
|
45
|
+
"bin": { "storm-tsdown": "./bin/tsdown.cjs" },
|
|
50
46
|
"main": "./dist/index.cjs",
|
|
51
47
|
"module": "./dist/index.js",
|
|
52
48
|
"exports": {
|