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