@storm-software/projen 0.9.35 → 0.9.37
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/CHANGELOG.md +15 -0
- package/README.md +1 -1
- package/dist/{chunk-G4SMJQNI.mjs → chunk-MHQEVFHV.mjs} +40 -20
- package/dist/{chunk-RL7Z5H6Y.js → chunk-VXDOX27T.js} +80 -60
- package/dist/generators.d.mts +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/generators.js +2 -2
- package/dist/generators.mjs +1 -1
- package/dist/{index-Dx_XVEzo.d.mts → index-C8HQYf7T.d.mts} +41 -7
- package/dist/{index-Dx_XVEzo.d.ts → index-C8HQYf7T.d.ts} +41 -7
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +1 -1
- package/dist/src/components/nx-workspace.js +10 -10
- package/dist/src/components/nx-workspace.mjs +10 -10
- package/dist/src/generators/init/generator.d.mts +1 -1
- package/dist/src/generators/init/generator.d.ts +1 -1
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Projen
|
|
4
4
|
|
|
5
|
+
## [0.9.37](https://github.com/storm-software/storm-ops/releases/tag/projen%400.9.37) (2025-04-04)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Regenerate README markdown files
|
|
10
|
+
([30c679ec1](https://github.com/storm-software/storm-ops/commit/30c679ec1))
|
|
11
|
+
|
|
12
|
+
## [0.9.36](https://github.com/storm-software/storm-ops/releases/tag/projen%400.9.36) (2025-04-02)
|
|
13
|
+
|
|
14
|
+
### Miscellaneous
|
|
15
|
+
|
|
16
|
+
- **projen:** Update all references to `StormConfig` to point to
|
|
17
|
+
`StormWorkspaceConfig`
|
|
18
|
+
([7f316214f](https://github.com/storm-software/storm-ops/commit/7f316214f))
|
|
19
|
+
|
|
5
20
|
## [0.9.35](https://github.com/storm-software/storm-ops/releases/tag/projen%400.9.35) (2025-03-18)
|
|
6
21
|
|
|
7
22
|
### Miscellaneous
|
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 -->
|
|
@@ -200,7 +200,11 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
200
200
|
log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
201
201
|
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)")
|
|
202
202
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
203
|
-
var
|
|
203
|
+
var errorConfigSchema = z.object({
|
|
204
|
+
codesFile: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("The path to the workspace's error codes JSON file"),
|
|
205
|
+
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")
|
|
206
|
+
}).describe("The workspace's error config used during the error process");
|
|
207
|
+
var stormWorkspaceConfigSchema = z.object({
|
|
204
208
|
$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"),
|
|
205
209
|
extends: ExtendsSchema.optional(),
|
|
206
210
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
@@ -218,6 +222,7 @@ var StormConfigSchema = z.object({
|
|
|
218
222
|
bot: WorkspaceBotConfigSchema,
|
|
219
223
|
release: WorkspaceReleaseConfigSchema,
|
|
220
224
|
account: WorkspaceAccountConfigSchema,
|
|
225
|
+
error: errorConfigSchema,
|
|
221
226
|
mode: z.enum([
|
|
222
227
|
"development",
|
|
223
228
|
"staging",
|
|
@@ -433,7 +438,10 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
433
438
|
license,
|
|
434
439
|
homepage,
|
|
435
440
|
docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
436
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license
|
|
441
|
+
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
442
|
+
error: {
|
|
443
|
+
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
444
|
+
}
|
|
437
445
|
};
|
|
438
446
|
}, "getDefaultConfig");
|
|
439
447
|
|
|
@@ -828,6 +836,10 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
828
836
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
829
837
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
830
838
|
},
|
|
839
|
+
error: {
|
|
840
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
841
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
842
|
+
},
|
|
831
843
|
account: {
|
|
832
844
|
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
833
845
|
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
@@ -1002,6 +1014,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
1002
1014
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
1003
1015
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
1004
1016
|
}
|
|
1017
|
+
if (config.error) {
|
|
1018
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
1019
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
1020
|
+
}
|
|
1005
1021
|
if (config.release) {
|
|
1006
1022
|
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
1007
1023
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
@@ -1132,7 +1148,7 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
1132
1148
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
|
|
1133
1149
|
}
|
|
1134
1150
|
if (config.registry.container) {
|
|
1135
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.
|
|
1151
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
|
|
1136
1152
|
}
|
|
1137
1153
|
}
|
|
1138
1154
|
if (config.logLevel) {
|
|
@@ -1252,7 +1268,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
1252
1268
|
// ../config-tools/src/create-storm-config.ts
|
|
1253
1269
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1254
1270
|
var _static_cache = void 0;
|
|
1255
|
-
var
|
|
1271
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot3, skipLogs = false) => {
|
|
1256
1272
|
let result;
|
|
1257
1273
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1258
1274
|
let _workspaceRoot = workspaceRoot3;
|
|
@@ -1267,7 +1283,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
1267
1283
|
logLevel: "all"
|
|
1268
1284
|
});
|
|
1269
1285
|
}
|
|
1270
|
-
result = await
|
|
1286
|
+
result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
|
|
1271
1287
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1272
1288
|
} else {
|
|
1273
1289
|
result = _static_cache.data;
|
|
@@ -1283,7 +1299,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
1283
1299
|
data: result
|
|
1284
1300
|
};
|
|
1285
1301
|
return result;
|
|
1286
|
-
}, "
|
|
1302
|
+
}, "createStormWorkspaceConfig");
|
|
1287
1303
|
var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
1288
1304
|
const extension_cache_key = {
|
|
1289
1305
|
extensionName
|
|
@@ -1298,20 +1314,20 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
1298
1314
|
_extension_cache.set(extension_cache_key, extension);
|
|
1299
1315
|
return extension;
|
|
1300
1316
|
}, "createConfigExtension");
|
|
1301
|
-
var
|
|
1302
|
-
const config = await
|
|
1317
|
+
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot3, skipLogs = false) => {
|
|
1318
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot3, skipLogs);
|
|
1303
1319
|
setConfigEnv(config);
|
|
1304
1320
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1305
1321
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1306
1322
|
${formatLogMessage(config)}`, config);
|
|
1307
1323
|
}
|
|
1308
1324
|
return config;
|
|
1309
|
-
}, "
|
|
1325
|
+
}, "loadStormWorkspaceConfig");
|
|
1310
1326
|
|
|
1311
1327
|
// ../config-tools/src/get-config.ts
|
|
1312
1328
|
init_esm_shims();
|
|
1313
1329
|
var getConfig = /* @__PURE__ */ __name((workspaceRoot3, skipLogs = false) => {
|
|
1314
|
-
return
|
|
1330
|
+
return loadStormWorkspaceConfig(workspaceRoot3, skipLogs);
|
|
1315
1331
|
}, "getConfig");
|
|
1316
1332
|
|
|
1317
1333
|
// ../workspace-tools/src/base/base-executor.ts
|
|
@@ -1801,13 +1817,13 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot3, proje
|
|
|
1801
1817
|
return ret;
|
|
1802
1818
|
}, []);
|
|
1803
1819
|
packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
|
|
1804
|
-
if (!ret[localPackage.name] && !implicitDependencies?.includes(localPackage.name)) {
|
|
1805
|
-
ret[localPackage.name] =
|
|
1820
|
+
if (!ret[localPackage.name] && !implicitDependencies?.includes(localPackage.name) && packageJson.devDependencies?.[localPackage.name] === void 0) {
|
|
1821
|
+
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
1806
1822
|
}
|
|
1807
1823
|
return ret;
|
|
1808
1824
|
}, packageJson.dependencies ?? {});
|
|
1809
1825
|
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
1810
|
-
if (!ret[localPackage.name] && implicitDependencies?.includes(localPackage.name)) {
|
|
1826
|
+
if (!ret[localPackage.name] && implicitDependencies?.includes(localPackage.name) && packageJson.dependencies?.[localPackage.name] === void 0) {
|
|
1811
1827
|
ret[localPackage.name] = localPackage.version || "0.0.1";
|
|
1812
1828
|
}
|
|
1813
1829
|
return ret;
|
|
@@ -1901,7 +1917,10 @@ var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRo
|
|
|
1901
1917
|
return ret;
|
|
1902
1918
|
}, []));
|
|
1903
1919
|
} else {
|
|
1904
|
-
|
|
1920
|
+
writeDebug(`Trying to add entry point ${entryPoint}"`, config);
|
|
1921
|
+
if (!paths.includes(entryPoint)) {
|
|
1922
|
+
paths.push(entryPoint);
|
|
1923
|
+
}
|
|
1905
1924
|
}
|
|
1906
1925
|
return paths;
|
|
1907
1926
|
}));
|
|
@@ -2672,7 +2691,7 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
2672
2691
|
...userOptions,
|
|
2673
2692
|
tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
2674
2693
|
format: options.format || "cjs",
|
|
2675
|
-
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry ?? "./src/index.ts",
|
|
2694
|
+
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry ?? "./src/index.ts", false),
|
|
2676
2695
|
outdir: userOptions.outputPath || joinPaths("dist", projectRoot),
|
|
2677
2696
|
distDir: userOptions.distDir || "dist",
|
|
2678
2697
|
plugins: [],
|
|
@@ -2687,7 +2706,6 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
2687
2706
|
metafile: userOptions.metafile !== false,
|
|
2688
2707
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
2689
2708
|
clean: userOptions.clean !== false,
|
|
2690
|
-
emitOnAll: userOptions.emitOnAll === true,
|
|
2691
2709
|
assets: userOptions.assets ?? [],
|
|
2692
2710
|
injectShims: userOptions.injectShims !== true,
|
|
2693
2711
|
bundle: userOptions.bundle !== false,
|
|
@@ -2764,7 +2782,7 @@ async function generatePackageJson(context2) {
|
|
|
2764
2782
|
if (Array.isArray(context2.options.entryPoints)) {
|
|
2765
2783
|
entryPoints = context2.options.entryPoints.map((entryPoint) => typeof entryPoint === "string" ? {
|
|
2766
2784
|
in: entryPoint,
|
|
2767
|
-
out: entryPoint
|
|
2785
|
+
out: correctPaths(entryPoint.replaceAll(correctPaths(context2.options.config.workspaceRoot), "").replaceAll(correctPaths(context2.options.projectRoot), ""))
|
|
2768
2786
|
} : entryPoint);
|
|
2769
2787
|
}
|
|
2770
2788
|
for (const entryPoint of entryPoints) {
|
|
@@ -2835,7 +2853,6 @@ async function executeEsBuild(context2) {
|
|
|
2835
2853
|
delete options.clean;
|
|
2836
2854
|
delete options.debug;
|
|
2837
2855
|
delete options.generatePackageJson;
|
|
2838
|
-
delete options.emitOnAll;
|
|
2839
2856
|
delete options.distDir;
|
|
2840
2857
|
delete options.includeSrc;
|
|
2841
2858
|
delete options.verbose;
|
|
@@ -2848,7 +2865,10 @@ async function executeEsBuild(context2) {
|
|
|
2848
2865
|
delete options.injectShims;
|
|
2849
2866
|
delete options.external;
|
|
2850
2867
|
writeTrace(`Run esbuild (${context2.options.name}) with the following options:
|
|
2851
|
-
${formatLogMessage(
|
|
2868
|
+
${formatLogMessage({
|
|
2869
|
+
...options,
|
|
2870
|
+
define: "<Hidden>"
|
|
2871
|
+
})}`, context2.options.config);
|
|
2852
2872
|
const result = await esbuild2.build(options);
|
|
2853
2873
|
await esbuild2.stop();
|
|
2854
2874
|
if (result.metafile) {
|
|
@@ -3665,7 +3685,7 @@ import { zodToJsonSchema } from "zod-to-json-schema";
|
|
|
3665
3685
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
3666
3686
|
writeInfo("\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
|
|
3667
3687
|
writeTrace(`Determining the Storm Workspace Configuration JSON Schema...`, config);
|
|
3668
|
-
const jsonSchema = zodToJsonSchema(
|
|
3688
|
+
const jsonSchema = zodToJsonSchema(stormWorkspaceConfigSchema, {
|
|
3669
3689
|
name: "StormWorkspaceConfiguration"
|
|
3670
3690
|
});
|
|
3671
3691
|
writeTrace(jsonSchema, config);
|
|
@@ -199,7 +199,11 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
|
199
199
|
log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
200
200
|
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)")
|
|
201
201
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
202
|
-
var
|
|
202
|
+
var errorConfigSchema = _zod2.default.object({
|
|
203
|
+
codesFile: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("The path to the workspace's error codes JSON file"),
|
|
204
|
+
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")
|
|
205
|
+
}).describe("The workspace's error config used during the error process");
|
|
206
|
+
var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
203
207
|
$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"),
|
|
204
208
|
extends: ExtendsSchema.optional(),
|
|
205
209
|
name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
@@ -217,6 +221,7 @@ var StormConfigSchema = _zod2.default.object({
|
|
|
217
221
|
bot: WorkspaceBotConfigSchema,
|
|
218
222
|
release: WorkspaceReleaseConfigSchema,
|
|
219
223
|
account: WorkspaceAccountConfigSchema,
|
|
224
|
+
error: errorConfigSchema,
|
|
220
225
|
mode: _zod2.default.enum([
|
|
221
226
|
"development",
|
|
222
227
|
"staging",
|
|
@@ -432,7 +437,10 @@ var getDefaultConfig = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, asyn
|
|
|
432
437
|
license,
|
|
433
438
|
homepage,
|
|
434
439
|
docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
435
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license
|
|
440
|
+
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
441
|
+
error: {
|
|
442
|
+
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
443
|
+
}
|
|
436
444
|
};
|
|
437
445
|
}, "getDefaultConfig");
|
|
438
446
|
|
|
@@ -827,6 +835,10 @@ var getConfigEnv = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, () => {
|
|
|
827
835
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
828
836
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
829
837
|
},
|
|
838
|
+
error: {
|
|
839
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
840
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
841
|
+
},
|
|
830
842
|
account: {
|
|
831
843
|
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
832
844
|
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
@@ -1001,6 +1013,10 @@ var setConfigEnv = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (config)
|
|
|
1001
1013
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
1002
1014
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
1003
1015
|
}
|
|
1016
|
+
if (config.error) {
|
|
1017
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
1018
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
1019
|
+
}
|
|
1004
1020
|
if (config.release) {
|
|
1005
1021
|
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
1006
1022
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
@@ -1131,7 +1147,7 @@ var setConfigEnv = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (config)
|
|
|
1131
1147
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
|
|
1132
1148
|
}
|
|
1133
1149
|
if (config.registry.container) {
|
|
1134
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.
|
|
1150
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
|
|
1135
1151
|
}
|
|
1136
1152
|
}
|
|
1137
1153
|
if (config.logLevel) {
|
|
@@ -1251,7 +1267,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(vo
|
|
|
1251
1267
|
// ../config-tools/src/create-storm-config.ts
|
|
1252
1268
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1253
1269
|
var _static_cache = void 0;
|
|
1254
|
-
var
|
|
1270
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, async (extensionName, schema, workspaceRoot3, skipLogs = false) => {
|
|
1255
1271
|
let result;
|
|
1256
1272
|
if (!_optionalChain([_static_cache, 'optionalAccess', _57 => _57.data]) || !_optionalChain([_static_cache, 'optionalAccess', _58 => _58.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1257
1273
|
let _workspaceRoot = workspaceRoot3;
|
|
@@ -1266,7 +1282,7 @@ var createStormConfig = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, asy
|
|
|
1266
1282
|
logLevel: "all"
|
|
1267
1283
|
});
|
|
1268
1284
|
}
|
|
1269
|
-
result = await
|
|
1285
|
+
result = await stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
1270
1286
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1271
1287
|
} else {
|
|
1272
1288
|
result = _static_cache.data;
|
|
@@ -1282,7 +1298,7 @@ var createStormConfig = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, asy
|
|
|
1282
1298
|
data: result
|
|
1283
1299
|
};
|
|
1284
1300
|
return result;
|
|
1285
|
-
}, "
|
|
1301
|
+
}, "createStormWorkspaceConfig");
|
|
1286
1302
|
var createConfigExtension = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (extensionName, schema) => {
|
|
1287
1303
|
const extension_cache_key = {
|
|
1288
1304
|
extensionName
|
|
@@ -1297,20 +1313,20 @@ var createConfigExtension = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0,
|
|
|
1297
1313
|
_extension_cache.set(extension_cache_key, extension);
|
|
1298
1314
|
return extension;
|
|
1299
1315
|
}, "createConfigExtension");
|
|
1300
|
-
var
|
|
1301
|
-
const config = await
|
|
1316
|
+
var loadStormWorkspaceConfig = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, async (workspaceRoot3, skipLogs = false) => {
|
|
1317
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot3, skipLogs);
|
|
1302
1318
|
setConfigEnv(config);
|
|
1303
1319
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1304
1320
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1305
1321
|
${formatLogMessage(config)}`, config);
|
|
1306
1322
|
}
|
|
1307
1323
|
return config;
|
|
1308
|
-
}, "
|
|
1324
|
+
}, "loadStormWorkspaceConfig");
|
|
1309
1325
|
|
|
1310
1326
|
// ../config-tools/src/get-config.ts
|
|
1311
1327
|
_chunkWTMG7MTKjs.init_cjs_shims.call(void 0, );
|
|
1312
1328
|
var getConfig = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (workspaceRoot3, skipLogs = false) => {
|
|
1313
|
-
return
|
|
1329
|
+
return loadStormWorkspaceConfig(workspaceRoot3, skipLogs);
|
|
1314
1330
|
}, "getConfig");
|
|
1315
1331
|
|
|
1316
1332
|
// ../workspace-tools/src/base/base-executor.ts
|
|
@@ -1800,13 +1816,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0
|
|
|
1800
1816
|
return ret;
|
|
1801
1817
|
}, [])]);
|
|
1802
1818
|
packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
|
|
1803
|
-
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _98 => _98.includes, 'call', _99 => _99(localPackage.name)])) {
|
|
1804
|
-
ret[localPackage.name] =
|
|
1819
|
+
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _98 => _98.includes, 'call', _99 => _99(localPackage.name)]) && _optionalChain([packageJson, 'access', _100 => _100.devDependencies, 'optionalAccess', _101 => _101[localPackage.name]]) === void 0) {
|
|
1820
|
+
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
1805
1821
|
}
|
|
1806
1822
|
return ret;
|
|
1807
1823
|
}, _nullishCoalesce(packageJson.dependencies, () => ( {})));
|
|
1808
1824
|
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
1809
|
-
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess',
|
|
1825
|
+
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _102 => _102.includes, 'call', _103 => _103(localPackage.name)]) && _optionalChain([packageJson, 'access', _104 => _104.dependencies, 'optionalAccess', _105 => _105[localPackage.name]]) === void 0) {
|
|
1810
1826
|
ret[localPackage.name] = localPackage.version || "0.0.1";
|
|
1811
1827
|
}
|
|
1812
1828
|
return ret;
|
|
@@ -1900,7 +1916,10 @@ var getEntryPoints = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, async
|
|
|
1900
1916
|
return ret;
|
|
1901
1917
|
}, []));
|
|
1902
1918
|
} else {
|
|
1903
|
-
|
|
1919
|
+
writeDebug(`Trying to add entry point ${entryPoint}"`, config);
|
|
1920
|
+
if (!paths.includes(entryPoint)) {
|
|
1921
|
+
paths.push(entryPoint);
|
|
1922
|
+
}
|
|
1904
1923
|
}
|
|
1905
1924
|
return paths;
|
|
1906
1925
|
}));
|
|
@@ -2026,15 +2045,15 @@ var RendererEngine = class {
|
|
|
2026
2045
|
if (!relativePath.startsWith("\\\\?\\")) {
|
|
2027
2046
|
relativePath = relativePath.replace(/\\/g, "/");
|
|
2028
2047
|
}
|
|
2029
|
-
const meta = _optionalChain([metafile, 'optionalAccess',
|
|
2048
|
+
const meta = _optionalChain([metafile, 'optionalAccess', _106 => _106.outputs, 'access', _107 => _107[relativePath]]);
|
|
2030
2049
|
return {
|
|
2031
2050
|
type: "chunk",
|
|
2032
2051
|
path: file.path,
|
|
2033
2052
|
code: file.text,
|
|
2034
|
-
map: _optionalChain([outputFiles, 'access',
|
|
2035
|
-
entryPoint: _optionalChain([meta, 'optionalAccess',
|
|
2036
|
-
exports: _optionalChain([meta, 'optionalAccess',
|
|
2037
|
-
imports: _optionalChain([meta, 'optionalAccess',
|
|
2053
|
+
map: _optionalChain([outputFiles, 'access', _108 => _108.find, 'call', _109 => _109((f) => f.path === `${file.path}.map`), 'optionalAccess', _110 => _110.text]),
|
|
2054
|
+
entryPoint: _optionalChain([meta, 'optionalAccess', _111 => _111.entryPoint]),
|
|
2055
|
+
exports: _optionalChain([meta, 'optionalAccess', _112 => _112.exports]),
|
|
2056
|
+
imports: _optionalChain([meta, 'optionalAccess', _113 => _113.imports])
|
|
2038
2057
|
};
|
|
2039
2058
|
} else {
|
|
2040
2059
|
return {
|
|
@@ -2122,7 +2141,7 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void
|
|
|
2122
2141
|
name: "storm:esm-split-code-to-cjs",
|
|
2123
2142
|
setup(build4) {
|
|
2124
2143
|
build4.onEnd(async (result) => {
|
|
2125
|
-
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access',
|
|
2144
|
+
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _114 => _114.metafile, 'optionalAccess', _115 => _115.outputs]), () => ( {})));
|
|
2126
2145
|
const jsFiles = outFiles.filter((f) => f.endsWith("js"));
|
|
2127
2146
|
await esbuild.build({
|
|
2128
2147
|
outdir: resolvedOptions.outdir,
|
|
@@ -2249,7 +2268,7 @@ ${result.errors.map((error) => error.text).join("\n")}
|
|
|
2249
2268
|
_chunkWTMG7MTKjs.init_cjs_shims.call(void 0, );
|
|
2250
2269
|
|
|
2251
2270
|
function resolvePathsConfig(options, cwd) {
|
|
2252
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
2271
|
+
if (_optionalChain([options, 'optionalAccess', _116 => _116.compilerOptions, 'optionalAccess', _117 => _117.paths])) {
|
|
2253
2272
|
const paths = Object.entries(options.compilerOptions.paths);
|
|
2254
2273
|
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
2255
2274
|
return [
|
|
@@ -2277,7 +2296,7 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (o
|
|
|
2277
2296
|
build4.onResolve({
|
|
2278
2297
|
filter: packagesRegex
|
|
2279
2298
|
}, (args) => {
|
|
2280
|
-
if (_optionalChain([build4, 'access',
|
|
2299
|
+
if (_optionalChain([build4, 'access', _118 => _118.initialOptions, 'access', _119 => _119.external, 'optionalAccess', _120 => _120.includes, 'call', _121 => _121(args.path)])) {
|
|
2281
2300
|
return {
|
|
2282
2301
|
path: args.path,
|
|
2283
2302
|
external: true
|
|
@@ -2387,7 +2406,7 @@ var tscPlugin = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (options, r
|
|
|
2387
2406
|
function getTypeDependencyPackageName(npmPackage) {
|
|
2388
2407
|
if (npmPackage.startsWith("@")) {
|
|
2389
2408
|
const [scope, name] = npmPackage.split("/");
|
|
2390
|
-
return `@types/${_optionalChain([scope, 'optionalAccess',
|
|
2409
|
+
return `@types/${_optionalChain([scope, 'optionalAccess', _122 => _122.slice, 'call', _123 => _123(1)])}__${name}`;
|
|
2391
2410
|
}
|
|
2392
2411
|
return `@types/${npmPackage}`;
|
|
2393
2412
|
}
|
|
@@ -2606,7 +2625,7 @@ function pipeSync(fn, ...fns) {
|
|
|
2606
2625
|
return (...args) => {
|
|
2607
2626
|
let result = fn(...args);
|
|
2608
2627
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
2609
|
-
result = _optionalChain([fns, 'access',
|
|
2628
|
+
result = _optionalChain([fns, 'access', _124 => _124[i], 'optionalCall', _125 => _125(result)]);
|
|
2610
2629
|
}
|
|
2611
2630
|
return result;
|
|
2612
2631
|
};
|
|
@@ -2616,7 +2635,7 @@ function pipeAsync(fn, ...fns) {
|
|
|
2616
2635
|
return async (...args) => {
|
|
2617
2636
|
let result = await fn(...args);
|
|
2618
2637
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
2619
|
-
result = await _optionalChain([fns, 'access',
|
|
2638
|
+
result = await _optionalChain([fns, 'access', _126 => _126[i], 'optionalCall', _127 => _127(result)]);
|
|
2620
2639
|
}
|
|
2621
2640
|
return result;
|
|
2622
2641
|
};
|
|
@@ -2646,7 +2665,7 @@ var resolveOptions = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, async
|
|
|
2646
2665
|
const projectJson = JSON.parse(projectJsonFile);
|
|
2647
2666
|
const projectName = projectJson.name;
|
|
2648
2667
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2649
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
2668
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _128 => _128.projects, 'optionalAccess', _129 => _129[projectName]])) {
|
|
2650
2669
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
2651
2670
|
}
|
|
2652
2671
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
@@ -2671,7 +2690,7 @@ var resolveOptions = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, async
|
|
|
2671
2690
|
...userOptions,
|
|
2672
2691
|
tsconfig: _chunk3DQG66DJjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
2673
2692
|
format: options.format || "cjs",
|
|
2674
|
-
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, _nullishCoalesce(userOptions.entry, () => ( "./src/index.ts")),
|
|
2693
|
+
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, _nullishCoalesce(userOptions.entry, () => ( "./src/index.ts")), false),
|
|
2675
2694
|
outdir: userOptions.outputPath || _chunk3DQG66DJjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
2676
2695
|
distDir: userOptions.distDir || "dist",
|
|
2677
2696
|
plugins: [],
|
|
@@ -2686,7 +2705,6 @@ var resolveOptions = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, async
|
|
|
2686
2705
|
metafile: userOptions.metafile !== false,
|
|
2687
2706
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
2688
2707
|
clean: userOptions.clean !== false,
|
|
2689
|
-
emitOnAll: userOptions.emitOnAll === true,
|
|
2690
2708
|
assets: _nullishCoalesce(userOptions.assets, () => ( [])),
|
|
2691
2709
|
injectShims: userOptions.injectShims !== true,
|
|
2692
2710
|
bundle: userOptions.bundle !== false,
|
|
@@ -2763,7 +2781,7 @@ async function generatePackageJson(context2) {
|
|
|
2763
2781
|
if (Array.isArray(context2.options.entryPoints)) {
|
|
2764
2782
|
entryPoints = context2.options.entryPoints.map((entryPoint) => typeof entryPoint === "string" ? {
|
|
2765
2783
|
in: entryPoint,
|
|
2766
|
-
out: entryPoint
|
|
2784
|
+
out: _chunk3DQG66DJjs.correctPaths.call(void 0, entryPoint.replaceAll(_chunk3DQG66DJjs.correctPaths.call(void 0, context2.options.config.workspaceRoot), "").replaceAll(_chunk3DQG66DJjs.correctPaths.call(void 0, context2.options.projectRoot), ""))
|
|
2767
2785
|
} : entryPoint);
|
|
2768
2786
|
}
|
|
2769
2787
|
for (const entryPoint of entryPoints) {
|
|
@@ -2834,7 +2852,6 @@ async function executeEsBuild(context2) {
|
|
|
2834
2852
|
delete options.clean;
|
|
2835
2853
|
delete options.debug;
|
|
2836
2854
|
delete options.generatePackageJson;
|
|
2837
|
-
delete options.emitOnAll;
|
|
2838
2855
|
delete options.distDir;
|
|
2839
2856
|
delete options.includeSrc;
|
|
2840
2857
|
delete options.verbose;
|
|
@@ -2847,7 +2864,10 @@ async function executeEsBuild(context2) {
|
|
|
2847
2864
|
delete options.injectShims;
|
|
2848
2865
|
delete options.external;
|
|
2849
2866
|
writeTrace(`Run esbuild (${context2.options.name}) with the following options:
|
|
2850
|
-
${formatLogMessage(
|
|
2867
|
+
${formatLogMessage({
|
|
2868
|
+
...options,
|
|
2869
|
+
define: "<Hidden>"
|
|
2870
|
+
})}`, context2.options.config);
|
|
2851
2871
|
const result = await esbuild2.build(options);
|
|
2852
2872
|
await esbuild2.stop();
|
|
2853
2873
|
if (result.metafile) {
|
|
@@ -2859,7 +2879,7 @@ ${formatLogMessage(options)}`, context2.options.config);
|
|
|
2859
2879
|
}
|
|
2860
2880
|
_chunkWTMG7MTKjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
2861
2881
|
async function copyBuildAssets(context2) {
|
|
2862
|
-
if (_optionalChain([context2, 'access',
|
|
2882
|
+
if (_optionalChain([context2, 'access', _130 => _130.result, 'optionalAccess', _131 => _131.errors, 'access', _132 => _132.length]) === 0) {
|
|
2863
2883
|
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
2864
2884
|
const stopwatch = getStopwatch(`${context2.options.name} asset copy`);
|
|
2865
2885
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
@@ -2869,7 +2889,7 @@ async function copyBuildAssets(context2) {
|
|
|
2869
2889
|
}
|
|
2870
2890
|
_chunkWTMG7MTKjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
2871
2891
|
async function reportResults(context2) {
|
|
2872
|
-
if (_optionalChain([context2, 'access',
|
|
2892
|
+
if (_optionalChain([context2, 'access', _133 => _133.result, 'optionalAccess', _134 => _134.errors, 'access', _135 => _135.length]) === 0) {
|
|
2873
2893
|
if (context2.result.warnings.length > 0) {
|
|
2874
2894
|
writeWarning(` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
|
|
2875
2895
|
}
|
|
@@ -2970,14 +2990,14 @@ var watch = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (context2, opti
|
|
|
2970
2990
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
2971
2991
|
async function esbuildExecutorFn(options, context2, config) {
|
|
2972
2992
|
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
2973
|
-
if (!_optionalChain([context2, 'access',
|
|
2993
|
+
if (!_optionalChain([context2, 'access', _136 => _136.projectsConfigurations, 'optionalAccess', _137 => _137.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _138 => _138.projectsConfigurations, 'access', _139 => _139.projects, 'access', _140 => _140[context2.projectName], 'optionalAccess', _141 => _141.root])) {
|
|
2974
2994
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
2975
2995
|
}
|
|
2976
2996
|
await build3({
|
|
2977
2997
|
...options,
|
|
2978
|
-
projectRoot: _optionalChain([context2, 'access',
|
|
2998
|
+
projectRoot: _optionalChain([context2, 'access', _142 => _142.projectsConfigurations, 'access', _143 => _143.projects, 'optionalAccess', _144 => _144[context2.projectName], 'access', _145 => _145.root]),
|
|
2979
2999
|
projectName: context2.projectName,
|
|
2980
|
-
sourceRoot: _optionalChain([context2, 'access',
|
|
3000
|
+
sourceRoot: _optionalChain([context2, 'access', _146 => _146.projectsConfigurations, 'access', _147 => _147.projects, 'optionalAccess', _148 => _148[context2.projectName], 'optionalAccess', _149 => _149.sourceRoot]),
|
|
2981
3001
|
format: options.format,
|
|
2982
3002
|
platform: options.format
|
|
2983
3003
|
});
|
|
@@ -3023,7 +3043,7 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
|
|
|
3023
3043
|
var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
|
|
3024
3044
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
3025
3045
|
async function sizeLimitExecutorFn(options, context2, config) {
|
|
3026
|
-
if (!_optionalChain([context2, 'optionalAccess',
|
|
3046
|
+
if (!_optionalChain([context2, 'optionalAccess', _150 => _150.projectName]) || !_optionalChain([context2, 'access', _151 => _151.projectsConfigurations, 'optionalAccess', _152 => _152.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
3027
3047
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
3028
3048
|
}
|
|
3029
3049
|
writeInfo(`\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
@@ -3032,7 +3052,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
3032
3052
|
_esbuild3.default,
|
|
3033
3053
|
_esbuildwhy2.default
|
|
3034
3054
|
], {
|
|
3035
|
-
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access',
|
|
3055
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _153 => _153.projectsConfigurations, 'access', _154 => _154.projects, 'access', _155 => _155[context2.projectName], 'optionalAccess', _156 => _156.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _157 => _157.projectsConfigurations, 'access', _158 => _158.projects, 'access', _159 => _159[context2.projectName], 'optionalAccess', _160 => _160.root]), () => ( "./")), "src")))
|
|
3036
3056
|
}).then((result) => {
|
|
3037
3057
|
writeInfo(`\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
3038
3058
|
});
|
|
@@ -3093,7 +3113,7 @@ _chunkWTMG7MTKjs.init_cjs_shims.call(void 0, );
|
|
|
3093
3113
|
var _jiti = require('jiti');
|
|
3094
3114
|
async function unbuildExecutorFn(options, context2, config) {
|
|
3095
3115
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
3096
|
-
if (!_optionalChain([context2, 'access',
|
|
3116
|
+
if (!_optionalChain([context2, 'access', _161 => _161.projectsConfigurations, 'optionalAccess', _162 => _162.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
3097
3117
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
3098
3118
|
}
|
|
3099
3119
|
if (!context2.projectsConfigurations.projects[context2.projectName].root) {
|
|
@@ -3181,7 +3201,7 @@ var withRunGenerator = /* @__PURE__ */ _chunkWTMG7MTKjs.__name.call(void 0, (nam
|
|
|
3181
3201
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
3182
3202
|
config = await getConfig(workspaceRoot3);
|
|
3183
3203
|
}
|
|
3184
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
3204
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _163 => _163.hooks, 'optionalAccess', _164 => _164.applyDefaultOptions])) {
|
|
3185
3205
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
3186
3206
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
3187
3207
|
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
@@ -3192,22 +3212,22 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
3192
3212
|
workspaceRoot: tree.root,
|
|
3193
3213
|
config
|
|
3194
3214
|
}, applyWorkspaceBaseTokens);
|
|
3195
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
3215
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _165 => _165.hooks, 'optionalAccess', _166 => _166.preProcess])) {
|
|
3196
3216
|
writeDebug("Running the preProcess hook...", config);
|
|
3197
3217
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
3198
3218
|
writeDebug("Completed the preProcess hook", config);
|
|
3199
3219
|
}
|
|
3200
3220
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
3201
3221
|
if (result) {
|
|
3202
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
3222
|
+
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _167 => _167.error, 'optionalAccess', _168 => _168.message]) && typeof _optionalChain([result, 'optionalAccess', _169 => _169.error, 'optionalAccess', _170 => _170.message]) === "string" && _optionalChain([result, 'optionalAccess', _171 => _171.error, 'optionalAccess', _172 => _172.name]) && typeof _optionalChain([result, 'optionalAccess', _173 => _173.error, 'optionalAccess', _174 => _174.name]) === "string") {
|
|
3203
3223
|
throw new Error(`The ${name} generator failed to run`, {
|
|
3204
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
3224
|
+
cause: _optionalChain([result, 'optionalAccess', _175 => _175.error])
|
|
3205
3225
|
});
|
|
3206
3226
|
} else if (result.success && result.data) {
|
|
3207
3227
|
return result;
|
|
3208
3228
|
}
|
|
3209
3229
|
}
|
|
3210
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
3230
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _176 => _176.hooks, 'optionalAccess', _177 => _177.postProcess])) {
|
|
3211
3231
|
writeDebug("Running the postProcess hook...", config);
|
|
3212
3232
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
3213
3233
|
writeDebug("Completed the postProcess hook", config);
|
|
@@ -3376,15 +3396,15 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3376
3396
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
3377
3397
|
let repository = {
|
|
3378
3398
|
type: "github",
|
|
3379
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
3399
|
+
url: _optionalChain([config, 'optionalAccess', _178 => _178.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _179 => _179.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _180 => _180.namespace]) || _optionalChain([config, 'optionalAccess', _181 => _181.name]) || "repository"}.git`
|
|
3380
3400
|
};
|
|
3381
3401
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
3382
3402
|
if (tree.exists("package.json")) {
|
|
3383
3403
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
3384
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3404
|
+
if (_optionalChain([packageJson, 'optionalAccess', _182 => _182.repository])) {
|
|
3385
3405
|
repository = packageJson.repository;
|
|
3386
3406
|
}
|
|
3387
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3407
|
+
if (_optionalChain([packageJson, 'optionalAccess', _183 => _183.description])) {
|
|
3388
3408
|
description = packageJson.description;
|
|
3389
3409
|
}
|
|
3390
3410
|
}
|
|
@@ -3439,9 +3459,9 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3439
3459
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
3440
3460
|
...json,
|
|
3441
3461
|
pnpm: {
|
|
3442
|
-
..._optionalChain([json, 'optionalAccess',
|
|
3462
|
+
..._optionalChain([json, 'optionalAccess', _184 => _184.pnpm]),
|
|
3443
3463
|
overrides: {
|
|
3444
|
-
..._optionalChain([json, 'optionalAccess',
|
|
3464
|
+
..._optionalChain([json, 'optionalAccess', _185 => _185.pnpm, 'optionalAccess', _186 => _186.overrides]),
|
|
3445
3465
|
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
3446
3466
|
}
|
|
3447
3467
|
}
|
|
@@ -3455,10 +3475,10 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
3455
3475
|
]);
|
|
3456
3476
|
if (tree.exists("package.json")) {
|
|
3457
3477
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
3458
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3478
|
+
if (_optionalChain([packageJson, 'optionalAccess', _187 => _187.repository])) {
|
|
3459
3479
|
repository = packageJson.repository;
|
|
3460
3480
|
}
|
|
3461
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
3481
|
+
if (_optionalChain([packageJson, 'optionalAccess', _188 => _188.description])) {
|
|
3462
3482
|
description = packageJson.description;
|
|
3463
3483
|
}
|
|
3464
3484
|
}
|
|
@@ -3506,24 +3526,24 @@ _chunkWTMG7MTKjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
|
3506
3526
|
function createProjectTsConfigJson(tree, options) {
|
|
3507
3527
|
const tsconfig = {
|
|
3508
3528
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
3509
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3529
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _189 => _189.tsconfigOptions]), () => ( {})),
|
|
3510
3530
|
compilerOptions: {
|
|
3511
3531
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
3512
3532
|
outDir: _chunk3DQG66DJjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
3513
3533
|
noEmit: true,
|
|
3514
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3534
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _190 => _190.tsconfigOptions, 'optionalAccess', _191 => _191.compilerOptions]), () => ( {}))
|
|
3515
3535
|
},
|
|
3516
3536
|
files: [
|
|
3517
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3537
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _192 => _192.tsconfigOptions, 'optionalAccess', _193 => _193.files]), () => ( []))
|
|
3518
3538
|
],
|
|
3519
3539
|
include: [
|
|
3520
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3540
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _194 => _194.tsconfigOptions, 'optionalAccess', _195 => _195.include]), () => ( [])),
|
|
3521
3541
|
"src/**/*.ts",
|
|
3522
3542
|
"src/**/*.js",
|
|
3523
3543
|
"bin/**/*"
|
|
3524
3544
|
],
|
|
3525
3545
|
exclude: [
|
|
3526
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3546
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _196 => _196.tsconfigOptions, 'optionalAccess', _197 => _197.exclude]), () => ( [])),
|
|
3527
3547
|
"jest.config.ts",
|
|
3528
3548
|
"src/**/*.spec.ts",
|
|
3529
3549
|
"src/**/*.test.ts"
|
|
@@ -3534,8 +3554,8 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
3534
3554
|
_chunkWTMG7MTKjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
3535
3555
|
async function normalizeOptions(tree, options, config) {
|
|
3536
3556
|
let importPath = options.importPath;
|
|
3537
|
-
if (!importPath && _optionalChain([config, 'optionalAccess',
|
|
3538
|
-
importPath = `@${_optionalChain([config, 'optionalAccess',
|
|
3557
|
+
if (!importPath && _optionalChain([config, 'optionalAccess', _198 => _198.namespace])) {
|
|
3558
|
+
importPath = `@${_optionalChain([config, 'optionalAccess', _199 => _199.namespace])}/${options.name}`;
|
|
3539
3559
|
}
|
|
3540
3560
|
if (options.publishable) {
|
|
3541
3561
|
if (!importPath) {
|
|
@@ -3664,11 +3684,11 @@ var _zodtojsonschema = require('zod-to-json-schema');
|
|
|
3664
3684
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
3665
3685
|
writeInfo("\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
|
|
3666
3686
|
writeTrace(`Determining the Storm Workspace Configuration JSON Schema...`, config);
|
|
3667
|
-
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0,
|
|
3687
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, stormWorkspaceConfigSchema, {
|
|
3668
3688
|
name: "StormWorkspaceConfiguration"
|
|
3669
3689
|
});
|
|
3670
3690
|
writeTrace(jsonSchema, config);
|
|
3671
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
3691
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _200 => _200.workspaceRoot]), () => ( findWorkspaceRoot())), _optionalChain([options, 'access', _201 => _201.outputFile, 'optionalAccess', _202 => _202.startsWith, 'call', _203 => _203("./")]) ? "" : "./");
|
|
3672
3692
|
writeTrace(`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
3673
3693
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
3674
3694
|
spaces: 2
|
package/dist/generators.d.mts
CHANGED
package/dist/generators.d.ts
CHANGED
package/dist/generators.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-3Y6AMHJ5.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkVXDOX27Tjs = require('./chunk-VXDOX27T.js');
|
|
5
5
|
require('./chunk-3DQG66DJ.js');
|
|
6
6
|
require('./chunk-WTMG7MTK.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.initGeneratorFn =
|
|
9
|
+
exports.initGeneratorFn = _chunkVXDOX27Tjs.initGeneratorFn;
|
package/dist/generators.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import z from 'zod';
|
|
|
4
4
|
/**
|
|
5
5
|
* Storm Workspace config values used during various dev-ops processes. It represents the config of the entire monorepo.
|
|
6
6
|
*/
|
|
7
|
-
declare const
|
|
7
|
+
declare const stormWorkspaceConfigSchema: z.ZodObject<{
|
|
8
8
|
$schema: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodDefault<z.ZodString>>>>;
|
|
9
9
|
extends: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
10
10
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -64,6 +64,16 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
64
64
|
slack?: string | undefined;
|
|
65
65
|
medium?: string | undefined;
|
|
66
66
|
}>;
|
|
67
|
+
error: z.ZodObject<{
|
|
68
|
+
codesFile: z.ZodDefault<z.ZodString>;
|
|
69
|
+
url: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
codesFile: string;
|
|
72
|
+
url?: string | undefined;
|
|
73
|
+
}, {
|
|
74
|
+
codesFile?: string | undefined;
|
|
75
|
+
url?: string | undefined;
|
|
76
|
+
}>;
|
|
67
77
|
mode: z.ZodDefault<z.ZodEnum<["development", "staging", "production"]>>;
|
|
68
78
|
workspaceRoot: z.ZodDefault<z.ZodString>;
|
|
69
79
|
externalPackagePatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -857,6 +867,10 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
857
867
|
slack: string;
|
|
858
868
|
medium: string;
|
|
859
869
|
};
|
|
870
|
+
error: {
|
|
871
|
+
codesFile: string;
|
|
872
|
+
url?: string | undefined;
|
|
873
|
+
};
|
|
860
874
|
mode: "development" | "staging" | "production";
|
|
861
875
|
workspaceRoot: string;
|
|
862
876
|
externalPackagePatterns: string[];
|
|
@@ -872,7 +886,7 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
872
886
|
packageManager: "npm" | "yarn" | "pnpm" | "bun";
|
|
873
887
|
timezone: string;
|
|
874
888
|
locale: string;
|
|
875
|
-
logLevel: "success" | "info" | "fatal" | "
|
|
889
|
+
logLevel: "success" | "info" | "fatal" | "error" | "silent" | "warn" | "debug" | "trace" | "all";
|
|
876
890
|
registry: {
|
|
877
891
|
github?: string | undefined;
|
|
878
892
|
npm?: string | undefined;
|
|
@@ -1054,6 +1068,10 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
1054
1068
|
slack?: string | undefined;
|
|
1055
1069
|
medium?: string | undefined;
|
|
1056
1070
|
};
|
|
1071
|
+
error: {
|
|
1072
|
+
codesFile?: string | undefined;
|
|
1073
|
+
url?: string | undefined;
|
|
1074
|
+
};
|
|
1057
1075
|
directories: {
|
|
1058
1076
|
cache?: string | undefined;
|
|
1059
1077
|
data?: string | undefined;
|
|
@@ -1230,7 +1248,7 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
1230
1248
|
packageManager?: "npm" | "yarn" | "pnpm" | "bun" | undefined;
|
|
1231
1249
|
timezone?: string | undefined;
|
|
1232
1250
|
locale?: string | undefined;
|
|
1233
|
-
logLevel?: "success" | "info" | "fatal" | "
|
|
1251
|
+
logLevel?: "success" | "info" | "fatal" | "error" | "silent" | "warn" | "debug" | "trace" | "all" | undefined;
|
|
1234
1252
|
skipConfigLogging?: boolean | undefined;
|
|
1235
1253
|
registry?: {
|
|
1236
1254
|
github?: string | undefined;
|
|
@@ -1243,12 +1261,28 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
1243
1261
|
extensions?: Record<string, any> | undefined;
|
|
1244
1262
|
}>;
|
|
1245
1263
|
|
|
1246
|
-
type
|
|
1247
|
-
|
|
1248
|
-
|
|
1264
|
+
type TStormWorkspaceConfig = z.infer<typeof stormWorkspaceConfigSchema>;
|
|
1265
|
+
/**
|
|
1266
|
+
* The Storm workspace's configuration object
|
|
1267
|
+
*
|
|
1268
|
+
* @remarks
|
|
1269
|
+
* This type is used to define the configuration object for the entire Storm workspace/monorepo. The value is extracted from the `storm-workspace.json` file in the workspace root and the currently configuration environment variables. The value can be obtained by calling `getWorkspaceConfig()` in `@storm-software/config-tools`.
|
|
1270
|
+
*
|
|
1271
|
+
* @deprecated
|
|
1272
|
+
* This type is deprecated and will be removed in the next major version. Use `StormWorkspaceConfig` instead.
|
|
1273
|
+
*/
|
|
1274
|
+
type StormConfig<TExtensionName extends keyof TStormWorkspaceConfig["extensions"] = keyof TStormWorkspaceConfig["extensions"], TExtensionConfig extends TStormWorkspaceConfig["extensions"][TExtensionName] = TStormWorkspaceConfig["extensions"][TExtensionName]> = TStormWorkspaceConfig & {
|
|
1275
|
+
extensions: (TStormWorkspaceConfig["extensions"] & {
|
|
1249
1276
|
[extensionName in TExtensionName]: TExtensionConfig;
|
|
1250
1277
|
}) | NonNullable<Record<string, any>>;
|
|
1251
1278
|
};
|
|
1279
|
+
/**
|
|
1280
|
+
* The Storm workspace's configuration object
|
|
1281
|
+
*
|
|
1282
|
+
* @remarks
|
|
1283
|
+
* This type is used to define the configuration object for the entire Storm workspace/monorepo. The value is extracted from the `storm-workspace.json` file in the workspace root and the currently configuration environment variables. The value can be obtained by calling `getWorkspaceConfig()` in `@storm-software/config-tools`.
|
|
1284
|
+
*/
|
|
1285
|
+
type StormWorkspaceConfig<TExtensionName extends keyof TStormWorkspaceConfig["extensions"] = keyof TStormWorkspaceConfig["extensions"], TExtensionConfig extends TStormWorkspaceConfig["extensions"][TExtensionName] = TStormWorkspaceConfig["extensions"][TExtensionName]> = StormConfig<TExtensionName, TExtensionConfig>;
|
|
1252
1286
|
|
|
1253
1287
|
interface BaseGeneratorResult extends Record<string, any> {
|
|
1254
1288
|
error?: Error;
|
|
@@ -1277,7 +1311,7 @@ interface InitGeneratorSchema {
|
|
|
1277
1311
|
skipFormat?: boolean,
|
|
1278
1312
|
}
|
|
1279
1313
|
|
|
1280
|
-
declare function initGeneratorFn(tree: Tree, options: InitGeneratorSchema, config:
|
|
1314
|
+
declare function initGeneratorFn(tree: Tree, options: InitGeneratorSchema, config: StormWorkspaceConfig): Promise<GeneratorCallback>;
|
|
1281
1315
|
declare const _default: (tree: Tree, _options: InitGeneratorSchema) => Promise<GeneratorCallback | BaseGeneratorResult>;
|
|
1282
1316
|
|
|
1283
1317
|
export { type InitGeneratorSchema as I, _default as _, initGeneratorFn as i };
|
|
@@ -4,7 +4,7 @@ import z from 'zod';
|
|
|
4
4
|
/**
|
|
5
5
|
* Storm Workspace config values used during various dev-ops processes. It represents the config of the entire monorepo.
|
|
6
6
|
*/
|
|
7
|
-
declare const
|
|
7
|
+
declare const stormWorkspaceConfigSchema: z.ZodObject<{
|
|
8
8
|
$schema: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodDefault<z.ZodString>>>>;
|
|
9
9
|
extends: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
10
10
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -64,6 +64,16 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
64
64
|
slack?: string | undefined;
|
|
65
65
|
medium?: string | undefined;
|
|
66
66
|
}>;
|
|
67
|
+
error: z.ZodObject<{
|
|
68
|
+
codesFile: z.ZodDefault<z.ZodString>;
|
|
69
|
+
url: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
codesFile: string;
|
|
72
|
+
url?: string | undefined;
|
|
73
|
+
}, {
|
|
74
|
+
codesFile?: string | undefined;
|
|
75
|
+
url?: string | undefined;
|
|
76
|
+
}>;
|
|
67
77
|
mode: z.ZodDefault<z.ZodEnum<["development", "staging", "production"]>>;
|
|
68
78
|
workspaceRoot: z.ZodDefault<z.ZodString>;
|
|
69
79
|
externalPackagePatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -857,6 +867,10 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
857
867
|
slack: string;
|
|
858
868
|
medium: string;
|
|
859
869
|
};
|
|
870
|
+
error: {
|
|
871
|
+
codesFile: string;
|
|
872
|
+
url?: string | undefined;
|
|
873
|
+
};
|
|
860
874
|
mode: "development" | "staging" | "production";
|
|
861
875
|
workspaceRoot: string;
|
|
862
876
|
externalPackagePatterns: string[];
|
|
@@ -872,7 +886,7 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
872
886
|
packageManager: "npm" | "yarn" | "pnpm" | "bun";
|
|
873
887
|
timezone: string;
|
|
874
888
|
locale: string;
|
|
875
|
-
logLevel: "success" | "info" | "fatal" | "
|
|
889
|
+
logLevel: "success" | "info" | "fatal" | "error" | "silent" | "warn" | "debug" | "trace" | "all";
|
|
876
890
|
registry: {
|
|
877
891
|
github?: string | undefined;
|
|
878
892
|
npm?: string | undefined;
|
|
@@ -1054,6 +1068,10 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
1054
1068
|
slack?: string | undefined;
|
|
1055
1069
|
medium?: string | undefined;
|
|
1056
1070
|
};
|
|
1071
|
+
error: {
|
|
1072
|
+
codesFile?: string | undefined;
|
|
1073
|
+
url?: string | undefined;
|
|
1074
|
+
};
|
|
1057
1075
|
directories: {
|
|
1058
1076
|
cache?: string | undefined;
|
|
1059
1077
|
data?: string | undefined;
|
|
@@ -1230,7 +1248,7 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
1230
1248
|
packageManager?: "npm" | "yarn" | "pnpm" | "bun" | undefined;
|
|
1231
1249
|
timezone?: string | undefined;
|
|
1232
1250
|
locale?: string | undefined;
|
|
1233
|
-
logLevel?: "success" | "info" | "fatal" | "
|
|
1251
|
+
logLevel?: "success" | "info" | "fatal" | "error" | "silent" | "warn" | "debug" | "trace" | "all" | undefined;
|
|
1234
1252
|
skipConfigLogging?: boolean | undefined;
|
|
1235
1253
|
registry?: {
|
|
1236
1254
|
github?: string | undefined;
|
|
@@ -1243,12 +1261,28 @@ declare const StormConfigSchema: z.ZodObject<{
|
|
|
1243
1261
|
extensions?: Record<string, any> | undefined;
|
|
1244
1262
|
}>;
|
|
1245
1263
|
|
|
1246
|
-
type
|
|
1247
|
-
|
|
1248
|
-
|
|
1264
|
+
type TStormWorkspaceConfig = z.infer<typeof stormWorkspaceConfigSchema>;
|
|
1265
|
+
/**
|
|
1266
|
+
* The Storm workspace's configuration object
|
|
1267
|
+
*
|
|
1268
|
+
* @remarks
|
|
1269
|
+
* This type is used to define the configuration object for the entire Storm workspace/monorepo. The value is extracted from the `storm-workspace.json` file in the workspace root and the currently configuration environment variables. The value can be obtained by calling `getWorkspaceConfig()` in `@storm-software/config-tools`.
|
|
1270
|
+
*
|
|
1271
|
+
* @deprecated
|
|
1272
|
+
* This type is deprecated and will be removed in the next major version. Use `StormWorkspaceConfig` instead.
|
|
1273
|
+
*/
|
|
1274
|
+
type StormConfig<TExtensionName extends keyof TStormWorkspaceConfig["extensions"] = keyof TStormWorkspaceConfig["extensions"], TExtensionConfig extends TStormWorkspaceConfig["extensions"][TExtensionName] = TStormWorkspaceConfig["extensions"][TExtensionName]> = TStormWorkspaceConfig & {
|
|
1275
|
+
extensions: (TStormWorkspaceConfig["extensions"] & {
|
|
1249
1276
|
[extensionName in TExtensionName]: TExtensionConfig;
|
|
1250
1277
|
}) | NonNullable<Record<string, any>>;
|
|
1251
1278
|
};
|
|
1279
|
+
/**
|
|
1280
|
+
* The Storm workspace's configuration object
|
|
1281
|
+
*
|
|
1282
|
+
* @remarks
|
|
1283
|
+
* This type is used to define the configuration object for the entire Storm workspace/monorepo. The value is extracted from the `storm-workspace.json` file in the workspace root and the currently configuration environment variables. The value can be obtained by calling `getWorkspaceConfig()` in `@storm-software/config-tools`.
|
|
1284
|
+
*/
|
|
1285
|
+
type StormWorkspaceConfig<TExtensionName extends keyof TStormWorkspaceConfig["extensions"] = keyof TStormWorkspaceConfig["extensions"], TExtensionConfig extends TStormWorkspaceConfig["extensions"][TExtensionName] = TStormWorkspaceConfig["extensions"][TExtensionName]> = StormConfig<TExtensionName, TExtensionConfig>;
|
|
1252
1286
|
|
|
1253
1287
|
interface BaseGeneratorResult extends Record<string, any> {
|
|
1254
1288
|
error?: Error;
|
|
@@ -1277,7 +1311,7 @@ interface InitGeneratorSchema {
|
|
|
1277
1311
|
skipFormat?: boolean,
|
|
1278
1312
|
}
|
|
1279
1313
|
|
|
1280
|
-
declare function initGeneratorFn(tree: Tree, options: InitGeneratorSchema, config:
|
|
1314
|
+
declare function initGeneratorFn(tree: Tree, options: InitGeneratorSchema, config: StormWorkspaceConfig): Promise<GeneratorCallback>;
|
|
1281
1315
|
declare const _default: (tree: Tree, _options: InitGeneratorSchema) => Promise<GeneratorCallback | BaseGeneratorResult>;
|
|
1282
1316
|
|
|
1283
1317
|
export { type InitGeneratorSchema as I, _default as _, initGeneratorFn as i };
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkZ2UXMCUYjs = require('./chunk-Z2UXMCUY.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkVXDOX27Tjs = require('./chunk-VXDOX27T.js');
|
|
8
8
|
require('./chunk-3DQG66DJ.js');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -16,10 +16,10 @@ var _chunkWTMG7MTKjs = require('./chunk-WTMG7MTK.js');
|
|
|
16
16
|
// index.ts
|
|
17
17
|
var index_exports = {};
|
|
18
18
|
_chunkWTMG7MTKjs.__export.call(void 0, index_exports, {
|
|
19
|
-
initGeneratorFn: () =>
|
|
19
|
+
initGeneratorFn: () => _chunkVXDOX27Tjs.initGeneratorFn
|
|
20
20
|
});
|
|
21
21
|
_chunkWTMG7MTKjs.init_cjs_shims.call(void 0, );
|
|
22
22
|
_chunkWTMG7MTKjs.__reExport.call(void 0, index_exports, _chunkWTMG7MTKjs.__toESM.call(void 0, _chunkZ2UXMCUYjs.require_components.call(void 0, )));
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
exports.initGeneratorFn =
|
|
25
|
+
exports.initGeneratorFn = _chunkVXDOX27Tjs.initGeneratorFn;
|
package/dist/index.mjs
CHANGED
|
@@ -669,23 +669,23 @@ var StormNxWorkspace = (_class = class extends _nxworkspace.NxWorkspace {
|
|
|
669
669
|
|
|
670
670
|
constructor(project) {
|
|
671
671
|
super(project);_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);_class.prototype.__init9.call(this);_class.prototype.__init10.call(this);_class.prototype.__init11.call(this);_class.prototype.__init12.call(this);;
|
|
672
|
-
let
|
|
672
|
+
let StormWorkspaceConfig;
|
|
673
673
|
if (project.root.outdir) {
|
|
674
|
-
const
|
|
675
|
-
|
|
674
|
+
const StormWorkspaceConfigJson = _fs.readFileSync.call(void 0, _chunk3DQG66DJjs.joinPaths.call(void 0, project.root.outdir, "storm-workspace.json"), "utf8");
|
|
675
|
+
StormWorkspaceConfig = JSON.parse(StormWorkspaceConfigJson);
|
|
676
676
|
}
|
|
677
|
-
if (_optionalChain([
|
|
678
|
-
this.npmScope = _optionalChain([
|
|
677
|
+
if (_optionalChain([StormWorkspaceConfig, 'optionalAccess', _ => _.namespace])) {
|
|
678
|
+
this.npmScope = _optionalChain([StormWorkspaceConfig, 'optionalAccess', _2 => _2.namespace]);
|
|
679
679
|
}
|
|
680
|
-
if (_optionalChain([
|
|
681
|
-
this.defaultBase = _optionalChain([
|
|
680
|
+
if (_optionalChain([StormWorkspaceConfig, 'optionalAccess', _3 => _3.branch])) {
|
|
681
|
+
this.defaultBase = _optionalChain([StormWorkspaceConfig, 'optionalAccess', _4 => _4.branch]);
|
|
682
682
|
this.affected = {
|
|
683
|
-
defaultBase: _optionalChain([
|
|
683
|
+
defaultBase: _optionalChain([StormWorkspaceConfig, 'optionalAccess', _5 => _5.branch])
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
|
-
if (_optionalChain([
|
|
686
|
+
if (_optionalChain([StormWorkspaceConfig, 'optionalAccess', _6 => _6.packageManager])) {
|
|
687
687
|
this.cli = {
|
|
688
|
-
packageManager: _optionalChain([
|
|
688
|
+
packageManager: _optionalChain([StormWorkspaceConfig, 'optionalAccess', _7 => _7.packageManager])
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
691
|
this.nxJson = new (0, _projen.JsonFile)(project, "nx.json", {
|
|
@@ -669,23 +669,23 @@ var StormNxWorkspace = class extends NxWorkspace {
|
|
|
669
669
|
cli;
|
|
670
670
|
constructor(project) {
|
|
671
671
|
super(project);
|
|
672
|
-
let
|
|
672
|
+
let StormWorkspaceConfig;
|
|
673
673
|
if (project.root.outdir) {
|
|
674
|
-
const
|
|
675
|
-
|
|
674
|
+
const StormWorkspaceConfigJson = readFileSync(joinPaths(project.root.outdir, "storm-workspace.json"), "utf8");
|
|
675
|
+
StormWorkspaceConfig = JSON.parse(StormWorkspaceConfigJson);
|
|
676
676
|
}
|
|
677
|
-
if (
|
|
678
|
-
this.npmScope =
|
|
677
|
+
if (StormWorkspaceConfig?.namespace) {
|
|
678
|
+
this.npmScope = StormWorkspaceConfig?.namespace;
|
|
679
679
|
}
|
|
680
|
-
if (
|
|
681
|
-
this.defaultBase =
|
|
680
|
+
if (StormWorkspaceConfig?.branch) {
|
|
681
|
+
this.defaultBase = StormWorkspaceConfig?.branch;
|
|
682
682
|
this.affected = {
|
|
683
|
-
defaultBase:
|
|
683
|
+
defaultBase: StormWorkspaceConfig?.branch
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
|
-
if (
|
|
686
|
+
if (StormWorkspaceConfig?.packageManager) {
|
|
687
687
|
this.cli = {
|
|
688
|
-
packageManager:
|
|
688
|
+
packageManager: StormWorkspaceConfig?.packageManager
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
691
|
this.nxJson = new JsonFile(project, "nx.json", {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkVXDOX27Tjs = require('../../../chunk-VXDOX27T.js');
|
|
5
5
|
require('../../../chunk-3DQG66DJ.js');
|
|
6
6
|
require('../../../chunk-WTMG7MTK.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.default =
|
|
10
|
+
exports.default = _chunkVXDOX27Tjs.generator_default; exports.initGeneratorFn = _chunkVXDOX27Tjs.initGeneratorFn;
|