@storm-software/cloudflare-tools 0.71.203 → 0.71.206
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 +32 -0
- package/README.md +1 -1
- package/dist/{chunk-4ZMJ7ITM.mjs → chunk-5MAMLVMV.mjs} +14 -14
- package/dist/{chunk-ANZ557YK.js → chunk-7IIYD3Q3.js} +13 -13
- package/dist/{chunk-3PQOI4NL.js → chunk-AWKQRM2H.js} +3 -3
- package/dist/{chunk-BTOLO426.mjs → chunk-BY7MA3SM.mjs} +1 -1
- package/dist/{chunk-TM5AJMAM.js → chunk-CLCKX6UN.js} +5 -5
- package/dist/{chunk-CM4RLKHZ.js → chunk-EJE2EHFR.js} +168 -168
- package/dist/{chunk-T6NIUJEH.mjs → chunk-K4H5ZMYA.mjs} +3 -3
- package/dist/{chunk-Z75EPSOQ.mjs → chunk-L75JBDI3.mjs} +1 -1
- package/dist/{chunk-QKL4F7HK.js → chunk-PGTHXO6M.js} +47 -47
- package/dist/{chunk-G6THBDIH.mjs → chunk-RCH5HXDU.mjs} +3 -3
- package/dist/{chunk-YLSP6KZ2.mjs → chunk-TNVZ6KHS.mjs} +3 -3
- package/dist/{chunk-V56MCNEY.js → chunk-U7XMCD6Y.js} +18 -18
- package/dist/{chunk-PWJCUKVQ.mjs → chunk-UDCJ274I.mjs} +2 -2
- package/dist/{chunk-ZTOTXXWJ.js → chunk-XGN5GQK4.js} +1 -1
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +5 -5
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/src/executors/cloudflare-publish/executor.js +3 -3
- package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
- package/dist/src/executors/r2-upload-publish/executor.js +5 -5
- package/dist/src/executors/r2-upload-publish/executor.mjs +4 -4
- package/dist/src/executors/serve/executor.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 _chunkXKQ3HGETjs = require('./chunk-XKQ3HGET.js');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkPGTHXO6Mjs = require('./chunk-PGTHXO6M.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -24,7 +24,7 @@ var _chunkQKL4F7HKjs = require('./chunk-QKL4F7HK.js');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkAWKQRM2Hjs = require('./chunk-AWKQRM2H.js');
|
|
28
28
|
|
|
29
29
|
// ../config-tools/src/utilities/apply-workspace-tokens.ts
|
|
30
30
|
var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
@@ -61,7 +61,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
|
61
61
|
if (result.includes("{workspaceRoot}")) {
|
|
62
62
|
result = result.replaceAll(
|
|
63
63
|
"{workspaceRoot}",
|
|
64
|
-
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => (
|
|
64
|
+
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => ( _chunkPGTHXO6Mjs.findWorkspaceRoot.call(void 0, )))
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
return result;
|
|
@@ -101,7 +101,7 @@ var applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
|
|
|
101
101
|
// ../workspace-tools/src/base/base-executor.ts
|
|
102
102
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
103
103
|
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
104
|
-
const stopwatch =
|
|
104
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, name);
|
|
105
105
|
let options = _options;
|
|
106
106
|
let config = {};
|
|
107
107
|
try {
|
|
@@ -110,17 +110,17 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
110
110
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
|
-
const workspaceRoot2 =
|
|
113
|
+
const workspaceRoot2 = _chunkPGTHXO6Mjs.findWorkspaceRoot.call(void 0, );
|
|
114
114
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot2;
|
|
115
115
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot2;
|
|
116
116
|
const projectName = context.projectName;
|
|
117
117
|
config.workspaceRoot = workspaceRoot2;
|
|
118
|
-
|
|
119
|
-
`${
|
|
118
|
+
_chunkAWKQRM2Hjs.writeInfo.call(void 0,
|
|
119
|
+
`${_chunkAWKQRM2Hjs.brandIcon.call(void 0, config)} Running the ${name} executor for ${projectName} `,
|
|
120
120
|
config
|
|
121
121
|
);
|
|
122
122
|
if (!executorOptions.skipReadingConfig) {
|
|
123
|
-
|
|
123
|
+
_chunkAWKQRM2Hjs.writeTrace.call(void 0,
|
|
124
124
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
125
125
|
- workspaceRoot: ${workspaceRoot2}
|
|
126
126
|
- projectRoot: ${projectRoot}
|
|
@@ -129,18 +129,18 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
129
129
|
`,
|
|
130
130
|
config
|
|
131
131
|
);
|
|
132
|
-
config = await
|
|
132
|
+
config = await _chunkPGTHXO6Mjs.getConfig.call(void 0, workspaceRoot2);
|
|
133
133
|
}
|
|
134
134
|
if (_optionalChain([executorOptions, 'optionalAccess', _7 => _7.hooks, 'optionalAccess', _8 => _8.applyDefaultOptions])) {
|
|
135
|
-
|
|
135
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
136
136
|
options = await Promise.resolve(
|
|
137
137
|
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
138
138
|
);
|
|
139
|
-
|
|
139
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
140
140
|
}
|
|
141
|
-
|
|
141
|
+
_chunkAWKQRM2Hjs.writeTrace.call(void 0,
|
|
142
142
|
`Executor schema options \u2699\uFE0F
|
|
143
|
-
${
|
|
143
|
+
${_chunkAWKQRM2Hjs.formatLogMessage.call(void 0, options)}
|
|
144
144
|
`,
|
|
145
145
|
config
|
|
146
146
|
);
|
|
@@ -153,18 +153,18 @@ ${_chunk3PQOI4NLjs.formatLogMessage.call(void 0, options)}
|
|
|
153
153
|
),
|
|
154
154
|
applyWorkspaceProjectTokens
|
|
155
155
|
);
|
|
156
|
-
|
|
156
|
+
_chunkAWKQRM2Hjs.writeTrace.call(void 0,
|
|
157
157
|
`Executor schema tokenized options \u2699\uFE0F
|
|
158
|
-
${
|
|
158
|
+
${_chunkAWKQRM2Hjs.formatLogMessage.call(void 0, tokenized)}
|
|
159
159
|
`,
|
|
160
160
|
config
|
|
161
161
|
);
|
|
162
162
|
if (_optionalChain([executorOptions, 'optionalAccess', _9 => _9.hooks, 'optionalAccess', _10 => _10.preProcess])) {
|
|
163
|
-
|
|
163
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
164
164
|
await Promise.resolve(
|
|
165
165
|
executorOptions.hooks.preProcess(tokenized, config)
|
|
166
166
|
);
|
|
167
|
-
|
|
167
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
168
168
|
}
|
|
169
169
|
const ret = executorFn(tokenized, context, config);
|
|
170
170
|
if (_isFunction(_optionalChain([ret, 'optionalAccess', _11 => _11.next]))) {
|
|
@@ -179,7 +179,7 @@ ${_chunk3PQOI4NLjs.formatLogMessage.call(void 0, tokenized)}
|
|
|
179
179
|
if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _12 => _12.error, 'optionalAccess', _13 => _13.message]) && typeof _optionalChain([result, 'optionalAccess', _14 => _14.error, 'optionalAccess', _15 => _15.message]) === "string" && _optionalChain([result, 'optionalAccess', _16 => _16.error, 'optionalAccess', _17 => _17.name]) && typeof _optionalChain([result, 'optionalAccess', _18 => _18.error, 'optionalAccess', _19 => _19.name]) === "string")) {
|
|
180
180
|
throw new Error(
|
|
181
181
|
`Failure determined while running the ${name} executor
|
|
182
|
-
${
|
|
182
|
+
${_chunkAWKQRM2Hjs.formatLogMessage.call(void 0,
|
|
183
183
|
result
|
|
184
184
|
)}`,
|
|
185
185
|
{
|
|
@@ -188,21 +188,21 @@ ${_chunk3PQOI4NLjs.formatLogMessage.call(void 0,
|
|
|
188
188
|
);
|
|
189
189
|
}
|
|
190
190
|
if (_optionalChain([executorOptions, 'optionalAccess', _21 => _21.hooks, 'optionalAccess', _22 => _22.postProcess])) {
|
|
191
|
-
|
|
191
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
192
192
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
193
|
-
|
|
193
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
194
194
|
}
|
|
195
|
-
|
|
195
|
+
_chunkAWKQRM2Hjs.writeSuccess.call(void 0, `Completed running the ${name} task executor!
|
|
196
196
|
`, config);
|
|
197
197
|
return {
|
|
198
198
|
success: true
|
|
199
199
|
};
|
|
200
200
|
} catch (error) {
|
|
201
|
-
|
|
201
|
+
_chunkAWKQRM2Hjs.writeFatal.call(void 0,
|
|
202
202
|
"A fatal error occurred while running the executor - the process was forced to terminate",
|
|
203
203
|
config
|
|
204
204
|
);
|
|
205
|
-
|
|
205
|
+
_chunkAWKQRM2Hjs.writeError.call(void 0,
|
|
206
206
|
`An exception was thrown in the executor's process
|
|
207
207
|
- Details: ${error.message}
|
|
208
208
|
- Stacktrace: ${error.stack}`,
|
|
@@ -515,9 +515,9 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
515
515
|
output: "src/"
|
|
516
516
|
});
|
|
517
517
|
}
|
|
518
|
-
|
|
518
|
+
_chunkAWKQRM2Hjs.writeTrace.call(void 0,
|
|
519
519
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
520
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
520
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkAWKQRM2Hjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
521
521
|
config
|
|
522
522
|
);
|
|
523
523
|
const assetHandler = new (0, _copyassetshandlerjs.CopyAssetsHandler)({
|
|
@@ -527,20 +527,20 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
527
527
|
assets: pendingAssets
|
|
528
528
|
});
|
|
529
529
|
await assetHandler.processAllAssetsOnce();
|
|
530
|
-
|
|
530
|
+
_chunkAWKQRM2Hjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
531
531
|
if (includeSrc === true) {
|
|
532
|
-
|
|
533
|
-
`\u{1F4DD} Adding banner and writing source files: ${
|
|
532
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0,
|
|
533
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
534
534
|
outputPath,
|
|
535
535
|
"src"
|
|
536
536
|
)}`,
|
|
537
537
|
config
|
|
538
538
|
);
|
|
539
539
|
const files = await _glob.glob.call(void 0, [
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
540
|
+
_chunkAWKQRM2Hjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
541
|
+
_chunkAWKQRM2Hjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
542
|
+
_chunkAWKQRM2Hjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
543
|
+
_chunkAWKQRM2Hjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
544
544
|
]);
|
|
545
545
|
await Promise.allSettled(
|
|
546
546
|
files.map(
|
|
@@ -595,7 +595,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
595
595
|
)) {
|
|
596
596
|
const projectNode = project.node;
|
|
597
597
|
if (projectNode.data.root) {
|
|
598
|
-
const projectPackageJsonPath =
|
|
598
|
+
const projectPackageJsonPath = _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
599
599
|
workspaceRoot2,
|
|
600
600
|
projectNode.data.root,
|
|
601
601
|
"package.json"
|
|
@@ -613,11 +613,11 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
if (localPackages.length > 0) {
|
|
616
|
-
|
|
616
|
+
_chunkAWKQRM2Hjs.writeTrace.call(void 0,
|
|
617
617
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
618
618
|
);
|
|
619
619
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
620
|
-
|
|
620
|
+
_chunkAWKQRM2Hjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
621
621
|
"utf8"
|
|
622
622
|
);
|
|
623
623
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -630,7 +630,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
630
630
|
}
|
|
631
631
|
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) => {
|
|
632
632
|
if (_optionalChain([projectConfigurations, 'access', _42 => _42.projects, 'optionalAccess', _43 => _43[dep]])) {
|
|
633
|
-
const depPackageJsonPath =
|
|
633
|
+
const depPackageJsonPath = _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
634
634
|
workspaceRoot2,
|
|
635
635
|
projectConfigurations.projects[dep].root,
|
|
636
636
|
"package.json"
|
|
@@ -661,14 +661,14 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
661
661
|
return ret;
|
|
662
662
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
663
663
|
} else {
|
|
664
|
-
|
|
664
|
+
_chunkAWKQRM2Hjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
665
665
|
}
|
|
666
666
|
return packageJson;
|
|
667
667
|
};
|
|
668
668
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
669
|
-
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
669
|
+
const workspaceRoot2 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkPGTHXO6Mjs.findWorkspaceRoot.call(void 0, );
|
|
670
670
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
671
|
-
|
|
671
|
+
_chunkAWKQRM2Hjs.joinPaths.call(void 0, workspaceRoot2, "package.json"),
|
|
672
672
|
"utf8"
|
|
673
673
|
);
|
|
674
674
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -679,7 +679,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
679
679
|
if (distSrc.startsWith("/")) {
|
|
680
680
|
distSrc = distSrc.substring(1);
|
|
681
681
|
}
|
|
682
|
-
packageJson.source ??= `${
|
|
682
|
+
packageJson.source ??= `${_chunkAWKQRM2Hjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
683
683
|
}
|
|
684
684
|
packageJson.files ??= ["dist/**/*"];
|
|
685
685
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -704,7 +704,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
704
704
|
packageJson.contributors = [packageJson.author];
|
|
705
705
|
}
|
|
706
706
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
707
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
707
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkAWKQRM2Hjs.joinPaths.call(void 0, "packages", projectName);
|
|
708
708
|
return packageJson;
|
|
709
709
|
};
|
|
710
710
|
var addPackageJsonExport = (file, type = "module", sourceRoot) => {
|
|
@@ -758,11 +758,11 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
|
758
758
|
// ../esbuild/src/assets.ts
|
|
759
759
|
async function copyBuildAssets(context) {
|
|
760
760
|
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])) {
|
|
761
|
-
|
|
761
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0,
|
|
762
762
|
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
|
|
763
763
|
context.workspaceConfig
|
|
764
764
|
);
|
|
765
|
-
const stopwatch =
|
|
765
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
766
766
|
await copyAssets(
|
|
767
767
|
context.workspaceConfig,
|
|
768
768
|
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
@@ -843,15 +843,15 @@ async function resolveContext(userOptions) {
|
|
|
843
843
|
if (!workspaceRoot2) {
|
|
844
844
|
throw new Error("Cannot find Nx workspace root");
|
|
845
845
|
}
|
|
846
|
-
const workspaceConfig = await
|
|
846
|
+
const workspaceConfig = await _chunkPGTHXO6Mjs.getWorkspaceConfig.call(void 0, true, {
|
|
847
847
|
workspaceRoot: workspaceRoot2.dir
|
|
848
848
|
});
|
|
849
|
-
|
|
850
|
-
const stopwatch =
|
|
849
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
850
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, "Build options resolution");
|
|
851
851
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
852
852
|
exitOnError: true
|
|
853
853
|
});
|
|
854
|
-
const projectJsonPath =
|
|
854
|
+
const projectJsonPath = _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
855
855
|
workspaceRoot2.dir,
|
|
856
856
|
projectRoot,
|
|
857
857
|
"project.json"
|
|
@@ -870,7 +870,7 @@ async function resolveContext(userOptions) {
|
|
|
870
870
|
}
|
|
871
871
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
872
872
|
options.name ??= projectName;
|
|
873
|
-
const packageJsonPath =
|
|
873
|
+
const packageJsonPath = _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
874
874
|
workspaceRoot2.dir,
|
|
875
875
|
options.projectRoot,
|
|
876
876
|
"package.json"
|
|
@@ -882,7 +882,7 @@ async function resolveContext(userOptions) {
|
|
|
882
882
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
883
883
|
const resolvedOptions = {
|
|
884
884
|
...options,
|
|
885
|
-
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig :
|
|
885
|
+
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : _chunkAWKQRM2Hjs.joinPaths.call(void 0, workspaceRoot2.dir, projectRoot, "tsconfig.json"),
|
|
886
886
|
metafile: userOptions.mode === "development",
|
|
887
887
|
clean: false,
|
|
888
888
|
env,
|
|
@@ -907,8 +907,8 @@ async function resolveContext(userOptions) {
|
|
|
907
907
|
projectConfigurations,
|
|
908
908
|
projectName,
|
|
909
909
|
projectGraph,
|
|
910
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
911
|
-
outputPath: resolvedOptions.outputPath ||
|
|
910
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkAWKQRM2Hjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
911
|
+
outputPath: resolvedOptions.outputPath || _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
912
912
|
workspaceConfig.workspaceRoot,
|
|
913
913
|
"dist",
|
|
914
914
|
resolvedOptions.projectRoot
|
|
@@ -917,10 +917,10 @@ async function resolveContext(userOptions) {
|
|
|
917
917
|
};
|
|
918
918
|
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
919
919
|
if (context.options.verbose) {
|
|
920
|
-
|
|
920
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0,
|
|
921
921
|
` \u2699\uFE0F Build options resolved:
|
|
922
922
|
|
|
923
|
-
${
|
|
923
|
+
${_chunkAWKQRM2Hjs.formatLogMessage.call(void 0, context.options)}`,
|
|
924
924
|
workspaceConfig
|
|
925
925
|
);
|
|
926
926
|
}
|
|
@@ -932,10 +932,10 @@ ${_chunk3PQOI4NLjs.formatLogMessage.call(void 0, context.options)}`,
|
|
|
932
932
|
|
|
933
933
|
|
|
934
934
|
async function generatePackageJson(context) {
|
|
935
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
936
|
-
|
|
937
|
-
const stopwatch =
|
|
938
|
-
const packageJsonPath =
|
|
935
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkAWKQRM2Hjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
936
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
937
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, "Write package.json file");
|
|
938
|
+
const packageJsonPath = _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
939
939
|
context.options.projectRoot,
|
|
940
940
|
"project.json"
|
|
941
941
|
);
|
|
@@ -943,7 +943,7 @@ async function generatePackageJson(context) {
|
|
|
943
943
|
throw new Error("Cannot find package.json configuration");
|
|
944
944
|
}
|
|
945
945
|
const packageJsonFile = await _promises2.default.readFile(
|
|
946
|
-
|
|
946
|
+
_chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
947
947
|
context.workspaceConfig.workspaceRoot,
|
|
948
948
|
context.options.projectRoot,
|
|
949
949
|
"package.json"
|
|
@@ -1049,7 +1049,7 @@ async function generatePackageJson(context) {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
1051
|
await _devkit.writeJsonFile.call(void 0,
|
|
1052
|
-
|
|
1052
|
+
_chunkAWKQRM2Hjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
1053
1053
|
packageJson
|
|
1054
1054
|
);
|
|
1055
1055
|
stopwatch();
|
|
@@ -1061,12 +1061,12 @@ async function generatePackageJson(context) {
|
|
|
1061
1061
|
var _tsup = require('tsup');
|
|
1062
1062
|
async function build(options) {
|
|
1063
1063
|
if (!options.silent) {
|
|
1064
|
-
|
|
1064
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0,
|
|
1065
1065
|
` \u{1F680} Running ${options.name || "tsup"} build`,
|
|
1066
1066
|
options.workspaceConfig
|
|
1067
1067
|
);
|
|
1068
1068
|
}
|
|
1069
|
-
const stopwatch =
|
|
1069
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, `${options.name || "tsup"} build`);
|
|
1070
1070
|
await _tsup.build.call(void 0, options);
|
|
1071
1071
|
if (!options.silent) {
|
|
1072
1072
|
stopwatch();
|
|
@@ -1075,14 +1075,14 @@ async function build(options) {
|
|
|
1075
1075
|
|
|
1076
1076
|
// ../esbuild/src/tsup.ts
|
|
1077
1077
|
async function executeTsup(context) {
|
|
1078
|
-
|
|
1078
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0,
|
|
1079
1079
|
` \u{1F680} Running ${context.options.name} build`,
|
|
1080
1080
|
context.workspaceConfig
|
|
1081
1081
|
);
|
|
1082
|
-
const stopwatch =
|
|
1082
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
1083
1083
|
await build({
|
|
1084
1084
|
...context.options,
|
|
1085
|
-
outDir: context.options.distDir ?
|
|
1085
|
+
outDir: context.options.distDir ? _chunkAWKQRM2Hjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
1086
1086
|
workspaceConfig: context.workspaceConfig
|
|
1087
1087
|
});
|
|
1088
1088
|
stopwatch();
|
|
@@ -1093,17 +1093,17 @@ async function executeTsup(context) {
|
|
|
1093
1093
|
async function reportResults(context) {
|
|
1094
1094
|
if (_optionalChain([context, 'access', _60 => _60.result, 'optionalAccess', _61 => _61.errors, 'access', _62 => _62.length]) === 0) {
|
|
1095
1095
|
if (context.result.warnings.length > 0) {
|
|
1096
|
-
|
|
1096
|
+
_chunkAWKQRM2Hjs.writeWarning.call(void 0,
|
|
1097
1097
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
1098
1098
|
context.workspaceConfig
|
|
1099
1099
|
);
|
|
1100
1100
|
}
|
|
1101
|
-
|
|
1101
|
+
_chunkAWKQRM2Hjs.writeSuccess.call(void 0,
|
|
1102
1102
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
1103
1103
|
context.workspaceConfig
|
|
1104
1104
|
);
|
|
1105
1105
|
} 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) {
|
|
1106
|
-
|
|
1106
|
+
_chunkAWKQRM2Hjs.writeError.call(void 0,
|
|
1107
1107
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
1108
1108
|
context.workspaceConfig
|
|
1109
1109
|
);
|
|
@@ -1114,19 +1114,19 @@ async function reportResults(context) {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
async function cleanOutputPath(context) {
|
|
1116
1116
|
if (context.clean !== false && context.outputPath) {
|
|
1117
|
-
|
|
1117
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0,
|
|
1118
1118
|
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
1119
1119
|
context.workspaceConfig
|
|
1120
1120
|
);
|
|
1121
|
-
const stopwatch =
|
|
1121
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
1122
1122
|
await cleanDirectories(context.outputPath);
|
|
1123
1123
|
stopwatch();
|
|
1124
1124
|
}
|
|
1125
1125
|
return context;
|
|
1126
1126
|
}
|
|
1127
1127
|
async function build2(options) {
|
|
1128
|
-
|
|
1129
|
-
const stopwatch =
|
|
1128
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, ` ${_chunkAWKQRM2Hjs.brandIcon.call(void 0, )} Executing Storm ESBuild pipeline`);
|
|
1129
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1130
1130
|
try {
|
|
1131
1131
|
const opts = Array.isArray(options) ? options : [options];
|
|
1132
1132
|
if (opts.length === 0) {
|
|
@@ -1141,9 +1141,9 @@ async function build2(options) {
|
|
|
1141
1141
|
executeTsup(context)
|
|
1142
1142
|
]);
|
|
1143
1143
|
await reportResults(context);
|
|
1144
|
-
|
|
1144
|
+
_chunkAWKQRM2Hjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1145
1145
|
} catch (error) {
|
|
1146
|
-
|
|
1146
|
+
_chunkAWKQRM2Hjs.writeFatal.call(void 0,
|
|
1147
1147
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1148
1148
|
);
|
|
1149
1149
|
throw error;
|
|
@@ -1154,7 +1154,7 @@ async function build2(options) {
|
|
|
1154
1154
|
|
|
1155
1155
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1156
1156
|
async function esbuildExecutorFn(options, context, config) {
|
|
1157
|
-
|
|
1157
|
+
_chunkAWKQRM2Hjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1158
1158
|
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])) {
|
|
1159
1159
|
throw new Error(
|
|
1160
1160
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1196,7 +1196,7 @@ var _jiti = require('jiti');
|
|
|
1196
1196
|
var _fileutils = require('nx/src/utils/fileutils');
|
|
1197
1197
|
async function napiExecutor(options, context, config) {
|
|
1198
1198
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1199
|
-
fsCache: config.skipCache ? false :
|
|
1199
|
+
fsCache: config.skipCache ? false : _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
1200
1200
|
config.workspaceRoot,
|
|
1201
1201
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1202
1202
|
"jiti"
|
|
@@ -1212,52 +1212,52 @@ async function napiExecutor(options, context, config) {
|
|
|
1212
1212
|
);
|
|
1213
1213
|
}
|
|
1214
1214
|
const projectRoot = _optionalChain([context, 'access', _85 => _85.projectGraph, 'optionalAccess', _86 => _86.nodes, 'access', _87 => _87[_nullishCoalesce(context.projectName, () => ( ""))], 'optionalAccess', _88 => _88.data, 'access', _89 => _89.root]);
|
|
1215
|
-
const packageJson =
|
|
1215
|
+
const packageJson = _chunkAWKQRM2Hjs.joinPaths.call(void 0, _nullishCoalesce(projectRoot, () => ( ".")), "package.json");
|
|
1216
1216
|
if (!_fileutils.fileExists.call(void 0, packageJson)) {
|
|
1217
1217
|
throw new Error(`Could not find package.json at ${packageJson}`);
|
|
1218
1218
|
}
|
|
1219
1219
|
const napi = new NapiCli();
|
|
1220
1220
|
const normalizedOptions = { ...options };
|
|
1221
1221
|
const metadata = cargoMetadata();
|
|
1222
|
-
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _90 => _90.target_directory]) ||
|
|
1222
|
+
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _90 => _90.target_directory]) || _chunkAWKQRM2Hjs.joinPaths.call(void 0, config.workspaceRoot, "dist", "target");
|
|
1223
1223
|
normalizedOptions.outputDir = options.outputPath;
|
|
1224
1224
|
normalizedOptions.packageJsonPath ??= packageJson;
|
|
1225
1225
|
if (options.cwd) {
|
|
1226
|
-
normalizedOptions.cwd =
|
|
1226
|
+
normalizedOptions.cwd = _chunkAWKQRM2Hjs.correctPaths.call(void 0, options.cwd);
|
|
1227
1227
|
} else {
|
|
1228
|
-
const absoluteProjectRoot =
|
|
1229
|
-
|
|
1228
|
+
const absoluteProjectRoot = _chunkAWKQRM2Hjs.correctPaths.call(void 0,
|
|
1229
|
+
_chunkAWKQRM2Hjs.joinPaths.call(void 0, config.workspaceRoot, projectRoot || ".")
|
|
1230
1230
|
);
|
|
1231
1231
|
normalizedOptions.cwd = absoluteProjectRoot;
|
|
1232
1232
|
if (normalizedOptions.outputDir) {
|
|
1233
|
-
normalizedOptions.outputDir =
|
|
1233
|
+
normalizedOptions.outputDir = _chunkAWKQRM2Hjs.relative.call(void 0,
|
|
1234
1234
|
normalizedOptions.cwd,
|
|
1235
|
-
|
|
1236
|
-
|
|
1235
|
+
_chunkAWKQRM2Hjs.correctPaths.call(void 0,
|
|
1236
|
+
_chunkAWKQRM2Hjs.isAbsolute.call(void 0, normalizedOptions.outputDir) ? normalizedOptions.outputDir : _chunkAWKQRM2Hjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.outputDir)
|
|
1237
1237
|
)
|
|
1238
1238
|
);
|
|
1239
1239
|
}
|
|
1240
1240
|
if (normalizedOptions.packageJsonPath) {
|
|
1241
|
-
normalizedOptions.packageJsonPath =
|
|
1241
|
+
normalizedOptions.packageJsonPath = _chunkAWKQRM2Hjs.relative.call(void 0,
|
|
1242
1242
|
normalizedOptions.cwd,
|
|
1243
|
-
|
|
1244
|
-
|
|
1243
|
+
_chunkAWKQRM2Hjs.correctPaths.call(void 0,
|
|
1244
|
+
_chunkAWKQRM2Hjs.isAbsolute.call(void 0, normalizedOptions.packageJsonPath) ? normalizedOptions.packageJsonPath : _chunkAWKQRM2Hjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.packageJsonPath)
|
|
1245
1245
|
)
|
|
1246
1246
|
);
|
|
1247
1247
|
}
|
|
1248
1248
|
if (normalizedOptions.configPath) {
|
|
1249
|
-
normalizedOptions.configPath =
|
|
1249
|
+
normalizedOptions.configPath = _chunkAWKQRM2Hjs.relative.call(void 0,
|
|
1250
1250
|
normalizedOptions.cwd,
|
|
1251
|
-
|
|
1252
|
-
|
|
1251
|
+
_chunkAWKQRM2Hjs.correctPaths.call(void 0,
|
|
1252
|
+
_chunkAWKQRM2Hjs.isAbsolute.call(void 0, normalizedOptions.configPath) ? normalizedOptions.configPath : _chunkAWKQRM2Hjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.configPath)
|
|
1253
1253
|
)
|
|
1254
1254
|
);
|
|
1255
1255
|
}
|
|
1256
1256
|
if (normalizedOptions.manifestPath) {
|
|
1257
|
-
normalizedOptions.manifestPath =
|
|
1257
|
+
normalizedOptions.manifestPath = _chunkAWKQRM2Hjs.relative.call(void 0,
|
|
1258
1258
|
normalizedOptions.cwd,
|
|
1259
|
-
|
|
1260
|
-
|
|
1259
|
+
_chunkAWKQRM2Hjs.correctPaths.call(void 0,
|
|
1260
|
+
_chunkAWKQRM2Hjs.isAbsolute.call(void 0, normalizedOptions.manifestPath) ? normalizedOptions.manifestPath : _chunkAWKQRM2Hjs.joinPaths.call(void 0, config.workspaceRoot, normalizedOptions.manifestPath)
|
|
1261
1261
|
)
|
|
1262
1262
|
);
|
|
1263
1263
|
}
|
|
@@ -1265,7 +1265,7 @@ async function napiExecutor(options, context, config) {
|
|
|
1265
1265
|
if (process.env.VERCEL) {
|
|
1266
1266
|
return { success: true };
|
|
1267
1267
|
}
|
|
1268
|
-
|
|
1268
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0,
|
|
1269
1269
|
`Normalized Napi Options:
|
|
1270
1270
|
packageJsonPath: ${normalizedOptions.packageJsonPath}
|
|
1271
1271
|
outputDir: ${normalizedOptions.outputDir}
|
|
@@ -1345,14 +1345,14 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
1345
1345
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
1346
1346
|
);
|
|
1347
1347
|
}
|
|
1348
|
-
|
|
1348
|
+
_chunkAWKQRM2Hjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
1349
1349
|
_sizelimit2.default.call(void 0, [_file2.default, _esbuild2.default, _esbuildwhy2.default], {
|
|
1350
1350
|
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,
|
|
1351
1351
|
_nullishCoalesce(_optionalChain([context, 'access', _98 => _98.projectsConfigurations, 'access', _99 => _99.projects, 'access', _100 => _100[context.projectName], 'optionalAccess', _101 => _101.root]), () => ( "./")),
|
|
1352
1352
|
"src"
|
|
1353
1353
|
)))
|
|
1354
1354
|
}).then((result) => {
|
|
1355
|
-
|
|
1355
|
+
_chunkAWKQRM2Hjs.writeInfo.call(void 0,
|
|
1356
1356
|
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
1357
1357
|
config
|
|
1358
1358
|
);
|
|
@@ -1422,19 +1422,19 @@ function toTSDownFormat(format3) {
|
|
|
1422
1422
|
// ../tsdown/src/build.ts
|
|
1423
1423
|
var resolveOptions = async (userOptions) => {
|
|
1424
1424
|
const options = getDefaultOptions(userOptions);
|
|
1425
|
-
const workspaceRoot2 =
|
|
1425
|
+
const workspaceRoot2 = _chunkPGTHXO6Mjs.findWorkspaceRoot.call(void 0, options.projectRoot);
|
|
1426
1426
|
if (!workspaceRoot2) {
|
|
1427
1427
|
throw new Error("Cannot find Nx workspace root");
|
|
1428
1428
|
}
|
|
1429
|
-
const workspaceConfig = await
|
|
1429
|
+
const workspaceConfig = await _chunkPGTHXO6Mjs.getWorkspaceConfig.call(void 0, options.debug === true, {
|
|
1430
1430
|
workspaceRoot: workspaceRoot2
|
|
1431
1431
|
});
|
|
1432
|
-
|
|
1433
|
-
const stopwatch =
|
|
1432
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
1433
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1434
1434
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1435
1435
|
exitOnError: true
|
|
1436
1436
|
});
|
|
1437
|
-
const projectJsonPath =
|
|
1437
|
+
const projectJsonPath = _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
1438
1438
|
workspaceRoot2,
|
|
1439
1439
|
options.projectRoot,
|
|
1440
1440
|
"project.json"
|
|
@@ -1451,7 +1451,7 @@ var resolveOptions = async (userOptions) => {
|
|
|
1451
1451
|
"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."
|
|
1452
1452
|
);
|
|
1453
1453
|
}
|
|
1454
|
-
const packageJsonPath =
|
|
1454
|
+
const packageJsonPath = _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
1455
1455
|
workspaceRoot2,
|
|
1456
1456
|
options.projectRoot,
|
|
1457
1457
|
"package.json"
|
|
@@ -1460,13 +1460,13 @@ var resolveOptions = async (userOptions) => {
|
|
|
1460
1460
|
throw new Error("Cannot find package.json configuration");
|
|
1461
1461
|
}
|
|
1462
1462
|
const debug = _nullishCoalesce(options.debug, () => ( (options.mode || workspaceConfig.mode) === "development"));
|
|
1463
|
-
const sourceRoot = projectJson.sourceRoot ||
|
|
1463
|
+
const sourceRoot = projectJson.sourceRoot || _chunkAWKQRM2Hjs.joinPaths.call(void 0, options.projectRoot, "src");
|
|
1464
1464
|
const result = {
|
|
1465
1465
|
name: projectName,
|
|
1466
1466
|
mode: "production",
|
|
1467
1467
|
target: DEFAULT_TARGET,
|
|
1468
1468
|
generatePackageJson: true,
|
|
1469
|
-
outDir:
|
|
1469
|
+
outDir: _chunkAWKQRM2Hjs.joinPaths.call(void 0, "dist", options.projectRoot),
|
|
1470
1470
|
minify: !debug,
|
|
1471
1471
|
plugins: [],
|
|
1472
1472
|
assets: [],
|
|
@@ -1477,12 +1477,12 @@ var resolveOptions = async (userOptions) => {
|
|
|
1477
1477
|
clean: false,
|
|
1478
1478
|
fixedExtension: true,
|
|
1479
1479
|
nodeProtocol: true,
|
|
1480
|
-
tsconfig:
|
|
1480
|
+
tsconfig: _chunkAWKQRM2Hjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"),
|
|
1481
1481
|
debug,
|
|
1482
1482
|
sourceRoot,
|
|
1483
1483
|
cwd: workspaceConfig.workspaceRoot,
|
|
1484
1484
|
entry: {
|
|
1485
|
-
["index"]:
|
|
1485
|
+
["index"]: _chunkAWKQRM2Hjs.joinPaths.call(void 0, sourceRoot, "index.ts")
|
|
1486
1486
|
},
|
|
1487
1487
|
workspace: true,
|
|
1488
1488
|
...options,
|
|
@@ -1501,15 +1501,15 @@ var resolveOptions = async (userOptions) => {
|
|
|
1501
1501
|
return result;
|
|
1502
1502
|
};
|
|
1503
1503
|
async function generatePackageJson2(options) {
|
|
1504
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1505
|
-
|
|
1506
|
-
const stopwatch =
|
|
1507
|
-
const packageJsonPath =
|
|
1504
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkAWKQRM2Hjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1505
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.workspaceConfig);
|
|
1506
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1507
|
+
const packageJsonPath = _chunkAWKQRM2Hjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1508
1508
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1509
1509
|
throw new Error("Cannot find package.json configuration");
|
|
1510
1510
|
}
|
|
1511
1511
|
const packageJsonFile = await _promises2.default.readFile(
|
|
1512
|
-
|
|
1512
|
+
_chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
1513
1513
|
options.workspaceConfig.workspaceRoot,
|
|
1514
1514
|
options.projectRoot,
|
|
1515
1515
|
"package.json"
|
|
@@ -1571,14 +1571,14 @@ async function generatePackageJson2(options) {
|
|
|
1571
1571
|
},
|
|
1572
1572
|
packageJson.exports
|
|
1573
1573
|
);
|
|
1574
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1574
|
+
await _devkit.writeJsonFile.call(void 0, _chunkAWKQRM2Hjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
1575
1575
|
stopwatch();
|
|
1576
1576
|
}
|
|
1577
1577
|
return options;
|
|
1578
1578
|
}
|
|
1579
1579
|
async function executeTSDown(options) {
|
|
1580
|
-
|
|
1581
|
-
const stopwatch =
|
|
1580
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.workspaceConfig);
|
|
1581
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1582
1582
|
await _tsdown.build.call(void 0, {
|
|
1583
1583
|
...options,
|
|
1584
1584
|
entry: options.entry,
|
|
@@ -1588,11 +1588,11 @@ async function executeTSDown(options) {
|
|
|
1588
1588
|
return options;
|
|
1589
1589
|
}
|
|
1590
1590
|
async function copyBuildAssets2(options) {
|
|
1591
|
-
|
|
1591
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0,
|
|
1592
1592
|
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
1593
1593
|
options.workspaceConfig
|
|
1594
1594
|
);
|
|
1595
|
-
const stopwatch =
|
|
1595
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1596
1596
|
await copyAssets(
|
|
1597
1597
|
options.workspaceConfig,
|
|
1598
1598
|
_nullishCoalesce(options.assets, () => ( [])),
|
|
@@ -1606,18 +1606,18 @@ async function copyBuildAssets2(options) {
|
|
|
1606
1606
|
return options;
|
|
1607
1607
|
}
|
|
1608
1608
|
async function reportResults2(options) {
|
|
1609
|
-
|
|
1609
|
+
_chunkAWKQRM2Hjs.writeSuccess.call(void 0,
|
|
1610
1610
|
` \u{1F4E6} The ${options.name} build completed successfully`,
|
|
1611
1611
|
options.workspaceConfig
|
|
1612
1612
|
);
|
|
1613
1613
|
}
|
|
1614
1614
|
async function cleanOutputPath2(options) {
|
|
1615
1615
|
if (options.clean !== false && options.workspaceConfig) {
|
|
1616
|
-
|
|
1616
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0,
|
|
1617
1617
|
` \u{1F9F9} Cleaning ${options.name} output path: ${options.workspaceConfig}`,
|
|
1618
1618
|
options.workspaceConfig
|
|
1619
1619
|
);
|
|
1620
|
-
const stopwatch =
|
|
1620
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1621
1621
|
await cleanDirectories2(
|
|
1622
1622
|
options.name,
|
|
1623
1623
|
options.outDir,
|
|
@@ -1628,8 +1628,8 @@ async function cleanOutputPath2(options) {
|
|
|
1628
1628
|
return options;
|
|
1629
1629
|
}
|
|
1630
1630
|
async function build3(options) {
|
|
1631
|
-
|
|
1632
|
-
const stopwatch =
|
|
1631
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, ` ${_chunkAWKQRM2Hjs.brandIcon.call(void 0, )} Executing Storm TSDown pipeline`);
|
|
1632
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1633
1633
|
try {
|
|
1634
1634
|
const opts = Array.isArray(options) ? options : [options];
|
|
1635
1635
|
if (opts.length === 0) {
|
|
@@ -1649,13 +1649,13 @@ async function build3(options) {
|
|
|
1649
1649
|
})
|
|
1650
1650
|
);
|
|
1651
1651
|
} else {
|
|
1652
|
-
|
|
1652
|
+
_chunkAWKQRM2Hjs.writeWarning.call(void 0,
|
|
1653
1653
|
" \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function."
|
|
1654
1654
|
);
|
|
1655
1655
|
}
|
|
1656
|
-
|
|
1656
|
+
_chunkAWKQRM2Hjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1657
1657
|
} catch (error) {
|
|
1658
|
-
|
|
1658
|
+
_chunkAWKQRM2Hjs.writeFatal.call(void 0,
|
|
1659
1659
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1660
1660
|
);
|
|
1661
1661
|
throw error;
|
|
@@ -1666,7 +1666,7 @@ async function build3(options) {
|
|
|
1666
1666
|
|
|
1667
1667
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
1668
1668
|
async function tsdownExecutorFn(options, context, config) {
|
|
1669
|
-
|
|
1669
|
+
_chunkAWKQRM2Hjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown executor on the workspace", config);
|
|
1670
1670
|
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])) {
|
|
1671
1671
|
throw new Error(
|
|
1672
1672
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1708,12 +1708,12 @@ var _fsextra = require('fs-extra');
|
|
|
1708
1708
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1709
1709
|
async function typiaExecutorFn(options, _, config) {
|
|
1710
1710
|
if (options.clean !== false) {
|
|
1711
|
-
|
|
1711
|
+
_chunkAWKQRM2Hjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1712
1712
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1713
1713
|
}
|
|
1714
1714
|
await Promise.all(
|
|
1715
1715
|
options.entry.map((entry) => {
|
|
1716
|
-
|
|
1716
|
+
_chunkAWKQRM2Hjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1717
1717
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1718
1718
|
input: entry,
|
|
1719
1719
|
output: options.outputPath,
|
|
@@ -1746,7 +1746,7 @@ var executor_default10 = withRunExecutor(
|
|
|
1746
1746
|
|
|
1747
1747
|
|
|
1748
1748
|
async function unbuildExecutorFn(options, context, config) {
|
|
1749
|
-
|
|
1749
|
+
_chunkAWKQRM2Hjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1750
1750
|
if (!_optionalChain([context, 'access', _118 => _118.projectsConfigurations, 'optionalAccess', _119 => _119.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1751
1751
|
throw new Error(
|
|
1752
1752
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
@@ -1763,7 +1763,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1763
1763
|
);
|
|
1764
1764
|
}
|
|
1765
1765
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1766
|
-
fsCache: config.skipCache ? false :
|
|
1766
|
+
fsCache: config.skipCache ? false : _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
1767
1767
|
config.workspaceRoot,
|
|
1768
1768
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1769
1769
|
"jiti"
|
|
@@ -1785,7 +1785,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1785
1785
|
{
|
|
1786
1786
|
stubOptions: {
|
|
1787
1787
|
jiti: {
|
|
1788
|
-
fsCache: config.skipCache ? false :
|
|
1788
|
+
fsCache: config.skipCache ? false : _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
1789
1789
|
config.workspaceRoot,
|
|
1790
1790
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1791
1791
|
"jiti"
|
|
@@ -1845,33 +1845,33 @@ var executor_default11 = withRunExecutor(
|
|
|
1845
1845
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
1846
1846
|
skipReadingConfig: false
|
|
1847
1847
|
}) => async (tree, _options) => {
|
|
1848
|
-
const stopwatch =
|
|
1848
|
+
const stopwatch = _chunkAWKQRM2Hjs.getStopwatch.call(void 0, name);
|
|
1849
1849
|
let options = _options;
|
|
1850
1850
|
let config;
|
|
1851
1851
|
try {
|
|
1852
|
-
|
|
1853
|
-
`${
|
|
1852
|
+
_chunkAWKQRM2Hjs.writeInfo.call(void 0,
|
|
1853
|
+
`${_chunkAWKQRM2Hjs.brandIcon.call(void 0, config)} Running the ${name} generator...
|
|
1854
1854
|
|
|
1855
1855
|
`,
|
|
1856
1856
|
config
|
|
1857
1857
|
);
|
|
1858
|
-
const workspaceRoot2 =
|
|
1858
|
+
const workspaceRoot2 = _chunkPGTHXO6Mjs.findWorkspaceRoot.call(void 0, );
|
|
1859
1859
|
if (!generatorOptions.skipReadingConfig) {
|
|
1860
|
-
|
|
1860
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0,
|
|
1861
1861
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1862
1862
|
- workspaceRoot: ${workspaceRoot2}`,
|
|
1863
1863
|
config
|
|
1864
1864
|
);
|
|
1865
|
-
config = await
|
|
1865
|
+
config = await _chunkPGTHXO6Mjs.getConfig.call(void 0, workspaceRoot2);
|
|
1866
1866
|
}
|
|
1867
1867
|
if (_optionalChain([generatorOptions, 'optionalAccess', _120 => _120.hooks, 'optionalAccess', _121 => _121.applyDefaultOptions])) {
|
|
1868
|
-
|
|
1868
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1869
1869
|
options = await Promise.resolve(
|
|
1870
1870
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
1871
1871
|
);
|
|
1872
|
-
|
|
1872
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1873
1873
|
}
|
|
1874
|
-
|
|
1874
|
+
_chunkAWKQRM2Hjs.writeTrace.call(void 0,
|
|
1875
1875
|
`Generator schema options \u2699\uFE0F
|
|
1876
1876
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
1877
1877
|
config
|
|
@@ -1882,11 +1882,11 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1882
1882
|
applyWorkspaceBaseTokens
|
|
1883
1883
|
);
|
|
1884
1884
|
if (_optionalChain([generatorOptions, 'optionalAccess', _122 => _122.hooks, 'optionalAccess', _123 => _123.preProcess])) {
|
|
1885
|
-
|
|
1885
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
1886
1886
|
await Promise.resolve(
|
|
1887
1887
|
generatorOptions.hooks.preProcess(tokenized, config)
|
|
1888
1888
|
);
|
|
1889
|
-
|
|
1889
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
1890
1890
|
}
|
|
1891
1891
|
const result = await Promise.resolve(
|
|
1892
1892
|
generatorFn(tree, tokenized, config)
|
|
@@ -1901,21 +1901,21 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1901
1901
|
}
|
|
1902
1902
|
}
|
|
1903
1903
|
if (_optionalChain([generatorOptions, 'optionalAccess', _133 => _133.hooks, 'optionalAccess', _134 => _134.postProcess])) {
|
|
1904
|
-
|
|
1904
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
1905
1905
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1906
|
-
|
|
1906
|
+
_chunkAWKQRM2Hjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
1907
1907
|
}
|
|
1908
1908
|
return () => {
|
|
1909
|
-
|
|
1909
|
+
_chunkAWKQRM2Hjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
1910
1910
|
`, config);
|
|
1911
1911
|
};
|
|
1912
1912
|
} catch (error) {
|
|
1913
1913
|
return () => {
|
|
1914
|
-
|
|
1914
|
+
_chunkAWKQRM2Hjs.writeFatal.call(void 0,
|
|
1915
1915
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
1916
1916
|
config
|
|
1917
1917
|
);
|
|
1918
|
-
|
|
1918
|
+
_chunkAWKQRM2Hjs.writeError.call(void 0,
|
|
1919
1919
|
`An exception was thrown in the generator's process
|
|
1920
1920
|
- Details: ${error.message}
|
|
1921
1921
|
- Stacktrace: ${error.stack}`,
|
|
@@ -1981,16 +1981,16 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1981
1981
|
const projectConfig = {
|
|
1982
1982
|
root: normalized.directory,
|
|
1983
1983
|
projectType: "library",
|
|
1984
|
-
sourceRoot:
|
|
1984
|
+
sourceRoot: _chunkAWKQRM2Hjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
1985
1985
|
targets: {
|
|
1986
1986
|
build: {
|
|
1987
1987
|
executor: options.buildExecutor,
|
|
1988
1988
|
outputs: ["{options.outputPath}"],
|
|
1989
1989
|
options: {
|
|
1990
|
-
entry: [
|
|
1990
|
+
entry: [_chunkAWKQRM2Hjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
|
|
1991
1991
|
outputPath: getOutputPath(normalized),
|
|
1992
|
-
tsconfig:
|
|
1993
|
-
project:
|
|
1992
|
+
tsconfig: _chunkAWKQRM2Hjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
1993
|
+
project: _chunkAWKQRM2Hjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
1994
1994
|
defaultConfiguration: "production",
|
|
1995
1995
|
platform: "neutral",
|
|
1996
1996
|
assets: [
|
|
@@ -2047,7 +2047,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2047
2047
|
if (!normalized.importPath) {
|
|
2048
2048
|
normalized.importPath = normalized.name;
|
|
2049
2049
|
}
|
|
2050
|
-
const packageJsonPath =
|
|
2050
|
+
const packageJsonPath = _chunkAWKQRM2Hjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
2051
2051
|
if (tree.exists(packageJsonPath)) {
|
|
2052
2052
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2053
2053
|
if (!normalized.importPath) {
|
|
@@ -2104,14 +2104,14 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2104
2104
|
}));
|
|
2105
2105
|
}
|
|
2106
2106
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
2107
|
-
|
|
2107
|
+
_chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
2108
2108
|
normalized.projectRoot,
|
|
2109
2109
|
"./src",
|
|
2110
2110
|
`index.${normalized.js ? "js" : "ts"}`
|
|
2111
2111
|
)
|
|
2112
2112
|
]);
|
|
2113
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2114
|
-
|
|
2113
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkAWKQRM2Hjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
2114
|
+
_chunkAWKQRM2Hjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
2115
2115
|
]);
|
|
2116
2116
|
if (tree.exists("package.json")) {
|
|
2117
2117
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2122,7 +2122,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2122
2122
|
description = packageJson.description;
|
|
2123
2123
|
}
|
|
2124
2124
|
}
|
|
2125
|
-
const tsconfigPath =
|
|
2125
|
+
const tsconfigPath = _chunkAWKQRM2Hjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
2126
2126
|
if (tree.exists(tsconfigPath)) {
|
|
2127
2127
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2128
2128
|
json.composite ??= true;
|
|
@@ -2150,7 +2150,7 @@ function getOutputPath(options) {
|
|
|
2150
2150
|
} else {
|
|
2151
2151
|
parts.push(options.projectRoot);
|
|
2152
2152
|
}
|
|
2153
|
-
return
|
|
2153
|
+
return _chunkAWKQRM2Hjs.joinPaths.call(void 0, ...parts);
|
|
2154
2154
|
}
|
|
2155
2155
|
function createProjectTsConfigJson(tree, options) {
|
|
2156
2156
|
const tsconfig = {
|
|
@@ -2158,7 +2158,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2158
2158
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _149 => _149.tsconfigOptions]), () => ( {})),
|
|
2159
2159
|
compilerOptions: {
|
|
2160
2160
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2161
|
-
outDir:
|
|
2161
|
+
outDir: _chunkAWKQRM2Hjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2162
2162
|
noEmit: true,
|
|
2163
2163
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _150 => _150.tsconfigOptions, 'optionalAccess', _151 => _151.compilerOptions]), () => ( {}))
|
|
2164
2164
|
},
|
|
@@ -2176,7 +2176,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2176
2176
|
"src/**/*.test.ts"
|
|
2177
2177
|
]
|
|
2178
2178
|
};
|
|
2179
|
-
_devkit.writeJson.call(void 0, tree,
|
|
2179
|
+
_devkit.writeJson.call(void 0, tree, _chunkAWKQRM2Hjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2180
2180
|
}
|
|
2181
2181
|
async function normalizeOptions(tree, options, config) {
|
|
2182
2182
|
let importPath = options.importPath;
|
|
@@ -2241,7 +2241,7 @@ async function normalizeOptions(tree, options, config) {
|
|
|
2241
2241
|
|
|
2242
2242
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
2243
2243
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
2244
|
-
const filesDir =
|
|
2244
|
+
const filesDir = _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
2245
2245
|
__dirname,
|
|
2246
2246
|
"src",
|
|
2247
2247
|
"generators",
|
|
@@ -2324,38 +2324,38 @@ var generator_default = withRunGenerator(
|
|
|
2324
2324
|
|
|
2325
2325
|
var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
|
|
2326
2326
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
2327
|
-
|
|
2327
|
+
_chunkAWKQRM2Hjs.writeInfo.call(void 0,
|
|
2328
2328
|
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
2329
2329
|
config
|
|
2330
2330
|
);
|
|
2331
|
-
|
|
2331
|
+
_chunkAWKQRM2Hjs.writeTrace.call(void 0,
|
|
2332
2332
|
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
2333
2333
|
config
|
|
2334
2334
|
);
|
|
2335
|
-
const jsonSchema = z.toJSONSchema(
|
|
2335
|
+
const jsonSchema = z.toJSONSchema(_chunkPGTHXO6Mjs.workspaceConfigSchema, {
|
|
2336
2336
|
target: "draft-7",
|
|
2337
|
-
metadata:
|
|
2337
|
+
metadata: _chunkPGTHXO6Mjs.schemaRegistry
|
|
2338
2338
|
});
|
|
2339
2339
|
jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
|
|
2340
2340
|
jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
|
|
2341
2341
|
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.";
|
|
2342
|
-
|
|
2342
|
+
_chunkAWKQRM2Hjs.writeTrace.call(void 0, jsonSchema, config);
|
|
2343
2343
|
if (!options.outputFile) {
|
|
2344
2344
|
throw new Error(
|
|
2345
2345
|
"The `outputFile` option is required. Please specify the output file path."
|
|
2346
2346
|
);
|
|
2347
2347
|
}
|
|
2348
2348
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
2349
|
-
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _160 => _160.workspaceRoot]), () => (
|
|
2349
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _160 => _160.workspaceRoot]), () => ( _chunkPGTHXO6Mjs.findWorkspaceRoot.call(void 0, ))),
|
|
2350
2350
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
2351
2351
|
);
|
|
2352
|
-
|
|
2352
|
+
_chunkAWKQRM2Hjs.writeTrace.call(void 0,
|
|
2353
2353
|
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
2354
2354
|
config
|
|
2355
2355
|
);
|
|
2356
2356
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
2357
2357
|
await _devkit.formatFiles.call(void 0, tree);
|
|
2358
|
-
|
|
2358
|
+
_chunkAWKQRM2Hjs.writeSuccess.call(void 0,
|
|
2359
2359
|
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
2360
2360
|
config
|
|
2361
2361
|
);
|
|
@@ -2390,7 +2390,7 @@ var generator_default2 = withRunGenerator(
|
|
|
2390
2390
|
|
|
2391
2391
|
|
|
2392
2392
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
2393
|
-
const filesDir =
|
|
2393
|
+
const filesDir = _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
2394
2394
|
__dirname,
|
|
2395
2395
|
"src",
|
|
2396
2396
|
"generators",
|
|
@@ -2449,7 +2449,7 @@ var generator_default3 = withRunGenerator(
|
|
|
2449
2449
|
|
|
2450
2450
|
|
|
2451
2451
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
2452
|
-
const filesDir =
|
|
2452
|
+
const filesDir = _chunkAWKQRM2Hjs.joinPaths.call(void 0,
|
|
2453
2453
|
__dirname,
|
|
2454
2454
|
"src",
|
|
2455
2455
|
"generators",
|