@storm-software/cloudflare-tools 0.69.6 → 0.69.7
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 +7 -0
- package/README.md +1 -1
- package/dist/{chunk-CXWSKEMQ.mjs → chunk-3D34OZXV.mjs} +1 -1
- package/dist/{chunk-PF63SWR2.js → chunk-CS7XAMRZ.js} +1 -1
- package/dist/{chunk-RSWTQ6W3.mjs → chunk-DOKEDIHC.mjs} +1 -1
- package/dist/{chunk-L3KISQSW.js → chunk-JWF57AVG.js} +2 -2
- package/dist/{chunk-IWURSZFD.mjs → chunk-KQ2FYXAH.mjs} +361 -10
- package/dist/{chunk-LT7FYZCT.js → chunk-Q4LQ5PPN.js} +379 -28
- package/dist/executors.js +1 -1
- package/dist/executors.mjs +1 -1
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +2 -2
- package/dist/index.js +4 -4
- package/dist/index.mjs +3 -3
- package/dist/src/executors/cloudflare-publish/executor.js +1 -1
- package/dist/src/executors/cloudflare-publish/executor.mjs +1 -1
- package/dist/src/executors/serve/executor.js +2 -2
- package/dist/src/executors/serve/executor.mjs +1 -1
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/dist/src/generators/worker/generator.js +3 -3
- package/dist/src/generators/worker/generator.mjs +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Cloudflare Tools
|
|
4
4
|
|
|
5
|
+
## [0.69.6](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.69.6) (2025-09-21)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Update workspace package links
|
|
10
|
+
([91c9879c3](https://github.com/storm-software/storm-ops/commit/91c9879c3))
|
|
11
|
+
|
|
5
12
|
## [0.69.5](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.69.5) (2025-09-21)
|
|
6
13
|
|
|
7
14
|
### 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 -->
|
|
@@ -7,7 +7,7 @@ var require_package = _chunkMCKGQKYUjs.__commonJS.call(void 0, {
|
|
|
7
7
|
"package.json"(exports, module) {
|
|
8
8
|
module.exports = {
|
|
9
9
|
name: "@storm-software/cloudflare-tools",
|
|
10
|
-
version: "0.69.
|
|
10
|
+
version: "0.69.6",
|
|
11
11
|
description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
12
12
|
repository: {
|
|
13
13
|
type: "github",
|
|
@@ -7,7 +7,7 @@ var require_package = __commonJS({
|
|
|
7
7
|
"package.json"(exports, module) {
|
|
8
8
|
module.exports = {
|
|
9
9
|
name: "@storm-software/cloudflare-tools",
|
|
10
|
-
version: "0.69.
|
|
10
|
+
version: "0.69.6",
|
|
11
11
|
description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
12
12
|
repository: {
|
|
13
13
|
type: "github",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCS7XAMRZjs = require('./chunk-CS7XAMRZ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -66,7 +66,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
|
|
|
66
66
|
const options = await normalizeOptions(tree, schema, config);
|
|
67
67
|
const tasks = [];
|
|
68
68
|
tasks.push(
|
|
69
|
-
await
|
|
69
|
+
await _chunkCS7XAMRZjs.generator_default.call(void 0, tree, {
|
|
70
70
|
...options,
|
|
71
71
|
skipFormat: true
|
|
72
72
|
})
|
|
@@ -459,6 +459,7 @@ var DEFAULT_COMPILED_BANNER = `/*****************************************
|
|
|
459
459
|
*****************************************/
|
|
460
460
|
`;
|
|
461
461
|
var DEFAULT_ENVIRONMENT = "production";
|
|
462
|
+
var DEFAULT_TARGET = "esnext";
|
|
462
463
|
var DEFAULT_ORGANIZATION = "storm-software";
|
|
463
464
|
|
|
464
465
|
// ../build-tools/src/plugins/swc.ts
|
|
@@ -478,7 +479,7 @@ import { relative as relative2 } from "path";
|
|
|
478
479
|
import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
|
|
479
480
|
import { glob } from "glob";
|
|
480
481
|
import { readFile, writeFile } from "node:fs/promises";
|
|
481
|
-
var copyAssets = async (config5, assets, outputPath, projectRoot, sourceRoot,
|
|
482
|
+
var copyAssets = async (config5, assets, outputPath, projectRoot, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
|
|
482
483
|
const pendingAssets = Array.from(assets ?? []);
|
|
483
484
|
pendingAssets.push({
|
|
484
485
|
input: projectRoot,
|
|
@@ -490,7 +491,7 @@ var copyAssets = async (config5, assets, outputPath, projectRoot, sourceRoot, ge
|
|
|
490
491
|
glob: "LICENSE",
|
|
491
492
|
output: "."
|
|
492
493
|
});
|
|
493
|
-
if (
|
|
494
|
+
if (generatePackageJson3 === false) {
|
|
494
495
|
pendingAssets.push({
|
|
495
496
|
input: projectRoot,
|
|
496
497
|
glob: "package.json",
|
|
@@ -696,6 +697,26 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
696
697
|
packageJson.repository.directory ??= projectRoot ? projectRoot : joinPaths("packages", projectName);
|
|
697
698
|
return packageJson;
|
|
698
699
|
};
|
|
700
|
+
var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
701
|
+
let entry = file.replaceAll("\\", "/");
|
|
702
|
+
if (sourceRoot) {
|
|
703
|
+
entry = entry.replace(sourceRoot, "");
|
|
704
|
+
}
|
|
705
|
+
return {
|
|
706
|
+
import: {
|
|
707
|
+
types: `./dist/${entry}.d.${type === "module" ? "ts" : "mts"}`,
|
|
708
|
+
default: `./dist/${entry}.${type === "module" ? "js" : "mjs"}`
|
|
709
|
+
},
|
|
710
|
+
require: {
|
|
711
|
+
types: `./dist/${entry}.d.${type === "commonjs" ? "ts" : "cts"}`,
|
|
712
|
+
default: `./dist/${entry}.${type === "commonjs" ? "js" : "cjs"}`
|
|
713
|
+
},
|
|
714
|
+
default: {
|
|
715
|
+
types: `./dist/${entry}.d.${type !== "fixed" ? "ts" : "mts"}`,
|
|
716
|
+
default: `./dist/${entry}.${type !== "fixed" ? "js" : "mjs"}`
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
};
|
|
699
720
|
|
|
700
721
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
701
722
|
import { glob as glob2 } from "glob";
|
|
@@ -1123,7 +1144,7 @@ async function esbuildExecutorFn(options, context, config5) {
|
|
|
1123
1144
|
name: context.projectName,
|
|
1124
1145
|
sourceRoot: context.projectsConfigurations.projects?.[context.projectName]?.sourceRoot,
|
|
1125
1146
|
format: options.format,
|
|
1126
|
-
platform: options.
|
|
1147
|
+
platform: options.platform
|
|
1127
1148
|
});
|
|
1128
1149
|
return {
|
|
1129
1150
|
success: true
|
|
@@ -1215,6 +1236,336 @@ var executor_default7 = withRunExecutor(
|
|
|
1215
1236
|
}
|
|
1216
1237
|
);
|
|
1217
1238
|
|
|
1239
|
+
// ../tsdown/src/build.ts
|
|
1240
|
+
import {
|
|
1241
|
+
createProjectGraphAsync as createProjectGraphAsync4,
|
|
1242
|
+
readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph3,
|
|
1243
|
+
writeJsonFile as writeJsonFile2
|
|
1244
|
+
} from "@nx/devkit";
|
|
1245
|
+
import defu3 from "defu";
|
|
1246
|
+
import { existsSync as existsSync7 } from "node:fs";
|
|
1247
|
+
import hf3 from "node:fs/promises";
|
|
1248
|
+
import { build as tsdown } from "tsdown";
|
|
1249
|
+
|
|
1250
|
+
// ../tsdown/src/clean.ts
|
|
1251
|
+
import { rm as rm2 } from "node:fs/promises";
|
|
1252
|
+
async function cleanDirectories2(name = "TSDown", directory, config5) {
|
|
1253
|
+
await rm2(directory, { recursive: true, force: true });
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
// ../tsdown/src/config.ts
|
|
1257
|
+
function getDefaultOptions(config5) {
|
|
1258
|
+
return {
|
|
1259
|
+
entry: ["./src/*.ts"],
|
|
1260
|
+
platform: "node",
|
|
1261
|
+
target: "esnext",
|
|
1262
|
+
mode: "production",
|
|
1263
|
+
dts: true,
|
|
1264
|
+
unused: {
|
|
1265
|
+
level: "error",
|
|
1266
|
+
ignore: ["typescript"]
|
|
1267
|
+
},
|
|
1268
|
+
publint: true,
|
|
1269
|
+
fixedExtension: true,
|
|
1270
|
+
...config5
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1273
|
+
function toTSDownFormat(format3) {
|
|
1274
|
+
if (!format3 || Array.isArray(format3) && format3.length === 0) {
|
|
1275
|
+
return ["cjs", "es"];
|
|
1276
|
+
} else if (format3 === "esm") {
|
|
1277
|
+
return "es";
|
|
1278
|
+
} else if (Array.isArray(format3)) {
|
|
1279
|
+
return format3.map((f) => f === "esm" ? "es" : f);
|
|
1280
|
+
}
|
|
1281
|
+
return format3;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
// ../tsdown/src/build.ts
|
|
1285
|
+
var resolveOptions = async (userOptions) => {
|
|
1286
|
+
const options = getDefaultOptions(userOptions);
|
|
1287
|
+
const workspaceRoot3 = findWorkspaceRoot(options.projectRoot);
|
|
1288
|
+
if (!workspaceRoot3) {
|
|
1289
|
+
throw new Error("Cannot find Nx workspace root");
|
|
1290
|
+
}
|
|
1291
|
+
const workspaceConfig = await getWorkspaceConfig(options.debug === true, {
|
|
1292
|
+
workspaceRoot: workspaceRoot3
|
|
1293
|
+
});
|
|
1294
|
+
writeDebug(" \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
1295
|
+
const stopwatch = getStopwatch("Build options resolution");
|
|
1296
|
+
const projectGraph = await createProjectGraphAsync4({
|
|
1297
|
+
exitOnError: true
|
|
1298
|
+
});
|
|
1299
|
+
const projectJsonPath = joinPaths(
|
|
1300
|
+
workspaceRoot3,
|
|
1301
|
+
options.projectRoot,
|
|
1302
|
+
"project.json"
|
|
1303
|
+
);
|
|
1304
|
+
if (!existsSync7(projectJsonPath)) {
|
|
1305
|
+
throw new Error("Cannot find project.json configuration");
|
|
1306
|
+
}
|
|
1307
|
+
const projectJsonFile = await hf3.readFile(projectJsonPath, "utf8");
|
|
1308
|
+
const projectJson = JSON.parse(projectJsonFile);
|
|
1309
|
+
const projectName = projectJson.name;
|
|
1310
|
+
const projectConfigurations = readProjectsConfigurationFromProjectGraph3(projectGraph);
|
|
1311
|
+
if (!projectConfigurations?.projects?.[projectName]) {
|
|
1312
|
+
throw new Error(
|
|
1313
|
+
"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."
|
|
1314
|
+
);
|
|
1315
|
+
}
|
|
1316
|
+
const packageJsonPath = joinPaths(
|
|
1317
|
+
workspaceRoot3,
|
|
1318
|
+
options.projectRoot,
|
|
1319
|
+
"package.json"
|
|
1320
|
+
);
|
|
1321
|
+
if (!existsSync7(packageJsonPath)) {
|
|
1322
|
+
throw new Error("Cannot find package.json configuration");
|
|
1323
|
+
}
|
|
1324
|
+
const debug = options.debug ?? (options.mode || workspaceConfig.mode) === "development";
|
|
1325
|
+
const sourceRoot = projectJson.sourceRoot || joinPaths(options.projectRoot, "src");
|
|
1326
|
+
const result = {
|
|
1327
|
+
name: projectName,
|
|
1328
|
+
mode: "production",
|
|
1329
|
+
target: DEFAULT_TARGET,
|
|
1330
|
+
generatePackageJson: true,
|
|
1331
|
+
outDir: joinPaths("dist", options.projectRoot),
|
|
1332
|
+
minify: !debug,
|
|
1333
|
+
plugins: [],
|
|
1334
|
+
assets: [],
|
|
1335
|
+
dts: true,
|
|
1336
|
+
shims: true,
|
|
1337
|
+
silent: !debug,
|
|
1338
|
+
logLevel: workspaceConfig.logLevel === "success" || workspaceConfig.logLevel === "debug" || workspaceConfig.logLevel === "trace" || workspaceConfig.logLevel === "all" ? "info" : workspaceConfig.logLevel === "fatal" ? "error" : workspaceConfig.logLevel,
|
|
1339
|
+
sourcemap: debug ? "inline" : false,
|
|
1340
|
+
clean: false,
|
|
1341
|
+
fixedExtension: true,
|
|
1342
|
+
nodeProtocol: true,
|
|
1343
|
+
tsconfig: joinPaths(options.projectRoot, "tsconfig.json"),
|
|
1344
|
+
debug,
|
|
1345
|
+
sourceRoot,
|
|
1346
|
+
cwd: workspaceConfig.workspaceRoot,
|
|
1347
|
+
entry: {
|
|
1348
|
+
["index"]: joinPaths(sourceRoot, "index.ts")
|
|
1349
|
+
},
|
|
1350
|
+
workspace: true,
|
|
1351
|
+
...options,
|
|
1352
|
+
treeshake: options.treeShaking !== false,
|
|
1353
|
+
format: toTSDownFormat(options.format),
|
|
1354
|
+
workspaceConfig,
|
|
1355
|
+
projectName,
|
|
1356
|
+
projectGraph,
|
|
1357
|
+
projectConfigurations
|
|
1358
|
+
};
|
|
1359
|
+
result.env = defu3(
|
|
1360
|
+
options.env,
|
|
1361
|
+
getEnv("tsdown", result)
|
|
1362
|
+
);
|
|
1363
|
+
stopwatch();
|
|
1364
|
+
return result;
|
|
1365
|
+
};
|
|
1366
|
+
async function generatePackageJson2(options) {
|
|
1367
|
+
if (options.generatePackageJson !== false && existsSync7(joinPaths(options.projectRoot, "package.json"))) {
|
|
1368
|
+
writeDebug(" \u270D\uFE0F Writing package.json file", options.workspaceConfig);
|
|
1369
|
+
const stopwatch = getStopwatch("Write package.json file");
|
|
1370
|
+
const packageJsonPath = joinPaths(options.projectRoot, "project.json");
|
|
1371
|
+
if (!existsSync7(packageJsonPath)) {
|
|
1372
|
+
throw new Error("Cannot find package.json configuration");
|
|
1373
|
+
}
|
|
1374
|
+
const packageJsonFile = await hf3.readFile(
|
|
1375
|
+
joinPaths(
|
|
1376
|
+
options.workspaceConfig.workspaceRoot,
|
|
1377
|
+
options.projectRoot,
|
|
1378
|
+
"package.json"
|
|
1379
|
+
),
|
|
1380
|
+
"utf8"
|
|
1381
|
+
);
|
|
1382
|
+
if (!packageJsonFile) {
|
|
1383
|
+
throw new Error("Cannot find package.json configuration file");
|
|
1384
|
+
}
|
|
1385
|
+
let packageJson = JSON.parse(packageJsonFile);
|
|
1386
|
+
packageJson = await addPackageDependencies(
|
|
1387
|
+
options.workspaceConfig.workspaceRoot,
|
|
1388
|
+
options.projectRoot,
|
|
1389
|
+
options.projectName,
|
|
1390
|
+
packageJson
|
|
1391
|
+
);
|
|
1392
|
+
packageJson = await addWorkspacePackageJsonFields(
|
|
1393
|
+
options.workspaceConfig,
|
|
1394
|
+
options.projectRoot,
|
|
1395
|
+
options.sourceRoot,
|
|
1396
|
+
options.projectName,
|
|
1397
|
+
false,
|
|
1398
|
+
packageJson
|
|
1399
|
+
);
|
|
1400
|
+
packageJson.exports ??= {};
|
|
1401
|
+
packageJson.exports["./package.json"] ??= "./package.json";
|
|
1402
|
+
packageJson.exports["."] ??= addPackageJsonExport(
|
|
1403
|
+
"index",
|
|
1404
|
+
packageJson.type,
|
|
1405
|
+
options.sourceRoot
|
|
1406
|
+
);
|
|
1407
|
+
let entry = [{ in: "./src/index.ts", out: "./src/index.ts" }];
|
|
1408
|
+
if (options.entry) {
|
|
1409
|
+
if (Array.isArray(options.entry)) {
|
|
1410
|
+
entry = options.entry.map(
|
|
1411
|
+
(entryPoint) => typeof entryPoint === "string" ? { in: entryPoint, out: entryPoint } : entryPoint
|
|
1412
|
+
);
|
|
1413
|
+
}
|
|
1414
|
+
for (const entryPoint of entry) {
|
|
1415
|
+
const split = entryPoint.out.split(".");
|
|
1416
|
+
split.pop();
|
|
1417
|
+
const entry2 = split.join(".").replaceAll("\\", "/");
|
|
1418
|
+
packageJson.exports[`./${entry2}`] ??= addPackageJsonExport(
|
|
1419
|
+
entry2,
|
|
1420
|
+
options.fixedExtension ? "fixed" : packageJson.type,
|
|
1421
|
+
options.sourceRoot
|
|
1422
|
+
);
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
packageJson.main = !options.fixedExtension && packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
1426
|
+
packageJson.module = !options.fixedExtension && packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
|
|
1427
|
+
packageJson.types = `./dist/index.d.${!options.fixedExtension ? "ts" : "mts"}`;
|
|
1428
|
+
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
1429
|
+
(ret, key) => {
|
|
1430
|
+
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
1431
|
+
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
1432
|
+
}
|
|
1433
|
+
return ret;
|
|
1434
|
+
},
|
|
1435
|
+
packageJson.exports
|
|
1436
|
+
);
|
|
1437
|
+
await writeJsonFile2(joinPaths(options.outDir, "package.json"), packageJson);
|
|
1438
|
+
stopwatch();
|
|
1439
|
+
}
|
|
1440
|
+
return options;
|
|
1441
|
+
}
|
|
1442
|
+
async function executeTSDown(options) {
|
|
1443
|
+
writeDebug(` \u{1F680} Running ${options.name} build`, options.workspaceConfig);
|
|
1444
|
+
const stopwatch = getStopwatch(`${options.name} build`);
|
|
1445
|
+
await tsdown({
|
|
1446
|
+
...options,
|
|
1447
|
+
entry: options.entry,
|
|
1448
|
+
config: false
|
|
1449
|
+
});
|
|
1450
|
+
stopwatch();
|
|
1451
|
+
return options;
|
|
1452
|
+
}
|
|
1453
|
+
async function copyBuildAssets2(options) {
|
|
1454
|
+
writeDebug(
|
|
1455
|
+
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
1456
|
+
options.workspaceConfig
|
|
1457
|
+
);
|
|
1458
|
+
const stopwatch = getStopwatch(`${options.name} asset copy`);
|
|
1459
|
+
await copyAssets(
|
|
1460
|
+
options.workspaceConfig,
|
|
1461
|
+
options.assets ?? [],
|
|
1462
|
+
options.outDir,
|
|
1463
|
+
options.projectRoot,
|
|
1464
|
+
options.sourceRoot,
|
|
1465
|
+
true,
|
|
1466
|
+
false
|
|
1467
|
+
);
|
|
1468
|
+
stopwatch();
|
|
1469
|
+
return options;
|
|
1470
|
+
}
|
|
1471
|
+
async function reportResults2(options) {
|
|
1472
|
+
writeSuccess(
|
|
1473
|
+
` \u{1F4E6} The ${options.name} build completed successfully`,
|
|
1474
|
+
options.workspaceConfig
|
|
1475
|
+
);
|
|
1476
|
+
}
|
|
1477
|
+
async function cleanOutputPath2(options) {
|
|
1478
|
+
if (options.clean !== false && options.workspaceConfig) {
|
|
1479
|
+
writeDebug(
|
|
1480
|
+
` \u{1F9F9} Cleaning ${options.name} output path: ${options.workspaceConfig}`,
|
|
1481
|
+
options.workspaceConfig
|
|
1482
|
+
);
|
|
1483
|
+
const stopwatch = getStopwatch(`${options.name} output clean`);
|
|
1484
|
+
await cleanDirectories2(
|
|
1485
|
+
options.name,
|
|
1486
|
+
options.outDir,
|
|
1487
|
+
options.workspaceConfig
|
|
1488
|
+
);
|
|
1489
|
+
stopwatch();
|
|
1490
|
+
}
|
|
1491
|
+
return options;
|
|
1492
|
+
}
|
|
1493
|
+
async function build2(options) {
|
|
1494
|
+
writeDebug(` \u26A1 Executing Storm TSDown pipeline`);
|
|
1495
|
+
const stopwatch = getStopwatch("TSDown pipeline");
|
|
1496
|
+
try {
|
|
1497
|
+
const opts = Array.isArray(options) ? options : [options];
|
|
1498
|
+
if (opts.length === 0) {
|
|
1499
|
+
throw new Error("No build options were provided");
|
|
1500
|
+
}
|
|
1501
|
+
const resolved = await Promise.all(
|
|
1502
|
+
opts.map(async (opt) => await resolveOptions(opt))
|
|
1503
|
+
);
|
|
1504
|
+
if (resolved.length > 0) {
|
|
1505
|
+
await cleanOutputPath2(resolved[0]);
|
|
1506
|
+
await generatePackageJson2(resolved[0]);
|
|
1507
|
+
await Promise.all(
|
|
1508
|
+
resolved.map(async (opt) => {
|
|
1509
|
+
await executeTSDown(opt);
|
|
1510
|
+
await copyBuildAssets2(opt);
|
|
1511
|
+
await reportResults2(opt);
|
|
1512
|
+
})
|
|
1513
|
+
);
|
|
1514
|
+
} else {
|
|
1515
|
+
writeWarning(
|
|
1516
|
+
" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function."
|
|
1517
|
+
);
|
|
1518
|
+
}
|
|
1519
|
+
writeSuccess(" \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1520
|
+
} catch (error) {
|
|
1521
|
+
writeFatal(
|
|
1522
|
+
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1523
|
+
);
|
|
1524
|
+
throw error;
|
|
1525
|
+
} finally {
|
|
1526
|
+
stopwatch();
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1531
|
+
async function tsdownExecutorFn(options, context, config5) {
|
|
1532
|
+
writeInfo("\u{1F4E6} Running Storm TSDown executor on the workspace", config5);
|
|
1533
|
+
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) {
|
|
1534
|
+
throw new Error(
|
|
1535
|
+
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
1536
|
+
);
|
|
1537
|
+
}
|
|
1538
|
+
await build2({
|
|
1539
|
+
...options,
|
|
1540
|
+
projectRoot: (
|
|
1541
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1542
|
+
context.projectsConfigurations.projects?.[context.projectName].root
|
|
1543
|
+
),
|
|
1544
|
+
name: context.projectName,
|
|
1545
|
+
sourceRoot: context.projectsConfigurations.projects?.[context.projectName]?.sourceRoot,
|
|
1546
|
+
format: options.format,
|
|
1547
|
+
platform: options.platform
|
|
1548
|
+
});
|
|
1549
|
+
return {
|
|
1550
|
+
success: true
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
var executor_default8 = withRunExecutor(
|
|
1554
|
+
"Storm TSDown build",
|
|
1555
|
+
tsdownExecutorFn,
|
|
1556
|
+
{
|
|
1557
|
+
skipReadingConfig: false,
|
|
1558
|
+
hooks: {
|
|
1559
|
+
applyDefaultOptions: async (options) => {
|
|
1560
|
+
options.entry ??= ["src/index.ts"];
|
|
1561
|
+
options.outputPath ??= "dist/{projectRoot}";
|
|
1562
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
1563
|
+
return options;
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
);
|
|
1568
|
+
|
|
1218
1569
|
// ../workspace-tools/src/executors/typia/executor.ts
|
|
1219
1570
|
import { removeSync } from "fs-extra";
|
|
1220
1571
|
import { TypiaProgrammer } from "typia/lib/programmers/TypiaProgrammer.js";
|
|
@@ -1237,7 +1588,7 @@ async function typiaExecutorFn(options, _, config5) {
|
|
|
1237
1588
|
success: true
|
|
1238
1589
|
};
|
|
1239
1590
|
}
|
|
1240
|
-
var
|
|
1591
|
+
var executor_default9 = withRunExecutor(
|
|
1241
1592
|
"Typia runtime validation generator",
|
|
1242
1593
|
typiaExecutorFn,
|
|
1243
1594
|
{
|
|
@@ -1255,7 +1606,7 @@ var executor_default8 = withRunExecutor(
|
|
|
1255
1606
|
);
|
|
1256
1607
|
|
|
1257
1608
|
// ../workspace-tools/src/executors/unbuild/executor.ts
|
|
1258
|
-
import { defu as
|
|
1609
|
+
import { defu as defu4 } from "defu";
|
|
1259
1610
|
import { createJiti } from "jiti";
|
|
1260
1611
|
async function unbuildExecutorFn(options, context, config5) {
|
|
1261
1612
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config5);
|
|
@@ -1286,7 +1637,7 @@ async function unbuildExecutorFn(options, context, config5) {
|
|
|
1286
1637
|
jiti.esmResolve("@storm-software/unbuild/build")
|
|
1287
1638
|
);
|
|
1288
1639
|
await stormUnbuild.build(
|
|
1289
|
-
|
|
1640
|
+
defu4(
|
|
1290
1641
|
{
|
|
1291
1642
|
...options,
|
|
1292
1643
|
projectRoot: context.projectsConfigurations.projects[context.projectName].root,
|
|
@@ -1326,7 +1677,7 @@ async function unbuildExecutorFn(options, context, config5) {
|
|
|
1326
1677
|
success: true
|
|
1327
1678
|
};
|
|
1328
1679
|
}
|
|
1329
|
-
var
|
|
1680
|
+
var executor_default10 = withRunExecutor(
|
|
1330
1681
|
"TypeScript Unbuild build",
|
|
1331
1682
|
unbuildExecutorFn,
|
|
1332
1683
|
{
|
|
@@ -3018,7 +3369,7 @@ import {
|
|
|
3018
3369
|
readJsonFile,
|
|
3019
3370
|
workspaceRoot as workspaceRoot2
|
|
3020
3371
|
} from "@nx/devkit";
|
|
3021
|
-
import { existsSync as
|
|
3372
|
+
import { existsSync as existsSync8 } from "node:fs";
|
|
3022
3373
|
import { join as join2 } from "node:path";
|
|
3023
3374
|
import {
|
|
3024
3375
|
getNpmLockfileDependencies,
|
|
@@ -3043,8 +3394,8 @@ var PNPM_LOCK_PATH = join2(workspaceRoot2, PNPM_LOCK_FILE);
|
|
|
3043
3394
|
import {
|
|
3044
3395
|
readJsonFile as readJsonFile2
|
|
3045
3396
|
} from "@nx/devkit";
|
|
3046
|
-
import
|
|
3047
|
-
import { existsSync as
|
|
3397
|
+
import defu5 from "defu";
|
|
3398
|
+
import { existsSync as existsSync9 } from "node:fs";
|
|
3048
3399
|
import { dirname, join as join3 } from "node:path";
|
|
3049
3400
|
|
|
3050
3401
|
// ../workspace-tools/src/utils/typia-transform.ts
|