@storm-software/cloudflare-tools 0.71.41 → 0.71.43
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 +20 -0
- package/dist/{chunk-NFHONUD4.mjs → chunk-BG4BOS55.mjs} +4 -4
- package/dist/{chunk-QJJBMXLH.js → chunk-EAEYODL7.js} +4 -4
- package/dist/{chunk-UIJO3L53.js → chunk-EEHCZLIG.js} +175 -168
- package/dist/{chunk-D2C4YN2P.mjs → chunk-FJC6NTFV.mjs} +1 -1
- package/dist/{chunk-WRQN6TUO.js → chunk-FZGJMP4V.js} +5 -5
- package/dist/{chunk-CET7FSBB.mjs → chunk-KP72CV3N.mjs} +31 -0
- package/dist/{chunk-ZNZEZZQ3.mjs → chunk-LRWE7JIO.mjs} +1 -1
- package/dist/{chunk-F62R4VXI.mjs → chunk-RH3QEZJL.mjs} +16 -9
- package/dist/{chunk-APKXT2II.js → chunk-U63JI4YT.js} +34 -34
- package/dist/{chunk-OVTCUMRN.js → chunk-WKCHZUJS.js} +18 -18
- package/dist/{chunk-JC5YYXOF.mjs → chunk-XTJO7LT5.mjs} +3 -3
- package/dist/{chunk-B3DTG4AE.mjs → chunk-YHOL7SZX.mjs} +11 -7
- package/dist/{chunk-ENJ4VPTU.js → chunk-YQSZDW5I.js} +17 -13
- package/dist/{chunk-J756GE67.js → chunk-ZVAXGNHM.js} +36 -5
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +5 -5
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/src/executors/cloudflare-publish/executor.js +3 -3
- package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
- package/dist/src/executors/r2-upload-publish/executor.js +5 -5
- package/dist/src/executors/r2-upload-publish/executor.mjs +4 -4
- package/dist/src/executors/serve/executor.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 _chunkU63JI4YTjs = require('./chunk-U63JI4YT.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -23,7 +23,8 @@ var _chunkAPKXT2IIjs = require('./chunk-APKXT2II.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
var _chunkZVAXGNHMjs = require('./chunk-ZVAXGNHM.js');
|
|
27
28
|
|
|
28
29
|
// ../config-tools/src/utilities/apply-workspace-tokens.ts
|
|
29
30
|
var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
@@ -60,7 +61,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
|
60
61
|
if (result.includes("{workspaceRoot}")) {
|
|
61
62
|
result = result.replaceAll(
|
|
62
63
|
"{workspaceRoot}",
|
|
63
|
-
_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]))), () => ( _chunkU63JI4YTjs.findWorkspaceRoot.call(void 0, )))
|
|
64
65
|
);
|
|
65
66
|
}
|
|
66
67
|
return result;
|
|
@@ -100,7 +101,7 @@ var applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
|
|
|
100
101
|
// ../workspace-tools/src/base/base-executor.ts
|
|
101
102
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
102
103
|
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
103
|
-
const stopwatch =
|
|
104
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, name);
|
|
104
105
|
let options = _options;
|
|
105
106
|
let config = {};
|
|
106
107
|
try {
|
|
@@ -109,14 +110,17 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
109
110
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
110
111
|
);
|
|
111
112
|
}
|
|
112
|
-
const workspaceRoot2 =
|
|
113
|
+
const workspaceRoot2 = _chunkU63JI4YTjs.findWorkspaceRoot.call(void 0, );
|
|
113
114
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot2;
|
|
114
115
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot2;
|
|
115
116
|
const projectName = context.projectName;
|
|
116
117
|
config.workspaceRoot = workspaceRoot2;
|
|
117
|
-
|
|
118
|
+
_chunkZVAXGNHMjs.writeInfo.call(void 0,
|
|
119
|
+
`${_chunkZVAXGNHMjs.brandIcon.call(void 0, config)} Running the ${name} executor for ${projectName} `,
|
|
120
|
+
config
|
|
121
|
+
);
|
|
118
122
|
if (!executorOptions.skipReadingConfig) {
|
|
119
|
-
|
|
123
|
+
_chunkZVAXGNHMjs.writeTrace.call(void 0,
|
|
120
124
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
121
125
|
- workspaceRoot: ${workspaceRoot2}
|
|
122
126
|
- projectRoot: ${projectRoot}
|
|
@@ -125,18 +129,18 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
125
129
|
`,
|
|
126
130
|
config
|
|
127
131
|
);
|
|
128
|
-
config = await
|
|
132
|
+
config = await _chunkU63JI4YTjs.getConfig.call(void 0, workspaceRoot2);
|
|
129
133
|
}
|
|
130
134
|
if (_optionalChain([executorOptions, 'optionalAccess', _7 => _7.hooks, 'optionalAccess', _8 => _8.applyDefaultOptions])) {
|
|
131
|
-
|
|
135
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
132
136
|
options = await Promise.resolve(
|
|
133
137
|
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
134
138
|
);
|
|
135
|
-
|
|
139
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
136
140
|
}
|
|
137
|
-
|
|
141
|
+
_chunkZVAXGNHMjs.writeTrace.call(void 0,
|
|
138
142
|
`Executor schema options \u2699\uFE0F
|
|
139
|
-
${
|
|
143
|
+
${_chunkZVAXGNHMjs.formatLogMessage.call(void 0, options)}
|
|
140
144
|
`,
|
|
141
145
|
config
|
|
142
146
|
);
|
|
@@ -149,18 +153,18 @@ ${_chunkJ756GE67js.formatLogMessage.call(void 0, options)}
|
|
|
149
153
|
),
|
|
150
154
|
applyWorkspaceProjectTokens
|
|
151
155
|
);
|
|
152
|
-
|
|
156
|
+
_chunkZVAXGNHMjs.writeTrace.call(void 0,
|
|
153
157
|
`Executor schema tokenized options \u2699\uFE0F
|
|
154
|
-
${
|
|
158
|
+
${_chunkZVAXGNHMjs.formatLogMessage.call(void 0, tokenized)}
|
|
155
159
|
`,
|
|
156
160
|
config
|
|
157
161
|
);
|
|
158
162
|
if (_optionalChain([executorOptions, 'optionalAccess', _9 => _9.hooks, 'optionalAccess', _10 => _10.preProcess])) {
|
|
159
|
-
|
|
163
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
160
164
|
await Promise.resolve(
|
|
161
165
|
executorOptions.hooks.preProcess(tokenized, config)
|
|
162
166
|
);
|
|
163
|
-
|
|
167
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
164
168
|
}
|
|
165
169
|
const ret = executorFn(tokenized, context, config);
|
|
166
170
|
if (_isFunction(_optionalChain([ret, 'optionalAccess', _11 => _11.next]))) {
|
|
@@ -175,7 +179,7 @@ ${_chunkJ756GE67js.formatLogMessage.call(void 0, tokenized)}
|
|
|
175
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")) {
|
|
176
180
|
throw new Error(
|
|
177
181
|
`Failure determined while running the ${name} executor
|
|
178
|
-
${
|
|
182
|
+
${_chunkZVAXGNHMjs.formatLogMessage.call(void 0,
|
|
179
183
|
result
|
|
180
184
|
)}`,
|
|
181
185
|
{
|
|
@@ -184,21 +188,21 @@ ${_chunkJ756GE67js.formatLogMessage.call(void 0,
|
|
|
184
188
|
);
|
|
185
189
|
}
|
|
186
190
|
if (_optionalChain([executorOptions, 'optionalAccess', _21 => _21.hooks, 'optionalAccess', _22 => _22.postProcess])) {
|
|
187
|
-
|
|
191
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
188
192
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
189
|
-
|
|
193
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
190
194
|
}
|
|
191
|
-
|
|
195
|
+
_chunkZVAXGNHMjs.writeSuccess.call(void 0, `Completed running the ${name} task executor!
|
|
192
196
|
`, config);
|
|
193
197
|
return {
|
|
194
198
|
success: true
|
|
195
199
|
};
|
|
196
200
|
} catch (error) {
|
|
197
|
-
|
|
201
|
+
_chunkZVAXGNHMjs.writeFatal.call(void 0,
|
|
198
202
|
"A fatal error occurred while running the executor - the process was forced to terminate",
|
|
199
203
|
config
|
|
200
204
|
);
|
|
201
|
-
|
|
205
|
+
_chunkZVAXGNHMjs.writeError.call(void 0,
|
|
202
206
|
`An exception was thrown in the executor's process
|
|
203
207
|
- Details: ${error.message}
|
|
204
208
|
- Stacktrace: ${error.stack}`,
|
|
@@ -454,12 +458,12 @@ var LARGE_BUFFER = 1024 * 1e6;
|
|
|
454
458
|
// ../build-tools/src/config.ts
|
|
455
459
|
var DEFAULT_JS_BANNER = `
|
|
456
460
|
// ---------------------------------------
|
|
457
|
-
// \
|
|
461
|
+
// \u{1F5F2} Built by Storm Software
|
|
458
462
|
// ---------------------------------------
|
|
459
463
|
`;
|
|
460
464
|
var DEFAULT_CSS_BANNER = `
|
|
461
465
|
/* ---------------------------------------
|
|
462
|
-
\
|
|
466
|
+
\u{1F5F2} Built by Storm Software
|
|
463
467
|
--------------------------------------- */
|
|
464
468
|
`;
|
|
465
469
|
var DEFAULT_ENVIRONMENT = "production";
|
|
@@ -509,9 +513,9 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
509
513
|
output: "src/"
|
|
510
514
|
});
|
|
511
515
|
}
|
|
512
|
-
|
|
516
|
+
_chunkZVAXGNHMjs.writeTrace.call(void 0,
|
|
513
517
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
514
|
-
${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} -> ${_chunkZVAXGNHMjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
515
519
|
config
|
|
516
520
|
);
|
|
517
521
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
@@ -521,20 +525,20 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
521
525
|
assets: pendingAssets
|
|
522
526
|
});
|
|
523
527
|
await assetHandler.processAllAssetsOnce();
|
|
524
|
-
|
|
528
|
+
_chunkZVAXGNHMjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
525
529
|
if (includeSrc === true) {
|
|
526
|
-
|
|
527
|
-
`\u{1F4DD} Adding banner and writing source files: ${
|
|
530
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0,
|
|
531
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
528
532
|
outputPath,
|
|
529
533
|
"src"
|
|
530
534
|
)}`,
|
|
531
535
|
config
|
|
532
536
|
);
|
|
533
537
|
const files = await _glob.glob.call(void 0, [
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
+
_chunkZVAXGNHMjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
539
|
+
_chunkZVAXGNHMjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
540
|
+
_chunkZVAXGNHMjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
541
|
+
_chunkZVAXGNHMjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
538
542
|
]);
|
|
539
543
|
await Promise.allSettled(
|
|
540
544
|
files.map(
|
|
@@ -589,7 +593,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
589
593
|
)) {
|
|
590
594
|
const projectNode = project.node;
|
|
591
595
|
if (projectNode.data.root) {
|
|
592
|
-
const projectPackageJsonPath =
|
|
596
|
+
const projectPackageJsonPath = _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
593
597
|
workspaceRoot2,
|
|
594
598
|
projectNode.data.root,
|
|
595
599
|
"package.json"
|
|
@@ -607,11 +611,11 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
607
611
|
}
|
|
608
612
|
}
|
|
609
613
|
if (localPackages.length > 0) {
|
|
610
|
-
|
|
614
|
+
_chunkZVAXGNHMjs.writeTrace.call(void 0,
|
|
611
615
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
612
616
|
);
|
|
613
617
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
614
|
-
|
|
618
|
+
_chunkZVAXGNHMjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
615
619
|
"utf8"
|
|
616
620
|
);
|
|
617
621
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -624,7 +628,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
624
628
|
}
|
|
625
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) => {
|
|
626
630
|
if (_optionalChain([projectConfigurations, 'access', _42 => _42.projects, 'optionalAccess', _43 => _43[dep]])) {
|
|
627
|
-
const depPackageJsonPath =
|
|
631
|
+
const depPackageJsonPath = _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
628
632
|
workspaceRoot2,
|
|
629
633
|
projectConfigurations.projects[dep].root,
|
|
630
634
|
"package.json"
|
|
@@ -655,14 +659,14 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
655
659
|
return ret;
|
|
656
660
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
657
661
|
} else {
|
|
658
|
-
|
|
662
|
+
_chunkZVAXGNHMjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
659
663
|
}
|
|
660
664
|
return packageJson;
|
|
661
665
|
};
|
|
662
666
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
663
|
-
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
667
|
+
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkU63JI4YTjs.findWorkspaceRoot.call(void 0, );
|
|
664
668
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
665
|
-
|
|
669
|
+
_chunkZVAXGNHMjs.joinPaths.call(void 0, workspaceRoot2, "package.json"),
|
|
666
670
|
"utf8"
|
|
667
671
|
);
|
|
668
672
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -673,7 +677,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
673
677
|
if (distSrc.startsWith("/")) {
|
|
674
678
|
distSrc = distSrc.substring(1);
|
|
675
679
|
}
|
|
676
|
-
packageJson.source ??= `${
|
|
680
|
+
packageJson.source ??= `${_chunkZVAXGNHMjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
677
681
|
}
|
|
678
682
|
packageJson.files ??= ["dist/**/*"];
|
|
679
683
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -698,7 +702,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
698
702
|
packageJson.contributors = [packageJson.author];
|
|
699
703
|
}
|
|
700
704
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
701
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
705
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkZVAXGNHMjs.joinPaths.call(void 0, "packages", projectName);
|
|
702
706
|
return packageJson;
|
|
703
707
|
};
|
|
704
708
|
var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
@@ -752,11 +756,11 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
|
752
756
|
// ../esbuild/src/assets.ts
|
|
753
757
|
async function copyBuildAssets(context) {
|
|
754
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])) {
|
|
755
|
-
|
|
759
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0,
|
|
756
760
|
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
|
|
757
761
|
context.workspaceConfig
|
|
758
762
|
);
|
|
759
|
-
const stopwatch =
|
|
763
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
760
764
|
await copyAssets(
|
|
761
765
|
context.workspaceConfig,
|
|
762
766
|
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
@@ -837,15 +841,15 @@ async function resolveContext(userOptions) {
|
|
|
837
841
|
if (!workspaceRoot2) {
|
|
838
842
|
throw new Error("Cannot find Nx workspace root");
|
|
839
843
|
}
|
|
840
|
-
const workspaceConfig = await
|
|
844
|
+
const workspaceConfig = await _chunkU63JI4YTjs.getWorkspaceConfig.call(void 0, true, {
|
|
841
845
|
workspaceRoot: workspaceRoot2.dir
|
|
842
846
|
});
|
|
843
|
-
|
|
844
|
-
const stopwatch =
|
|
847
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
848
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, "Build options resolution");
|
|
845
849
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
846
850
|
exitOnError: true
|
|
847
851
|
});
|
|
848
|
-
const projectJsonPath =
|
|
852
|
+
const projectJsonPath = _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
849
853
|
workspaceRoot2.dir,
|
|
850
854
|
projectRoot,
|
|
851
855
|
"project.json"
|
|
@@ -864,7 +868,7 @@ async function resolveContext(userOptions) {
|
|
|
864
868
|
}
|
|
865
869
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
866
870
|
options.name ??= projectName;
|
|
867
|
-
const packageJsonPath =
|
|
871
|
+
const packageJsonPath = _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
868
872
|
workspaceRoot2.dir,
|
|
869
873
|
options.projectRoot,
|
|
870
874
|
"package.json"
|
|
@@ -876,7 +880,7 @@ async function resolveContext(userOptions) {
|
|
|
876
880
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
877
881
|
const resolvedOptions = {
|
|
878
882
|
...options,
|
|
879
|
-
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig :
|
|
883
|
+
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : _chunkZVAXGNHMjs.joinPaths.call(void 0, workspaceRoot2.dir, projectRoot, "tsconfig.json"),
|
|
880
884
|
metafile: userOptions.mode === "development",
|
|
881
885
|
clean: false,
|
|
882
886
|
env,
|
|
@@ -901,8 +905,8 @@ async function resolveContext(userOptions) {
|
|
|
901
905
|
projectConfigurations,
|
|
902
906
|
projectName,
|
|
903
907
|
projectGraph,
|
|
904
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
905
|
-
outputPath: resolvedOptions.outputPath ||
|
|
908
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkZVAXGNHMjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
909
|
+
outputPath: resolvedOptions.outputPath || _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
906
910
|
workspaceConfig.workspaceRoot,
|
|
907
911
|
"dist",
|
|
908
912
|
resolvedOptions.projectRoot
|
|
@@ -911,10 +915,10 @@ async function resolveContext(userOptions) {
|
|
|
911
915
|
};
|
|
912
916
|
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
913
917
|
if (context.options.verbose) {
|
|
914
|
-
|
|
918
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0,
|
|
915
919
|
` \u2699\uFE0F Build options resolved:
|
|
916
920
|
|
|
917
|
-
${
|
|
921
|
+
${_chunkZVAXGNHMjs.formatLogMessage.call(void 0, context.options)}`,
|
|
918
922
|
workspaceConfig
|
|
919
923
|
);
|
|
920
924
|
}
|
|
@@ -926,10 +930,10 @@ ${_chunkJ756GE67js.formatLogMessage.call(void 0, context.options)}`,
|
|
|
926
930
|
|
|
927
931
|
|
|
928
932
|
async function generatePackageJson(context) {
|
|
929
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
930
|
-
|
|
931
|
-
const stopwatch =
|
|
932
|
-
const packageJsonPath =
|
|
933
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkZVAXGNHMjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
934
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
935
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, "Write package.json file");
|
|
936
|
+
const packageJsonPath = _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
933
937
|
context.options.projectRoot,
|
|
934
938
|
"project.json"
|
|
935
939
|
);
|
|
@@ -937,7 +941,7 @@ async function generatePackageJson(context) {
|
|
|
937
941
|
throw new Error("Cannot find package.json configuration");
|
|
938
942
|
}
|
|
939
943
|
const packageJsonFile = await _promises2.default.readFile(
|
|
940
|
-
|
|
944
|
+
_chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
941
945
|
context.workspaceConfig.workspaceRoot,
|
|
942
946
|
context.options.projectRoot,
|
|
943
947
|
"package.json"
|
|
@@ -1043,7 +1047,7 @@ async function generatePackageJson(context) {
|
|
|
1043
1047
|
}
|
|
1044
1048
|
}
|
|
1045
1049
|
await _devkit.writeJsonFile.call(void 0,
|
|
1046
|
-
|
|
1050
|
+
_chunkZVAXGNHMjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
1047
1051
|
packageJson
|
|
1048
1052
|
);
|
|
1049
1053
|
stopwatch();
|
|
@@ -1055,12 +1059,12 @@ async function generatePackageJson(context) {
|
|
|
1055
1059
|
var _tsup = require('tsup');
|
|
1056
1060
|
async function build(options) {
|
|
1057
1061
|
if (!options.silent) {
|
|
1058
|
-
|
|
1062
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0,
|
|
1059
1063
|
` \u{1F680} Running ${options.name || "tsup"} build`,
|
|
1060
1064
|
options.workspaceConfig
|
|
1061
1065
|
);
|
|
1062
1066
|
}
|
|
1063
|
-
const stopwatch =
|
|
1067
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, `${options.name || "tsup"} build`);
|
|
1064
1068
|
await _tsup.build.call(void 0, options);
|
|
1065
1069
|
if (!options.silent) {
|
|
1066
1070
|
stopwatch();
|
|
@@ -1069,14 +1073,14 @@ async function build(options) {
|
|
|
1069
1073
|
|
|
1070
1074
|
// ../esbuild/src/tsup.ts
|
|
1071
1075
|
async function executeTsup(context) {
|
|
1072
|
-
|
|
1076
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0,
|
|
1073
1077
|
` \u{1F680} Running ${context.options.name} build`,
|
|
1074
1078
|
context.workspaceConfig
|
|
1075
1079
|
);
|
|
1076
|
-
const stopwatch =
|
|
1080
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
1077
1081
|
await build({
|
|
1078
1082
|
...context.options,
|
|
1079
|
-
outDir: context.options.distDir ?
|
|
1083
|
+
outDir: context.options.distDir ? _chunkZVAXGNHMjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
1080
1084
|
workspaceConfig: context.workspaceConfig
|
|
1081
1085
|
});
|
|
1082
1086
|
stopwatch();
|
|
@@ -1087,17 +1091,17 @@ async function executeTsup(context) {
|
|
|
1087
1091
|
async function reportResults(context) {
|
|
1088
1092
|
if (_optionalChain([context, 'access', _60 => _60.result, 'optionalAccess', _61 => _61.errors, 'access', _62 => _62.length]) === 0) {
|
|
1089
1093
|
if (context.result.warnings.length > 0) {
|
|
1090
|
-
|
|
1094
|
+
_chunkZVAXGNHMjs.writeWarning.call(void 0,
|
|
1091
1095
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
1092
1096
|
context.workspaceConfig
|
|
1093
1097
|
);
|
|
1094
1098
|
}
|
|
1095
|
-
|
|
1099
|
+
_chunkZVAXGNHMjs.writeSuccess.call(void 0,
|
|
1096
1100
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
1097
1101
|
context.workspaceConfig
|
|
1098
1102
|
);
|
|
1099
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) {
|
|
1100
|
-
|
|
1104
|
+
_chunkZVAXGNHMjs.writeError.call(void 0,
|
|
1101
1105
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
1102
1106
|
context.workspaceConfig
|
|
1103
1107
|
);
|
|
@@ -1108,19 +1112,19 @@ async function reportResults(context) {
|
|
|
1108
1112
|
}
|
|
1109
1113
|
async function cleanOutputPath(context) {
|
|
1110
1114
|
if (context.clean !== false && context.outputPath) {
|
|
1111
|
-
|
|
1115
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0,
|
|
1112
1116
|
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
1113
1117
|
context.workspaceConfig
|
|
1114
1118
|
);
|
|
1115
|
-
const stopwatch =
|
|
1119
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
1116
1120
|
await cleanDirectories(context.outputPath);
|
|
1117
1121
|
stopwatch();
|
|
1118
1122
|
}
|
|
1119
1123
|
return context;
|
|
1120
1124
|
}
|
|
1121
1125
|
async function build2(options) {
|
|
1122
|
-
|
|
1123
|
-
const stopwatch =
|
|
1126
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, ` ${_chunkZVAXGNHMjs.brandIcon.call(void 0, )} Executing Storm ESBuild pipeline`);
|
|
1127
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1124
1128
|
try {
|
|
1125
1129
|
const opts = Array.isArray(options) ? options : [options];
|
|
1126
1130
|
if (opts.length === 0) {
|
|
@@ -1135,9 +1139,9 @@ async function build2(options) {
|
|
|
1135
1139
|
executeTsup(context)
|
|
1136
1140
|
]);
|
|
1137
1141
|
await reportResults(context);
|
|
1138
|
-
|
|
1142
|
+
_chunkZVAXGNHMjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1139
1143
|
} catch (error) {
|
|
1140
|
-
|
|
1144
|
+
_chunkZVAXGNHMjs.writeFatal.call(void 0,
|
|
1141
1145
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1142
1146
|
);
|
|
1143
1147
|
throw error;
|
|
@@ -1148,7 +1152,7 @@ async function build2(options) {
|
|
|
1148
1152
|
|
|
1149
1153
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1150
1154
|
async function esbuildExecutorFn(options, context, config) {
|
|
1151
|
-
|
|
1155
|
+
_chunkZVAXGNHMjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1152
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])) {
|
|
1153
1157
|
throw new Error(
|
|
1154
1158
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1190,7 +1194,7 @@ var _jiti = require('jiti');
|
|
|
1190
1194
|
var _fileutils = require('nx/src/utils/fileutils');
|
|
1191
1195
|
async function napiExecutor(options, context, config) {
|
|
1192
1196
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1193
|
-
fsCache: config.skipCache ? false :
|
|
1197
|
+
fsCache: config.skipCache ? false : _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
1194
1198
|
config.workspaceRoot,
|
|
1195
1199
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1196
1200
|
"jiti"
|
|
@@ -1206,53 +1210,53 @@ async function napiExecutor(options, context, config) {
|
|
|
1206
1210
|
);
|
|
1207
1211
|
}
|
|
1208
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]);
|
|
1209
|
-
const packageJson =
|
|
1213
|
+
const packageJson = _chunkZVAXGNHMjs.joinPaths.call(void 0, _nullishCoalesce(projectRoot, () => ( ".")), "package.json");
|
|
1210
1214
|
if (!_fileutils.fileExists.call(void 0, packageJson)) {
|
|
1211
1215
|
throw new Error(`Could not find package.json at ${packageJson}`);
|
|
1212
1216
|
}
|
|
1213
1217
|
const napi = new NapiCli();
|
|
1214
1218
|
const normalizedOptions = { ...options };
|
|
1215
1219
|
const metadata = cargoMetadata();
|
|
1216
|
-
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _90 => _90.target_directory]) ||
|
|
1220
|
+
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _90 => _90.target_directory]) || _chunkZVAXGNHMjs.joinPaths.call(void 0, config.workspaceRoot, "dist", "target");
|
|
1217
1221
|
normalizedOptions.outputDir = options.outputPath;
|
|
1218
1222
|
normalizedOptions.packageJsonPath = options.packageJsonPath || packageJson;
|
|
1219
1223
|
if (options.cwd) {
|
|
1220
|
-
normalizedOptions.cwd =
|
|
1224
|
+
normalizedOptions.cwd = _chunkZVAXGNHMjs.correctPaths.call(void 0, options.cwd);
|
|
1221
1225
|
} else {
|
|
1222
|
-
normalizedOptions.cwd =
|
|
1223
|
-
const absoluteProjectRoot =
|
|
1226
|
+
normalizedOptions.cwd = _chunkZVAXGNHMjs.correctPaths.call(void 0, projectRoot);
|
|
1227
|
+
const absoluteProjectRoot = _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
1224
1228
|
config.workspaceRoot,
|
|
1225
1229
|
projectRoot || "."
|
|
1226
1230
|
);
|
|
1227
1231
|
if (normalizedOptions.outputDir) {
|
|
1228
|
-
normalizedOptions.outputDir =
|
|
1232
|
+
normalizedOptions.outputDir = _chunkZVAXGNHMjs.relative.call(void 0,
|
|
1229
1233
|
absoluteProjectRoot,
|
|
1230
|
-
|
|
1231
|
-
|
|
1234
|
+
_chunkZVAXGNHMjs.correctPaths.call(void 0,
|
|
1235
|
+
_chunkZVAXGNHMjs.isAbsolute.call(void 0, normalizedOptions.outputDir) ? normalizedOptions.outputDir : _chunkZVAXGNHMjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.outputDir)
|
|
1232
1236
|
)
|
|
1233
1237
|
);
|
|
1234
1238
|
}
|
|
1235
1239
|
if (normalizedOptions.packageJsonPath) {
|
|
1236
|
-
normalizedOptions.packageJsonPath =
|
|
1240
|
+
normalizedOptions.packageJsonPath = _chunkZVAXGNHMjs.relative.call(void 0,
|
|
1237
1241
|
absoluteProjectRoot,
|
|
1238
|
-
|
|
1239
|
-
|
|
1242
|
+
_chunkZVAXGNHMjs.correctPaths.call(void 0,
|
|
1243
|
+
_chunkZVAXGNHMjs.isAbsolute.call(void 0, normalizedOptions.packageJsonPath) ? normalizedOptions.packageJsonPath : _chunkZVAXGNHMjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.packageJsonPath)
|
|
1240
1244
|
)
|
|
1241
1245
|
);
|
|
1242
1246
|
}
|
|
1243
1247
|
if (normalizedOptions.configPath) {
|
|
1244
|
-
normalizedOptions.configPath =
|
|
1248
|
+
normalizedOptions.configPath = _chunkZVAXGNHMjs.relative.call(void 0,
|
|
1245
1249
|
absoluteProjectRoot,
|
|
1246
|
-
|
|
1247
|
-
|
|
1250
|
+
_chunkZVAXGNHMjs.correctPaths.call(void 0,
|
|
1251
|
+
_chunkZVAXGNHMjs.isAbsolute.call(void 0, normalizedOptions.configPath) ? normalizedOptions.configPath : _chunkZVAXGNHMjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.configPath)
|
|
1248
1252
|
)
|
|
1249
1253
|
);
|
|
1250
1254
|
}
|
|
1251
1255
|
if (normalizedOptions.manifestPath) {
|
|
1252
|
-
normalizedOptions.manifestPath =
|
|
1256
|
+
normalizedOptions.manifestPath = _chunkZVAXGNHMjs.relative.call(void 0,
|
|
1253
1257
|
absoluteProjectRoot,
|
|
1254
|
-
|
|
1255
|
-
|
|
1258
|
+
_chunkZVAXGNHMjs.correctPaths.call(void 0,
|
|
1259
|
+
_chunkZVAXGNHMjs.isAbsolute.call(void 0, normalizedOptions.manifestPath) ? normalizedOptions.manifestPath : _chunkZVAXGNHMjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.manifestPath)
|
|
1256
1260
|
)
|
|
1257
1261
|
);
|
|
1258
1262
|
}
|
|
@@ -1325,14 +1329,14 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
1325
1329
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
1326
1330
|
);
|
|
1327
1331
|
}
|
|
1328
|
-
|
|
1332
|
+
_chunkZVAXGNHMjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
1329
1333
|
_sizelimit2.default.call(void 0, [_file2.default, _esbuild2.default, _esbuildwhy2.default], {
|
|
1330
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,
|
|
1331
1335
|
_nullishCoalesce(_optionalChain([context, 'access', _98 => _98.projectsConfigurations, 'access', _99 => _99.projects, 'access', _100 => _100[context.projectName], 'optionalAccess', _101 => _101.root]), () => ( "./")),
|
|
1332
1336
|
"src"
|
|
1333
1337
|
)))
|
|
1334
1338
|
}).then((result) => {
|
|
1335
|
-
|
|
1339
|
+
_chunkZVAXGNHMjs.writeInfo.call(void 0,
|
|
1336
1340
|
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
1337
1341
|
config
|
|
1338
1342
|
);
|
|
@@ -1402,19 +1406,19 @@ function toTSDownFormat(format3) {
|
|
|
1402
1406
|
// ../tsdown/src/build.ts
|
|
1403
1407
|
var resolveOptions = async (userOptions) => {
|
|
1404
1408
|
const options = getDefaultOptions(userOptions);
|
|
1405
|
-
const workspaceRoot2 =
|
|
1409
|
+
const workspaceRoot2 = _chunkU63JI4YTjs.findWorkspaceRoot.call(void 0, options.projectRoot);
|
|
1406
1410
|
if (!workspaceRoot2) {
|
|
1407
1411
|
throw new Error("Cannot find Nx workspace root");
|
|
1408
1412
|
}
|
|
1409
|
-
const workspaceConfig = await
|
|
1413
|
+
const workspaceConfig = await _chunkU63JI4YTjs.getWorkspaceConfig.call(void 0, options.debug === true, {
|
|
1410
1414
|
workspaceRoot: workspaceRoot2
|
|
1411
1415
|
});
|
|
1412
|
-
|
|
1413
|
-
const stopwatch =
|
|
1416
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
1417
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1414
1418
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1415
1419
|
exitOnError: true
|
|
1416
1420
|
});
|
|
1417
|
-
const projectJsonPath =
|
|
1421
|
+
const projectJsonPath = _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
1418
1422
|
workspaceRoot2,
|
|
1419
1423
|
options.projectRoot,
|
|
1420
1424
|
"project.json"
|
|
@@ -1431,7 +1435,7 @@ var resolveOptions = async (userOptions) => {
|
|
|
1431
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."
|
|
1432
1436
|
);
|
|
1433
1437
|
}
|
|
1434
|
-
const packageJsonPath =
|
|
1438
|
+
const packageJsonPath = _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
1435
1439
|
workspaceRoot2,
|
|
1436
1440
|
options.projectRoot,
|
|
1437
1441
|
"package.json"
|
|
@@ -1440,13 +1444,13 @@ var resolveOptions = async (userOptions) => {
|
|
|
1440
1444
|
throw new Error("Cannot find package.json configuration");
|
|
1441
1445
|
}
|
|
1442
1446
|
const debug = _nullishCoalesce(options.debug, () => ( (options.mode || workspaceConfig.mode) === "development"));
|
|
1443
|
-
const sourceRoot = projectJson.sourceRoot ||
|
|
1447
|
+
const sourceRoot = projectJson.sourceRoot || _chunkZVAXGNHMjs.joinPaths.call(void 0, options.projectRoot, "src");
|
|
1444
1448
|
const result = {
|
|
1445
1449
|
name: projectName,
|
|
1446
1450
|
mode: "production",
|
|
1447
1451
|
target: DEFAULT_TARGET,
|
|
1448
1452
|
generatePackageJson: true,
|
|
1449
|
-
outDir:
|
|
1453
|
+
outDir: _chunkZVAXGNHMjs.joinPaths.call(void 0, "dist", options.projectRoot),
|
|
1450
1454
|
minify: !debug,
|
|
1451
1455
|
plugins: [],
|
|
1452
1456
|
assets: [],
|
|
@@ -1458,12 +1462,12 @@ var resolveOptions = async (userOptions) => {
|
|
|
1458
1462
|
clean: false,
|
|
1459
1463
|
fixedExtension: true,
|
|
1460
1464
|
nodeProtocol: true,
|
|
1461
|
-
tsconfig:
|
|
1465
|
+
tsconfig: _chunkZVAXGNHMjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
1462
1466
|
debug,
|
|
1463
1467
|
sourceRoot,
|
|
1464
1468
|
cwd: workspaceConfig.workspaceRoot,
|
|
1465
1469
|
entry: {
|
|
1466
|
-
["index"]:
|
|
1470
|
+
["index"]: _chunkZVAXGNHMjs.joinPaths.call(void 0, sourceRoot, "index.ts")
|
|
1467
1471
|
},
|
|
1468
1472
|
workspace: true,
|
|
1469
1473
|
...options,
|
|
@@ -1482,15 +1486,15 @@ var resolveOptions = async (userOptions) => {
|
|
|
1482
1486
|
return result;
|
|
1483
1487
|
};
|
|
1484
1488
|
async function generatePackageJson2(options) {
|
|
1485
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1486
|
-
|
|
1487
|
-
const stopwatch =
|
|
1488
|
-
const packageJsonPath =
|
|
1489
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkZVAXGNHMjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1490
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.workspaceConfig);
|
|
1491
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1492
|
+
const packageJsonPath = _chunkZVAXGNHMjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1489
1493
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1490
1494
|
throw new Error("Cannot find package.json configuration");
|
|
1491
1495
|
}
|
|
1492
1496
|
const packageJsonFile = await _promises2.default.readFile(
|
|
1493
|
-
|
|
1497
|
+
_chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
1494
1498
|
options.workspaceConfig.workspaceRoot,
|
|
1495
1499
|
options.projectRoot,
|
|
1496
1500
|
"package.json"
|
|
@@ -1552,14 +1556,14 @@ async function generatePackageJson2(options) {
|
|
|
1552
1556
|
},
|
|
1553
1557
|
packageJson.exports
|
|
1554
1558
|
);
|
|
1555
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1559
|
+
await _devkit.writeJsonFile.call(void 0, _chunkZVAXGNHMjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
1556
1560
|
stopwatch();
|
|
1557
1561
|
}
|
|
1558
1562
|
return options;
|
|
1559
1563
|
}
|
|
1560
1564
|
async function executeTSDown(options) {
|
|
1561
|
-
|
|
1562
|
-
const stopwatch =
|
|
1565
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.workspaceConfig);
|
|
1566
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1563
1567
|
await _tsdown.build.call(void 0, {
|
|
1564
1568
|
...options,
|
|
1565
1569
|
entry: options.entry,
|
|
@@ -1569,11 +1573,11 @@ async function executeTSDown(options) {
|
|
|
1569
1573
|
return options;
|
|
1570
1574
|
}
|
|
1571
1575
|
async function copyBuildAssets2(options) {
|
|
1572
|
-
|
|
1576
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0,
|
|
1573
1577
|
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
1574
1578
|
options.workspaceConfig
|
|
1575
1579
|
);
|
|
1576
|
-
const stopwatch =
|
|
1580
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1577
1581
|
await copyAssets(
|
|
1578
1582
|
options.workspaceConfig,
|
|
1579
1583
|
_nullishCoalesce(options.assets, () => ( [])),
|
|
@@ -1587,18 +1591,18 @@ async function copyBuildAssets2(options) {
|
|
|
1587
1591
|
return options;
|
|
1588
1592
|
}
|
|
1589
1593
|
async function reportResults2(options) {
|
|
1590
|
-
|
|
1594
|
+
_chunkZVAXGNHMjs.writeSuccess.call(void 0,
|
|
1591
1595
|
` \u{1F4E6} The ${options.name} build completed successfully`,
|
|
1592
1596
|
options.workspaceConfig
|
|
1593
1597
|
);
|
|
1594
1598
|
}
|
|
1595
1599
|
async function cleanOutputPath2(options) {
|
|
1596
1600
|
if (options.clean !== false && options.workspaceConfig) {
|
|
1597
|
-
|
|
1601
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0,
|
|
1598
1602
|
` \u{1F9F9} Cleaning ${options.name} output path: ${options.workspaceConfig}`,
|
|
1599
1603
|
options.workspaceConfig
|
|
1600
1604
|
);
|
|
1601
|
-
const stopwatch =
|
|
1605
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1602
1606
|
await cleanDirectories2(
|
|
1603
1607
|
options.name,
|
|
1604
1608
|
options.outDir,
|
|
@@ -1609,8 +1613,8 @@ async function cleanOutputPath2(options) {
|
|
|
1609
1613
|
return options;
|
|
1610
1614
|
}
|
|
1611
1615
|
async function build3(options) {
|
|
1612
|
-
|
|
1613
|
-
const stopwatch =
|
|
1616
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, ` ${_chunkZVAXGNHMjs.brandIcon.call(void 0, )} Executing Storm TSDown pipeline`);
|
|
1617
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1614
1618
|
try {
|
|
1615
1619
|
const opts = Array.isArray(options) ? options : [options];
|
|
1616
1620
|
if (opts.length === 0) {
|
|
@@ -1630,13 +1634,13 @@ async function build3(options) {
|
|
|
1630
1634
|
})
|
|
1631
1635
|
);
|
|
1632
1636
|
} else {
|
|
1633
|
-
|
|
1637
|
+
_chunkZVAXGNHMjs.writeWarning.call(void 0,
|
|
1634
1638
|
" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function."
|
|
1635
1639
|
);
|
|
1636
1640
|
}
|
|
1637
|
-
|
|
1641
|
+
_chunkZVAXGNHMjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1638
1642
|
} catch (error) {
|
|
1639
|
-
|
|
1643
|
+
_chunkZVAXGNHMjs.writeFatal.call(void 0,
|
|
1640
1644
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1641
1645
|
);
|
|
1642
1646
|
throw error;
|
|
@@ -1647,7 +1651,7 @@ async function build3(options) {
|
|
|
1647
1651
|
|
|
1648
1652
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1649
1653
|
async function tsdownExecutorFn(options, context, config) {
|
|
1650
|
-
|
|
1654
|
+
_chunkZVAXGNHMjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown executor on the workspace", config);
|
|
1651
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])) {
|
|
1652
1656
|
throw new Error(
|
|
1653
1657
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1689,12 +1693,12 @@ var _fsextra = require('fs-extra');
|
|
|
1689
1693
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1690
1694
|
async function typiaExecutorFn(options, _, config) {
|
|
1691
1695
|
if (options.clean !== false) {
|
|
1692
|
-
|
|
1696
|
+
_chunkZVAXGNHMjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1693
1697
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1694
1698
|
}
|
|
1695
1699
|
await Promise.all(
|
|
1696
1700
|
options.entry.map((entry) => {
|
|
1697
|
-
|
|
1701
|
+
_chunkZVAXGNHMjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1698
1702
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1699
1703
|
input: entry,
|
|
1700
1704
|
output: options.outputPath,
|
|
@@ -1727,7 +1731,7 @@ var executor_default10 = withRunExecutor(
|
|
|
1727
1731
|
|
|
1728
1732
|
|
|
1729
1733
|
async function unbuildExecutorFn(options, context, config) {
|
|
1730
|
-
|
|
1734
|
+
_chunkZVAXGNHMjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1731
1735
|
if (!_optionalChain([context, 'access', _118 => _118.projectsConfigurations, 'optionalAccess', _119 => _119.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1732
1736
|
throw new Error(
|
|
1733
1737
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
@@ -1744,7 +1748,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1744
1748
|
);
|
|
1745
1749
|
}
|
|
1746
1750
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1747
|
-
fsCache: config.skipCache ? false :
|
|
1751
|
+
fsCache: config.skipCache ? false : _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
1748
1752
|
config.workspaceRoot,
|
|
1749
1753
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1750
1754
|
"jiti"
|
|
@@ -1766,7 +1770,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1766
1770
|
{
|
|
1767
1771
|
stubOptions: {
|
|
1768
1772
|
jiti: {
|
|
1769
|
-
fsCache: config.skipCache ? false :
|
|
1773
|
+
fsCache: config.skipCache ? false : _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
1770
1774
|
config.workspaceRoot,
|
|
1771
1775
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1772
1776
|
"jiti"
|
|
@@ -1826,30 +1830,33 @@ var executor_default11 = withRunExecutor(
|
|
|
1826
1830
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
1827
1831
|
skipReadingConfig: false
|
|
1828
1832
|
}) => async (tree, _options) => {
|
|
1829
|
-
const stopwatch =
|
|
1833
|
+
const stopwatch = _chunkZVAXGNHMjs.getStopwatch.call(void 0, name);
|
|
1830
1834
|
let options = _options;
|
|
1831
1835
|
let config;
|
|
1832
1836
|
try {
|
|
1833
|
-
|
|
1837
|
+
_chunkZVAXGNHMjs.writeInfo.call(void 0,
|
|
1838
|
+
`${_chunkZVAXGNHMjs.brandIcon.call(void 0, config)} Running the ${name} generator...
|
|
1834
1839
|
|
|
1835
|
-
`,
|
|
1836
|
-
|
|
1840
|
+
`,
|
|
1841
|
+
config
|
|
1842
|
+
);
|
|
1843
|
+
const workspaceRoot2 = _chunkU63JI4YTjs.findWorkspaceRoot.call(void 0, );
|
|
1837
1844
|
if (!generatorOptions.skipReadingConfig) {
|
|
1838
|
-
|
|
1845
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0,
|
|
1839
1846
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1840
1847
|
- workspaceRoot: ${workspaceRoot2}`,
|
|
1841
1848
|
config
|
|
1842
1849
|
);
|
|
1843
|
-
config = await
|
|
1850
|
+
config = await _chunkU63JI4YTjs.getConfig.call(void 0, workspaceRoot2);
|
|
1844
1851
|
}
|
|
1845
1852
|
if (_optionalChain([generatorOptions, 'optionalAccess', _120 => _120.hooks, 'optionalAccess', _121 => _121.applyDefaultOptions])) {
|
|
1846
|
-
|
|
1853
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1847
1854
|
options = await Promise.resolve(
|
|
1848
1855
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
1849
1856
|
);
|
|
1850
|
-
|
|
1857
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1851
1858
|
}
|
|
1852
|
-
|
|
1859
|
+
_chunkZVAXGNHMjs.writeTrace.call(void 0,
|
|
1853
1860
|
`Generator schema options \u2699\uFE0F
|
|
1854
1861
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
1855
1862
|
config
|
|
@@ -1860,11 +1867,11 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1860
1867
|
applyWorkspaceBaseTokens
|
|
1861
1868
|
);
|
|
1862
1869
|
if (_optionalChain([generatorOptions, 'optionalAccess', _122 => _122.hooks, 'optionalAccess', _123 => _123.preProcess])) {
|
|
1863
|
-
|
|
1870
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
1864
1871
|
await Promise.resolve(
|
|
1865
1872
|
generatorOptions.hooks.preProcess(tokenized, config)
|
|
1866
1873
|
);
|
|
1867
|
-
|
|
1874
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
1868
1875
|
}
|
|
1869
1876
|
const result = await Promise.resolve(
|
|
1870
1877
|
generatorFn(tree, tokenized, config)
|
|
@@ -1879,21 +1886,21 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1879
1886
|
}
|
|
1880
1887
|
}
|
|
1881
1888
|
if (_optionalChain([generatorOptions, 'optionalAccess', _133 => _133.hooks, 'optionalAccess', _134 => _134.postProcess])) {
|
|
1882
|
-
|
|
1889
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
1883
1890
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1884
|
-
|
|
1891
|
+
_chunkZVAXGNHMjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
1885
1892
|
}
|
|
1886
1893
|
return () => {
|
|
1887
|
-
|
|
1894
|
+
_chunkZVAXGNHMjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
1888
1895
|
`, config);
|
|
1889
1896
|
};
|
|
1890
1897
|
} catch (error) {
|
|
1891
1898
|
return () => {
|
|
1892
|
-
|
|
1899
|
+
_chunkZVAXGNHMjs.writeFatal.call(void 0,
|
|
1893
1900
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
1894
1901
|
config
|
|
1895
1902
|
);
|
|
1896
|
-
|
|
1903
|
+
_chunkZVAXGNHMjs.writeError.call(void 0,
|
|
1897
1904
|
`An exception was thrown in the generator's process
|
|
1898
1905
|
- Details: ${error.message}
|
|
1899
1906
|
- Stacktrace: ${error.stack}`,
|
|
@@ -1959,16 +1966,16 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1959
1966
|
const projectConfig = {
|
|
1960
1967
|
root: normalized.directory,
|
|
1961
1968
|
projectType: "library",
|
|
1962
|
-
sourceRoot:
|
|
1969
|
+
sourceRoot: _chunkZVAXGNHMjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
1963
1970
|
targets: {
|
|
1964
1971
|
build: {
|
|
1965
1972
|
executor: options.buildExecutor,
|
|
1966
1973
|
outputs: ["{options.outputPath}"],
|
|
1967
1974
|
options: {
|
|
1968
|
-
entry: [
|
|
1975
|
+
entry: [_chunkZVAXGNHMjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
|
|
1969
1976
|
outputPath: getOutputPath(normalized),
|
|
1970
|
-
tsconfig:
|
|
1971
|
-
project:
|
|
1977
|
+
tsconfig: _chunkZVAXGNHMjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
1978
|
+
project: _chunkZVAXGNHMjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
1972
1979
|
defaultConfiguration: "production",
|
|
1973
1980
|
platform: "neutral",
|
|
1974
1981
|
assets: [
|
|
@@ -2025,7 +2032,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2025
2032
|
if (!normalized.importPath) {
|
|
2026
2033
|
normalized.importPath = normalized.name;
|
|
2027
2034
|
}
|
|
2028
|
-
const packageJsonPath =
|
|
2035
|
+
const packageJsonPath = _chunkZVAXGNHMjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
2029
2036
|
if (tree.exists(packageJsonPath)) {
|
|
2030
2037
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2031
2038
|
if (!normalized.importPath) {
|
|
@@ -2082,14 +2089,14 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2082
2089
|
}));
|
|
2083
2090
|
}
|
|
2084
2091
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
2085
|
-
|
|
2092
|
+
_chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
2086
2093
|
normalized.projectRoot,
|
|
2087
2094
|
"./src",
|
|
2088
2095
|
`index.${normalized.js ? "js" : "ts"}`
|
|
2089
2096
|
)
|
|
2090
2097
|
]);
|
|
2091
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2092
|
-
|
|
2098
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkZVAXGNHMjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
2099
|
+
_chunkZVAXGNHMjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
2093
2100
|
]);
|
|
2094
2101
|
if (tree.exists("package.json")) {
|
|
2095
2102
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2100,7 +2107,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2100
2107
|
description = packageJson.description;
|
|
2101
2108
|
}
|
|
2102
2109
|
}
|
|
2103
|
-
const tsconfigPath =
|
|
2110
|
+
const tsconfigPath = _chunkZVAXGNHMjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
2104
2111
|
if (tree.exists(tsconfigPath)) {
|
|
2105
2112
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2106
2113
|
json.composite ??= true;
|
|
@@ -2128,7 +2135,7 @@ function getOutputPath(options) {
|
|
|
2128
2135
|
} else {
|
|
2129
2136
|
parts.push(options.projectRoot);
|
|
2130
2137
|
}
|
|
2131
|
-
return
|
|
2138
|
+
return _chunkZVAXGNHMjs.joinPaths.call(void 0, ...parts);
|
|
2132
2139
|
}
|
|
2133
2140
|
function createProjectTsConfigJson(tree, options) {
|
|
2134
2141
|
const tsconfig = {
|
|
@@ -2136,7 +2143,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2136
2143
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _149 => _149.tsconfigOptions]), () => ( {})),
|
|
2137
2144
|
compilerOptions: {
|
|
2138
2145
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2139
|
-
outDir:
|
|
2146
|
+
outDir: _chunkZVAXGNHMjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2140
2147
|
noEmit: true,
|
|
2141
2148
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _150 => _150.tsconfigOptions, 'optionalAccess', _151 => _151.compilerOptions]), () => ( {}))
|
|
2142
2149
|
},
|
|
@@ -2154,7 +2161,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2154
2161
|
"src/**/*.test.ts"
|
|
2155
2162
|
]
|
|
2156
2163
|
};
|
|
2157
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2164
|
+
_devkit.writeJson.call(void 0, tree, _chunkZVAXGNHMjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2158
2165
|
}
|
|
2159
2166
|
async function normalizeOptions(tree, options, config) {
|
|
2160
2167
|
let importPath = options.importPath;
|
|
@@ -2219,7 +2226,7 @@ async function normalizeOptions(tree, options, config) {
|
|
|
2219
2226
|
|
|
2220
2227
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2221
2228
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
2222
|
-
const filesDir =
|
|
2229
|
+
const filesDir = _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
2223
2230
|
__dirname,
|
|
2224
2231
|
"src",
|
|
2225
2232
|
"generators",
|
|
@@ -2302,38 +2309,38 @@ var generator_default = withRunGenerator(
|
|
|
2302
2309
|
|
|
2303
2310
|
var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
|
|
2304
2311
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2305
|
-
|
|
2312
|
+
_chunkZVAXGNHMjs.writeInfo.call(void 0,
|
|
2306
2313
|
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
2307
2314
|
config
|
|
2308
2315
|
);
|
|
2309
|
-
|
|
2316
|
+
_chunkZVAXGNHMjs.writeTrace.call(void 0,
|
|
2310
2317
|
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
2311
2318
|
config
|
|
2312
2319
|
);
|
|
2313
|
-
const jsonSchema = z.toJSONSchema(
|
|
2320
|
+
const jsonSchema = z.toJSONSchema(_chunkU63JI4YTjs.workspaceConfigSchema, {
|
|
2314
2321
|
target: "draft-7",
|
|
2315
|
-
metadata:
|
|
2322
|
+
metadata: _chunkU63JI4YTjs.schemaRegistry
|
|
2316
2323
|
});
|
|
2317
2324
|
jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
|
|
2318
2325
|
jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
|
|
2319
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.";
|
|
2320
|
-
|
|
2327
|
+
_chunkZVAXGNHMjs.writeTrace.call(void 0, jsonSchema, config);
|
|
2321
2328
|
if (!options.outputFile) {
|
|
2322
2329
|
throw new Error(
|
|
2323
2330
|
"The `outputFile` option is required. Please specify the output file path."
|
|
2324
2331
|
);
|
|
2325
2332
|
}
|
|
2326
2333
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
2327
|
-
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _160 => _160.workspaceRoot]), () => (
|
|
2334
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _160 => _160.workspaceRoot]), () => ( _chunkU63JI4YTjs.findWorkspaceRoot.call(void 0, ))),
|
|
2328
2335
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
2329
2336
|
);
|
|
2330
|
-
|
|
2337
|
+
_chunkZVAXGNHMjs.writeTrace.call(void 0,
|
|
2331
2338
|
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
2332
2339
|
config
|
|
2333
2340
|
);
|
|
2334
2341
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
2335
2342
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2336
|
-
|
|
2343
|
+
_chunkZVAXGNHMjs.writeSuccess.call(void 0,
|
|
2337
2344
|
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
2338
2345
|
config
|
|
2339
2346
|
);
|
|
@@ -2368,7 +2375,7 @@ var generator_default2 = withRunGenerator(
|
|
|
2368
2375
|
|
|
2369
2376
|
|
|
2370
2377
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
2371
|
-
const filesDir =
|
|
2378
|
+
const filesDir = _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
2372
2379
|
__dirname,
|
|
2373
2380
|
"src",
|
|
2374
2381
|
"generators",
|
|
@@ -2427,7 +2434,7 @@ var generator_default3 = withRunGenerator(
|
|
|
2427
2434
|
|
|
2428
2435
|
|
|
2429
2436
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
2430
|
-
const filesDir =
|
|
2437
|
+
const filesDir = _chunkZVAXGNHMjs.joinPaths.call(void 0,
|
|
2431
2438
|
__dirname,
|
|
2432
2439
|
"src",
|
|
2433
2440
|
"generators",
|