@storm-software/cloudflare-tools 0.68.4 → 0.69.1

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.
@@ -102,7 +102,7 @@ import { defu } from "defu";
102
102
  var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
103
103
  const stopwatch = getStopwatch(name);
104
104
  let options = _options;
105
- let config = {};
105
+ let config5 = {};
106
106
  try {
107
107
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
108
108
  throw new Error(
@@ -113,8 +113,8 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
113
113
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot3;
114
114
  const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot3;
115
115
  const projectName = context.projectName;
116
- config.workspaceRoot = workspaceRoot3;
117
- writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `, config);
116
+ config5.workspaceRoot = workspaceRoot3;
117
+ writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `, config5);
118
118
  if (!executorOptions.skipReadingConfig) {
119
119
  writeTrace(
120
120
  `Loading the Storm Config from environment variables and storm.config.js file...
@@ -123,28 +123,28 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
123
123
  - sourceRoot: ${sourceRoot}
124
124
  - projectName: ${projectName}
125
125
  `,
126
- config
126
+ config5
127
127
  );
128
- config = await getConfig(workspaceRoot3);
128
+ config5 = await getConfig(workspaceRoot3);
129
129
  }
130
130
  if (executorOptions?.hooks?.applyDefaultOptions) {
131
- writeDebug("Running the applyDefaultOptions hook...", config);
131
+ writeDebug("Running the applyDefaultOptions hook...", config5);
132
132
  options = await Promise.resolve(
133
- executorOptions.hooks.applyDefaultOptions(options, config)
133
+ executorOptions.hooks.applyDefaultOptions(options, config5)
134
134
  );
135
- writeDebug("Completed the applyDefaultOptions hook", config);
135
+ writeDebug("Completed the applyDefaultOptions hook", config5);
136
136
  }
137
137
  writeTrace(
138
138
  `Executor schema options \u2699\uFE0F
139
139
  ${formatLogMessage(options)}
140
140
  `,
141
- config
141
+ config5
142
142
  );
143
143
  const tokenized = await applyWorkspaceTokens(
144
144
  options,
145
145
  defu(
146
- { workspaceRoot: workspaceRoot3, projectRoot, sourceRoot, projectName, config },
147
- config,
146
+ { workspaceRoot: workspaceRoot3, projectRoot, sourceRoot, projectName, config: config5 },
147
+ config5,
148
148
  context.projectsConfigurations.projects[context.projectName]
149
149
  ),
150
150
  applyWorkspaceProjectTokens
@@ -153,16 +153,16 @@ ${formatLogMessage(options)}
153
153
  `Executor schema tokenized options \u2699\uFE0F
154
154
  ${formatLogMessage(tokenized)}
155
155
  `,
156
- config
156
+ config5
157
157
  );
158
158
  if (executorOptions?.hooks?.preProcess) {
159
- writeDebug("Running the preProcess hook...", config);
159
+ writeDebug("Running the preProcess hook...", config5);
160
160
  await Promise.resolve(
161
- executorOptions.hooks.preProcess(tokenized, config)
161
+ executorOptions.hooks.preProcess(tokenized, config5)
162
162
  );
163
- writeDebug("Completed the preProcess hook", config);
163
+ writeDebug("Completed the preProcess hook", config5);
164
164
  }
165
- const ret = executorFn(tokenized, context, config);
165
+ const ret = executorFn(tokenized, context, config5);
166
166
  if (_isFunction(ret?.next)) {
167
167
  const asyncGen = ret;
168
168
  for await (const iter of asyncGen) {
@@ -176,7 +176,7 @@ ${formatLogMessage(tokenized)}
176
176
  writeTrace(
177
177
  `Failure determined by the ${name} executor
178
178
  ${formatLogMessage(result)}`,
179
- config
179
+ config5
180
180
  );
181
181
  console.error(result);
182
182
  throw new Error(`The ${name} executor failed to run`, {
@@ -184,25 +184,25 @@ ${formatLogMessage(result)}`,
184
184
  });
185
185
  }
186
186
  if (executorOptions?.hooks?.postProcess) {
187
- writeDebug("Running the postProcess hook...", config);
188
- await Promise.resolve(executorOptions.hooks.postProcess(config));
189
- writeDebug("Completed the postProcess hook", config);
187
+ writeDebug("Running the postProcess hook...", config5);
188
+ await Promise.resolve(executorOptions.hooks.postProcess(config5));
189
+ writeDebug("Completed the postProcess hook", config5);
190
190
  }
191
191
  writeSuccess(`Completed running the ${name} task executor!
192
- `, config);
192
+ `, config5);
193
193
  return {
194
194
  success: true
195
195
  };
196
196
  } catch (error) {
197
197
  writeFatal(
198
198
  "A fatal error occurred while running the executor - the process was forced to terminate",
199
- config
199
+ config5
200
200
  );
201
201
  writeError(
202
202
  `An exception was thrown in the executor's process
203
203
  - Details: ${error.message}
204
204
  - Stacktrace: ${error.stack}`,
205
- config
205
+ config5
206
206
  );
207
207
  return {
208
208
  success: false
@@ -478,7 +478,7 @@ import { relative as relative2 } from "path";
478
478
  import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
479
479
  import { glob } from "glob";
480
480
  import { readFile, writeFile } from "node:fs/promises";
481
- var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
481
+ var copyAssets = async (config5, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
482
482
  const pendingAssets = Array.from(assets ?? []);
483
483
  pendingAssets.push({
484
484
  input: projectRoot,
@@ -507,29 +507,29 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
507
507
  writeTrace(
508
508
  `\u{1F4DD} Copying the following assets to the output directory:
509
509
  ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`,
510
- config
510
+ config5
511
511
  );
512
512
  const assetHandler = new CopyAssetsHandler({
513
513
  projectDir: projectRoot,
514
- rootDir: config.workspaceRoot,
514
+ rootDir: config5.workspaceRoot,
515
515
  outputDir: outputPath,
516
516
  assets: pendingAssets
517
517
  });
518
518
  await assetHandler.processAllAssetsOnce();
519
- writeTrace("Completed copying assets to the output directory", config);
519
+ writeTrace("Completed copying assets to the output directory", config5);
520
520
  if (includeSrc === true) {
521
521
  writeDebug(
522
522
  `\u{1F4DD} Adding banner and writing source files: ${joinPaths(
523
523
  outputPath,
524
524
  "src"
525
525
  )}`,
526
- config
526
+ config5
527
527
  );
528
528
  const files = await glob([
529
- joinPaths(config.workspaceRoot, outputPath, "src/**/*.ts"),
530
- joinPaths(config.workspaceRoot, outputPath, "src/**/*.tsx"),
531
- joinPaths(config.workspaceRoot, outputPath, "src/**/*.js"),
532
- joinPaths(config.workspaceRoot, outputPath, "src/**/*.jsx")
529
+ joinPaths(config5.workspaceRoot, outputPath, "src/**/*.ts"),
530
+ joinPaths(config5.workspaceRoot, outputPath, "src/**/*.tsx"),
531
+ joinPaths(config5.workspaceRoot, outputPath, "src/**/*.js"),
532
+ joinPaths(config5.workspaceRoot, outputPath, "src/**/*.jsx")
533
533
  ]);
534
534
  await Promise.allSettled(
535
535
  files.map(
@@ -1107,8 +1107,8 @@ async function build(options) {
1107
1107
  }
1108
1108
 
1109
1109
  // ../workspace-tools/src/executors/esbuild/executor.ts
1110
- async function esbuildExecutorFn(options, context, config) {
1111
- writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
1110
+ async function esbuildExecutorFn(options, context, config5) {
1111
+ writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config5);
1112
1112
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) {
1113
1113
  throw new Error(
1114
1114
  "The Build process failed because the context is not valid. Please run this command from a workspace."
@@ -1180,13 +1180,13 @@ import esBuildPlugin from "@size-limit/esbuild";
1180
1180
  import esBuildWhyPlugin from "@size-limit/esbuild-why";
1181
1181
  import filePlugin from "@size-limit/file";
1182
1182
  import sizeLimit from "size-limit";
1183
- async function sizeLimitExecutorFn(options, context, config) {
1183
+ async function sizeLimitExecutorFn(options, context, config5) {
1184
1184
  if (!context?.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName]) {
1185
1185
  throw new Error(
1186
1186
  "The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
1187
1187
  );
1188
1188
  }
1189
- writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
1189
+ writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config5);
1190
1190
  sizeLimit([filePlugin, esBuildPlugin, esBuildWhyPlugin], {
1191
1191
  checks: options.entry ?? context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? joinPathFragments3(
1192
1192
  context.projectsConfigurations.projects[context.projectName]?.root ?? "./",
@@ -1195,7 +1195,7 @@ async function sizeLimitExecutorFn(options, context, config) {
1195
1195
  }).then((result) => {
1196
1196
  writeInfo(
1197
1197
  `\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
1198
- config
1198
+ config5
1199
1199
  );
1200
1200
  });
1201
1201
  return {
@@ -1218,14 +1218,14 @@ var executor_default7 = withRunExecutor(
1218
1218
  // ../workspace-tools/src/executors/typia/executor.ts
1219
1219
  import { removeSync } from "fs-extra";
1220
1220
  import { TypiaProgrammer } from "typia/lib/programmers/TypiaProgrammer.js";
1221
- async function typiaExecutorFn(options, _, config) {
1221
+ async function typiaExecutorFn(options, _, config5) {
1222
1222
  if (options.clean !== false) {
1223
- writeInfo(`\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
1223
+ writeInfo(`\u{1F9F9} Cleaning output path: ${options.outputPath}`, config5);
1224
1224
  removeSync(options.outputPath);
1225
1225
  }
1226
1226
  await Promise.all(
1227
1227
  options.entry.map((entry) => {
1228
- writeInfo(`\u{1F680} Running Typia on entry: ${entry}`, config);
1228
+ writeInfo(`\u{1F680} Running Typia on entry: ${entry}`, config5);
1229
1229
  return TypiaProgrammer.build({
1230
1230
  input: entry,
1231
1231
  output: options.outputPath,
@@ -1257,8 +1257,8 @@ var executor_default8 = withRunExecutor(
1257
1257
  // ../workspace-tools/src/executors/unbuild/executor.ts
1258
1258
  import { defu as defu3 } from "defu";
1259
1259
  import { createJiti } from "jiti";
1260
- async function unbuildExecutorFn(options, context, config) {
1261
- writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
1260
+ async function unbuildExecutorFn(options, context, config5) {
1261
+ writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config5);
1262
1262
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
1263
1263
  throw new Error(
1264
1264
  "The Build process failed because the context is not valid. Please run this command from a workspace root directory."
@@ -1274,10 +1274,10 @@ async function unbuildExecutorFn(options, context, config) {
1274
1274
  "The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory."
1275
1275
  );
1276
1276
  }
1277
- const jiti = createJiti(config.workspaceRoot, {
1278
- fsCache: config.skipCache ? false : joinPaths(
1279
- config.workspaceRoot,
1280
- config.directories.cache || "node_modules/.cache/storm",
1277
+ const jiti = createJiti(config5.workspaceRoot, {
1278
+ fsCache: config5.skipCache ? false : joinPaths(
1279
+ config5.workspaceRoot,
1280
+ config5.directories.cache || "node_modules/.cache/storm",
1281
1281
  "jiti"
1282
1282
  ),
1283
1283
  interopDefault: true
@@ -1297,9 +1297,9 @@ async function unbuildExecutorFn(options, context, config) {
1297
1297
  {
1298
1298
  stubOptions: {
1299
1299
  jiti: {
1300
- fsCache: config.skipCache ? false : joinPaths(
1301
- config.workspaceRoot,
1302
- config.directories.cache || "node_modules/.cache/storm",
1300
+ fsCache: config5.skipCache ? false : joinPaths(
1301
+ config5.workspaceRoot,
1302
+ config5.directories.cache || "node_modules/.cache/storm",
1303
1303
  "jiti"
1304
1304
  )
1305
1305
  }
@@ -1332,7 +1332,7 @@ var executor_default9 = withRunExecutor(
1332
1332
  {
1333
1333
  skipReadingConfig: false,
1334
1334
  hooks: {
1335
- applyDefaultOptions: async (options, config) => {
1335
+ applyDefaultOptions: async (options, config5) => {
1336
1336
  options.debug ??= false;
1337
1337
  options.treeShaking ??= true;
1338
1338
  options.buildOnly ??= false;
@@ -1359,46 +1359,46 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
1359
1359
  }) => async (tree, _options) => {
1360
1360
  const stopwatch = getStopwatch(name);
1361
1361
  let options = _options;
1362
- let config;
1362
+ let config5;
1363
1363
  try {
1364
1364
  writeInfo(`\u26A1 Running the ${name} generator...
1365
1365
 
1366
- `, config);
1366
+ `, config5);
1367
1367
  const workspaceRoot3 = findWorkspaceRoot();
1368
1368
  if (!generatorOptions.skipReadingConfig) {
1369
1369
  writeDebug(
1370
1370
  `Loading the Storm Config from environment variables and storm.config.js file...
1371
1371
  - workspaceRoot: ${workspaceRoot3}`,
1372
- config
1372
+ config5
1373
1373
  );
1374
- config = await getConfig(workspaceRoot3);
1374
+ config5 = await getConfig(workspaceRoot3);
1375
1375
  }
1376
1376
  if (generatorOptions?.hooks?.applyDefaultOptions) {
1377
- writeDebug("Running the applyDefaultOptions hook...", config);
1377
+ writeDebug("Running the applyDefaultOptions hook...", config5);
1378
1378
  options = await Promise.resolve(
1379
- generatorOptions.hooks.applyDefaultOptions(options, config)
1379
+ generatorOptions.hooks.applyDefaultOptions(options, config5)
1380
1380
  );
1381
- writeDebug("Completed the applyDefaultOptions hook", config);
1381
+ writeDebug("Completed the applyDefaultOptions hook", config5);
1382
1382
  }
1383
1383
  writeTrace(
1384
1384
  `Generator schema options \u2699\uFE0F
1385
1385
  ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
1386
- config
1386
+ config5
1387
1387
  );
1388
1388
  const tokenized = await applyWorkspaceTokens(
1389
1389
  options,
1390
- { workspaceRoot: tree.root, config },
1390
+ { workspaceRoot: tree.root, config: config5 },
1391
1391
  applyWorkspaceBaseTokens
1392
1392
  );
1393
1393
  if (generatorOptions?.hooks?.preProcess) {
1394
- writeDebug("Running the preProcess hook...", config);
1394
+ writeDebug("Running the preProcess hook...", config5);
1395
1395
  await Promise.resolve(
1396
- generatorOptions.hooks.preProcess(tokenized, config)
1396
+ generatorOptions.hooks.preProcess(tokenized, config5)
1397
1397
  );
1398
- writeDebug("Completed the preProcess hook", config);
1398
+ writeDebug("Completed the preProcess hook", config5);
1399
1399
  }
1400
1400
  const result = await Promise.resolve(
1401
- generatorFn(tree, tokenized, config)
1401
+ generatorFn(tree, tokenized, config5)
1402
1402
  );
1403
1403
  if (result) {
1404
1404
  if (result.success === false || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string") {
@@ -1410,25 +1410,25 @@ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[ke
1410
1410
  }
1411
1411
  }
1412
1412
  if (generatorOptions?.hooks?.postProcess) {
1413
- writeDebug("Running the postProcess hook...", config);
1414
- await Promise.resolve(generatorOptions.hooks.postProcess(config));
1415
- writeDebug("Completed the postProcess hook", config);
1413
+ writeDebug("Running the postProcess hook...", config5);
1414
+ await Promise.resolve(generatorOptions.hooks.postProcess(config5));
1415
+ writeDebug("Completed the postProcess hook", config5);
1416
1416
  }
1417
1417
  return () => {
1418
1418
  writeSuccess(`Completed running the ${name} generator!
1419
- `, config);
1419
+ `, config5);
1420
1420
  };
1421
1421
  } catch (error) {
1422
1422
  return () => {
1423
1423
  writeFatal(
1424
1424
  "A fatal error occurred while running the generator - the process was forced to terminate",
1425
- config
1425
+ config5
1426
1426
  );
1427
1427
  writeError(
1428
1428
  `An exception was thrown in the generator's process
1429
1429
  - Details: ${error.message}
1430
1430
  - Stacktrace: ${error.stack}`,
1431
- config
1431
+ config5
1432
1432
  );
1433
1433
  };
1434
1434
  } finally {
@@ -1464,7 +1464,7 @@ var nodeVersion = "20.11.0";
1464
1464
  var pnpmVersion = "8.10.2";
1465
1465
 
1466
1466
  // ../workspace-tools/src/base/typescript-library-generator.ts
1467
- async function typeScriptLibraryGeneratorFn(tree, options, config) {
1467
+ async function typeScriptLibraryGeneratorFn(tree, options, config5) {
1468
1468
  const normalized = await normalizeOptions(tree, { ...options });
1469
1469
  const tasks = [];
1470
1470
  tasks.push(
@@ -1541,7 +1541,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
1541
1541
  addProjectConfiguration(tree, normalized.name, projectConfig);
1542
1542
  let repository = {
1543
1543
  type: "github",
1544
- url: config?.repository || `https://github.com/${(typeof config?.organization === "string" ? config?.organization : config?.organization?.name) || "storm-software"}/${config?.namespace || config?.name || "repository"}.git`
1544
+ url: config5?.repository || `https://github.com/${(typeof config5?.organization === "string" ? config5?.organization : config5?.organization?.name) || "storm-software"}/${config5?.namespace || config5?.name || "repository"}.git`
1545
1545
  };
1546
1546
  let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
1547
1547
  if (tree.exists("package.json")) {
@@ -1687,10 +1687,10 @@ function createProjectTsConfigJson(tree, options) {
1687
1687
  };
1688
1688
  writeJson(tree, joinPaths(options.projectRoot, "tsconfig.json"), tsconfig);
1689
1689
  }
1690
- async function normalizeOptions(tree, options, config) {
1690
+ async function normalizeOptions(tree, options, config5) {
1691
1691
  let importPath = options.importPath;
1692
- if (!importPath && config?.namespace) {
1693
- importPath = `@${config?.namespace}/${options.name}`;
1692
+ if (!importPath && config5?.namespace) {
1693
+ importPath = `@${config5?.namespace}/${options.name}`;
1694
1694
  }
1695
1695
  if (options.publishable) {
1696
1696
  if (!importPath) {
@@ -1749,7 +1749,7 @@ async function normalizeOptions(tree, options, config) {
1749
1749
  }
1750
1750
 
1751
1751
  // ../workspace-tools/src/generators/browser-library/generator.ts
1752
- async function browserLibraryGeneratorFn(tree, schema, config) {
1752
+ async function browserLibraryGeneratorFn(tree, schema, config5) {
1753
1753
  const filesDir = joinPaths(
1754
1754
  __dirname,
1755
1755
  "src",
@@ -1811,7 +1811,7 @@ async function browserLibraryGeneratorFn(tree, schema, config) {
1811
1811
  }
1812
1812
  }
1813
1813
  });
1814
- await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
1814
+ await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config5);
1815
1815
  await formatFiles2(tree);
1816
1816
  return null;
1817
1817
  }
@@ -1832,14 +1832,14 @@ var generator_default = withRunGenerator(
1832
1832
  // ../workspace-tools/src/generators/config-schema/generator.ts
1833
1833
  import { formatFiles as formatFiles3, writeJson as writeJson2 } from "@nx/devkit";
1834
1834
  import * as z from "zod";
1835
- async function configSchemaGeneratorFn(tree, options, config) {
1835
+ async function configSchemaGeneratorFn(tree, options, config5) {
1836
1836
  writeInfo(
1837
1837
  "\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
1838
- config
1838
+ config5
1839
1839
  );
1840
1840
  writeTrace(
1841
1841
  `Determining the Storm Workspace Configuration JSON Schema...`,
1842
- config
1842
+ config5
1843
1843
  );
1844
1844
  const jsonSchema = z.toJSONSchema(workspaceConfigSchema, {
1845
1845
  target: "draft-7",
@@ -1848,25 +1848,25 @@ async function configSchemaGeneratorFn(tree, options, config) {
1848
1848
  jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
1849
1849
  jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
1850
1850
  jsonSchema.description ??= "This JSON Schema defines the structure of the Storm Workspace configuration file (`storm-workspace.json`). It is used to validate the configuration file and ensure that it adheres to the expected format.";
1851
- writeTrace(jsonSchema, config);
1851
+ writeTrace(jsonSchema, config5);
1852
1852
  if (!options.outputFile) {
1853
1853
  throw new Error(
1854
1854
  "The `outputFile` option is required. Please specify the output file path."
1855
1855
  );
1856
1856
  }
1857
1857
  const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
1858
- config?.workspaceRoot ?? findWorkspaceRoot(),
1858
+ config5?.workspaceRoot ?? findWorkspaceRoot(),
1859
1859
  options.outputFile.startsWith("./") ? "" : "./"
1860
1860
  );
1861
1861
  writeTrace(
1862
1862
  `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
1863
- config
1863
+ config5
1864
1864
  );
1865
1865
  writeJson2(tree, outputPath, jsonSchema, { spaces: 2 });
1866
1866
  await formatFiles3(tree);
1867
1867
  writeSuccess(
1868
1868
  "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
1869
- config
1869
+ config5
1870
1870
  );
1871
1871
  return {
1872
1872
  success: true
@@ -1898,7 +1898,7 @@ import {
1898
1898
  names as names3,
1899
1899
  offsetFromRoot as offsetFromRoot3
1900
1900
  } from "@nx/devkit";
1901
- async function neutralLibraryGeneratorFn(tree, schema, config) {
1901
+ async function neutralLibraryGeneratorFn(tree, schema, config5) {
1902
1902
  const filesDir = joinPaths(
1903
1903
  __dirname,
1904
1904
  "src",
@@ -1932,7 +1932,7 @@ async function neutralLibraryGeneratorFn(tree, schema, config) {
1932
1932
  buildable: options.bundler && options.bundler !== "none",
1933
1933
  hasUnitTestRunner: options.unitTestRunner !== "none"
1934
1934
  });
1935
- await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
1935
+ await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config5);
1936
1936
  await formatFiles5(tree);
1937
1937
  return null;
1938
1938
  }
@@ -1957,7 +1957,7 @@ import {
1957
1957
  names as names4,
1958
1958
  offsetFromRoot as offsetFromRoot4
1959
1959
  } from "@nx/devkit";
1960
- async function nodeLibraryGeneratorFn(tree, schema, config) {
1960
+ async function nodeLibraryGeneratorFn(tree, schema, config5) {
1961
1961
  const filesDir = joinPaths(
1962
1962
  __dirname,
1963
1963
  "src",
@@ -1993,7 +1993,7 @@ async function nodeLibraryGeneratorFn(tree, schema, config) {
1993
1993
  buildable: options.bundler && options.bundler !== "none",
1994
1994
  hasUnitTestRunner: options.unitTestRunner !== "none"
1995
1995
  });
1996
- await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
1996
+ await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config5);
1997
1997
  await formatFiles6(tree);
1998
1998
  return null;
1999
1999
  }
@@ -2261,8 +2261,19 @@ import {
2261
2261
  import { resolveLocalPackageDependencies as resolveLocalPackageJsonDependencies } from "@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies";
2262
2262
  import { updateLockFile } from "@nx/js/src/release/utils/update-lock-file";
2263
2263
 
2264
- // ../git-tools/dist/chunk-GRCMQK4Q.js
2265
- var COMMIT_TYPES = {
2264
+ // ../git-tools/dist/chunk-5XU2KBM6.js
2265
+ var DEFAULT_COMMIT_PROMPT_MESSAGES = {
2266
+ skip: "press enter to skip",
2267
+ max: "must be %d chars at most",
2268
+ min: "must be %d chars at least",
2269
+ emptyWarning: "can not be empty",
2270
+ upperLimitWarning: "%s is %d characters longer than the upper limit",
2271
+ lowerLimitWarning: "%s is %d characters less than the lower limit",
2272
+ closedIssueMessage: "Closes: "
2273
+ };
2274
+
2275
+ // ../git-tools/dist/chunk-3GGWHKRP.js
2276
+ var DEFAULT_COMMIT_TYPES = {
2266
2277
  /* --- Bumps version when selected --- */
2267
2278
  "chore": {
2268
2279
  "description": "Other changes that don't modify src or test files",
@@ -2391,15 +2402,148 @@ var COMMIT_TYPES = {
2391
2402
  }
2392
2403
  }
2393
2404
  };
2405
+ var CHANGELOG_COMMIT_TYPES_OBJECT = Object.freeze(
2406
+ Object.entries(DEFAULT_COMMIT_TYPES).reduce(
2407
+ (ret, [key, commitType]) => {
2408
+ ret[key] = {
2409
+ ...commitType.changelog,
2410
+ type: key,
2411
+ section: commitType.changelog?.title || commitType.title,
2412
+ hidden: commitType.changelog?.hidden
2413
+ };
2414
+ return ret;
2415
+ },
2416
+ {}
2417
+ )
2418
+ );
2419
+ var CHANGELOG_COMMIT_TYPES = [
2420
+ CHANGELOG_COMMIT_TYPES_OBJECT.feat,
2421
+ CHANGELOG_COMMIT_TYPES_OBJECT.fix,
2422
+ CHANGELOG_COMMIT_TYPES_OBJECT.chore,
2423
+ CHANGELOG_COMMIT_TYPES_OBJECT.deps,
2424
+ CHANGELOG_COMMIT_TYPES_OBJECT.docs,
2425
+ CHANGELOG_COMMIT_TYPES_OBJECT.style,
2426
+ CHANGELOG_COMMIT_TYPES_OBJECT.refactor,
2427
+ CHANGELOG_COMMIT_TYPES_OBJECT.perf,
2428
+ CHANGELOG_COMMIT_TYPES_OBJECT.build,
2429
+ CHANGELOG_COMMIT_TYPES_OBJECT.ci,
2430
+ CHANGELOG_COMMIT_TYPES_OBJECT.test
2431
+ ];
2432
+ var CHANGELOG_COMMIT_TYPE_ORDER = CHANGELOG_COMMIT_TYPES.map(
2433
+ (entry) => entry.type
2434
+ );
2435
+ var CHANGELOG_COMMIT_SECTION_ORDER = CHANGELOG_COMMIT_TYPES.map(
2436
+ (entry) => entry.section
2437
+ );
2438
+ var changelogs = {
2439
+ props: {
2440
+ ignoreCommits: void 0,
2441
+ types: CHANGELOG_COMMIT_TYPES,
2442
+ bumpStrict: true,
2443
+ scope: void 0,
2444
+ scopeOnly: false
2445
+ }
2446
+ };
2447
+ var commitlint = {
2448
+ helpUrl: "https://developer.stormsoftware.com/commitlint/minimal",
2449
+ rules: {
2450
+ "body-leading-blank": [1, "always"],
2451
+ "body-max-length": [2, "always", 600],
2452
+ "footer-leading-blank": [1, "always"],
2453
+ "footer-max-line-length": [2, "always", 150],
2454
+ "header-max-length": [2, "always", 150],
2455
+ "header-trim": [2, "always"],
2456
+ "subject-case": [2, "always", ["sentence-case"]],
2457
+ "subject-empty": [2, "never"],
2458
+ "subject-full-stop": [2, "never", "."],
2459
+ "subject-max-length": [2, "always", 150],
2460
+ "subject-min-length": [2, "always", 3],
2461
+ "type-case": [2, "always", "kebab-case"],
2462
+ "type-empty": [2, "never"],
2463
+ "type-enum": [
2464
+ 2,
2465
+ "always",
2466
+ Object.keys(DEFAULT_COMMIT_TYPES)
2467
+ ],
2468
+ "type-max-length": [2, "always", 20],
2469
+ "type-min-length": [2, "always", 3],
2470
+ "scope-empty": [2, "always"]
2471
+ },
2472
+ settings: {
2473
+ enableMultipleScopes: false,
2474
+ disableEmoji: true,
2475
+ breakingChangePrefix: "\u{1F4A3} ",
2476
+ closedIssuePrefix: "\u2705 ",
2477
+ format: "{type}: {emoji}{subject}"
2478
+ }
2479
+ };
2480
+ var config = {
2481
+ types: DEFAULT_COMMIT_TYPES,
2482
+ changelogs,
2483
+ commitlint
2484
+ };
2485
+ var minimal_default = config;
2486
+ var changelogs2 = {
2487
+ props: {
2488
+ ignoreCommits: void 0,
2489
+ types: CHANGELOG_COMMIT_TYPES,
2490
+ bumpStrict: true,
2491
+ scope: ["monorepo"],
2492
+ scopeOnly: true
2493
+ }
2494
+ };
2495
+ var commitlint2 = {
2496
+ helpUrl: "https://developer.stormsoftware.com/commitlint/monorepo",
2497
+ rules: {
2498
+ "body-leading-blank": [1, "always"],
2499
+ "body-max-length": [2, "always", 600],
2500
+ "footer-leading-blank": [1, "always"],
2501
+ "footer-max-line-length": [2, "always", 150],
2502
+ "header-max-length": [2, "always", 150],
2503
+ "header-trim": [2, "always"],
2504
+ "subject-case": [2, "always", ["sentence-case"]],
2505
+ "subject-empty": [2, "never"],
2506
+ "subject-full-stop": [2, "never", "."],
2507
+ "subject-max-length": [2, "always", 150],
2508
+ "subject-min-length": [2, "always", 3],
2509
+ "type-case": [2, "always", "kebab-case"],
2510
+ "type-empty": [2, "never"],
2511
+ "type-enum": [
2512
+ 2,
2513
+ "always",
2514
+ Object.keys(DEFAULT_COMMIT_TYPES)
2515
+ ],
2516
+ "type-max-length": [2, "always", 20],
2517
+ "type-min-length": [2, "always", 3],
2518
+ "scope-case": [2, "always", ["kebab-case"]],
2519
+ "scope-empty": [2, "never"]
2520
+ },
2521
+ settings: {
2522
+ enableMultipleScopes: false,
2523
+ disableEmoji: true,
2524
+ breakingChangePrefix: "\u{1F4A3} ",
2525
+ closedIssuePrefix: "\u2705 ",
2526
+ format: "{type}({scope}): {emoji}{subject}"
2527
+ }
2528
+ };
2529
+ var config2 = {
2530
+ types: DEFAULT_COMMIT_TYPES,
2531
+ changelogs: changelogs2,
2532
+ commitlint: commitlint2
2533
+ };
2534
+ var monorepo_default = config2;
2535
+ var COMMIT_CONFIGS = { minimal: minimal_default, monorepo: monorepo_default };
2536
+
2537
+ // ../git-tools/dist/chunk-KZRVQ5RZ.js
2394
2538
  var DEFAULT_MINIMAL_COMMIT_QUESTIONS = {
2395
2539
  type: {
2396
2540
  type: "select",
2397
2541
  title: "Commit Type",
2398
2542
  description: "Select the commit type that best describes your changes",
2399
- enum: Object.keys(COMMIT_TYPES).filter(
2400
- (type) => COMMIT_TYPES[type].hidden !== true
2543
+ enum: Object.keys(DEFAULT_COMMIT_TYPES).filter(
2544
+ (type) => DEFAULT_COMMIT_TYPES[type].hidden !== true
2401
2545
  ).reduce((ret, type) => {
2402
- ret[type] = COMMIT_TYPES[type];
2546
+ ret[type] = DEFAULT_COMMIT_TYPES[type];
2403
2547
  return ret;
2404
2548
  }, {}),
2405
2549
  defaultValue: "chore",
@@ -2448,6 +2592,14 @@ var DEFAULT_MINIMAL_COMMIT_QUESTIONS = {
2448
2592
  minLength: 3
2449
2593
  }
2450
2594
  };
2595
+ var config3 = {
2596
+ settings: COMMIT_CONFIGS.minimal.commitlint.settings,
2597
+ messages: DEFAULT_COMMIT_PROMPT_MESSAGES,
2598
+ questions: DEFAULT_MINIMAL_COMMIT_QUESTIONS,
2599
+ types: DEFAULT_COMMIT_TYPES
2600
+ };
2601
+
2602
+ // ../git-tools/dist/chunk-JCEVFJCA.js
2451
2603
  var DEFAULT_MONOREPO_COMMIT_QUESTIONS = {
2452
2604
  type: DEFAULT_MINIMAL_COMMIT_QUESTIONS.type,
2453
2605
  scope: {
@@ -2466,55 +2618,11 @@ var DEFAULT_MONOREPO_COMMIT_QUESTIONS = {
2466
2618
  isIssueAffected: DEFAULT_MINIMAL_COMMIT_QUESTIONS.isIssueAffected,
2467
2619
  issuesBody: DEFAULT_MINIMAL_COMMIT_QUESTIONS.issuesBody
2468
2620
  };
2469
- var DEFAULT_MINIMAL_COMMIT_RULES = {
2470
- "body-leading-blank": [1, "always"],
2471
- "body-max-length": [2, "always", 600],
2472
- "footer-leading-blank": [1, "always"],
2473
- "footer-max-line-length": [2, "always", 150],
2474
- "header-max-length": [2, "always", 150],
2475
- "header-trim": [2, "always"],
2476
- "subject-case": [2, "always", ["sentence-case"]],
2477
- "subject-empty": [2, "never"],
2478
- "subject-full-stop": [2, "never", "."],
2479
- "subject-max-length": [2, "always", 150],
2480
- "subject-min-length": [2, "always", 3],
2481
- "type-case": [2, "always", "kebab-case"],
2482
- "type-empty": [2, "never"],
2483
- "type-enum": [
2484
- 2,
2485
- "always",
2486
- Object.keys(COMMIT_TYPES)
2487
- ],
2488
- "type-max-length": [2, "always", 20],
2489
- "type-min-length": [2, "always", 3],
2490
- "scope-empty": 0,
2491
- "scope-case": 0,
2492
- "scope-enum": 0
2493
- /* Disabled */
2494
- };
2495
- var DEFAULT_MONOREPO_COMMIT_RULES = {
2496
- "body-leading-blank": [1, "always"],
2497
- "body-max-length": [2, "always", 600],
2498
- "footer-leading-blank": [1, "always"],
2499
- "footer-max-line-length": [2, "always", 150],
2500
- "header-max-length": [2, "always", 150],
2501
- "header-trim": [2, "always"],
2502
- "subject-case": [2, "always", ["sentence-case"]],
2503
- "subject-empty": [2, "never"],
2504
- "subject-full-stop": [2, "never", "."],
2505
- "subject-max-length": [2, "always", 150],
2506
- "subject-min-length": [2, "always", 3],
2507
- "type-case": [2, "always", "kebab-case"],
2508
- "type-empty": [2, "never"],
2509
- "type-enum": [
2510
- 2,
2511
- "always",
2512
- Object.keys(COMMIT_TYPES)
2513
- ],
2514
- "type-max-length": [2, "always", 20],
2515
- "type-min-length": [2, "always", 3],
2516
- "scope-case": [2, "always", ["kebab-case"]],
2517
- "scope-empty": [2, "never"]
2621
+ var config4 = {
2622
+ settings: COMMIT_CONFIGS.monorepo.commitlint.settings,
2623
+ messages: DEFAULT_COMMIT_PROMPT_MESSAGES,
2624
+ questions: DEFAULT_MONOREPO_COMMIT_QUESTIONS,
2625
+ types: DEFAULT_COMMIT_TYPES
2518
2626
  };
2519
2627
 
2520
2628
  // ../workspace-tools/src/generators/release-version/generator.ts