@storm-software/cloudflare-tools 0.70.39 → 0.70.41
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 +26 -0
- package/README.md +1 -1
- package/dist/{chunk-ZWF65Q7E.js → chunk-4BWM53AA.js} +4 -2
- package/dist/{chunk-FLGNERJF.mjs → chunk-5N2NVDKX.mjs} +1 -1
- package/dist/{chunk-NRPYQWQ4.mjs → chunk-6MATO2MJ.mjs} +4 -2
- package/dist/{chunk-PFTILUUJ.mjs → chunk-C6RH6OWS.mjs} +5 -5
- package/dist/{chunk-UANZ3WV5.js → chunk-EQXEFXCV.js} +10 -10
- package/dist/{chunk-FSMVVWYT.js → chunk-FFOLWRMA.js} +3 -3
- package/dist/{chunk-5HCV2FJY.mjs → chunk-LKWWFIMC.mjs} +3 -3
- package/dist/{chunk-F5CQSH7Y.js → chunk-OTDPGPH4.js} +16 -16
- package/dist/{chunk-4OWK4XVG.mjs → chunk-PTTJW7MW.mjs} +1 -1
- package/dist/{chunk-Q2TBTELO.js → chunk-VJWS2NTW.js} +12 -12
- package/dist/{chunk-ZASMKBXP.mjs → chunk-WBUCIAVK.mjs} +3 -3
- package/dist/{chunk-V57GKOIC.mjs → chunk-XFCVGJUC.mjs} +2 -2
- package/dist/{chunk-G4XKRD64.js → chunk-Y74JSN4E.js} +5 -5
- package/dist/{chunk-AS3VLT2O.js → chunk-YAUK66IM.js} +165 -165
- 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 +12 -12
|
@@ -12,7 +12,7 @@ var _chunkNU34IEWNjs = require('./chunk-NU34IEWN.js');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkEQXEFXCVjs = require('./chunk-EQXEFXCV.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -23,7 +23,7 @@ var _chunkUANZ3WV5js = require('./chunk-UANZ3WV5.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunk4BWM53AAjs = require('./chunk-4BWM53AA.js');
|
|
27
27
|
|
|
28
28
|
// ../config-tools/src/utilities/apply-workspace-tokens.ts
|
|
29
29
|
var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
@@ -60,7 +60,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
|
60
60
|
if (result.includes("{workspaceRoot}")) {
|
|
61
61
|
result = result.replaceAll(
|
|
62
62
|
"{workspaceRoot}",
|
|
63
|
-
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => (
|
|
63
|
+
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => ( _chunkEQXEFXCVjs.findWorkspaceRoot.call(void 0, )))
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
return result;
|
|
@@ -100,7 +100,7 @@ var applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
|
|
|
100
100
|
// ../workspace-tools/src/base/base-executor.ts
|
|
101
101
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
102
102
|
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
103
|
-
const stopwatch =
|
|
103
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, name);
|
|
104
104
|
let options = _options;
|
|
105
105
|
let config = {};
|
|
106
106
|
try {
|
|
@@ -109,14 +109,14 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
109
109
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
|
-
const workspaceRoot2 =
|
|
112
|
+
const workspaceRoot2 = _chunkEQXEFXCVjs.findWorkspaceRoot.call(void 0, );
|
|
113
113
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot2;
|
|
114
114
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot2;
|
|
115
115
|
const projectName = context.projectName;
|
|
116
116
|
config.workspaceRoot = workspaceRoot2;
|
|
117
|
-
|
|
117
|
+
_chunk4BWM53AAjs.writeInfo.call(void 0, `\u26A1 Running the ${name} executor for ${projectName} `, config);
|
|
118
118
|
if (!executorOptions.skipReadingConfig) {
|
|
119
|
-
|
|
119
|
+
_chunk4BWM53AAjs.writeTrace.call(void 0,
|
|
120
120
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
121
121
|
- workspaceRoot: ${workspaceRoot2}
|
|
122
122
|
- projectRoot: ${projectRoot}
|
|
@@ -125,18 +125,18 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
125
125
|
`,
|
|
126
126
|
config
|
|
127
127
|
);
|
|
128
|
-
config = await
|
|
128
|
+
config = await _chunkEQXEFXCVjs.getConfig.call(void 0, workspaceRoot2);
|
|
129
129
|
}
|
|
130
130
|
if (_optionalChain([executorOptions, 'optionalAccess', _7 => _7.hooks, 'optionalAccess', _8 => _8.applyDefaultOptions])) {
|
|
131
|
-
|
|
131
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
132
132
|
options = await Promise.resolve(
|
|
133
133
|
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
134
134
|
);
|
|
135
|
-
|
|
135
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
_chunk4BWM53AAjs.writeTrace.call(void 0,
|
|
138
138
|
`Executor schema options \u2699\uFE0F
|
|
139
|
-
${
|
|
139
|
+
${_chunk4BWM53AAjs.formatLogMessage.call(void 0, options)}
|
|
140
140
|
`,
|
|
141
141
|
config
|
|
142
142
|
);
|
|
@@ -149,18 +149,18 @@ ${_chunkZWF65Q7Ejs.formatLogMessage.call(void 0, options)}
|
|
|
149
149
|
),
|
|
150
150
|
applyWorkspaceProjectTokens
|
|
151
151
|
);
|
|
152
|
-
|
|
152
|
+
_chunk4BWM53AAjs.writeTrace.call(void 0,
|
|
153
153
|
`Executor schema tokenized options \u2699\uFE0F
|
|
154
|
-
${
|
|
154
|
+
${_chunk4BWM53AAjs.formatLogMessage.call(void 0, tokenized)}
|
|
155
155
|
`,
|
|
156
156
|
config
|
|
157
157
|
);
|
|
158
158
|
if (_optionalChain([executorOptions, 'optionalAccess', _9 => _9.hooks, 'optionalAccess', _10 => _10.preProcess])) {
|
|
159
|
-
|
|
159
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
160
160
|
await Promise.resolve(
|
|
161
161
|
executorOptions.hooks.preProcess(tokenized, config)
|
|
162
162
|
);
|
|
163
|
-
|
|
163
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
164
164
|
}
|
|
165
165
|
const ret = executorFn(tokenized, context, config);
|
|
166
166
|
if (_isFunction(_optionalChain([ret, 'optionalAccess', _11 => _11.next]))) {
|
|
@@ -175,7 +175,7 @@ ${_chunkZWF65Q7Ejs.formatLogMessage.call(void 0, tokenized)}
|
|
|
175
175
|
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
176
|
throw new Error(
|
|
177
177
|
`Failure determined while running the ${name} executor
|
|
178
|
-
${
|
|
178
|
+
${_chunk4BWM53AAjs.formatLogMessage.call(void 0,
|
|
179
179
|
result
|
|
180
180
|
)}`,
|
|
181
181
|
{
|
|
@@ -184,21 +184,21 @@ ${_chunkZWF65Q7Ejs.formatLogMessage.call(void 0,
|
|
|
184
184
|
);
|
|
185
185
|
}
|
|
186
186
|
if (_optionalChain([executorOptions, 'optionalAccess', _21 => _21.hooks, 'optionalAccess', _22 => _22.postProcess])) {
|
|
187
|
-
|
|
187
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
188
188
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
189
|
-
|
|
189
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
_chunk4BWM53AAjs.writeSuccess.call(void 0, `Completed running the ${name} task executor!
|
|
192
192
|
`, config);
|
|
193
193
|
return {
|
|
194
194
|
success: true
|
|
195
195
|
};
|
|
196
196
|
} catch (error) {
|
|
197
|
-
|
|
197
|
+
_chunk4BWM53AAjs.writeFatal.call(void 0,
|
|
198
198
|
"A fatal error occurred while running the executor - the process was forced to terminate",
|
|
199
199
|
config
|
|
200
200
|
);
|
|
201
|
-
|
|
201
|
+
_chunk4BWM53AAjs.writeError.call(void 0,
|
|
202
202
|
`An exception was thrown in the executor's process
|
|
203
203
|
- Details: ${error.message}
|
|
204
204
|
- Stacktrace: ${error.stack}`,
|
|
@@ -505,9 +505,9 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
505
505
|
output: "src/"
|
|
506
506
|
});
|
|
507
507
|
}
|
|
508
|
-
|
|
508
|
+
_chunk4BWM53AAjs.writeTrace.call(void 0,
|
|
509
509
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
510
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
510
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkEQXEFXCVjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
511
511
|
config
|
|
512
512
|
);
|
|
513
513
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
@@ -517,20 +517,20 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
517
517
|
assets: pendingAssets
|
|
518
518
|
});
|
|
519
519
|
await assetHandler.processAllAssetsOnce();
|
|
520
|
-
|
|
520
|
+
_chunk4BWM53AAjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
521
521
|
if (includeSrc === true) {
|
|
522
|
-
|
|
523
|
-
`\u{1F4DD} Adding banner and writing source files: ${
|
|
522
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0,
|
|
523
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
524
524
|
outputPath,
|
|
525
525
|
"src"
|
|
526
526
|
)}`,
|
|
527
527
|
config
|
|
528
528
|
);
|
|
529
529
|
const files = await _glob.glob.call(void 0, [
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
530
|
+
_chunkEQXEFXCVjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
531
|
+
_chunkEQXEFXCVjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
532
|
+
_chunkEQXEFXCVjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
533
|
+
_chunkEQXEFXCVjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
534
534
|
]);
|
|
535
535
|
await Promise.allSettled(
|
|
536
536
|
files.map(
|
|
@@ -585,7 +585,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
585
585
|
)) {
|
|
586
586
|
const projectNode = project.node;
|
|
587
587
|
if (projectNode.data.root) {
|
|
588
|
-
const projectPackageJsonPath =
|
|
588
|
+
const projectPackageJsonPath = _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
589
589
|
workspaceRoot2,
|
|
590
590
|
projectNode.data.root,
|
|
591
591
|
"package.json"
|
|
@@ -603,11 +603,11 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
if (localPackages.length > 0) {
|
|
606
|
-
|
|
606
|
+
_chunk4BWM53AAjs.writeTrace.call(void 0,
|
|
607
607
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
608
608
|
);
|
|
609
609
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
610
|
-
|
|
610
|
+
_chunkEQXEFXCVjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
611
611
|
"utf8"
|
|
612
612
|
);
|
|
613
613
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -620,7 +620,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
620
620
|
}
|
|
621
621
|
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) => {
|
|
622
622
|
if (_optionalChain([projectConfigurations, 'access', _42 => _42.projects, 'optionalAccess', _43 => _43[dep]])) {
|
|
623
|
-
const depPackageJsonPath =
|
|
623
|
+
const depPackageJsonPath = _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
624
624
|
workspaceRoot2,
|
|
625
625
|
projectConfigurations.projects[dep].root,
|
|
626
626
|
"package.json"
|
|
@@ -651,14 +651,14 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
651
651
|
return ret;
|
|
652
652
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
653
653
|
} else {
|
|
654
|
-
|
|
654
|
+
_chunk4BWM53AAjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
655
655
|
}
|
|
656
656
|
return packageJson;
|
|
657
657
|
};
|
|
658
658
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
659
|
-
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
659
|
+
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkEQXEFXCVjs.findWorkspaceRoot.call(void 0, );
|
|
660
660
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
661
|
-
|
|
661
|
+
_chunkEQXEFXCVjs.joinPaths.call(void 0, workspaceRoot2, "package.json"),
|
|
662
662
|
"utf8"
|
|
663
663
|
);
|
|
664
664
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -669,7 +669,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
669
669
|
if (distSrc.startsWith("/")) {
|
|
670
670
|
distSrc = distSrc.substring(1);
|
|
671
671
|
}
|
|
672
|
-
packageJson.source ??= `${
|
|
672
|
+
packageJson.source ??= `${_chunkEQXEFXCVjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
673
673
|
}
|
|
674
674
|
packageJson.files ??= ["dist/**/*"];
|
|
675
675
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -694,7 +694,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
694
694
|
packageJson.contributors = [packageJson.author];
|
|
695
695
|
}
|
|
696
696
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
697
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
697
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkEQXEFXCVjs.joinPaths.call(void 0, "packages", projectName);
|
|
698
698
|
return packageJson;
|
|
699
699
|
};
|
|
700
700
|
var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
@@ -748,11 +748,11 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
|
748
748
|
// ../esbuild/src/assets.ts
|
|
749
749
|
async function copyBuildAssets(context) {
|
|
750
750
|
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])) {
|
|
751
|
-
|
|
751
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0,
|
|
752
752
|
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
|
|
753
753
|
context.workspaceConfig
|
|
754
754
|
);
|
|
755
|
-
const stopwatch =
|
|
755
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
756
756
|
await copyAssets(
|
|
757
757
|
context.workspaceConfig,
|
|
758
758
|
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
@@ -833,15 +833,15 @@ async function resolveContext(userOptions) {
|
|
|
833
833
|
if (!workspaceRoot2) {
|
|
834
834
|
throw new Error("Cannot find Nx workspace root");
|
|
835
835
|
}
|
|
836
|
-
const workspaceConfig = await
|
|
836
|
+
const workspaceConfig = await _chunkEQXEFXCVjs.getWorkspaceConfig.call(void 0, true, {
|
|
837
837
|
workspaceRoot: workspaceRoot2.dir
|
|
838
838
|
});
|
|
839
|
-
|
|
840
|
-
const stopwatch =
|
|
839
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
840
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, "Build options resolution");
|
|
841
841
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
842
842
|
exitOnError: true
|
|
843
843
|
});
|
|
844
|
-
const projectJsonPath =
|
|
844
|
+
const projectJsonPath = _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
845
845
|
workspaceRoot2.dir,
|
|
846
846
|
projectRoot,
|
|
847
847
|
"project.json"
|
|
@@ -860,7 +860,7 @@ async function resolveContext(userOptions) {
|
|
|
860
860
|
}
|
|
861
861
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
862
862
|
options.name ??= projectName;
|
|
863
|
-
const packageJsonPath =
|
|
863
|
+
const packageJsonPath = _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
864
864
|
workspaceRoot2.dir,
|
|
865
865
|
options.projectRoot,
|
|
866
866
|
"package.json"
|
|
@@ -872,7 +872,7 @@ async function resolveContext(userOptions) {
|
|
|
872
872
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
873
873
|
const resolvedOptions = {
|
|
874
874
|
...options,
|
|
875
|
-
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig :
|
|
875
|
+
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : _chunkEQXEFXCVjs.joinPaths.call(void 0, workspaceRoot2.dir, projectRoot, "tsconfig.json"),
|
|
876
876
|
metafile: userOptions.mode === "development",
|
|
877
877
|
clean: false,
|
|
878
878
|
env,
|
|
@@ -897,8 +897,8 @@ async function resolveContext(userOptions) {
|
|
|
897
897
|
projectConfigurations,
|
|
898
898
|
projectName,
|
|
899
899
|
projectGraph,
|
|
900
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
901
|
-
outputPath: resolvedOptions.outputPath ||
|
|
900
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkEQXEFXCVjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
901
|
+
outputPath: resolvedOptions.outputPath || _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
902
902
|
workspaceConfig.workspaceRoot,
|
|
903
903
|
"dist",
|
|
904
904
|
resolvedOptions.projectRoot
|
|
@@ -907,10 +907,10 @@ async function resolveContext(userOptions) {
|
|
|
907
907
|
};
|
|
908
908
|
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
909
909
|
if (context.options.verbose) {
|
|
910
|
-
|
|
910
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0,
|
|
911
911
|
` \u2699\uFE0F Build options resolved:
|
|
912
912
|
|
|
913
|
-
${
|
|
913
|
+
${_chunk4BWM53AAjs.formatLogMessage.call(void 0, context.options)}`,
|
|
914
914
|
workspaceConfig
|
|
915
915
|
);
|
|
916
916
|
}
|
|
@@ -922,10 +922,10 @@ ${_chunkZWF65Q7Ejs.formatLogMessage.call(void 0, context.options)}`,
|
|
|
922
922
|
|
|
923
923
|
|
|
924
924
|
async function generatePackageJson(context) {
|
|
925
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
926
|
-
|
|
927
|
-
const stopwatch =
|
|
928
|
-
const packageJsonPath =
|
|
925
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkEQXEFXCVjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
926
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
927
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, "Write package.json file");
|
|
928
|
+
const packageJsonPath = _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
929
929
|
context.options.projectRoot,
|
|
930
930
|
"project.json"
|
|
931
931
|
);
|
|
@@ -933,7 +933,7 @@ async function generatePackageJson(context) {
|
|
|
933
933
|
throw new Error("Cannot find package.json configuration");
|
|
934
934
|
}
|
|
935
935
|
const packageJsonFile = await _promises2.default.readFile(
|
|
936
|
-
|
|
936
|
+
_chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
937
937
|
context.workspaceConfig.workspaceRoot,
|
|
938
938
|
context.options.projectRoot,
|
|
939
939
|
"package.json"
|
|
@@ -1039,7 +1039,7 @@ async function generatePackageJson(context) {
|
|
|
1039
1039
|
}
|
|
1040
1040
|
}
|
|
1041
1041
|
await _devkit.writeJsonFile.call(void 0,
|
|
1042
|
-
|
|
1042
|
+
_chunkEQXEFXCVjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
1043
1043
|
packageJson
|
|
1044
1044
|
);
|
|
1045
1045
|
stopwatch();
|
|
@@ -1051,12 +1051,12 @@ async function generatePackageJson(context) {
|
|
|
1051
1051
|
var _tsup = require('tsup');
|
|
1052
1052
|
async function build(options) {
|
|
1053
1053
|
if (!options.silent) {
|
|
1054
|
-
|
|
1054
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0,
|
|
1055
1055
|
` \u{1F680} Running ${options.name || "tsup"} build`,
|
|
1056
1056
|
options.workspaceConfig
|
|
1057
1057
|
);
|
|
1058
1058
|
}
|
|
1059
|
-
const stopwatch =
|
|
1059
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, `${options.name || "tsup"} build`);
|
|
1060
1060
|
await _tsup.build.call(void 0, options);
|
|
1061
1061
|
if (!options.silent) {
|
|
1062
1062
|
stopwatch();
|
|
@@ -1065,14 +1065,14 @@ async function build(options) {
|
|
|
1065
1065
|
|
|
1066
1066
|
// ../esbuild/src/tsup.ts
|
|
1067
1067
|
async function executeTsup(context) {
|
|
1068
|
-
|
|
1068
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0,
|
|
1069
1069
|
` \u{1F680} Running ${context.options.name} build`,
|
|
1070
1070
|
context.workspaceConfig
|
|
1071
1071
|
);
|
|
1072
|
-
const stopwatch =
|
|
1072
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
1073
1073
|
await build({
|
|
1074
1074
|
...context.options,
|
|
1075
|
-
outDir: context.options.distDir ?
|
|
1075
|
+
outDir: context.options.distDir ? _chunkEQXEFXCVjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
1076
1076
|
workspaceConfig: context.workspaceConfig
|
|
1077
1077
|
});
|
|
1078
1078
|
stopwatch();
|
|
@@ -1083,17 +1083,17 @@ async function executeTsup(context) {
|
|
|
1083
1083
|
async function reportResults(context) {
|
|
1084
1084
|
if (_optionalChain([context, 'access', _60 => _60.result, 'optionalAccess', _61 => _61.errors, 'access', _62 => _62.length]) === 0) {
|
|
1085
1085
|
if (context.result.warnings.length > 0) {
|
|
1086
|
-
|
|
1086
|
+
_chunk4BWM53AAjs.writeWarning.call(void 0,
|
|
1087
1087
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
1088
1088
|
context.workspaceConfig
|
|
1089
1089
|
);
|
|
1090
1090
|
}
|
|
1091
|
-
|
|
1091
|
+
_chunk4BWM53AAjs.writeSuccess.call(void 0,
|
|
1092
1092
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
1093
1093
|
context.workspaceConfig
|
|
1094
1094
|
);
|
|
1095
1095
|
} 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) {
|
|
1096
|
-
|
|
1096
|
+
_chunk4BWM53AAjs.writeError.call(void 0,
|
|
1097
1097
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
1098
1098
|
context.workspaceConfig
|
|
1099
1099
|
);
|
|
@@ -1104,19 +1104,19 @@ async function reportResults(context) {
|
|
|
1104
1104
|
}
|
|
1105
1105
|
async function cleanOutputPath(context) {
|
|
1106
1106
|
if (context.clean !== false && context.outputPath) {
|
|
1107
|
-
|
|
1107
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0,
|
|
1108
1108
|
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
1109
1109
|
context.workspaceConfig
|
|
1110
1110
|
);
|
|
1111
|
-
const stopwatch =
|
|
1111
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
1112
1112
|
await cleanDirectories(context.outputPath);
|
|
1113
1113
|
stopwatch();
|
|
1114
1114
|
}
|
|
1115
1115
|
return context;
|
|
1116
1116
|
}
|
|
1117
1117
|
async function build2(options) {
|
|
1118
|
-
|
|
1119
|
-
const stopwatch =
|
|
1118
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1119
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1120
1120
|
try {
|
|
1121
1121
|
const opts = Array.isArray(options) ? options : [options];
|
|
1122
1122
|
if (opts.length === 0) {
|
|
@@ -1131,9 +1131,9 @@ async function build2(options) {
|
|
|
1131
1131
|
executeTsup(context)
|
|
1132
1132
|
]);
|
|
1133
1133
|
await reportResults(context);
|
|
1134
|
-
|
|
1134
|
+
_chunk4BWM53AAjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1135
1135
|
} catch (error) {
|
|
1136
|
-
|
|
1136
|
+
_chunk4BWM53AAjs.writeFatal.call(void 0,
|
|
1137
1137
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1138
1138
|
);
|
|
1139
1139
|
throw error;
|
|
@@ -1144,7 +1144,7 @@ async function build2(options) {
|
|
|
1144
1144
|
|
|
1145
1145
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1146
1146
|
async function esbuildExecutorFn(options, context, config) {
|
|
1147
|
-
|
|
1147
|
+
_chunk4BWM53AAjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1148
1148
|
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])) {
|
|
1149
1149
|
throw new Error(
|
|
1150
1150
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1186,7 +1186,7 @@ var _jiti = require('jiti');
|
|
|
1186
1186
|
var _fileutils = require('nx/src/utils/fileutils');
|
|
1187
1187
|
async function napiExecutor(options, context, config) {
|
|
1188
1188
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1189
|
-
fsCache: config.skipCache ? false :
|
|
1189
|
+
fsCache: config.skipCache ? false : _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
1190
1190
|
config.workspaceRoot,
|
|
1191
1191
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1192
1192
|
"jiti"
|
|
@@ -1202,53 +1202,53 @@ async function napiExecutor(options, context, config) {
|
|
|
1202
1202
|
);
|
|
1203
1203
|
}
|
|
1204
1204
|
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]);
|
|
1205
|
-
const packageJson =
|
|
1205
|
+
const packageJson = _chunkEQXEFXCVjs.joinPaths.call(void 0, _nullishCoalesce(projectRoot, () => ( ".")), "package.json");
|
|
1206
1206
|
if (!_fileutils.fileExists.call(void 0, packageJson)) {
|
|
1207
1207
|
throw new Error(`Could not find package.json at ${packageJson}`);
|
|
1208
1208
|
}
|
|
1209
1209
|
const napi = new NapiCli();
|
|
1210
1210
|
const normalizedOptions = { ...options };
|
|
1211
1211
|
const metadata = cargoMetadata();
|
|
1212
|
-
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _90 => _90.target_directory]) ||
|
|
1212
|
+
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _90 => _90.target_directory]) || _chunkEQXEFXCVjs.joinPaths.call(void 0, config.workspaceRoot, "dist", "target");
|
|
1213
1213
|
normalizedOptions.outputDir = options.outputPath;
|
|
1214
1214
|
normalizedOptions.packageJsonPath = options.packageJsonPath || packageJson;
|
|
1215
1215
|
if (options.cwd) {
|
|
1216
|
-
normalizedOptions.cwd =
|
|
1216
|
+
normalizedOptions.cwd = _chunkEQXEFXCVjs.correctPaths.call(void 0, options.cwd);
|
|
1217
1217
|
} else {
|
|
1218
|
-
normalizedOptions.cwd =
|
|
1219
|
-
const absoluteProjectRoot =
|
|
1218
|
+
normalizedOptions.cwd = _chunkEQXEFXCVjs.correctPaths.call(void 0, projectRoot);
|
|
1219
|
+
const absoluteProjectRoot = _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
1220
1220
|
config.workspaceRoot,
|
|
1221
1221
|
projectRoot || "."
|
|
1222
1222
|
);
|
|
1223
1223
|
if (normalizedOptions.outputDir) {
|
|
1224
|
-
normalizedOptions.outputDir =
|
|
1224
|
+
normalizedOptions.outputDir = _chunkEQXEFXCVjs.relative.call(void 0,
|
|
1225
1225
|
absoluteProjectRoot,
|
|
1226
|
-
|
|
1227
|
-
|
|
1226
|
+
_chunkEQXEFXCVjs.correctPaths.call(void 0,
|
|
1227
|
+
_chunkEQXEFXCVjs.isAbsolute.call(void 0, normalizedOptions.outputDir) ? normalizedOptions.outputDir : _chunkEQXEFXCVjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.outputDir)
|
|
1228
1228
|
)
|
|
1229
1229
|
);
|
|
1230
1230
|
}
|
|
1231
1231
|
if (normalizedOptions.packageJsonPath) {
|
|
1232
|
-
normalizedOptions.packageJsonPath =
|
|
1232
|
+
normalizedOptions.packageJsonPath = _chunkEQXEFXCVjs.relative.call(void 0,
|
|
1233
1233
|
absoluteProjectRoot,
|
|
1234
|
-
|
|
1235
|
-
|
|
1234
|
+
_chunkEQXEFXCVjs.correctPaths.call(void 0,
|
|
1235
|
+
_chunkEQXEFXCVjs.isAbsolute.call(void 0, normalizedOptions.packageJsonPath) ? normalizedOptions.packageJsonPath : _chunkEQXEFXCVjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.packageJsonPath)
|
|
1236
1236
|
)
|
|
1237
1237
|
);
|
|
1238
1238
|
}
|
|
1239
1239
|
if (normalizedOptions.configPath) {
|
|
1240
|
-
normalizedOptions.configPath =
|
|
1240
|
+
normalizedOptions.configPath = _chunkEQXEFXCVjs.relative.call(void 0,
|
|
1241
1241
|
absoluteProjectRoot,
|
|
1242
|
-
|
|
1243
|
-
|
|
1242
|
+
_chunkEQXEFXCVjs.correctPaths.call(void 0,
|
|
1243
|
+
_chunkEQXEFXCVjs.isAbsolute.call(void 0, normalizedOptions.configPath) ? normalizedOptions.configPath : _chunkEQXEFXCVjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.configPath)
|
|
1244
1244
|
)
|
|
1245
1245
|
);
|
|
1246
1246
|
}
|
|
1247
1247
|
if (normalizedOptions.manifestPath) {
|
|
1248
|
-
normalizedOptions.manifestPath =
|
|
1248
|
+
normalizedOptions.manifestPath = _chunkEQXEFXCVjs.relative.call(void 0,
|
|
1249
1249
|
absoluteProjectRoot,
|
|
1250
|
-
|
|
1251
|
-
|
|
1250
|
+
_chunkEQXEFXCVjs.correctPaths.call(void 0,
|
|
1251
|
+
_chunkEQXEFXCVjs.isAbsolute.call(void 0, normalizedOptions.manifestPath) ? normalizedOptions.manifestPath : _chunkEQXEFXCVjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.manifestPath)
|
|
1252
1252
|
)
|
|
1253
1253
|
);
|
|
1254
1254
|
}
|
|
@@ -1321,14 +1321,14 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
1321
1321
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
1322
1322
|
);
|
|
1323
1323
|
}
|
|
1324
|
-
|
|
1324
|
+
_chunk4BWM53AAjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
1325
1325
|
_sizelimit2.default.call(void 0, [_file2.default, _esbuild2.default, _esbuildwhy2.default], {
|
|
1326
1326
|
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,
|
|
1327
1327
|
_nullishCoalesce(_optionalChain([context, 'access', _98 => _98.projectsConfigurations, 'access', _99 => _99.projects, 'access', _100 => _100[context.projectName], 'optionalAccess', _101 => _101.root]), () => ( "./")),
|
|
1328
1328
|
"src"
|
|
1329
1329
|
)))
|
|
1330
1330
|
}).then((result) => {
|
|
1331
|
-
|
|
1331
|
+
_chunk4BWM53AAjs.writeInfo.call(void 0,
|
|
1332
1332
|
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
1333
1333
|
config
|
|
1334
1334
|
);
|
|
@@ -1398,19 +1398,19 @@ function toTSDownFormat(format3) {
|
|
|
1398
1398
|
// ../tsdown/src/build.ts
|
|
1399
1399
|
var resolveOptions = async (userOptions) => {
|
|
1400
1400
|
const options = getDefaultOptions(userOptions);
|
|
1401
|
-
const workspaceRoot2 =
|
|
1401
|
+
const workspaceRoot2 = _chunkEQXEFXCVjs.findWorkspaceRoot.call(void 0, options.projectRoot);
|
|
1402
1402
|
if (!workspaceRoot2) {
|
|
1403
1403
|
throw new Error("Cannot find Nx workspace root");
|
|
1404
1404
|
}
|
|
1405
|
-
const workspaceConfig = await
|
|
1405
|
+
const workspaceConfig = await _chunkEQXEFXCVjs.getWorkspaceConfig.call(void 0, options.debug === true, {
|
|
1406
1406
|
workspaceRoot: workspaceRoot2
|
|
1407
1407
|
});
|
|
1408
|
-
|
|
1409
|
-
const stopwatch =
|
|
1408
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
1409
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1410
1410
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1411
1411
|
exitOnError: true
|
|
1412
1412
|
});
|
|
1413
|
-
const projectJsonPath =
|
|
1413
|
+
const projectJsonPath = _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
1414
1414
|
workspaceRoot2,
|
|
1415
1415
|
options.projectRoot,
|
|
1416
1416
|
"project.json"
|
|
@@ -1427,7 +1427,7 @@ var resolveOptions = async (userOptions) => {
|
|
|
1427
1427
|
"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."
|
|
1428
1428
|
);
|
|
1429
1429
|
}
|
|
1430
|
-
const packageJsonPath =
|
|
1430
|
+
const packageJsonPath = _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
1431
1431
|
workspaceRoot2,
|
|
1432
1432
|
options.projectRoot,
|
|
1433
1433
|
"package.json"
|
|
@@ -1436,13 +1436,13 @@ var resolveOptions = async (userOptions) => {
|
|
|
1436
1436
|
throw new Error("Cannot find package.json configuration");
|
|
1437
1437
|
}
|
|
1438
1438
|
const debug = _nullishCoalesce(options.debug, () => ( (options.mode || workspaceConfig.mode) === "development"));
|
|
1439
|
-
const sourceRoot = projectJson.sourceRoot ||
|
|
1439
|
+
const sourceRoot = projectJson.sourceRoot || _chunkEQXEFXCVjs.joinPaths.call(void 0, options.projectRoot, "src");
|
|
1440
1440
|
const result = {
|
|
1441
1441
|
name: projectName,
|
|
1442
1442
|
mode: "production",
|
|
1443
1443
|
target: DEFAULT_TARGET,
|
|
1444
1444
|
generatePackageJson: true,
|
|
1445
|
-
outDir:
|
|
1445
|
+
outDir: _chunkEQXEFXCVjs.joinPaths.call(void 0, "dist", options.projectRoot),
|
|
1446
1446
|
minify: !debug,
|
|
1447
1447
|
plugins: [],
|
|
1448
1448
|
assets: [],
|
|
@@ -1454,12 +1454,12 @@ var resolveOptions = async (userOptions) => {
|
|
|
1454
1454
|
clean: false,
|
|
1455
1455
|
fixedExtension: true,
|
|
1456
1456
|
nodeProtocol: true,
|
|
1457
|
-
tsconfig:
|
|
1457
|
+
tsconfig: _chunkEQXEFXCVjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
1458
1458
|
debug,
|
|
1459
1459
|
sourceRoot,
|
|
1460
1460
|
cwd: workspaceConfig.workspaceRoot,
|
|
1461
1461
|
entry: {
|
|
1462
|
-
["index"]:
|
|
1462
|
+
["index"]: _chunkEQXEFXCVjs.joinPaths.call(void 0, sourceRoot, "index.ts")
|
|
1463
1463
|
},
|
|
1464
1464
|
workspace: true,
|
|
1465
1465
|
...options,
|
|
@@ -1478,15 +1478,15 @@ var resolveOptions = async (userOptions) => {
|
|
|
1478
1478
|
return result;
|
|
1479
1479
|
};
|
|
1480
1480
|
async function generatePackageJson2(options) {
|
|
1481
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1482
|
-
|
|
1483
|
-
const stopwatch =
|
|
1484
|
-
const packageJsonPath =
|
|
1481
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkEQXEFXCVjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1482
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.workspaceConfig);
|
|
1483
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1484
|
+
const packageJsonPath = _chunkEQXEFXCVjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1485
1485
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1486
1486
|
throw new Error("Cannot find package.json configuration");
|
|
1487
1487
|
}
|
|
1488
1488
|
const packageJsonFile = await _promises2.default.readFile(
|
|
1489
|
-
|
|
1489
|
+
_chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
1490
1490
|
options.workspaceConfig.workspaceRoot,
|
|
1491
1491
|
options.projectRoot,
|
|
1492
1492
|
"package.json"
|
|
@@ -1548,14 +1548,14 @@ async function generatePackageJson2(options) {
|
|
|
1548
1548
|
},
|
|
1549
1549
|
packageJson.exports
|
|
1550
1550
|
);
|
|
1551
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1551
|
+
await _devkit.writeJsonFile.call(void 0, _chunkEQXEFXCVjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
1552
1552
|
stopwatch();
|
|
1553
1553
|
}
|
|
1554
1554
|
return options;
|
|
1555
1555
|
}
|
|
1556
1556
|
async function executeTSDown(options) {
|
|
1557
|
-
|
|
1558
|
-
const stopwatch =
|
|
1557
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.workspaceConfig);
|
|
1558
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1559
1559
|
await _tsdown.build.call(void 0, {
|
|
1560
1560
|
...options,
|
|
1561
1561
|
entry: options.entry,
|
|
@@ -1565,11 +1565,11 @@ async function executeTSDown(options) {
|
|
|
1565
1565
|
return options;
|
|
1566
1566
|
}
|
|
1567
1567
|
async function copyBuildAssets2(options) {
|
|
1568
|
-
|
|
1568
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0,
|
|
1569
1569
|
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
1570
1570
|
options.workspaceConfig
|
|
1571
1571
|
);
|
|
1572
|
-
const stopwatch =
|
|
1572
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1573
1573
|
await copyAssets(
|
|
1574
1574
|
options.workspaceConfig,
|
|
1575
1575
|
_nullishCoalesce(options.assets, () => ( [])),
|
|
@@ -1583,18 +1583,18 @@ async function copyBuildAssets2(options) {
|
|
|
1583
1583
|
return options;
|
|
1584
1584
|
}
|
|
1585
1585
|
async function reportResults2(options) {
|
|
1586
|
-
|
|
1586
|
+
_chunk4BWM53AAjs.writeSuccess.call(void 0,
|
|
1587
1587
|
` \u{1F4E6} The ${options.name} build completed successfully`,
|
|
1588
1588
|
options.workspaceConfig
|
|
1589
1589
|
);
|
|
1590
1590
|
}
|
|
1591
1591
|
async function cleanOutputPath2(options) {
|
|
1592
1592
|
if (options.clean !== false && options.workspaceConfig) {
|
|
1593
|
-
|
|
1593
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0,
|
|
1594
1594
|
` \u{1F9F9} Cleaning ${options.name} output path: ${options.workspaceConfig}`,
|
|
1595
1595
|
options.workspaceConfig
|
|
1596
1596
|
);
|
|
1597
|
-
const stopwatch =
|
|
1597
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1598
1598
|
await cleanDirectories2(
|
|
1599
1599
|
options.name,
|
|
1600
1600
|
options.outDir,
|
|
@@ -1605,8 +1605,8 @@ async function cleanOutputPath2(options) {
|
|
|
1605
1605
|
return options;
|
|
1606
1606
|
}
|
|
1607
1607
|
async function build3(options) {
|
|
1608
|
-
|
|
1609
|
-
const stopwatch =
|
|
1608
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1609
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1610
1610
|
try {
|
|
1611
1611
|
const opts = Array.isArray(options) ? options : [options];
|
|
1612
1612
|
if (opts.length === 0) {
|
|
@@ -1626,13 +1626,13 @@ async function build3(options) {
|
|
|
1626
1626
|
})
|
|
1627
1627
|
);
|
|
1628
1628
|
} else {
|
|
1629
|
-
|
|
1629
|
+
_chunk4BWM53AAjs.writeWarning.call(void 0,
|
|
1630
1630
|
" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function."
|
|
1631
1631
|
);
|
|
1632
1632
|
}
|
|
1633
|
-
|
|
1633
|
+
_chunk4BWM53AAjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1634
1634
|
} catch (error) {
|
|
1635
|
-
|
|
1635
|
+
_chunk4BWM53AAjs.writeFatal.call(void 0,
|
|
1636
1636
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1637
1637
|
);
|
|
1638
1638
|
throw error;
|
|
@@ -1643,7 +1643,7 @@ async function build3(options) {
|
|
|
1643
1643
|
|
|
1644
1644
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1645
1645
|
async function tsdownExecutorFn(options, context, config) {
|
|
1646
|
-
|
|
1646
|
+
_chunk4BWM53AAjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown executor on the workspace", config);
|
|
1647
1647
|
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])) {
|
|
1648
1648
|
throw new Error(
|
|
1649
1649
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1685,12 +1685,12 @@ var _fsextra = require('fs-extra');
|
|
|
1685
1685
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1686
1686
|
async function typiaExecutorFn(options, _, config) {
|
|
1687
1687
|
if (options.clean !== false) {
|
|
1688
|
-
|
|
1688
|
+
_chunk4BWM53AAjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1689
1689
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1690
1690
|
}
|
|
1691
1691
|
await Promise.all(
|
|
1692
1692
|
options.entry.map((entry) => {
|
|
1693
|
-
|
|
1693
|
+
_chunk4BWM53AAjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1694
1694
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1695
1695
|
input: entry,
|
|
1696
1696
|
output: options.outputPath,
|
|
@@ -1723,7 +1723,7 @@ var executor_default10 = withRunExecutor(
|
|
|
1723
1723
|
|
|
1724
1724
|
|
|
1725
1725
|
async function unbuildExecutorFn(options, context, config) {
|
|
1726
|
-
|
|
1726
|
+
_chunk4BWM53AAjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1727
1727
|
if (!_optionalChain([context, 'access', _118 => _118.projectsConfigurations, 'optionalAccess', _119 => _119.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1728
1728
|
throw new Error(
|
|
1729
1729
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
@@ -1740,7 +1740,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1740
1740
|
);
|
|
1741
1741
|
}
|
|
1742
1742
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1743
|
-
fsCache: config.skipCache ? false :
|
|
1743
|
+
fsCache: config.skipCache ? false : _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
1744
1744
|
config.workspaceRoot,
|
|
1745
1745
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1746
1746
|
"jiti"
|
|
@@ -1762,7 +1762,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1762
1762
|
{
|
|
1763
1763
|
stubOptions: {
|
|
1764
1764
|
jiti: {
|
|
1765
|
-
fsCache: config.skipCache ? false :
|
|
1765
|
+
fsCache: config.skipCache ? false : _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
1766
1766
|
config.workspaceRoot,
|
|
1767
1767
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1768
1768
|
"jiti"
|
|
@@ -1822,30 +1822,30 @@ var executor_default11 = withRunExecutor(
|
|
|
1822
1822
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
1823
1823
|
skipReadingConfig: false
|
|
1824
1824
|
}) => async (tree, _options) => {
|
|
1825
|
-
const stopwatch =
|
|
1825
|
+
const stopwatch = _chunk4BWM53AAjs.getStopwatch.call(void 0, name);
|
|
1826
1826
|
let options = _options;
|
|
1827
1827
|
let config;
|
|
1828
1828
|
try {
|
|
1829
|
-
|
|
1829
|
+
_chunk4BWM53AAjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
1830
1830
|
|
|
1831
1831
|
`, config);
|
|
1832
|
-
const workspaceRoot2 =
|
|
1832
|
+
const workspaceRoot2 = _chunkEQXEFXCVjs.findWorkspaceRoot.call(void 0, );
|
|
1833
1833
|
if (!generatorOptions.skipReadingConfig) {
|
|
1834
|
-
|
|
1834
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0,
|
|
1835
1835
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1836
1836
|
- workspaceRoot: ${workspaceRoot2}`,
|
|
1837
1837
|
config
|
|
1838
1838
|
);
|
|
1839
|
-
config = await
|
|
1839
|
+
config = await _chunkEQXEFXCVjs.getConfig.call(void 0, workspaceRoot2);
|
|
1840
1840
|
}
|
|
1841
1841
|
if (_optionalChain([generatorOptions, 'optionalAccess', _120 => _120.hooks, 'optionalAccess', _121 => _121.applyDefaultOptions])) {
|
|
1842
|
-
|
|
1842
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1843
1843
|
options = await Promise.resolve(
|
|
1844
1844
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
1845
1845
|
);
|
|
1846
|
-
|
|
1846
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1847
1847
|
}
|
|
1848
|
-
|
|
1848
|
+
_chunk4BWM53AAjs.writeTrace.call(void 0,
|
|
1849
1849
|
`Generator schema options \u2699\uFE0F
|
|
1850
1850
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
1851
1851
|
config
|
|
@@ -1856,11 +1856,11 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1856
1856
|
applyWorkspaceBaseTokens
|
|
1857
1857
|
);
|
|
1858
1858
|
if (_optionalChain([generatorOptions, 'optionalAccess', _122 => _122.hooks, 'optionalAccess', _123 => _123.preProcess])) {
|
|
1859
|
-
|
|
1859
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
1860
1860
|
await Promise.resolve(
|
|
1861
1861
|
generatorOptions.hooks.preProcess(tokenized, config)
|
|
1862
1862
|
);
|
|
1863
|
-
|
|
1863
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
1864
1864
|
}
|
|
1865
1865
|
const result = await Promise.resolve(
|
|
1866
1866
|
generatorFn(tree, tokenized, config)
|
|
@@ -1875,21 +1875,21 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
1877
|
if (_optionalChain([generatorOptions, 'optionalAccess', _133 => _133.hooks, 'optionalAccess', _134 => _134.postProcess])) {
|
|
1878
|
-
|
|
1878
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
1879
1879
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1880
|
-
|
|
1880
|
+
_chunk4BWM53AAjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
1881
1881
|
}
|
|
1882
1882
|
return () => {
|
|
1883
|
-
|
|
1883
|
+
_chunk4BWM53AAjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
1884
1884
|
`, config);
|
|
1885
1885
|
};
|
|
1886
1886
|
} catch (error) {
|
|
1887
1887
|
return () => {
|
|
1888
|
-
|
|
1888
|
+
_chunk4BWM53AAjs.writeFatal.call(void 0,
|
|
1889
1889
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
1890
1890
|
config
|
|
1891
1891
|
);
|
|
1892
|
-
|
|
1892
|
+
_chunk4BWM53AAjs.writeError.call(void 0,
|
|
1893
1893
|
`An exception was thrown in the generator's process
|
|
1894
1894
|
- Details: ${error.message}
|
|
1895
1895
|
- Stacktrace: ${error.stack}`,
|
|
@@ -1955,16 +1955,16 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1955
1955
|
const projectConfig = {
|
|
1956
1956
|
root: normalized.directory,
|
|
1957
1957
|
projectType: "library",
|
|
1958
|
-
sourceRoot:
|
|
1958
|
+
sourceRoot: _chunkEQXEFXCVjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
1959
1959
|
targets: {
|
|
1960
1960
|
build: {
|
|
1961
1961
|
executor: options.buildExecutor,
|
|
1962
1962
|
outputs: ["{options.outputPath}"],
|
|
1963
1963
|
options: {
|
|
1964
|
-
entry: [
|
|
1964
|
+
entry: [_chunkEQXEFXCVjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
|
|
1965
1965
|
outputPath: getOutputPath(normalized),
|
|
1966
|
-
tsconfig:
|
|
1967
|
-
project:
|
|
1966
|
+
tsconfig: _chunkEQXEFXCVjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
1967
|
+
project: _chunkEQXEFXCVjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
1968
1968
|
defaultConfiguration: "production",
|
|
1969
1969
|
platform: "neutral",
|
|
1970
1970
|
assets: [
|
|
@@ -2021,7 +2021,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2021
2021
|
if (!normalized.importPath) {
|
|
2022
2022
|
normalized.importPath = normalized.name;
|
|
2023
2023
|
}
|
|
2024
|
-
const packageJsonPath =
|
|
2024
|
+
const packageJsonPath = _chunkEQXEFXCVjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
2025
2025
|
if (tree.exists(packageJsonPath)) {
|
|
2026
2026
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2027
2027
|
if (!normalized.importPath) {
|
|
@@ -2078,14 +2078,14 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2078
2078
|
}));
|
|
2079
2079
|
}
|
|
2080
2080
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
2081
|
-
|
|
2081
|
+
_chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
2082
2082
|
normalized.projectRoot,
|
|
2083
2083
|
"./src",
|
|
2084
2084
|
`index.${normalized.js ? "js" : "ts"}`
|
|
2085
2085
|
)
|
|
2086
2086
|
]);
|
|
2087
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2088
|
-
|
|
2087
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkEQXEFXCVjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
2088
|
+
_chunkEQXEFXCVjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
2089
2089
|
]);
|
|
2090
2090
|
if (tree.exists("package.json")) {
|
|
2091
2091
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2096,7 +2096,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2096
2096
|
description = packageJson.description;
|
|
2097
2097
|
}
|
|
2098
2098
|
}
|
|
2099
|
-
const tsconfigPath =
|
|
2099
|
+
const tsconfigPath = _chunkEQXEFXCVjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
2100
2100
|
if (tree.exists(tsconfigPath)) {
|
|
2101
2101
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2102
2102
|
json.composite ??= true;
|
|
@@ -2124,7 +2124,7 @@ function getOutputPath(options) {
|
|
|
2124
2124
|
} else {
|
|
2125
2125
|
parts.push(options.projectRoot);
|
|
2126
2126
|
}
|
|
2127
|
-
return
|
|
2127
|
+
return _chunkEQXEFXCVjs.joinPaths.call(void 0, ...parts);
|
|
2128
2128
|
}
|
|
2129
2129
|
function createProjectTsConfigJson(tree, options) {
|
|
2130
2130
|
const tsconfig = {
|
|
@@ -2132,7 +2132,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2132
2132
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _149 => _149.tsconfigOptions]), () => ( {})),
|
|
2133
2133
|
compilerOptions: {
|
|
2134
2134
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2135
|
-
outDir:
|
|
2135
|
+
outDir: _chunkEQXEFXCVjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2136
2136
|
noEmit: true,
|
|
2137
2137
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _150 => _150.tsconfigOptions, 'optionalAccess', _151 => _151.compilerOptions]), () => ( {}))
|
|
2138
2138
|
},
|
|
@@ -2150,7 +2150,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2150
2150
|
"src/**/*.test.ts"
|
|
2151
2151
|
]
|
|
2152
2152
|
};
|
|
2153
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2153
|
+
_devkit.writeJson.call(void 0, tree, _chunkEQXEFXCVjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2154
2154
|
}
|
|
2155
2155
|
async function normalizeOptions(tree, options, config) {
|
|
2156
2156
|
let importPath = options.importPath;
|
|
@@ -2215,7 +2215,7 @@ async function normalizeOptions(tree, options, config) {
|
|
|
2215
2215
|
|
|
2216
2216
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2217
2217
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
2218
|
-
const filesDir =
|
|
2218
|
+
const filesDir = _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
2219
2219
|
__dirname,
|
|
2220
2220
|
"src",
|
|
2221
2221
|
"generators",
|
|
@@ -2298,38 +2298,38 @@ var generator_default = withRunGenerator(
|
|
|
2298
2298
|
|
|
2299
2299
|
var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
|
|
2300
2300
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2301
|
-
|
|
2301
|
+
_chunk4BWM53AAjs.writeInfo.call(void 0,
|
|
2302
2302
|
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
2303
2303
|
config
|
|
2304
2304
|
);
|
|
2305
|
-
|
|
2305
|
+
_chunk4BWM53AAjs.writeTrace.call(void 0,
|
|
2306
2306
|
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
2307
2307
|
config
|
|
2308
2308
|
);
|
|
2309
|
-
const jsonSchema = z.toJSONSchema(
|
|
2309
|
+
const jsonSchema = z.toJSONSchema(_chunkEQXEFXCVjs.workspaceConfigSchema, {
|
|
2310
2310
|
target: "draft-7",
|
|
2311
|
-
metadata:
|
|
2311
|
+
metadata: _chunkEQXEFXCVjs.schemaRegistry
|
|
2312
2312
|
});
|
|
2313
2313
|
jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
|
|
2314
2314
|
jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
|
|
2315
2315
|
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.";
|
|
2316
|
-
|
|
2316
|
+
_chunk4BWM53AAjs.writeTrace.call(void 0, jsonSchema, config);
|
|
2317
2317
|
if (!options.outputFile) {
|
|
2318
2318
|
throw new Error(
|
|
2319
2319
|
"The `outputFile` option is required. Please specify the output file path."
|
|
2320
2320
|
);
|
|
2321
2321
|
}
|
|
2322
2322
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
2323
|
-
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _160 => _160.workspaceRoot]), () => (
|
|
2323
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _160 => _160.workspaceRoot]), () => ( _chunkEQXEFXCVjs.findWorkspaceRoot.call(void 0, ))),
|
|
2324
2324
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
2325
2325
|
);
|
|
2326
|
-
|
|
2326
|
+
_chunk4BWM53AAjs.writeTrace.call(void 0,
|
|
2327
2327
|
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
2328
2328
|
config
|
|
2329
2329
|
);
|
|
2330
2330
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
2331
2331
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2332
|
-
|
|
2332
|
+
_chunk4BWM53AAjs.writeSuccess.call(void 0,
|
|
2333
2333
|
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
2334
2334
|
config
|
|
2335
2335
|
);
|
|
@@ -2364,7 +2364,7 @@ var generator_default2 = withRunGenerator(
|
|
|
2364
2364
|
|
|
2365
2365
|
|
|
2366
2366
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
2367
|
-
const filesDir =
|
|
2367
|
+
const filesDir = _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
2368
2368
|
__dirname,
|
|
2369
2369
|
"src",
|
|
2370
2370
|
"generators",
|
|
@@ -2423,7 +2423,7 @@ var generator_default3 = withRunGenerator(
|
|
|
2423
2423
|
|
|
2424
2424
|
|
|
2425
2425
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
2426
|
-
const filesDir =
|
|
2426
|
+
const filesDir = _chunkEQXEFXCVjs.joinPaths.call(void 0,
|
|
2427
2427
|
__dirname,
|
|
2428
2428
|
"src",
|
|
2429
2429
|
"generators",
|