@storm-software/unbuild 0.38.7 → 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 +29 -11
- package/bin/unbuild.js +29 -11
- package/dist/build.cjs +7 -7
- package/dist/build.d.cts +2 -2
- package/dist/build.d.ts +2 -2
- package/dist/build.js +6 -6
- package/dist/{chunk-K5SEKFQA.cjs → chunk-4D3WT42N.cjs} +11 -3
- package/dist/{chunk-OOFPXPRC.cjs → chunk-BN66ODNO.cjs} +2 -2
- package/dist/{chunk-IYFBAI6G.js → chunk-E2YD3WEP.js} +1 -1
- package/dist/{chunk-WGGER7UI.cjs → chunk-E74YDPSV.cjs} +3 -3
- package/dist/{chunk-2FX3WQNK.js → chunk-J7FICDDC.js} +1 -1
- package/dist/{chunk-5XTPDLOE.js → chunk-KAJDWNIA.js} +1 -1
- package/dist/{chunk-VPCO2H3G.cjs → chunk-KV76QDPT.cjs} +2 -2
- package/dist/{chunk-CYDK2RIH.js → chunk-LDA6WRJV.js} +22 -14
- package/dist/{chunk-NZEFFUTW.cjs → chunk-LVUMWCBV.cjs} +115 -107
- package/dist/{chunk-X25DCA4T.cjs → chunk-WCQ3HMVK.cjs} +3 -3
- package/dist/{chunk-EJVOWVIQ.js → chunk-WH7FLZNL.js} +11 -3
- package/dist/{chunk-JLKMLDBA.js → chunk-ZL24I2TF.js} +1 -1
- package/dist/clean.cjs +3 -3
- package/dist/clean.d.cts +5 -5
- package/dist/clean.d.ts +5 -5
- package/dist/clean.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- 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,7 +156,11 @@ 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
|
|
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");
|
|
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(),
|
|
162
166
|
name: import_zod.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
@@ -174,6 +178,7 @@ var StormConfigSchema = 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) {
|
|
@@ -1308,7 +1324,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
1308
1324
|
// ../config-tools/src/create-storm-config.ts
|
|
1309
1325
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1310
1326
|
var _static_cache = void 0;
|
|
1311
|
-
var
|
|
1327
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
1312
1328
|
let result;
|
|
1313
1329
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1314
1330
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -1323,7 +1339,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
1323
1339
|
logLevel: "all"
|
|
1324
1340
|
});
|
|
1325
1341
|
}
|
|
1326
|
-
result = await
|
|
1342
|
+
result = await stormWorkspaceConfigSchema.parseAsync((0, import_defu2.default)(configEnv, configFile, defaultConfig));
|
|
1327
1343
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1328
1344
|
} else {
|
|
1329
1345
|
result = _static_cache.data;
|
|
@@ -1339,7 +1355,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
1339
1355
|
data: result
|
|
1340
1356
|
};
|
|
1341
1357
|
return result;
|
|
1342
|
-
}, "
|
|
1358
|
+
}, "createStormWorkspaceConfig");
|
|
1343
1359
|
var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
1344
1360
|
const extension_cache_key = {
|
|
1345
1361
|
extensionName
|
|
@@ -1354,19 +1370,19 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
1354
1370
|
_extension_cache.set(extension_cache_key, extension);
|
|
1355
1371
|
return extension;
|
|
1356
1372
|
}, "createConfigExtension");
|
|
1357
|
-
var
|
|
1358
|
-
const config = await
|
|
1373
|
+
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
1374
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1359
1375
|
setConfigEnv(config);
|
|
1360
1376
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1361
1377
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1362
1378
|
${formatLogMessage(config)}`, config);
|
|
1363
1379
|
}
|
|
1364
1380
|
return config;
|
|
1365
|
-
}, "
|
|
1381
|
+
}, "loadStormWorkspaceConfig");
|
|
1366
1382
|
|
|
1367
1383
|
// ../config-tools/src/get-config.ts
|
|
1368
1384
|
var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
|
|
1369
|
-
return
|
|
1385
|
+
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
1370
1386
|
}, "getConfig");
|
|
1371
1387
|
|
|
1372
1388
|
// bin/unbuild.ts
|
|
@@ -2054,7 +2070,9 @@ async function createProgram(config) {
|
|
|
2054
2070
|
const root = findWorkspaceRootSafe();
|
|
2055
2071
|
process.env.STORM_WORKSPACE_ROOT ??= root;
|
|
2056
2072
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root;
|
|
2057
|
-
|
|
2073
|
+
if (root) {
|
|
2074
|
+
process.chdir(root);
|
|
2075
|
+
}
|
|
2058
2076
|
const program = new import_commander.Command("storm-unbuild");
|
|
2059
2077
|
program.version("1.0.0", "-v --version", "display CLI version");
|
|
2060
2078
|
program.description("\u26A1 Run the Storm Unbuild pipeline").showHelpAfterError().showSuggestionAfterError();
|
package/bin/unbuild.js
CHANGED
|
@@ -135,7 +135,11 @@ 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
|
|
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");
|
|
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(),
|
|
141
145
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
@@ -153,6 +157,7 @@ var StormConfigSchema = 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) {
|
|
@@ -1287,7 +1303,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
1287
1303
|
// ../config-tools/src/create-storm-config.ts
|
|
1288
1304
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1289
1305
|
var _static_cache = void 0;
|
|
1290
|
-
var
|
|
1306
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
1291
1307
|
let result;
|
|
1292
1308
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1293
1309
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -1302,7 +1318,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
1302
1318
|
logLevel: "all"
|
|
1303
1319
|
});
|
|
1304
1320
|
}
|
|
1305
|
-
result = await
|
|
1321
|
+
result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
|
|
1306
1322
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1307
1323
|
} else {
|
|
1308
1324
|
result = _static_cache.data;
|
|
@@ -1318,7 +1334,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
1318
1334
|
data: result
|
|
1319
1335
|
};
|
|
1320
1336
|
return result;
|
|
1321
|
-
}, "
|
|
1337
|
+
}, "createStormWorkspaceConfig");
|
|
1322
1338
|
var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
1323
1339
|
const extension_cache_key = {
|
|
1324
1340
|
extensionName
|
|
@@ -1333,19 +1349,19 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
1333
1349
|
_extension_cache.set(extension_cache_key, extension);
|
|
1334
1350
|
return extension;
|
|
1335
1351
|
}, "createConfigExtension");
|
|
1336
|
-
var
|
|
1337
|
-
const config = await
|
|
1352
|
+
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
1353
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1338
1354
|
setConfigEnv(config);
|
|
1339
1355
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1340
1356
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1341
1357
|
${formatLogMessage(config)}`, config);
|
|
1342
1358
|
}
|
|
1343
1359
|
return config;
|
|
1344
|
-
}, "
|
|
1360
|
+
}, "loadStormWorkspaceConfig");
|
|
1345
1361
|
|
|
1346
1362
|
// ../config-tools/src/get-config.ts
|
|
1347
1363
|
var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
|
|
1348
|
-
return
|
|
1364
|
+
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
1349
1365
|
}, "getConfig");
|
|
1350
1366
|
|
|
1351
1367
|
// bin/unbuild.ts
|
|
@@ -2033,7 +2049,9 @@ async function createProgram(config) {
|
|
|
2033
2049
|
const root = findWorkspaceRootSafe();
|
|
2034
2050
|
process.env.STORM_WORKSPACE_ROOT ??= root;
|
|
2035
2051
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root;
|
|
2036
|
-
|
|
2052
|
+
if (root) {
|
|
2053
|
+
process.chdir(root);
|
|
2054
|
+
}
|
|
2037
2055
|
const program = new Command("storm-unbuild");
|
|
2038
2056
|
program.version("1.0.0", "-v --version", "display CLI version");
|
|
2039
2057
|
program.description("\u26A1 Run the Storm Unbuild pipeline").showHelpAfterError().showSuggestionAfterError();
|
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.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StormWorkspaceConfig } from '@storm-software/config/types';
|
|
2
2
|
import { UnbuildOptions, UnbuildResolvedOptions } from './types.cjs';
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
4
|
import 'esbuild';
|
|
@@ -11,7 +11,7 @@ import 'unbuild';
|
|
|
11
11
|
* @param options - the unbuild options
|
|
12
12
|
* @returns the resolved options
|
|
13
13
|
*/
|
|
14
|
-
declare function resolveOptions(options: UnbuildOptions, config:
|
|
14
|
+
declare function resolveOptions(options: UnbuildOptions, config: StormWorkspaceConfig): Promise<UnbuildResolvedOptions>;
|
|
15
15
|
declare function generatePackageJson(options: UnbuildResolvedOptions): Promise<UnbuildResolvedOptions>;
|
|
16
16
|
/**
|
|
17
17
|
* Execute Unbuild with all the configurations we pass
|
package/dist/build.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StormWorkspaceConfig } from '@storm-software/config/types';
|
|
2
2
|
import { UnbuildOptions, UnbuildResolvedOptions } from './types.js';
|
|
3
3
|
import '@storm-software/build-tools';
|
|
4
4
|
import 'esbuild';
|
|
@@ -11,7 +11,7 @@ import 'unbuild';
|
|
|
11
11
|
* @param options - the unbuild options
|
|
12
12
|
* @returns the resolved options
|
|
13
13
|
*/
|
|
14
|
-
declare function resolveOptions(options: UnbuildOptions, config:
|
|
14
|
+
declare function resolveOptions(options: UnbuildOptions, config: StormWorkspaceConfig): Promise<UnbuildResolvedOptions>;
|
|
15
15
|
declare function generatePackageJson(options: UnbuildResolvedOptions): Promise<UnbuildResolvedOptions>;
|
|
16
16
|
/**
|
|
17
17
|
* Execute Unbuild with all the configurations we pass
|
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,7 +339,11 @@ 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
|
|
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");
|
|
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(),
|
|
345
349
|
name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
@@ -357,6 +361,7 @@ var StormConfigSchema = _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
|
|
|
@@ -758,4 +766,4 @@ var _isFunction = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (value)
|
|
|
758
766
|
|
|
759
767
|
|
|
760
768
|
|
|
761
|
-
exports.LogLevel = LogLevel; exports.LogLevelLabel = LogLevelLabel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.
|
|
769
|
+
exports.LogLevel = LogLevel; exports.LogLevelLabel = LogLevelLabel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.stormWorkspaceConfigSchema = stormWorkspaceConfigSchema; exports.COLOR_KEYS = COLOR_KEYS; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.findWorkspaceRoot = findWorkspaceRoot; exports.getDefaultConfig = getDefaultConfig; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.isVerbose = isVerbose; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage;
|
|
@@ -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,
|
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
STORM_DEFAULT_DOCS,
|
|
19
19
|
STORM_DEFAULT_HOMEPAGE,
|
|
20
20
|
STORM_DEFAULT_LICENSING,
|
|
21
|
-
StormConfigSchema,
|
|
22
21
|
correctPaths,
|
|
23
22
|
findWorkspaceRoot,
|
|
24
23
|
formatLogMessage,
|
|
@@ -28,12 +27,13 @@ import {
|
|
|
28
27
|
getStopwatch,
|
|
29
28
|
isVerbose,
|
|
30
29
|
joinPaths,
|
|
30
|
+
stormWorkspaceConfigSchema,
|
|
31
31
|
writeDebug,
|
|
32
32
|
writeFatal,
|
|
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) {
|
|
@@ -734,7 +742,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
734
742
|
// ../config-tools/src/create-storm-config.ts
|
|
735
743
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
736
744
|
var _static_cache = void 0;
|
|
737
|
-
var
|
|
745
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
738
746
|
let result;
|
|
739
747
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
740
748
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -749,7 +757,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
749
757
|
logLevel: "all"
|
|
750
758
|
});
|
|
751
759
|
}
|
|
752
|
-
result = await
|
|
760
|
+
result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
|
|
753
761
|
result.workspaceRoot ??= _workspaceRoot;
|
|
754
762
|
} else {
|
|
755
763
|
result = _static_cache.data;
|
|
@@ -765,7 +773,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
765
773
|
data: result
|
|
766
774
|
};
|
|
767
775
|
return result;
|
|
768
|
-
}, "
|
|
776
|
+
}, "createStormWorkspaceConfig");
|
|
769
777
|
var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
770
778
|
const extension_cache_key = {
|
|
771
779
|
extensionName
|
|
@@ -780,19 +788,19 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
780
788
|
_extension_cache.set(extension_cache_key, extension);
|
|
781
789
|
return extension;
|
|
782
790
|
}, "createConfigExtension");
|
|
783
|
-
var
|
|
784
|
-
const config = await
|
|
791
|
+
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
792
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
785
793
|
setConfigEnv(config);
|
|
786
794
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
787
795
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
788
796
|
${formatLogMessage(config)}`, config);
|
|
789
797
|
}
|
|
790
798
|
return config;
|
|
791
|
-
}, "
|
|
799
|
+
}, "loadStormWorkspaceConfig");
|
|
792
800
|
|
|
793
801
|
// ../config-tools/src/get-config.ts
|
|
794
802
|
var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
|
|
795
|
-
return
|
|
803
|
+
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
796
804
|
}, "getConfig");
|
|
797
805
|
|
|
798
806
|
// ../build-tools/src/utilities/get-entry-points.ts
|