@storm-software/cloudflare-tools 0.49.0 → 0.50.0
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 +12 -0
- package/README.md +1 -1
- package/dist/{chunk-A4ZIZ2JU.mjs → chunk-7KICJG4N.mjs} +4 -4
- package/dist/{chunk-OJNZ4PXQ.mjs → chunk-CYPHDXO4.mjs} +681 -136
- package/dist/{chunk-KKOHB7JH.js → chunk-FARER72T.js} +1 -1
- package/dist/{chunk-MTM5OTKD.mjs → chunk-FDWGGCRH.mjs} +1 -1
- package/dist/{chunk-YE4FHRXJ.js → chunk-FEVYI765.js} +4 -4
- package/dist/{chunk-Z46UO4N7.js → chunk-GTCFSQI5.js} +690 -145
- package/dist/{chunk-I4XNMV5U.js → chunk-IF6J7SWP.js} +5 -5
- package/dist/{chunk-OARYMVO7.mjs → chunk-JJVEBF3V.mjs} +4 -4
- package/dist/{chunk-NKCR3FSU.js → chunk-RGEF6YBW.js} +4 -4
- package/dist/{chunk-VPT6GF3S.mjs → chunk-WWU5M5GO.mjs} +5 -5
- package/dist/executors.js +4 -4
- package/dist/executors.mjs +4 -4
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.js +12 -12
- package/dist/index.mjs +15 -15
- package/dist/src/executors/cloudflare-publish/executor.js +2 -2
- package/dist/src/executors/cloudflare-publish/executor.mjs +2 -2
- package/dist/src/executors/r2-upload-publish/executor.js +4 -4
- package/dist/src/executors/r2-upload-publish/executor.mjs +3 -3
- package/dist/src/executors/serve/executor.js +3 -3
- 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 +1 -1
- package/dist/src/generators/worker/generator.js +4 -4
- package/dist/src/generators/worker/generator.mjs +3 -3
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkVTHBMY4Bjs = require('./chunk-VTHBMY4B.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkFEVYI765js = require('./chunk-FEVYI765.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -168,7 +168,7 @@ var withRunExecutor = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (name
|
|
|
168
168
|
- sourceRoot: ${sourceRoot}
|
|
169
169
|
- projectName: ${projectName}
|
|
170
170
|
`, config);
|
|
171
|
-
config = await
|
|
171
|
+
config = await _chunkFEVYI765js.loadStormConfig.call(void 0, workspaceRoot3);
|
|
172
172
|
}
|
|
173
173
|
if (_optionalChain([executorOptions, 'optionalAccess', _21 => _21.hooks, 'optionalAccess', _22 => _22.applyDefaultOptions])) {
|
|
174
174
|
_chunkRCE3CC76js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
@@ -493,23 +493,25 @@ var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_reso
|
|
|
493
493
|
|
|
494
494
|
// ../build-tools/src/utilities/copy-assets.ts
|
|
495
495
|
|
|
496
|
-
|
|
497
496
|
var _js = require('@nx/js');
|
|
498
497
|
var _glob = require('glob');
|
|
498
|
+
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
499
499
|
|
|
500
500
|
// ../build-tools/src/utilities/read-nx-config.ts
|
|
501
501
|
|
|
502
|
+
|
|
502
503
|
var readNxConfig = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (workspaceRoot3) => {
|
|
503
504
|
let rootDir = workspaceRoot3;
|
|
504
505
|
if (!rootDir) {
|
|
505
|
-
const config = await
|
|
506
|
+
const config = await _chunkFEVYI765js.loadStormConfig.call(void 0, );
|
|
506
507
|
rootDir = config.workspaceRoot;
|
|
507
508
|
}
|
|
508
509
|
const nxJsonPath = _chunkRCE3CC76js.joinPaths.call(void 0, rootDir, "nx.json");
|
|
509
|
-
if (!
|
|
510
|
+
if (!_fs.existsSync.call(void 0, nxJsonPath)) {
|
|
510
511
|
throw new Error("Cannot find project.json configuration");
|
|
511
512
|
}
|
|
512
|
-
|
|
513
|
+
const configContent = await _promises.readFile.call(void 0, nxJsonPath, "utf8");
|
|
514
|
+
return JSON.parse(configContent);
|
|
513
515
|
}, "readNxConfig");
|
|
514
516
|
|
|
515
517
|
// ../build-tools/src/utilities/copy-assets.ts
|
|
@@ -544,14 +546,12 @@ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (con
|
|
|
544
546
|
});
|
|
545
547
|
}
|
|
546
548
|
const nxJson = readNxConfig(config.workspaceRoot);
|
|
547
|
-
const projectGraph =
|
|
548
|
-
exitOnError: true
|
|
549
|
-
});
|
|
549
|
+
const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
550
550
|
const projectsConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
551
551
|
if (!_optionalChain([projectsConfigurations, 'optionalAccess', _49 => _49.projects, 'optionalAccess', _50 => _50[projectName]])) {
|
|
552
552
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
553
553
|
}
|
|
554
|
-
const buildTarget = _optionalChain([projectsConfigurations, 'access', _51 => _51.projects, 'access', _52 => _52[projectName], '
|
|
554
|
+
const buildTarget = _optionalChain([projectsConfigurations, 'access', _51 => _51.projects, 'access', _52 => _52[projectName], 'access', _53 => _53.targets, 'optionalAccess', _54 => _54.build]);
|
|
555
555
|
if (!buildTarget) {
|
|
556
556
|
throw new Error(`The Build process failed because the project does not have a valid build target in the project.json file. Check if the file exists in the root of the project at ${_chunkRCE3CC76js.joinPaths.call(void 0, projectRoot, "project.json")}`);
|
|
557
557
|
}
|
|
@@ -581,42 +581,30 @@ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (con
|
|
|
581
581
|
_chunkRCE3CC76js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
582
582
|
_chunkRCE3CC76js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
583
583
|
]);
|
|
584
|
-
await Promise.allSettled(files.map(async (file) =>
|
|
584
|
+
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
585
585
|
|
|
586
|
-
${await
|
|
586
|
+
${await _promises.readFile.call(void 0, file, "utf8")}
|
|
587
587
|
|
|
588
588
|
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
|
|
589
589
|
}
|
|
590
590
|
}, "copyAssets");
|
|
591
591
|
|
|
592
592
|
// ../build-tools/src/utilities/generate-package-json.ts
|
|
593
|
-
|
|
594
593
|
var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
|
|
595
594
|
|
|
595
|
+
|
|
596
|
+
|
|
596
597
|
var _projectgraph = require('nx/src/project-graph/project-graph');
|
|
597
598
|
var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (workspaceRoot3, projectRoot, projectName, packageJson) => {
|
|
598
|
-
const
|
|
599
|
-
exitOnError: true
|
|
600
|
-
});
|
|
601
|
-
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
602
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess', _55 => _55.projects, 'optionalAccess', _56 => _56[projectName]])) {
|
|
603
|
-
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
604
|
-
}
|
|
605
|
-
const projectJsonPath = _chunkRCE3CC76js.joinPaths.call(void 0, workspaceRoot3, projectRoot, "project.json");
|
|
606
|
-
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
607
|
-
throw new Error("Cannot find project.json configuration");
|
|
608
|
-
}
|
|
609
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess', _57 => _57.projects, 'optionalAccess', _58 => _58[projectName]])) {
|
|
610
|
-
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
611
|
-
}
|
|
612
|
-
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
599
|
+
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, _projectgraph.readCachedProjectGraph.call(void 0, ), workspaceRoot3, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
613
600
|
const localPackages = [];
|
|
614
601
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
|
|
615
602
|
const projectNode = project.node;
|
|
616
603
|
if (projectNode.data.root) {
|
|
617
604
|
const projectPackageJsonPath = _chunkRCE3CC76js.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
|
|
618
|
-
if (
|
|
619
|
-
const
|
|
605
|
+
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
606
|
+
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
607
|
+
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
620
608
|
if (projectPackageJson.private !== false) {
|
|
621
609
|
localPackages.push(projectPackageJson);
|
|
622
610
|
}
|
|
@@ -652,7 +640,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
652
640
|
}, "addPackageDependencies");
|
|
653
641
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
654
642
|
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkRCE3CC76js.findWorkspaceRoot.call(void 0, );
|
|
655
|
-
const
|
|
643
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkRCE3CC76js.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
644
|
+
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
656
645
|
packageJson.type ??= "module";
|
|
657
646
|
packageJson.sideEffects ??= false;
|
|
658
647
|
if (includeSrc === true) {
|
|
@@ -897,15 +886,15 @@ var RendererEngine = class {
|
|
|
897
886
|
if (!relativePath.startsWith("\\\\?\\")) {
|
|
898
887
|
relativePath = relativePath.replace(/\\/g, "/");
|
|
899
888
|
}
|
|
900
|
-
const meta = _optionalChain([metafile, 'optionalAccess',
|
|
889
|
+
const meta = _optionalChain([metafile, 'optionalAccess', _55 => _55.outputs, 'access', _56 => _56[relativePath]]);
|
|
901
890
|
return {
|
|
902
891
|
type: "chunk",
|
|
903
892
|
path: file.path,
|
|
904
893
|
code: file.text,
|
|
905
|
-
map: _optionalChain([outputFiles, 'access',
|
|
906
|
-
entryPoint: _optionalChain([meta, 'optionalAccess',
|
|
907
|
-
exports: _optionalChain([meta, 'optionalAccess',
|
|
908
|
-
imports: _optionalChain([meta, 'optionalAccess',
|
|
894
|
+
map: _optionalChain([outputFiles, 'access', _57 => _57.find, 'call', _58 => _58((f) => f.path === `${file.path}.map`), 'optionalAccess', _59 => _59.text]),
|
|
895
|
+
entryPoint: _optionalChain([meta, 'optionalAccess', _60 => _60.entryPoint]),
|
|
896
|
+
exports: _optionalChain([meta, 'optionalAccess', _61 => _61.exports]),
|
|
897
|
+
imports: _optionalChain([meta, 'optionalAccess', _62 => _62.imports])
|
|
909
898
|
};
|
|
910
899
|
} else {
|
|
911
900
|
return {
|
|
@@ -988,7 +977,7 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void
|
|
|
988
977
|
name: "storm:esm-split-code-to-cjs",
|
|
989
978
|
setup(build6) {
|
|
990
979
|
build6.onEnd(async (result) => {
|
|
991
|
-
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access',
|
|
980
|
+
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _63 => _63.metafile, 'optionalAccess', _64 => _64.outputs]), () => ( {})));
|
|
992
981
|
const jsFiles = outFiles.filter((f) => f.endsWith("js"));
|
|
993
982
|
await esbuild.build({
|
|
994
983
|
outdir: resolvedOptions.outdir,
|
|
@@ -1110,7 +1099,7 @@ ${result.errors.map((error) => error.text).join("\n")}
|
|
|
1110
1099
|
// ../esbuild/src/plugins/resolve-paths.ts
|
|
1111
1100
|
|
|
1112
1101
|
function resolvePathsConfig(options, cwd) {
|
|
1113
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1102
|
+
if (_optionalChain([options, 'optionalAccess', _65 => _65.compilerOptions, 'optionalAccess', _66 => _66.paths])) {
|
|
1114
1103
|
const paths = Object.entries(options.compilerOptions.paths);
|
|
1115
1104
|
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
1116
1105
|
return [
|
|
@@ -1138,7 +1127,7 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (o
|
|
|
1138
1127
|
build6.onResolve({
|
|
1139
1128
|
filter: packagesRegex
|
|
1140
1129
|
}, (args) => {
|
|
1141
|
-
if (_optionalChain([build6, 'access',
|
|
1130
|
+
if (_optionalChain([build6, 'access', _67 => _67.initialOptions, 'access', _68 => _68.external, 'optionalAccess', _69 => _69.includes, 'call', _70 => _70(args.path)])) {
|
|
1142
1131
|
return {
|
|
1143
1132
|
path: args.path,
|
|
1144
1133
|
external: true
|
|
@@ -1246,7 +1235,7 @@ var tscPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, r
|
|
|
1246
1235
|
function getTypeDependencyPackageName(npmPackage) {
|
|
1247
1236
|
if (npmPackage.startsWith("@")) {
|
|
1248
1237
|
const [scope, name] = npmPackage.split("/");
|
|
1249
|
-
return `@types/${_optionalChain([scope, 'optionalAccess',
|
|
1238
|
+
return `@types/${_optionalChain([scope, 'optionalAccess', _71 => _71.slice, 'call', _72 => _72(1)])}__${name}`;
|
|
1250
1239
|
}
|
|
1251
1240
|
return `@types/${npmPackage}`;
|
|
1252
1241
|
}
|
|
@@ -1453,7 +1442,7 @@ function pipeSync(fn, ...fns) {
|
|
|
1453
1442
|
return (...args) => {
|
|
1454
1443
|
let result = fn(...args);
|
|
1455
1444
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
1456
|
-
result = _optionalChain([fns, 'access',
|
|
1445
|
+
result = _optionalChain([fns, 'access', _73 => _73[i], 'optionalCall', _74 => _74(result)]);
|
|
1457
1446
|
}
|
|
1458
1447
|
return result;
|
|
1459
1448
|
};
|
|
@@ -1463,7 +1452,7 @@ function pipeAsync(fn, ...fns) {
|
|
|
1463
1452
|
return async (...args) => {
|
|
1464
1453
|
let result = await fn(...args);
|
|
1465
1454
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
1466
|
-
result = await _optionalChain([fns, 'access',
|
|
1455
|
+
result = await _optionalChain([fns, 'access', _75 => _75[i], 'optionalCall', _76 => _76(result)]);
|
|
1467
1456
|
}
|
|
1468
1457
|
return result;
|
|
1469
1458
|
};
|
|
@@ -1479,7 +1468,7 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1479
1468
|
if (!workspaceRoot3) {
|
|
1480
1469
|
throw new Error("Cannot find Nx workspace root");
|
|
1481
1470
|
}
|
|
1482
|
-
const config = await
|
|
1471
|
+
const config = await _chunkFEVYI765js.loadStormConfig.call(void 0, workspaceRoot3.dir);
|
|
1483
1472
|
_chunkRCE3CC76js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1484
1473
|
const stopwatch = _chunkRCE3CC76js.getStopwatch.call(void 0, "Build options resolution");
|
|
1485
1474
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
@@ -1492,7 +1481,7 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1492
1481
|
const projectJson = await _node.hfs.json(projectJsonPath);
|
|
1493
1482
|
const projectName = projectJson.name;
|
|
1494
1483
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
1495
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
1484
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _77 => _77.projects, 'optionalAccess', _78 => _78[projectName]])) {
|
|
1496
1485
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
1497
1486
|
}
|
|
1498
1487
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
@@ -1668,7 +1657,7 @@ async function executeEsBuild(context2) {
|
|
|
1668
1657
|
}
|
|
1669
1658
|
_chunkJ5SB6L2Ljs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
1670
1659
|
async function copyBuildAssets(context2) {
|
|
1671
|
-
if (_optionalChain([context2, 'access',
|
|
1660
|
+
if (_optionalChain([context2, 'access', _79 => _79.result, 'optionalAccess', _80 => _80.errors, 'access', _81 => _81.length]) === 0) {
|
|
1672
1661
|
_chunkRCE3CC76js.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
1673
1662
|
const stopwatch = _chunkRCE3CC76js.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1674
1663
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.projectName, context2.options.sourceRoot, true, false);
|
|
@@ -1678,7 +1667,7 @@ async function copyBuildAssets(context2) {
|
|
|
1678
1667
|
}
|
|
1679
1668
|
_chunkJ5SB6L2Ljs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
1680
1669
|
async function reportResults(context2) {
|
|
1681
|
-
if (_optionalChain([context2, 'access',
|
|
1670
|
+
if (_optionalChain([context2, 'access', _82 => _82.result, 'optionalAccess', _83 => _83.errors, 'access', _84 => _84.length]) === 0) {
|
|
1682
1671
|
if (context2.result.warnings.length > 0) {
|
|
1683
1672
|
_chunkRCE3CC76js.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
|
|
1684
1673
|
}
|
|
@@ -1776,14 +1765,14 @@ var watch = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (context2, opti
|
|
|
1776
1765
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1777
1766
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1778
1767
|
_chunkRCE3CC76js.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1779
|
-
if (!_optionalChain([context2, 'access',
|
|
1768
|
+
if (!_optionalChain([context2, 'access', _85 => _85.projectsConfigurations, 'optionalAccess', _86 => _86.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _87 => _87.projectsConfigurations, 'access', _88 => _88.projects, 'access', _89 => _89[context2.projectName], 'optionalAccess', _90 => _90.root])) {
|
|
1780
1769
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1781
1770
|
}
|
|
1782
1771
|
await build3({
|
|
1783
1772
|
...options,
|
|
1784
|
-
projectRoot: _optionalChain([context2, 'access',
|
|
1773
|
+
projectRoot: _optionalChain([context2, 'access', _91 => _91.projectsConfigurations, 'access', _92 => _92.projects, 'optionalAccess', _93 => _93[context2.projectName], 'access', _94 => _94.root]),
|
|
1785
1774
|
projectName: context2.projectName,
|
|
1786
|
-
sourceRoot: _optionalChain([context2, 'access',
|
|
1775
|
+
sourceRoot: _optionalChain([context2, 'access', _95 => _95.projectsConfigurations, 'access', _96 => _96.projects, 'optionalAccess', _97 => _97[context2.projectName], 'optionalAccess', _98 => _98.sourceRoot]),
|
|
1787
1776
|
format: options.format,
|
|
1788
1777
|
platform: options.format
|
|
1789
1778
|
});
|
|
@@ -1808,7 +1797,7 @@ var executor_default6 = withRunExecutor("Storm ESBuild build", esbuildExecutorFn
|
|
|
1808
1797
|
|
|
1809
1798
|
// ../workspace-tools/src/executors/npm-publish/executor.ts
|
|
1810
1799
|
|
|
1811
|
-
|
|
1800
|
+
|
|
1812
1801
|
|
|
1813
1802
|
// ../workspace-tools/src/utils/pnpm-deps-update.ts
|
|
1814
1803
|
|
|
@@ -1825,7 +1814,7 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
|
|
|
1825
1814
|
var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
|
|
1826
1815
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
1827
1816
|
async function sizeLimitExecutorFn(options, context2, config) {
|
|
1828
|
-
if (!_optionalChain([context2, 'optionalAccess',
|
|
1817
|
+
if (!_optionalChain([context2, 'optionalAccess', _99 => _99.projectName]) || !_optionalChain([context2, 'access', _100 => _100.projectsConfigurations, 'optionalAccess', _101 => _101.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1829
1818
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
1830
1819
|
}
|
|
1831
1820
|
_chunkRCE3CC76js.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
@@ -1834,7 +1823,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1834
1823
|
_esbuild3.default,
|
|
1835
1824
|
_esbuildwhy2.default
|
|
1836
1825
|
], {
|
|
1837
|
-
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access',
|
|
1826
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _102 => _102.projectsConfigurations, 'access', _103 => _103.projects, 'access', _104 => _104[context2.projectName], 'optionalAccess', _105 => _105.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _106 => _106.projectsConfigurations, 'access', _107 => _107.projects, 'access', _108 => _108[context2.projectName], 'optionalAccess', _109 => _109.root]), () => ( "./")), "src")))
|
|
1838
1827
|
}).then((result) => {
|
|
1839
1828
|
_chunkRCE3CC76js.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
1840
1829
|
});
|
|
@@ -1898,7 +1887,7 @@ var resolveOptions2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1898
1887
|
if (!workspaceRoot3) {
|
|
1899
1888
|
throw new Error("Cannot find Nx workspace root");
|
|
1900
1889
|
}
|
|
1901
|
-
const config = await
|
|
1890
|
+
const config = await _chunkFEVYI765js.loadStormConfig.call(void 0, workspaceRoot3.dir);
|
|
1902
1891
|
_chunkRCE3CC76js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1903
1892
|
const stopwatch = _chunkRCE3CC76js.getStopwatch.call(void 0, "Build options resolution");
|
|
1904
1893
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
@@ -1911,7 +1900,7 @@ var resolveOptions2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1911
1900
|
const projectJson = await _node.hfs.json(projectJsonPath);
|
|
1912
1901
|
const projectName = projectJson.name;
|
|
1913
1902
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
1914
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
1903
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _110 => _110.projects, 'optionalAccess', _111 => _111[projectName]])) {
|
|
1915
1904
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
1916
1905
|
}
|
|
1917
1906
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
|
|
@@ -2091,14 +2080,14 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, build4, "build");
|
|
|
2091
2080
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
2092
2081
|
async function tsdownExecutorFn(options, context2, config) {
|
|
2093
2082
|
_chunkRCE3CC76js.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
|
|
2094
|
-
if (!_optionalChain([context2, 'access',
|
|
2083
|
+
if (!_optionalChain([context2, 'access', _112 => _112.projectsConfigurations, 'optionalAccess', _113 => _113.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _114 => _114.projectsConfigurations, 'access', _115 => _115.projects, 'access', _116 => _116[context2.projectName], 'optionalAccess', _117 => _117.root])) {
|
|
2095
2084
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
2096
2085
|
}
|
|
2097
2086
|
await build4({
|
|
2098
2087
|
...options,
|
|
2099
|
-
projectRoot: _optionalChain([context2, 'access',
|
|
2088
|
+
projectRoot: _optionalChain([context2, 'access', _118 => _118.projectsConfigurations, 'access', _119 => _119.projects, 'optionalAccess', _120 => _120[context2.projectName], 'access', _121 => _121.root]),
|
|
2100
2089
|
projectName: context2.projectName,
|
|
2101
|
-
sourceRoot: _optionalChain([context2, 'access',
|
|
2090
|
+
sourceRoot: _optionalChain([context2, 'access', _122 => _122.projectsConfigurations, 'access', _123 => _123.projects, 'optionalAccess', _124 => _124[context2.projectName], 'optionalAccess', _125 => _125.sourceRoot]),
|
|
2102
2091
|
format: options.format,
|
|
2103
2092
|
platform: options.platform
|
|
2104
2093
|
});
|
|
@@ -2165,6 +2154,7 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
|
|
|
2165
2154
|
|
|
2166
2155
|
|
|
2167
2156
|
|
|
2157
|
+
|
|
2168
2158
|
var _unbuild = require('unbuild');
|
|
2169
2159
|
|
|
2170
2160
|
// ../unbuild/src/clean.ts
|
|
@@ -2172,7 +2162,10 @@ var _unbuild = require('unbuild');
|
|
|
2172
2162
|
async function clean3(name = "Unbuild", directory, config) {
|
|
2173
2163
|
_chunkRCE3CC76js.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
2174
2164
|
const stopwatch = _chunkRCE3CC76js.getStopwatch.call(void 0, `${name} output clean`);
|
|
2175
|
-
await
|
|
2165
|
+
await _promises.rm.call(void 0, directory, {
|
|
2166
|
+
recursive: true,
|
|
2167
|
+
force: true
|
|
2168
|
+
});
|
|
2176
2169
|
stopwatch();
|
|
2177
2170
|
}
|
|
2178
2171
|
_chunkJ5SB6L2Ljs.__name.call(void 0, clean3, "clean");
|
|
@@ -2223,26 +2216,6 @@ ${error ? error.message : "Unknown build error"}
|
|
|
2223
2216
|
}
|
|
2224
2217
|
}), "onErrorPlugin");
|
|
2225
2218
|
|
|
2226
|
-
// ../unbuild/src/plugins/swc.ts
|
|
2227
|
-
var swcPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, resolvedOptions) => {
|
|
2228
|
-
const { transform: transform3 } = _chunkJ5SB6L2Ljs.__require.call(void 0, "@swc/core");
|
|
2229
|
-
return {
|
|
2230
|
-
name: "storm:swc",
|
|
2231
|
-
transform(code, filename) {
|
|
2232
|
-
return transform3(code, {
|
|
2233
|
-
filename,
|
|
2234
|
-
jsc: {
|
|
2235
|
-
transform: {
|
|
2236
|
-
react: {
|
|
2237
|
-
runtime: "automatic"
|
|
2238
|
-
}
|
|
2239
|
-
}
|
|
2240
|
-
}
|
|
2241
|
-
});
|
|
2242
|
-
}
|
|
2243
|
-
};
|
|
2244
|
-
}, "swcPlugin");
|
|
2245
|
-
|
|
2246
2219
|
// ../unbuild/src/plugins/tsc.ts
|
|
2247
2220
|
|
|
2248
2221
|
|
|
@@ -2277,9 +2250,7 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, createTsCompilerOptions, "createTsCompilerO
|
|
|
2277
2250
|
|
|
2278
2251
|
// ../unbuild/src/plugins/tsc.ts
|
|
2279
2252
|
var tscPlugin2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (options, resolvedOptions) => {
|
|
2280
|
-
const projectGraph =
|
|
2281
|
-
exitOnError: true
|
|
2282
|
-
});
|
|
2253
|
+
const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
2283
2254
|
const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, resolvedOptions.config.workspaceRoot, resolvedOptions.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
2284
2255
|
let dependencies = result.dependencies;
|
|
2285
2256
|
const tsLibDependency = _compilerhelperdependency.getHelperDependency.call(void 0, _compilerhelperdependency.HelperDependency.tsc, resolvedOptions.tsconfig, dependencies, projectGraph, true);
|
|
@@ -2298,37 +2269,39 @@ var tscPlugin2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (opt
|
|
|
2298
2269
|
|
|
2299
2270
|
// ../unbuild/src/plugins/type-definitions.ts
|
|
2300
2271
|
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2272
|
+
function typeDefinitions(projectRoot) {
|
|
2273
|
+
return {
|
|
2274
|
+
name: "storm:dts-bundle",
|
|
2275
|
+
async generateBundle(_opts, bundle) {
|
|
2276
|
+
for (const file of Object.values(bundle)) {
|
|
2277
|
+
if (file.type === "asset" || !file.isEntry || file.facadeModuleId == null) {
|
|
2278
|
+
continue;
|
|
2279
|
+
}
|
|
2280
|
+
const hasDefaultExport = file.exports.includes("default");
|
|
2281
|
+
const entrySourceFileName = _path.relative.call(void 0, projectRoot, file.facadeModuleId);
|
|
2282
|
+
const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
|
|
2283
|
+
const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
|
|
2284
|
+
const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
|
|
2285
|
+
const dtsFileSource = hasDefaultExport ? `
|
|
2314
2286
|
export * from ${relativeSourceDtsName};
|
|
2315
2287
|
export { default } from ${relativeSourceDtsName};
|
|
2316
2288
|
` : `export * from ${relativeSourceDtsName};
|
|
2317
2289
|
`;
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2290
|
+
this.emitFile({
|
|
2291
|
+
type: "asset",
|
|
2292
|
+
fileName: dtsFileName,
|
|
2293
|
+
source: dtsFileSource
|
|
2294
|
+
});
|
|
2295
|
+
}
|
|
2323
2296
|
}
|
|
2324
|
-
}
|
|
2325
|
-
}
|
|
2297
|
+
};
|
|
2298
|
+
}
|
|
2299
|
+
_chunkJ5SB6L2Ljs.__name.call(void 0, typeDefinitions, "typeDefinitions");
|
|
2326
2300
|
|
|
2327
2301
|
// ../unbuild/src/config.ts
|
|
2328
2302
|
var getDefaultBuildPlugins2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (options, resolvedOptions) => Promise.all([
|
|
2329
2303
|
analyzePlugin(options, resolvedOptions),
|
|
2330
|
-
|
|
2331
|
-
typeDefinitions(options, resolvedOptions),
|
|
2304
|
+
typeDefinitions(resolvedOptions.projectRoot),
|
|
2332
2305
|
tscPlugin2(options, resolvedOptions),
|
|
2333
2306
|
onErrorPlugin2(options, resolvedOptions)
|
|
2334
2307
|
].map((plugin) => Promise.resolve(plugin))), "getDefaultBuildPlugins");
|
|
@@ -2344,7 +2317,7 @@ async function resolveOptions3(options) {
|
|
|
2344
2317
|
if (!workspaceRoot3) {
|
|
2345
2318
|
throw new Error("Cannot find workspace root");
|
|
2346
2319
|
}
|
|
2347
|
-
const config = await
|
|
2320
|
+
const config = await _chunkFEVYI765js.loadStormConfig.call(void 0, workspaceRoot3.dir);
|
|
2348
2321
|
_chunkRCE3CC76js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
2349
2322
|
const stopwatch = _chunkRCE3CC76js.getStopwatch.call(void 0, "Build options resolution");
|
|
2350
2323
|
if (options.configPath) {
|
|
@@ -2353,38 +2326,34 @@ async function resolveOptions3(options) {
|
|
|
2353
2326
|
options = _defu2.default.call(void 0, options, configFile);
|
|
2354
2327
|
}
|
|
2355
2328
|
}
|
|
2356
|
-
const projectGraph =
|
|
2357
|
-
exitOnError: true
|
|
2358
|
-
});
|
|
2329
|
+
const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
2359
2330
|
const projectJsonPath = _chunkRCE3CC76js.joinPaths.call(void 0, config.workspaceRoot, projectRoot, "project.json");
|
|
2360
|
-
if (!
|
|
2331
|
+
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
2361
2332
|
throw new Error("Cannot find project.json configuration");
|
|
2362
2333
|
}
|
|
2363
|
-
const
|
|
2334
|
+
const projectJsonContent = await _promises.readFile.call(void 0, projectJsonPath, "utf8");
|
|
2335
|
+
const projectJson = JSON.parse(projectJsonContent);
|
|
2364
2336
|
const projectName = projectJson.name;
|
|
2365
2337
|
const packageJsonPath = _chunkRCE3CC76js.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "package.json");
|
|
2366
|
-
if (!
|
|
2338
|
+
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2367
2339
|
throw new Error("Cannot find package.json configuration");
|
|
2368
2340
|
}
|
|
2369
|
-
const
|
|
2341
|
+
const packageJsonContent = await _promises.readFile.call(void 0, packageJsonPath, "utf8");
|
|
2342
|
+
const packageJson = JSON.parse(packageJsonContent);
|
|
2370
2343
|
let tsconfig = options.tsconfig;
|
|
2371
2344
|
if (!tsconfig) {
|
|
2372
2345
|
tsconfig = _chunkRCE3CC76js.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "tsconfig.json");
|
|
2373
2346
|
}
|
|
2374
|
-
if (!
|
|
2347
|
+
if (!_fs.existsSync.call(void 0, tsconfig)) {
|
|
2375
2348
|
throw new Error("Cannot find tsconfig.json configuration");
|
|
2376
2349
|
}
|
|
2377
2350
|
let sourceRoot = projectJson.sourceRoot;
|
|
2378
2351
|
if (!sourceRoot) {
|
|
2379
2352
|
sourceRoot = _chunkRCE3CC76js.joinPaths.call(void 0, projectRoot, "src");
|
|
2380
2353
|
}
|
|
2381
|
-
if (!
|
|
2354
|
+
if (!_fs.existsSync.call(void 0, sourceRoot)) {
|
|
2382
2355
|
throw new Error("Cannot find sourceRoot directory");
|
|
2383
2356
|
}
|
|
2384
|
-
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2385
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess', _130 => _130.projects, 'optionalAccess', _131 => _131[projectName]])) {
|
|
2386
|
-
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
2387
|
-
}
|
|
2388
2357
|
const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot3.dir, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
2389
2358
|
let dependencies = result.dependencies;
|
|
2390
2359
|
const tsLibDependency = _js.getHelperDependency.call(void 0, _js.HelperDependency.tsc, tsconfig, dependencies, projectGraph, true);
|
|
@@ -2505,21 +2474,21 @@ async function resolveOptions3(options) {
|
|
|
2505
2474
|
}
|
|
2506
2475
|
_chunkJ5SB6L2Ljs.__name.call(void 0, resolveOptions3, "resolveOptions");
|
|
2507
2476
|
async function generatePackageJson3(options) {
|
|
2508
|
-
if (options.generatePackageJson !== false &&
|
|
2477
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkRCE3CC76js.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
2509
2478
|
_chunkRCE3CC76js.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
2510
2479
|
const stopwatch = _chunkRCE3CC76js.getStopwatch.call(void 0, "Write package.json file");
|
|
2511
2480
|
const packageJsonPath = _chunkRCE3CC76js.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
2512
|
-
if (!
|
|
2481
|
+
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
2513
2482
|
throw new Error("Cannot find package.json configuration");
|
|
2514
2483
|
}
|
|
2515
|
-
let
|
|
2516
|
-
if (!
|
|
2484
|
+
let packageJsonContent = await _promises.readFile.call(void 0, _chunkRCE3CC76js.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
2485
|
+
if (!packageJsonContent) {
|
|
2517
2486
|
throw new Error("Cannot find package.json configuration file");
|
|
2518
2487
|
}
|
|
2488
|
+
let packageJson = JSON.parse(packageJsonContent);
|
|
2519
2489
|
packageJson = await addPackageDependencies(options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
2520
2490
|
packageJson = await addWorkspacePackageJsonFields(options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
2521
|
-
|
|
2522
|
-
await _devkit.writeJsonFile.call(void 0, _chunkRCE3CC76js.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
2491
|
+
await _devkit.writeJsonFile.call(void 0, _chunkRCE3CC76js.joinPaths.call(void 0, options.outDir, "package.json"), await addPackageJsonExports(options.sourceRoot, packageJson));
|
|
2523
2492
|
stopwatch();
|
|
2524
2493
|
}
|
|
2525
2494
|
return options;
|
|
@@ -2577,14 +2546,14 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, build5, "build");
|
|
|
2577
2546
|
|
|
2578
2547
|
async function unbuildExecutorFn(options, context2, config) {
|
|
2579
2548
|
_chunkRCE3CC76js.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
2580
|
-
if (!_optionalChain([context2, 'access',
|
|
2549
|
+
if (!_optionalChain([context2, 'access', _126 => _126.projectsConfigurations, 'optionalAccess', _127 => _127.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _128 => _128.projectsConfigurations, 'access', _129 => _129.projects, 'access', _130 => _130[context2.projectName], 'optionalAccess', _131 => _131.root])) {
|
|
2581
2550
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
2582
2551
|
}
|
|
2583
2552
|
await build5(_defu.defu.call(void 0, {
|
|
2584
2553
|
...options,
|
|
2585
|
-
projectRoot: _optionalChain([context2, 'access',
|
|
2554
|
+
projectRoot: _optionalChain([context2, 'access', _132 => _132.projectsConfigurations, 'access', _133 => _133.projects, 'optionalAccess', _134 => _134[context2.projectName], 'access', _135 => _135.root]),
|
|
2586
2555
|
projectName: context2.projectName,
|
|
2587
|
-
sourceRoot: _optionalChain([context2, 'access',
|
|
2556
|
+
sourceRoot: _optionalChain([context2, 'access', _136 => _136.projectsConfigurations, 'access', _137 => _137.projects, 'optionalAccess', _138 => _138[context2.projectName], 'optionalAccess', _139 => _139.sourceRoot]),
|
|
2588
2557
|
platform: options.platform,
|
|
2589
2558
|
name: context2.projectName
|
|
2590
2559
|
}, {
|
|
@@ -2651,9 +2620,9 @@ var withRunGenerator = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (nam
|
|
|
2651
2620
|
if (!generatorOptions.skipReadingConfig) {
|
|
2652
2621
|
_chunkRCE3CC76js.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
2653
2622
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
2654
|
-
config = await
|
|
2623
|
+
config = await _chunkFEVYI765js.loadStormConfig.call(void 0, workspaceRoot3);
|
|
2655
2624
|
}
|
|
2656
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2625
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _140 => _140.hooks, 'optionalAccess', _141 => _141.applyDefaultOptions])) {
|
|
2657
2626
|
_chunkRCE3CC76js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
2658
2627
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
2659
2628
|
_chunkRCE3CC76js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
@@ -2664,22 +2633,22 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
2664
2633
|
workspaceRoot: tree.root,
|
|
2665
2634
|
config
|
|
2666
2635
|
}, applyWorkspaceBaseTokens);
|
|
2667
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2636
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _142 => _142.hooks, 'optionalAccess', _143 => _143.preProcess])) {
|
|
2668
2637
|
_chunkRCE3CC76js.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
2669
2638
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
2670
2639
|
_chunkRCE3CC76js.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
2671
2640
|
}
|
|
2672
2641
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
2673
2642
|
if (result) {
|
|
2674
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
2643
|
+
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _144 => _144.error, 'optionalAccess', _145 => _145.message]) && typeof _optionalChain([result, 'optionalAccess', _146 => _146.error, 'optionalAccess', _147 => _147.message]) === "string" && _optionalChain([result, 'optionalAccess', _148 => _148.error, 'optionalAccess', _149 => _149.name]) && typeof _optionalChain([result, 'optionalAccess', _150 => _150.error, 'optionalAccess', _151 => _151.name]) === "string") {
|
|
2675
2644
|
throw new Error(`The ${name} generator failed to run`, {
|
|
2676
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
2645
|
+
cause: _optionalChain([result, 'optionalAccess', _152 => _152.error])
|
|
2677
2646
|
});
|
|
2678
2647
|
} else if (result.success && result.data) {
|
|
2679
2648
|
return result;
|
|
2680
2649
|
}
|
|
2681
2650
|
}
|
|
2682
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2651
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _153 => _153.hooks, 'optionalAccess', _154 => _154.postProcess])) {
|
|
2683
2652
|
_chunkRCE3CC76js.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
2684
2653
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
2685
2654
|
_chunkRCE3CC76js.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
@@ -2789,15 +2758,15 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2789
2758
|
_devkit.addProjectConfiguration.call(void 0, tree, options.name, projectConfig);
|
|
2790
2759
|
let repository = {
|
|
2791
2760
|
type: "github",
|
|
2792
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
2761
|
+
url: _optionalChain([config, 'optionalAccess', _155 => _155.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _156 => _156.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _157 => _157.namespace]) || _optionalChain([config, 'optionalAccess', _158 => _158.name]) || "repository"}.git`
|
|
2793
2762
|
};
|
|
2794
2763
|
let description = schema.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
2795
2764
|
if (tree.exists("package.json")) {
|
|
2796
2765
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
2797
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2766
|
+
if (_optionalChain([packageJson, 'optionalAccess', _159 => _159.repository])) {
|
|
2798
2767
|
repository = packageJson.repository;
|
|
2799
2768
|
}
|
|
2800
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2769
|
+
if (_optionalChain([packageJson, 'optionalAccess', _160 => _160.description])) {
|
|
2801
2770
|
description = packageJson.description;
|
|
2802
2771
|
}
|
|
2803
2772
|
}
|
|
@@ -2852,9 +2821,9 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2852
2821
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
2853
2822
|
...json,
|
|
2854
2823
|
pnpm: {
|
|
2855
|
-
..._optionalChain([json, 'optionalAccess',
|
|
2824
|
+
..._optionalChain([json, 'optionalAccess', _161 => _161.pnpm]),
|
|
2856
2825
|
overrides: {
|
|
2857
|
-
..._optionalChain([json, 'optionalAccess',
|
|
2826
|
+
..._optionalChain([json, 'optionalAccess', _162 => _162.pnpm, 'optionalAccess', _163 => _163.overrides]),
|
|
2858
2827
|
[_nullishCoalesce(options.importPath, () => ( ""))]: "workspace:*"
|
|
2859
2828
|
}
|
|
2860
2829
|
}
|
|
@@ -2868,10 +2837,10 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2868
2837
|
]);
|
|
2869
2838
|
if (tree.exists("package.json")) {
|
|
2870
2839
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
2871
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2840
|
+
if (_optionalChain([packageJson, 'optionalAccess', _164 => _164.repository])) {
|
|
2872
2841
|
repository = packageJson.repository;
|
|
2873
2842
|
}
|
|
2874
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2843
|
+
if (_optionalChain([packageJson, 'optionalAccess', _165 => _165.description])) {
|
|
2875
2844
|
description = packageJson.description;
|
|
2876
2845
|
}
|
|
2877
2846
|
}
|
|
@@ -2919,24 +2888,24 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
|
2919
2888
|
function createProjectTsConfigJson(tree, options) {
|
|
2920
2889
|
const tsconfig = {
|
|
2921
2890
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
2922
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2891
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _166 => _166.tsconfigOptions]), () => ( {})),
|
|
2923
2892
|
compilerOptions: {
|
|
2924
2893
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2925
2894
|
outDir: _chunkRCE3CC76js.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2926
2895
|
noEmit: true,
|
|
2927
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2896
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _167 => _167.tsconfigOptions, 'optionalAccess', _168 => _168.compilerOptions]), () => ( {}))
|
|
2928
2897
|
},
|
|
2929
2898
|
files: [
|
|
2930
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2899
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _169 => _169.tsconfigOptions, 'optionalAccess', _170 => _170.files]), () => ( []))
|
|
2931
2900
|
],
|
|
2932
2901
|
include: [
|
|
2933
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2902
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _171 => _171.tsconfigOptions, 'optionalAccess', _172 => _172.include]), () => ( [])),
|
|
2934
2903
|
"src/**/*.ts",
|
|
2935
2904
|
"src/**/*.js",
|
|
2936
2905
|
"bin/**/*"
|
|
2937
2906
|
],
|
|
2938
2907
|
exclude: [
|
|
2939
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2908
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _173 => _173.tsconfigOptions, 'optionalAccess', _174 => _174.exclude]), () => ( [])),
|
|
2940
2909
|
"jest.config.ts",
|
|
2941
2910
|
"src/**/*.spec.ts",
|
|
2942
2911
|
"src/**/*.test.ts"
|
|
@@ -3074,7 +3043,7 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
3074
3043
|
name: "StormWorkspaceConfiguration"
|
|
3075
3044
|
});
|
|
3076
3045
|
_chunkRCE3CC76js.writeTrace.call(void 0, jsonSchema, config);
|
|
3077
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
3046
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _175 => _175.workspaceRoot]), () => ( _chunkRCE3CC76js.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _176 => _176.outputFile, 'optionalAccess', _177 => _177.startsWith, 'call', _178 => _178("./")]) ? "" : "./");
|
|
3078
3047
|
_chunkRCE3CC76js.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
3079
3048
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
3080
3049
|
spaces: 2
|
|
@@ -3440,6 +3409,582 @@ var _version = require('nx/src/command-line/release/version');
|
|
|
3440
3409
|
var _utils = require('nx/src/tasks-runner/utils');
|
|
3441
3410
|
var _semver3 = require('semver');
|
|
3442
3411
|
|
|
3412
|
+
// ../workspace-tools/src/base/base-executor.untyped.ts
|
|
3413
|
+
var _untyped = require('untyped');
|
|
3414
|
+
var base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
3415
|
+
$schema: {
|
|
3416
|
+
id: "baseExecutor",
|
|
3417
|
+
title: "Base Executor",
|
|
3418
|
+
description: "A base type definition for an executor schema"
|
|
3419
|
+
},
|
|
3420
|
+
outputPath: {
|
|
3421
|
+
$schema: {
|
|
3422
|
+
title: "Output Path",
|
|
3423
|
+
type: "string",
|
|
3424
|
+
format: "path",
|
|
3425
|
+
description: "The output path for the build"
|
|
3426
|
+
},
|
|
3427
|
+
$default: "dist/{projectRoot}"
|
|
3428
|
+
}
|
|
3429
|
+
});
|
|
3430
|
+
|
|
3431
|
+
// ../workspace-tools/src/base/base-generator.untyped.ts
|
|
3432
|
+
|
|
3433
|
+
var base_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
3434
|
+
$schema: {
|
|
3435
|
+
id: "BaseGeneratorSchema",
|
|
3436
|
+
title: "Base Generator",
|
|
3437
|
+
description: "A type definition for the base Generator schema"
|
|
3438
|
+
},
|
|
3439
|
+
directory: {
|
|
3440
|
+
$schema: {
|
|
3441
|
+
title: "Directory",
|
|
3442
|
+
type: "string",
|
|
3443
|
+
description: "The directory to create the library in"
|
|
3444
|
+
}
|
|
3445
|
+
}
|
|
3446
|
+
});
|
|
3447
|
+
|
|
3448
|
+
// ../workspace-tools/src/base/cargo-base-executor.untyped.ts
|
|
3449
|
+
|
|
3450
|
+
var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
3451
|
+
...base_executor_untyped_default,
|
|
3452
|
+
$schema: {
|
|
3453
|
+
id: "cargoBaseExecutor",
|
|
3454
|
+
title: "Cargo Base Executor",
|
|
3455
|
+
description: "A base type definition for a Cargo/rust related executor schema"
|
|
3456
|
+
},
|
|
3457
|
+
package: {
|
|
3458
|
+
$schema: {
|
|
3459
|
+
title: "Cargo.toml Path",
|
|
3460
|
+
type: "string",
|
|
3461
|
+
format: "path",
|
|
3462
|
+
description: "The path to the Cargo.toml file"
|
|
3463
|
+
},
|
|
3464
|
+
$default: "{projectRoot}/Cargo.toml"
|
|
3465
|
+
},
|
|
3466
|
+
toolchain: {
|
|
3467
|
+
$schema: {
|
|
3468
|
+
title: "Toolchain",
|
|
3469
|
+
description: "The type of toolchain to use for the build",
|
|
3470
|
+
enum: [
|
|
3471
|
+
"stable",
|
|
3472
|
+
"beta",
|
|
3473
|
+
"nightly"
|
|
3474
|
+
],
|
|
3475
|
+
default: "stable"
|
|
3476
|
+
},
|
|
3477
|
+
$default: "stable"
|
|
3478
|
+
},
|
|
3479
|
+
target: {
|
|
3480
|
+
$schema: {
|
|
3481
|
+
title: "Target",
|
|
3482
|
+
type: "string",
|
|
3483
|
+
description: "The target to build"
|
|
3484
|
+
}
|
|
3485
|
+
},
|
|
3486
|
+
allTargets: {
|
|
3487
|
+
$schema: {
|
|
3488
|
+
title: "All Targets",
|
|
3489
|
+
type: "boolean",
|
|
3490
|
+
description: "Build all targets"
|
|
3491
|
+
}
|
|
3492
|
+
},
|
|
3493
|
+
profile: {
|
|
3494
|
+
$schema: {
|
|
3495
|
+
title: "Profile",
|
|
3496
|
+
type: "string",
|
|
3497
|
+
description: "The profile to build"
|
|
3498
|
+
}
|
|
3499
|
+
},
|
|
3500
|
+
release: {
|
|
3501
|
+
$schema: {
|
|
3502
|
+
title: "Release",
|
|
3503
|
+
type: "boolean",
|
|
3504
|
+
description: "Build in release mode"
|
|
3505
|
+
}
|
|
3506
|
+
},
|
|
3507
|
+
features: {
|
|
3508
|
+
$schema: {
|
|
3509
|
+
title: "Features",
|
|
3510
|
+
type: "string",
|
|
3511
|
+
description: "The features to build",
|
|
3512
|
+
oneOf: [
|
|
3513
|
+
{
|
|
3514
|
+
type: "string"
|
|
3515
|
+
},
|
|
3516
|
+
{
|
|
3517
|
+
type: "array",
|
|
3518
|
+
items: {
|
|
3519
|
+
type: "string"
|
|
3520
|
+
}
|
|
3521
|
+
}
|
|
3522
|
+
]
|
|
3523
|
+
}
|
|
3524
|
+
},
|
|
3525
|
+
allFeatures: {
|
|
3526
|
+
$schema: {
|
|
3527
|
+
title: "All Features",
|
|
3528
|
+
type: "boolean",
|
|
3529
|
+
description: "Build all features"
|
|
3530
|
+
}
|
|
3531
|
+
}
|
|
3532
|
+
});
|
|
3533
|
+
|
|
3534
|
+
// ../workspace-tools/src/base/typescript-build-executor.untyped.ts
|
|
3535
|
+
|
|
3536
|
+
var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
3537
|
+
...base_executor_untyped_default,
|
|
3538
|
+
$schema: {
|
|
3539
|
+
id: "TypeScriptBuildExecutorSchema",
|
|
3540
|
+
title: "TypeScript Build Executor",
|
|
3541
|
+
description: "A type definition for the base TypeScript build executor schema",
|
|
3542
|
+
required: [
|
|
3543
|
+
"entry",
|
|
3544
|
+
"tsconfig"
|
|
3545
|
+
]
|
|
3546
|
+
},
|
|
3547
|
+
entry: {
|
|
3548
|
+
$schema: {
|
|
3549
|
+
title: "Entry File(s)",
|
|
3550
|
+
format: "path",
|
|
3551
|
+
type: "array",
|
|
3552
|
+
description: "The entry file or files to build",
|
|
3553
|
+
items: {
|
|
3554
|
+
type: "string"
|
|
3555
|
+
}
|
|
3556
|
+
},
|
|
3557
|
+
$default: [
|
|
3558
|
+
"{sourceRoot}/index.ts"
|
|
3559
|
+
]
|
|
3560
|
+
},
|
|
3561
|
+
tsconfig: {
|
|
3562
|
+
$schema: {
|
|
3563
|
+
title: "TSConfig Path",
|
|
3564
|
+
type: "string",
|
|
3565
|
+
format: "path",
|
|
3566
|
+
description: "The path to the tsconfig file"
|
|
3567
|
+
},
|
|
3568
|
+
$default: "{projectRoot}/tsconfig.json"
|
|
3569
|
+
},
|
|
3570
|
+
bundle: {
|
|
3571
|
+
$schema: {
|
|
3572
|
+
title: "Bundle",
|
|
3573
|
+
type: "boolean",
|
|
3574
|
+
description: "Bundle the output"
|
|
3575
|
+
},
|
|
3576
|
+
$default: false
|
|
3577
|
+
},
|
|
3578
|
+
minify: {
|
|
3579
|
+
$schema: {
|
|
3580
|
+
title: "Minify",
|
|
3581
|
+
type: "boolean",
|
|
3582
|
+
description: "Minify the output"
|
|
3583
|
+
},
|
|
3584
|
+
$default: false
|
|
3585
|
+
},
|
|
3586
|
+
debug: {
|
|
3587
|
+
$schema: {
|
|
3588
|
+
title: "Debug",
|
|
3589
|
+
type: "boolean",
|
|
3590
|
+
description: "Debug the output"
|
|
3591
|
+
},
|
|
3592
|
+
$default: false
|
|
3593
|
+
},
|
|
3594
|
+
sourcemap: {
|
|
3595
|
+
$schema: {
|
|
3596
|
+
title: "Sourcemap",
|
|
3597
|
+
type: "boolean",
|
|
3598
|
+
description: "Generate a sourcemap"
|
|
3599
|
+
},
|
|
3600
|
+
$default: false
|
|
3601
|
+
},
|
|
3602
|
+
silent: {
|
|
3603
|
+
$schema: {
|
|
3604
|
+
title: "Silent",
|
|
3605
|
+
type: "boolean",
|
|
3606
|
+
description: "Should the build run silently - only report errors back to the user"
|
|
3607
|
+
},
|
|
3608
|
+
$default: false
|
|
3609
|
+
},
|
|
3610
|
+
target: {
|
|
3611
|
+
$schema: {
|
|
3612
|
+
title: "Target",
|
|
3613
|
+
type: "string",
|
|
3614
|
+
description: "The target to build",
|
|
3615
|
+
enum: [
|
|
3616
|
+
"es3",
|
|
3617
|
+
"es5",
|
|
3618
|
+
"es6",
|
|
3619
|
+
"es2015",
|
|
3620
|
+
"es2016",
|
|
3621
|
+
"es2017",
|
|
3622
|
+
"es2018",
|
|
3623
|
+
"es2019",
|
|
3624
|
+
"es2020",
|
|
3625
|
+
"es2021",
|
|
3626
|
+
"es2022",
|
|
3627
|
+
"es2023",
|
|
3628
|
+
"es2024",
|
|
3629
|
+
"esnext",
|
|
3630
|
+
"node12",
|
|
3631
|
+
"node14",
|
|
3632
|
+
"node16",
|
|
3633
|
+
"node18",
|
|
3634
|
+
"node20",
|
|
3635
|
+
"node22",
|
|
3636
|
+
"browser",
|
|
3637
|
+
"chrome58",
|
|
3638
|
+
"chrome59",
|
|
3639
|
+
"chrome60"
|
|
3640
|
+
]
|
|
3641
|
+
},
|
|
3642
|
+
$default: "esnext",
|
|
3643
|
+
$resolve: /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (val = "esnext") => val.toLowerCase(), "$resolve")
|
|
3644
|
+
},
|
|
3645
|
+
format: {
|
|
3646
|
+
$schema: {
|
|
3647
|
+
title: "Format",
|
|
3648
|
+
type: "array",
|
|
3649
|
+
description: "The format to build",
|
|
3650
|
+
items: {
|
|
3651
|
+
type: "string",
|
|
3652
|
+
enum: [
|
|
3653
|
+
"cjs",
|
|
3654
|
+
"esm",
|
|
3655
|
+
"iife"
|
|
3656
|
+
]
|
|
3657
|
+
}
|
|
3658
|
+
},
|
|
3659
|
+
$resolve: /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (val = [
|
|
3660
|
+
"cjs",
|
|
3661
|
+
"esm"
|
|
3662
|
+
]) => [].concat(val), "$resolve")
|
|
3663
|
+
},
|
|
3664
|
+
platform: {
|
|
3665
|
+
$schema: {
|
|
3666
|
+
title: "Platform",
|
|
3667
|
+
type: "string",
|
|
3668
|
+
description: "The platform to build",
|
|
3669
|
+
enum: [
|
|
3670
|
+
"neutral",
|
|
3671
|
+
"node",
|
|
3672
|
+
"browser"
|
|
3673
|
+
]
|
|
3674
|
+
},
|
|
3675
|
+
$default: "neutral"
|
|
3676
|
+
},
|
|
3677
|
+
external: {
|
|
3678
|
+
$schema: {
|
|
3679
|
+
title: "External",
|
|
3680
|
+
type: "array",
|
|
3681
|
+
description: "The external dependencies"
|
|
3682
|
+
},
|
|
3683
|
+
$resolve: /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (val = []) => [].concat(val), "$resolve")
|
|
3684
|
+
},
|
|
3685
|
+
define: {
|
|
3686
|
+
$schema: {
|
|
3687
|
+
title: "Define",
|
|
3688
|
+
type: "object",
|
|
3689
|
+
tsType: "Record<string, string>",
|
|
3690
|
+
description: "The define values"
|
|
3691
|
+
},
|
|
3692
|
+
$resolve: /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (val = {}) => val, "$resolve"),
|
|
3693
|
+
$default: {}
|
|
3694
|
+
},
|
|
3695
|
+
env: {
|
|
3696
|
+
$schema: {
|
|
3697
|
+
title: "Environment Variables",
|
|
3698
|
+
type: "object",
|
|
3699
|
+
tsType: "Record<string, string>",
|
|
3700
|
+
description: "The environment variable values"
|
|
3701
|
+
},
|
|
3702
|
+
$resolve: /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (val = {}) => val, "$resolve"),
|
|
3703
|
+
$default: {}
|
|
3704
|
+
}
|
|
3705
|
+
});
|
|
3706
|
+
|
|
3707
|
+
// ../workspace-tools/src/base/typescript-library-generator.untyped.ts
|
|
3708
|
+
|
|
3709
|
+
var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.call(void 0, {
|
|
3710
|
+
...base_generator_untyped_default,
|
|
3711
|
+
$schema: {
|
|
3712
|
+
id: "TypeScriptLibraryGeneratorSchema",
|
|
3713
|
+
title: "TypeScript Library Generator",
|
|
3714
|
+
description: "A type definition for the base TypeScript Library Generator schema",
|
|
3715
|
+
required: [
|
|
3716
|
+
"directory",
|
|
3717
|
+
"name"
|
|
3718
|
+
]
|
|
3719
|
+
},
|
|
3720
|
+
name: {
|
|
3721
|
+
$schema: {
|
|
3722
|
+
title: "Name",
|
|
3723
|
+
type: "string",
|
|
3724
|
+
description: "The name of the library"
|
|
3725
|
+
}
|
|
3726
|
+
},
|
|
3727
|
+
description: {
|
|
3728
|
+
$schema: {
|
|
3729
|
+
title: "Description",
|
|
3730
|
+
type: "string",
|
|
3731
|
+
description: "The description of the library"
|
|
3732
|
+
}
|
|
3733
|
+
},
|
|
3734
|
+
buildExecutor: {
|
|
3735
|
+
$schema: {
|
|
3736
|
+
title: "Build Executor",
|
|
3737
|
+
type: "string",
|
|
3738
|
+
description: "The executor to use for building the library"
|
|
3739
|
+
},
|
|
3740
|
+
$default: "@storm-software/workspace-tools:unbuild"
|
|
3741
|
+
},
|
|
3742
|
+
platform: {
|
|
3743
|
+
$schema: {
|
|
3744
|
+
title: "Platform",
|
|
3745
|
+
type: "string",
|
|
3746
|
+
description: "The platform to target with the library",
|
|
3747
|
+
enum: [
|
|
3748
|
+
"neutral",
|
|
3749
|
+
"node",
|
|
3750
|
+
"browser"
|
|
3751
|
+
]
|
|
3752
|
+
},
|
|
3753
|
+
$default: "neutral"
|
|
3754
|
+
},
|
|
3755
|
+
devDependencies: {
|
|
3756
|
+
$schema: {
|
|
3757
|
+
title: "Dev Dependencies",
|
|
3758
|
+
type: "object",
|
|
3759
|
+
description: "The dev dependencies to install"
|
|
3760
|
+
}
|
|
3761
|
+
},
|
|
3762
|
+
dependencies: {
|
|
3763
|
+
$schema: {
|
|
3764
|
+
title: "Dependencies",
|
|
3765
|
+
type: "object",
|
|
3766
|
+
description: "The dependencies to install"
|
|
3767
|
+
}
|
|
3768
|
+
},
|
|
3769
|
+
peerDependencies: {
|
|
3770
|
+
$schema: {
|
|
3771
|
+
title: "Peer Dependencies",
|
|
3772
|
+
type: "object",
|
|
3773
|
+
description: "The peer dependencies to install"
|
|
3774
|
+
}
|
|
3775
|
+
},
|
|
3776
|
+
peerDependenciesMeta: {
|
|
3777
|
+
$schema: {
|
|
3778
|
+
title: "Peer Dependencies Meta",
|
|
3779
|
+
type: "object",
|
|
3780
|
+
description: "The peer dependencies meta"
|
|
3781
|
+
}
|
|
3782
|
+
},
|
|
3783
|
+
tags: {
|
|
3784
|
+
$schema: {
|
|
3785
|
+
title: "Tags",
|
|
3786
|
+
type: "string",
|
|
3787
|
+
description: "The tags for the library"
|
|
3788
|
+
}
|
|
3789
|
+
},
|
|
3790
|
+
tsconfigOptions: {
|
|
3791
|
+
$schema: {
|
|
3792
|
+
title: "TypeScript Config (tsconfig.json) Options",
|
|
3793
|
+
type: "object",
|
|
3794
|
+
description: "The TypeScript configuration options"
|
|
3795
|
+
}
|
|
3796
|
+
},
|
|
3797
|
+
skipFormat: {
|
|
3798
|
+
$schema: {
|
|
3799
|
+
title: "Skip Format",
|
|
3800
|
+
type: "boolean",
|
|
3801
|
+
description: "Skip formatting"
|
|
3802
|
+
}
|
|
3803
|
+
},
|
|
3804
|
+
skipTsConfig: {
|
|
3805
|
+
$schema: {
|
|
3806
|
+
title: "Skip TsConfig",
|
|
3807
|
+
type: "boolean",
|
|
3808
|
+
description: "Skip TypeScript configuration"
|
|
3809
|
+
}
|
|
3810
|
+
},
|
|
3811
|
+
skipPackageJson: {
|
|
3812
|
+
$schema: {
|
|
3813
|
+
title: "Skip Package Json",
|
|
3814
|
+
type: "boolean",
|
|
3815
|
+
description: "Skip package.json"
|
|
3816
|
+
}
|
|
3817
|
+
},
|
|
3818
|
+
includeBabelRc: {
|
|
3819
|
+
$schema: {
|
|
3820
|
+
title: "Include Babel Rc",
|
|
3821
|
+
type: "boolean",
|
|
3822
|
+
description: "Include Babel configuration"
|
|
3823
|
+
}
|
|
3824
|
+
},
|
|
3825
|
+
unitTestRunner: {
|
|
3826
|
+
$schema: {
|
|
3827
|
+
title: "Unit Test Runner",
|
|
3828
|
+
type: "string",
|
|
3829
|
+
enum: [
|
|
3830
|
+
"jest",
|
|
3831
|
+
"vitest",
|
|
3832
|
+
"none"
|
|
3833
|
+
],
|
|
3834
|
+
description: "The unit test runner to use"
|
|
3835
|
+
}
|
|
3836
|
+
},
|
|
3837
|
+
linter: {
|
|
3838
|
+
$schema: {
|
|
3839
|
+
title: "Linter",
|
|
3840
|
+
type: "string",
|
|
3841
|
+
description: "The linter to use"
|
|
3842
|
+
}
|
|
3843
|
+
},
|
|
3844
|
+
testEnvironment: {
|
|
3845
|
+
$schema: {
|
|
3846
|
+
title: "Test Environment",
|
|
3847
|
+
type: "string",
|
|
3848
|
+
enum: [
|
|
3849
|
+
"jsdom",
|
|
3850
|
+
"node"
|
|
3851
|
+
],
|
|
3852
|
+
description: "The test environment to use"
|
|
3853
|
+
}
|
|
3854
|
+
},
|
|
3855
|
+
importPath: {
|
|
3856
|
+
$schema: {
|
|
3857
|
+
title: "Import Path",
|
|
3858
|
+
type: "string",
|
|
3859
|
+
description: "The import path for the library"
|
|
3860
|
+
}
|
|
3861
|
+
},
|
|
3862
|
+
js: {
|
|
3863
|
+
$schema: {
|
|
3864
|
+
title: "JavaScript",
|
|
3865
|
+
type: "boolean",
|
|
3866
|
+
description: "Use JavaScript instead of TypeScript"
|
|
3867
|
+
}
|
|
3868
|
+
},
|
|
3869
|
+
pascalCaseFiles: {
|
|
3870
|
+
$schema: {
|
|
3871
|
+
title: "Pascal Case Files",
|
|
3872
|
+
type: "boolean",
|
|
3873
|
+
description: "Use PascalCase for file names"
|
|
3874
|
+
}
|
|
3875
|
+
},
|
|
3876
|
+
strict: {
|
|
3877
|
+
$schema: {
|
|
3878
|
+
title: "Strict",
|
|
3879
|
+
type: "boolean",
|
|
3880
|
+
description: "Enable strict mode"
|
|
3881
|
+
}
|
|
3882
|
+
},
|
|
3883
|
+
publishable: {
|
|
3884
|
+
$schema: {
|
|
3885
|
+
title: "Publishable",
|
|
3886
|
+
type: "boolean",
|
|
3887
|
+
description: "Make the library publishable"
|
|
3888
|
+
}
|
|
3889
|
+
},
|
|
3890
|
+
buildable: {
|
|
3891
|
+
$schema: {
|
|
3892
|
+
title: "Buildable",
|
|
3893
|
+
type: "boolean",
|
|
3894
|
+
description: "Make the library buildable"
|
|
3895
|
+
}
|
|
3896
|
+
},
|
|
3897
|
+
setParserOptionsProject: {
|
|
3898
|
+
$schema: {
|
|
3899
|
+
title: "Set Parser Options Project",
|
|
3900
|
+
type: "boolean",
|
|
3901
|
+
description: "Set parser options project"
|
|
3902
|
+
}
|
|
3903
|
+
},
|
|
3904
|
+
config: {
|
|
3905
|
+
$schema: {
|
|
3906
|
+
title: "Config",
|
|
3907
|
+
type: "string",
|
|
3908
|
+
enum: [
|
|
3909
|
+
"workspace",
|
|
3910
|
+
"project",
|
|
3911
|
+
"npm-scripts"
|
|
3912
|
+
],
|
|
3913
|
+
description: "The configuration type"
|
|
3914
|
+
}
|
|
3915
|
+
},
|
|
3916
|
+
compiler: {
|
|
3917
|
+
$schema: {
|
|
3918
|
+
title: "Compiler",
|
|
3919
|
+
type: "string",
|
|
3920
|
+
description: "The compiler to use"
|
|
3921
|
+
}
|
|
3922
|
+
},
|
|
3923
|
+
bundler: {
|
|
3924
|
+
$schema: {
|
|
3925
|
+
title: "Bundler",
|
|
3926
|
+
type: "string",
|
|
3927
|
+
description: "The bundler to use"
|
|
3928
|
+
}
|
|
3929
|
+
},
|
|
3930
|
+
skipTypeCheck: {
|
|
3931
|
+
$schema: {
|
|
3932
|
+
title: "Skip Type Check",
|
|
3933
|
+
type: "boolean",
|
|
3934
|
+
description: "Skip type checking"
|
|
3935
|
+
}
|
|
3936
|
+
},
|
|
3937
|
+
minimal: {
|
|
3938
|
+
$schema: {
|
|
3939
|
+
title: "Minimal",
|
|
3940
|
+
type: "boolean",
|
|
3941
|
+
description: "Create a minimal library"
|
|
3942
|
+
}
|
|
3943
|
+
},
|
|
3944
|
+
rootProject: {
|
|
3945
|
+
$schema: {
|
|
3946
|
+
title: "Root Project",
|
|
3947
|
+
type: "boolean",
|
|
3948
|
+
description: "Create a root project"
|
|
3949
|
+
}
|
|
3950
|
+
},
|
|
3951
|
+
simpleName: {
|
|
3952
|
+
$schema: {
|
|
3953
|
+
title: "Simple Name",
|
|
3954
|
+
type: "boolean",
|
|
3955
|
+
description: "Use a simple name for the library"
|
|
3956
|
+
}
|
|
3957
|
+
},
|
|
3958
|
+
addPlugin: {
|
|
3959
|
+
$schema: {
|
|
3960
|
+
title: "Add Plugin",
|
|
3961
|
+
type: "boolean",
|
|
3962
|
+
description: "Add a plugin to the library"
|
|
3963
|
+
}
|
|
3964
|
+
},
|
|
3965
|
+
useProjectJson: {
|
|
3966
|
+
$schema: {
|
|
3967
|
+
title: "Use Project Json",
|
|
3968
|
+
type: "boolean",
|
|
3969
|
+
description: "Use project.json"
|
|
3970
|
+
}
|
|
3971
|
+
},
|
|
3972
|
+
skipWorkspacesWarning: {
|
|
3973
|
+
$schema: {
|
|
3974
|
+
title: "Skip Workspaces Warning",
|
|
3975
|
+
type: "boolean",
|
|
3976
|
+
description: "Skip workspaces warning"
|
|
3977
|
+
}
|
|
3978
|
+
},
|
|
3979
|
+
useTscExecutor: {
|
|
3980
|
+
$schema: {
|
|
3981
|
+
title: "Use Tsc Executor",
|
|
3982
|
+
type: "boolean",
|
|
3983
|
+
description: "Use TSC executor"
|
|
3984
|
+
}
|
|
3985
|
+
}
|
|
3986
|
+
});
|
|
3987
|
+
|
|
3443
3988
|
// ../workspace-tools/src/utils/get-project-configurations.ts
|
|
3444
3989
|
var _retrieveworkspacefiles = require('nx/src/project-graph/utils/retrieve-workspace-files');
|
|
3445
3990
|
|