@storm-software/cloudflare-tools 0.55.61 → 0.55.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/dist/{chunk-YSDG777H.mjs → chunk-3O6RTR7W.mjs} +2 -2
- package/dist/{chunk-FUE6U32Q.mjs → chunk-C3CWFFYT.mjs} +5 -5
- package/dist/{chunk-H36VLRVB.mjs → chunk-CI3G746G.mjs} +1 -1
- package/dist/{chunk-OZZB2O7W.mjs → chunk-HA6XAX4C.mjs} +4 -4
- package/dist/{chunk-I4BEGOU2.mjs → chunk-HBBHWDJS.mjs} +15 -10
- package/dist/{chunk-KLU3MC7D.js → chunk-IKNX7KR7.js} +142 -141
- package/dist/{chunk-CRVSAZIS.mjs → chunk-ITJMNVMG.mjs} +2 -2
- package/dist/{chunk-Y5KOP5W7.mjs → chunk-KSTLYSXJ.mjs} +5 -4
- package/dist/{chunk-XFDLWZLO.js → chunk-MLJ3OSJX.js} +16 -16
- package/dist/{chunk-RC7NR5DM.js → chunk-NRIZ2TF7.js} +1 -1
- package/dist/{chunk-VCFN2W5L.mjs → chunk-RGBGVGWZ.mjs} +2 -2
- package/dist/{chunk-Q7EDJLEB.mjs → chunk-SSSAGTTW.mjs} +2 -2
- package/dist/{chunk-WNICDYXY.js → chunk-TEEOPHLZ.js} +1 -1
- package/dist/{chunk-DXA6VL3T.js → chunk-UBEHQVYS.js} +3 -3
- package/dist/{chunk-J67QGNB5.js → chunk-UCUXAMZ3.js} +12 -12
- package/dist/{chunk-H2MWLDLR.mjs → chunk-VQLLSEHB.mjs} +1 -1
- package/dist/{chunk-QYQD76ND.js → chunk-XFPT4O23.js} +52 -47
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +8 -8
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +5 -5
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/index.mjs +10 -10
- package/dist/src/executors/cloudflare-publish/executor.js +3 -3
- package/dist/src/executors/cloudflare-publish/executor.mjs +6 -6
- package/dist/src/executors/r2-upload-publish/executor.js +5 -5
- package/dist/src/executors/r2-upload-publish/executor.mjs +6 -6
- package/dist/src/executors/serve/executor.d.mts +2 -2
- package/dist/src/executors/serve/executor.d.ts +2 -2
- package/dist/src/executors/serve/executor.js +4 -4
- package/dist/src/executors/serve/executor.mjs +5 -5
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +2 -2
- package/dist/src/generators/worker/generator.js +5 -5
- package/dist/src/generators/worker/generator.mjs +5 -5
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.mjs +3 -3
- package/dist/src/utils/r2-bucket-helpers.js +3 -3
- package/dist/src/utils/r2-bucket-helpers.mjs +3 -3
- package/dist/tsup.config.mjs +1 -1
- package/package.json +40 -14
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkVTHBMY4Bjs = require('./chunk-VTHBMY4B.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkXFPT4O23js = require('./chunk-XFPT4O23.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -20,7 +20,7 @@ var _chunkQYQD76NDjs = require('./chunk-QYQD76ND.js');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkTEEOPHLZjs = require('./chunk-TEEOPHLZ.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]))), () => ( _chunkTEEOPHLZjs.findWorkspaceRoot.call(void 0, ))));
|
|
57
57
|
}
|
|
58
58
|
return result;
|
|
59
59
|
}, "applyWorkspaceBaseTokens");
|
|
@@ -101,35 +101,35 @@ 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 = _chunkTEEOPHLZjs.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 = _chunkTEEOPHLZjs.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
|
+
_chunkTEEOPHLZjs.writeInfo.call(void 0, `\u26A1 Running the ${name} executor for ${projectName} `, config);
|
|
117
117
|
if (!executorOptions.skipReadingConfig) {
|
|
118
|
-
|
|
118
|
+
_chunkTEEOPHLZjs.writeTrace.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
119
119
|
- workspaceRoot: ${workspaceRoot3}
|
|
120
120
|
- projectRoot: ${projectRoot}
|
|
121
121
|
- sourceRoot: ${sourceRoot}
|
|
122
122
|
- projectName: ${projectName}
|
|
123
123
|
`, config);
|
|
124
|
-
config = await
|
|
124
|
+
config = await _chunkXFPT4O23js.getConfig.call(void 0, workspaceRoot3);
|
|
125
125
|
}
|
|
126
126
|
if (_optionalChain([executorOptions, 'optionalAccess', _7 => _7.hooks, 'optionalAccess', _8 => _8.applyDefaultOptions])) {
|
|
127
|
-
|
|
127
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
128
128
|
options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
|
|
129
|
-
|
|
129
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
130
130
|
}
|
|
131
|
-
|
|
132
|
-
${
|
|
131
|
+
_chunkTEEOPHLZjs.writeTrace.call(void 0, `Executor schema options \u2699\uFE0F
|
|
132
|
+
${_chunkTEEOPHLZjs.formatLogMessage.call(void 0, options)}
|
|
133
133
|
`, config);
|
|
134
134
|
const tokenized = await applyWorkspaceTokens(options, _defu.defu.call(void 0, {
|
|
135
135
|
workspaceRoot: workspaceRoot3,
|
|
@@ -138,42 +138,43 @@ ${_chunkWNICDYXYjs.formatLogMessage.call(void 0, options)}
|
|
|
138
138
|
projectName,
|
|
139
139
|
config
|
|
140
140
|
}, config, context2.projectsConfigurations.projects[context2.projectName]), applyWorkspaceProjectTokens);
|
|
141
|
-
|
|
142
|
-
${
|
|
141
|
+
_chunkTEEOPHLZjs.writeTrace.call(void 0, `Executor schema tokenized options \u2699\uFE0F
|
|
142
|
+
${_chunkTEEOPHLZjs.formatLogMessage.call(void 0, tokenized)}
|
|
143
143
|
`, config);
|
|
144
144
|
if (_optionalChain([executorOptions, 'optionalAccess', _9 => _9.hooks, 'optionalAccess', _10 => _10.preProcess])) {
|
|
145
|
-
|
|
145
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
146
146
|
await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
|
|
147
|
-
|
|
147
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
148
148
|
}
|
|
149
149
|
const ret = executorFn(tokenized, context2, config);
|
|
150
150
|
if (_isFunction(_optionalChain([ret, 'optionalAccess', _11 => _11.next]))) {
|
|
151
151
|
const asyncGen = ret;
|
|
152
152
|
for await (const iter of asyncGen) {
|
|
153
|
+
void iter;
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
156
|
const result = await Promise.resolve(ret);
|
|
156
157
|
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")) {
|
|
157
|
-
|
|
158
|
-
${
|
|
158
|
+
_chunkTEEOPHLZjs.writeTrace.call(void 0, `Failure determined by the ${name} executor
|
|
159
|
+
${_chunkTEEOPHLZjs.formatLogMessage.call(void 0, result)}`, config);
|
|
159
160
|
console.error(result);
|
|
160
161
|
throw new Error(`The ${name} executor failed to run`, {
|
|
161
162
|
cause: _optionalChain([result, 'optionalAccess', _20 => _20.error])
|
|
162
163
|
});
|
|
163
164
|
}
|
|
164
165
|
if (_optionalChain([executorOptions, 'optionalAccess', _21 => _21.hooks, 'optionalAccess', _22 => _22.postProcess])) {
|
|
165
|
-
|
|
166
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
166
167
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
167
|
-
|
|
168
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
168
169
|
}
|
|
169
|
-
|
|
170
|
+
_chunkTEEOPHLZjs.writeSuccess.call(void 0, `Completed running the ${name} task executor!
|
|
170
171
|
`, config);
|
|
171
172
|
return {
|
|
172
173
|
success: true
|
|
173
174
|
};
|
|
174
175
|
} catch (error) {
|
|
175
|
-
|
|
176
|
-
|
|
176
|
+
_chunkTEEOPHLZjs.writeFatal.call(void 0, "A fatal error occurred while running the executor - the process was forced to terminate", config);
|
|
177
|
+
_chunkTEEOPHLZjs.writeError.call(void 0, `An exception was thrown in the executor's process
|
|
177
178
|
- Details: ${error.message}
|
|
178
179
|
- Stacktrace: ${error.stack}`, config);
|
|
179
180
|
return {
|
|
@@ -476,8 +477,8 @@ var copyAssets = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (con
|
|
|
476
477
|
output: "src/"
|
|
477
478
|
});
|
|
478
479
|
}
|
|
479
|
-
|
|
480
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
480
|
+
_chunkTEEOPHLZjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
481
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkTEEOPHLZjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
481
482
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
482
483
|
projectDir: projectRoot,
|
|
483
484
|
rootDir: config.workspaceRoot,
|
|
@@ -486,12 +487,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
486
487
|
});
|
|
487
488
|
await assetHandler.processAllAssetsOnce();
|
|
488
489
|
if (includeSrc === true) {
|
|
489
|
-
|
|
490
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkTEEOPHLZjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
490
491
|
const files = await _glob.glob.call(void 0, [
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
492
|
+
_chunkTEEOPHLZjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
493
|
+
_chunkTEEOPHLZjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
494
|
+
_chunkTEEOPHLZjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
495
|
+
_chunkTEEOPHLZjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
495
496
|
]);
|
|
496
497
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
497
498
|
|
|
@@ -514,7 +515,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
514
515
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _29 => _29.node, 'access', _30 => _30.data, 'optionalAccess', _31 => _31.root]) !== projectRoot && _optionalChain([dep, 'access', _32 => _32.node, 'access', _33 => _33.data, 'optionalAccess', _34 => _34.root]) !== workspaceRoot3)) {
|
|
515
516
|
const projectNode = project.node;
|
|
516
517
|
if (projectNode.data.root) {
|
|
517
|
-
const projectPackageJsonPath =
|
|
518
|
+
const projectPackageJsonPath = _chunkTEEOPHLZjs.joinPaths.call(void 0, workspaceRoot3, projectNode.data.root, "package.json");
|
|
518
519
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
519
520
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
520
521
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -525,8 +526,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
525
526
|
}
|
|
526
527
|
}
|
|
527
528
|
if (localPackages.length > 0) {
|
|
528
|
-
|
|
529
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
529
|
+
_chunkTEEOPHLZjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
530
|
+
const projectJsonFile = await _promises.readFile.call(void 0, _chunkTEEOPHLZjs.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
530
531
|
const projectJson = JSON.parse(projectJsonFile);
|
|
531
532
|
const projectName2 = projectJson.name;
|
|
532
533
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
@@ -535,7 +536,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
535
536
|
}
|
|
536
537
|
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _37 => _37.projects, 'optionalAccess', _38 => _38[projectName2], 'access', _39 => _39.implicitDependencies, 'optionalAccess', _40 => _40.reduce, 'call', _41 => _41((ret, dep) => {
|
|
537
538
|
if (_optionalChain([projectConfigurations, 'access', _42 => _42.projects, 'optionalAccess', _43 => _43[dep]])) {
|
|
538
|
-
const depPackageJsonPath =
|
|
539
|
+
const depPackageJsonPath = _chunkTEEOPHLZjs.joinPaths.call(void 0, workspaceRoot3, projectConfigurations.projects[dep].root, "package.json");
|
|
539
540
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
540
541
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
541
542
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
@@ -559,13 +560,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0
|
|
|
559
560
|
return ret;
|
|
560
561
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
561
562
|
} else {
|
|
562
|
-
|
|
563
|
+
_chunkTEEOPHLZjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
563
564
|
}
|
|
564
565
|
return packageJson;
|
|
565
566
|
}, "addPackageDependencies");
|
|
566
567
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
567
|
-
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot :
|
|
568
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
568
|
+
const workspaceRoot3 = config.workspaceRoot ? config.workspaceRoot : _chunkTEEOPHLZjs.findWorkspaceRoot.call(void 0, );
|
|
569
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkTEEOPHLZjs.joinPaths.call(void 0, workspaceRoot3, "package.json"), "utf8");
|
|
569
570
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
570
571
|
packageJson.type ??= "module";
|
|
571
572
|
packageJson.sideEffects ??= false;
|
|
@@ -574,7 +575,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call
|
|
|
574
575
|
if (distSrc.startsWith("/")) {
|
|
575
576
|
distSrc = distSrc.substring(1);
|
|
576
577
|
}
|
|
577
|
-
packageJson.source ??= `${
|
|
578
|
+
packageJson.source ??= `${_chunkTEEOPHLZjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
578
579
|
}
|
|
579
580
|
packageJson.files ??= [
|
|
580
581
|
"dist/**/*"
|
|
@@ -605,7 +606,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call
|
|
|
605
606
|
];
|
|
606
607
|
}
|
|
607
608
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
608
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
609
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkTEEOPHLZjs.joinPaths.call(void 0, "packages", projectName);
|
|
609
610
|
return packageJson;
|
|
610
611
|
}, "addWorkspacePackageJsonFields");
|
|
611
612
|
|
|
@@ -910,7 +911,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (option
|
|
|
910
911
|
setup(build4) {
|
|
911
912
|
build4.onEnd((result) => {
|
|
912
913
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
913
|
-
|
|
914
|
+
_chunkTEEOPHLZjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
914
915
|
${result.errors.map((error) => error.text).join("\n")}
|
|
915
916
|
|
|
916
917
|
`, resolvedOptions.config);
|
|
@@ -945,7 +946,7 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
|
945
946
|
var resolvePathsPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
946
947
|
name: "storm:resolve-paths",
|
|
947
948
|
setup(build4) {
|
|
948
|
-
const parentTsConfig = build4.initialOptions.tsconfig ? _chunkJ5SB6L2Ljs.__require.call(void 0,
|
|
949
|
+
const parentTsConfig = build4.initialOptions.tsconfig ? _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkTEEOPHLZjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build4.initialOptions.tsconfig)) : _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkTEEOPHLZjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
949
950
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
950
951
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
951
952
|
build4.onResolve({
|
|
@@ -969,7 +970,7 @@ var _apiextractor = require('@microsoft/api-extractor');
|
|
|
969
970
|
|
|
970
971
|
|
|
971
972
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
972
|
-
const { dependencies, peerDependencies, devDependencies } = _chunkJ5SB6L2Ljs.__require.call(void 0,
|
|
973
|
+
const { dependencies, peerDependencies, devDependencies } = _chunkJ5SB6L2Ljs.__require.call(void 0, _chunkTEEOPHLZjs.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
973
974
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
974
975
|
p,
|
|
975
976
|
getTypeDependencyPackageName(p)
|
|
@@ -1005,13 +1006,13 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
1005
1006
|
},
|
|
1006
1007
|
dtsRollup: {
|
|
1007
1008
|
enabled: true,
|
|
1008
|
-
untrimmedFilePath:
|
|
1009
|
+
untrimmedFilePath: _chunkTEEOPHLZjs.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
1009
1010
|
},
|
|
1010
1011
|
tsdocMetadata: {
|
|
1011
1012
|
enabled: false
|
|
1012
1013
|
}
|
|
1013
1014
|
},
|
|
1014
|
-
packageJsonFullPath:
|
|
1015
|
+
packageJsonFullPath: _chunkTEEOPHLZjs.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
1015
1016
|
configObjectFullPath: void 0
|
|
1016
1017
|
});
|
|
1017
1018
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -1019,7 +1020,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
1019
1020
|
localBuild: true
|
|
1020
1021
|
});
|
|
1021
1022
|
if (extractorResult.succeeded === false) {
|
|
1022
|
-
|
|
1023
|
+
_chunkTEEOPHLZjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
1023
1024
|
throw new Error("API Extractor completed with errors");
|
|
1024
1025
|
}
|
|
1025
1026
|
}
|
|
@@ -1038,12 +1039,12 @@ var tscPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options, r
|
|
|
1038
1039
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
1039
1040
|
const typeOutDir = resolvedOptions.outdir;
|
|
1040
1041
|
const entryPoint = resolvedOptions.entryPoints[0].in.replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
1041
|
-
const bundlePath =
|
|
1042
|
+
const bundlePath = _chunkTEEOPHLZjs.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
1042
1043
|
let dtsPath;
|
|
1043
|
-
if (_fs.existsSync.call(void 0,
|
|
1044
|
-
dtsPath =
|
|
1045
|
-
} else if (_fs.existsSync.call(void 0,
|
|
1046
|
-
dtsPath =
|
|
1044
|
+
if (_fs.existsSync.call(void 0, _chunkTEEOPHLZjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
1045
|
+
dtsPath = _chunkTEEOPHLZjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
1046
|
+
} else if (_fs.existsSync.call(void 0, _chunkTEEOPHLZjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
1047
|
+
dtsPath = _chunkTEEOPHLZjs.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
1047
1048
|
}
|
|
1048
1049
|
const ext = resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
1049
1050
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -1207,8 +1208,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (bund
|
|
|
1207
1208
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
1208
1209
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
1209
1210
|
});
|
|
1210
|
-
|
|
1211
|
-
|
|
1211
|
+
_chunkTEEOPHLZjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
1212
|
+
_chunkTEEOPHLZjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
1212
1213
|
if (filteredMissingDeps.length > 0) {
|
|
1213
1214
|
throw new Error(`Missing dependencies detected - please install them:
|
|
1214
1215
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -1345,7 +1346,7 @@ function emitDtsFiles(workspaceConfig, program, host, emitOnlyDtsFiles = true, c
|
|
|
1345
1346
|
});
|
|
1346
1347
|
const diagnosticMessage = diagnosticMessages.join("\n");
|
|
1347
1348
|
if (diagnosticMessage) {
|
|
1348
|
-
|
|
1349
|
+
_chunkTEEOPHLZjs.writeError.call(void 0, `Failed to emit declaration files.
|
|
1349
1350
|
|
|
1350
1351
|
${diagnosticMessage}`, workspaceConfig);
|
|
1351
1352
|
throw new Error("TypeScript compilation failed");
|
|
@@ -1380,7 +1381,7 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, emitDts, "emitDts");
|
|
|
1380
1381
|
// ../esbuild/src/utilities/get-entry-points.ts
|
|
1381
1382
|
|
|
1382
1383
|
var getEntryPoints = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
1383
|
-
const workspaceRoot3 = config.workspaceRoot ||
|
|
1384
|
+
const workspaceRoot3 = config.workspaceRoot || _chunkTEEOPHLZjs.findWorkspaceRoot.call(void 0, );
|
|
1384
1385
|
const entryPoints = [];
|
|
1385
1386
|
if (entry) {
|
|
1386
1387
|
if (typeof entry === "string") {
|
|
@@ -1411,8 +1412,8 @@ var getEntryPoints = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1411
1412
|
}
|
|
1412
1413
|
if (emitOnAll) {
|
|
1413
1414
|
entryPoints.push({
|
|
1414
|
-
in:
|
|
1415
|
-
out:
|
|
1415
|
+
in: _chunkTEEOPHLZjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}"),
|
|
1416
|
+
out: _chunkTEEOPHLZjs.joinPaths.call(void 0, workspaceRoot3, sourceRoot || projectRoot, "**/*.{ts,tsx}")
|
|
1416
1417
|
});
|
|
1417
1418
|
}
|
|
1418
1419
|
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
@@ -1425,9 +1426,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1425
1426
|
]
|
|
1426
1427
|
});
|
|
1427
1428
|
paths.push(...files.reduce((ret, filePath) => {
|
|
1428
|
-
const result =
|
|
1429
|
+
const result = _chunkTEEOPHLZjs.correctPaths.call(void 0, _chunkTEEOPHLZjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkTEEOPHLZjs.correctPaths.call(void 0, workspaceRoot3), "").replaceAll(_chunkTEEOPHLZjs.correctPaths.call(void 0, projectRoot), ""));
|
|
1429
1430
|
if (result) {
|
|
1430
|
-
|
|
1431
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkTEEOPHLZjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
1431
1432
|
if (!paths.some((p) => p.in === result)) {
|
|
1432
1433
|
paths.push({
|
|
1433
1434
|
in: result,
|
|
@@ -1438,7 +1439,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1438
1439
|
return ret;
|
|
1439
1440
|
}, []));
|
|
1440
1441
|
} else {
|
|
1441
|
-
|
|
1442
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, `Adding ESBuild entry point
|
|
1442
1443
|
- Input: ${entryPoint.in}
|
|
1443
1444
|
- Output: ${entryPoint.out}`, config);
|
|
1444
1445
|
if (!paths.some((p) => p.out === entryPoint.out)) {
|
|
@@ -1531,13 +1532,13 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1531
1532
|
if (!workspaceRoot3) {
|
|
1532
1533
|
throw new Error("Cannot find Nx workspace root");
|
|
1533
1534
|
}
|
|
1534
|
-
const config = await
|
|
1535
|
-
|
|
1536
|
-
const stopwatch =
|
|
1535
|
+
const config = await _chunkXFPT4O23js.getConfig.call(void 0, workspaceRoot3.dir);
|
|
1536
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1537
|
+
const stopwatch = _chunkTEEOPHLZjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1537
1538
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1538
1539
|
exitOnError: true
|
|
1539
1540
|
});
|
|
1540
|
-
const projectJsonPath =
|
|
1541
|
+
const projectJsonPath = _chunkTEEOPHLZjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "project.json");
|
|
1541
1542
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
1542
1543
|
throw new Error("Cannot find project.json configuration");
|
|
1543
1544
|
}
|
|
@@ -1551,7 +1552,7 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1551
1552
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
1552
1553
|
options.name ??= `${projectName}-${options.format}`;
|
|
1553
1554
|
options.target ??= DEFAULT_TARGET;
|
|
1554
|
-
const packageJsonPath =
|
|
1555
|
+
const packageJsonPath = _chunkTEEOPHLZjs.joinPaths.call(void 0, workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
1555
1556
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1556
1557
|
throw new Error("Cannot find package.json configuration");
|
|
1557
1558
|
}
|
|
@@ -1568,19 +1569,19 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1568
1569
|
"main"
|
|
1569
1570
|
],
|
|
1570
1571
|
...userOptions,
|
|
1571
|
-
tsconfig:
|
|
1572
|
+
tsconfig: _chunkTEEOPHLZjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
1572
1573
|
format: options.format || "cjs",
|
|
1573
1574
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, _nullishCoalesce(userOptions.entry, () => ( "./src/index.ts")), false),
|
|
1574
|
-
outdir: userOptions.outputPath ||
|
|
1575
|
+
outdir: userOptions.outputPath || _chunkTEEOPHLZjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
1575
1576
|
distDir: userOptions.distDir || "dist",
|
|
1576
1577
|
plugins: [],
|
|
1577
1578
|
name: userOptions.name || projectName,
|
|
1578
1579
|
projectConfigurations,
|
|
1579
1580
|
projectName,
|
|
1580
1581
|
projectGraph,
|
|
1581
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
1582
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkTEEOPHLZjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
1582
1583
|
minify: userOptions.minify || !userOptions.debug,
|
|
1583
|
-
verbose: userOptions.verbose ||
|
|
1584
|
+
verbose: userOptions.verbose || _chunkTEEOPHLZjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1584
1585
|
includeSrc: userOptions.includeSrc === true,
|
|
1585
1586
|
metafile: userOptions.metafile !== false,
|
|
1586
1587
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1615,8 +1616,8 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1615
1616
|
}, {})
|
|
1616
1617
|
},
|
|
1617
1618
|
inject: [
|
|
1618
|
-
options.format === "cjs" && options.injectShims ?
|
|
1619
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ?
|
|
1619
|
+
options.format === "cjs" && options.injectShims ? _chunkTEEOPHLZjs.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : void 0,
|
|
1620
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkTEEOPHLZjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : void 0
|
|
1620
1621
|
].filter(Boolean)
|
|
1621
1622
|
};
|
|
1622
1623
|
result.plugins = _nullishCoalesce(userOptions.plugins, () => ( getDefaultBuildPlugins(userOptions, result)));
|
|
@@ -1634,14 +1635,14 @@ var resolveOptions = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, async
|
|
|
1634
1635
|
return result;
|
|
1635
1636
|
}, "resolveOptions");
|
|
1636
1637
|
async function generatePackageJson(context2) {
|
|
1637
|
-
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1638
|
-
|
|
1639
|
-
const stopwatch =
|
|
1640
|
-
const packageJsonPath =
|
|
1638
|
+
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkTEEOPHLZjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
1639
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
1640
|
+
const stopwatch = _chunkTEEOPHLZjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1641
|
+
const packageJsonPath = _chunkTEEOPHLZjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
1641
1642
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1642
1643
|
throw new Error("Cannot find package.json configuration");
|
|
1643
1644
|
}
|
|
1644
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
1645
|
+
const packageJsonFile = await _promises2.default.readFile(_chunkTEEOPHLZjs.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
|
|
1645
1646
|
let packageJson = JSON.parse(packageJsonFile);
|
|
1646
1647
|
if (!packageJson) {
|
|
1647
1648
|
throw new Error("Cannot find package.json configuration file");
|
|
@@ -1669,7 +1670,7 @@ async function generatePackageJson(context2) {
|
|
|
1669
1670
|
}
|
|
1670
1671
|
return ret;
|
|
1671
1672
|
}, packageJson.exports);
|
|
1672
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1673
|
+
await _devkit.writeJsonFile.call(void 0, _chunkTEEOPHLZjs.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
|
|
1673
1674
|
stopwatch();
|
|
1674
1675
|
}
|
|
1675
1676
|
return context2;
|
|
@@ -1695,8 +1696,8 @@ async function generateContext(getOptions) {
|
|
|
1695
1696
|
}
|
|
1696
1697
|
_chunkJ5SB6L2Ljs.__name.call(void 0, generateContext, "generateContext");
|
|
1697
1698
|
async function executeEsBuild(context2) {
|
|
1698
|
-
|
|
1699
|
-
const stopwatch =
|
|
1699
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
1700
|
+
const stopwatch = _chunkTEEOPHLZjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
1700
1701
|
if (process.env.STORM_WATCH) {
|
|
1701
1702
|
const ctx = await esbuild2.context(context2.options);
|
|
1702
1703
|
watch(ctx, context2.options);
|
|
@@ -1704,7 +1705,7 @@ async function executeEsBuild(context2) {
|
|
|
1704
1705
|
const options = {
|
|
1705
1706
|
...context2.options
|
|
1706
1707
|
};
|
|
1707
|
-
options.outdir =
|
|
1708
|
+
options.outdir = _chunkTEEOPHLZjs.joinPaths.call(void 0, context2.options.outdir, context2.options.distDir);
|
|
1708
1709
|
if (!options.inject || !Array.isArray(options.inject) || options.inject.length === 0 || // eslint-disable-next-line no-constant-binary-expression, @typescript-eslint/no-explicit-any
|
|
1709
1710
|
options.inject === {}) {
|
|
1710
1711
|
delete options.inject;
|
|
@@ -1730,8 +1731,8 @@ async function executeEsBuild(context2) {
|
|
|
1730
1731
|
delete options.config;
|
|
1731
1732
|
delete options.injectShims;
|
|
1732
1733
|
delete options.external;
|
|
1733
|
-
|
|
1734
|
-
${
|
|
1734
|
+
_chunkTEEOPHLZjs.writeTrace.call(void 0, `Run esbuild (${context2.options.name}) with the following options:
|
|
1735
|
+
${_chunkTEEOPHLZjs.formatLogMessage.call(void 0, {
|
|
1735
1736
|
...options,
|
|
1736
1737
|
define: "<Hidden>"
|
|
1737
1738
|
})}`, context2.options.config);
|
|
@@ -1747,8 +1748,8 @@ ${_chunkWNICDYXYjs.formatLogMessage.call(void 0, {
|
|
|
1747
1748
|
_chunkJ5SB6L2Ljs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
1748
1749
|
async function executeTypescript(context2) {
|
|
1749
1750
|
if (_optionalChain([context2, 'access', _82 => _82.result, 'optionalAccess', _83 => _83.errors, 'access', _84 => _84.length]) === 0 && context2.options.dts) {
|
|
1750
|
-
|
|
1751
|
-
const stopwatch =
|
|
1751
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, ` \u{1F4CB} Running TypeScript Compiler for ${context2.options.name}`, context2.options.config);
|
|
1752
|
+
const stopwatch = _chunkTEEOPHLZjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1752
1753
|
await emitDts(context2.options.config, context2.options.tsconfig, context2.options.tsconfigRaw, true);
|
|
1753
1754
|
stopwatch();
|
|
1754
1755
|
}
|
|
@@ -1757,8 +1758,8 @@ async function executeTypescript(context2) {
|
|
|
1757
1758
|
_chunkJ5SB6L2Ljs.__name.call(void 0, executeTypescript, "executeTypescript");
|
|
1758
1759
|
async function copyBuildAssets(context2) {
|
|
1759
1760
|
if (_optionalChain([context2, 'access', _85 => _85.result, 'optionalAccess', _86 => _86.errors, 'access', _87 => _87.length]) === 0) {
|
|
1760
|
-
|
|
1761
|
-
const stopwatch =
|
|
1761
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
1762
|
+
const stopwatch = _chunkTEEOPHLZjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1762
1763
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
1763
1764
|
stopwatch();
|
|
1764
1765
|
}
|
|
@@ -1768,11 +1769,11 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
1768
1769
|
async function reportResults(context2) {
|
|
1769
1770
|
if (_optionalChain([context2, 'access', _88 => _88.result, 'optionalAccess', _89 => _89.errors, 'access', _90 => _90.length]) === 0) {
|
|
1770
1771
|
if (context2.result.warnings.length > 0) {
|
|
1771
|
-
|
|
1772
|
+
_chunkTEEOPHLZjs.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);
|
|
1772
1773
|
}
|
|
1773
|
-
|
|
1774
|
+
_chunkTEEOPHLZjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
1774
1775
|
} else if (_optionalChain([context2, 'access', _91 => _91.result, 'optionalAccess', _92 => _92.errors]) && _optionalChain([context2, 'access', _93 => _93.result, 'optionalAccess', _94 => _94.errors, 'access', _95 => _95.length]) > 0) {
|
|
1775
|
-
|
|
1776
|
+
_chunkTEEOPHLZjs.writeError.call(void 0, ` \u274C The ${context2.options.name} build failed with the following errors: ${context2.result.errors.map((error) => error.text).join("\n")}`, context2.options.config);
|
|
1776
1777
|
throw new Error(`The ${context2.options.name} build failed with the following errors: ${context2.result.errors.map((error) => error.text).join("\n")}`);
|
|
1777
1778
|
}
|
|
1778
1779
|
}
|
|
@@ -1809,8 +1810,8 @@ async function dependencyCheck(options) {
|
|
|
1809
1810
|
_chunkJ5SB6L2Ljs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
1810
1811
|
async function cleanOutputPath(context2) {
|
|
1811
1812
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
1812
|
-
|
|
1813
|
-
const stopwatch =
|
|
1813
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
1814
|
+
const stopwatch = _chunkTEEOPHLZjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
|
|
1814
1815
|
await cleanDirectories(context2.options.name, context2.options.outdir, context2.options.config);
|
|
1815
1816
|
stopwatch();
|
|
1816
1817
|
}
|
|
@@ -1818,8 +1819,8 @@ async function cleanOutputPath(context2) {
|
|
|
1818
1819
|
}
|
|
1819
1820
|
_chunkJ5SB6L2Ljs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1820
1821
|
async function build3(options) {
|
|
1821
|
-
|
|
1822
|
-
const stopwatch =
|
|
1822
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1823
|
+
const stopwatch = _chunkTEEOPHLZjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1823
1824
|
try {
|
|
1824
1825
|
const opts = Array.isArray(options) ? options : [
|
|
1825
1826
|
options
|
|
@@ -1829,9 +1830,9 @@ async function build3(options) {
|
|
|
1829
1830
|
}
|
|
1830
1831
|
void transduce.async(opts, dependencyCheck);
|
|
1831
1832
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeTypescript, executeEsBuild, copyBuildAssets, reportResults));
|
|
1832
|
-
|
|
1833
|
+
_chunkTEEOPHLZjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1833
1834
|
} catch (error) {
|
|
1834
|
-
|
|
1835
|
+
_chunkTEEOPHLZjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
1835
1836
|
throw error;
|
|
1836
1837
|
} finally {
|
|
1837
1838
|
stopwatch();
|
|
@@ -1859,9 +1860,9 @@ var watch = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (context2, opti
|
|
|
1859
1860
|
return context2.rebuild();
|
|
1860
1861
|
});
|
|
1861
1862
|
if (rebuildResult instanceof Error) {
|
|
1862
|
-
|
|
1863
|
+
_chunkTEEOPHLZjs.writeError.call(void 0, rebuildResult.message);
|
|
1863
1864
|
}
|
|
1864
|
-
|
|
1865
|
+
_chunkTEEOPHLZjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
1865
1866
|
}, 10);
|
|
1866
1867
|
changeWatcher.on("change", fastRebuild);
|
|
1867
1868
|
return void 0;
|
|
@@ -1869,7 +1870,7 @@ var watch = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (context2, opti
|
|
|
1869
1870
|
|
|
1870
1871
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1871
1872
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1872
|
-
|
|
1873
|
+
_chunkTEEOPHLZjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1873
1874
|
if (!_optionalChain([context2, 'access', _96 => _96.projectsConfigurations, 'optionalAccess', _97 => _97.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _98 => _98.projectsConfigurations, 'access', _99 => _99.projects, 'access', _100 => _100[context2.projectName], 'optionalAccess', _101 => _101.root])) {
|
|
1874
1875
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1875
1876
|
}
|
|
@@ -1923,7 +1924,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1923
1924
|
if (!_optionalChain([context2, 'optionalAccess', _110 => _110.projectName]) || !_optionalChain([context2, 'access', _111 => _111.projectsConfigurations, 'optionalAccess', _112 => _112.projects]) || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1924
1925
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
1925
1926
|
}
|
|
1926
|
-
|
|
1927
|
+
_chunkTEEOPHLZjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context2.projectName}`, config);
|
|
1927
1928
|
_sizelimit2.default.call(void 0, [
|
|
1928
1929
|
_file2.default,
|
|
1929
1930
|
_esbuild3.default,
|
|
@@ -1931,7 +1932,7 @@ async function sizeLimitExecutorFn(options, context2, config) {
|
|
|
1931
1932
|
], {
|
|
1932
1933
|
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context2, 'access', _113 => _113.projectsConfigurations, 'access', _114 => _114.projects, 'access', _115 => _115[context2.projectName], 'optionalAccess', _116 => _116.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context2, 'access', _117 => _117.projectsConfigurations, 'access', _118 => _118.projects, 'access', _119 => _119[context2.projectName], 'optionalAccess', _120 => _120.root]), () => ( "./")), "src")))
|
|
1933
1934
|
}).then((result) => {
|
|
1934
|
-
|
|
1935
|
+
_chunkTEEOPHLZjs.writeInfo.call(void 0, `\u{1F4CF} ${context2.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
1935
1936
|
});
|
|
1936
1937
|
return {
|
|
1937
1938
|
success: true
|
|
@@ -1952,11 +1953,11 @@ var _fsextra = require('fs-extra');
|
|
|
1952
1953
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1953
1954
|
async function typiaExecutorFn(options, _, config) {
|
|
1954
1955
|
if (options.clean !== false) {
|
|
1955
|
-
|
|
1956
|
+
_chunkTEEOPHLZjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1956
1957
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1957
1958
|
}
|
|
1958
1959
|
await Promise.all(options.entry.map((entry) => {
|
|
1959
|
-
|
|
1960
|
+
_chunkTEEOPHLZjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1960
1961
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1961
1962
|
input: entry,
|
|
1962
1963
|
output: options.outputPath,
|
|
@@ -1987,7 +1988,7 @@ var executor_default8 = withRunExecutor("Typia runtime validation generator", ty
|
|
|
1987
1988
|
|
|
1988
1989
|
var _jiti = require('jiti');
|
|
1989
1990
|
async function unbuildExecutorFn(options, context2, config) {
|
|
1990
|
-
|
|
1991
|
+
_chunkTEEOPHLZjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1991
1992
|
if (!_optionalChain([context2, 'access', _121 => _121.projectsConfigurations, 'optionalAccess', _122 => _122.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
|
|
1992
1993
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
1993
1994
|
}
|
|
@@ -1998,7 +1999,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
1998
1999
|
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.");
|
|
1999
2000
|
}
|
|
2000
2001
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
2001
|
-
fsCache: config.skipCache ? false :
|
|
2002
|
+
fsCache: config.skipCache ? false : _chunkTEEOPHLZjs.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
2002
2003
|
interopDefault: true
|
|
2003
2004
|
});
|
|
2004
2005
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
@@ -2011,7 +2012,7 @@ async function unbuildExecutorFn(options, context2, config) {
|
|
|
2011
2012
|
}, {
|
|
2012
2013
|
stubOptions: {
|
|
2013
2014
|
jiti: {
|
|
2014
|
-
fsCache: config.skipCache ? false :
|
|
2015
|
+
fsCache: config.skipCache ? false : _chunkTEEOPHLZjs.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
|
|
2015
2016
|
}
|
|
2016
2017
|
},
|
|
2017
2018
|
rollup: {
|
|
@@ -2059,34 +2060,34 @@ var executor_default9 = withRunExecutor("TypeScript Unbuild build", unbuildExecu
|
|
|
2059
2060
|
var withRunGenerator = /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
2060
2061
|
skipReadingConfig: false
|
|
2061
2062
|
}) => async (tree, _options) => {
|
|
2062
|
-
const stopwatch =
|
|
2063
|
+
const stopwatch = _chunkTEEOPHLZjs.getStopwatch.call(void 0, name);
|
|
2063
2064
|
let options = _options;
|
|
2064
2065
|
let config;
|
|
2065
2066
|
try {
|
|
2066
|
-
|
|
2067
|
+
_chunkTEEOPHLZjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
2067
2068
|
|
|
2068
2069
|
`, config);
|
|
2069
|
-
const workspaceRoot3 =
|
|
2070
|
+
const workspaceRoot3 = _chunkTEEOPHLZjs.findWorkspaceRoot.call(void 0, );
|
|
2070
2071
|
if (!generatorOptions.skipReadingConfig) {
|
|
2071
|
-
|
|
2072
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
2072
2073
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
2073
|
-
config = await
|
|
2074
|
+
config = await _chunkXFPT4O23js.getConfig.call(void 0, workspaceRoot3);
|
|
2074
2075
|
}
|
|
2075
2076
|
if (_optionalChain([generatorOptions, 'optionalAccess', _123 => _123.hooks, 'optionalAccess', _124 => _124.applyDefaultOptions])) {
|
|
2076
|
-
|
|
2077
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
2077
2078
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
2078
|
-
|
|
2079
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
2079
2080
|
}
|
|
2080
|
-
|
|
2081
|
+
_chunkTEEOPHLZjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
|
|
2081
2082
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
|
|
2082
2083
|
const tokenized = await applyWorkspaceTokens(options, {
|
|
2083
2084
|
workspaceRoot: tree.root,
|
|
2084
2085
|
config
|
|
2085
2086
|
}, applyWorkspaceBaseTokens);
|
|
2086
2087
|
if (_optionalChain([generatorOptions, 'optionalAccess', _125 => _125.hooks, 'optionalAccess', _126 => _126.preProcess])) {
|
|
2087
|
-
|
|
2088
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
2088
2089
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
2089
|
-
|
|
2090
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
2090
2091
|
}
|
|
2091
2092
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
2092
2093
|
if (result) {
|
|
@@ -2099,18 +2100,18 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
2099
2100
|
}
|
|
2100
2101
|
}
|
|
2101
2102
|
if (_optionalChain([generatorOptions, 'optionalAccess', _136 => _136.hooks, 'optionalAccess', _137 => _137.postProcess])) {
|
|
2102
|
-
|
|
2103
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
2103
2104
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
2104
|
-
|
|
2105
|
+
_chunkTEEOPHLZjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
2105
2106
|
}
|
|
2106
2107
|
return () => {
|
|
2107
|
-
|
|
2108
|
+
_chunkTEEOPHLZjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
2108
2109
|
`, config);
|
|
2109
2110
|
};
|
|
2110
2111
|
} catch (error) {
|
|
2111
2112
|
return () => {
|
|
2112
|
-
|
|
2113
|
-
|
|
2113
|
+
_chunkTEEOPHLZjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
2114
|
+
_chunkTEEOPHLZjs.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
2114
2115
|
- Details: ${error.message}
|
|
2115
2116
|
- Stacktrace: ${error.stack}`, config);
|
|
2116
2117
|
};
|
|
@@ -2156,7 +2157,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2156
2157
|
const projectConfig = {
|
|
2157
2158
|
root: normalized.directory,
|
|
2158
2159
|
projectType: "library",
|
|
2159
|
-
sourceRoot:
|
|
2160
|
+
sourceRoot: _chunkTEEOPHLZjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
2160
2161
|
targets: {
|
|
2161
2162
|
build: {
|
|
2162
2163
|
executor: options.buildExecutor,
|
|
@@ -2165,11 +2166,11 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2165
2166
|
],
|
|
2166
2167
|
options: {
|
|
2167
2168
|
entry: [
|
|
2168
|
-
|
|
2169
|
+
_chunkTEEOPHLZjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")
|
|
2169
2170
|
],
|
|
2170
2171
|
outputPath: getOutputPath(normalized),
|
|
2171
|
-
tsconfig:
|
|
2172
|
-
project:
|
|
2172
|
+
tsconfig: _chunkTEEOPHLZjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
2173
|
+
project: _chunkTEEOPHLZjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
2173
2174
|
defaultConfiguration: "production",
|
|
2174
2175
|
platform: "neutral",
|
|
2175
2176
|
assets: [
|
|
@@ -2223,7 +2224,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2223
2224
|
if (!normalized.importPath) {
|
|
2224
2225
|
normalized.importPath = normalized.name;
|
|
2225
2226
|
}
|
|
2226
|
-
const packageJsonPath =
|
|
2227
|
+
const packageJsonPath = _chunkTEEOPHLZjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
2227
2228
|
if (tree.exists(packageJsonPath)) {
|
|
2228
2229
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2229
2230
|
if (!normalized.importPath) {
|
|
@@ -2280,10 +2281,10 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2280
2281
|
}));
|
|
2281
2282
|
}
|
|
2282
2283
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
2283
|
-
|
|
2284
|
+
_chunkTEEOPHLZjs.joinPaths.call(void 0, normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
|
|
2284
2285
|
]);
|
|
2285
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2286
|
-
|
|
2286
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkTEEOPHLZjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
2287
|
+
_chunkTEEOPHLZjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
2287
2288
|
]);
|
|
2288
2289
|
if (tree.exists("package.json")) {
|
|
2289
2290
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2294,7 +2295,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2294
2295
|
description = packageJson.description;
|
|
2295
2296
|
}
|
|
2296
2297
|
}
|
|
2297
|
-
const tsconfigPath =
|
|
2298
|
+
const tsconfigPath = _chunkTEEOPHLZjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
2298
2299
|
if (tree.exists(tsconfigPath)) {
|
|
2299
2300
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2300
2301
|
json.composite ??= true;
|
|
@@ -2332,7 +2333,7 @@ function getOutputPath(options) {
|
|
|
2332
2333
|
} else {
|
|
2333
2334
|
parts.push(options.projectRoot);
|
|
2334
2335
|
}
|
|
2335
|
-
return
|
|
2336
|
+
return _chunkTEEOPHLZjs.joinPaths.call(void 0, ...parts);
|
|
2336
2337
|
}
|
|
2337
2338
|
_chunkJ5SB6L2Ljs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
2338
2339
|
function createProjectTsConfigJson(tree, options) {
|
|
@@ -2341,7 +2342,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2341
2342
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _149 => _149.tsconfigOptions]), () => ( {})),
|
|
2342
2343
|
compilerOptions: {
|
|
2343
2344
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2344
|
-
outDir:
|
|
2345
|
+
outDir: _chunkTEEOPHLZjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2345
2346
|
noEmit: true,
|
|
2346
2347
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _150 => _150.tsconfigOptions, 'optionalAccess', _151 => _151.compilerOptions]), () => ( {}))
|
|
2347
2348
|
},
|
|
@@ -2361,7 +2362,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2361
2362
|
"src/**/*.test.ts"
|
|
2362
2363
|
]
|
|
2363
2364
|
};
|
|
2364
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2365
|
+
_devkit.writeJson.call(void 0, tree, _chunkTEEOPHLZjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2365
2366
|
}
|
|
2366
2367
|
_chunkJ5SB6L2Ljs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2367
2368
|
async function normalizeOptions(tree, options, config) {
|
|
@@ -2421,7 +2422,7 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, normalizeOptions, "normalizeOptions");
|
|
|
2421
2422
|
|
|
2422
2423
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2423
2424
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
2424
|
-
const filesDir =
|
|
2425
|
+
const filesDir = _chunkTEEOPHLZjs.joinPaths.call(void 0, __dirname, "src", "generators", "browser-library", "files");
|
|
2425
2426
|
const tsLibraryGeneratorOptions = {
|
|
2426
2427
|
buildExecutor: "@storm-software/workspace-tools:unbuild",
|
|
2427
2428
|
platform: "browser",
|
|
@@ -2493,19 +2494,19 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
2493
2494
|
|
|
2494
2495
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
2495
2496
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0,
|
|
2497
|
+
_chunkTEEOPHLZjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
|
|
2498
|
+
_chunkTEEOPHLZjs.writeTrace.call(void 0, `Determining the Storm Workspace Configuration JSON Schema...`, config);
|
|
2499
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkTEEOPHLZjs.stormWorkspaceConfigSchema, {
|
|
2499
2500
|
name: "StormWorkspaceConfiguration"
|
|
2500
2501
|
});
|
|
2501
|
-
|
|
2502
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _160 => _160.workspaceRoot]), () => (
|
|
2503
|
-
|
|
2502
|
+
_chunkTEEOPHLZjs.writeTrace.call(void 0, jsonSchema, config);
|
|
2503
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _160 => _160.workspaceRoot]), () => ( _chunkTEEOPHLZjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _161 => _161.outputFile, 'optionalAccess', _162 => _162.startsWith, 'call', _163 => _163("./")]) ? "" : "./");
|
|
2504
|
+
_chunkTEEOPHLZjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
2504
2505
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
2505
2506
|
spaces: 2
|
|
2506
2507
|
});
|
|
2507
2508
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2508
|
-
|
|
2509
|
+
_chunkTEEOPHLZjs.writeSuccess.call(void 0, "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!", config);
|
|
2509
2510
|
return {
|
|
2510
2511
|
success: true
|
|
2511
2512
|
};
|
|
@@ -2526,7 +2527,7 @@ var generator_default2 = withRunGenerator("Configuration Schema Creator", config
|
|
|
2526
2527
|
// ../workspace-tools/src/generators/neutral-library/generator.ts
|
|
2527
2528
|
|
|
2528
2529
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
2529
|
-
const filesDir =
|
|
2530
|
+
const filesDir = _chunkTEEOPHLZjs.joinPaths.call(void 0, __dirname, "src", "generators", "neutral-library", "files");
|
|
2530
2531
|
const tsLibraryGeneratorOptions = {
|
|
2531
2532
|
...schema,
|
|
2532
2533
|
platform: "neutral",
|
|
@@ -2569,7 +2570,7 @@ var generator_default3 = withRunGenerator("TypeScript Library Creator (Neutral P
|
|
|
2569
2570
|
// ../workspace-tools/src/generators/node-library/generator.ts
|
|
2570
2571
|
|
|
2571
2572
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
2572
|
-
const filesDir =
|
|
2573
|
+
const filesDir = _chunkTEEOPHLZjs.joinPaths.call(void 0, __dirname, "src", "generators", "node-library", "files");
|
|
2573
2574
|
const tsLibraryGeneratorOptions = {
|
|
2574
2575
|
platform: "node",
|
|
2575
2576
|
devDependencies: {
|