@storm-software/cloudflare-tools 0.71.51 → 0.71.53
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 +25 -0
- package/README.md +1 -1
- package/dist/{chunk-ZVAXGNHM.js → chunk-2KWRE5Y5.js} +6 -5
- package/dist/{chunk-XTJO7LT5.mjs → chunk-3SX7VAO7.mjs} +3 -3
- package/dist/{chunk-KP72CV3N.mjs → chunk-52X4GPEN.mjs} +6 -5
- package/dist/{chunk-ZRPMDJJU.js → chunk-5YGEOERJ.js} +4 -4
- package/dist/{chunk-FZGJMP4V.js → chunk-6JVDTXHT.js} +5 -5
- package/dist/{chunk-WKCHZUJS.js → chunk-IH7USDLX.js} +18 -18
- package/dist/{chunk-FDCEXUQG.mjs → chunk-KDPVEDXB.mjs} +2 -2
- package/dist/{chunk-E627MH4W.js → chunk-NSRFFUDV.js} +13 -13
- package/dist/{chunk-FJC6NTFV.mjs → chunk-OPXJUL5V.mjs} +1 -1
- package/dist/{chunk-LRWE7JIO.mjs → chunk-P42MQNVF.mjs} +1 -1
- package/dist/{chunk-U63JI4YT.js → chunk-QWSTQIUA.js} +34 -34
- package/dist/{chunk-EEHCZLIG.js → chunk-SVDNIWTG.js} +167 -167
- package/dist/{chunk-NCITNS4G.mjs → chunk-XSHLEP6G.mjs} +4 -4
- package/dist/{chunk-3ZVMYKST.mjs → chunk-Z32NCHCF.mjs} +3 -3
- 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.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 +5 -5
|
@@ -8,7 +8,7 @@ var _chunkN7FW365Qjs = require('./chunk-N7FW365Q.js');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkQWSTQIUAjs = require('./chunk-QWSTQIUA.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -24,7 +24,7 @@ var _chunkU63JI4YTjs = require('./chunk-U63JI4YT.js');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunk2KWRE5Y5js = require('./chunk-2KWRE5Y5.js');
|
|
28
28
|
|
|
29
29
|
// ../config-tools/src/utilities/apply-workspace-tokens.ts
|
|
30
30
|
var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
@@ -61,7 +61,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
|
61
61
|
if (result.includes("{workspaceRoot}")) {
|
|
62
62
|
result = result.replaceAll(
|
|
63
63
|
"{workspaceRoot}",
|
|
64
|
-
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => (
|
|
64
|
+
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => ( _chunkQWSTQIUAjs.findWorkspaceRoot.call(void 0, )))
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
return result;
|
|
@@ -101,7 +101,7 @@ var applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
|
|
|
101
101
|
// ../workspace-tools/src/base/base-executor.ts
|
|
102
102
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
103
103
|
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
104
|
-
const stopwatch =
|
|
104
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, name);
|
|
105
105
|
let options = _options;
|
|
106
106
|
let config = {};
|
|
107
107
|
try {
|
|
@@ -110,17 +110,17 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
110
110
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
|
-
const workspaceRoot2 =
|
|
113
|
+
const workspaceRoot2 = _chunkQWSTQIUAjs.findWorkspaceRoot.call(void 0, );
|
|
114
114
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot2;
|
|
115
115
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot2;
|
|
116
116
|
const projectName = context.projectName;
|
|
117
117
|
config.workspaceRoot = workspaceRoot2;
|
|
118
|
-
|
|
119
|
-
`${
|
|
118
|
+
_chunk2KWRE5Y5js.writeInfo.call(void 0,
|
|
119
|
+
`${_chunk2KWRE5Y5js.brandIcon.call(void 0, config)} Running the ${name} executor for ${projectName} `,
|
|
120
120
|
config
|
|
121
121
|
);
|
|
122
122
|
if (!executorOptions.skipReadingConfig) {
|
|
123
|
-
|
|
123
|
+
_chunk2KWRE5Y5js.writeTrace.call(void 0,
|
|
124
124
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
125
125
|
- workspaceRoot: ${workspaceRoot2}
|
|
126
126
|
- projectRoot: ${projectRoot}
|
|
@@ -129,18 +129,18 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
129
129
|
`,
|
|
130
130
|
config
|
|
131
131
|
);
|
|
132
|
-
config = await
|
|
132
|
+
config = await _chunkQWSTQIUAjs.getConfig.call(void 0, workspaceRoot2);
|
|
133
133
|
}
|
|
134
134
|
if (_optionalChain([executorOptions, 'optionalAccess', _7 => _7.hooks, 'optionalAccess', _8 => _8.applyDefaultOptions])) {
|
|
135
|
-
|
|
135
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
136
136
|
options = await Promise.resolve(
|
|
137
137
|
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
138
138
|
);
|
|
139
|
-
|
|
139
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
140
140
|
}
|
|
141
|
-
|
|
141
|
+
_chunk2KWRE5Y5js.writeTrace.call(void 0,
|
|
142
142
|
`Executor schema options \u2699\uFE0F
|
|
143
|
-
${
|
|
143
|
+
${_chunk2KWRE5Y5js.formatLogMessage.call(void 0, options)}
|
|
144
144
|
`,
|
|
145
145
|
config
|
|
146
146
|
);
|
|
@@ -153,18 +153,18 @@ ${_chunkZVAXGNHMjs.formatLogMessage.call(void 0, options)}
|
|
|
153
153
|
),
|
|
154
154
|
applyWorkspaceProjectTokens
|
|
155
155
|
);
|
|
156
|
-
|
|
156
|
+
_chunk2KWRE5Y5js.writeTrace.call(void 0,
|
|
157
157
|
`Executor schema tokenized options \u2699\uFE0F
|
|
158
|
-
${
|
|
158
|
+
${_chunk2KWRE5Y5js.formatLogMessage.call(void 0, tokenized)}
|
|
159
159
|
`,
|
|
160
160
|
config
|
|
161
161
|
);
|
|
162
162
|
if (_optionalChain([executorOptions, 'optionalAccess', _9 => _9.hooks, 'optionalAccess', _10 => _10.preProcess])) {
|
|
163
|
-
|
|
163
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
164
164
|
await Promise.resolve(
|
|
165
165
|
executorOptions.hooks.preProcess(tokenized, config)
|
|
166
166
|
);
|
|
167
|
-
|
|
167
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
168
168
|
}
|
|
169
169
|
const ret = executorFn(tokenized, context, config);
|
|
170
170
|
if (_isFunction(_optionalChain([ret, 'optionalAccess', _11 => _11.next]))) {
|
|
@@ -179,7 +179,7 @@ ${_chunkZVAXGNHMjs.formatLogMessage.call(void 0, tokenized)}
|
|
|
179
179
|
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")) {
|
|
180
180
|
throw new Error(
|
|
181
181
|
`Failure determined while running the ${name} executor
|
|
182
|
-
${
|
|
182
|
+
${_chunk2KWRE5Y5js.formatLogMessage.call(void 0,
|
|
183
183
|
result
|
|
184
184
|
)}`,
|
|
185
185
|
{
|
|
@@ -188,21 +188,21 @@ ${_chunkZVAXGNHMjs.formatLogMessage.call(void 0,
|
|
|
188
188
|
);
|
|
189
189
|
}
|
|
190
190
|
if (_optionalChain([executorOptions, 'optionalAccess', _21 => _21.hooks, 'optionalAccess', _22 => _22.postProcess])) {
|
|
191
|
-
|
|
191
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
192
192
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
193
|
-
|
|
193
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
194
194
|
}
|
|
195
|
-
|
|
195
|
+
_chunk2KWRE5Y5js.writeSuccess.call(void 0, `Completed running the ${name} task executor!
|
|
196
196
|
`, config);
|
|
197
197
|
return {
|
|
198
198
|
success: true
|
|
199
199
|
};
|
|
200
200
|
} catch (error) {
|
|
201
|
-
|
|
201
|
+
_chunk2KWRE5Y5js.writeFatal.call(void 0,
|
|
202
202
|
"A fatal error occurred while running the executor - the process was forced to terminate",
|
|
203
203
|
config
|
|
204
204
|
);
|
|
205
|
-
|
|
205
|
+
_chunk2KWRE5Y5js.writeError.call(void 0,
|
|
206
206
|
`An exception was thrown in the executor's process
|
|
207
207
|
- Details: ${error.message}
|
|
208
208
|
- Stacktrace: ${error.stack}`,
|
|
@@ -513,9 +513,9 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
513
513
|
output: "src/"
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
|
-
|
|
516
|
+
_chunk2KWRE5Y5js.writeTrace.call(void 0,
|
|
517
517
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
518
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
518
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunk2KWRE5Y5js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
519
519
|
config
|
|
520
520
|
);
|
|
521
521
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
@@ -525,20 +525,20 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
525
525
|
assets: pendingAssets
|
|
526
526
|
});
|
|
527
527
|
await assetHandler.processAllAssetsOnce();
|
|
528
|
-
|
|
528
|
+
_chunk2KWRE5Y5js.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
529
529
|
if (includeSrc === true) {
|
|
530
|
-
|
|
531
|
-
`\u{1F4DD} Adding banner and writing source files: ${
|
|
530
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0,
|
|
531
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
532
532
|
outputPath,
|
|
533
533
|
"src"
|
|
534
534
|
)}`,
|
|
535
535
|
config
|
|
536
536
|
);
|
|
537
537
|
const files = await _glob.glob.call(void 0, [
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
538
|
+
_chunk2KWRE5Y5js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
539
|
+
_chunk2KWRE5Y5js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
540
|
+
_chunk2KWRE5Y5js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
541
|
+
_chunk2KWRE5Y5js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
542
542
|
]);
|
|
543
543
|
await Promise.allSettled(
|
|
544
544
|
files.map(
|
|
@@ -593,7 +593,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
593
593
|
)) {
|
|
594
594
|
const projectNode = project.node;
|
|
595
595
|
if (projectNode.data.root) {
|
|
596
|
-
const projectPackageJsonPath =
|
|
596
|
+
const projectPackageJsonPath = _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
597
597
|
workspaceRoot2,
|
|
598
598
|
projectNode.data.root,
|
|
599
599
|
"package.json"
|
|
@@ -611,11 +611,11 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
613
|
if (localPackages.length > 0) {
|
|
614
|
-
|
|
614
|
+
_chunk2KWRE5Y5js.writeTrace.call(void 0,
|
|
615
615
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
616
616
|
);
|
|
617
617
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
618
|
-
|
|
618
|
+
_chunk2KWRE5Y5js.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
619
619
|
"utf8"
|
|
620
620
|
);
|
|
621
621
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -628,7 +628,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
628
628
|
}
|
|
629
629
|
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) => {
|
|
630
630
|
if (_optionalChain([projectConfigurations, 'access', _42 => _42.projects, 'optionalAccess', _43 => _43[dep]])) {
|
|
631
|
-
const depPackageJsonPath =
|
|
631
|
+
const depPackageJsonPath = _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
632
632
|
workspaceRoot2,
|
|
633
633
|
projectConfigurations.projects[dep].root,
|
|
634
634
|
"package.json"
|
|
@@ -659,14 +659,14 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
659
659
|
return ret;
|
|
660
660
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
661
661
|
} else {
|
|
662
|
-
|
|
662
|
+
_chunk2KWRE5Y5js.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
663
663
|
}
|
|
664
664
|
return packageJson;
|
|
665
665
|
};
|
|
666
666
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
667
|
-
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
667
|
+
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkQWSTQIUAjs.findWorkspaceRoot.call(void 0, );
|
|
668
668
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
669
|
-
|
|
669
|
+
_chunk2KWRE5Y5js.joinPaths.call(void 0, workspaceRoot2, "package.json"),
|
|
670
670
|
"utf8"
|
|
671
671
|
);
|
|
672
672
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -677,7 +677,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
677
677
|
if (distSrc.startsWith("/")) {
|
|
678
678
|
distSrc = distSrc.substring(1);
|
|
679
679
|
}
|
|
680
|
-
packageJson.source ??= `${
|
|
680
|
+
packageJson.source ??= `${_chunk2KWRE5Y5js.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
681
681
|
}
|
|
682
682
|
packageJson.files ??= ["dist/**/*"];
|
|
683
683
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -702,7 +702,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
702
702
|
packageJson.contributors = [packageJson.author];
|
|
703
703
|
}
|
|
704
704
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
705
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
705
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk2KWRE5Y5js.joinPaths.call(void 0, "packages", projectName);
|
|
706
706
|
return packageJson;
|
|
707
707
|
};
|
|
708
708
|
var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
@@ -756,11 +756,11 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
|
756
756
|
// ../esbuild/src/assets.ts
|
|
757
757
|
async function copyBuildAssets(context) {
|
|
758
758
|
if (!_optionalChain([context, 'access', _52 => _52.result, 'optionalAccess', _53 => _53.errors, 'access', _54 => _54.length]) && _optionalChain([context, 'access', _55 => _55.options, 'access', _56 => _56.assets, 'optionalAccess', _57 => _57.length])) {
|
|
759
|
-
|
|
759
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0,
|
|
760
760
|
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
|
|
761
761
|
context.workspaceConfig
|
|
762
762
|
);
|
|
763
|
-
const stopwatch =
|
|
763
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
764
764
|
await copyAssets(
|
|
765
765
|
context.workspaceConfig,
|
|
766
766
|
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
@@ -841,15 +841,15 @@ async function resolveContext(userOptions) {
|
|
|
841
841
|
if (!workspaceRoot2) {
|
|
842
842
|
throw new Error("Cannot find Nx workspace root");
|
|
843
843
|
}
|
|
844
|
-
const workspaceConfig = await
|
|
844
|
+
const workspaceConfig = await _chunkQWSTQIUAjs.getWorkspaceConfig.call(void 0, true, {
|
|
845
845
|
workspaceRoot: workspaceRoot2.dir
|
|
846
846
|
});
|
|
847
|
-
|
|
848
|
-
const stopwatch =
|
|
847
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
848
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, "Build options resolution");
|
|
849
849
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
850
850
|
exitOnError: true
|
|
851
851
|
});
|
|
852
|
-
const projectJsonPath =
|
|
852
|
+
const projectJsonPath = _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
853
853
|
workspaceRoot2.dir,
|
|
854
854
|
projectRoot,
|
|
855
855
|
"project.json"
|
|
@@ -868,7 +868,7 @@ async function resolveContext(userOptions) {
|
|
|
868
868
|
}
|
|
869
869
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
870
870
|
options.name ??= projectName;
|
|
871
|
-
const packageJsonPath =
|
|
871
|
+
const packageJsonPath = _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
872
872
|
workspaceRoot2.dir,
|
|
873
873
|
options.projectRoot,
|
|
874
874
|
"package.json"
|
|
@@ -880,7 +880,7 @@ async function resolveContext(userOptions) {
|
|
|
880
880
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
881
881
|
const resolvedOptions = {
|
|
882
882
|
...options,
|
|
883
|
-
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig :
|
|
883
|
+
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : _chunk2KWRE5Y5js.joinPaths.call(void 0, workspaceRoot2.dir, projectRoot, "tsconfig.json"),
|
|
884
884
|
metafile: userOptions.mode === "development",
|
|
885
885
|
clean: false,
|
|
886
886
|
env,
|
|
@@ -905,8 +905,8 @@ async function resolveContext(userOptions) {
|
|
|
905
905
|
projectConfigurations,
|
|
906
906
|
projectName,
|
|
907
907
|
projectGraph,
|
|
908
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
909
|
-
outputPath: resolvedOptions.outputPath ||
|
|
908
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunk2KWRE5Y5js.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
909
|
+
outputPath: resolvedOptions.outputPath || _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
910
910
|
workspaceConfig.workspaceRoot,
|
|
911
911
|
"dist",
|
|
912
912
|
resolvedOptions.projectRoot
|
|
@@ -915,10 +915,10 @@ async function resolveContext(userOptions) {
|
|
|
915
915
|
};
|
|
916
916
|
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
917
917
|
if (context.options.verbose) {
|
|
918
|
-
|
|
918
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0,
|
|
919
919
|
` \u2699\uFE0F Build options resolved:
|
|
920
920
|
|
|
921
|
-
${
|
|
921
|
+
${_chunk2KWRE5Y5js.formatLogMessage.call(void 0, context.options)}`,
|
|
922
922
|
workspaceConfig
|
|
923
923
|
);
|
|
924
924
|
}
|
|
@@ -930,10 +930,10 @@ ${_chunkZVAXGNHMjs.formatLogMessage.call(void 0, context.options)}`,
|
|
|
930
930
|
|
|
931
931
|
|
|
932
932
|
async function generatePackageJson(context) {
|
|
933
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
934
|
-
|
|
935
|
-
const stopwatch =
|
|
936
|
-
const packageJsonPath =
|
|
933
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunk2KWRE5Y5js.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
934
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
935
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, "Write package.json file");
|
|
936
|
+
const packageJsonPath = _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
937
937
|
context.options.projectRoot,
|
|
938
938
|
"project.json"
|
|
939
939
|
);
|
|
@@ -941,7 +941,7 @@ async function generatePackageJson(context) {
|
|
|
941
941
|
throw new Error("Cannot find package.json configuration");
|
|
942
942
|
}
|
|
943
943
|
const packageJsonFile = await _promises2.default.readFile(
|
|
944
|
-
|
|
944
|
+
_chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
945
945
|
context.workspaceConfig.workspaceRoot,
|
|
946
946
|
context.options.projectRoot,
|
|
947
947
|
"package.json"
|
|
@@ -1047,7 +1047,7 @@ async function generatePackageJson(context) {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
}
|
|
1049
1049
|
await _devkit.writeJsonFile.call(void 0,
|
|
1050
|
-
|
|
1050
|
+
_chunk2KWRE5Y5js.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
1051
1051
|
packageJson
|
|
1052
1052
|
);
|
|
1053
1053
|
stopwatch();
|
|
@@ -1059,12 +1059,12 @@ async function generatePackageJson(context) {
|
|
|
1059
1059
|
var _tsup = require('tsup');
|
|
1060
1060
|
async function build(options) {
|
|
1061
1061
|
if (!options.silent) {
|
|
1062
|
-
|
|
1062
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0,
|
|
1063
1063
|
` \u{1F680} Running ${options.name || "tsup"} build`,
|
|
1064
1064
|
options.workspaceConfig
|
|
1065
1065
|
);
|
|
1066
1066
|
}
|
|
1067
|
-
const stopwatch =
|
|
1067
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, `${options.name || "tsup"} build`);
|
|
1068
1068
|
await _tsup.build.call(void 0, options);
|
|
1069
1069
|
if (!options.silent) {
|
|
1070
1070
|
stopwatch();
|
|
@@ -1073,14 +1073,14 @@ async function build(options) {
|
|
|
1073
1073
|
|
|
1074
1074
|
// ../esbuild/src/tsup.ts
|
|
1075
1075
|
async function executeTsup(context) {
|
|
1076
|
-
|
|
1076
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0,
|
|
1077
1077
|
` \u{1F680} Running ${context.options.name} build`,
|
|
1078
1078
|
context.workspaceConfig
|
|
1079
1079
|
);
|
|
1080
|
-
const stopwatch =
|
|
1080
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
1081
1081
|
await build({
|
|
1082
1082
|
...context.options,
|
|
1083
|
-
outDir: context.options.distDir ?
|
|
1083
|
+
outDir: context.options.distDir ? _chunk2KWRE5Y5js.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
1084
1084
|
workspaceConfig: context.workspaceConfig
|
|
1085
1085
|
});
|
|
1086
1086
|
stopwatch();
|
|
@@ -1091,17 +1091,17 @@ async function executeTsup(context) {
|
|
|
1091
1091
|
async function reportResults(context) {
|
|
1092
1092
|
if (_optionalChain([context, 'access', _60 => _60.result, 'optionalAccess', _61 => _61.errors, 'access', _62 => _62.length]) === 0) {
|
|
1093
1093
|
if (context.result.warnings.length > 0) {
|
|
1094
|
-
|
|
1094
|
+
_chunk2KWRE5Y5js.writeWarning.call(void 0,
|
|
1095
1095
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
1096
1096
|
context.workspaceConfig
|
|
1097
1097
|
);
|
|
1098
1098
|
}
|
|
1099
|
-
|
|
1099
|
+
_chunk2KWRE5Y5js.writeSuccess.call(void 0,
|
|
1100
1100
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
1101
1101
|
context.workspaceConfig
|
|
1102
1102
|
);
|
|
1103
1103
|
} else if (_optionalChain([context, 'access', _63 => _63.result, 'optionalAccess', _64 => _64.errors]) && _optionalChain([context, 'access', _65 => _65.result, 'optionalAccess', _66 => _66.errors, 'access', _67 => _67.length]) > 0) {
|
|
1104
|
-
|
|
1104
|
+
_chunk2KWRE5Y5js.writeError.call(void 0,
|
|
1105
1105
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
1106
1106
|
context.workspaceConfig
|
|
1107
1107
|
);
|
|
@@ -1112,19 +1112,19 @@ async function reportResults(context) {
|
|
|
1112
1112
|
}
|
|
1113
1113
|
async function cleanOutputPath(context) {
|
|
1114
1114
|
if (context.clean !== false && context.outputPath) {
|
|
1115
|
-
|
|
1115
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0,
|
|
1116
1116
|
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
1117
1117
|
context.workspaceConfig
|
|
1118
1118
|
);
|
|
1119
|
-
const stopwatch =
|
|
1119
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
1120
1120
|
await cleanDirectories(context.outputPath);
|
|
1121
1121
|
stopwatch();
|
|
1122
1122
|
}
|
|
1123
1123
|
return context;
|
|
1124
1124
|
}
|
|
1125
1125
|
async function build2(options) {
|
|
1126
|
-
|
|
1127
|
-
const stopwatch =
|
|
1126
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, ` ${_chunk2KWRE5Y5js.brandIcon.call(void 0, )} Executing Storm ESBuild pipeline`);
|
|
1127
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1128
1128
|
try {
|
|
1129
1129
|
const opts = Array.isArray(options) ? options : [options];
|
|
1130
1130
|
if (opts.length === 0) {
|
|
@@ -1139,9 +1139,9 @@ async function build2(options) {
|
|
|
1139
1139
|
executeTsup(context)
|
|
1140
1140
|
]);
|
|
1141
1141
|
await reportResults(context);
|
|
1142
|
-
|
|
1142
|
+
_chunk2KWRE5Y5js.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1143
1143
|
} catch (error) {
|
|
1144
|
-
|
|
1144
|
+
_chunk2KWRE5Y5js.writeFatal.call(void 0,
|
|
1145
1145
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1146
1146
|
);
|
|
1147
1147
|
throw error;
|
|
@@ -1152,7 +1152,7 @@ async function build2(options) {
|
|
|
1152
1152
|
|
|
1153
1153
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1154
1154
|
async function esbuildExecutorFn(options, context, config) {
|
|
1155
|
-
|
|
1155
|
+
_chunk2KWRE5Y5js.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1156
1156
|
if (!_optionalChain([context, 'access', _68 => _68.projectsConfigurations, 'optionalAccess', _69 => _69.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _70 => _70.projectsConfigurations, 'access', _71 => _71.projects, 'access', _72 => _72[context.projectName], 'optionalAccess', _73 => _73.root])) {
|
|
1157
1157
|
throw new Error(
|
|
1158
1158
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1194,7 +1194,7 @@ var _jiti = require('jiti');
|
|
|
1194
1194
|
var _fileutils = require('nx/src/utils/fileutils');
|
|
1195
1195
|
async function napiExecutor(options, context, config) {
|
|
1196
1196
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1197
|
-
fsCache: config.skipCache ? false :
|
|
1197
|
+
fsCache: config.skipCache ? false : _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
1198
1198
|
config.workspaceRoot,
|
|
1199
1199
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1200
1200
|
"jiti"
|
|
@@ -1210,53 +1210,53 @@ async function napiExecutor(options, context, config) {
|
|
|
1210
1210
|
);
|
|
1211
1211
|
}
|
|
1212
1212
|
const projectRoot = _optionalChain([context, 'access', _85 => _85.projectGraph, 'optionalAccess', _86 => _86.nodes, 'access', _87 => _87[_nullishCoalesce(context.projectName, () => ( ""))], 'access', _88 => _88.data, 'access', _89 => _89.root]);
|
|
1213
|
-
const packageJson =
|
|
1213
|
+
const packageJson = _chunk2KWRE5Y5js.joinPaths.call(void 0, _nullishCoalesce(projectRoot, () => ( ".")), "package.json");
|
|
1214
1214
|
if (!_fileutils.fileExists.call(void 0, packageJson)) {
|
|
1215
1215
|
throw new Error(`Could not find package.json at ${packageJson}`);
|
|
1216
1216
|
}
|
|
1217
1217
|
const napi = new NapiCli();
|
|
1218
1218
|
const normalizedOptions = { ...options };
|
|
1219
1219
|
const metadata = cargoMetadata();
|
|
1220
|
-
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _90 => _90.target_directory]) ||
|
|
1220
|
+
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _90 => _90.target_directory]) || _chunk2KWRE5Y5js.joinPaths.call(void 0, config.workspaceRoot, "dist", "target");
|
|
1221
1221
|
normalizedOptions.outputDir = options.outputPath;
|
|
1222
1222
|
normalizedOptions.packageJsonPath = options.packageJsonPath || packageJson;
|
|
1223
1223
|
if (options.cwd) {
|
|
1224
|
-
normalizedOptions.cwd =
|
|
1224
|
+
normalizedOptions.cwd = _chunk2KWRE5Y5js.correctPaths.call(void 0, options.cwd);
|
|
1225
1225
|
} else {
|
|
1226
|
-
normalizedOptions.cwd =
|
|
1227
|
-
const absoluteProjectRoot =
|
|
1226
|
+
normalizedOptions.cwd = _chunk2KWRE5Y5js.correctPaths.call(void 0, projectRoot);
|
|
1227
|
+
const absoluteProjectRoot = _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
1228
1228
|
config.workspaceRoot,
|
|
1229
1229
|
projectRoot || "."
|
|
1230
1230
|
);
|
|
1231
1231
|
if (normalizedOptions.outputDir) {
|
|
1232
|
-
normalizedOptions.outputDir =
|
|
1232
|
+
normalizedOptions.outputDir = _chunk2KWRE5Y5js.relative.call(void 0,
|
|
1233
1233
|
absoluteProjectRoot,
|
|
1234
|
-
|
|
1235
|
-
|
|
1234
|
+
_chunk2KWRE5Y5js.correctPaths.call(void 0,
|
|
1235
|
+
_chunk2KWRE5Y5js.isAbsolute.call(void 0, normalizedOptions.outputDir) ? normalizedOptions.outputDir : _chunk2KWRE5Y5js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.outputDir)
|
|
1236
1236
|
)
|
|
1237
1237
|
);
|
|
1238
1238
|
}
|
|
1239
1239
|
if (normalizedOptions.packageJsonPath) {
|
|
1240
|
-
normalizedOptions.packageJsonPath =
|
|
1240
|
+
normalizedOptions.packageJsonPath = _chunk2KWRE5Y5js.relative.call(void 0,
|
|
1241
1241
|
absoluteProjectRoot,
|
|
1242
|
-
|
|
1243
|
-
|
|
1242
|
+
_chunk2KWRE5Y5js.correctPaths.call(void 0,
|
|
1243
|
+
_chunk2KWRE5Y5js.isAbsolute.call(void 0, normalizedOptions.packageJsonPath) ? normalizedOptions.packageJsonPath : _chunk2KWRE5Y5js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.packageJsonPath)
|
|
1244
1244
|
)
|
|
1245
1245
|
);
|
|
1246
1246
|
}
|
|
1247
1247
|
if (normalizedOptions.configPath) {
|
|
1248
|
-
normalizedOptions.configPath =
|
|
1248
|
+
normalizedOptions.configPath = _chunk2KWRE5Y5js.relative.call(void 0,
|
|
1249
1249
|
absoluteProjectRoot,
|
|
1250
|
-
|
|
1251
|
-
|
|
1250
|
+
_chunk2KWRE5Y5js.correctPaths.call(void 0,
|
|
1251
|
+
_chunk2KWRE5Y5js.isAbsolute.call(void 0, normalizedOptions.configPath) ? normalizedOptions.configPath : _chunk2KWRE5Y5js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.configPath)
|
|
1252
1252
|
)
|
|
1253
1253
|
);
|
|
1254
1254
|
}
|
|
1255
1255
|
if (normalizedOptions.manifestPath) {
|
|
1256
|
-
normalizedOptions.manifestPath =
|
|
1256
|
+
normalizedOptions.manifestPath = _chunk2KWRE5Y5js.relative.call(void 0,
|
|
1257
1257
|
absoluteProjectRoot,
|
|
1258
|
-
|
|
1259
|
-
|
|
1258
|
+
_chunk2KWRE5Y5js.correctPaths.call(void 0,
|
|
1259
|
+
_chunk2KWRE5Y5js.isAbsolute.call(void 0, normalizedOptions.manifestPath) ? normalizedOptions.manifestPath : _chunk2KWRE5Y5js.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.manifestPath)
|
|
1260
1260
|
)
|
|
1261
1261
|
);
|
|
1262
1262
|
}
|
|
@@ -1329,14 +1329,14 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
1329
1329
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
1330
1330
|
);
|
|
1331
1331
|
}
|
|
1332
|
-
|
|
1332
|
+
_chunk2KWRE5Y5js.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
1333
1333
|
_sizelimit2.default.call(void 0, [_file2.default, _esbuild2.default, _esbuildwhy2.default], {
|
|
1334
1334
|
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _94 => _94.projectsConfigurations, 'access', _95 => _95.projects, 'access', _96 => _96[context.projectName], 'optionalAccess', _97 => _97.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0,
|
|
1335
1335
|
_nullishCoalesce(_optionalChain([context, 'access', _98 => _98.projectsConfigurations, 'access', _99 => _99.projects, 'access', _100 => _100[context.projectName], 'optionalAccess', _101 => _101.root]), () => ( "./")),
|
|
1336
1336
|
"src"
|
|
1337
1337
|
)))
|
|
1338
1338
|
}).then((result) => {
|
|
1339
|
-
|
|
1339
|
+
_chunk2KWRE5Y5js.writeInfo.call(void 0,
|
|
1340
1340
|
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
1341
1341
|
config
|
|
1342
1342
|
);
|
|
@@ -1406,19 +1406,19 @@ function toTSDownFormat(format3) {
|
|
|
1406
1406
|
// ../tsdown/src/build.ts
|
|
1407
1407
|
var resolveOptions = async (userOptions) => {
|
|
1408
1408
|
const options = getDefaultOptions(userOptions);
|
|
1409
|
-
const workspaceRoot2 =
|
|
1409
|
+
const workspaceRoot2 = _chunkQWSTQIUAjs.findWorkspaceRoot.call(void 0, options.projectRoot);
|
|
1410
1410
|
if (!workspaceRoot2) {
|
|
1411
1411
|
throw new Error("Cannot find Nx workspace root");
|
|
1412
1412
|
}
|
|
1413
|
-
const workspaceConfig = await
|
|
1413
|
+
const workspaceConfig = await _chunkQWSTQIUAjs.getWorkspaceConfig.call(void 0, options.debug === true, {
|
|
1414
1414
|
workspaceRoot: workspaceRoot2
|
|
1415
1415
|
});
|
|
1416
|
-
|
|
1417
|
-
const stopwatch =
|
|
1416
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
1417
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, "Build options resolution");
|
|
1418
1418
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1419
1419
|
exitOnError: true
|
|
1420
1420
|
});
|
|
1421
|
-
const projectJsonPath =
|
|
1421
|
+
const projectJsonPath = _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
1422
1422
|
workspaceRoot2,
|
|
1423
1423
|
options.projectRoot,
|
|
1424
1424
|
"project.json"
|
|
@@ -1435,7 +1435,7 @@ var resolveOptions = async (userOptions) => {
|
|
|
1435
1435
|
"The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
|
|
1436
1436
|
);
|
|
1437
1437
|
}
|
|
1438
|
-
const packageJsonPath =
|
|
1438
|
+
const packageJsonPath = _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
1439
1439
|
workspaceRoot2,
|
|
1440
1440
|
options.projectRoot,
|
|
1441
1441
|
"package.json"
|
|
@@ -1444,13 +1444,13 @@ var resolveOptions = async (userOptions) => {
|
|
|
1444
1444
|
throw new Error("Cannot find package.json configuration");
|
|
1445
1445
|
}
|
|
1446
1446
|
const debug = _nullishCoalesce(options.debug, () => ( (options.mode || workspaceConfig.mode) === "development"));
|
|
1447
|
-
const sourceRoot = projectJson.sourceRoot ||
|
|
1447
|
+
const sourceRoot = projectJson.sourceRoot || _chunk2KWRE5Y5js.joinPaths.call(void 0, options.projectRoot, "src");
|
|
1448
1448
|
const result = {
|
|
1449
1449
|
name: projectName,
|
|
1450
1450
|
mode: "production",
|
|
1451
1451
|
target: DEFAULT_TARGET,
|
|
1452
1452
|
generatePackageJson: true,
|
|
1453
|
-
outDir:
|
|
1453
|
+
outDir: _chunk2KWRE5Y5js.joinPaths.call(void 0, "dist", options.projectRoot),
|
|
1454
1454
|
minify: !debug,
|
|
1455
1455
|
plugins: [],
|
|
1456
1456
|
assets: [],
|
|
@@ -1462,12 +1462,12 @@ var resolveOptions = async (userOptions) => {
|
|
|
1462
1462
|
clean: false,
|
|
1463
1463
|
fixedExtension: true,
|
|
1464
1464
|
nodeProtocol: true,
|
|
1465
|
-
tsconfig:
|
|
1465
|
+
tsconfig: _chunk2KWRE5Y5js.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
1466
1466
|
debug,
|
|
1467
1467
|
sourceRoot,
|
|
1468
1468
|
cwd: workspaceConfig.workspaceRoot,
|
|
1469
1469
|
entry: {
|
|
1470
|
-
["index"]:
|
|
1470
|
+
["index"]: _chunk2KWRE5Y5js.joinPaths.call(void 0, sourceRoot, "index.ts")
|
|
1471
1471
|
},
|
|
1472
1472
|
workspace: true,
|
|
1473
1473
|
...options,
|
|
@@ -1486,15 +1486,15 @@ var resolveOptions = async (userOptions) => {
|
|
|
1486
1486
|
return result;
|
|
1487
1487
|
};
|
|
1488
1488
|
async function generatePackageJson2(options) {
|
|
1489
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1490
|
-
|
|
1491
|
-
const stopwatch =
|
|
1492
|
-
const packageJsonPath =
|
|
1489
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunk2KWRE5Y5js.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1490
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.workspaceConfig);
|
|
1491
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, "Write package.json file");
|
|
1492
|
+
const packageJsonPath = _chunk2KWRE5Y5js.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1493
1493
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1494
1494
|
throw new Error("Cannot find package.json configuration");
|
|
1495
1495
|
}
|
|
1496
1496
|
const packageJsonFile = await _promises2.default.readFile(
|
|
1497
|
-
|
|
1497
|
+
_chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
1498
1498
|
options.workspaceConfig.workspaceRoot,
|
|
1499
1499
|
options.projectRoot,
|
|
1500
1500
|
"package.json"
|
|
@@ -1556,14 +1556,14 @@ async function generatePackageJson2(options) {
|
|
|
1556
1556
|
},
|
|
1557
1557
|
packageJson.exports
|
|
1558
1558
|
);
|
|
1559
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1559
|
+
await _devkit.writeJsonFile.call(void 0, _chunk2KWRE5Y5js.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
1560
1560
|
stopwatch();
|
|
1561
1561
|
}
|
|
1562
1562
|
return options;
|
|
1563
1563
|
}
|
|
1564
1564
|
async function executeTSDown(options) {
|
|
1565
|
-
|
|
1566
|
-
const stopwatch =
|
|
1565
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.workspaceConfig);
|
|
1566
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, `${options.name} build`);
|
|
1567
1567
|
await _tsdown.build.call(void 0, {
|
|
1568
1568
|
...options,
|
|
1569
1569
|
entry: options.entry,
|
|
@@ -1573,11 +1573,11 @@ async function executeTSDown(options) {
|
|
|
1573
1573
|
return options;
|
|
1574
1574
|
}
|
|
1575
1575
|
async function copyBuildAssets2(options) {
|
|
1576
|
-
|
|
1576
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0,
|
|
1577
1577
|
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
1578
1578
|
options.workspaceConfig
|
|
1579
1579
|
);
|
|
1580
|
-
const stopwatch =
|
|
1580
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1581
1581
|
await copyAssets(
|
|
1582
1582
|
options.workspaceConfig,
|
|
1583
1583
|
_nullishCoalesce(options.assets, () => ( [])),
|
|
@@ -1591,18 +1591,18 @@ async function copyBuildAssets2(options) {
|
|
|
1591
1591
|
return options;
|
|
1592
1592
|
}
|
|
1593
1593
|
async function reportResults2(options) {
|
|
1594
|
-
|
|
1594
|
+
_chunk2KWRE5Y5js.writeSuccess.call(void 0,
|
|
1595
1595
|
` \u{1F4E6} The ${options.name} build completed successfully`,
|
|
1596
1596
|
options.workspaceConfig
|
|
1597
1597
|
);
|
|
1598
1598
|
}
|
|
1599
1599
|
async function cleanOutputPath2(options) {
|
|
1600
1600
|
if (options.clean !== false && options.workspaceConfig) {
|
|
1601
|
-
|
|
1601
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0,
|
|
1602
1602
|
` \u{1F9F9} Cleaning ${options.name} output path: ${options.workspaceConfig}`,
|
|
1603
1603
|
options.workspaceConfig
|
|
1604
1604
|
);
|
|
1605
|
-
const stopwatch =
|
|
1605
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1606
1606
|
await cleanDirectories2(
|
|
1607
1607
|
options.name,
|
|
1608
1608
|
options.outDir,
|
|
@@ -1613,8 +1613,8 @@ async function cleanOutputPath2(options) {
|
|
|
1613
1613
|
return options;
|
|
1614
1614
|
}
|
|
1615
1615
|
async function build3(options) {
|
|
1616
|
-
|
|
1617
|
-
const stopwatch =
|
|
1616
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, ` ${_chunk2KWRE5Y5js.brandIcon.call(void 0, )} Executing Storm TSDown pipeline`);
|
|
1617
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1618
1618
|
try {
|
|
1619
1619
|
const opts = Array.isArray(options) ? options : [options];
|
|
1620
1620
|
if (opts.length === 0) {
|
|
@@ -1634,13 +1634,13 @@ async function build3(options) {
|
|
|
1634
1634
|
})
|
|
1635
1635
|
);
|
|
1636
1636
|
} else {
|
|
1637
|
-
|
|
1637
|
+
_chunk2KWRE5Y5js.writeWarning.call(void 0,
|
|
1638
1638
|
" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function."
|
|
1639
1639
|
);
|
|
1640
1640
|
}
|
|
1641
|
-
|
|
1641
|
+
_chunk2KWRE5Y5js.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1642
1642
|
} catch (error) {
|
|
1643
|
-
|
|
1643
|
+
_chunk2KWRE5Y5js.writeFatal.call(void 0,
|
|
1644
1644
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1645
1645
|
);
|
|
1646
1646
|
throw error;
|
|
@@ -1651,7 +1651,7 @@ async function build3(options) {
|
|
|
1651
1651
|
|
|
1652
1652
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1653
1653
|
async function tsdownExecutorFn(options, context, config) {
|
|
1654
|
-
|
|
1654
|
+
_chunk2KWRE5Y5js.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown executor on the workspace", config);
|
|
1655
1655
|
if (!_optionalChain([context, 'access', _104 => _104.projectsConfigurations, 'optionalAccess', _105 => _105.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _106 => _106.projectsConfigurations, 'access', _107 => _107.projects, 'access', _108 => _108[context.projectName], 'optionalAccess', _109 => _109.root])) {
|
|
1656
1656
|
throw new Error(
|
|
1657
1657
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1693,12 +1693,12 @@ var _fsextra = require('fs-extra');
|
|
|
1693
1693
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1694
1694
|
async function typiaExecutorFn(options, _, config) {
|
|
1695
1695
|
if (options.clean !== false) {
|
|
1696
|
-
|
|
1696
|
+
_chunk2KWRE5Y5js.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1697
1697
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1698
1698
|
}
|
|
1699
1699
|
await Promise.all(
|
|
1700
1700
|
options.entry.map((entry) => {
|
|
1701
|
-
|
|
1701
|
+
_chunk2KWRE5Y5js.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1702
1702
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1703
1703
|
input: entry,
|
|
1704
1704
|
output: options.outputPath,
|
|
@@ -1731,7 +1731,7 @@ var executor_default10 = withRunExecutor(
|
|
|
1731
1731
|
|
|
1732
1732
|
|
|
1733
1733
|
async function unbuildExecutorFn(options, context, config) {
|
|
1734
|
-
|
|
1734
|
+
_chunk2KWRE5Y5js.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1735
1735
|
if (!_optionalChain([context, 'access', _118 => _118.projectsConfigurations, 'optionalAccess', _119 => _119.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1736
1736
|
throw new Error(
|
|
1737
1737
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
@@ -1748,7 +1748,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1748
1748
|
);
|
|
1749
1749
|
}
|
|
1750
1750
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1751
|
-
fsCache: config.skipCache ? false :
|
|
1751
|
+
fsCache: config.skipCache ? false : _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
1752
1752
|
config.workspaceRoot,
|
|
1753
1753
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1754
1754
|
"jiti"
|
|
@@ -1770,7 +1770,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1770
1770
|
{
|
|
1771
1771
|
stubOptions: {
|
|
1772
1772
|
jiti: {
|
|
1773
|
-
fsCache: config.skipCache ? false :
|
|
1773
|
+
fsCache: config.skipCache ? false : _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
1774
1774
|
config.workspaceRoot,
|
|
1775
1775
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1776
1776
|
"jiti"
|
|
@@ -1830,33 +1830,33 @@ var executor_default11 = withRunExecutor(
|
|
|
1830
1830
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
1831
1831
|
skipReadingConfig: false
|
|
1832
1832
|
}) => async (tree, _options) => {
|
|
1833
|
-
const stopwatch =
|
|
1833
|
+
const stopwatch = _chunk2KWRE5Y5js.getStopwatch.call(void 0, name);
|
|
1834
1834
|
let options = _options;
|
|
1835
1835
|
let config;
|
|
1836
1836
|
try {
|
|
1837
|
-
|
|
1838
|
-
`${
|
|
1837
|
+
_chunk2KWRE5Y5js.writeInfo.call(void 0,
|
|
1838
|
+
`${_chunk2KWRE5Y5js.brandIcon.call(void 0, config)} Running the ${name} generator...
|
|
1839
1839
|
|
|
1840
1840
|
`,
|
|
1841
1841
|
config
|
|
1842
1842
|
);
|
|
1843
|
-
const workspaceRoot2 =
|
|
1843
|
+
const workspaceRoot2 = _chunkQWSTQIUAjs.findWorkspaceRoot.call(void 0, );
|
|
1844
1844
|
if (!generatorOptions.skipReadingConfig) {
|
|
1845
|
-
|
|
1845
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0,
|
|
1846
1846
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1847
1847
|
- workspaceRoot: ${workspaceRoot2}`,
|
|
1848
1848
|
config
|
|
1849
1849
|
);
|
|
1850
|
-
config = await
|
|
1850
|
+
config = await _chunkQWSTQIUAjs.getConfig.call(void 0, workspaceRoot2);
|
|
1851
1851
|
}
|
|
1852
1852
|
if (_optionalChain([generatorOptions, 'optionalAccess', _120 => _120.hooks, 'optionalAccess', _121 => _121.applyDefaultOptions])) {
|
|
1853
|
-
|
|
1853
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1854
1854
|
options = await Promise.resolve(
|
|
1855
1855
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
1856
1856
|
);
|
|
1857
|
-
|
|
1857
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1858
1858
|
}
|
|
1859
|
-
|
|
1859
|
+
_chunk2KWRE5Y5js.writeTrace.call(void 0,
|
|
1860
1860
|
`Generator schema options \u2699\uFE0F
|
|
1861
1861
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
1862
1862
|
config
|
|
@@ -1867,11 +1867,11 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1867
1867
|
applyWorkspaceBaseTokens
|
|
1868
1868
|
);
|
|
1869
1869
|
if (_optionalChain([generatorOptions, 'optionalAccess', _122 => _122.hooks, 'optionalAccess', _123 => _123.preProcess])) {
|
|
1870
|
-
|
|
1870
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
1871
1871
|
await Promise.resolve(
|
|
1872
1872
|
generatorOptions.hooks.preProcess(tokenized, config)
|
|
1873
1873
|
);
|
|
1874
|
-
|
|
1874
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
1875
1875
|
}
|
|
1876
1876
|
const result = await Promise.resolve(
|
|
1877
1877
|
generatorFn(tree, tokenized, config)
|
|
@@ -1886,21 +1886,21 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1886
1886
|
}
|
|
1887
1887
|
}
|
|
1888
1888
|
if (_optionalChain([generatorOptions, 'optionalAccess', _133 => _133.hooks, 'optionalAccess', _134 => _134.postProcess])) {
|
|
1889
|
-
|
|
1889
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
1890
1890
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1891
|
-
|
|
1891
|
+
_chunk2KWRE5Y5js.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
1892
1892
|
}
|
|
1893
1893
|
return () => {
|
|
1894
|
-
|
|
1894
|
+
_chunk2KWRE5Y5js.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
1895
1895
|
`, config);
|
|
1896
1896
|
};
|
|
1897
1897
|
} catch (error) {
|
|
1898
1898
|
return () => {
|
|
1899
|
-
|
|
1899
|
+
_chunk2KWRE5Y5js.writeFatal.call(void 0,
|
|
1900
1900
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
1901
1901
|
config
|
|
1902
1902
|
);
|
|
1903
|
-
|
|
1903
|
+
_chunk2KWRE5Y5js.writeError.call(void 0,
|
|
1904
1904
|
`An exception was thrown in the generator's process
|
|
1905
1905
|
- Details: ${error.message}
|
|
1906
1906
|
- Stacktrace: ${error.stack}`,
|
|
@@ -1966,16 +1966,16 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1966
1966
|
const projectConfig = {
|
|
1967
1967
|
root: normalized.directory,
|
|
1968
1968
|
projectType: "library",
|
|
1969
|
-
sourceRoot:
|
|
1969
|
+
sourceRoot: _chunk2KWRE5Y5js.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
1970
1970
|
targets: {
|
|
1971
1971
|
build: {
|
|
1972
1972
|
executor: options.buildExecutor,
|
|
1973
1973
|
outputs: ["{options.outputPath}"],
|
|
1974
1974
|
options: {
|
|
1975
|
-
entry: [
|
|
1975
|
+
entry: [_chunk2KWRE5Y5js.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
|
|
1976
1976
|
outputPath: getOutputPath(normalized),
|
|
1977
|
-
tsconfig:
|
|
1978
|
-
project:
|
|
1977
|
+
tsconfig: _chunk2KWRE5Y5js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
1978
|
+
project: _chunk2KWRE5Y5js.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
1979
1979
|
defaultConfiguration: "production",
|
|
1980
1980
|
platform: "neutral",
|
|
1981
1981
|
assets: [
|
|
@@ -2032,7 +2032,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2032
2032
|
if (!normalized.importPath) {
|
|
2033
2033
|
normalized.importPath = normalized.name;
|
|
2034
2034
|
}
|
|
2035
|
-
const packageJsonPath =
|
|
2035
|
+
const packageJsonPath = _chunk2KWRE5Y5js.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
2036
2036
|
if (tree.exists(packageJsonPath)) {
|
|
2037
2037
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2038
2038
|
if (!normalized.importPath) {
|
|
@@ -2089,14 +2089,14 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2089
2089
|
}));
|
|
2090
2090
|
}
|
|
2091
2091
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
2092
|
-
|
|
2092
|
+
_chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
2093
2093
|
normalized.projectRoot,
|
|
2094
2094
|
"./src",
|
|
2095
2095
|
`index.${normalized.js ? "js" : "ts"}`
|
|
2096
2096
|
)
|
|
2097
2097
|
]);
|
|
2098
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2099
|
-
|
|
2098
|
+
_js.addTsConfigPath.call(void 0, tree, _chunk2KWRE5Y5js.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
2099
|
+
_chunk2KWRE5Y5js.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
2100
2100
|
]);
|
|
2101
2101
|
if (tree.exists("package.json")) {
|
|
2102
2102
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2107,7 +2107,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2107
2107
|
description = packageJson.description;
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
2110
|
-
const tsconfigPath =
|
|
2110
|
+
const tsconfigPath = _chunk2KWRE5Y5js.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
2111
2111
|
if (tree.exists(tsconfigPath)) {
|
|
2112
2112
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2113
2113
|
json.composite ??= true;
|
|
@@ -2135,7 +2135,7 @@ function getOutputPath(options) {
|
|
|
2135
2135
|
} else {
|
|
2136
2136
|
parts.push(options.projectRoot);
|
|
2137
2137
|
}
|
|
2138
|
-
return
|
|
2138
|
+
return _chunk2KWRE5Y5js.joinPaths.call(void 0, ...parts);
|
|
2139
2139
|
}
|
|
2140
2140
|
function createProjectTsConfigJson(tree, options) {
|
|
2141
2141
|
const tsconfig = {
|
|
@@ -2143,7 +2143,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2143
2143
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _149 => _149.tsconfigOptions]), () => ( {})),
|
|
2144
2144
|
compilerOptions: {
|
|
2145
2145
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2146
|
-
outDir:
|
|
2146
|
+
outDir: _chunk2KWRE5Y5js.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2147
2147
|
noEmit: true,
|
|
2148
2148
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _150 => _150.tsconfigOptions, 'optionalAccess', _151 => _151.compilerOptions]), () => ( {}))
|
|
2149
2149
|
},
|
|
@@ -2161,7 +2161,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2161
2161
|
"src/**/*.test.ts"
|
|
2162
2162
|
]
|
|
2163
2163
|
};
|
|
2164
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2164
|
+
_devkit.writeJson.call(void 0, tree, _chunk2KWRE5Y5js.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2165
2165
|
}
|
|
2166
2166
|
async function normalizeOptions(tree, options, config) {
|
|
2167
2167
|
let importPath = options.importPath;
|
|
@@ -2226,7 +2226,7 @@ async function normalizeOptions(tree, options, config) {
|
|
|
2226
2226
|
|
|
2227
2227
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2228
2228
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
2229
|
-
const filesDir =
|
|
2229
|
+
const filesDir = _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
2230
2230
|
__dirname,
|
|
2231
2231
|
"src",
|
|
2232
2232
|
"generators",
|
|
@@ -2309,38 +2309,38 @@ var generator_default = withRunGenerator(
|
|
|
2309
2309
|
|
|
2310
2310
|
var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
|
|
2311
2311
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2312
|
-
|
|
2312
|
+
_chunk2KWRE5Y5js.writeInfo.call(void 0,
|
|
2313
2313
|
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
2314
2314
|
config
|
|
2315
2315
|
);
|
|
2316
|
-
|
|
2316
|
+
_chunk2KWRE5Y5js.writeTrace.call(void 0,
|
|
2317
2317
|
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
2318
2318
|
config
|
|
2319
2319
|
);
|
|
2320
|
-
const jsonSchema = z.toJSONSchema(
|
|
2320
|
+
const jsonSchema = z.toJSONSchema(_chunkQWSTQIUAjs.workspaceConfigSchema, {
|
|
2321
2321
|
target: "draft-7",
|
|
2322
|
-
metadata:
|
|
2322
|
+
metadata: _chunkQWSTQIUAjs.schemaRegistry
|
|
2323
2323
|
});
|
|
2324
2324
|
jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
|
|
2325
2325
|
jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
|
|
2326
2326
|
jsonSchema.description ??= "This JSON Schema defines the structure of the Storm Workspace configuration file (`storm-workspace.json`). It is used to validate the configuration file and ensure that it adheres to the expected format.";
|
|
2327
|
-
|
|
2327
|
+
_chunk2KWRE5Y5js.writeTrace.call(void 0, jsonSchema, config);
|
|
2328
2328
|
if (!options.outputFile) {
|
|
2329
2329
|
throw new Error(
|
|
2330
2330
|
"The `outputFile` option is required. Please specify the output file path."
|
|
2331
2331
|
);
|
|
2332
2332
|
}
|
|
2333
2333
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
2334
|
-
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _160 => _160.workspaceRoot]), () => (
|
|
2334
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _160 => _160.workspaceRoot]), () => ( _chunkQWSTQIUAjs.findWorkspaceRoot.call(void 0, ))),
|
|
2335
2335
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
2336
2336
|
);
|
|
2337
|
-
|
|
2337
|
+
_chunk2KWRE5Y5js.writeTrace.call(void 0,
|
|
2338
2338
|
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
2339
2339
|
config
|
|
2340
2340
|
);
|
|
2341
2341
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
2342
2342
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2343
|
-
|
|
2343
|
+
_chunk2KWRE5Y5js.writeSuccess.call(void 0,
|
|
2344
2344
|
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
2345
2345
|
config
|
|
2346
2346
|
);
|
|
@@ -2375,7 +2375,7 @@ var generator_default2 = withRunGenerator(
|
|
|
2375
2375
|
|
|
2376
2376
|
|
|
2377
2377
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
2378
|
-
const filesDir =
|
|
2378
|
+
const filesDir = _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
2379
2379
|
__dirname,
|
|
2380
2380
|
"src",
|
|
2381
2381
|
"generators",
|
|
@@ -2434,7 +2434,7 @@ var generator_default3 = withRunGenerator(
|
|
|
2434
2434
|
|
|
2435
2435
|
|
|
2436
2436
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
2437
|
-
const filesDir =
|
|
2437
|
+
const filesDir = _chunk2KWRE5Y5js.joinPaths.call(void 0,
|
|
2438
2438
|
__dirname,
|
|
2439
2439
|
"src",
|
|
2440
2440
|
"generators",
|