@storm-software/build-tools 0.143.26 → 0.143.27
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/{chunk-6AQ4XKGN.js → chunk-2PQSBNIG.js} +8 -8
- package/dist/{chunk-XQSNXFPQ.js → chunk-4NYND7H5.js} +2 -2
- package/dist/{chunk-KGIBCAXS.mjs → chunk-6AYPNLR3.mjs} +1 -1
- package/dist/{chunk-QNP6RTJH.js → chunk-BX34NKUO.js} +6 -6
- package/dist/{chunk-YUZ6Q34B.mjs → chunk-CLRIC2TT.mjs} +1 -1
- package/dist/{chunk-6UDX4KBF.mjs → chunk-I2JL7XMZ.mjs} +1 -1
- package/dist/{chunk-EWU6VZ32.mjs → chunk-L7WHYO35.mjs} +1 -1
- package/dist/{chunk-LKJRVI3T.mjs → chunk-MITSP47G.mjs} +9 -1
- package/dist/{chunk-MDHASPY4.js → chunk-VJW6QHTB.js} +10 -10
- package/dist/{chunk-KQL5J2GZ.mjs → chunk-WHMBIJOB.mjs} +10 -2
- package/dist/{chunk-MITAVBMN.js → chunk-YIWHPV7Q.js} +8 -8
- package/dist/{chunk-LKWLSLMM.js → chunk-YIYEZO3M.js} +51 -43
- package/dist/{chunk-US6NZ6IW.js → chunk-YT5PFZPY.js} +9 -1
- package/dist/{chunk-O3AMZWYF.mjs → chunk-Z6ABVBCU.mjs} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/plugins/analyze.js +3 -3
- package/dist/plugins/analyze.mjs +2 -2
- package/dist/plugins/index.js +4 -4
- package/dist/plugins/index.mjs +3 -3
- package/dist/plugins/ts-resolve.js +3 -3
- package/dist/plugins/ts-resolve.mjs +2 -2
- package/dist/{types-B6HfHepu.d.ts → types-C3WeLGCj.d.mts} +20 -2
- package/dist/{types-B6HfHepu.d.mts → types-C3WeLGCj.d.ts} +20 -2
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utilities/copy-assets.d.mts +1 -1
- package/dist/utilities/copy-assets.d.ts +1 -1
- package/dist/utilities/copy-assets.js +3 -3
- package/dist/utilities/copy-assets.mjs +2 -2
- package/dist/utilities/generate-package-json.d.mts +1 -1
- package/dist/utilities/generate-package-json.d.ts +1 -1
- package/dist/utilities/generate-package-json.js +3 -3
- package/dist/utilities/generate-package-json.mjs +2 -2
- package/dist/utilities/get-entry-points.d.mts +1 -1
- package/dist/utilities/get-entry-points.d.ts +1 -1
- package/dist/utilities/get-entry-points.js +3 -3
- package/dist/utilities/get-entry-points.mjs +2 -2
- package/dist/utilities/get-env.d.mts +1 -1
- package/dist/utilities/get-env.d.ts +1 -1
- package/dist/utilities/index.d.mts +1 -1
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.js +6 -6
- package/dist/utilities/index.mjs +5 -5
- package/dist/utilities/read-nx-config.js +3 -3
- package/dist/utilities/read-nx-config.mjs +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 -->
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkYT5PFZPYjs = require('./chunk-YT5PFZPY.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -37,8 +37,8 @@ var copyAssets = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (con
|
|
|
37
37
|
output: "src/"
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
40
|
+
_chunkYT5PFZPYjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
41
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkYT5PFZPYjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
42
42
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
43
43
|
projectDir: projectRoot,
|
|
44
44
|
rootDir: config.workspaceRoot,
|
|
@@ -47,12 +47,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
47
47
|
});
|
|
48
48
|
await assetHandler.processAllAssetsOnce();
|
|
49
49
|
if (includeSrc === true) {
|
|
50
|
-
|
|
50
|
+
_chunkYT5PFZPYjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkYT5PFZPYjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
51
51
|
const files = await _glob.glob.call(void 0, [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
_chunkYT5PFZPYjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
53
|
+
_chunkYT5PFZPYjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
54
|
+
_chunkYT5PFZPYjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
55
|
+
_chunkYT5PFZPYjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
56
56
|
]);
|
|
57
57
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
58
58
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkYT5PFZPYjs = require('./chunk-YT5PFZPY.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -30,7 +30,7 @@ function analyze() {
|
|
|
30
30
|
renderChunk(source, chunk) {
|
|
31
31
|
const sourceBytes = formatBytes(source.length);
|
|
32
32
|
const fileName = chunk.fileName;
|
|
33
|
-
|
|
33
|
+
_chunkYT5PFZPYjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkYT5PFZPYjs = require('./chunk-YT5PFZPY.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -11,7 +11,7 @@ var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
|
11
11
|
// src/utilities/get-entry-points.ts
|
|
12
12
|
var _glob = require('glob');
|
|
13
13
|
var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
14
|
-
const workspaceRoot = config.workspaceRoot ||
|
|
14
|
+
const workspaceRoot = config.workspaceRoot || _chunkYT5PFZPYjs.findWorkspaceRoot.call(void 0, );
|
|
15
15
|
const entryPoints = [];
|
|
16
16
|
if (entry) {
|
|
17
17
|
if (typeof entry === "string") {
|
|
@@ -23,7 +23,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
if (emitOnAll) {
|
|
26
|
-
entryPoints.push(
|
|
26
|
+
entryPoints.push(_chunkYT5PFZPYjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
27
27
|
}
|
|
28
28
|
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
29
29
|
const paths = [];
|
|
@@ -35,9 +35,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async
|
|
|
35
35
|
]
|
|
36
36
|
});
|
|
37
37
|
paths.push(...files.reduce((ret, filePath) => {
|
|
38
|
-
const result =
|
|
38
|
+
const result = _chunkYT5PFZPYjs.correctPaths.call(void 0, _chunkYT5PFZPYjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkYT5PFZPYjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkYT5PFZPYjs.correctPaths.call(void 0, projectRoot), ""));
|
|
39
39
|
if (result) {
|
|
40
|
-
|
|
40
|
+
_chunkYT5PFZPYjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkYT5PFZPYjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
41
41
|
if (!paths.includes(result)) {
|
|
42
42
|
paths.push(result);
|
|
43
43
|
}
|
|
@@ -45,7 +45,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async
|
|
|
45
45
|
return ret;
|
|
46
46
|
}, []));
|
|
47
47
|
} else {
|
|
48
|
-
|
|
48
|
+
_chunkYT5PFZPYjs.writeDebug.call(void 0, `Trying to add entry point ${entryPoint}"`, config);
|
|
49
49
|
if (!paths.includes(entryPoint)) {
|
|
50
50
|
paths.push(entryPoint);
|
|
51
51
|
}
|
|
@@ -366,6 +366,10 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
366
366
|
log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
367
367
|
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)")
|
|
368
368
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
369
|
+
var errorConfigSchema = z.object({
|
|
370
|
+
codesFile: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("The path to the workspace's error codes JSON file"),
|
|
371
|
+
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")
|
|
372
|
+
}).describe("The workspace's error config used during the error process");
|
|
369
373
|
var stormWorkspaceConfigSchema = z.object({
|
|
370
374
|
$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"),
|
|
371
375
|
extends: ExtendsSchema.optional(),
|
|
@@ -384,6 +388,7 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
384
388
|
bot: WorkspaceBotConfigSchema,
|
|
385
389
|
release: WorkspaceReleaseConfigSchema,
|
|
386
390
|
account: WorkspaceAccountConfigSchema,
|
|
391
|
+
error: errorConfigSchema,
|
|
387
392
|
mode: z.enum([
|
|
388
393
|
"development",
|
|
389
394
|
"staging",
|
|
@@ -510,7 +515,10 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
510
515
|
license,
|
|
511
516
|
homepage,
|
|
512
517
|
docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
513
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license
|
|
518
|
+
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
519
|
+
error: {
|
|
520
|
+
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
521
|
+
}
|
|
514
522
|
};
|
|
515
523
|
}, "getDefaultConfig");
|
|
516
524
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkYT5PFZPYjs = require('./chunk-YT5PFZPY.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -20,7 +20,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
|
|
|
20
20
|
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)) {
|
|
21
21
|
const projectNode = project.node;
|
|
22
22
|
if (projectNode.data.root) {
|
|
23
|
-
const projectPackageJsonPath =
|
|
23
|
+
const projectPackageJsonPath = _chunkYT5PFZPYjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
|
|
24
24
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
25
25
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
26
26
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -31,8 +31,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
if (localPackages.length > 0) {
|
|
34
|
-
|
|
35
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
34
|
+
_chunkYT5PFZPYjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
35
|
+
const projectJsonFile = await _promises.readFile.call(void 0, _chunkYT5PFZPYjs.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
36
36
|
const projectJson = JSON.parse(projectJsonFile);
|
|
37
37
|
const projectName2 = projectJson.name;
|
|
38
38
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
@@ -41,7 +41,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
|
|
|
41
41
|
}
|
|
42
42
|
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) => {
|
|
43
43
|
if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
|
|
44
|
-
const depPackageJsonPath =
|
|
44
|
+
const depPackageJsonPath = _chunkYT5PFZPYjs.joinPaths.call(void 0, workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
|
|
45
45
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
46
46
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
47
47
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
@@ -65,13 +65,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
|
|
|
65
65
|
return ret;
|
|
66
66
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
67
67
|
} else {
|
|
68
|
-
|
|
68
|
+
_chunkYT5PFZPYjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
69
69
|
}
|
|
70
70
|
return packageJson;
|
|
71
71
|
}, "addPackageDependencies");
|
|
72
72
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
73
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
74
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
73
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkYT5PFZPYjs.findWorkspaceRoot.call(void 0, );
|
|
74
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkYT5PFZPYjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
75
75
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
76
76
|
packageJson.type ??= "module";
|
|
77
77
|
packageJson.sideEffects ??= false;
|
|
@@ -80,7 +80,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call
|
|
|
80
80
|
if (distSrc.startsWith("/")) {
|
|
81
81
|
distSrc = distSrc.substring(1);
|
|
82
82
|
}
|
|
83
|
-
packageJson.source ??= `${
|
|
83
|
+
packageJson.source ??= `${_chunkYT5PFZPYjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
84
84
|
}
|
|
85
85
|
packageJson.files ??= [
|
|
86
86
|
"dist/**/*"
|
|
@@ -111,7 +111,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call
|
|
|
111
111
|
];
|
|
112
112
|
}
|
|
113
113
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
114
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
114
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkYT5PFZPYjs.joinPaths.call(void 0, "packages", projectName);
|
|
115
115
|
return packageJson;
|
|
116
116
|
}, "addWorkspacePackageJsonFields");
|
|
117
117
|
var addPackageJsonExport = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
stormWorkspaceConfigSchema,
|
|
15
15
|
writeTrace,
|
|
16
16
|
writeWarning
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MITSP47G.mjs";
|
|
18
18
|
import {
|
|
19
19
|
__name
|
|
20
20
|
} from "./chunk-O6YSETKJ.mjs";
|
|
@@ -111,6 +111,10 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
111
111
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
112
112
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
113
113
|
},
|
|
114
|
+
error: {
|
|
115
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
116
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
117
|
+
},
|
|
114
118
|
account: {
|
|
115
119
|
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
116
120
|
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
@@ -284,6 +288,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
284
288
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
285
289
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
286
290
|
}
|
|
291
|
+
if (config.error) {
|
|
292
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
293
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
294
|
+
}
|
|
287
295
|
if (config.release) {
|
|
288
296
|
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
289
297
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
@@ -414,7 +422,7 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
414
422
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
|
|
415
423
|
}
|
|
416
424
|
if (config.registry.container) {
|
|
417
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.
|
|
425
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
|
|
418
426
|
}
|
|
419
427
|
}
|
|
420
428
|
if (config.logLevel) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkYT5PFZPYjs = require('./chunk-YT5PFZPY.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -29,8 +29,8 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
29
29
|
return {
|
|
30
30
|
name: `storm:ts-resolve`,
|
|
31
31
|
async resolveId(source, importer) {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
_chunkYT5PFZPYjs.writeDebug.call(void 0, `ts-resolve - resolveId source: ${source}`);
|
|
33
|
+
_chunkYT5PFZPYjs.writeDebug.call(void 0, `ts-resolve - resolveId importer: ${importer}`);
|
|
34
34
|
if (!importer) {
|
|
35
35
|
return null;
|
|
36
36
|
}
|
|
@@ -41,7 +41,7 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
41
41
|
return false;
|
|
42
42
|
}
|
|
43
43
|
if (ignore && ignore(source, importer)) {
|
|
44
|
-
|
|
44
|
+
_chunkYT5PFZPYjs.writeDebug.call(void 0, `ts-resolve - ignored ${source}`);
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
47
|
if (resolveOnly) {
|
|
@@ -50,12 +50,12 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
50
50
|
return v.test(source);
|
|
51
51
|
});
|
|
52
52
|
if (!shouldResolve) {
|
|
53
|
-
|
|
53
|
+
_chunkYT5PFZPYjs.writeDebug.call(void 0, `ts-resolve - skipped by matching resolveOnly ${source}`);
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
if (_path2.default.isAbsolute(source)) {
|
|
58
|
-
|
|
58
|
+
_chunkYT5PFZPYjs.writeDebug.call(void 0, `ts-resolve - skipped absolute path: ${source}`);
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
61
|
const basedir = importer ? await _fs2.default.promises.realpath(_path2.default.dirname(importer)) : process.cwd();
|
|
@@ -87,10 +87,10 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
if (id) {
|
|
90
|
-
|
|
90
|
+
_chunkYT5PFZPYjs.writeDebug.call(void 0, `ts-resolve - resolved ${source} to ${id}`);
|
|
91
91
|
return id;
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
_chunkYT5PFZPYjs.writeDebug.call(void 0, `ts-resolve - mark ${source} as external`);
|
|
94
94
|
return false;
|
|
95
95
|
}
|
|
96
96
|
};
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkYT5PFZPYjs = require('./chunk-YT5PFZPY.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -23,7 +23,7 @@ var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
|
23
23
|
var _c12 = require('c12');
|
|
24
24
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
25
25
|
var getConfigFileByName = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
26
|
-
const workspacePath = filePath ||
|
|
26
|
+
const workspacePath = filePath || _chunkYT5PFZPYjs.findWorkspaceRoot.call(void 0, filePath);
|
|
27
27
|
const configs = await Promise.all([
|
|
28
28
|
_c12.loadConfig.call(void 0, {
|
|
29
29
|
cwd: workspacePath,
|
|
@@ -32,7 +32,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, a
|
|
|
32
32
|
envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
|
|
33
33
|
jitiOptions: {
|
|
34
34
|
debug: false,
|
|
35
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
35
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkYT5PFZPYjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
36
36
|
},
|
|
37
37
|
...options
|
|
38
38
|
}),
|
|
@@ -43,7 +43,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, a
|
|
|
43
43
|
envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
|
|
44
44
|
jitiOptions: {
|
|
45
45
|
debug: false,
|
|
46
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
46
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkYT5PFZPYjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
47
47
|
},
|
|
48
48
|
configFile: fileName,
|
|
49
49
|
...options
|
|
@@ -52,12 +52,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, a
|
|
|
52
52
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
53
53
|
}, "getConfigFileByName");
|
|
54
54
|
var getConfigFile = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
55
|
-
const workspacePath = filePath ? filePath :
|
|
55
|
+
const workspacePath = filePath ? filePath : _chunkYT5PFZPYjs.findWorkspaceRoot.call(void 0, filePath);
|
|
56
56
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
57
57
|
let config = result.config;
|
|
58
58
|
const configFile = result.configFile;
|
|
59
59
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
60
|
-
|
|
60
|
+
_chunkYT5PFZPYjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
61
61
|
logLevel: "all"
|
|
62
62
|
});
|
|
63
63
|
}
|
|
@@ -66,7 +66,7 @@ var getConfigFile = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (
|
|
|
66
66
|
for (const result2 of results) {
|
|
67
67
|
if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
|
|
68
68
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
69
|
-
|
|
69
|
+
_chunkYT5PFZPYjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
70
70
|
logLevel: "all"
|
|
71
71
|
});
|
|
72
72
|
}
|
|
@@ -111,6 +111,10 @@ var getConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, () => {
|
|
|
111
111
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
112
112
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
113
113
|
},
|
|
114
|
+
error: {
|
|
115
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
116
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
117
|
+
},
|
|
114
118
|
account: {
|
|
115
119
|
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
116
120
|
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
@@ -128,15 +132,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, () => {
|
|
|
128
132
|
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
129
133
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
130
134
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
131
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
132
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
135
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkYT5PFZPYjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
136
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkYT5PFZPYjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
133
137
|
directories: {
|
|
134
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
135
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
136
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
137
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
138
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
139
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
138
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkYT5PFZPYjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
139
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkYT5PFZPYjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
140
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkYT5PFZPYjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
141
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkYT5PFZPYjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
142
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkYT5PFZPYjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
143
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkYT5PFZPYjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
140
144
|
},
|
|
141
145
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
142
146
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -159,24 +163,24 @@ var getConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, () => {
|
|
|
159
163
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
160
164
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
161
165
|
},
|
|
162
|
-
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`])) ?
|
|
166
|
+
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`])) ? _chunkYT5PFZPYjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
163
167
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
164
168
|
};
|
|
165
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
169
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkYT5PFZPYjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
166
170
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
167
171
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
168
172
|
return ret;
|
|
169
173
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
170
|
-
if (config.docs ===
|
|
171
|
-
if (config.homepage ===
|
|
172
|
-
config.docs = `${
|
|
174
|
+
if (config.docs === _chunkYT5PFZPYjs.STORM_DEFAULT_DOCS) {
|
|
175
|
+
if (config.homepage === _chunkYT5PFZPYjs.STORM_DEFAULT_HOMEPAGE) {
|
|
176
|
+
config.docs = `${_chunkYT5PFZPYjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
173
177
|
} else {
|
|
174
178
|
config.docs = `${config.homepage}/docs`;
|
|
175
179
|
}
|
|
176
180
|
}
|
|
177
|
-
if (config.licensing ===
|
|
178
|
-
if (config.homepage ===
|
|
179
|
-
config.licensing = `${
|
|
181
|
+
if (config.licensing === _chunkYT5PFZPYjs.STORM_DEFAULT_LICENSING) {
|
|
182
|
+
if (config.homepage === _chunkYT5PFZPYjs.STORM_DEFAULT_HOMEPAGE) {
|
|
183
|
+
config.licensing = `${_chunkYT5PFZPYjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
180
184
|
} else {
|
|
181
185
|
config.licensing = `${config.homepage}/docs`;
|
|
182
186
|
}
|
|
@@ -284,6 +288,10 @@ var setConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (config)
|
|
|
284
288
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
285
289
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
286
290
|
}
|
|
291
|
+
if (config.error) {
|
|
292
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
293
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
294
|
+
}
|
|
287
295
|
if (config.release) {
|
|
288
296
|
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
289
297
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
@@ -342,31 +350,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (config)
|
|
|
342
350
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
343
351
|
}
|
|
344
352
|
if (config.configFile) {
|
|
345
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
353
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkYT5PFZPYjs.correctPaths.call(void 0, config.configFile);
|
|
346
354
|
}
|
|
347
355
|
if (config.workspaceRoot) {
|
|
348
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
349
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
350
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
356
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkYT5PFZPYjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
357
|
+
process.env.NX_WORKSPACE_ROOT = _chunkYT5PFZPYjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
358
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkYT5PFZPYjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
351
359
|
}
|
|
352
360
|
if (config.directories) {
|
|
353
361
|
if (!config.skipCache && config.directories.cache) {
|
|
354
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
362
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkYT5PFZPYjs.correctPaths.call(void 0, config.directories.cache);
|
|
355
363
|
}
|
|
356
364
|
if (config.directories.data) {
|
|
357
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
365
|
+
process.env[`${prefix}DATA_DIR`] = _chunkYT5PFZPYjs.correctPaths.call(void 0, config.directories.data);
|
|
358
366
|
}
|
|
359
367
|
if (config.directories.config) {
|
|
360
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
368
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkYT5PFZPYjs.correctPaths.call(void 0, config.directories.config);
|
|
361
369
|
}
|
|
362
370
|
if (config.directories.temp) {
|
|
363
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
371
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkYT5PFZPYjs.correctPaths.call(void 0, config.directories.temp);
|
|
364
372
|
}
|
|
365
373
|
if (config.directories.log) {
|
|
366
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
374
|
+
process.env[`${prefix}LOG_DIR`] = _chunkYT5PFZPYjs.correctPaths.call(void 0, config.directories.log);
|
|
367
375
|
}
|
|
368
376
|
if (config.directories.build) {
|
|
369
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
377
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkYT5PFZPYjs.correctPaths.call(void 0, config.directories.build);
|
|
370
378
|
}
|
|
371
379
|
}
|
|
372
380
|
if (config.skipCache !== void 0) {
|
|
@@ -414,14 +422,14 @@ var setConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (config)
|
|
|
414
422
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
|
|
415
423
|
}
|
|
416
424
|
if (config.registry.container) {
|
|
417
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.
|
|
425
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
|
|
418
426
|
}
|
|
419
427
|
}
|
|
420
428
|
if (config.logLevel) {
|
|
421
429
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
422
430
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
423
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
424
|
-
process.env.RUST_BACKTRACE =
|
|
431
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunkYT5PFZPYjs.getLogLevel.call(void 0, config.logLevel) >= _chunkYT5PFZPYjs.LogLevel.DEBUG ? true : false);
|
|
432
|
+
process.env.RUST_BACKTRACE = _chunkYT5PFZPYjs.getLogLevel.call(void 0, config.logLevel) >= _chunkYT5PFZPYjs.LogLevel.DEBUG ? "full" : "none";
|
|
425
433
|
}
|
|
426
434
|
if (config.skipConfigLogging !== void 0) {
|
|
427
435
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
@@ -539,17 +547,17 @@ var createStormWorkspaceConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(vo
|
|
|
539
547
|
if (!_optionalChain([_static_cache, 'optionalAccess', _29 => _29.data]) || !_optionalChain([_static_cache, 'optionalAccess', _30 => _30.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
540
548
|
let _workspaceRoot = workspaceRoot;
|
|
541
549
|
if (!_workspaceRoot) {
|
|
542
|
-
_workspaceRoot =
|
|
550
|
+
_workspaceRoot = _chunkYT5PFZPYjs.findWorkspaceRoot.call(void 0, );
|
|
543
551
|
}
|
|
544
552
|
const configEnv = getConfigEnv();
|
|
545
|
-
const defaultConfig = await
|
|
553
|
+
const defaultConfig = await _chunkYT5PFZPYjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
546
554
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
547
555
|
if (!configFile && !skipLogs) {
|
|
548
|
-
|
|
556
|
+
_chunkYT5PFZPYjs.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", {
|
|
549
557
|
logLevel: "all"
|
|
550
558
|
});
|
|
551
559
|
}
|
|
552
|
-
result = await
|
|
560
|
+
result = await _chunkYT5PFZPYjs.stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
553
561
|
result.workspaceRoot ??= _workspaceRoot;
|
|
554
562
|
} else {
|
|
555
563
|
result = _static_cache.data;
|
|
@@ -584,8 +592,8 @@ var loadStormWorkspaceConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void
|
|
|
584
592
|
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
585
593
|
setConfigEnv(config);
|
|
586
594
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
587
|
-
|
|
588
|
-
${
|
|
595
|
+
_chunkYT5PFZPYjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
596
|
+
${_chunkYT5PFZPYjs.formatLogMessage.call(void 0, config)}`, config);
|
|
589
597
|
}
|
|
590
598
|
return config;
|
|
591
599
|
}, "loadStormWorkspaceConfig");
|
|
@@ -604,7 +612,7 @@ var readNxConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (w
|
|
|
604
612
|
const config = await getConfig();
|
|
605
613
|
rootDir = config.workspaceRoot;
|
|
606
614
|
}
|
|
607
|
-
const nxJsonPath =
|
|
615
|
+
const nxJsonPath = _chunkYT5PFZPYjs.joinPaths.call(void 0, rootDir, "nx.json");
|
|
608
616
|
if (!_fs.existsSync.call(void 0, nxJsonPath)) {
|
|
609
617
|
throw new Error("Cannot find project.json configuration");
|
|
610
618
|
}
|
|
@@ -366,6 +366,10 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
|
366
366
|
log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
367
367
|
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)")
|
|
368
368
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
369
|
+
var errorConfigSchema = _zod2.default.object({
|
|
370
|
+
codesFile: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("The path to the workspace's error codes JSON file"),
|
|
371
|
+
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")
|
|
372
|
+
}).describe("The workspace's error config used during the error process");
|
|
369
373
|
var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
370
374
|
$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"),
|
|
371
375
|
extends: ExtendsSchema.optional(),
|
|
@@ -384,6 +388,7 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
384
388
|
bot: WorkspaceBotConfigSchema,
|
|
385
389
|
release: WorkspaceReleaseConfigSchema,
|
|
386
390
|
account: WorkspaceAccountConfigSchema,
|
|
391
|
+
error: errorConfigSchema,
|
|
387
392
|
mode: _zod2.default.enum([
|
|
388
393
|
"development",
|
|
389
394
|
"staging",
|
|
@@ -510,7 +515,10 @@ var getDefaultConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, asyn
|
|
|
510
515
|
license,
|
|
511
516
|
homepage,
|
|
512
517
|
docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
513
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license
|
|
518
|
+
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
519
|
+
error: {
|
|
520
|
+
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
521
|
+
}
|
|
514
522
|
};
|
|
515
523
|
}, "getDefaultConfig");
|
|
516
524
|
|