@storm-software/cloudflare-tools 0.70.15 → 0.70.18
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 +32 -0
- package/README.md +1 -2
- package/dist/{chunk-QACHIWJ5.mjs → chunk-G4XJZFZV.mjs} +108 -492
- package/dist/{chunk-KKKA3TSQ.mjs → chunk-GZVMCQJB.mjs} +6 -6
- package/dist/{chunk-EJYXCG7L.js → chunk-MLFEEFB4.js} +5 -5
- package/dist/{chunk-SGVFOSVQ.mjs → chunk-TPDWHRAN.mjs} +1 -1
- package/dist/{chunk-734STMLQ.js → chunk-TRNFERKH.js} +2 -2
- package/dist/{chunk-5FPUCLWJ.mjs → chunk-WDTNWO7J.mjs} +2 -2
- package/dist/{chunk-YZLE2BZ5.js → chunk-WDX5QEWA.js} +106 -490
- package/dist/{chunk-MDGCPWLB.mjs → chunk-ZJYKRZUJ.mjs} +1 -1
- package/dist/executors.js +1 -1
- package/dist/executors.mjs +3 -3
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +3 -3
- package/dist/index.d.mts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.js +22 -30
- package/dist/index.mjs +23 -31
- package/dist/src/executors/cloudflare-publish/executor.js +1 -1
- package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
- package/dist/src/executors/r2-upload-publish/executor.mjs +1 -1
- package/dist/src/executors/serve/executor.js +2 -2
- package/dist/src/executors/serve/executor.mjs +2 -2
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +2 -2
- package/dist/src/generators/worker/generator.js +3 -3
- package/dist/src/generators/worker/generator.mjs +3 -3
- package/dist/src/utils/index.mjs +1 -1
- package/dist/src/utils/r2-bucket-helpers.mjs +1 -1
- package/dist/tsup.config.mjs +1 -1
- package/package.json +17 -17
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-V44DYGWX.mjs";
|
|
24
24
|
import {
|
|
25
25
|
__dirname
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ZJYKRZUJ.mjs";
|
|
27
27
|
|
|
28
28
|
// ../config-tools/src/utilities/apply-workspace-tokens.ts
|
|
29
29
|
var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
@@ -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
|
|
105
|
+
let config = {};
|
|
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
|
-
|
|
117
|
-
writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `,
|
|
116
|
+
config.workspaceRoot = workspaceRoot3;
|
|
117
|
+
writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `, config);
|
|
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
|
-
|
|
126
|
+
config
|
|
127
127
|
);
|
|
128
|
-
|
|
128
|
+
config = await getConfig(workspaceRoot3);
|
|
129
129
|
}
|
|
130
130
|
if (executorOptions?.hooks?.applyDefaultOptions) {
|
|
131
|
-
writeDebug("Running the applyDefaultOptions hook...",
|
|
131
|
+
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
132
132
|
options = await Promise.resolve(
|
|
133
|
-
executorOptions.hooks.applyDefaultOptions(options,
|
|
133
|
+
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
134
134
|
);
|
|
135
|
-
writeDebug("Completed the applyDefaultOptions hook",
|
|
135
|
+
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
136
136
|
}
|
|
137
137
|
writeTrace(
|
|
138
138
|
`Executor schema options \u2699\uFE0F
|
|
139
139
|
${formatLogMessage(options)}
|
|
140
140
|
`,
|
|
141
|
-
|
|
141
|
+
config
|
|
142
142
|
);
|
|
143
143
|
const tokenized = await applyWorkspaceTokens(
|
|
144
144
|
options,
|
|
145
145
|
defu(
|
|
146
|
-
{ workspaceRoot: workspaceRoot3, projectRoot, sourceRoot, projectName, config
|
|
147
|
-
|
|
146
|
+
{ workspaceRoot: workspaceRoot3, projectRoot, sourceRoot, projectName, config },
|
|
147
|
+
config,
|
|
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
|
-
|
|
156
|
+
config
|
|
157
157
|
);
|
|
158
158
|
if (executorOptions?.hooks?.preProcess) {
|
|
159
|
-
writeDebug("Running the preProcess hook...",
|
|
159
|
+
writeDebug("Running the preProcess hook...", config);
|
|
160
160
|
await Promise.resolve(
|
|
161
|
-
executorOptions.hooks.preProcess(tokenized,
|
|
161
|
+
executorOptions.hooks.preProcess(tokenized, config)
|
|
162
162
|
);
|
|
163
|
-
writeDebug("Completed the preProcess hook",
|
|
163
|
+
writeDebug("Completed the preProcess hook", config);
|
|
164
164
|
}
|
|
165
|
-
const ret = executorFn(tokenized, context,
|
|
165
|
+
const ret = executorFn(tokenized, context, config);
|
|
166
166
|
if (_isFunction(ret?.next)) {
|
|
167
167
|
const asyncGen = ret;
|
|
168
168
|
for await (const iter of asyncGen) {
|
|
@@ -184,25 +184,25 @@ ${formatLogMessage(
|
|
|
184
184
|
);
|
|
185
185
|
}
|
|
186
186
|
if (executorOptions?.hooks?.postProcess) {
|
|
187
|
-
writeDebug("Running the postProcess hook...",
|
|
188
|
-
await Promise.resolve(executorOptions.hooks.postProcess(
|
|
189
|
-
writeDebug("Completed the postProcess hook",
|
|
187
|
+
writeDebug("Running the postProcess hook...", config);
|
|
188
|
+
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
189
|
+
writeDebug("Completed the postProcess hook", config);
|
|
190
190
|
}
|
|
191
191
|
writeSuccess(`Completed running the ${name} task executor!
|
|
192
|
-
`,
|
|
192
|
+
`, config);
|
|
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
|
-
|
|
199
|
+
config
|
|
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
|
-
|
|
205
|
+
config
|
|
206
206
|
);
|
|
207
207
|
return {
|
|
208
208
|
success: false
|
|
@@ -305,14 +305,14 @@ function cargoCommandSync(args = "", options) {
|
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
function cargoMetadata() {
|
|
308
|
-
const
|
|
308
|
+
const output2 = cargoCommandSync("metadata --format-version=1", {
|
|
309
309
|
stdio: "pipe"
|
|
310
310
|
});
|
|
311
|
-
if (!
|
|
311
|
+
if (!output2.success) {
|
|
312
312
|
console.error("Failed to get cargo metadata");
|
|
313
313
|
return null;
|
|
314
314
|
}
|
|
315
|
-
return JSON.parse(
|
|
315
|
+
return JSON.parse(output2.output);
|
|
316
316
|
}
|
|
317
317
|
function runProcess(processCmd, ...args) {
|
|
318
318
|
const metadata = cargoMetadata();
|
|
@@ -479,7 +479,7 @@ import { relative as relative2 } from "path";
|
|
|
479
479
|
import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
|
|
480
480
|
import { glob } from "glob";
|
|
481
481
|
import { readFile, writeFile } from "node:fs/promises";
|
|
482
|
-
var copyAssets = async (
|
|
482
|
+
var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
|
|
483
483
|
const pendingAssets = Array.from(assets ?? []);
|
|
484
484
|
pendingAssets.push({
|
|
485
485
|
input: projectRoot,
|
|
@@ -508,29 +508,29 @@ var copyAssets = async (config5, assets, outputPath, projectRoot, sourceRoot, ge
|
|
|
508
508
|
writeTrace(
|
|
509
509
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
510
510
|
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
511
|
-
|
|
511
|
+
config
|
|
512
512
|
);
|
|
513
513
|
const assetHandler = new CopyAssetsHandler({
|
|
514
514
|
projectDir: projectRoot,
|
|
515
|
-
rootDir:
|
|
515
|
+
rootDir: config.workspaceRoot,
|
|
516
516
|
outputDir: outputPath,
|
|
517
517
|
assets: pendingAssets
|
|
518
518
|
});
|
|
519
519
|
await assetHandler.processAllAssetsOnce();
|
|
520
|
-
writeTrace("Completed copying assets to the output directory",
|
|
520
|
+
writeTrace("Completed copying assets to the output directory", config);
|
|
521
521
|
if (includeSrc === true) {
|
|
522
522
|
writeDebug(
|
|
523
523
|
`\u{1F4DD} Adding banner and writing source files: ${joinPaths(
|
|
524
524
|
outputPath,
|
|
525
525
|
"src"
|
|
526
526
|
)}`,
|
|
527
|
-
|
|
527
|
+
config
|
|
528
528
|
);
|
|
529
529
|
const files = await glob([
|
|
530
|
-
joinPaths(
|
|
531
|
-
joinPaths(
|
|
532
|
-
joinPaths(
|
|
533
|
-
joinPaths(
|
|
530
|
+
joinPaths(config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
531
|
+
joinPaths(config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
532
|
+
joinPaths(config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
533
|
+
joinPaths(config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
534
534
|
]);
|
|
535
535
|
await Promise.allSettled(
|
|
536
536
|
files.map(
|
|
@@ -1143,8 +1143,8 @@ async function build2(options) {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
|
|
1145
1145
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1146
|
-
async function esbuildExecutorFn(options, context,
|
|
1147
|
-
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace",
|
|
1146
|
+
async function esbuildExecutorFn(options, context, config) {
|
|
1147
|
+
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1148
1148
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) {
|
|
1149
1149
|
throw new Error(
|
|
1150
1150
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1216,13 +1216,13 @@ import esBuildPlugin from "@size-limit/esbuild";
|
|
|
1216
1216
|
import esBuildWhyPlugin from "@size-limit/esbuild-why";
|
|
1217
1217
|
import filePlugin from "@size-limit/file";
|
|
1218
1218
|
import sizeLimit from "size-limit";
|
|
1219
|
-
async function sizeLimitExecutorFn(options, context,
|
|
1219
|
+
async function sizeLimitExecutorFn(options, context, config) {
|
|
1220
1220
|
if (!context?.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1221
1221
|
throw new Error(
|
|
1222
1222
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
1223
1223
|
);
|
|
1224
1224
|
}
|
|
1225
|
-
writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`,
|
|
1225
|
+
writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
1226
1226
|
sizeLimit([filePlugin, esBuildPlugin, esBuildWhyPlugin], {
|
|
1227
1227
|
checks: options.entry ?? context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? joinPathFragments3(
|
|
1228
1228
|
context.projectsConfigurations.projects[context.projectName]?.root ?? "./",
|
|
@@ -1231,7 +1231,7 @@ async function sizeLimitExecutorFn(options, context, config5) {
|
|
|
1231
1231
|
}).then((result) => {
|
|
1232
1232
|
writeInfo(
|
|
1233
1233
|
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
1234
|
-
|
|
1234
|
+
config
|
|
1235
1235
|
);
|
|
1236
1236
|
});
|
|
1237
1237
|
return {
|
|
@@ -1264,12 +1264,12 @@ import { build as tsdown } from "tsdown";
|
|
|
1264
1264
|
|
|
1265
1265
|
// ../tsdown/src/clean.ts
|
|
1266
1266
|
import { rm as rm2 } from "node:fs/promises";
|
|
1267
|
-
async function cleanDirectories2(name = "TSDown", directory,
|
|
1267
|
+
async function cleanDirectories2(name = "TSDown", directory, config) {
|
|
1268
1268
|
await rm2(directory, { recursive: true, force: true });
|
|
1269
1269
|
}
|
|
1270
1270
|
|
|
1271
1271
|
// ../tsdown/src/config.ts
|
|
1272
|
-
function getDefaultOptions(
|
|
1272
|
+
function getDefaultOptions(config) {
|
|
1273
1273
|
return {
|
|
1274
1274
|
entry: ["./src/*.ts"],
|
|
1275
1275
|
platform: "node",
|
|
@@ -1282,7 +1282,7 @@ function getDefaultOptions(config5) {
|
|
|
1282
1282
|
},
|
|
1283
1283
|
publint: true,
|
|
1284
1284
|
fixedExtension: true,
|
|
1285
|
-
...
|
|
1285
|
+
...config
|
|
1286
1286
|
};
|
|
1287
1287
|
}
|
|
1288
1288
|
function toTSDownFormat(format3) {
|
|
@@ -1543,8 +1543,8 @@ async function build3(options) {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
|
|
1545
1545
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1546
|
-
async function tsdownExecutorFn(options, context,
|
|
1547
|
-
writeInfo("\u{1F4E6} Running Storm TSDown executor on the workspace",
|
|
1546
|
+
async function tsdownExecutorFn(options, context, config) {
|
|
1547
|
+
writeInfo("\u{1F4E6} Running Storm TSDown executor on the workspace", config);
|
|
1548
1548
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) {
|
|
1549
1549
|
throw new Error(
|
|
1550
1550
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1584,14 +1584,14 @@ var executor_default8 = withRunExecutor(
|
|
|
1584
1584
|
// ../workspace-tools/src/executors/typia/executor.ts
|
|
1585
1585
|
import { removeSync } from "fs-extra";
|
|
1586
1586
|
import { TypiaProgrammer } from "typia/lib/programmers/TypiaProgrammer.js";
|
|
1587
|
-
async function typiaExecutorFn(options, _,
|
|
1587
|
+
async function typiaExecutorFn(options, _, config) {
|
|
1588
1588
|
if (options.clean !== false) {
|
|
1589
|
-
writeInfo(`\u{1F9F9} Cleaning output path: ${options.outputPath}`,
|
|
1589
|
+
writeInfo(`\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1590
1590
|
removeSync(options.outputPath);
|
|
1591
1591
|
}
|
|
1592
1592
|
await Promise.all(
|
|
1593
1593
|
options.entry.map((entry) => {
|
|
1594
|
-
writeInfo(`\u{1F680} Running Typia on entry: ${entry}`,
|
|
1594
|
+
writeInfo(`\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1595
1595
|
return TypiaProgrammer.build({
|
|
1596
1596
|
input: entry,
|
|
1597
1597
|
output: options.outputPath,
|
|
@@ -1623,8 +1623,8 @@ var executor_default9 = withRunExecutor(
|
|
|
1623
1623
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
1624
1624
|
import { defu as defu4 } from "defu";
|
|
1625
1625
|
import { createJiti } from "jiti";
|
|
1626
|
-
async function unbuildExecutorFn(options, context,
|
|
1627
|
-
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace",
|
|
1626
|
+
async function unbuildExecutorFn(options, context, config) {
|
|
1627
|
+
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1628
1628
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1629
1629
|
throw new Error(
|
|
1630
1630
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
@@ -1640,10 +1640,10 @@ async function unbuildExecutorFn(options, context, config5) {
|
|
|
1640
1640
|
"The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory."
|
|
1641
1641
|
);
|
|
1642
1642
|
}
|
|
1643
|
-
const jiti = createJiti(
|
|
1644
|
-
fsCache:
|
|
1645
|
-
|
|
1646
|
-
|
|
1643
|
+
const jiti = createJiti(config.workspaceRoot, {
|
|
1644
|
+
fsCache: config.skipCache ? false : joinPaths(
|
|
1645
|
+
config.workspaceRoot,
|
|
1646
|
+
config.directories.cache || "node_modules/.cache/storm",
|
|
1647
1647
|
"jiti"
|
|
1648
1648
|
),
|
|
1649
1649
|
interopDefault: true
|
|
@@ -1663,9 +1663,9 @@ async function unbuildExecutorFn(options, context, config5) {
|
|
|
1663
1663
|
{
|
|
1664
1664
|
stubOptions: {
|
|
1665
1665
|
jiti: {
|
|
1666
|
-
fsCache:
|
|
1667
|
-
|
|
1668
|
-
|
|
1666
|
+
fsCache: config.skipCache ? false : joinPaths(
|
|
1667
|
+
config.workspaceRoot,
|
|
1668
|
+
config.directories.cache || "node_modules/.cache/storm",
|
|
1669
1669
|
"jiti"
|
|
1670
1670
|
)
|
|
1671
1671
|
}
|
|
@@ -1698,7 +1698,7 @@ var executor_default10 = withRunExecutor(
|
|
|
1698
1698
|
{
|
|
1699
1699
|
skipReadingConfig: false,
|
|
1700
1700
|
hooks: {
|
|
1701
|
-
applyDefaultOptions: async (options,
|
|
1701
|
+
applyDefaultOptions: async (options, config) => {
|
|
1702
1702
|
options.debug ??= false;
|
|
1703
1703
|
options.treeShaking ??= true;
|
|
1704
1704
|
options.buildOnly ??= false;
|
|
@@ -1725,46 +1725,46 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
|
1725
1725
|
}) => async (tree, _options) => {
|
|
1726
1726
|
const stopwatch = getStopwatch(name);
|
|
1727
1727
|
let options = _options;
|
|
1728
|
-
let
|
|
1728
|
+
let config;
|
|
1729
1729
|
try {
|
|
1730
1730
|
writeInfo(`\u26A1 Running the ${name} generator...
|
|
1731
1731
|
|
|
1732
|
-
`,
|
|
1732
|
+
`, config);
|
|
1733
1733
|
const workspaceRoot3 = findWorkspaceRoot();
|
|
1734
1734
|
if (!generatorOptions.skipReadingConfig) {
|
|
1735
1735
|
writeDebug(
|
|
1736
1736
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1737
1737
|
- workspaceRoot: ${workspaceRoot3}`,
|
|
1738
|
-
|
|
1738
|
+
config
|
|
1739
1739
|
);
|
|
1740
|
-
|
|
1740
|
+
config = await getConfig(workspaceRoot3);
|
|
1741
1741
|
}
|
|
1742
1742
|
if (generatorOptions?.hooks?.applyDefaultOptions) {
|
|
1743
|
-
writeDebug("Running the applyDefaultOptions hook...",
|
|
1743
|
+
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
1744
1744
|
options = await Promise.resolve(
|
|
1745
|
-
generatorOptions.hooks.applyDefaultOptions(options,
|
|
1745
|
+
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
1746
1746
|
);
|
|
1747
|
-
writeDebug("Completed the applyDefaultOptions hook",
|
|
1747
|
+
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
1748
1748
|
}
|
|
1749
1749
|
writeTrace(
|
|
1750
1750
|
`Generator schema options \u2699\uFE0F
|
|
1751
1751
|
${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
1752
|
-
|
|
1752
|
+
config
|
|
1753
1753
|
);
|
|
1754
1754
|
const tokenized = await applyWorkspaceTokens(
|
|
1755
1755
|
options,
|
|
1756
|
-
{ workspaceRoot: tree.root, config
|
|
1756
|
+
{ workspaceRoot: tree.root, config },
|
|
1757
1757
|
applyWorkspaceBaseTokens
|
|
1758
1758
|
);
|
|
1759
1759
|
if (generatorOptions?.hooks?.preProcess) {
|
|
1760
|
-
writeDebug("Running the preProcess hook...",
|
|
1760
|
+
writeDebug("Running the preProcess hook...", config);
|
|
1761
1761
|
await Promise.resolve(
|
|
1762
|
-
generatorOptions.hooks.preProcess(tokenized,
|
|
1762
|
+
generatorOptions.hooks.preProcess(tokenized, config)
|
|
1763
1763
|
);
|
|
1764
|
-
writeDebug("Completed the preProcess hook",
|
|
1764
|
+
writeDebug("Completed the preProcess hook", config);
|
|
1765
1765
|
}
|
|
1766
1766
|
const result = await Promise.resolve(
|
|
1767
|
-
generatorFn(tree, tokenized,
|
|
1767
|
+
generatorFn(tree, tokenized, config)
|
|
1768
1768
|
);
|
|
1769
1769
|
if (result) {
|
|
1770
1770
|
if (result.success === false || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string") {
|
|
@@ -1776,25 +1776,25 @@ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[ke
|
|
|
1776
1776
|
}
|
|
1777
1777
|
}
|
|
1778
1778
|
if (generatorOptions?.hooks?.postProcess) {
|
|
1779
|
-
writeDebug("Running the postProcess hook...",
|
|
1780
|
-
await Promise.resolve(generatorOptions.hooks.postProcess(
|
|
1781
|
-
writeDebug("Completed the postProcess hook",
|
|
1779
|
+
writeDebug("Running the postProcess hook...", config);
|
|
1780
|
+
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1781
|
+
writeDebug("Completed the postProcess hook", config);
|
|
1782
1782
|
}
|
|
1783
1783
|
return () => {
|
|
1784
1784
|
writeSuccess(`Completed running the ${name} generator!
|
|
1785
|
-
`,
|
|
1785
|
+
`, config);
|
|
1786
1786
|
};
|
|
1787
1787
|
} catch (error) {
|
|
1788
1788
|
return () => {
|
|
1789
1789
|
writeFatal(
|
|
1790
1790
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
1791
|
-
|
|
1791
|
+
config
|
|
1792
1792
|
);
|
|
1793
1793
|
writeError(
|
|
1794
1794
|
`An exception was thrown in the generator's process
|
|
1795
1795
|
- Details: ${error.message}
|
|
1796
1796
|
- Stacktrace: ${error.stack}`,
|
|
1797
|
-
|
|
1797
|
+
config
|
|
1798
1798
|
);
|
|
1799
1799
|
};
|
|
1800
1800
|
} finally {
|
|
@@ -1830,7 +1830,7 @@ var nodeVersion = "20.11.0";
|
|
|
1830
1830
|
var pnpmVersion = "8.10.2";
|
|
1831
1831
|
|
|
1832
1832
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
1833
|
-
async function typeScriptLibraryGeneratorFn(tree, options,
|
|
1833
|
+
async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
1834
1834
|
const normalized = await normalizeOptions(tree, { ...options });
|
|
1835
1835
|
const tasks = [];
|
|
1836
1836
|
tasks.push(
|
|
@@ -1907,7 +1907,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config5) {
|
|
|
1907
1907
|
addProjectConfiguration(tree, normalized.name, projectConfig);
|
|
1908
1908
|
let repository = {
|
|
1909
1909
|
type: "github",
|
|
1910
|
-
url:
|
|
1910
|
+
url: config?.repository || `https://github.com/${(typeof config?.organization === "string" ? config?.organization : config?.organization?.name) || "storm-software"}/${config?.namespace || config?.name || "repository"}.git`
|
|
1911
1911
|
};
|
|
1912
1912
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
1913
1913
|
if (tree.exists("package.json")) {
|
|
@@ -2053,10 +2053,10 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2053
2053
|
};
|
|
2054
2054
|
writeJson(tree, joinPaths(options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2055
2055
|
}
|
|
2056
|
-
async function normalizeOptions(tree, options,
|
|
2056
|
+
async function normalizeOptions(tree, options, config) {
|
|
2057
2057
|
let importPath = options.importPath;
|
|
2058
|
-
if (!importPath &&
|
|
2059
|
-
importPath = `@${
|
|
2058
|
+
if (!importPath && config?.namespace) {
|
|
2059
|
+
importPath = `@${config?.namespace}/${options.name}`;
|
|
2060
2060
|
}
|
|
2061
2061
|
if (options.publishable) {
|
|
2062
2062
|
if (!importPath) {
|
|
@@ -2115,7 +2115,7 @@ async function normalizeOptions(tree, options, config5) {
|
|
|
2115
2115
|
}
|
|
2116
2116
|
|
|
2117
2117
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2118
|
-
async function browserLibraryGeneratorFn(tree, schema,
|
|
2118
|
+
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
2119
2119
|
const filesDir = joinPaths(
|
|
2120
2120
|
__dirname,
|
|
2121
2121
|
"src",
|
|
@@ -2177,7 +2177,7 @@ async function browserLibraryGeneratorFn(tree, schema, config5) {
|
|
|
2177
2177
|
}
|
|
2178
2178
|
}
|
|
2179
2179
|
});
|
|
2180
|
-
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions,
|
|
2180
|
+
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
|
|
2181
2181
|
await formatFiles2(tree);
|
|
2182
2182
|
return null;
|
|
2183
2183
|
}
|
|
@@ -2198,14 +2198,14 @@ var generator_default = withRunGenerator(
|
|
|
2198
2198
|
// ../workspace-tools/src/generators/config-schema/generator.ts
|
|
2199
2199
|
import { formatFiles as formatFiles3, writeJson as writeJson2 } from "@nx/devkit";
|
|
2200
2200
|
import * as z from "zod";
|
|
2201
|
-
async function configSchemaGeneratorFn(tree, options,
|
|
2201
|
+
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2202
2202
|
writeInfo(
|
|
2203
2203
|
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
2204
|
-
|
|
2204
|
+
config
|
|
2205
2205
|
);
|
|
2206
2206
|
writeTrace(
|
|
2207
2207
|
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
2208
|
-
|
|
2208
|
+
config
|
|
2209
2209
|
);
|
|
2210
2210
|
const jsonSchema = z.toJSONSchema(workspaceConfigSchema, {
|
|
2211
2211
|
target: "draft-7",
|
|
@@ -2214,25 +2214,25 @@ async function configSchemaGeneratorFn(tree, options, config5) {
|
|
|
2214
2214
|
jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
|
|
2215
2215
|
jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
|
|
2216
2216
|
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.";
|
|
2217
|
-
writeTrace(jsonSchema,
|
|
2217
|
+
writeTrace(jsonSchema, config);
|
|
2218
2218
|
if (!options.outputFile) {
|
|
2219
2219
|
throw new Error(
|
|
2220
2220
|
"The `outputFile` option is required. Please specify the output file path."
|
|
2221
2221
|
);
|
|
2222
2222
|
}
|
|
2223
2223
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
2224
|
-
|
|
2224
|
+
config?.workspaceRoot ?? findWorkspaceRoot(),
|
|
2225
2225
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
2226
2226
|
);
|
|
2227
2227
|
writeTrace(
|
|
2228
2228
|
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
2229
|
-
|
|
2229
|
+
config
|
|
2230
2230
|
);
|
|
2231
2231
|
writeJson2(tree, outputPath, jsonSchema, { spaces: 2 });
|
|
2232
2232
|
await formatFiles3(tree);
|
|
2233
2233
|
writeSuccess(
|
|
2234
2234
|
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
2235
|
-
|
|
2235
|
+
config
|
|
2236
2236
|
);
|
|
2237
2237
|
return {
|
|
2238
2238
|
success: true
|
|
@@ -2264,7 +2264,7 @@ import {
|
|
|
2264
2264
|
names as names3,
|
|
2265
2265
|
offsetFromRoot as offsetFromRoot3
|
|
2266
2266
|
} from "@nx/devkit";
|
|
2267
|
-
async function neutralLibraryGeneratorFn(tree, schema,
|
|
2267
|
+
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
2268
2268
|
const filesDir = joinPaths(
|
|
2269
2269
|
__dirname,
|
|
2270
2270
|
"src",
|
|
@@ -2298,7 +2298,7 @@ async function neutralLibraryGeneratorFn(tree, schema, config5) {
|
|
|
2298
2298
|
buildable: options.bundler && options.bundler !== "none",
|
|
2299
2299
|
hasUnitTestRunner: options.unitTestRunner !== "none"
|
|
2300
2300
|
});
|
|
2301
|
-
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions,
|
|
2301
|
+
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
|
|
2302
2302
|
await formatFiles5(tree);
|
|
2303
2303
|
return null;
|
|
2304
2304
|
}
|
|
@@ -2323,7 +2323,7 @@ import {
|
|
|
2323
2323
|
names as names4,
|
|
2324
2324
|
offsetFromRoot as offsetFromRoot4
|
|
2325
2325
|
} from "@nx/devkit";
|
|
2326
|
-
async function nodeLibraryGeneratorFn(tree, schema,
|
|
2326
|
+
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
2327
2327
|
const filesDir = joinPaths(
|
|
2328
2328
|
__dirname,
|
|
2329
2329
|
"src",
|
|
@@ -2359,7 +2359,7 @@ async function nodeLibraryGeneratorFn(tree, schema, config5) {
|
|
|
2359
2359
|
buildable: options.bundler && options.bundler !== "none",
|
|
2360
2360
|
hasUnitTestRunner: options.unitTestRunner !== "none"
|
|
2361
2361
|
});
|
|
2362
|
-
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions,
|
|
2362
|
+
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
|
|
2363
2363
|
await formatFiles6(tree);
|
|
2364
2364
|
return null;
|
|
2365
2365
|
}
|
|
@@ -2615,402 +2615,6 @@ var generator_default5 = withRunGenerator(
|
|
|
2615
2615
|
presetGeneratorFn
|
|
2616
2616
|
);
|
|
2617
2617
|
|
|
2618
|
-
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
2619
|
-
import {
|
|
2620
|
-
formatFiles as formatFiles8,
|
|
2621
|
-
joinPathFragments as joinPathFragments5,
|
|
2622
|
-
output,
|
|
2623
|
-
readJson as readJson2,
|
|
2624
|
-
updateJson as updateJson3,
|
|
2625
|
-
writeJson as writeJson3
|
|
2626
|
-
} from "@nx/devkit";
|
|
2627
|
-
import { resolveLocalPackageDependencies as resolveLocalPackageJsonDependencies } from "@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies";
|
|
2628
|
-
import { updateLockFile } from "@nx/js/src/release/utils/update-lock-file";
|
|
2629
|
-
|
|
2630
|
-
// ../git-tools/dist/chunk-5XU2KBM6.js
|
|
2631
|
-
var DEFAULT_COMMIT_PROMPT_MESSAGES = {
|
|
2632
|
-
skip: "press enter to skip",
|
|
2633
|
-
max: "must be %d chars at most",
|
|
2634
|
-
min: "must be %d chars at least",
|
|
2635
|
-
emptyWarning: "can not be empty",
|
|
2636
|
-
upperLimitWarning: "%s is %d characters longer than the upper limit",
|
|
2637
|
-
lowerLimitWarning: "%s is %d characters less than the lower limit",
|
|
2638
|
-
closedIssueMessage: "Closes: "
|
|
2639
|
-
};
|
|
2640
|
-
|
|
2641
|
-
// ../git-tools/dist/chunk-3GGWHKRP.js
|
|
2642
|
-
var DEFAULT_COMMIT_TYPES = {
|
|
2643
|
-
/* --- Bumps version when selected --- */
|
|
2644
|
-
"chore": {
|
|
2645
|
-
"description": "Other changes that don't modify src or test files",
|
|
2646
|
-
"title": "Chore",
|
|
2647
|
-
"emoji": "\u2699\uFE0F ",
|
|
2648
|
-
"semverBump": "patch",
|
|
2649
|
-
"changelog": {
|
|
2650
|
-
"title": "Miscellaneous",
|
|
2651
|
-
"hidden": false
|
|
2652
|
-
}
|
|
2653
|
-
},
|
|
2654
|
-
"fix": {
|
|
2655
|
-
"description": "A change that resolves an issue previously identified with the package",
|
|
2656
|
-
"title": "Bug Fix",
|
|
2657
|
-
"emoji": "\u{1FAB2} ",
|
|
2658
|
-
"semverBump": "patch",
|
|
2659
|
-
"changelog": {
|
|
2660
|
-
"title": "Bug Fixes",
|
|
2661
|
-
"hidden": false
|
|
2662
|
-
}
|
|
2663
|
-
},
|
|
2664
|
-
"feat": {
|
|
2665
|
-
"description": "A change that adds a new feature to the package",
|
|
2666
|
-
"title": "Feature",
|
|
2667
|
-
"emoji": "\u{1F511} ",
|
|
2668
|
-
"semverBump": "minor",
|
|
2669
|
-
"changelog": {
|
|
2670
|
-
"title": "Features",
|
|
2671
|
-
"hidden": false
|
|
2672
|
-
}
|
|
2673
|
-
},
|
|
2674
|
-
"ci": {
|
|
2675
|
-
"description": "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
|
|
2676
|
-
"title": "Continuous Integration",
|
|
2677
|
-
"emoji": "\u{1F9F0} ",
|
|
2678
|
-
"semverBump": "patch",
|
|
2679
|
-
"changelog": {
|
|
2680
|
-
"title": "Continuous Integration",
|
|
2681
|
-
"hidden": false
|
|
2682
|
-
}
|
|
2683
|
-
},
|
|
2684
|
-
"refactor": {
|
|
2685
|
-
"description": "A code change that neither fixes a bug nor adds a feature",
|
|
2686
|
-
"title": "Code Refactoring",
|
|
2687
|
-
"emoji": "\u{1F9EA} ",
|
|
2688
|
-
"semverBump": "patch",
|
|
2689
|
-
"changelog": {
|
|
2690
|
-
"title": "Source Code Improvements",
|
|
2691
|
-
"hidden": false
|
|
2692
|
-
}
|
|
2693
|
-
},
|
|
2694
|
-
"style": {
|
|
2695
|
-
"description": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
|
|
2696
|
-
"title": "Style Improvements",
|
|
2697
|
-
"emoji": "\u{1F48E} ",
|
|
2698
|
-
"semverBump": "patch",
|
|
2699
|
-
"changelog": {
|
|
2700
|
-
"title": "Style Improvements",
|
|
2701
|
-
"hidden": false
|
|
2702
|
-
}
|
|
2703
|
-
},
|
|
2704
|
-
"perf": {
|
|
2705
|
-
"description": "A code change that improves performance",
|
|
2706
|
-
"title": "Performance Improvement",
|
|
2707
|
-
"emoji": "\u23F1\uFE0F ",
|
|
2708
|
-
"semverBump": "patch",
|
|
2709
|
-
"changelog": {
|
|
2710
|
-
"title": "Performance Improvements",
|
|
2711
|
-
"hidden": false
|
|
2712
|
-
}
|
|
2713
|
-
},
|
|
2714
|
-
/* --- Does not bump version when selected --- */
|
|
2715
|
-
"docs": {
|
|
2716
|
-
"description": "A change that only includes documentation updates",
|
|
2717
|
-
"title": "Documentation",
|
|
2718
|
-
"emoji": "\u{1F4DC} ",
|
|
2719
|
-
"semverBump": "none",
|
|
2720
|
-
"changelog": {
|
|
2721
|
-
"title": "Documentation",
|
|
2722
|
-
"hidden": false
|
|
2723
|
-
}
|
|
2724
|
-
},
|
|
2725
|
-
"test": {
|
|
2726
|
-
"description": "Adding missing tests or correcting existing tests",
|
|
2727
|
-
"title": "Testing",
|
|
2728
|
-
"emoji": "\u{1F6A8} ",
|
|
2729
|
-
"semverBump": "none",
|
|
2730
|
-
"changelog": {
|
|
2731
|
-
"title": "Testing",
|
|
2732
|
-
"hidden": true
|
|
2733
|
-
}
|
|
2734
|
-
},
|
|
2735
|
-
/* --- Not included in commitlint but included in changelog --- */
|
|
2736
|
-
"deps": {
|
|
2737
|
-
"description": "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
|
|
2738
|
-
"title": "Dependencies",
|
|
2739
|
-
"emoji": "\u{1F4E6} ",
|
|
2740
|
-
"hidden": true,
|
|
2741
|
-
"semverBump": "patch",
|
|
2742
|
-
"changelog": {
|
|
2743
|
-
"title": "Dependency Upgrades",
|
|
2744
|
-
"hidden": false
|
|
2745
|
-
}
|
|
2746
|
-
},
|
|
2747
|
-
/* --- Not included in commitlint or changelog --- */
|
|
2748
|
-
"build": {
|
|
2749
|
-
"description": "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
|
|
2750
|
-
"title": "Build",
|
|
2751
|
-
"emoji": "\u{1F6E0} ",
|
|
2752
|
-
"hidden": true,
|
|
2753
|
-
"semverBump": "none",
|
|
2754
|
-
"changelog": {
|
|
2755
|
-
"title": "Build",
|
|
2756
|
-
"hidden": true
|
|
2757
|
-
}
|
|
2758
|
-
},
|
|
2759
|
-
"release": {
|
|
2760
|
-
"description": "Publishing a commit containing a newly released version",
|
|
2761
|
-
"title": "Publish Release",
|
|
2762
|
-
"emoji": "\u{1F680} ",
|
|
2763
|
-
"hidden": true,
|
|
2764
|
-
"semverBump": "none",
|
|
2765
|
-
"changelog": {
|
|
2766
|
-
"title": "Publish Release",
|
|
2767
|
-
"hidden": true
|
|
2768
|
-
}
|
|
2769
|
-
}
|
|
2770
|
-
};
|
|
2771
|
-
var CHANGELOG_COMMIT_TYPES_OBJECT = Object.freeze(
|
|
2772
|
-
Object.entries(DEFAULT_COMMIT_TYPES).reduce(
|
|
2773
|
-
(ret, [key, commitType]) => {
|
|
2774
|
-
ret[key] = {
|
|
2775
|
-
...commitType.changelog,
|
|
2776
|
-
type: key,
|
|
2777
|
-
section: commitType.changelog?.title || commitType.title,
|
|
2778
|
-
hidden: commitType.changelog?.hidden
|
|
2779
|
-
};
|
|
2780
|
-
return ret;
|
|
2781
|
-
},
|
|
2782
|
-
{}
|
|
2783
|
-
)
|
|
2784
|
-
);
|
|
2785
|
-
var CHANGELOG_COMMIT_TYPES = [
|
|
2786
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.feat,
|
|
2787
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.fix,
|
|
2788
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.chore,
|
|
2789
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.deps,
|
|
2790
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.docs,
|
|
2791
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.style,
|
|
2792
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.refactor,
|
|
2793
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.perf,
|
|
2794
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.build,
|
|
2795
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.ci,
|
|
2796
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.test
|
|
2797
|
-
];
|
|
2798
|
-
var CHANGELOG_COMMIT_TYPE_ORDER = CHANGELOG_COMMIT_TYPES.map(
|
|
2799
|
-
(entry) => entry.type
|
|
2800
|
-
);
|
|
2801
|
-
var CHANGELOG_COMMIT_SECTION_ORDER = CHANGELOG_COMMIT_TYPES.map(
|
|
2802
|
-
(entry) => entry.section
|
|
2803
|
-
);
|
|
2804
|
-
var changelogs = {
|
|
2805
|
-
props: {
|
|
2806
|
-
ignoreCommits: void 0,
|
|
2807
|
-
types: CHANGELOG_COMMIT_TYPES,
|
|
2808
|
-
bumpStrict: true,
|
|
2809
|
-
scope: void 0,
|
|
2810
|
-
scopeOnly: false
|
|
2811
|
-
}
|
|
2812
|
-
};
|
|
2813
|
-
var commitlint = {
|
|
2814
|
-
helpUrl: "https://developer.stormsoftware.com/commitlint/minimal",
|
|
2815
|
-
rules: {
|
|
2816
|
-
"body-leading-blank": [1, "always"],
|
|
2817
|
-
"body-max-length": [2, "always", 600],
|
|
2818
|
-
"footer-leading-blank": [1, "always"],
|
|
2819
|
-
"footer-max-line-length": [2, "always", 150],
|
|
2820
|
-
"header-max-length": [2, "always", 150],
|
|
2821
|
-
"header-trim": [2, "always"],
|
|
2822
|
-
"subject-case": [2, "always", ["sentence-case"]],
|
|
2823
|
-
"subject-empty": [2, "never"],
|
|
2824
|
-
"subject-full-stop": [2, "never", "."],
|
|
2825
|
-
"subject-max-length": [2, "always", 150],
|
|
2826
|
-
"subject-min-length": [2, "always", 3],
|
|
2827
|
-
"type-case": [2, "always", "kebab-case"],
|
|
2828
|
-
"type-empty": [2, "never"],
|
|
2829
|
-
"type-enum": [
|
|
2830
|
-
2,
|
|
2831
|
-
"always",
|
|
2832
|
-
Object.keys(DEFAULT_COMMIT_TYPES)
|
|
2833
|
-
],
|
|
2834
|
-
"type-max-length": [2, "always", 20],
|
|
2835
|
-
"type-min-length": [2, "always", 3],
|
|
2836
|
-
"scope-empty": [2, "always"]
|
|
2837
|
-
},
|
|
2838
|
-
settings: {
|
|
2839
|
-
enableMultipleScopes: false,
|
|
2840
|
-
disableEmoji: true,
|
|
2841
|
-
breakingChangePrefix: "\u{1F4A3} ",
|
|
2842
|
-
closedIssuePrefix: "\u2705 ",
|
|
2843
|
-
format: "{type}: {emoji}{subject}"
|
|
2844
|
-
}
|
|
2845
|
-
};
|
|
2846
|
-
var config = {
|
|
2847
|
-
types: DEFAULT_COMMIT_TYPES,
|
|
2848
|
-
changelogs,
|
|
2849
|
-
commitlint
|
|
2850
|
-
};
|
|
2851
|
-
var minimal_default = config;
|
|
2852
|
-
var changelogs2 = {
|
|
2853
|
-
props: {
|
|
2854
|
-
ignoreCommits: void 0,
|
|
2855
|
-
types: CHANGELOG_COMMIT_TYPES,
|
|
2856
|
-
bumpStrict: true,
|
|
2857
|
-
scope: ["monorepo"],
|
|
2858
|
-
scopeOnly: true
|
|
2859
|
-
}
|
|
2860
|
-
};
|
|
2861
|
-
var commitlint2 = {
|
|
2862
|
-
helpUrl: "https://developer.stormsoftware.com/commitlint/monorepo",
|
|
2863
|
-
rules: {
|
|
2864
|
-
"body-leading-blank": [1, "always"],
|
|
2865
|
-
"body-max-length": [2, "always", 600],
|
|
2866
|
-
"footer-leading-blank": [1, "always"],
|
|
2867
|
-
"footer-max-line-length": [2, "always", 150],
|
|
2868
|
-
"header-max-length": [2, "always", 150],
|
|
2869
|
-
"header-trim": [2, "always"],
|
|
2870
|
-
"subject-case": [2, "always", ["sentence-case"]],
|
|
2871
|
-
"subject-empty": [2, "never"],
|
|
2872
|
-
"subject-full-stop": [2, "never", "."],
|
|
2873
|
-
"subject-max-length": [2, "always", 150],
|
|
2874
|
-
"subject-min-length": [2, "always", 3],
|
|
2875
|
-
"type-case": [2, "always", "kebab-case"],
|
|
2876
|
-
"type-empty": [2, "never"],
|
|
2877
|
-
"type-enum": [
|
|
2878
|
-
2,
|
|
2879
|
-
"always",
|
|
2880
|
-
Object.keys(DEFAULT_COMMIT_TYPES)
|
|
2881
|
-
],
|
|
2882
|
-
"type-max-length": [2, "always", 20],
|
|
2883
|
-
"type-min-length": [2, "always", 3],
|
|
2884
|
-
"scope-case": [2, "always", ["kebab-case"]],
|
|
2885
|
-
"scope-empty": [2, "never"]
|
|
2886
|
-
},
|
|
2887
|
-
settings: {
|
|
2888
|
-
enableMultipleScopes: false,
|
|
2889
|
-
disableEmoji: true,
|
|
2890
|
-
breakingChangePrefix: "\u{1F4A3} ",
|
|
2891
|
-
closedIssuePrefix: "\u2705 ",
|
|
2892
|
-
format: "{type}({scope}): {emoji}{subject}"
|
|
2893
|
-
}
|
|
2894
|
-
};
|
|
2895
|
-
var config2 = {
|
|
2896
|
-
types: DEFAULT_COMMIT_TYPES,
|
|
2897
|
-
changelogs: changelogs2,
|
|
2898
|
-
commitlint: commitlint2
|
|
2899
|
-
};
|
|
2900
|
-
var monorepo_default = config2;
|
|
2901
|
-
var COMMIT_CONFIGS = { minimal: minimal_default, monorepo: monorepo_default };
|
|
2902
|
-
|
|
2903
|
-
// ../git-tools/dist/chunk-KZRVQ5RZ.js
|
|
2904
|
-
var DEFAULT_MINIMAL_COMMIT_QUESTIONS = {
|
|
2905
|
-
type: {
|
|
2906
|
-
type: "select",
|
|
2907
|
-
title: "Commit Type",
|
|
2908
|
-
description: "Select the commit type that best describes your changes",
|
|
2909
|
-
enum: Object.keys(DEFAULT_COMMIT_TYPES).filter(
|
|
2910
|
-
(type) => DEFAULT_COMMIT_TYPES[type].hidden !== true
|
|
2911
|
-
).reduce((ret, type) => {
|
|
2912
|
-
ret[type] = DEFAULT_COMMIT_TYPES[type];
|
|
2913
|
-
return ret;
|
|
2914
|
-
}, {}),
|
|
2915
|
-
defaultValue: "chore",
|
|
2916
|
-
maxLength: 20,
|
|
2917
|
-
minLength: 3
|
|
2918
|
-
},
|
|
2919
|
-
subject: {
|
|
2920
|
-
type: "input",
|
|
2921
|
-
title: "Commit Subject",
|
|
2922
|
-
description: "Write a short, imperative tense description of the change",
|
|
2923
|
-
maxLength: 150,
|
|
2924
|
-
minLength: 3
|
|
2925
|
-
},
|
|
2926
|
-
body: {
|
|
2927
|
-
type: "input",
|
|
2928
|
-
title: "Commit Body",
|
|
2929
|
-
description: "Provide a longer description of the change",
|
|
2930
|
-
maxLength: 600
|
|
2931
|
-
},
|
|
2932
|
-
isBreaking: {
|
|
2933
|
-
type: "confirm",
|
|
2934
|
-
title: "Breaking Changes",
|
|
2935
|
-
description: "Are there any breaking changes as a result of this commit?",
|
|
2936
|
-
defaultValue: false
|
|
2937
|
-
},
|
|
2938
|
-
breakingBody: {
|
|
2939
|
-
type: "input",
|
|
2940
|
-
title: "Breaking Changes (Details)",
|
|
2941
|
-
description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
|
|
2942
|
-
when: (answers) => answers.isBreaking === true,
|
|
2943
|
-
maxLength: 600,
|
|
2944
|
-
minLength: 3
|
|
2945
|
-
},
|
|
2946
|
-
isIssueAffected: {
|
|
2947
|
-
type: "confirm",
|
|
2948
|
-
title: "Open Issue Affected",
|
|
2949
|
-
description: "Does this change impact any open issues?",
|
|
2950
|
-
defaultValue: false
|
|
2951
|
-
},
|
|
2952
|
-
issuesBody: {
|
|
2953
|
-
type: "input",
|
|
2954
|
-
title: "Open Issue Affected (Details)",
|
|
2955
|
-
description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
|
|
2956
|
-
when: (answers) => answers.isIssueAffected === true,
|
|
2957
|
-
maxLength: 600,
|
|
2958
|
-
minLength: 3
|
|
2959
|
-
}
|
|
2960
|
-
};
|
|
2961
|
-
var config3 = {
|
|
2962
|
-
settings: COMMIT_CONFIGS.minimal.commitlint.settings,
|
|
2963
|
-
messages: DEFAULT_COMMIT_PROMPT_MESSAGES,
|
|
2964
|
-
questions: DEFAULT_MINIMAL_COMMIT_QUESTIONS,
|
|
2965
|
-
types: DEFAULT_COMMIT_TYPES
|
|
2966
|
-
};
|
|
2967
|
-
|
|
2968
|
-
// ../git-tools/dist/chunk-JCEVFJCA.js
|
|
2969
|
-
var DEFAULT_MONOREPO_COMMIT_QUESTIONS = {
|
|
2970
|
-
type: DEFAULT_MINIMAL_COMMIT_QUESTIONS.type,
|
|
2971
|
-
scope: {
|
|
2972
|
-
type: "select",
|
|
2973
|
-
title: "Commit Scope",
|
|
2974
|
-
description: "Select the project that's the most impacted by this change",
|
|
2975
|
-
enum: {},
|
|
2976
|
-
defaultValue: "monorepo",
|
|
2977
|
-
maxLength: 50,
|
|
2978
|
-
minLength: 1
|
|
2979
|
-
},
|
|
2980
|
-
subject: DEFAULT_MINIMAL_COMMIT_QUESTIONS.subject,
|
|
2981
|
-
body: DEFAULT_MINIMAL_COMMIT_QUESTIONS.body,
|
|
2982
|
-
isBreaking: DEFAULT_MINIMAL_COMMIT_QUESTIONS.isBreaking,
|
|
2983
|
-
breakingBody: DEFAULT_MINIMAL_COMMIT_QUESTIONS.breakingBody,
|
|
2984
|
-
isIssueAffected: DEFAULT_MINIMAL_COMMIT_QUESTIONS.isIssueAffected,
|
|
2985
|
-
issuesBody: DEFAULT_MINIMAL_COMMIT_QUESTIONS.issuesBody
|
|
2986
|
-
};
|
|
2987
|
-
var config4 = {
|
|
2988
|
-
settings: COMMIT_CONFIGS.monorepo.commitlint.settings,
|
|
2989
|
-
messages: DEFAULT_COMMIT_PROMPT_MESSAGES,
|
|
2990
|
-
questions: DEFAULT_MONOREPO_COMMIT_QUESTIONS,
|
|
2991
|
-
types: DEFAULT_COMMIT_TYPES
|
|
2992
|
-
};
|
|
2993
|
-
|
|
2994
|
-
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
2995
|
-
import { execSync as execSync4 } from "node:child_process";
|
|
2996
|
-
import { relative as relative3 } from "node:path";
|
|
2997
|
-
import { IMPLICIT_DEFAULT_RELEASE_GROUP } from "nx/src/command-line/release/config/config";
|
|
2998
|
-
import {
|
|
2999
|
-
getFirstGitCommit,
|
|
3000
|
-
getLatestGitTagForPattern
|
|
3001
|
-
} from "nx/src/command-line/release/utils/git";
|
|
3002
|
-
import {
|
|
3003
|
-
resolveSemverSpecifierFromConventionalCommits,
|
|
3004
|
-
resolveSemverSpecifierFromPrompt
|
|
3005
|
-
} from "nx/src/command-line/release/utils/resolve-semver-specifier";
|
|
3006
|
-
import { isValidSemverSpecifier } from "nx/src/command-line/release/utils/semver";
|
|
3007
|
-
import {
|
|
3008
|
-
deriveNewSemverVersion,
|
|
3009
|
-
validReleaseVersionPrefixes
|
|
3010
|
-
} from "nx/src/command-line/release/version-legacy";
|
|
3011
|
-
import { interpolate } from "nx/src/tasks-runner/utils";
|
|
3012
|
-
import { prerelease } from "semver";
|
|
3013
|
-
|
|
3014
2618
|
// ../workspace-tools/src/base/base-executor.untyped.ts
|
|
3015
2619
|
import { defineUntypedSchema } from "untyped";
|
|
3016
2620
|
var base_executor_untyped_default = defineUntypedSchema({
|
|
@@ -3375,12 +2979,24 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
|
|
|
3375
2979
|
}
|
|
3376
2980
|
});
|
|
3377
2981
|
|
|
2982
|
+
// ../workspace-tools/src/release/js-version-actions.ts
|
|
2983
|
+
import JsVersionActions from "@nx/js/src/release/version-actions.js";
|
|
2984
|
+
|
|
2985
|
+
// ../workspace-tools/src/release/rust-version-actions.ts
|
|
2986
|
+
import {
|
|
2987
|
+
joinPathFragments as joinPathFragments5
|
|
2988
|
+
} from "@nx/devkit";
|
|
2989
|
+
import { VersionActions } from "nx/release";
|
|
2990
|
+
|
|
2991
|
+
// ../workspace-tools/src/utils/registry-helpers.ts
|
|
2992
|
+
import https2 from "node:https";
|
|
2993
|
+
|
|
3378
2994
|
// ../workspace-tools/src/utils/get-project-configurations.ts
|
|
3379
2995
|
import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/project-graph/utils/retrieve-workspace-files";
|
|
3380
2996
|
|
|
3381
2997
|
// ../workspace-tools/src/utils/lock-file.ts
|
|
3382
2998
|
import {
|
|
3383
|
-
output
|
|
2999
|
+
output,
|
|
3384
3000
|
readJsonFile,
|
|
3385
3001
|
workspaceRoot as workspaceRoot2
|
|
3386
3002
|
} from "@nx/devkit";
|