@storm-software/cloudflare-tools 0.69.6 → 0.69.8
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 +14 -0
- package/README.md +1 -1
- package/dist/{chunk-GWFET2SG.mjs → chunk-JDURSBH6.mjs} +1 -1
- package/dist/{chunk-CXWSKEMQ.mjs → chunk-KJEKB6H3.mjs} +2 -2
- package/dist/{chunk-LT7FYZCT.js → chunk-Q4LQ5PPN.js} +379 -28
- package/dist/{chunk-4RMMRGT6.mjs → chunk-QTM263P2.mjs} +1 -1
- package/dist/{chunk-IWURSZFD.mjs → chunk-S2UVAIKV.mjs} +362 -11
- package/dist/{chunk-RSWTQ6W3.mjs → chunk-TWC65PUD.mjs} +3 -3
- package/dist/{chunk-PF63SWR2.js → chunk-X5GJYBVD.js} +2 -2
- package/dist/{chunk-L3KISQSW.js → chunk-Y7MUN27B.js} +2 -2
- 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.js +4 -4
- package/dist/index.mjs +5 -5
- 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 +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Cloudflare Tools
|
|
4
4
|
|
|
5
|
+
## [0.69.7](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.69.7) (2025-09-22)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Update workspace package links
|
|
10
|
+
([43374a8da](https://github.com/storm-software/storm-ops/commit/43374a8da))
|
|
11
|
+
|
|
12
|
+
## [0.69.6](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.69.6) (2025-09-21)
|
|
13
|
+
|
|
14
|
+
### Miscellaneous
|
|
15
|
+
|
|
16
|
+
- **monorepo:** Update workspace package links
|
|
17
|
+
([91c9879c3](https://github.com/storm-software/storm-ops/commit/91c9879c3))
|
|
18
|
+
|
|
5
19
|
## [0.69.5](https://github.com/storm-software/storm-ops/releases/tag/cloudflare-tools%400.69.5) (2025-09-21)
|
|
6
20
|
|
|
7
21
|
### 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 -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generator_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TWC65PUD.mjs";
|
|
4
4
|
import {
|
|
5
5
|
findWorkspaceRoot,
|
|
6
6
|
getConfig
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-V44DYGWX.mjs";
|
|
16
16
|
import {
|
|
17
17
|
__dirname
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QTM263P2.mjs";
|
|
19
19
|
|
|
20
20
|
// src/generators/worker/generator.ts
|
|
21
21
|
import {
|
|
@@ -456,6 +456,7 @@ var DEFAULT_COMPILED_BANNER = `/*****************************************
|
|
|
456
456
|
*****************************************/
|
|
457
457
|
`;
|
|
458
458
|
var DEFAULT_ENVIRONMENT = "production";
|
|
459
|
+
var DEFAULT_TARGET = "esnext";
|
|
459
460
|
var DEFAULT_ORGANIZATION = "storm-software";
|
|
460
461
|
|
|
461
462
|
// ../build-tools/src/plugins/swc.ts
|
|
@@ -475,7 +476,7 @@ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_reso
|
|
|
475
476
|
var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
|
|
476
477
|
var _glob = require('glob');
|
|
477
478
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
478
|
-
var copyAssets = async (config5, assets, outputPath, projectRoot, sourceRoot,
|
|
479
|
+
var copyAssets = async (config5, assets, outputPath, projectRoot, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
|
|
479
480
|
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
480
481
|
pendingAssets.push({
|
|
481
482
|
input: projectRoot,
|
|
@@ -487,7 +488,7 @@ var copyAssets = async (config5, assets, outputPath, projectRoot, sourceRoot, ge
|
|
|
487
488
|
glob: "LICENSE",
|
|
488
489
|
output: "."
|
|
489
490
|
});
|
|
490
|
-
if (
|
|
491
|
+
if (generatePackageJson3 === false) {
|
|
491
492
|
pendingAssets.push({
|
|
492
493
|
input: projectRoot,
|
|
493
494
|
glob: "package.json",
|
|
@@ -693,6 +694,26 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
693
694
|
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkAMJC7IYYjs.joinPaths.call(void 0, "packages", projectName);
|
|
694
695
|
return packageJson;
|
|
695
696
|
};
|
|
697
|
+
var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
698
|
+
let entry = file.replaceAll("\\", "/");
|
|
699
|
+
if (sourceRoot) {
|
|
700
|
+
entry = entry.replace(sourceRoot, "");
|
|
701
|
+
}
|
|
702
|
+
return {
|
|
703
|
+
import: {
|
|
704
|
+
types: `./dist/${entry}.d.${type === "module" ? "ts" : "mts"}`,
|
|
705
|
+
default: `./dist/${entry}.${type === "module" ? "js" : "mjs"}`
|
|
706
|
+
},
|
|
707
|
+
require: {
|
|
708
|
+
types: `./dist/${entry}.d.${type === "commonjs" ? "ts" : "cts"}`,
|
|
709
|
+
default: `./dist/${entry}.${type === "commonjs" ? "js" : "cjs"}`
|
|
710
|
+
},
|
|
711
|
+
default: {
|
|
712
|
+
types: `./dist/${entry}.d.${type !== "fixed" ? "ts" : "mts"}`,
|
|
713
|
+
default: `./dist/${entry}.${type !== "fixed" ? "js" : "mjs"}`
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
};
|
|
696
717
|
|
|
697
718
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
698
719
|
|
|
@@ -1120,7 +1141,7 @@ async function esbuildExecutorFn(options, context, config5) {
|
|
|
1120
1141
|
name: context.projectName,
|
|
1121
1142
|
sourceRoot: _optionalChain([context, 'access', _78 => _78.projectsConfigurations, 'access', _79 => _79.projects, 'optionalAccess', _80 => _80[context.projectName], 'optionalAccess', _81 => _81.sourceRoot]),
|
|
1122
1143
|
format: options.format,
|
|
1123
|
-
platform: options.
|
|
1144
|
+
platform: options.platform
|
|
1124
1145
|
});
|
|
1125
1146
|
return {
|
|
1126
1147
|
success: true
|
|
@@ -1212,6 +1233,336 @@ var executor_default7 = withRunExecutor(
|
|
|
1212
1233
|
}
|
|
1213
1234
|
);
|
|
1214
1235
|
|
|
1236
|
+
// ../tsdown/src/build.ts
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
var _tsdown = require('tsdown');
|
|
1246
|
+
|
|
1247
|
+
// ../tsdown/src/clean.ts
|
|
1248
|
+
|
|
1249
|
+
async function cleanDirectories2(name = "TSDown", directory, config5) {
|
|
1250
|
+
await _promises.rm.call(void 0, directory, { recursive: true, force: true });
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
// ../tsdown/src/config.ts
|
|
1254
|
+
function getDefaultOptions(config5) {
|
|
1255
|
+
return {
|
|
1256
|
+
entry: ["./src/*.ts"],
|
|
1257
|
+
platform: "node",
|
|
1258
|
+
target: "esnext",
|
|
1259
|
+
mode: "production",
|
|
1260
|
+
dts: true,
|
|
1261
|
+
unused: {
|
|
1262
|
+
level: "error",
|
|
1263
|
+
ignore: ["typescript"]
|
|
1264
|
+
},
|
|
1265
|
+
publint: true,
|
|
1266
|
+
fixedExtension: true,
|
|
1267
|
+
...config5
|
|
1268
|
+
};
|
|
1269
|
+
}
|
|
1270
|
+
function toTSDownFormat(format3) {
|
|
1271
|
+
if (!format3 || Array.isArray(format3) && format3.length === 0) {
|
|
1272
|
+
return ["cjs", "es"];
|
|
1273
|
+
} else if (format3 === "esm") {
|
|
1274
|
+
return "es";
|
|
1275
|
+
} else if (Array.isArray(format3)) {
|
|
1276
|
+
return format3.map((f) => f === "esm" ? "es" : f);
|
|
1277
|
+
}
|
|
1278
|
+
return format3;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
// ../tsdown/src/build.ts
|
|
1282
|
+
var resolveOptions = async (userOptions) => {
|
|
1283
|
+
const options = getDefaultOptions(userOptions);
|
|
1284
|
+
const workspaceRoot3 = _chunkAMJC7IYYjs.findWorkspaceRoot.call(void 0, options.projectRoot);
|
|
1285
|
+
if (!workspaceRoot3) {
|
|
1286
|
+
throw new Error("Cannot find Nx workspace root");
|
|
1287
|
+
}
|
|
1288
|
+
const workspaceConfig = await _chunkAMJC7IYYjs.getWorkspaceConfig.call(void 0, options.debug === true, {
|
|
1289
|
+
workspaceRoot: workspaceRoot3
|
|
1290
|
+
});
|
|
1291
|
+
_chunk2CDSXWFAjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
1292
|
+
const stopwatch = _chunk2CDSXWFAjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1293
|
+
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1294
|
+
exitOnError: true
|
|
1295
|
+
});
|
|
1296
|
+
const projectJsonPath = _chunkAMJC7IYYjs.joinPaths.call(void 0,
|
|
1297
|
+
workspaceRoot3,
|
|
1298
|
+
options.projectRoot,
|
|
1299
|
+
"project.json"
|
|
1300
|
+
);
|
|
1301
|
+
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
1302
|
+
throw new Error("Cannot find project.json configuration");
|
|
1303
|
+
}
|
|
1304
|
+
const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
|
|
1305
|
+
const projectJson = JSON.parse(projectJsonFile);
|
|
1306
|
+
const projectName = projectJson.name;
|
|
1307
|
+
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
1308
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _93 => _93.projects, 'optionalAccess', _94 => _94[projectName]])) {
|
|
1309
|
+
throw new Error(
|
|
1310
|
+
"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."
|
|
1311
|
+
);
|
|
1312
|
+
}
|
|
1313
|
+
const packageJsonPath = _chunkAMJC7IYYjs.joinPaths.call(void 0,
|
|
1314
|
+
workspaceRoot3,
|
|
1315
|
+
options.projectRoot,
|
|
1316
|
+
"package.json"
|
|
1317
|
+
);
|
|
1318
|
+
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1319
|
+
throw new Error("Cannot find package.json configuration");
|
|
1320
|
+
}
|
|
1321
|
+
const debug = _nullishCoalesce(options.debug, () => ( (options.mode || workspaceConfig.mode) === "development"));
|
|
1322
|
+
const sourceRoot = projectJson.sourceRoot || _chunkAMJC7IYYjs.joinPaths.call(void 0, options.projectRoot, "src");
|
|
1323
|
+
const result = {
|
|
1324
|
+
name: projectName,
|
|
1325
|
+
mode: "production",
|
|
1326
|
+
target: DEFAULT_TARGET,
|
|
1327
|
+
generatePackageJson: true,
|
|
1328
|
+
outDir: _chunkAMJC7IYYjs.joinPaths.call(void 0, "dist", options.projectRoot),
|
|
1329
|
+
minify: !debug,
|
|
1330
|
+
plugins: [],
|
|
1331
|
+
assets: [],
|
|
1332
|
+
dts: true,
|
|
1333
|
+
shims: true,
|
|
1334
|
+
silent: !debug,
|
|
1335
|
+
logLevel: workspaceConfig.logLevel === "success" || workspaceConfig.logLevel === "debug" || workspaceConfig.logLevel === "trace" || workspaceConfig.logLevel === "all" ? "info" : workspaceConfig.logLevel === "fatal" ? "error" : workspaceConfig.logLevel,
|
|
1336
|
+
sourcemap: debug ? "inline" : false,
|
|
1337
|
+
clean: false,
|
|
1338
|
+
fixedExtension: true,
|
|
1339
|
+
nodeProtocol: true,
|
|
1340
|
+
tsconfig: _chunkAMJC7IYYjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
1341
|
+
debug,
|
|
1342
|
+
sourceRoot,
|
|
1343
|
+
cwd: workspaceConfig.workspaceRoot,
|
|
1344
|
+
entry: {
|
|
1345
|
+
["index"]: _chunkAMJC7IYYjs.joinPaths.call(void 0, sourceRoot, "index.ts")
|
|
1346
|
+
},
|
|
1347
|
+
workspace: true,
|
|
1348
|
+
...options,
|
|
1349
|
+
treeshake: options.treeShaking !== false,
|
|
1350
|
+
format: toTSDownFormat(options.format),
|
|
1351
|
+
workspaceConfig,
|
|
1352
|
+
projectName,
|
|
1353
|
+
projectGraph,
|
|
1354
|
+
projectConfigurations
|
|
1355
|
+
};
|
|
1356
|
+
result.env = _defu2.default.call(void 0,
|
|
1357
|
+
options.env,
|
|
1358
|
+
getEnv("tsdown", result)
|
|
1359
|
+
);
|
|
1360
|
+
stopwatch();
|
|
1361
|
+
return result;
|
|
1362
|
+
};
|
|
1363
|
+
async function generatePackageJson2(options) {
|
|
1364
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkAMJC7IYYjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1365
|
+
_chunk2CDSXWFAjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.workspaceConfig);
|
|
1366
|
+
const stopwatch = _chunk2CDSXWFAjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1367
|
+
const packageJsonPath = _chunkAMJC7IYYjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1368
|
+
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1369
|
+
throw new Error("Cannot find package.json configuration");
|
|
1370
|
+
}
|
|
1371
|
+
const packageJsonFile = await _promises2.default.readFile(
|
|
1372
|
+
_chunkAMJC7IYYjs.joinPaths.call(void 0,
|
|
1373
|
+
options.workspaceConfig.workspaceRoot,
|
|
1374
|
+
options.projectRoot,
|
|
1375
|
+
"package.json"
|
|
1376
|
+
),
|
|
1377
|
+
"utf8"
|
|
1378
|
+
);
|
|
1379
|
+
if (!packageJsonFile) {
|
|
1380
|
+
throw new Error("Cannot find package.json configuration file");
|
|
1381
|
+
}
|
|
1382
|
+
let packageJson = JSON.parse(packageJsonFile);
|
|
1383
|
+
packageJson = await addPackageDependencies(
|
|
1384
|
+
options.workspaceConfig.workspaceRoot,
|
|
1385
|
+
options.projectRoot,
|
|
1386
|
+
options.projectName,
|
|
1387
|
+
packageJson
|
|
1388
|
+
);
|
|
1389
|
+
packageJson = await addWorkspacePackageJsonFields(
|
|
1390
|
+
options.workspaceConfig,
|
|
1391
|
+
options.projectRoot,
|
|
1392
|
+
options.sourceRoot,
|
|
1393
|
+
options.projectName,
|
|
1394
|
+
false,
|
|
1395
|
+
packageJson
|
|
1396
|
+
);
|
|
1397
|
+
packageJson.exports ??= {};
|
|
1398
|
+
packageJson.exports["./package.json"] ??= "./package.json";
|
|
1399
|
+
packageJson.exports["."] ??= addPackageJsonExport(
|
|
1400
|
+
"index",
|
|
1401
|
+
packageJson.type,
|
|
1402
|
+
options.sourceRoot
|
|
1403
|
+
);
|
|
1404
|
+
let entry = [{ in: "./src/index.ts", out: "./src/index.ts" }];
|
|
1405
|
+
if (options.entry) {
|
|
1406
|
+
if (Array.isArray(options.entry)) {
|
|
1407
|
+
entry = options.entry.map(
|
|
1408
|
+
(entryPoint) => typeof entryPoint === "string" ? { in: entryPoint, out: entryPoint } : entryPoint
|
|
1409
|
+
);
|
|
1410
|
+
}
|
|
1411
|
+
for (const entryPoint of entry) {
|
|
1412
|
+
const split = entryPoint.out.split(".");
|
|
1413
|
+
split.pop();
|
|
1414
|
+
const entry2 = split.join(".").replaceAll("\\", "/");
|
|
1415
|
+
packageJson.exports[`./${entry2}`] ??= addPackageJsonExport(
|
|
1416
|
+
entry2,
|
|
1417
|
+
options.fixedExtension ? "fixed" : packageJson.type,
|
|
1418
|
+
options.sourceRoot
|
|
1419
|
+
);
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
packageJson.main = !options.fixedExtension && packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
1423
|
+
packageJson.module = !options.fixedExtension && packageJson.type === "module" ? "./dist/index.js" : "./dist/index.mjs";
|
|
1424
|
+
packageJson.types = `./dist/index.d.${!options.fixedExtension ? "ts" : "mts"}`;
|
|
1425
|
+
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
1426
|
+
(ret, key) => {
|
|
1427
|
+
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
1428
|
+
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
1429
|
+
}
|
|
1430
|
+
return ret;
|
|
1431
|
+
},
|
|
1432
|
+
packageJson.exports
|
|
1433
|
+
);
|
|
1434
|
+
await _devkit.writeJsonFile.call(void 0, _chunkAMJC7IYYjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
1435
|
+
stopwatch();
|
|
1436
|
+
}
|
|
1437
|
+
return options;
|
|
1438
|
+
}
|
|
1439
|
+
async function executeTSDown(options) {
|
|
1440
|
+
_chunk2CDSXWFAjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.workspaceConfig);
|
|
1441
|
+
const stopwatch = _chunk2CDSXWFAjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1442
|
+
await _tsdown.build.call(void 0, {
|
|
1443
|
+
...options,
|
|
1444
|
+
entry: options.entry,
|
|
1445
|
+
config: false
|
|
1446
|
+
});
|
|
1447
|
+
stopwatch();
|
|
1448
|
+
return options;
|
|
1449
|
+
}
|
|
1450
|
+
async function copyBuildAssets2(options) {
|
|
1451
|
+
_chunk2CDSXWFAjs.writeDebug.call(void 0,
|
|
1452
|
+
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
1453
|
+
options.workspaceConfig
|
|
1454
|
+
);
|
|
1455
|
+
const stopwatch = _chunk2CDSXWFAjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1456
|
+
await copyAssets(
|
|
1457
|
+
options.workspaceConfig,
|
|
1458
|
+
_nullishCoalesce(options.assets, () => ( [])),
|
|
1459
|
+
options.outDir,
|
|
1460
|
+
options.projectRoot,
|
|
1461
|
+
options.sourceRoot,
|
|
1462
|
+
true,
|
|
1463
|
+
false
|
|
1464
|
+
);
|
|
1465
|
+
stopwatch();
|
|
1466
|
+
return options;
|
|
1467
|
+
}
|
|
1468
|
+
async function reportResults2(options) {
|
|
1469
|
+
_chunk2CDSXWFAjs.writeSuccess.call(void 0,
|
|
1470
|
+
` \u{1F4E6} The ${options.name} build completed successfully`,
|
|
1471
|
+
options.workspaceConfig
|
|
1472
|
+
);
|
|
1473
|
+
}
|
|
1474
|
+
async function cleanOutputPath2(options) {
|
|
1475
|
+
if (options.clean !== false && options.workspaceConfig) {
|
|
1476
|
+
_chunk2CDSXWFAjs.writeDebug.call(void 0,
|
|
1477
|
+
` \u{1F9F9} Cleaning ${options.name} output path: ${options.workspaceConfig}`,
|
|
1478
|
+
options.workspaceConfig
|
|
1479
|
+
);
|
|
1480
|
+
const stopwatch = _chunk2CDSXWFAjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1481
|
+
await cleanDirectories2(
|
|
1482
|
+
options.name,
|
|
1483
|
+
options.outDir,
|
|
1484
|
+
options.workspaceConfig
|
|
1485
|
+
);
|
|
1486
|
+
stopwatch();
|
|
1487
|
+
}
|
|
1488
|
+
return options;
|
|
1489
|
+
}
|
|
1490
|
+
async function build2(options) {
|
|
1491
|
+
_chunk2CDSXWFAjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1492
|
+
const stopwatch = _chunk2CDSXWFAjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1493
|
+
try {
|
|
1494
|
+
const opts = Array.isArray(options) ? options : [options];
|
|
1495
|
+
if (opts.length === 0) {
|
|
1496
|
+
throw new Error("No build options were provided");
|
|
1497
|
+
}
|
|
1498
|
+
const resolved = await Promise.all(
|
|
1499
|
+
opts.map(async (opt) => await resolveOptions(opt))
|
|
1500
|
+
);
|
|
1501
|
+
if (resolved.length > 0) {
|
|
1502
|
+
await cleanOutputPath2(resolved[0]);
|
|
1503
|
+
await generatePackageJson2(resolved[0]);
|
|
1504
|
+
await Promise.all(
|
|
1505
|
+
resolved.map(async (opt) => {
|
|
1506
|
+
await executeTSDown(opt);
|
|
1507
|
+
await copyBuildAssets2(opt);
|
|
1508
|
+
await reportResults2(opt);
|
|
1509
|
+
})
|
|
1510
|
+
);
|
|
1511
|
+
} else {
|
|
1512
|
+
_chunk2CDSXWFAjs.writeWarning.call(void 0,
|
|
1513
|
+
" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function."
|
|
1514
|
+
);
|
|
1515
|
+
}
|
|
1516
|
+
_chunk2CDSXWFAjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1517
|
+
} catch (error) {
|
|
1518
|
+
_chunk2CDSXWFAjs.writeFatal.call(void 0,
|
|
1519
|
+
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1520
|
+
);
|
|
1521
|
+
throw error;
|
|
1522
|
+
} finally {
|
|
1523
|
+
stopwatch();
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1528
|
+
async function tsdownExecutorFn(options, context, config5) {
|
|
1529
|
+
_chunk2CDSXWFAjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown executor on the workspace", config5);
|
|
1530
|
+
if (!_optionalChain([context, 'access', _95 => _95.projectsConfigurations, 'optionalAccess', _96 => _96.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _97 => _97.projectsConfigurations, 'access', _98 => _98.projects, 'access', _99 => _99[context.projectName], 'optionalAccess', _100 => _100.root])) {
|
|
1531
|
+
throw new Error(
|
|
1532
|
+
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
1533
|
+
);
|
|
1534
|
+
}
|
|
1535
|
+
await build2({
|
|
1536
|
+
...options,
|
|
1537
|
+
projectRoot: (
|
|
1538
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1539
|
+
_optionalChain([context, 'access', _101 => _101.projectsConfigurations, 'access', _102 => _102.projects, 'optionalAccess', _103 => _103[context.projectName], 'access', _104 => _104.root])
|
|
1540
|
+
),
|
|
1541
|
+
name: context.projectName,
|
|
1542
|
+
sourceRoot: _optionalChain([context, 'access', _105 => _105.projectsConfigurations, 'access', _106 => _106.projects, 'optionalAccess', _107 => _107[context.projectName], 'optionalAccess', _108 => _108.sourceRoot]),
|
|
1543
|
+
format: options.format,
|
|
1544
|
+
platform: options.platform
|
|
1545
|
+
});
|
|
1546
|
+
return {
|
|
1547
|
+
success: true
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
var executor_default8 = withRunExecutor(
|
|
1551
|
+
"Storm TSDown build",
|
|
1552
|
+
tsdownExecutorFn,
|
|
1553
|
+
{
|
|
1554
|
+
skipReadingConfig: false,
|
|
1555
|
+
hooks: {
|
|
1556
|
+
applyDefaultOptions: async (options) => {
|
|
1557
|
+
options.entry ??= ["src/index.ts"];
|
|
1558
|
+
options.outputPath ??= "dist/{projectRoot}";
|
|
1559
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
1560
|
+
return options;
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
);
|
|
1565
|
+
|
|
1215
1566
|
// ../workspace-tools/src/executors/typia/executor.ts
|
|
1216
1567
|
var _fsextra = require('fs-extra');
|
|
1217
1568
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
@@ -1234,7 +1585,7 @@ async function typiaExecutorFn(options, _, config5) {
|
|
|
1234
1585
|
success: true
|
|
1235
1586
|
};
|
|
1236
1587
|
}
|
|
1237
|
-
var
|
|
1588
|
+
var executor_default9 = withRunExecutor(
|
|
1238
1589
|
"Typia runtime validation generator",
|
|
1239
1590
|
typiaExecutorFn,
|
|
1240
1591
|
{
|
|
@@ -1256,7 +1607,7 @@ var executor_default8 = withRunExecutor(
|
|
|
1256
1607
|
var _jiti = require('jiti');
|
|
1257
1608
|
async function unbuildExecutorFn(options, context, config5) {
|
|
1258
1609
|
_chunk2CDSXWFAjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config5);
|
|
1259
|
-
if (!_optionalChain([context, 'access',
|
|
1610
|
+
if (!_optionalChain([context, 'access', _109 => _109.projectsConfigurations, 'optionalAccess', _110 => _110.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1260
1611
|
throw new Error(
|
|
1261
1612
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
1262
1613
|
);
|
|
@@ -1323,7 +1674,7 @@ async function unbuildExecutorFn(options, context, config5) {
|
|
|
1323
1674
|
success: true
|
|
1324
1675
|
};
|
|
1325
1676
|
}
|
|
1326
|
-
var
|
|
1677
|
+
var executor_default10 = withRunExecutor(
|
|
1327
1678
|
"TypeScript Unbuild build",
|
|
1328
1679
|
unbuildExecutorFn,
|
|
1329
1680
|
{
|
|
@@ -1370,7 +1721,7 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
|
1370
1721
|
);
|
|
1371
1722
|
config5 = await _chunkAMJC7IYYjs.getConfig.call(void 0, workspaceRoot3);
|
|
1372
1723
|
}
|
|
1373
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
1724
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _111 => _111.hooks, 'optionalAccess', _112 => _112.applyDefaultOptions])) {
|
|
1374
1725
|
_chunk2CDSXWFAjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config5);
|
|
1375
1726
|
options = await Promise.resolve(
|
|
1376
1727
|
generatorOptions.hooks.applyDefaultOptions(options, config5)
|
|
@@ -1387,7 +1738,7 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1387
1738
|
{ workspaceRoot: tree.root, config: config5 },
|
|
1388
1739
|
applyWorkspaceBaseTokens
|
|
1389
1740
|
);
|
|
1390
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
1741
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _113 => _113.hooks, 'optionalAccess', _114 => _114.preProcess])) {
|
|
1391
1742
|
_chunk2CDSXWFAjs.writeDebug.call(void 0, "Running the preProcess hook...", config5);
|
|
1392
1743
|
await Promise.resolve(
|
|
1393
1744
|
generatorOptions.hooks.preProcess(tokenized, config5)
|
|
@@ -1398,15 +1749,15 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1398
1749
|
generatorFn(tree, tokenized, config5)
|
|
1399
1750
|
);
|
|
1400
1751
|
if (result) {
|
|
1401
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
1752
|
+
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _115 => _115.error, 'optionalAccess', _116 => _116.message]) && typeof _optionalChain([result, 'optionalAccess', _117 => _117.error, 'optionalAccess', _118 => _118.message]) === "string" && _optionalChain([result, 'optionalAccess', _119 => _119.error, 'optionalAccess', _120 => _120.name]) && typeof _optionalChain([result, 'optionalAccess', _121 => _121.error, 'optionalAccess', _122 => _122.name]) === "string") {
|
|
1402
1753
|
throw new Error(`The ${name} generator failed to run`, {
|
|
1403
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
1754
|
+
cause: _optionalChain([result, 'optionalAccess', _123 => _123.error])
|
|
1404
1755
|
});
|
|
1405
1756
|
} else if (result.success && result.data) {
|
|
1406
1757
|
return result;
|
|
1407
1758
|
}
|
|
1408
1759
|
}
|
|
1409
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
1760
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _124 => _124.hooks, 'optionalAccess', _125 => _125.postProcess])) {
|
|
1410
1761
|
_chunk2CDSXWFAjs.writeDebug.call(void 0, "Running the postProcess hook...", config5);
|
|
1411
1762
|
await Promise.resolve(generatorOptions.hooks.postProcess(config5));
|
|
1412
1763
|
_chunk2CDSXWFAjs.writeDebug.call(void 0, "Completed the postProcess hook", config5);
|
|
@@ -1538,15 +1889,15 @@ async function typeScriptLibraryGeneratorFn(tree, options, config5) {
|
|
|
1538
1889
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
1539
1890
|
let repository = {
|
|
1540
1891
|
type: "github",
|
|
1541
|
-
url: _optionalChain([config5, 'optionalAccess',
|
|
1892
|
+
url: _optionalChain([config5, 'optionalAccess', _126 => _126.repository]) || `https://github.com/${(typeof _optionalChain([config5, 'optionalAccess', _127 => _127.organization]) === "string" ? _optionalChain([config5, 'optionalAccess', _128 => _128.organization]) : _optionalChain([config5, 'optionalAccess', _129 => _129.organization, 'optionalAccess', _130 => _130.name])) || "storm-software"}/${_optionalChain([config5, 'optionalAccess', _131 => _131.namespace]) || _optionalChain([config5, 'optionalAccess', _132 => _132.name]) || "repository"}.git`
|
|
1542
1893
|
};
|
|
1543
1894
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
1544
1895
|
if (tree.exists("package.json")) {
|
|
1545
1896
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
1546
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
1897
|
+
if (_optionalChain([packageJson, 'optionalAccess', _133 => _133.repository])) {
|
|
1547
1898
|
repository = packageJson.repository;
|
|
1548
1899
|
}
|
|
1549
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
1900
|
+
if (_optionalChain([packageJson, 'optionalAccess', _134 => _134.description])) {
|
|
1550
1901
|
description = packageJson.description;
|
|
1551
1902
|
}
|
|
1552
1903
|
}
|
|
@@ -1601,9 +1952,9 @@ async function typeScriptLibraryGeneratorFn(tree, options, config5) {
|
|
|
1601
1952
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
1602
1953
|
...json,
|
|
1603
1954
|
pnpm: {
|
|
1604
|
-
..._optionalChain([json, 'optionalAccess',
|
|
1955
|
+
..._optionalChain([json, 'optionalAccess', _135 => _135.pnpm]),
|
|
1605
1956
|
overrides: {
|
|
1606
|
-
..._optionalChain([json, 'optionalAccess',
|
|
1957
|
+
..._optionalChain([json, 'optionalAccess', _136 => _136.pnpm, 'optionalAccess', _137 => _137.overrides]),
|
|
1607
1958
|
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
1608
1959
|
}
|
|
1609
1960
|
}
|
|
@@ -1621,10 +1972,10 @@ async function typeScriptLibraryGeneratorFn(tree, options, config5) {
|
|
|
1621
1972
|
]);
|
|
1622
1973
|
if (tree.exists("package.json")) {
|
|
1623
1974
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
1624
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
1975
|
+
if (_optionalChain([packageJson, 'optionalAccess', _138 => _138.repository])) {
|
|
1625
1976
|
repository = packageJson.repository;
|
|
1626
1977
|
}
|
|
1627
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
1978
|
+
if (_optionalChain([packageJson, 'optionalAccess', _139 => _139.description])) {
|
|
1628
1979
|
description = packageJson.description;
|
|
1629
1980
|
}
|
|
1630
1981
|
}
|
|
@@ -1661,22 +2012,22 @@ function getOutputPath(options) {
|
|
|
1661
2012
|
function createProjectTsConfigJson(tree, options) {
|
|
1662
2013
|
const tsconfig = {
|
|
1663
2014
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
1664
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2015
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _140 => _140.tsconfigOptions]), () => ( {})),
|
|
1665
2016
|
compilerOptions: {
|
|
1666
2017
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
1667
2018
|
outDir: _chunkAMJC7IYYjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
1668
2019
|
noEmit: true,
|
|
1669
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2020
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _141 => _141.tsconfigOptions, 'optionalAccess', _142 => _142.compilerOptions]), () => ( {}))
|
|
1670
2021
|
},
|
|
1671
|
-
files: [..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2022
|
+
files: [..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _143 => _143.tsconfigOptions, 'optionalAccess', _144 => _144.files]), () => ( []))],
|
|
1672
2023
|
include: [
|
|
1673
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2024
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _145 => _145.tsconfigOptions, 'optionalAccess', _146 => _146.include]), () => ( [])),
|
|
1674
2025
|
"src/**/*.ts",
|
|
1675
2026
|
"src/**/*.js",
|
|
1676
2027
|
"bin/**/*"
|
|
1677
2028
|
],
|
|
1678
2029
|
exclude: [
|
|
1679
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2030
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _147 => _147.tsconfigOptions, 'optionalAccess', _148 => _148.exclude]), () => ( [])),
|
|
1680
2031
|
"jest.config.ts",
|
|
1681
2032
|
"src/**/*.spec.ts",
|
|
1682
2033
|
"src/**/*.test.ts"
|
|
@@ -1686,8 +2037,8 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
1686
2037
|
}
|
|
1687
2038
|
async function normalizeOptions(tree, options, config5) {
|
|
1688
2039
|
let importPath = options.importPath;
|
|
1689
|
-
if (!importPath && _optionalChain([config5, 'optionalAccess',
|
|
1690
|
-
importPath = `@${_optionalChain([config5, 'optionalAccess',
|
|
2040
|
+
if (!importPath && _optionalChain([config5, 'optionalAccess', _149 => _149.namespace])) {
|
|
2041
|
+
importPath = `@${_optionalChain([config5, 'optionalAccess', _150 => _150.namespace])}/${options.name}`;
|
|
1691
2042
|
}
|
|
1692
2043
|
if (options.publishable) {
|
|
1693
2044
|
if (!importPath) {
|
|
@@ -1852,7 +2203,7 @@ async function configSchemaGeneratorFn(tree, options, config5) {
|
|
|
1852
2203
|
);
|
|
1853
2204
|
}
|
|
1854
2205
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
1855
|
-
_nullishCoalesce(_optionalChain([config5, 'optionalAccess',
|
|
2206
|
+
_nullishCoalesce(_optionalChain([config5, 'optionalAccess', _151 => _151.workspaceRoot]), () => ( _chunkAMJC7IYYjs.findWorkspaceRoot.call(void 0, ))),
|
|
1856
2207
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
1857
2208
|
);
|
|
1858
2209
|
_chunk2CDSXWFAjs.writeTrace.call(void 0,
|
|
@@ -2405,8 +2756,8 @@ var CHANGELOG_COMMIT_TYPES_OBJECT = Object.freeze(
|
|
|
2405
2756
|
ret[key] = {
|
|
2406
2757
|
...commitType.changelog,
|
|
2407
2758
|
type: key,
|
|
2408
|
-
section: _optionalChain([commitType, 'access',
|
|
2409
|
-
hidden: _optionalChain([commitType, 'access',
|
|
2759
|
+
section: _optionalChain([commitType, 'access', _152 => _152.changelog, 'optionalAccess', _153 => _153.title]) || commitType.title,
|
|
2760
|
+
hidden: _optionalChain([commitType, 'access', _154 => _154.changelog, 'optionalAccess', _155 => _155.hidden])
|
|
2410
2761
|
};
|
|
2411
2762
|
return ret;
|
|
2412
2763
|
},
|
|
@@ -9,7 +9,7 @@ var __commonJS = (cb, mod) => function __require2() {
|
|
|
9
9
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
12
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__65637242fb5c375be685ad35247b7773/node_modules/tsup/assets/esm_shims.js
|
|
13
13
|
import { fileURLToPath } from "url";
|
|
14
14
|
import path from "path";
|
|
15
15
|
var getFilename = () => fileURLToPath(import.meta.url);
|