@storm-software/tsdown 0.27.5 → 0.27.7
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 +3 -3
- package/dist/build.js +2 -2
- package/dist/{chunk-WZ5EOU2V.cjs → chunk-3OXZDD56.cjs} +2 -2
- package/dist/{chunk-3CBTBP2Q.cjs → chunk-6LMFONIA.cjs} +111 -100
- package/dist/{chunk-A2FKBNGG.js → chunk-JP5IW3NP.js} +26 -15
- package/dist/{chunk-5EZLMSEY.js → chunk-S6CNCNLB.js} +2 -2
- package/dist/clean.cjs +2 -2
- package/dist/clean.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +2 -2
- package/package.json +1 -1
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
|
@@ -349,7 +349,7 @@ async function build(options) {
|
|
|
349
349
|
}
|
|
350
350
|
(0, import_console2.writeSuccess)(" \u{1F3C1} TSDown pipeline build completed successfully");
|
|
351
351
|
} catch (error) {
|
|
352
|
-
(0, import_console2.writeFatal)("
|
|
352
|
+
(0, import_console2.writeFatal)("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
353
353
|
throw error;
|
|
354
354
|
} finally {
|
|
355
355
|
stopwatch();
|
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 _chunk6LMFONIAcjs = require('./chunk-6LMFONIA.cjs');
|
|
5
|
+
require('./chunk-3OXZDD56.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 = _chunk6LMFONIAcjs.build; exports.cleanOutputPath = _chunk6LMFONIAcjs.cleanOutputPath;
|
package/dist/build.js
CHANGED
|
@@ -118,7 +118,7 @@ var ColorConfigMapSchema = _zod2.default.union([
|
|
|
118
118
|
var ExtendsItemSchema = _zod2.default.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
119
119
|
var ExtendsSchema = ExtendsItemSchema.or(_zod2.default.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
120
120
|
var WorkspaceBotConfigSchema = _zod2.default.object({
|
|
121
|
-
name: _zod2.default.string().trim().default("
|
|
121
|
+
name: _zod2.default.string().trim().default("stormie-bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
|
|
122
122
|
email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
123
123
|
}).describe("The workspace's bot user's config used to automated various operations tasks");
|
|
124
124
|
var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
@@ -610,7 +610,7 @@ var getLogFn = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (logLevel =
|
|
|
610
610
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
611
611
|
return (message) => {
|
|
612
612
|
console.error(`
|
|
613
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]}
|
|
613
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
614
614
|
`);
|
|
615
615
|
};
|
|
616
616
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunk3OXZDD56cjs = require('./chunk-3OXZDD56.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
|
+
_chunk3OXZDD56cjs.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} -> ${_chunk3OXZDD56cjs.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
|
+
_chunk3OXZDD56cjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunk3OXZDD56cjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
93
93
|
const files = await _glob.glob.call(void 0, [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
_chunk3OXZDD56cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
95
|
+
_chunk3OXZDD56cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
96
|
+
_chunk3OXZDD56cjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
97
|
+
_chunk3OXZDD56cjs.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 = _chunk3OXZDD56cjs.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
|
+
_chunk3OXZDD56cjs.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, _chunk3OXZDD56cjs.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 = _chunk3OXZDD56cjs.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
|
+
_chunk3OXZDD56cjs.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 : _chunk3OXZDD56cjs.findWorkspaceRoot.call(void 0, );
|
|
171
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunk3OXZDD56cjs.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 ??= `${_chunk3OXZDD56cjs.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 : _chunk3OXZDD56cjs.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 || _chunk3OXZDD56cjs.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 : _chunk3OXZDD56cjs.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 : _chunk3OXZDD56cjs.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 : _chunk3OXZDD56cjs.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
|
+
_chunk3OXZDD56cjs.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
|
+
_chunk3OXZDD56cjs.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,15 +327,15 @@ 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`] ? _chunk3OXZDD56cjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
331
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunk3OXZDD56cjs.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`] ? _chunk3OXZDD56cjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
334
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunk3OXZDD56cjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
335
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunk3OXZDD56cjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
336
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunk3OXZDD56cjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
337
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunk3OXZDD56cjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
338
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunk3OXZDD56cjs.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,
|
|
@@ -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`])) ? _chunk3OXZDD56cjs.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_`) && _chunk3OXZDD56cjs.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 === _chunk3OXZDD56cjs.STORM_DEFAULT_DOCS) {
|
|
370
|
+
if (config.homepage === _chunk3OXZDD56cjs.STORM_DEFAULT_HOMEPAGE) {
|
|
371
|
+
config.docs = `${_chunk3OXZDD56cjs.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 === _chunk3OXZDD56cjs.STORM_DEFAULT_LICENSING) {
|
|
377
|
+
if (config.homepage === _chunk3OXZDD56cjs.STORM_DEFAULT_HOMEPAGE) {
|
|
378
|
+
config.licensing = `${_chunk3OXZDD56cjs.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`] = _chunk3OXZDD56cjs.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`] = _chunk3OXZDD56cjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
520
|
+
process.env.NX_WORKSPACE_ROOT = _chunk3OXZDD56cjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
521
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunk3OXZDD56cjs.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`] = _chunk3OXZDD56cjs.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`] = _chunk3OXZDD56cjs.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`] = _chunk3OXZDD56cjs.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`] = _chunk3OXZDD56cjs.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`] = _chunk3OXZDD56cjs.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`] = _chunk3OXZDD56cjs.correctPaths.call(void 0, config.directories.build);
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
if (config.skipCache !== void 0) {
|
|
@@ -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(_chunk3OXZDD56cjs.getLogLevel.call(void 0, config.logLevel) >= _chunk3OXZDD56cjs.LogLevel.DEBUG ? true : false);
|
|
595
|
+
process.env.RUST_BACKTRACE = _chunk3OXZDD56cjs.getLogLevel.call(void 0, config.logLevel) >= _chunk3OXZDD56cjs.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 = _chunk3OXZDD56cjs.findWorkspaceRoot.call(void 0, );
|
|
712
712
|
}
|
|
713
713
|
const configEnv = getConfigEnv();
|
|
714
|
-
const defaultConfig = await
|
|
714
|
+
const defaultConfig = await _chunk3OXZDD56cjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
715
715
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
716
716
|
if (!configFile && !skipLogs) {
|
|
717
|
-
|
|
717
|
+
_chunk3OXZDD56cjs.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 _chunk3OXZDD56cjs.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
|
+
_chunk3OXZDD56cjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
757
|
+
${_chunk3OXZDD56cjs.formatLogMessage.call(void 0, config)}`, config);
|
|
758
758
|
}
|
|
759
759
|
return config;
|
|
760
760
|
}, "loadStormConfig");
|
|
@@ -767,41 +767,52 @@ 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
|
|
770
|
+
const workspaceRoot = config.workspaceRoot || _chunk3OXZDD56cjs.findWorkspaceRoot.call(void 0, );
|
|
771
771
|
const entryPoints = [];
|
|
772
772
|
if (entry) {
|
|
773
|
-
if (
|
|
774
|
-
entryPoints.push(...entry);
|
|
775
|
-
} else if (typeof entry === "string") {
|
|
773
|
+
if (typeof entry === "string") {
|
|
776
774
|
entryPoints.push(entry);
|
|
775
|
+
} else if (Array.isArray(entry)) {
|
|
776
|
+
entryPoints.push(...entry);
|
|
777
777
|
} else {
|
|
778
778
|
entryPoints.push(...Object.values(entry));
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
781
|
if (emitOnAll) {
|
|
782
|
-
entryPoints.push(
|
|
782
|
+
entryPoints.push(_chunk3OXZDD56cjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
783
783
|
}
|
|
784
|
-
const results =
|
|
785
|
-
|
|
784
|
+
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
785
|
+
const paths = [];
|
|
786
786
|
if (entryPoint.includes("*")) {
|
|
787
787
|
const files = await _glob.glob.call(void 0, entryPoint, {
|
|
788
|
-
withFileTypes: true
|
|
788
|
+
withFileTypes: true,
|
|
789
|
+
ignore: [
|
|
790
|
+
"**/node_modules/**"
|
|
791
|
+
]
|
|
789
792
|
});
|
|
790
|
-
|
|
791
|
-
const result =
|
|
793
|
+
paths.push(...files.reduce((ret, filePath) => {
|
|
794
|
+
const result = _chunk3OXZDD56cjs.correctPaths.call(void 0, _chunk3OXZDD56cjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunk3OXZDD56cjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunk3OXZDD56cjs.correctPaths.call(void 0, projectRoot), ""));
|
|
792
795
|
if (result) {
|
|
793
|
-
|
|
794
|
-
if (!
|
|
795
|
-
|
|
796
|
+
_chunk3OXZDD56cjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunk3OXZDD56cjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
797
|
+
if (!paths.includes(result)) {
|
|
798
|
+
paths.push(result);
|
|
796
799
|
}
|
|
797
800
|
}
|
|
798
801
|
return ret;
|
|
799
802
|
}, []));
|
|
800
803
|
} else {
|
|
801
|
-
|
|
804
|
+
paths.push(entryPoint);
|
|
802
805
|
}
|
|
803
|
-
|
|
804
|
-
|
|
806
|
+
return paths;
|
|
807
|
+
}));
|
|
808
|
+
return results.filter(Boolean).reduce((ret, result) => {
|
|
809
|
+
result.forEach((res) => {
|
|
810
|
+
if (res && !ret.includes(res)) {
|
|
811
|
+
ret.push(res);
|
|
812
|
+
}
|
|
813
|
+
});
|
|
814
|
+
return ret;
|
|
815
|
+
}, []);
|
|
805
816
|
}, "getEntryPoints");
|
|
806
817
|
|
|
807
818
|
// ../build-tools/src/utilities/get-env.ts
|
|
@@ -838,12 +849,12 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
838
849
|
throw new Error("Cannot find Nx workspace root");
|
|
839
850
|
}
|
|
840
851
|
const config = await getConfig(workspaceRoot.dir);
|
|
841
|
-
|
|
842
|
-
const stopwatch =
|
|
852
|
+
_chunk3OXZDD56cjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
853
|
+
const stopwatch = _chunk3OXZDD56cjs.getStopwatch.call(void 0, "Build options resolution");
|
|
843
854
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
844
855
|
exitOnError: true
|
|
845
856
|
});
|
|
846
|
-
const projectJsonPath =
|
|
857
|
+
const projectJsonPath = _chunk3OXZDD56cjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
|
|
847
858
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
848
859
|
throw new Error("Cannot find project.json configuration");
|
|
849
860
|
}
|
|
@@ -857,7 +868,7 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
857
868
|
const options = _defu2.default.call(void 0, userOptions, _chunkDEWYQH4Bcjs.DEFAULT_BUILD_OPTIONS);
|
|
858
869
|
options.name ??= `${projectName}-${options.format}`;
|
|
859
870
|
options.target ??= DEFAULT_TARGET;
|
|
860
|
-
const packageJsonPath =
|
|
871
|
+
const packageJsonPath = _chunk3OXZDD56cjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
861
872
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
862
873
|
throw new Error("Cannot find package.json configuration");
|
|
863
874
|
}
|
|
@@ -866,20 +877,20 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
866
877
|
...options,
|
|
867
878
|
config,
|
|
868
879
|
...userOptions,
|
|
869
|
-
tsconfig:
|
|
880
|
+
tsconfig: _chunk3OXZDD56cjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
870
881
|
format: options.format || "cjs",
|
|
871
882
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
872
883
|
"./src/index.ts"
|
|
873
884
|
], userOptions.emitOnAll),
|
|
874
|
-
outdir: userOptions.outputPath ||
|
|
885
|
+
outdir: userOptions.outputPath || _chunk3OXZDD56cjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
875
886
|
plugins: [],
|
|
876
887
|
name: userOptions.name || projectName,
|
|
877
888
|
projectConfigurations,
|
|
878
889
|
projectName,
|
|
879
890
|
projectGraph,
|
|
880
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
891
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunk3OXZDD56cjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
881
892
|
minify: userOptions.minify || !userOptions.debug,
|
|
882
|
-
verbose: userOptions.verbose ||
|
|
893
|
+
verbose: userOptions.verbose || _chunk3OXZDD56cjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
883
894
|
includeSrc: userOptions.includeSrc === true,
|
|
884
895
|
metafile: userOptions.metafile !== false,
|
|
885
896
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -913,14 +924,14 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
913
924
|
return result;
|
|
914
925
|
}, "resolveOptions");
|
|
915
926
|
async function generatePackageJson(options) {
|
|
916
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
917
|
-
|
|
918
|
-
const stopwatch =
|
|
919
|
-
const packageJsonPath =
|
|
927
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunk3OXZDD56cjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
928
|
+
_chunk3OXZDD56cjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
929
|
+
const stopwatch = _chunk3OXZDD56cjs.getStopwatch.call(void 0, "Write package.json file");
|
|
930
|
+
const packageJsonPath = _chunk3OXZDD56cjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
920
931
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
921
932
|
throw new Error("Cannot find package.json configuration");
|
|
922
933
|
}
|
|
923
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
934
|
+
const packageJsonFile = await _promises2.default.readFile(_chunk3OXZDD56cjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
924
935
|
if (!packageJsonFile) {
|
|
925
936
|
throw new Error("Cannot find package.json configuration file");
|
|
926
937
|
}
|
|
@@ -959,15 +970,15 @@ async function generatePackageJson(options) {
|
|
|
959
970
|
}
|
|
960
971
|
return ret;
|
|
961
972
|
}, packageJson.exports);
|
|
962
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
973
|
+
await _devkit.writeJsonFile.call(void 0, _chunk3OXZDD56cjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
963
974
|
stopwatch();
|
|
964
975
|
}
|
|
965
976
|
return options;
|
|
966
977
|
}
|
|
967
978
|
_chunkUSNT2KNTcjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
968
979
|
async function executeTSDown(options) {
|
|
969
|
-
|
|
970
|
-
const stopwatch =
|
|
980
|
+
_chunk3OXZDD56cjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
981
|
+
const stopwatch = _chunk3OXZDD56cjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
971
982
|
await _tsdown.build.call(void 0, {
|
|
972
983
|
...options,
|
|
973
984
|
entry: options.entryPoints,
|
|
@@ -979,30 +990,30 @@ async function executeTSDown(options) {
|
|
|
979
990
|
}
|
|
980
991
|
_chunkUSNT2KNTcjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
981
992
|
async function copyBuildAssets(options) {
|
|
982
|
-
|
|
983
|
-
const stopwatch =
|
|
993
|
+
_chunk3OXZDD56cjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
994
|
+
const stopwatch = _chunk3OXZDD56cjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
984
995
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.sourceRoot, true, false);
|
|
985
996
|
stopwatch();
|
|
986
997
|
return options;
|
|
987
998
|
}
|
|
988
999
|
_chunkUSNT2KNTcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
989
1000
|
async function reportResults(options) {
|
|
990
|
-
|
|
1001
|
+
_chunk3OXZDD56cjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
991
1002
|
}
|
|
992
1003
|
_chunkUSNT2KNTcjs.__name.call(void 0, reportResults, "reportResults");
|
|
993
1004
|
async function cleanOutputPath(options) {
|
|
994
1005
|
if (options.clean !== false && options.outdir) {
|
|
995
|
-
|
|
996
|
-
const stopwatch =
|
|
997
|
-
await
|
|
1006
|
+
_chunk3OXZDD56cjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
|
|
1007
|
+
const stopwatch = _chunk3OXZDD56cjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1008
|
+
await _chunk3OXZDD56cjs.cleanDirectories.call(void 0, options.name, options.outdir, options.config);
|
|
998
1009
|
stopwatch();
|
|
999
1010
|
}
|
|
1000
1011
|
return options;
|
|
1001
1012
|
}
|
|
1002
1013
|
_chunkUSNT2KNTcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1003
1014
|
async function build(options) {
|
|
1004
|
-
|
|
1005
|
-
const stopwatch =
|
|
1015
|
+
_chunk3OXZDD56cjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1016
|
+
const stopwatch = _chunk3OXZDD56cjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1006
1017
|
try {
|
|
1007
1018
|
const opts = Array.isArray(options) ? options : [
|
|
1008
1019
|
options
|
|
@@ -1020,11 +1031,11 @@ async function build(options) {
|
|
|
1020
1031
|
await reportResults(opt);
|
|
1021
1032
|
}));
|
|
1022
1033
|
} else {
|
|
1023
|
-
|
|
1034
|
+
_chunk3OXZDD56cjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
1024
1035
|
}
|
|
1025
|
-
|
|
1036
|
+
_chunk3OXZDD56cjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1026
1037
|
} catch (error) {
|
|
1027
|
-
|
|
1038
|
+
_chunk3OXZDD56cjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
1028
1039
|
throw error;
|
|
1029
1040
|
} finally {
|
|
1030
1041
|
stopwatch();
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
writeSuccess,
|
|
21
21
|
writeTrace,
|
|
22
22
|
writeWarning
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-S6CNCNLB.js";
|
|
24
24
|
import {
|
|
25
25
|
DEFAULT_BUILD_OPTIONS
|
|
26
26
|
} from "./chunk-PR5HLZXS.js";
|
|
@@ -767,13 +767,13 @@ var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
|
|
|
767
767
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
768
768
|
import { glob as glob2 } from "glob";
|
|
769
769
|
var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
770
|
-
const workspaceRoot = config.workspaceRoot
|
|
770
|
+
const workspaceRoot = config.workspaceRoot || findWorkspaceRoot();
|
|
771
771
|
const entryPoints = [];
|
|
772
772
|
if (entry) {
|
|
773
|
-
if (
|
|
774
|
-
entryPoints.push(...entry);
|
|
775
|
-
} else if (typeof entry === "string") {
|
|
773
|
+
if (typeof entry === "string") {
|
|
776
774
|
entryPoints.push(entry);
|
|
775
|
+
} else if (Array.isArray(entry)) {
|
|
776
|
+
entryPoints.push(...entry);
|
|
777
777
|
} else {
|
|
778
778
|
entryPoints.push(...Object.values(entry));
|
|
779
779
|
}
|
|
@@ -781,27 +781,38 @@ var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRo
|
|
|
781
781
|
if (emitOnAll) {
|
|
782
782
|
entryPoints.push(joinPaths(workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
783
783
|
}
|
|
784
|
-
const results =
|
|
785
|
-
|
|
784
|
+
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
785
|
+
const paths = [];
|
|
786
786
|
if (entryPoint.includes("*")) {
|
|
787
787
|
const files = await glob2(entryPoint, {
|
|
788
|
-
withFileTypes: true
|
|
788
|
+
withFileTypes: true,
|
|
789
|
+
ignore: [
|
|
790
|
+
"**/node_modules/**"
|
|
791
|
+
]
|
|
789
792
|
});
|
|
790
|
-
|
|
793
|
+
paths.push(...files.reduce((ret, filePath) => {
|
|
791
794
|
const result = correctPaths(joinPaths(filePath.path, filePath.name).replaceAll(correctPaths(workspaceRoot), "").replaceAll(correctPaths(projectRoot), ""));
|
|
792
795
|
if (result) {
|
|
793
796
|
writeDebug(`Trying to add entry point ${result} at "${joinPaths(filePath.path, filePath.name)}"`, config);
|
|
794
|
-
if (!
|
|
795
|
-
|
|
797
|
+
if (!paths.includes(result)) {
|
|
798
|
+
paths.push(result);
|
|
796
799
|
}
|
|
797
800
|
}
|
|
798
801
|
return ret;
|
|
799
802
|
}, []));
|
|
800
803
|
} else {
|
|
801
|
-
|
|
804
|
+
paths.push(entryPoint);
|
|
802
805
|
}
|
|
803
|
-
|
|
804
|
-
|
|
806
|
+
return paths;
|
|
807
|
+
}));
|
|
808
|
+
return results.filter(Boolean).reduce((ret, result) => {
|
|
809
|
+
result.forEach((res) => {
|
|
810
|
+
if (res && !ret.includes(res)) {
|
|
811
|
+
ret.push(res);
|
|
812
|
+
}
|
|
813
|
+
});
|
|
814
|
+
return ret;
|
|
815
|
+
}, []);
|
|
805
816
|
}, "getEntryPoints");
|
|
806
817
|
|
|
807
818
|
// ../build-tools/src/utilities/get-env.ts
|
|
@@ -1024,7 +1035,7 @@ async function build(options) {
|
|
|
1024
1035
|
}
|
|
1025
1036
|
writeSuccess(" \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1026
1037
|
} catch (error) {
|
|
1027
|
-
writeFatal("
|
|
1038
|
+
writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
1028
1039
|
throw error;
|
|
1029
1040
|
} finally {
|
|
1030
1041
|
stopwatch();
|
|
@@ -118,7 +118,7 @@ var ColorConfigMapSchema = z.union([
|
|
|
118
118
|
var ExtendsItemSchema = z.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
119
119
|
var ExtendsSchema = ExtendsItemSchema.or(z.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
120
120
|
var WorkspaceBotConfigSchema = z.object({
|
|
121
|
-
name: z.string().trim().default("
|
|
121
|
+
name: z.string().trim().default("stormie-bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
|
|
122
122
|
email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
123
123
|
}).describe("The workspace's bot user's config used to automated various operations tasks");
|
|
124
124
|
var WorkspaceDirectoryConfigSchema = z.object({
|
|
@@ -610,7 +610,7 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}, _c
|
|
|
610
610
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
611
611
|
return (message) => {
|
|
612
612
|
console.error(`
|
|
613
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]}
|
|
613
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
614
614
|
`);
|
|
615
615
|
};
|
|
616
616
|
}
|
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 _chunk3OXZDD56cjs = require('./chunk-3OXZDD56.cjs');
|
|
5
5
|
require('./chunk-USNT2KNT.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.clean =
|
|
9
|
+
exports.clean = _chunk3OXZDD56cjs.clean; exports.cleanDirectories = _chunk3OXZDD56cjs.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 _chunk6LMFONIAcjs = require('./chunk-6LMFONIA.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk3OXZDD56cjs = require('./chunk-3OXZDD56.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 = _chunk6LMFONIAcjs.build; exports.clean = _chunk3OXZDD56cjs.clean; exports.cleanDirectories = _chunk3OXZDD56cjs.cleanDirectories; exports.cleanOutputPath = _chunk6LMFONIAcjs.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-JP5IW3NP.js";
|
|
5
5
|
import {
|
|
6
6
|
clean,
|
|
7
7
|
cleanDirectories
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-S6CNCNLB.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_BUILD_OPTIONS
|
|
11
11
|
} from "./chunk-PR5HLZXS.js";
|