@storm-software/tsdown 0.27.17 → 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/dist/build.cjs +3 -3
- package/dist/build.js +2 -2
- package/dist/{chunk-ULKTID2C.js → chunk-DE3S3NQO.js} +13 -6
- package/dist/{chunk-HE6DPQ63.js → chunk-MZ443ZDH.js} +9 -1
- package/dist/{chunk-5I23ITU4.cjs → chunk-RHDQ3DQN.cjs} +9 -1
- package/dist/{chunk-2CESRFDQ.cjs → chunk-WEF5QCAP.cjs} +100 -93
- 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 +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/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
|
@@ -20,7 +20,7 @@ import {
|
|
|
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";
|
|
@@ -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) {
|
|
@@ -845,10 +853,9 @@ var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRo
|
|
|
845
853
|
return ret;
|
|
846
854
|
}, []));
|
|
847
855
|
} else {
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
paths.push(result);
|
|
856
|
+
writeDebug(`Trying to add entry point ${entryPoint}"`, config);
|
|
857
|
+
if (!paths.includes(entryPoint)) {
|
|
858
|
+
paths.push(entryPoint);
|
|
852
859
|
}
|
|
853
860
|
}
|
|
854
861
|
return paths;
|
|
@@ -157,6 +157,10 @@ 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 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");
|
|
160
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(),
|
|
@@ -175,6 +179,7 @@ var stormWorkspaceConfigSchema = 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
|
|
|
@@ -157,6 +157,10 @@ 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 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");
|
|
160
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(),
|
|
@@ -175,6 +179,7 @@ var stormWorkspaceConfigSchema = _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
|
|
|
@@ -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);
|
|
@@ -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
|
+
_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,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 || _chunkRHDQ3DQNcjs.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', _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
|
}),
|
|
@@ -256,7 +256,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
|
|
|
256
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,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 : _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
|
}
|
|
@@ -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', _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
|
}
|
|
@@ -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) {
|
|
@@ -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);
|
|
@@ -752,17 +760,17 @@ var createStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(v
|
|
|
752
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;
|
|
@@ -797,8 +805,8 @@ var loadStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(voi
|
|
|
797
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");
|
|
@@ -811,7 +819,7 @@ var getConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (workspace
|
|
|
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,10 +853,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
845
853
|
return ret;
|
|
846
854
|
}, []));
|
|
847
855
|
} else {
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
paths.push(result);
|
|
856
|
+
_chunkRHDQ3DQNcjs.writeDebug.call(void 0, `Trying to add entry point ${entryPoint}"`, config);
|
|
857
|
+
if (!paths.includes(entryPoint)) {
|
|
858
|
+
paths.push(entryPoint);
|
|
852
859
|
}
|
|
853
860
|
}
|
|
854
861
|
return paths;
|
|
@@ -897,12 +904,12 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
897
904
|
throw new Error("Cannot find Nx workspace root");
|
|
898
905
|
}
|
|
899
906
|
const config = await getConfig(workspaceRoot.dir);
|
|
900
|
-
|
|
901
|
-
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");
|
|
902
909
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
903
910
|
exitOnError: true
|
|
904
911
|
});
|
|
905
|
-
const projectJsonPath =
|
|
912
|
+
const projectJsonPath = _chunkRHDQ3DQNcjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
|
|
906
913
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
907
914
|
throw new Error("Cannot find project.json configuration");
|
|
908
915
|
}
|
|
@@ -916,7 +923,7 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
916
923
|
const options = _defu2.default.call(void 0, userOptions, _chunkDEWYQH4Bcjs.DEFAULT_BUILD_OPTIONS);
|
|
917
924
|
options.name ??= `${projectName}-${options.format}`;
|
|
918
925
|
options.target ??= DEFAULT_TARGET;
|
|
919
|
-
const packageJsonPath =
|
|
926
|
+
const packageJsonPath = _chunkRHDQ3DQNcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
920
927
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
921
928
|
throw new Error("Cannot find package.json configuration");
|
|
922
929
|
}
|
|
@@ -925,20 +932,20 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
925
932
|
...options,
|
|
926
933
|
config,
|
|
927
934
|
...userOptions,
|
|
928
|
-
tsconfig:
|
|
935
|
+
tsconfig: _chunkRHDQ3DQNcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
929
936
|
format: options.format || "cjs",
|
|
930
937
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
931
938
|
"./src/index.ts"
|
|
932
939
|
], userOptions.emitOnAll),
|
|
933
|
-
outdir: userOptions.outputPath ||
|
|
940
|
+
outdir: userOptions.outputPath || _chunkRHDQ3DQNcjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
934
941
|
plugins: [],
|
|
935
942
|
name: userOptions.name || projectName,
|
|
936
943
|
projectConfigurations,
|
|
937
944
|
projectName,
|
|
938
945
|
projectGraph,
|
|
939
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
946
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkRHDQ3DQNcjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
940
947
|
minify: userOptions.minify || !userOptions.debug,
|
|
941
|
-
verbose: userOptions.verbose ||
|
|
948
|
+
verbose: userOptions.verbose || _chunkRHDQ3DQNcjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
942
949
|
includeSrc: userOptions.includeSrc === true,
|
|
943
950
|
metafile: userOptions.metafile !== false,
|
|
944
951
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -972,14 +979,14 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
972
979
|
return result;
|
|
973
980
|
}, "resolveOptions");
|
|
974
981
|
async function generatePackageJson(options) {
|
|
975
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
976
|
-
|
|
977
|
-
const stopwatch =
|
|
978
|
-
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");
|
|
979
986
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
980
987
|
throw new Error("Cannot find package.json configuration");
|
|
981
988
|
}
|
|
982
|
-
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");
|
|
983
990
|
if (!packageJsonFile) {
|
|
984
991
|
throw new Error("Cannot find package.json configuration file");
|
|
985
992
|
}
|
|
@@ -1018,15 +1025,15 @@ async function generatePackageJson(options) {
|
|
|
1018
1025
|
}
|
|
1019
1026
|
return ret;
|
|
1020
1027
|
}, packageJson.exports);
|
|
1021
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1028
|
+
await _devkit.writeJsonFile.call(void 0, _chunkRHDQ3DQNcjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
1022
1029
|
stopwatch();
|
|
1023
1030
|
}
|
|
1024
1031
|
return options;
|
|
1025
1032
|
}
|
|
1026
1033
|
_chunkUSNT2KNTcjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
1027
1034
|
async function executeTSDown(options) {
|
|
1028
|
-
|
|
1029
|
-
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`);
|
|
1030
1037
|
await _tsdown.build.call(void 0, {
|
|
1031
1038
|
...options,
|
|
1032
1039
|
entry: options.entryPoints,
|
|
@@ -1038,30 +1045,30 @@ async function executeTSDown(options) {
|
|
|
1038
1045
|
}
|
|
1039
1046
|
_chunkUSNT2KNTcjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
1040
1047
|
async function copyBuildAssets(options) {
|
|
1041
|
-
|
|
1042
|
-
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`);
|
|
1043
1050
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.sourceRoot, true, false);
|
|
1044
1051
|
stopwatch();
|
|
1045
1052
|
return options;
|
|
1046
1053
|
}
|
|
1047
1054
|
_chunkUSNT2KNTcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
1048
1055
|
async function reportResults(options) {
|
|
1049
|
-
|
|
1056
|
+
_chunkRHDQ3DQNcjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
1050
1057
|
}
|
|
1051
1058
|
_chunkUSNT2KNTcjs.__name.call(void 0, reportResults, "reportResults");
|
|
1052
1059
|
async function cleanOutputPath(options) {
|
|
1053
1060
|
if (options.clean !== false && options.outdir) {
|
|
1054
|
-
|
|
1055
|
-
const stopwatch =
|
|
1056
|
-
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);
|
|
1057
1064
|
stopwatch();
|
|
1058
1065
|
}
|
|
1059
1066
|
return options;
|
|
1060
1067
|
}
|
|
1061
1068
|
_chunkUSNT2KNTcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1062
1069
|
async function build(options) {
|
|
1063
|
-
|
|
1064
|
-
const stopwatch =
|
|
1070
|
+
_chunkRHDQ3DQNcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1071
|
+
const stopwatch = _chunkRHDQ3DQNcjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1065
1072
|
try {
|
|
1066
1073
|
const opts = Array.isArray(options) ? options : [
|
|
1067
1074
|
options
|
|
@@ -1079,11 +1086,11 @@ async function build(options) {
|
|
|
1079
1086
|
await reportResults(opt);
|
|
1080
1087
|
}));
|
|
1081
1088
|
} else {
|
|
1082
|
-
|
|
1089
|
+
_chunkRHDQ3DQNcjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
1083
1090
|
}
|
|
1084
|
-
|
|
1091
|
+
_chunkRHDQ3DQNcjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1085
1092
|
} catch (error) {
|
|
1086
|
-
|
|
1093
|
+
_chunkRHDQ3DQNcjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
1087
1094
|
throw error;
|
|
1088
1095
|
} finally {
|
|
1089
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.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"
|