@storm-software/unbuild 0.38.8 → 0.38.9
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/unbuild.cjs +18 -2
- package/bin/unbuild.js +18 -2
- package/dist/build.cjs +7 -7
- package/dist/build.js +6 -6
- package/dist/{chunk-WSXJ22NQ.cjs → chunk-4D3WT42N.cjs} +9 -1
- package/dist/{chunk-AHQIGTFC.cjs → chunk-BN66ODNO.cjs} +2 -2
- package/dist/{chunk-G62UH6SY.js → chunk-E2YD3WEP.js} +1 -1
- package/dist/{chunk-VDERNXXY.cjs → chunk-E74YDPSV.cjs} +3 -3
- package/dist/{chunk-WVSYK2DF.js → chunk-J7FICDDC.js} +1 -1
- package/dist/{chunk-TDDFO4FC.js → chunk-KAJDWNIA.js} +1 -1
- package/dist/{chunk-CYX4LFNQ.cjs → chunk-KV76QDPT.cjs} +2 -2
- package/dist/{chunk-7G3BCJIK.js → chunk-LDA6WRJV.js} +14 -6
- package/dist/{chunk-SIR4O5JK.cjs → chunk-LVUMWCBV.cjs} +109 -101
- package/dist/{chunk-XM5UE2GX.cjs → chunk-WCQ3HMVK.cjs} +3 -3
- package/dist/{chunk-3FANH6ED.js → chunk-WH7FLZNL.js} +9 -1
- package/dist/{chunk-XBFAUJGO.js → chunk-ZL24I2TF.js} +1 -1
- package/dist/clean.cjs +3 -3
- package/dist/clean.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/dist/plugins/analyze.cjs +3 -3
- package/dist/plugins/analyze.js +2 -2
- package/dist/plugins/on-error.cjs +3 -3
- package/dist/plugins/on-error.js +2 -2
- package/dist/plugins/tsc.cjs +3 -3
- package/dist/plugins/tsc.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/unbuild.cjs
CHANGED
|
@@ -156,6 +156,10 @@ var WorkspaceDirectoryConfigSchema = import_zod.default.object({
|
|
|
156
156
|
log: import_zod.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
157
157
|
build: import_zod.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
158
158
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
159
|
+
var errorConfigSchema = import_zod.default.object({
|
|
160
|
+
codesFile: import_zod.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("The path to the workspace's error codes JSON file"),
|
|
161
|
+
url: import_zod.default.string().trim().url().optional().describe("A URL to a page that looks up the workspace's error messages given a specific error code")
|
|
162
|
+
}).describe("The workspace's error config used during the error process");
|
|
159
163
|
var stormWorkspaceConfigSchema = import_zod.default.object({
|
|
160
164
|
$schema: import_zod.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"),
|
|
161
165
|
extends: ExtendsSchema.optional(),
|
|
@@ -174,6 +178,7 @@ var stormWorkspaceConfigSchema = import_zod.default.object({
|
|
|
174
178
|
bot: WorkspaceBotConfigSchema,
|
|
175
179
|
release: WorkspaceReleaseConfigSchema,
|
|
176
180
|
account: WorkspaceAccountConfigSchema,
|
|
181
|
+
error: errorConfigSchema,
|
|
177
182
|
mode: import_zod.default.enum([
|
|
178
183
|
"development",
|
|
179
184
|
"staging",
|
|
@@ -542,7 +547,10 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
542
547
|
license,
|
|
543
548
|
homepage,
|
|
544
549
|
docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
545
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license
|
|
550
|
+
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
551
|
+
error: {
|
|
552
|
+
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
553
|
+
}
|
|
546
554
|
};
|
|
547
555
|
}, "getDefaultConfig");
|
|
548
556
|
|
|
@@ -885,6 +893,10 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
885
893
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
886
894
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
887
895
|
},
|
|
896
|
+
error: {
|
|
897
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
898
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
899
|
+
},
|
|
888
900
|
account: {
|
|
889
901
|
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
890
902
|
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
@@ -1058,6 +1070,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
1058
1070
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
1059
1071
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
1060
1072
|
}
|
|
1073
|
+
if (config.error) {
|
|
1074
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
1075
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
1076
|
+
}
|
|
1061
1077
|
if (config.release) {
|
|
1062
1078
|
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
1063
1079
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
@@ -1188,7 +1204,7 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
1188
1204
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
|
|
1189
1205
|
}
|
|
1190
1206
|
if (config.registry.container) {
|
|
1191
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.
|
|
1207
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
|
|
1192
1208
|
}
|
|
1193
1209
|
}
|
|
1194
1210
|
if (config.logLevel) {
|
package/bin/unbuild.js
CHANGED
|
@@ -135,6 +135,10 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
135
135
|
log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
136
136
|
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)")
|
|
137
137
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
138
|
+
var errorConfigSchema = z.object({
|
|
139
|
+
codesFile: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("The path to the workspace's error codes JSON file"),
|
|
140
|
+
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")
|
|
141
|
+
}).describe("The workspace's error config used during the error process");
|
|
138
142
|
var stormWorkspaceConfigSchema = z.object({
|
|
139
143
|
$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"),
|
|
140
144
|
extends: ExtendsSchema.optional(),
|
|
@@ -153,6 +157,7 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
153
157
|
bot: WorkspaceBotConfigSchema,
|
|
154
158
|
release: WorkspaceReleaseConfigSchema,
|
|
155
159
|
account: WorkspaceAccountConfigSchema,
|
|
160
|
+
error: errorConfigSchema,
|
|
156
161
|
mode: z.enum([
|
|
157
162
|
"development",
|
|
158
163
|
"staging",
|
|
@@ -521,7 +526,10 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
521
526
|
license,
|
|
522
527
|
homepage,
|
|
523
528
|
docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
524
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license
|
|
529
|
+
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
530
|
+
error: {
|
|
531
|
+
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
532
|
+
}
|
|
525
533
|
};
|
|
526
534
|
}, "getDefaultConfig");
|
|
527
535
|
|
|
@@ -864,6 +872,10 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
864
872
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
865
873
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
866
874
|
},
|
|
875
|
+
error: {
|
|
876
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
877
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
878
|
+
},
|
|
867
879
|
account: {
|
|
868
880
|
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
869
881
|
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
@@ -1037,6 +1049,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
1037
1049
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
1038
1050
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
1039
1051
|
}
|
|
1052
|
+
if (config.error) {
|
|
1053
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
1054
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
1055
|
+
}
|
|
1040
1056
|
if (config.release) {
|
|
1041
1057
|
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
1042
1058
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
@@ -1167,7 +1183,7 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
1167
1183
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
|
|
1168
1184
|
}
|
|
1169
1185
|
if (config.registry.container) {
|
|
1170
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.
|
|
1186
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
|
|
1171
1187
|
}
|
|
1172
1188
|
}
|
|
1173
1189
|
if (config.logLevel) {
|
package/dist/build.cjs
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
8
|
+
var _chunkLVUMWCBVcjs = require('./chunk-LVUMWCBV.cjs');
|
|
9
|
+
require('./chunk-E74YDPSV.cjs');
|
|
10
|
+
require('./chunk-BN66ODNO.cjs');
|
|
11
|
+
require('./chunk-WCQ3HMVK.cjs');
|
|
12
|
+
require('./chunk-KV76QDPT.cjs');
|
|
13
|
+
require('./chunk-4D3WT42N.cjs');
|
|
14
14
|
require('./chunk-BGYQAVKQ.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
@@ -19,4 +19,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
exports.build =
|
|
22
|
+
exports.build = _chunkLVUMWCBVcjs.build; exports.cleanOutputPath = _chunkLVUMWCBVcjs.cleanOutputPath; exports.copyBuildAssets = _chunkLVUMWCBVcjs.copyBuildAssets; exports.executeUnbuild = _chunkLVUMWCBVcjs.executeUnbuild; exports.generatePackageJson = _chunkLVUMWCBVcjs.generatePackageJson; exports.resolveOptions = _chunkLVUMWCBVcjs.resolveOptions;
|
package/dist/build.js
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-LDA6WRJV.js";
|
|
9
|
+
import "./chunk-ZL24I2TF.js";
|
|
10
|
+
import "./chunk-KAJDWNIA.js";
|
|
11
|
+
import "./chunk-J7FICDDC.js";
|
|
12
|
+
import "./chunk-E2YD3WEP.js";
|
|
13
|
+
import "./chunk-WH7FLZNL.js";
|
|
14
14
|
import "./chunk-3GQAWCBQ.js";
|
|
15
15
|
export {
|
|
16
16
|
build,
|
|
@@ -339,6 +339,10 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
|
339
339
|
log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
340
340
|
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)")
|
|
341
341
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
342
|
+
var errorConfigSchema = _zod2.default.object({
|
|
343
|
+
codesFile: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("The path to the workspace's error codes JSON file"),
|
|
344
|
+
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")
|
|
345
|
+
}).describe("The workspace's error config used during the error process");
|
|
342
346
|
var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
343
347
|
$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"),
|
|
344
348
|
extends: ExtendsSchema.optional(),
|
|
@@ -357,6 +361,7 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
357
361
|
bot: WorkspaceBotConfigSchema,
|
|
358
362
|
release: WorkspaceReleaseConfigSchema,
|
|
359
363
|
account: WorkspaceAccountConfigSchema,
|
|
364
|
+
error: errorConfigSchema,
|
|
360
365
|
mode: _zod2.default.enum([
|
|
361
366
|
"development",
|
|
362
367
|
"staging",
|
|
@@ -567,7 +572,10 @@ var getDefaultConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, asy
|
|
|
567
572
|
license,
|
|
568
573
|
homepage,
|
|
569
574
|
docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
570
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license
|
|
575
|
+
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
576
|
+
error: {
|
|
577
|
+
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
578
|
+
}
|
|
571
579
|
};
|
|
572
580
|
}, "getDefaultConfig");
|
|
573
581
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk4D3WT42Ncjs = require('./chunk-4D3WT42N.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -25,7 +25,7 @@ var analyzePlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (optio
|
|
|
25
25
|
renderChunk(source, chunk) {
|
|
26
26
|
const sourceBytes = formatBytes(source.length);
|
|
27
27
|
const fileName = chunk.fileName;
|
|
28
|
-
|
|
28
|
+
_chunk4D3WT42Ncjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, options.config);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
}, "analyzePlugin");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk4D3WT42Ncjs = require('./chunk-4D3WT42N.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -9,8 +9,8 @@ var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
|
9
9
|
// src/clean.ts
|
|
10
10
|
var _promises = require('fs/promises');
|
|
11
11
|
async function clean(name = "Unbuild", directory, config) {
|
|
12
|
-
|
|
13
|
-
const stopwatch =
|
|
12
|
+
_chunk4D3WT42Ncjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
13
|
+
const stopwatch = _chunk4D3WT42Ncjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
14
14
|
await cleanDirectories(name, directory, config);
|
|
15
15
|
stopwatch();
|
|
16
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk4D3WT42Ncjs = require('./chunk-4D3WT42N.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -32,7 +32,7 @@ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, depend
|
|
|
32
32
|
declaration: true,
|
|
33
33
|
paths: _buildablelibsutils.computeCompilerOptionsPaths.call(void 0, tsConfig, _nullishCoalesce(dependencies, () => ( [])))
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
_chunk4D3WT42Ncjs.writeTrace.call(void 0, compilerOptions, config);
|
|
36
36
|
return compilerOptions;
|
|
37
37
|
}
|
|
38
38
|
_chunkBGYQAVKQcjs.__name.call(void 0, createTsCompilerOptions, "createTsCompilerOptions");
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cleanDirectories
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZL24I2TF.js";
|
|
4
4
|
import {
|
|
5
5
|
analyzePlugin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KAJDWNIA.js";
|
|
7
7
|
import {
|
|
8
8
|
onErrorPlugin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-J7FICDDC.js";
|
|
10
10
|
import {
|
|
11
11
|
loadConfig,
|
|
12
12
|
tscPlugin
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-E2YD3WEP.js";
|
|
14
14
|
import {
|
|
15
15
|
COLOR_KEYS,
|
|
16
16
|
LogLevel,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
writeSuccess,
|
|
34
34
|
writeTrace,
|
|
35
35
|
writeWarning
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-WH7FLZNL.js";
|
|
37
37
|
import {
|
|
38
38
|
__name
|
|
39
39
|
} from "./chunk-3GQAWCBQ.js";
|
|
@@ -311,6 +311,10 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
311
311
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
312
312
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
313
313
|
},
|
|
314
|
+
error: {
|
|
315
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
316
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
317
|
+
},
|
|
314
318
|
account: {
|
|
315
319
|
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
316
320
|
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
@@ -484,6 +488,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
484
488
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
485
489
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
486
490
|
}
|
|
491
|
+
if (config.error) {
|
|
492
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
493
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
494
|
+
}
|
|
487
495
|
if (config.release) {
|
|
488
496
|
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
489
497
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
@@ -614,7 +622,7 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
614
622
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
|
|
615
623
|
}
|
|
616
624
|
if (config.registry.container) {
|
|
617
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.
|
|
625
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
|
|
618
626
|
}
|
|
619
627
|
}
|
|
620
628
|
if (config.logLevel) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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 _chunkE74YDPSVcjs = require('./chunk-E74YDPSV.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkBN66ODNOcjs = require('./chunk-BN66ODNO.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkWCQ3HMVKcjs = require('./chunk-WCQ3HMVK.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkKV76QDPTcjs = require('./chunk-KV76QDPT.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -33,7 +33,7 @@ var _chunkCYX4LFNQcjs = require('./chunk-CYX4LFNQ.cjs');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunk4D3WT42Ncjs = require('./chunk-4D3WT42N.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -86,8 +86,8 @@ var copyAssets = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (co
|
|
|
86
86
|
output: "src/"
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
-
|
|
90
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
89
|
+
_chunk4D3WT42Ncjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
90
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunk4D3WT42Ncjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
91
91
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
92
92
|
projectDir: projectRoot,
|
|
93
93
|
rootDir: config.workspaceRoot,
|
|
@@ -96,12 +96,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
96
96
|
});
|
|
97
97
|
await assetHandler.processAllAssetsOnce();
|
|
98
98
|
if (includeSrc === true) {
|
|
99
|
-
|
|
99
|
+
_chunk4D3WT42Ncjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunk4D3WT42Ncjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
100
100
|
const files = await _glob.glob.call(void 0, [
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
_chunk4D3WT42Ncjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
102
|
+
_chunk4D3WT42Ncjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
103
|
+
_chunk4D3WT42Ncjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
104
|
+
_chunk4D3WT42Ncjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
105
105
|
]);
|
|
106
106
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
107
107
|
|
|
@@ -124,7 +124,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
124
124
|
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)) {
|
|
125
125
|
const projectNode = project.node;
|
|
126
126
|
if (projectNode.data.root) {
|
|
127
|
-
const projectPackageJsonPath =
|
|
127
|
+
const projectPackageJsonPath = _chunk4D3WT42Ncjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
|
|
128
128
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
129
129
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
130
130
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -135,8 +135,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
if (localPackages.length > 0) {
|
|
138
|
-
|
|
139
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
138
|
+
_chunk4D3WT42Ncjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
139
|
+
const projectJsonFile = await _promises.readFile.call(void 0, _chunk4D3WT42Ncjs.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
140
140
|
const projectJson = JSON.parse(projectJsonFile);
|
|
141
141
|
const projectName2 = projectJson.name;
|
|
142
142
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
@@ -145,7 +145,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
145
145
|
}
|
|
146
146
|
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) => {
|
|
147
147
|
if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
|
|
148
|
-
const depPackageJsonPath =
|
|
148
|
+
const depPackageJsonPath = _chunk4D3WT42Ncjs.joinPaths.call(void 0, workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
|
|
149
149
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
150
150
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
151
151
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
@@ -169,13 +169,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
169
169
|
return ret;
|
|
170
170
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
171
171
|
} else {
|
|
172
|
-
|
|
172
|
+
_chunk4D3WT42Ncjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
173
173
|
}
|
|
174
174
|
return packageJson;
|
|
175
175
|
}, "addPackageDependencies");
|
|
176
176
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
177
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
178
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
177
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk4D3WT42Ncjs.findWorkspaceRoot.call(void 0, );
|
|
178
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunk4D3WT42Ncjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
179
179
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
180
180
|
packageJson.type ??= "module";
|
|
181
181
|
packageJson.sideEffects ??= false;
|
|
@@ -184,7 +184,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
|
|
|
184
184
|
if (distSrc.startsWith("/")) {
|
|
185
185
|
distSrc = distSrc.substring(1);
|
|
186
186
|
}
|
|
187
|
-
packageJson.source ??= `${
|
|
187
|
+
packageJson.source ??= `${_chunk4D3WT42Ncjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
188
188
|
}
|
|
189
189
|
packageJson.files ??= [
|
|
190
190
|
"dist/**/*"
|
|
@@ -215,7 +215,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
|
|
|
215
215
|
];
|
|
216
216
|
}
|
|
217
217
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
218
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
218
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk4D3WT42Ncjs.joinPaths.call(void 0, "packages", projectName);
|
|
219
219
|
return packageJson;
|
|
220
220
|
}, "addWorkspacePackageJsonFields");
|
|
221
221
|
|
|
@@ -223,7 +223,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
|
|
|
223
223
|
var _c12 = require('c12');
|
|
224
224
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
225
225
|
var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
226
|
-
const workspacePath = filePath ||
|
|
226
|
+
const workspacePath = filePath || _chunk4D3WT42Ncjs.findWorkspaceRoot.call(void 0, filePath);
|
|
227
227
|
const configs = await Promise.all([
|
|
228
228
|
_c12.loadConfig.call(void 0, {
|
|
229
229
|
cwd: workspacePath,
|
|
@@ -232,7 +232,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
232
232
|
envName: _optionalChain([fileName, 'optionalAccess', _24 => _24.toUpperCase, 'call', _25 => _25()]),
|
|
233
233
|
jitiOptions: {
|
|
234
234
|
debug: false,
|
|
235
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
235
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk4D3WT42Ncjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
236
236
|
},
|
|
237
237
|
...options
|
|
238
238
|
}),
|
|
@@ -243,7 +243,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
243
243
|
envName: _optionalChain([fileName, 'optionalAccess', _26 => _26.toUpperCase, 'call', _27 => _27()]),
|
|
244
244
|
jitiOptions: {
|
|
245
245
|
debug: false,
|
|
246
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
246
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk4D3WT42Ncjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
247
247
|
},
|
|
248
248
|
configFile: fileName,
|
|
249
249
|
...options
|
|
@@ -252,12 +252,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
252
252
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
253
253
|
}, "getConfigFileByName");
|
|
254
254
|
var getConfigFile = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
255
|
-
const workspacePath = filePath ? filePath :
|
|
255
|
+
const workspacePath = filePath ? filePath : _chunk4D3WT42Ncjs.findWorkspaceRoot.call(void 0, filePath);
|
|
256
256
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
257
257
|
let config = result.config;
|
|
258
258
|
const configFile = result.configFile;
|
|
259
259
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
260
|
-
|
|
260
|
+
_chunk4D3WT42Ncjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
261
261
|
logLevel: "all"
|
|
262
262
|
});
|
|
263
263
|
}
|
|
@@ -266,7 +266,7 @@ var getConfigFile = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
266
266
|
for (const result2 of results) {
|
|
267
267
|
if (_optionalChain([result2, 'optionalAccess', _28 => _28.config]) && _optionalChain([result2, 'optionalAccess', _29 => _29.configFile]) && Object.keys(result2.config).length > 0) {
|
|
268
268
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
269
|
-
|
|
269
|
+
_chunk4D3WT42Ncjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
270
270
|
logLevel: "all"
|
|
271
271
|
});
|
|
272
272
|
}
|
|
@@ -311,6 +311,10 @@ var getConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
|
|
|
311
311
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
312
312
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
313
313
|
},
|
|
314
|
+
error: {
|
|
315
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
316
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
317
|
+
},
|
|
314
318
|
account: {
|
|
315
319
|
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
316
320
|
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
@@ -328,15 +332,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
|
|
|
328
332
|
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
329
333
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
330
334
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
331
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
332
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
335
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunk4D3WT42Ncjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
336
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunk4D3WT42Ncjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
333
337
|
directories: {
|
|
334
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
335
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
336
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
337
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
338
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
339
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
338
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunk4D3WT42Ncjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
339
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunk4D3WT42Ncjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
340
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunk4D3WT42Ncjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
341
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunk4D3WT42Ncjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
342
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunk4D3WT42Ncjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
343
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunk4D3WT42Ncjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
340
344
|
},
|
|
341
345
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
342
346
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -359,24 +363,24 @@ var getConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
|
|
|
359
363
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
360
364
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
361
365
|
},
|
|
362
|
-
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`])) ?
|
|
366
|
+
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`])) ? _chunk4D3WT42Ncjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
363
367
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
364
368
|
};
|
|
365
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
369
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunk4D3WT42Ncjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
366
370
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
367
371
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
368
372
|
return ret;
|
|
369
373
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
370
|
-
if (config.docs ===
|
|
371
|
-
if (config.homepage ===
|
|
372
|
-
config.docs = `${
|
|
374
|
+
if (config.docs === _chunk4D3WT42Ncjs.STORM_DEFAULT_DOCS) {
|
|
375
|
+
if (config.homepage === _chunk4D3WT42Ncjs.STORM_DEFAULT_HOMEPAGE) {
|
|
376
|
+
config.docs = `${_chunk4D3WT42Ncjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
373
377
|
} else {
|
|
374
378
|
config.docs = `${config.homepage}/docs`;
|
|
375
379
|
}
|
|
376
380
|
}
|
|
377
|
-
if (config.licensing ===
|
|
378
|
-
if (config.homepage ===
|
|
379
|
-
config.licensing = `${
|
|
381
|
+
if (config.licensing === _chunk4D3WT42Ncjs.STORM_DEFAULT_LICENSING) {
|
|
382
|
+
if (config.homepage === _chunk4D3WT42Ncjs.STORM_DEFAULT_HOMEPAGE) {
|
|
383
|
+
config.licensing = `${_chunk4D3WT42Ncjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
380
384
|
} else {
|
|
381
385
|
config.licensing = `${config.homepage}/docs`;
|
|
382
386
|
}
|
|
@@ -484,6 +488,10 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
484
488
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
485
489
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
486
490
|
}
|
|
491
|
+
if (config.error) {
|
|
492
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
493
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
494
|
+
}
|
|
487
495
|
if (config.release) {
|
|
488
496
|
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
489
497
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
@@ -542,31 +550,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
542
550
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
543
551
|
}
|
|
544
552
|
if (config.configFile) {
|
|
545
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
553
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunk4D3WT42Ncjs.correctPaths.call(void 0, config.configFile);
|
|
546
554
|
}
|
|
547
555
|
if (config.workspaceRoot) {
|
|
548
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
549
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
550
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
556
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunk4D3WT42Ncjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
557
|
+
process.env.NX_WORKSPACE_ROOT = _chunk4D3WT42Ncjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
558
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunk4D3WT42Ncjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
551
559
|
}
|
|
552
560
|
if (config.directories) {
|
|
553
561
|
if (!config.skipCache && config.directories.cache) {
|
|
554
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
562
|
+
process.env[`${prefix}CACHE_DIR`] = _chunk4D3WT42Ncjs.correctPaths.call(void 0, config.directories.cache);
|
|
555
563
|
}
|
|
556
564
|
if (config.directories.data) {
|
|
557
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
565
|
+
process.env[`${prefix}DATA_DIR`] = _chunk4D3WT42Ncjs.correctPaths.call(void 0, config.directories.data);
|
|
558
566
|
}
|
|
559
567
|
if (config.directories.config) {
|
|
560
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
568
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunk4D3WT42Ncjs.correctPaths.call(void 0, config.directories.config);
|
|
561
569
|
}
|
|
562
570
|
if (config.directories.temp) {
|
|
563
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
571
|
+
process.env[`${prefix}TEMP_DIR`] = _chunk4D3WT42Ncjs.correctPaths.call(void 0, config.directories.temp);
|
|
564
572
|
}
|
|
565
573
|
if (config.directories.log) {
|
|
566
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
574
|
+
process.env[`${prefix}LOG_DIR`] = _chunk4D3WT42Ncjs.correctPaths.call(void 0, config.directories.log);
|
|
567
575
|
}
|
|
568
576
|
if (config.directories.build) {
|
|
569
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
577
|
+
process.env[`${prefix}BUILD_DIR`] = _chunk4D3WT42Ncjs.correctPaths.call(void 0, config.directories.build);
|
|
570
578
|
}
|
|
571
579
|
}
|
|
572
580
|
if (config.skipCache !== void 0) {
|
|
@@ -614,14 +622,14 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
614
622
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
|
|
615
623
|
}
|
|
616
624
|
if (config.registry.container) {
|
|
617
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.
|
|
625
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
|
|
618
626
|
}
|
|
619
627
|
}
|
|
620
628
|
if (config.logLevel) {
|
|
621
629
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
622
630
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
623
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
624
|
-
process.env.RUST_BACKTRACE =
|
|
631
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunk4D3WT42Ncjs.getLogLevel.call(void 0, config.logLevel) >= _chunk4D3WT42Ncjs.LogLevel.DEBUG ? true : false);
|
|
632
|
+
process.env.RUST_BACKTRACE = _chunk4D3WT42Ncjs.getLogLevel.call(void 0, config.logLevel) >= _chunk4D3WT42Ncjs.LogLevel.DEBUG ? "full" : "none";
|
|
625
633
|
}
|
|
626
634
|
if (config.skipConfigLogging !== void 0) {
|
|
627
635
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
@@ -739,17 +747,17 @@ var createStormWorkspaceConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(v
|
|
|
739
747
|
if (!_optionalChain([_static_cache, 'optionalAccess', _52 => _52.data]) || !_optionalChain([_static_cache, 'optionalAccess', _53 => _53.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
740
748
|
let _workspaceRoot = workspaceRoot;
|
|
741
749
|
if (!_workspaceRoot) {
|
|
742
|
-
_workspaceRoot =
|
|
750
|
+
_workspaceRoot = _chunk4D3WT42Ncjs.findWorkspaceRoot.call(void 0, );
|
|
743
751
|
}
|
|
744
752
|
const configEnv = getConfigEnv();
|
|
745
|
-
const defaultConfig = await
|
|
753
|
+
const defaultConfig = await _chunk4D3WT42Ncjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
746
754
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
747
755
|
if (!configFile && !skipLogs) {
|
|
748
|
-
|
|
756
|
+
_chunk4D3WT42Ncjs.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", {
|
|
749
757
|
logLevel: "all"
|
|
750
758
|
});
|
|
751
759
|
}
|
|
752
|
-
result = await
|
|
760
|
+
result = await _chunk4D3WT42Ncjs.stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
753
761
|
result.workspaceRoot ??= _workspaceRoot;
|
|
754
762
|
} else {
|
|
755
763
|
result = _static_cache.data;
|
|
@@ -784,8 +792,8 @@ var loadStormWorkspaceConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(voi
|
|
|
784
792
|
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
785
793
|
setConfigEnv(config);
|
|
786
794
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
787
|
-
|
|
788
|
-
${
|
|
795
|
+
_chunk4D3WT42Ncjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
796
|
+
${_chunk4D3WT42Ncjs.formatLogMessage.call(void 0, config)}`, config);
|
|
789
797
|
}
|
|
790
798
|
return config;
|
|
791
799
|
}, "loadStormWorkspaceConfig");
|
|
@@ -814,24 +822,24 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
|
814
822
|
var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
815
823
|
var _unbuild = require('unbuild');
|
|
816
824
|
async function resolveOptions(options, config) {
|
|
817
|
-
|
|
818
|
-
const stopwatch =
|
|
825
|
+
_chunk4D3WT42Ncjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
826
|
+
const stopwatch = _chunk4D3WT42Ncjs.getStopwatch.call(void 0, "Build options resolution");
|
|
819
827
|
if (options.configPath) {
|
|
820
|
-
const configFile = await
|
|
828
|
+
const configFile = await _chunkKV76QDPTcjs.loadConfig.call(void 0, options.configPath);
|
|
821
829
|
if (configFile) {
|
|
822
830
|
options = _defu2.default.call(void 0, options, configFile);
|
|
823
831
|
}
|
|
824
832
|
}
|
|
825
|
-
const outputPath = options.outputPath ||
|
|
833
|
+
const outputPath = options.outputPath || _chunk4D3WT42Ncjs.joinPaths.call(void 0, "dist", options.projectRoot);
|
|
826
834
|
const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
827
|
-
const projectJsonPath =
|
|
835
|
+
const projectJsonPath = _chunk4D3WT42Ncjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot, "project.json");
|
|
828
836
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
829
837
|
throw new Error("Cannot find project.json configuration");
|
|
830
838
|
}
|
|
831
839
|
const projectJsonContent = await _promises.readFile.call(void 0, projectJsonPath, "utf8");
|
|
832
840
|
const projectJson = JSON.parse(projectJsonContent);
|
|
833
841
|
const projectName = projectJson.name;
|
|
834
|
-
const packageJsonPath =
|
|
842
|
+
const packageJsonPath = _chunk4D3WT42Ncjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot, "package.json");
|
|
835
843
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
836
844
|
throw new Error("Cannot find package.json configuration");
|
|
837
845
|
}
|
|
@@ -839,17 +847,17 @@ async function resolveOptions(options, config) {
|
|
|
839
847
|
const packageJson = JSON.parse(packageJsonContent);
|
|
840
848
|
let tsconfig = options.tsconfig;
|
|
841
849
|
if (!tsconfig) {
|
|
842
|
-
tsconfig =
|
|
850
|
+
tsconfig = _chunk4D3WT42Ncjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json");
|
|
843
851
|
}
|
|
844
852
|
if (!tsconfig.startsWith(config.workspaceRoot)) {
|
|
845
|
-
tsconfig =
|
|
853
|
+
tsconfig = _chunk4D3WT42Ncjs.joinPaths.call(void 0, config.workspaceRoot, tsconfig);
|
|
846
854
|
}
|
|
847
855
|
if (!_fs.existsSync.call(void 0, tsconfig)) {
|
|
848
856
|
throw new Error("Cannot find tsconfig.json configuration");
|
|
849
857
|
}
|
|
850
858
|
let sourceRoot = projectJson.sourceRoot;
|
|
851
859
|
if (!sourceRoot) {
|
|
852
|
-
sourceRoot =
|
|
860
|
+
sourceRoot = _chunk4D3WT42Ncjs.joinPaths.call(void 0, options.projectRoot, "src");
|
|
853
861
|
}
|
|
854
862
|
if (!_fs.existsSync.call(void 0, sourceRoot)) {
|
|
855
863
|
throw new Error("Cannot find sourceRoot directory");
|
|
@@ -884,7 +892,7 @@ async function resolveOptions(options, config) {
|
|
|
884
892
|
while (entryPath.startsWith("/")) {
|
|
885
893
|
entryPath = entryPath.substring(1);
|
|
886
894
|
}
|
|
887
|
-
const outDir =
|
|
895
|
+
const outDir = _chunk4D3WT42Ncjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunk4D3WT42Ncjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist");
|
|
888
896
|
ret.push({
|
|
889
897
|
name: `${name}-esm`,
|
|
890
898
|
builder: "mkdist",
|
|
@@ -958,7 +966,7 @@ async function resolveOptions(options, config) {
|
|
|
958
966
|
treeShaking: options.treeShaking !== false,
|
|
959
967
|
platform: options.platform || "neutral",
|
|
960
968
|
color: true,
|
|
961
|
-
logLevel: config.logLevel ===
|
|
969
|
+
logLevel: config.logLevel === _chunk4D3WT42Ncjs.LogLevelLabel.FATAL ? _chunk4D3WT42Ncjs.LogLevelLabel.ERROR : _chunk4D3WT42Ncjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
|
|
962
970
|
}
|
|
963
971
|
}
|
|
964
972
|
};
|
|
@@ -975,7 +983,7 @@ async function resolveOptions(options, config) {
|
|
|
975
983
|
if (options.rollup) {
|
|
976
984
|
let rollup = {};
|
|
977
985
|
if (typeof options.rollup === "string") {
|
|
978
|
-
const rollupFile = await
|
|
986
|
+
const rollupFile = await _chunkKV76QDPTcjs.loadConfig.call(void 0, options.rollup);
|
|
979
987
|
if (rollupFile) {
|
|
980
988
|
rollup = rollupFile;
|
|
981
989
|
}
|
|
@@ -987,14 +995,14 @@ async function resolveOptions(options, config) {
|
|
|
987
995
|
resolvedOptions.hooks = {
|
|
988
996
|
"rollup:options": /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (ctx, opts) => {
|
|
989
997
|
if (options.plugins && options.plugins.length > 0) {
|
|
990
|
-
|
|
998
|
+
_chunk4D3WT42Ncjs.writeDebug.call(void 0, ` \u{1F9E9} Found ${options.plugins.length} plugins in provided build options`, config);
|
|
991
999
|
opts.plugins = options.plugins;
|
|
992
1000
|
} else {
|
|
993
|
-
|
|
1001
|
+
_chunk4D3WT42Ncjs.writeDebug.call(void 0, ` \u{1F9E9} No plugins found in provided build options, using default plugins`, config);
|
|
994
1002
|
opts.plugins = await Promise.all([
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1003
|
+
_chunkBN66ODNOcjs.analyzePlugin.call(void 0, resolvedOptions),
|
|
1004
|
+
_chunkKV76QDPTcjs.tscPlugin.call(void 0, resolvedOptions),
|
|
1005
|
+
_chunkWCQ3HMVKcjs.onErrorPlugin.call(void 0, resolvedOptions)
|
|
998
1006
|
]);
|
|
999
1007
|
}
|
|
1000
1008
|
}, "rollup:options"),
|
|
@@ -1047,14 +1055,14 @@ var addPackageJsonExport = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
1047
1055
|
};
|
|
1048
1056
|
}, "addPackageJsonExport");
|
|
1049
1057
|
async function generatePackageJson(options) {
|
|
1050
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1051
|
-
|
|
1052
|
-
const stopwatch =
|
|
1053
|
-
const packageJsonPath =
|
|
1058
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunk4D3WT42Ncjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1059
|
+
_chunk4D3WT42Ncjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1060
|
+
const stopwatch = _chunk4D3WT42Ncjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1061
|
+
const packageJsonPath = _chunk4D3WT42Ncjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1054
1062
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1055
1063
|
throw new Error("Cannot find package.json configuration");
|
|
1056
1064
|
}
|
|
1057
|
-
const packageJsonContent = await _promises.readFile.call(void 0,
|
|
1065
|
+
const packageJsonContent = await _promises.readFile.call(void 0, _chunk4D3WT42Ncjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
1058
1066
|
if (!packageJsonContent) {
|
|
1059
1067
|
throw new Error("Cannot find package.json configuration file");
|
|
1060
1068
|
}
|
|
@@ -1071,7 +1079,7 @@ async function generatePackageJson(options) {
|
|
|
1071
1079
|
while (entryPath.startsWith("/")) {
|
|
1072
1080
|
entryPath = entryPath.substring(1);
|
|
1073
1081
|
}
|
|
1074
|
-
entryPath = `./${
|
|
1082
|
+
entryPath = `./${_chunk4D3WT42Ncjs.joinPaths.call(void 0, options.projectRoot, entryPath)}`;
|
|
1075
1083
|
if (!ret.includes(entryPath)) {
|
|
1076
1084
|
ret.push(entryPath);
|
|
1077
1085
|
}
|
|
@@ -1102,23 +1110,23 @@ async function generatePackageJson(options) {
|
|
|
1102
1110
|
}, packageJson.exports);
|
|
1103
1111
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
1104
1112
|
packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, options.sourceRoot, options.projectRoot);
|
|
1105
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1113
|
+
await _devkit.writeJsonFile.call(void 0, _chunk4D3WT42Ncjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
1106
1114
|
stopwatch();
|
|
1107
1115
|
}
|
|
1108
1116
|
return options;
|
|
1109
1117
|
}
|
|
1110
1118
|
_chunkBGYQAVKQcjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
1111
1119
|
async function executeUnbuild(options) {
|
|
1112
|
-
|
|
1113
|
-
const stopwatch =
|
|
1120
|
+
_chunk4D3WT42Ncjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
|
|
1121
|
+
const stopwatch = _chunk4D3WT42Ncjs.getStopwatch.call(void 0, `${options.name} (${options.projectRoot}) build`);
|
|
1114
1122
|
try {
|
|
1115
1123
|
const config = {
|
|
1116
1124
|
...options,
|
|
1117
1125
|
config: null,
|
|
1118
|
-
rootDir:
|
|
1126
|
+
rootDir: _chunk4D3WT42Ncjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot)
|
|
1119
1127
|
};
|
|
1120
|
-
|
|
1121
|
-
${
|
|
1128
|
+
_chunk4D3WT42Ncjs.writeTrace.call(void 0, `Running with unbuild configuration:
|
|
1129
|
+
${_chunk4D3WT42Ncjs.formatLogMessage.call(void 0, config)}
|
|
1122
1130
|
`, options.config);
|
|
1123
1131
|
await _unbuild.build.call(void 0, options.projectRoot, false, config);
|
|
1124
1132
|
} finally {
|
|
@@ -1128,8 +1136,8 @@ ${_chunkWSXJ22NQcjs.formatLogMessage.call(void 0, config)}
|
|
|
1128
1136
|
}
|
|
1129
1137
|
_chunkBGYQAVKQcjs.__name.call(void 0, executeUnbuild, "executeUnbuild");
|
|
1130
1138
|
async function copyBuildAssets(options) {
|
|
1131
|
-
|
|
1132
|
-
const stopwatch =
|
|
1139
|
+
_chunk4D3WT42Ncjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
|
|
1140
|
+
const stopwatch = _chunk4D3WT42Ncjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1133
1141
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outDir, options.projectRoot, options.sourceRoot, options.generatePackageJson, options.includeSrc);
|
|
1134
1142
|
stopwatch();
|
|
1135
1143
|
return options;
|
|
@@ -1137,9 +1145,9 @@ async function copyBuildAssets(options) {
|
|
|
1137
1145
|
_chunkBGYQAVKQcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
1138
1146
|
async function cleanOutputPath(options) {
|
|
1139
1147
|
if (options.clean !== false && options.outDir) {
|
|
1140
|
-
|
|
1141
|
-
const stopwatch =
|
|
1142
|
-
await
|
|
1148
|
+
_chunk4D3WT42Ncjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outDir}`, options.config);
|
|
1149
|
+
const stopwatch = _chunk4D3WT42Ncjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1150
|
+
await _chunkE74YDPSVcjs.cleanDirectories.call(void 0, options.name, options.outDir, options.config);
|
|
1143
1151
|
stopwatch();
|
|
1144
1152
|
}
|
|
1145
1153
|
return options;
|
|
@@ -1155,18 +1163,18 @@ async function build(options) {
|
|
|
1155
1163
|
throw new Error("Cannot find workspace root");
|
|
1156
1164
|
}
|
|
1157
1165
|
const config = await getConfig(workspaceRoot.dir);
|
|
1158
|
-
|
|
1159
|
-
const stopwatch =
|
|
1166
|
+
_chunk4D3WT42Ncjs.writeDebug.call(void 0, ` \u26A1 Executing Storm Unbuild pipeline`, config);
|
|
1167
|
+
const stopwatch = _chunk4D3WT42Ncjs.getStopwatch.call(void 0, "Unbuild pipeline");
|
|
1160
1168
|
try {
|
|
1161
|
-
options.projectRoot =
|
|
1169
|
+
options.projectRoot = _chunk4D3WT42Ncjs.correctPaths.call(void 0, projectRoot);
|
|
1162
1170
|
const resolvedOptions = await resolveOptions(options, config);
|
|
1163
1171
|
await cleanOutputPath(resolvedOptions);
|
|
1164
1172
|
await generatePackageJson(resolvedOptions);
|
|
1165
1173
|
await executeUnbuild(resolvedOptions);
|
|
1166
1174
|
await copyBuildAssets(resolvedOptions);
|
|
1167
|
-
|
|
1175
|
+
_chunk4D3WT42Ncjs.writeSuccess.call(void 0, ` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`, config);
|
|
1168
1176
|
} catch (error) {
|
|
1169
|
-
|
|
1177
|
+
_chunk4D3WT42Ncjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.", config);
|
|
1170
1178
|
throw error;
|
|
1171
1179
|
} finally {
|
|
1172
1180
|
stopwatch();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk4D3WT42Ncjs = require('./chunk-4D3WT42N.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -10,7 +10,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (optio
|
|
|
10
10
|
name: "storm:on-error",
|
|
11
11
|
buildEnd(error) {
|
|
12
12
|
if (error) {
|
|
13
|
-
|
|
13
|
+
_chunk4D3WT42Ncjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
14
14
|
${error ? error.message : "Unknown build error"}
|
|
15
15
|
|
|
16
16
|
`, options.config);
|
|
@@ -18,7 +18,7 @@ ${error ? error.message : "Unknown build error"}
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
renderError(error) {
|
|
21
|
-
|
|
21
|
+
_chunk4D3WT42Ncjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
22
22
|
${error ? error.message : "Unknown build error"}
|
|
23
23
|
|
|
24
24
|
`, options.config);
|
|
@@ -339,6 +339,10 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
339
339
|
log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
340
340
|
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)")
|
|
341
341
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
342
|
+
var errorConfigSchema = z.object({
|
|
343
|
+
codesFile: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("The path to the workspace's error codes JSON file"),
|
|
344
|
+
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")
|
|
345
|
+
}).describe("The workspace's error config used during the error process");
|
|
342
346
|
var stormWorkspaceConfigSchema = z.object({
|
|
343
347
|
$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"),
|
|
344
348
|
extends: ExtendsSchema.optional(),
|
|
@@ -357,6 +361,7 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
357
361
|
bot: WorkspaceBotConfigSchema,
|
|
358
362
|
release: WorkspaceReleaseConfigSchema,
|
|
359
363
|
account: WorkspaceAccountConfigSchema,
|
|
364
|
+
error: errorConfigSchema,
|
|
360
365
|
mode: z.enum([
|
|
361
366
|
"development",
|
|
362
367
|
"staging",
|
|
@@ -567,7 +572,10 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
567
572
|
license,
|
|
568
573
|
homepage,
|
|
569
574
|
docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
570
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license
|
|
575
|
+
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
576
|
+
error: {
|
|
577
|
+
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
578
|
+
}
|
|
571
579
|
};
|
|
572
580
|
}, "getDefaultConfig");
|
|
573
581
|
|
package/dist/clean.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkE74YDPSVcjs = require('./chunk-E74YDPSV.cjs');
|
|
5
|
+
require('./chunk-4D3WT42N.cjs');
|
|
6
6
|
require('./chunk-BGYQAVKQ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.clean =
|
|
10
|
+
exports.clean = _chunkE74YDPSVcjs.clean; exports.cleanDirectories = _chunkE74YDPSVcjs.cleanDirectories;
|
package/dist/clean.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkLVUMWCBVcjs = require('./chunk-LVUMWCBV.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkE74YDPSVcjs = require('./chunk-E74YDPSV.cjs');
|
|
13
13
|
require('./chunk-ORA4UQMU.cjs');
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-BN66ODNO.cjs');
|
|
15
|
+
require('./chunk-WCQ3HMVK.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
20
|
-
require('./chunk-
|
|
19
|
+
var _chunkKV76QDPTcjs = require('./chunk-KV76QDPT.cjs');
|
|
20
|
+
require('./chunk-4D3WT42N.cjs');
|
|
21
21
|
require('./chunk-BGYQAVKQ.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
@@ -30,4 +30,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
exports.build =
|
|
33
|
+
exports.build = _chunkLVUMWCBVcjs.build; exports.clean = _chunkE74YDPSVcjs.clean; exports.cleanDirectories = _chunkE74YDPSVcjs.cleanDirectories; exports.cleanOutputPath = _chunkLVUMWCBVcjs.cleanOutputPath; exports.copyBuildAssets = _chunkLVUMWCBVcjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkKV76QDPTcjs.createTsCompilerOptions; exports.executeUnbuild = _chunkLVUMWCBVcjs.executeUnbuild; exports.generatePackageJson = _chunkLVUMWCBVcjs.generatePackageJson; exports.loadConfig = _chunkKV76QDPTcjs.loadConfig; exports.resolveOptions = _chunkLVUMWCBVcjs.resolveOptions;
|
package/dist/index.js
CHANGED
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LDA6WRJV.js";
|
|
9
9
|
import {
|
|
10
10
|
clean,
|
|
11
11
|
cleanDirectories
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZL24I2TF.js";
|
|
13
13
|
import "./chunk-OULCUN6I.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-KAJDWNIA.js";
|
|
15
|
+
import "./chunk-J7FICDDC.js";
|
|
16
16
|
import {
|
|
17
17
|
createTsCompilerOptions,
|
|
18
18
|
loadConfig
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-E2YD3WEP.js";
|
|
20
|
+
import "./chunk-WH7FLZNL.js";
|
|
21
21
|
import "./chunk-3GQAWCBQ.js";
|
|
22
22
|
export {
|
|
23
23
|
build,
|
package/dist/plugins/analyze.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkBN66ODNOcjs = require('../chunk-BN66ODNO.cjs');
|
|
4
|
+
require('../chunk-4D3WT42N.cjs');
|
|
5
5
|
require('../chunk-BGYQAVKQ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.analyzePlugin =
|
|
8
|
+
exports.analyzePlugin = _chunkBN66ODNOcjs.analyzePlugin;
|
package/dist/plugins/analyze.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkWCQ3HMVKcjs = require('../chunk-WCQ3HMVK.cjs');
|
|
4
|
+
require('../chunk-4D3WT42N.cjs');
|
|
5
5
|
require('../chunk-BGYQAVKQ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.onErrorPlugin =
|
|
8
|
+
exports.onErrorPlugin = _chunkWCQ3HMVKcjs.onErrorPlugin;
|
package/dist/plugins/on-error.js
CHANGED
package/dist/plugins/tsc.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkKV76QDPTcjs = require('../chunk-KV76QDPT.cjs');
|
|
4
|
+
require('../chunk-4D3WT42N.cjs');
|
|
5
5
|
require('../chunk-BGYQAVKQ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.tscPlugin =
|
|
8
|
+
exports.tscPlugin = _chunkKV76QDPTcjs.tscPlugin;
|
package/dist/plugins/tsc.js
CHANGED