@storm-software/cloudflare-tools 0.54.2 → 0.54.3
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 +6 -0
- package/README.md +1 -1
- package/dist/{chunk-KVL4WOIH.mjs → chunk-23YXGFBU.mjs} +1 -1
- package/dist/{chunk-UJORUWGK.mjs → chunk-2XNO3U7C.mjs} +5 -5
- package/dist/{chunk-H63GI4CR.js → chunk-BM5BCBD5.js} +3 -3
- package/dist/{chunk-CU5DCV52.mjs → chunk-CXOUHOZ7.mjs} +9 -9
- package/dist/{chunk-THKJZT32.js → chunk-DFG3KJWS.js} +119 -70
- package/dist/{chunk-6H63LE3D.mjs → chunk-DQHMNZ47.mjs} +88 -39
- package/dist/{chunk-6OLSW63F.mjs → chunk-EZCE5VIE.mjs} +1 -1
- package/dist/{chunk-W6YNIJQD.js → chunk-ILLCSSWN.js} +20 -17
- package/dist/{chunk-3D3WO4IH.mjs → chunk-IXEWBCGZ.mjs} +17 -14
- package/dist/{chunk-ZPVFJJMY.js → chunk-LOFONHDQ.js} +12 -12
- package/dist/{chunk-H43VNU3H.js → chunk-LW7DSVEL.js} +159 -159
- package/dist/{chunk-U6QKP7CG.js → chunk-LXXVBXFM.js} +16 -16
- package/dist/{chunk-WL2BHAOY.js → chunk-NVFBJS7C.js} +1 -1
- package/dist/{chunk-BGWUN6JU.mjs → chunk-XIDK2YZE.mjs} +5 -5
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +5 -5
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/src/executors/cloudflare-publish/executor.js +3 -3
- package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
- package/dist/src/executors/r2-upload-publish/executor.js +5 -5
- package/dist/src/executors/r2-upload-publish/executor.mjs +4 -4
- package/dist/src/executors/serve/executor.d.mts +3 -3
- package/dist/src/executors/serve/executor.d.ts +3 -3
- package/dist/src/executors/serve/executor.js +4 -4
- package/dist/src/executors/serve/executor.mjs +3 -3
- 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 +5 -5
- package/dist/src/generators/worker/generator.mjs +4 -4
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.mjs +2 -2
- package/dist/src/utils/r2-bucket-helpers.js +3 -3
- package/dist/src/utils/r2-bucket-helpers.mjs +2 -2
- 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 _chunkDFG3KJWSjs = require('./chunk-DFG3KJWS.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -20,7 +20,7 @@ var _chunkTHKJZT32js = require('./chunk-THKJZT32.js');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkILLCSSWNjs = require('./chunk-ILLCSSWN.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -53,7 +53,7 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
if (result.includes("{workspaceRoot}")) {
|
|
56
|
-
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => (
|
|
56
|
+
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => ( _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, ))));
|
|
57
57
|
}
|
|
58
58
|
return result;
|
|
59
59
|
}, "applyWorkspaceBaseTokens");
|
|
@@ -101,37 +101,37 @@ var run = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (config, command,
|
|
|
101
101
|
// ../workspace-tools/src/base/base-executor.ts
|
|
102
102
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
103
103
|
var withRunExecutor = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (name, executorFn, executorOptions = {}) => async (_options, context2) => {
|
|
104
|
-
const stopwatch =
|
|
104
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, name);
|
|
105
105
|
let options = _options;
|
|
106
106
|
let config = {};
|
|
107
107
|
try {
|
|
108
108
|
if (!_optionalChain([context2, 'access', _5 => _5.projectsConfigurations, 'optionalAccess', _6 => _6.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
109
109
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
110
110
|
}
|
|
111
|
-
const workspaceRoot3 =
|
|
111
|
+
const workspaceRoot3 = _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, );
|
|
112
112
|
const projectRoot = context2.projectsConfigurations.projects[context2.projectName].root || workspaceRoot3;
|
|
113
113
|
const sourceRoot = context2.projectsConfigurations.projects[context2.projectName].sourceRoot || projectRoot || workspaceRoot3;
|
|
114
114
|
const projectName = context2.projectName;
|
|
115
115
|
config.workspaceRoot = workspaceRoot3;
|
|
116
|
-
|
|
116
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, `
|
|
117
117
|
\u26A1 Running the ${name} executor for ${projectName}
|
|
118
118
|
`, config);
|
|
119
119
|
if (!executorOptions.skipReadingConfig) {
|
|
120
|
-
|
|
120
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
121
121
|
- workspaceRoot: ${workspaceRoot3}
|
|
122
122
|
- projectRoot: ${projectRoot}
|
|
123
123
|
- sourceRoot: ${sourceRoot}
|
|
124
124
|
- projectName: ${projectName}
|
|
125
125
|
`, config);
|
|
126
|
-
config = await
|
|
126
|
+
config = await _chunkDFG3KJWSjs.getConfig.call(void 0, workspaceRoot3);
|
|
127
127
|
}
|
|
128
128
|
if (_optionalChain([executorOptions, 'optionalAccess', _7 => _7.hooks, 'optionalAccess', _8 => _8.applyDefaultOptions])) {
|
|
129
|
-
|
|
129
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
130
130
|
options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
|
|
131
|
-
|
|
131
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
132
132
|
}
|
|
133
|
-
|
|
134
|
-
${
|
|
133
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `Executor schema options \u2699\uFE0F
|
|
134
|
+
${_chunkILLCSSWNjs.formatLogMessage.call(void 0, options)}
|
|
135
135
|
`, config);
|
|
136
136
|
const tokenized = await applyWorkspaceTokens(options, _defu.defu.call(void 0, {
|
|
137
137
|
workspaceRoot: workspaceRoot3,
|
|
@@ -140,13 +140,13 @@ ${_chunkW6YNIJQDjs.formatLogMessage.call(void 0, options)}
|
|
|
140
140
|
projectName,
|
|
141
141
|
config
|
|
142
142
|
}, config, context2.projectsConfigurations.projects[context2.projectName]), applyWorkspaceProjectTokens);
|
|
143
|
-
|
|
144
|
-
${
|
|
143
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `Executor schema tokenized options \u2699\uFE0F
|
|
144
|
+
${_chunkILLCSSWNjs.formatLogMessage.call(void 0, tokenized)}
|
|
145
145
|
`, config);
|
|
146
146
|
if (_optionalChain([executorOptions, 'optionalAccess', _9 => _9.hooks, 'optionalAccess', _10 => _10.preProcess])) {
|
|
147
|
-
|
|
147
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
148
148
|
await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
|
|
149
|
-
|
|
149
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
150
150
|
}
|
|
151
151
|
const ret = executorFn(tokenized, context2, config);
|
|
152
152
|
if (_isFunction(_optionalChain([ret, 'optionalAccess', _11 => _11.next]))) {
|
|
@@ -156,26 +156,26 @@ ${_chunkW6YNIJQDjs.formatLogMessage.call(void 0, tokenized)}
|
|
|
156
156
|
}
|
|
157
157
|
const result = await Promise.resolve(ret);
|
|
158
158
|
if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _12 => _12.error, 'optionalAccess', _13 => _13.message]) && typeof _optionalChain([result, 'optionalAccess', _14 => _14.error, 'optionalAccess', _15 => _15.message]) === "string" && _optionalChain([result, 'optionalAccess', _16 => _16.error, 'optionalAccess', _17 => _17.name]) && typeof _optionalChain([result, 'optionalAccess', _18 => _18.error, 'optionalAccess', _19 => _19.name]) === "string")) {
|
|
159
|
-
|
|
160
|
-
${
|
|
159
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `Failure determined by the ${name} executor
|
|
160
|
+
${_chunkILLCSSWNjs.formatLogMessage.call(void 0, result)}`, config);
|
|
161
161
|
console.error(result);
|
|
162
162
|
throw new Error(`The ${name} executor failed to run`, {
|
|
163
163
|
cause: _optionalChain([result, 'optionalAccess', _20 => _20.error])
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
if (_optionalChain([executorOptions, 'optionalAccess', _21 => _21.hooks, 'optionalAccess', _22 => _22.postProcess])) {
|
|
167
|
-
|
|
167
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
168
168
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
169
|
-
|
|
169
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, `Completed running the ${name} task executor!
|
|
172
172
|
`, config);
|
|
173
173
|
return {
|
|
174
174
|
success: true
|
|
175
175
|
};
|
|
176
176
|
} catch (error) {
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
_chunkILLCSSWNjs.writeFatal.call(void 0, "A fatal error occurred while running the executor - the process was forced to terminate", config);
|
|
178
|
+
_chunkILLCSSWNjs.writeError.call(void 0, `An exception was thrown in the executor's process
|
|
179
179
|
- Details: ${error.message}
|
|
180
180
|
- Stacktrace: ${error.stack}`, config);
|
|
181
181
|
return {
|
|
@@ -460,10 +460,10 @@ var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(
|
|
|
460
460
|
var readNxConfig = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (workspaceRoot3) => {
|
|
461
461
|
let rootDir = workspaceRoot3;
|
|
462
462
|
if (!rootDir) {
|
|
463
|
-
const config = await
|
|
463
|
+
const config = await _chunkDFG3KJWSjs.getConfig.call(void 0, );
|
|
464
464
|
rootDir = config.workspaceRoot;
|
|
465
465
|
}
|
|
466
|
-
const nxJsonPath =
|
|
466
|
+
const nxJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, rootDir, "nx.json");
|
|
467
467
|
if (!_fs.existsSync.call(void 0, nxJsonPath)) {
|
|
468
468
|
throw new Error("Cannot find project.json configuration");
|
|
469
469
|
}
|
|
@@ -475,7 +475,7 @@ var readNxConfig = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (w
|
|
|
475
475
|
var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
|
|
476
476
|
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
477
477
|
pendingAssets.push({
|
|
478
|
-
input: projectRoot,
|
|
478
|
+
input: _chunkILLCSSWNjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot),
|
|
479
479
|
glob: "*.md",
|
|
480
480
|
output: "."
|
|
481
481
|
});
|
|
@@ -506,10 +506,10 @@ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (con
|
|
|
506
506
|
}
|
|
507
507
|
const buildTarget = _optionalChain([projectsConfigurations, 'access', _31 => _31.projects, 'access', _32 => _32[projectName], 'access', _33 => _33.targets, 'optionalAccess', _34 => _34.build]);
|
|
508
508
|
if (!buildTarget) {
|
|
509
|
-
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 ${
|
|
509
|
+
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 ${_chunkILLCSSWNjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
|
|
510
510
|
}
|
|
511
|
-
|
|
512
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
511
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
512
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkILLCSSWNjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
513
513
|
const result = await _js.copyAssets.call(void 0, {
|
|
514
514
|
assets: pendingAssets,
|
|
515
515
|
watch: false,
|
|
@@ -523,18 +523,18 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
523
523
|
projectsConfigurations,
|
|
524
524
|
nxJsonConfiguration: nxJson,
|
|
525
525
|
cwd: config.workspaceRoot,
|
|
526
|
-
isVerbose:
|
|
526
|
+
isVerbose: _chunkILLCSSWNjs.isVerbose.call(void 0, config.logLevel)
|
|
527
527
|
});
|
|
528
528
|
if (!result.success) {
|
|
529
529
|
throw new Error("The Build process failed trying to copy assets");
|
|
530
530
|
}
|
|
531
531
|
if (includeSrc === true) {
|
|
532
|
-
|
|
532
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkILLCSSWNjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
533
533
|
const files = await _glob.glob.call(void 0, [
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
534
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
535
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
536
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
537
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
538
538
|
]);
|
|
539
539
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
540
540
|
|
|
@@ -556,7 +556,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
556
556
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot3)) {
|
|
557
557
|
const projectNode = project.node;
|
|
558
558
|
if (projectNode.data.root) {
|
|
559
|
-
const projectPackageJsonPath =
|
|
559
|
+
const projectPackageJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
|
|
560
560
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
561
561
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
562
562
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -567,7 +567,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
if (localPackages.length > 0) {
|
|
570
|
-
|
|
570
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
571
571
|
packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
|
|
572
572
|
if (!ret[localPackage.name]) {
|
|
573
573
|
ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
|
|
@@ -589,13 +589,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
589
589
|
return ret;
|
|
590
590
|
}, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
|
|
591
591
|
} else {
|
|
592
|
-
|
|
592
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
593
593
|
}
|
|
594
594
|
return packageJson;
|
|
595
595
|
}, "addPackageDependencies");
|
|
596
596
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
597
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
598
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
597
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, );
|
|
598
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
599
599
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
600
600
|
packageJson.type ??= "module";
|
|
601
601
|
packageJson.sideEffects ??= false;
|
|
@@ -604,7 +604,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call
|
|
|
604
604
|
if (distSrc.startsWith("/")) {
|
|
605
605
|
distSrc = distSrc.substring(1);
|
|
606
606
|
}
|
|
607
|
-
packageJson.source ??= `${
|
|
607
|
+
packageJson.source ??= `${_chunkILLCSSWNjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
608
608
|
}
|
|
609
609
|
packageJson.files ??= [
|
|
610
610
|
"dist/**/*"
|
|
@@ -635,7 +635,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call
|
|
|
635
635
|
];
|
|
636
636
|
}
|
|
637
637
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
638
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
638
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkILLCSSWNjs.joinPaths.call(void 0, "packages", projectName);
|
|
639
639
|
return packageJson;
|
|
640
640
|
}, "addWorkspacePackageJsonFields");
|
|
641
641
|
var addPackageJsonExport = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
@@ -662,7 +662,7 @@ var addPackageJsonExport = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0,
|
|
|
662
662
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
663
663
|
|
|
664
664
|
var getEntryPoints = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
665
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
665
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, );
|
|
666
666
|
const entryPoints = [];
|
|
667
667
|
if (entry) {
|
|
668
668
|
if (Array.isArray(entry)) {
|
|
@@ -674,7 +674,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
if (emitOnAll) {
|
|
677
|
-
entryPoints.push(
|
|
677
|
+
entryPoints.push(_chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
678
678
|
}
|
|
679
679
|
const results = [];
|
|
680
680
|
for (const entryPoint in entryPoints) {
|
|
@@ -683,9 +683,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
683
683
|
withFileTypes: true
|
|
684
684
|
});
|
|
685
685
|
results.push(...files.reduce((ret, filePath) => {
|
|
686
|
-
const result =
|
|
686
|
+
const result = _chunkILLCSSWNjs.correctPaths.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkILLCSSWNjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkILLCSSWNjs.correctPaths.call(void 0, projectRoot), ""));
|
|
687
687
|
if (result) {
|
|
688
|
-
|
|
688
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkILLCSSWNjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
689
689
|
if (!results.includes(result)) {
|
|
690
690
|
results.push(result);
|
|
691
691
|
}
|
|
@@ -891,8 +891,8 @@ var RendererEngine = class {
|
|
|
891
891
|
// ../esbuild/src/clean.ts
|
|
892
892
|
|
|
893
893
|
async function clean(name = "ESBuild", directory, config) {
|
|
894
|
-
|
|
895
|
-
const stopwatch =
|
|
894
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
895
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
896
896
|
await _node.hfs.deleteAll(directory);
|
|
897
897
|
stopwatch();
|
|
898
898
|
}
|
|
@@ -1013,7 +1013,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (option
|
|
|
1013
1013
|
setup(build5) {
|
|
1014
1014
|
build5.onEnd((result) => {
|
|
1015
1015
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
1016
|
-
|
|
1016
|
+
_chunkILLCSSWNjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
1017
1017
|
${result.errors.map((error) => error.text).join("\n")}
|
|
1018
1018
|
|
|
1019
1019
|
`, resolvedOptions.config);
|
|
@@ -1048,7 +1048,7 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
|
1048
1048
|
var resolvePathsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
1049
1049
|
name: "storm:resolve-paths",
|
|
1050
1050
|
setup(build5) {
|
|
1051
|
-
const parentTsConfig = build5.initialOptions.tsconfig ? _chunkJ5SB6L2Ljs.__require.call(void 0,
|
|
1051
|
+
const parentTsConfig = build5.initialOptions.tsconfig ? _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build5.initialOptions.tsconfig)) : _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
1052
1052
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
1053
1053
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
1054
1054
|
build5.onResolve({
|
|
@@ -1071,7 +1071,7 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (o
|
|
|
1071
1071
|
|
|
1072
1072
|
var _apiextractor = require('@microsoft/api-extractor');
|
|
1073
1073
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
1074
|
-
const { dependencies, peerDependencies, devDependencies } = _chunkJ5SB6L2Ljs.__require.call(void 0,
|
|
1074
|
+
const { dependencies, peerDependencies, devDependencies } = _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
1075
1075
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
1076
1076
|
p,
|
|
1077
1077
|
getTypeDependencyPackageName(p)
|
|
@@ -1107,13 +1107,13 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
1107
1107
|
},
|
|
1108
1108
|
dtsRollup: {
|
|
1109
1109
|
enabled: true,
|
|
1110
|
-
untrimmedFilePath:
|
|
1110
|
+
untrimmedFilePath: _chunkILLCSSWNjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
1111
1111
|
},
|
|
1112
1112
|
tsdocMetadata: {
|
|
1113
1113
|
enabled: false
|
|
1114
1114
|
}
|
|
1115
1115
|
},
|
|
1116
|
-
packageJsonFullPath:
|
|
1116
|
+
packageJsonFullPath: _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
1117
1117
|
configObjectFullPath: void 0
|
|
1118
1118
|
});
|
|
1119
1119
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -1121,7 +1121,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
1121
1121
|
localBuild: true
|
|
1122
1122
|
});
|
|
1123
1123
|
if (extractorResult.succeeded === false) {
|
|
1124
|
-
|
|
1124
|
+
_chunkILLCSSWNjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
1125
1125
|
throw new Error("API Extractor completed with errors");
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
@@ -1140,12 +1140,12 @@ var tscPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, r
|
|
|
1140
1140
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
1141
1141
|
const typeOutDir = resolvedOptions.outdir;
|
|
1142
1142
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
1143
|
-
const bundlePath =
|
|
1143
|
+
const bundlePath = _chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
1144
1144
|
let dtsPath;
|
|
1145
|
-
if (await _node.hfs.isFile(
|
|
1146
|
-
dtsPath =
|
|
1147
|
-
} else if (await _node.hfs.isFile(
|
|
1148
|
-
dtsPath =
|
|
1145
|
+
if (await _node.hfs.isFile(_chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
1146
|
+
dtsPath = _chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
1147
|
+
} else if (await _node.hfs.isFile(_chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
1148
|
+
dtsPath = _chunkILLCSSWNjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
1149
1149
|
}
|
|
1150
1150
|
const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
1151
1151
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -1300,8 +1300,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (bund
|
|
|
1300
1300
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
1301
1301
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
1302
1302
|
});
|
|
1303
|
-
|
|
1304
|
-
|
|
1303
|
+
_chunkILLCSSWNjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
1304
|
+
_chunkILLCSSWNjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
1305
1305
|
if (filteredMissingDeps.length > 0) {
|
|
1306
1306
|
throw new Error(`Missing dependencies detected - please install them:
|
|
1307
1307
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1395,13 +1395,13 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1395
1395
|
if (!workspaceRoot3) {
|
|
1396
1396
|
throw new Error("Cannot find Nx workspace root");
|
|
1397
1397
|
}
|
|
1398
|
-
const config = await
|
|
1399
|
-
|
|
1400
|
-
const stopwatch =
|
|
1398
|
+
const config = await _chunkDFG3KJWSjs.getConfig.call(void 0, workspaceRoot3.dir);
|
|
1399
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1400
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1401
1401
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1402
1402
|
exitOnError: true
|
|
1403
1403
|
});
|
|
1404
|
-
const projectJsonPath =
|
|
1404
|
+
const projectJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1405
1405
|
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
1406
1406
|
throw new Error("Cannot find project.json configuration");
|
|
1407
1407
|
}
|
|
@@ -1414,7 +1414,7 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1414
1414
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
1415
1415
|
options.name ??= `${projectName}-${options.format}`;
|
|
1416
1416
|
options.target ??= DEFAULT_TARGET;
|
|
1417
|
-
const packageJsonPath =
|
|
1417
|
+
const packageJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1418
1418
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1419
1419
|
throw new Error("Cannot find package.json configuration");
|
|
1420
1420
|
}
|
|
@@ -1438,20 +1438,20 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1438
1438
|
".node"
|
|
1439
1439
|
],
|
|
1440
1440
|
...userOptions,
|
|
1441
|
-
tsconfig:
|
|
1441
|
+
tsconfig: _chunkILLCSSWNjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1442
1442
|
format: options.format || "cjs",
|
|
1443
1443
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1444
1444
|
"./src/index.ts"
|
|
1445
1445
|
], userOptions.emitOnAll),
|
|
1446
|
-
outdir: userOptions.outputPath ||
|
|
1446
|
+
outdir: userOptions.outputPath || _chunkILLCSSWNjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1447
1447
|
plugins: [],
|
|
1448
1448
|
name: userOptions.name || projectName,
|
|
1449
1449
|
projectConfigurations,
|
|
1450
1450
|
projectName,
|
|
1451
1451
|
projectGraph,
|
|
1452
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1452
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkILLCSSWNjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1453
1453
|
minify: userOptions.minify || !userOptions.debug,
|
|
1454
|
-
verbose: userOptions.verbose ||
|
|
1454
|
+
verbose: userOptions.verbose || _chunkILLCSSWNjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1455
1455
|
includeSrc: userOptions.includeSrc === true,
|
|
1456
1456
|
metafile: userOptions.metafile !== false,
|
|
1457
1457
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1487,8 +1487,8 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1487
1487
|
}, {})
|
|
1488
1488
|
},
|
|
1489
1489
|
inject: [
|
|
1490
|
-
options.format === "cjs" && options.injectShims ?
|
|
1491
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ?
|
|
1490
|
+
options.format === "cjs" && options.injectShims ? _chunkILLCSSWNjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
|
|
1491
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkILLCSSWNjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : "",
|
|
1492
1492
|
..._nullishCoalesce(options.inject, () => ( []))
|
|
1493
1493
|
].filter(Boolean)
|
|
1494
1494
|
};
|
|
@@ -1497,14 +1497,14 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1497
1497
|
return result;
|
|
1498
1498
|
}, "resolveOptions");
|
|
1499
1499
|
async function generatePackageJson(context2) {
|
|
1500
|
-
if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(
|
|
1501
|
-
|
|
1502
|
-
const stopwatch =
|
|
1503
|
-
const packageJsonPath =
|
|
1500
|
+
if (context2.options.generatePackageJson !== false && await _node.hfs.isFile(_chunkILLCSSWNjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
1501
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
1502
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1503
|
+
const packageJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
1504
1504
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1505
1505
|
throw new Error("Cannot find package.json configuration");
|
|
1506
1506
|
}
|
|
1507
|
-
let packageJson = await _node.hfs.json(
|
|
1507
|
+
let packageJson = await _node.hfs.json(_chunkILLCSSWNjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"));
|
|
1508
1508
|
if (!packageJson) {
|
|
1509
1509
|
throw new Error("Cannot find package.json configuration file");
|
|
1510
1510
|
}
|
|
@@ -1542,7 +1542,7 @@ async function generatePackageJson(context2) {
|
|
|
1542
1542
|
}
|
|
1543
1543
|
return ret;
|
|
1544
1544
|
}, packageJson.exports);
|
|
1545
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1545
|
+
await _devkit.writeJsonFile.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
|
|
1546
1546
|
stopwatch();
|
|
1547
1547
|
}
|
|
1548
1548
|
return context2;
|
|
@@ -1568,8 +1568,8 @@ async function generateContext(getOptions) {
|
|
|
1568
1568
|
}
|
|
1569
1569
|
_chunkJ5SB6L2Ljs.__name.call(void 0, generateContext, "generateContext");
|
|
1570
1570
|
async function executeEsBuild(context2) {
|
|
1571
|
-
|
|
1572
|
-
const stopwatch =
|
|
1571
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
1572
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
1573
1573
|
if (process.env.WATCH === "true") {
|
|
1574
1574
|
const ctx = await esbuild2.context(context2.options);
|
|
1575
1575
|
watch(ctx, context2.options);
|
|
@@ -1585,8 +1585,8 @@ async function executeEsBuild(context2) {
|
|
|
1585
1585
|
_chunkJ5SB6L2Ljs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
1586
1586
|
async function copyBuildAssets(context2) {
|
|
1587
1587
|
if (_optionalChain([context2, 'access', _59 => _59.result, 'optionalAccess', _60 => _60.errors, 'access', _61 => _61.length]) === 0) {
|
|
1588
|
-
|
|
1589
|
-
const stopwatch =
|
|
1588
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
1589
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1590
1590
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.projectName, context2.options.sourceRoot, true, false);
|
|
1591
1591
|
stopwatch();
|
|
1592
1592
|
}
|
|
@@ -1596,9 +1596,9 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
1596
1596
|
async function reportResults(context2) {
|
|
1597
1597
|
if (_optionalChain([context2, 'access', _62 => _62.result, 'optionalAccess', _63 => _63.errors, 'access', _64 => _64.length]) === 0) {
|
|
1598
1598
|
if (context2.result.warnings.length > 0) {
|
|
1599
|
-
|
|
1599
|
+
_chunkILLCSSWNjs.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);
|
|
1600
1600
|
}
|
|
1601
|
-
|
|
1601
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
1602
1602
|
}
|
|
1603
1603
|
}
|
|
1604
1604
|
_chunkJ5SB6L2Ljs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -1640,8 +1640,8 @@ async function cleanOutputPath(context2) {
|
|
|
1640
1640
|
}
|
|
1641
1641
|
_chunkJ5SB6L2Ljs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1642
1642
|
async function build3(options) {
|
|
1643
|
-
|
|
1644
|
-
const stopwatch =
|
|
1643
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1644
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1645
1645
|
try {
|
|
1646
1646
|
const opts = Array.isArray(options) ? options : [
|
|
1647
1647
|
options
|
|
@@ -1651,9 +1651,9 @@ async function build3(options) {
|
|
|
1651
1651
|
}
|
|
1652
1652
|
void transduce.async(opts, dependencyCheck);
|
|
1653
1653
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
1654
|
-
|
|
1654
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1655
1655
|
} catch (error) {
|
|
1656
|
-
|
|
1656
|
+
_chunkILLCSSWNjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
1657
1657
|
throw error;
|
|
1658
1658
|
} finally {
|
|
1659
1659
|
stopwatch();
|
|
@@ -1681,9 +1681,9 @@ var watch = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (context2, opti
|
|
|
1681
1681
|
return context2.rebuild();
|
|
1682
1682
|
});
|
|
1683
1683
|
if (rebuildResult instanceof Error) {
|
|
1684
|
-
|
|
1684
|
+
_chunkILLCSSWNjs.writeError.call(void 0, rebuildResult.message);
|
|
1685
1685
|
}
|
|
1686
|
-
|
|
1686
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
1687
1687
|
}, 10);
|
|
1688
1688
|
changeWatcher.on("change", fastRebuild);
|
|
1689
1689
|
return void 0;
|
|
@@ -1691,7 +1691,7 @@ var watch = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (context2, opti
|
|
|
1691
1691
|
|
|
1692
1692
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1693
1693
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1694
|
-
|
|
1694
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1695
1695
|
if (!_optionalChain([context2, 'access', _65 => _65.projectsConfigurations, 'optionalAccess', _66 => _66.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _67 => _67.projectsConfigurations, 'access', _68 => _68.projects, 'access', _69 => _69[context2.projectName], 'optionalAccess', _70 => _70.root])) {
|
|
1696
1696
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1697
1697
|
}
|
|
@@ -1745,7 +1745,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1745
1745
|
if (!_optionalChain([context2, 'optionalAccess', _79 => _79.projectName]) || !_optionalChain([context2, 'access', _80 => _80.projectsConfigurations, 'optionalAccess', _81 => _81.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1746
1746
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
1747
1747
|
}
|
|
1748
|
-
|
|
1748
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
1749
1749
|
_sizelimit2.default.call(void 0, [
|
|
1750
1750
|
_file2.default,
|
|
1751
1751
|
_esbuild3.default,
|
|
@@ -1753,7 +1753,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1753
1753
|
], {
|
|
1754
1754
|
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _82 => _82.projectsConfigurations, 'access', _83 => _83.projects, 'access', _84 => _84[context2.projectName], 'optionalAccess', _85 => _85.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _86 => _86.projectsConfigurations, 'access', _87 => _87.projects, 'access', _88 => _88[context2.projectName], 'optionalAccess', _89 => _89.root]), () => ( "./")), "src")))
|
|
1755
1755
|
}).then((result) => {
|
|
1756
|
-
|
|
1756
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
1757
1757
|
});
|
|
1758
1758
|
return {
|
|
1759
1759
|
success: true
|
|
@@ -1779,8 +1779,8 @@ var _tsdown = require('tsdown');
|
|
|
1779
1779
|
// ../tsdown/src/clean.ts
|
|
1780
1780
|
|
|
1781
1781
|
async function clean2(name = "ESBuild", directory, config) {
|
|
1782
|
-
|
|
1783
|
-
const stopwatch =
|
|
1782
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
1783
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
1784
1784
|
await _node.hfs.deleteAll(directory);
|
|
1785
1785
|
stopwatch();
|
|
1786
1786
|
}
|
|
@@ -1815,13 +1815,13 @@ var resolveOptions2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1815
1815
|
if (!workspaceRoot3) {
|
|
1816
1816
|
throw new Error("Cannot find Nx workspace root");
|
|
1817
1817
|
}
|
|
1818
|
-
const config = await
|
|
1819
|
-
|
|
1820
|
-
const stopwatch =
|
|
1818
|
+
const config = await _chunkDFG3KJWSjs.getConfig.call(void 0, workspaceRoot3.dir);
|
|
1819
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1820
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1821
1821
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1822
1822
|
exitOnError: true
|
|
1823
1823
|
});
|
|
1824
|
-
const projectJsonPath =
|
|
1824
|
+
const projectJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1825
1825
|
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
1826
1826
|
throw new Error("Cannot find project.json configuration");
|
|
1827
1827
|
}
|
|
@@ -1834,7 +1834,7 @@ var resolveOptions2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1834
1834
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS2);
|
|
1835
1835
|
options.name ??= `${projectName}-${options.format}`;
|
|
1836
1836
|
options.target ??= DEFAULT_TARGET;
|
|
1837
|
-
const packageJsonPath =
|
|
1837
|
+
const packageJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1838
1838
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1839
1839
|
throw new Error("Cannot find package.json configuration");
|
|
1840
1840
|
}
|
|
@@ -1843,20 +1843,20 @@ var resolveOptions2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1843
1843
|
...options,
|
|
1844
1844
|
config,
|
|
1845
1845
|
...userOptions,
|
|
1846
|
-
tsconfig:
|
|
1846
|
+
tsconfig: _chunkILLCSSWNjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1847
1847
|
format: options.format || "cjs",
|
|
1848
1848
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
1849
1849
|
"./src/index.ts"
|
|
1850
1850
|
], userOptions.emitOnAll),
|
|
1851
|
-
outdir: userOptions.outputPath ||
|
|
1851
|
+
outdir: userOptions.outputPath || _chunkILLCSSWNjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1852
1852
|
plugins: [],
|
|
1853
1853
|
name: userOptions.name || projectName,
|
|
1854
1854
|
projectConfigurations,
|
|
1855
1855
|
projectName,
|
|
1856
1856
|
projectGraph,
|
|
1857
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1857
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkILLCSSWNjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1858
1858
|
minify: userOptions.minify || !userOptions.debug,
|
|
1859
|
-
verbose: userOptions.verbose ||
|
|
1859
|
+
verbose: userOptions.verbose || _chunkILLCSSWNjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1860
1860
|
includeSrc: userOptions.includeSrc === true,
|
|
1861
1861
|
metafile: userOptions.metafile !== false,
|
|
1862
1862
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1890,14 +1890,14 @@ var resolveOptions2 = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1890
1890
|
return result;
|
|
1891
1891
|
}, "resolveOptions");
|
|
1892
1892
|
async function generatePackageJson2(options) {
|
|
1893
|
-
if (options.generatePackageJson !== false && await _node.hfs.isFile(
|
|
1894
|
-
|
|
1895
|
-
const stopwatch =
|
|
1896
|
-
const packageJsonPath =
|
|
1893
|
+
if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1894
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1895
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1896
|
+
const packageJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1897
1897
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
1898
1898
|
throw new Error("Cannot find package.json configuration");
|
|
1899
1899
|
}
|
|
1900
|
-
let packageJson = await _node.hfs.json(
|
|
1900
|
+
let packageJson = await _node.hfs.json(_chunkILLCSSWNjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"));
|
|
1901
1901
|
if (!packageJson) {
|
|
1902
1902
|
throw new Error("Cannot find package.json configuration file");
|
|
1903
1903
|
}
|
|
@@ -1935,15 +1935,15 @@ async function generatePackageJson2(options) {
|
|
|
1935
1935
|
}
|
|
1936
1936
|
return ret;
|
|
1937
1937
|
}, packageJson.exports);
|
|
1938
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1938
|
+
await _devkit.writeJsonFile.call(void 0, _chunkILLCSSWNjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
1939
1939
|
stopwatch();
|
|
1940
1940
|
}
|
|
1941
1941
|
return options;
|
|
1942
1942
|
}
|
|
1943
1943
|
_chunkJ5SB6L2Ljs.__name.call(void 0, generatePackageJson2, "generatePackageJson");
|
|
1944
1944
|
async function executeTSDown(options) {
|
|
1945
|
-
|
|
1946
|
-
const stopwatch =
|
|
1945
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
1946
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1947
1947
|
await _tsdown.build.call(void 0, {
|
|
1948
1948
|
...options,
|
|
1949
1949
|
entry: options.entryPoints,
|
|
@@ -1955,15 +1955,15 @@ async function executeTSDown(options) {
|
|
|
1955
1955
|
}
|
|
1956
1956
|
_chunkJ5SB6L2Ljs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
1957
1957
|
async function copyBuildAssets2(options) {
|
|
1958
|
-
|
|
1959
|
-
const stopwatch =
|
|
1958
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
1959
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1960
1960
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.projectName, options.sourceRoot, true, false);
|
|
1961
1961
|
stopwatch();
|
|
1962
1962
|
return options;
|
|
1963
1963
|
}
|
|
1964
1964
|
_chunkJ5SB6L2Ljs.__name.call(void 0, copyBuildAssets2, "copyBuildAssets");
|
|
1965
1965
|
async function reportResults2(options) {
|
|
1966
|
-
|
|
1966
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
1967
1967
|
}
|
|
1968
1968
|
_chunkJ5SB6L2Ljs.__name.call(void 0, reportResults2, "reportResults");
|
|
1969
1969
|
async function cleanOutputPath2(options) {
|
|
@@ -1974,8 +1974,8 @@ async function cleanOutputPath2(options) {
|
|
|
1974
1974
|
}
|
|
1975
1975
|
_chunkJ5SB6L2Ljs.__name.call(void 0, cleanOutputPath2, "cleanOutputPath");
|
|
1976
1976
|
async function build4(options) {
|
|
1977
|
-
|
|
1978
|
-
const stopwatch =
|
|
1977
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1978
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1979
1979
|
try {
|
|
1980
1980
|
const opts = Array.isArray(options) ? options : [
|
|
1981
1981
|
options
|
|
@@ -1993,11 +1993,11 @@ async function build4(options) {
|
|
|
1993
1993
|
await reportResults2(opt);
|
|
1994
1994
|
}));
|
|
1995
1995
|
} else {
|
|
1996
|
-
|
|
1996
|
+
_chunkILLCSSWNjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
1997
1997
|
}
|
|
1998
|
-
|
|
1998
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1999
1999
|
} catch (error) {
|
|
2000
|
-
|
|
2000
|
+
_chunkILLCSSWNjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
2001
2001
|
throw error;
|
|
2002
2002
|
} finally {
|
|
2003
2003
|
stopwatch();
|
|
@@ -2007,7 +2007,7 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, build4, "build");
|
|
|
2007
2007
|
|
|
2008
2008
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
2009
2009
|
async function tsdownExecutorFn(options, context2, config) {
|
|
2010
|
-
|
|
2010
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
|
|
2011
2011
|
if (!_optionalChain([context2, 'access', _92 => _92.projectsConfigurations, 'optionalAccess', _93 => _93.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _94 => _94.projectsConfigurations, 'access', _95 => _95.projects, 'access', _96 => _96[context2.projectName], 'optionalAccess', _97 => _97.root])) {
|
|
2012
2012
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
2013
2013
|
}
|
|
@@ -2043,11 +2043,11 @@ var _fsextra = require('fs-extra');
|
|
|
2043
2043
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
2044
2044
|
async function typiaExecutorFn(options, _, config) {
|
|
2045
2045
|
if (options.clean !== false) {
|
|
2046
|
-
|
|
2046
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
2047
2047
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
2048
2048
|
}
|
|
2049
2049
|
await Promise.all(options.entry.map((entry) => {
|
|
2050
|
-
|
|
2050
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
2051
2051
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
2052
2052
|
input: entry,
|
|
2053
2053
|
output: options.outputPath,
|
|
@@ -2078,7 +2078,7 @@ var executor_default9 = withRunExecutor("Typia runtime validation generator", ty
|
|
|
2078
2078
|
|
|
2079
2079
|
var _jiti = require('jiti');
|
|
2080
2080
|
async function unbuildExecutorFn(options, context2, config) {
|
|
2081
|
-
|
|
2081
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
2082
2082
|
if (!_optionalChain([context2, 'access', _106 => _106.projectsConfigurations, 'optionalAccess', _107 => _107.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
2083
2083
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
2084
2084
|
}
|
|
@@ -2089,7 +2089,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
2089
2089
|
throw new Error("The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory.");
|
|
2090
2090
|
}
|
|
2091
2091
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
2092
|
-
fsCache: config.skipCache ? false :
|
|
2092
|
+
fsCache: config.skipCache ? false : _chunkILLCSSWNjs.joinPaths.call(void 0, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
2093
2093
|
interopDefault: true
|
|
2094
2094
|
});
|
|
2095
2095
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
@@ -2150,34 +2150,34 @@ var executor_default10 = withRunExecutor("TypeScript Unbuild build", unbuildExec
|
|
|
2150
2150
|
var withRunGenerator = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
2151
2151
|
skipReadingConfig: false
|
|
2152
2152
|
}) => async (tree, _options) => {
|
|
2153
|
-
const stopwatch =
|
|
2153
|
+
const stopwatch = _chunkILLCSSWNjs.getStopwatch.call(void 0, name);
|
|
2154
2154
|
let options = _options;
|
|
2155
2155
|
let config;
|
|
2156
2156
|
try {
|
|
2157
|
-
|
|
2157
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
2158
2158
|
|
|
2159
2159
|
`, config);
|
|
2160
|
-
const workspaceRoot3 =
|
|
2160
|
+
const workspaceRoot3 = _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, );
|
|
2161
2161
|
if (!generatorOptions.skipReadingConfig) {
|
|
2162
|
-
|
|
2162
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
2163
2163
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
2164
|
-
config = await
|
|
2164
|
+
config = await _chunkDFG3KJWSjs.getConfig.call(void 0, workspaceRoot3);
|
|
2165
2165
|
}
|
|
2166
2166
|
if (_optionalChain([generatorOptions, 'optionalAccess', _108 => _108.hooks, 'optionalAccess', _109 => _109.applyDefaultOptions])) {
|
|
2167
|
-
|
|
2167
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
2168
2168
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
2169
|
-
|
|
2169
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
2170
2170
|
}
|
|
2171
|
-
|
|
2171
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
|
|
2172
2172
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
|
|
2173
2173
|
const tokenized = await applyWorkspaceTokens(options, {
|
|
2174
2174
|
workspaceRoot: tree.root,
|
|
2175
2175
|
config
|
|
2176
2176
|
}, applyWorkspaceBaseTokens);
|
|
2177
2177
|
if (_optionalChain([generatorOptions, 'optionalAccess', _110 => _110.hooks, 'optionalAccess', _111 => _111.preProcess])) {
|
|
2178
|
-
|
|
2178
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
2179
2179
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
2180
|
-
|
|
2180
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
2181
2181
|
}
|
|
2182
2182
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
2183
2183
|
if (result) {
|
|
@@ -2190,18 +2190,18 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
2192
|
if (_optionalChain([generatorOptions, 'optionalAccess', _121 => _121.hooks, 'optionalAccess', _122 => _122.postProcess])) {
|
|
2193
|
-
|
|
2193
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
2194
2194
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
2195
|
-
|
|
2195
|
+
_chunkILLCSSWNjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
2196
2196
|
}
|
|
2197
2197
|
return () => {
|
|
2198
|
-
|
|
2198
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
2199
2199
|
`, config);
|
|
2200
2200
|
};
|
|
2201
2201
|
} catch (error) {
|
|
2202
2202
|
return () => {
|
|
2203
|
-
|
|
2204
|
-
|
|
2203
|
+
_chunkILLCSSWNjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
2204
|
+
_chunkILLCSSWNjs.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
2205
2205
|
- Details: ${error.message}
|
|
2206
2206
|
- Stacktrace: ${error.stack}`, config);
|
|
2207
2207
|
};
|
|
@@ -2247,7 +2247,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2247
2247
|
const projectConfig = {
|
|
2248
2248
|
root: options.directory,
|
|
2249
2249
|
projectType: "library",
|
|
2250
|
-
sourceRoot:
|
|
2250
|
+
sourceRoot: _chunkILLCSSWNjs.joinPaths.call(void 0, _nullishCoalesce(options.directory, () => ( "")), "src"),
|
|
2251
2251
|
targets: {
|
|
2252
2252
|
build: {
|
|
2253
2253
|
executor: schema.buildExecutor,
|
|
@@ -2256,11 +2256,11 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2256
2256
|
],
|
|
2257
2257
|
options: {
|
|
2258
2258
|
entry: [
|
|
2259
|
-
|
|
2259
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "src", "index.ts")
|
|
2260
2260
|
],
|
|
2261
2261
|
outputPath: getOutputPath(options),
|
|
2262
|
-
tsconfig:
|
|
2263
|
-
project:
|
|
2262
|
+
tsconfig: _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
2263
|
+
project: _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
2264
2264
|
defaultConfiguration: "production",
|
|
2265
2265
|
platform: "neutral",
|
|
2266
2266
|
assets: [
|
|
@@ -2314,7 +2314,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2314
2314
|
if (!options.importPath) {
|
|
2315
2315
|
options.importPath = options.name;
|
|
2316
2316
|
}
|
|
2317
|
-
const packageJsonPath =
|
|
2317
|
+
const packageJsonPath = _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "package.json");
|
|
2318
2318
|
if (tree.exists(packageJsonPath)) {
|
|
2319
2319
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2320
2320
|
if (!options.importPath) {
|
|
@@ -2371,10 +2371,10 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2371
2371
|
}));
|
|
2372
2372
|
}
|
|
2373
2373
|
_js.addTsConfigPath.call(void 0, tree, options.importPath, [
|
|
2374
|
-
|
|
2374
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "./src", `index.${options.js ? "js" : "ts"}`)
|
|
2375
2375
|
]);
|
|
2376
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2377
|
-
|
|
2376
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkILLCSSWNjs.joinPaths.call(void 0, options.importPath, "/*"), [
|
|
2377
|
+
_chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "./src", "/*")
|
|
2378
2378
|
]);
|
|
2379
2379
|
if (tree.exists("package.json")) {
|
|
2380
2380
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2385,7 +2385,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2385
2385
|
description = packageJson.description;
|
|
2386
2386
|
}
|
|
2387
2387
|
}
|
|
2388
|
-
const tsconfigPath =
|
|
2388
|
+
const tsconfigPath = _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json");
|
|
2389
2389
|
if (tree.exists(tsconfigPath)) {
|
|
2390
2390
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2391
2391
|
json.composite ??= true;
|
|
@@ -2423,7 +2423,7 @@ function getOutputPath(options) {
|
|
|
2423
2423
|
} else {
|
|
2424
2424
|
parts.push(options.projectRoot);
|
|
2425
2425
|
}
|
|
2426
|
-
return
|
|
2426
|
+
return _chunkILLCSSWNjs.joinPaths.call(void 0, ...parts);
|
|
2427
2427
|
}
|
|
2428
2428
|
_chunkJ5SB6L2Ljs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
2429
2429
|
function createProjectTsConfigJson(tree, options) {
|
|
@@ -2432,7 +2432,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2432
2432
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _134 => _134.tsconfigOptions]), () => ( {})),
|
|
2433
2433
|
compilerOptions: {
|
|
2434
2434
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2435
|
-
outDir:
|
|
2435
|
+
outDir: _chunkILLCSSWNjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2436
2436
|
noEmit: true,
|
|
2437
2437
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _135 => _135.tsconfigOptions, 'optionalAccess', _136 => _136.compilerOptions]), () => ( {}))
|
|
2438
2438
|
},
|
|
@@ -2452,7 +2452,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2452
2452
|
"src/**/*.test.ts"
|
|
2453
2453
|
]
|
|
2454
2454
|
};
|
|
2455
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2455
|
+
_devkit.writeJson.call(void 0, tree, _chunkILLCSSWNjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2456
2456
|
}
|
|
2457
2457
|
_chunkJ5SB6L2Ljs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2458
2458
|
async function normalizeOptions(tree, options) {
|
|
@@ -2578,19 +2578,19 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
2578
2578
|
|
|
2579
2579
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
2580
2580
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0,
|
|
2581
|
+
_chunkILLCSSWNjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Configuration JSON Schema generator", config);
|
|
2582
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `Determining the Storm Configuration JSON Schema...`, config);
|
|
2583
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkILLCSSWNjs.StormConfigSchema, {
|
|
2584
2584
|
name: "StormWorkspaceConfiguration"
|
|
2585
2585
|
});
|
|
2586
|
-
|
|
2587
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _143 => _143.workspaceRoot]), () => (
|
|
2588
|
-
|
|
2586
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, jsonSchema, config);
|
|
2587
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _143 => _143.workspaceRoot]), () => ( _chunkILLCSSWNjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _144 => _144.outputFile, 'optionalAccess', _145 => _145.startsWith, 'call', _146 => _146("./")]) ? "" : "./");
|
|
2588
|
+
_chunkILLCSSWNjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
2589
2589
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
2590
2590
|
spaces: 2
|
|
2591
2591
|
});
|
|
2592
2592
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2593
|
-
|
|
2593
|
+
_chunkILLCSSWNjs.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
|
|
2594
2594
|
return {
|
|
2595
2595
|
success: true
|
|
2596
2596
|
};
|