@storm-software/cloudflare-tools 0.63.44 → 0.63.45
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 +7 -0
- package/README.md +1 -1
- package/dist/{chunk-IY32YNEH.js → chunk-22TVZUD6.js} +118 -118
- package/dist/{chunk-34J43ATV.mjs → chunk-3XJOEG3U.mjs} +2 -2
- package/dist/{chunk-IPZP75GA.mjs → chunk-5ECQU3JG.mjs} +1 -1
- package/dist/{chunk-47UJA2KT.mjs → chunk-6RUWSODA.mjs} +1 -1
- package/dist/{chunk-3ZJXUWIC.js → chunk-CEQXRQUZ.js} +44 -44
- package/dist/{chunk-ACMLK4HA.js → chunk-DMCXWUPE.js} +12 -12
- package/dist/{chunk-ORPNTF5S.mjs → chunk-HYPAYIZF.mjs} +3 -3
- package/dist/{chunk-77UQJX7G.mjs → chunk-JMCF36ML.mjs} +3 -3
- package/dist/{chunk-64KCJUHF.js → chunk-NS24FKMX.js} +16 -16
- package/dist/{chunk-FTBPZGRQ.js → chunk-QJKFFDTT.js} +1 -1
- package/dist/{chunk-YWK6SCFJ.mjs → chunk-RUF355PP.mjs} +1 -1
- package/dist/{chunk-ABNYQH3I.mjs → chunk-VPISCGUV.mjs} +1 -1
- package/dist/{chunk-7T6FCEJ2.js → chunk-XHGRTYFQ.js} +1 -1
- package/dist/{chunk-XCXVA72W.js → chunk-Y67ZZVAE.js} +3 -3
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +5 -5
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/src/executors/cloudflare-publish/executor.js +3 -3
- package/dist/src/executors/cloudflare-publish/executor.mjs +3 -3
- package/dist/src/executors/r2-upload-publish/executor.js +5 -5
- package/dist/src/executors/r2-upload-publish/executor.mjs +4 -4
- package/dist/src/executors/serve/executor.js +4 -4
- package/dist/src/executors/serve/executor.mjs +3 -3
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/dist/src/generators/worker/generator.js +5 -5
- package/dist/src/generators/worker/generator.mjs +4 -4
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.mjs +2 -2
- package/dist/src/utils/r2-bucket-helpers.js +3 -3
- package/dist/src/utils/r2-bucket-helpers.mjs +2 -2
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@ var _chunkNU34IEWNjs = require('./chunk-NU34IEWN.js');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkCEQXRQUZjs = require('./chunk-CEQXRQUZ.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -19,7 +19,7 @@ var _chunk3ZJXUWICjs = require('./chunk-3ZJXUWIC.js');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkQJKFFDTTjs = require('./chunk-QJKFFDTT.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _chunkMCKGQKYUjs = require('./chunk-MCKGQKYU.js');
|
|
@@ -59,7 +59,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
|
59
59
|
if (result.includes("{workspaceRoot}")) {
|
|
60
60
|
result = result.replaceAll(
|
|
61
61
|
"{workspaceRoot}",
|
|
62
|
-
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => (
|
|
62
|
+
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _3 => _3.config, 'optionalAccess', _4 => _4.workspaceRoot]))), () => ( _chunkQJKFFDTTjs.findWorkspaceRoot.call(void 0, )))
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
65
|
return result;
|
|
@@ -99,7 +99,7 @@ var applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
|
|
|
99
99
|
// ../workspace-tools/src/base/base-executor.ts
|
|
100
100
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
101
101
|
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
102
|
-
const stopwatch =
|
|
102
|
+
const stopwatch = _chunkQJKFFDTTjs.getStopwatch.call(void 0, name);
|
|
103
103
|
let options = _options;
|
|
104
104
|
let config = {};
|
|
105
105
|
try {
|
|
@@ -108,14 +108,14 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
108
108
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
|
-
const workspaceRoot3 =
|
|
111
|
+
const workspaceRoot3 = _chunkQJKFFDTTjs.findWorkspaceRoot.call(void 0, );
|
|
112
112
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot3;
|
|
113
113
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot3;
|
|
114
114
|
const projectName = context.projectName;
|
|
115
115
|
config.workspaceRoot = workspaceRoot3;
|
|
116
|
-
|
|
116
|
+
_chunkQJKFFDTTjs.writeInfo.call(void 0, `\u26A1 Running the ${name} executor for ${projectName} `, config);
|
|
117
117
|
if (!executorOptions.skipReadingConfig) {
|
|
118
|
-
|
|
118
|
+
_chunkQJKFFDTTjs.writeTrace.call(void 0,
|
|
119
119
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
120
120
|
- workspaceRoot: ${workspaceRoot3}
|
|
121
121
|
- projectRoot: ${projectRoot}
|
|
@@ -124,18 +124,18 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
124
124
|
`,
|
|
125
125
|
config
|
|
126
126
|
);
|
|
127
|
-
config = await
|
|
127
|
+
config = await _chunkCEQXRQUZjs.getConfig.call(void 0, workspaceRoot3);
|
|
128
128
|
}
|
|
129
129
|
if (_optionalChain([executorOptions, 'optionalAccess', _7 => _7.hooks, 'optionalAccess', _8 => _8.applyDefaultOptions])) {
|
|
130
|
-
|
|
130
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
131
131
|
options = await Promise.resolve(
|
|
132
132
|
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
133
133
|
);
|
|
134
|
-
|
|
134
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
_chunkQJKFFDTTjs.writeTrace.call(void 0,
|
|
137
137
|
`Executor schema options \u2699\uFE0F
|
|
138
|
-
${
|
|
138
|
+
${_chunkQJKFFDTTjs.formatLogMessage.call(void 0, options)}
|
|
139
139
|
`,
|
|
140
140
|
config
|
|
141
141
|
);
|
|
@@ -148,18 +148,18 @@ ${_chunkFTBPZGRQjs.formatLogMessage.call(void 0, options)}
|
|
|
148
148
|
),
|
|
149
149
|
applyWorkspaceProjectTokens
|
|
150
150
|
);
|
|
151
|
-
|
|
151
|
+
_chunkQJKFFDTTjs.writeTrace.call(void 0,
|
|
152
152
|
`Executor schema tokenized options \u2699\uFE0F
|
|
153
|
-
${
|
|
153
|
+
${_chunkQJKFFDTTjs.formatLogMessage.call(void 0, tokenized)}
|
|
154
154
|
`,
|
|
155
155
|
config
|
|
156
156
|
);
|
|
157
157
|
if (_optionalChain([executorOptions, 'optionalAccess', _9 => _9.hooks, 'optionalAccess', _10 => _10.preProcess])) {
|
|
158
|
-
|
|
158
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
159
159
|
await Promise.resolve(
|
|
160
160
|
executorOptions.hooks.preProcess(tokenized, config)
|
|
161
161
|
);
|
|
162
|
-
|
|
162
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
163
163
|
}
|
|
164
164
|
const ret = executorFn(tokenized, context, config);
|
|
165
165
|
if (_isFunction(_optionalChain([ret, 'optionalAccess', _11 => _11.next]))) {
|
|
@@ -172,9 +172,9 @@ ${_chunkFTBPZGRQjs.formatLogMessage.call(void 0, tokenized)}
|
|
|
172
172
|
ret
|
|
173
173
|
);
|
|
174
174
|
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")) {
|
|
175
|
-
|
|
175
|
+
_chunkQJKFFDTTjs.writeTrace.call(void 0,
|
|
176
176
|
`Failure determined by the ${name} executor
|
|
177
|
-
${
|
|
177
|
+
${_chunkQJKFFDTTjs.formatLogMessage.call(void 0, result)}`,
|
|
178
178
|
config
|
|
179
179
|
);
|
|
180
180
|
console.error(result);
|
|
@@ -183,21 +183,21 @@ ${_chunkFTBPZGRQjs.formatLogMessage.call(void 0, result)}`,
|
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
if (_optionalChain([executorOptions, 'optionalAccess', _21 => _21.hooks, 'optionalAccess', _22 => _22.postProcess])) {
|
|
186
|
-
|
|
186
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
187
187
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
188
|
-
|
|
188
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
_chunkQJKFFDTTjs.writeSuccess.call(void 0, `Completed running the ${name} task executor!
|
|
191
191
|
`, config);
|
|
192
192
|
return {
|
|
193
193
|
success: true
|
|
194
194
|
};
|
|
195
195
|
} catch (error) {
|
|
196
|
-
|
|
196
|
+
_chunkQJKFFDTTjs.writeFatal.call(void 0,
|
|
197
197
|
"A fatal error occurred while running the executor - the process was forced to terminate",
|
|
198
198
|
config
|
|
199
199
|
);
|
|
200
|
-
|
|
200
|
+
_chunkQJKFFDTTjs.writeError.call(void 0,
|
|
201
201
|
`An exception was thrown in the executor's process
|
|
202
202
|
- Details: ${error.message}
|
|
203
203
|
- Stacktrace: ${error.stack}`,
|
|
@@ -507,9 +507,9 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
507
507
|
output: "src/"
|
|
508
508
|
});
|
|
509
509
|
}
|
|
510
|
-
|
|
510
|
+
_chunkQJKFFDTTjs.writeTrace.call(void 0,
|
|
511
511
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
512
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
512
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkQJKFFDTTjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
513
513
|
config
|
|
514
514
|
);
|
|
515
515
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
@@ -519,20 +519,20 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
519
519
|
assets: pendingAssets
|
|
520
520
|
});
|
|
521
521
|
await assetHandler.processAllAssetsOnce();
|
|
522
|
-
|
|
522
|
+
_chunkQJKFFDTTjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
523
523
|
if (includeSrc === true) {
|
|
524
|
-
|
|
525
|
-
`\u{1F4DD} Adding banner and writing source files: ${
|
|
524
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0,
|
|
525
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
526
526
|
outputPath,
|
|
527
527
|
"src"
|
|
528
528
|
)}`,
|
|
529
529
|
config
|
|
530
530
|
);
|
|
531
531
|
const files = await _glob.glob.call(void 0, [
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
532
|
+
_chunkQJKFFDTTjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
533
|
+
_chunkQJKFFDTTjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
534
|
+
_chunkQJKFFDTTjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
535
|
+
_chunkQJKFFDTTjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
536
536
|
]);
|
|
537
537
|
await Promise.allSettled(
|
|
538
538
|
files.map(
|
|
@@ -587,7 +587,7 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
587
587
|
)) {
|
|
588
588
|
const projectNode = project.node;
|
|
589
589
|
if (projectNode.data.root) {
|
|
590
|
-
const projectPackageJsonPath =
|
|
590
|
+
const projectPackageJsonPath = _chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
591
591
|
workspaceRoot3,
|
|
592
592
|
projectNode.data.root,
|
|
593
593
|
"package.json"
|
|
@@ -605,11 +605,11 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
if (localPackages.length > 0) {
|
|
608
|
-
|
|
608
|
+
_chunkQJKFFDTTjs.writeTrace.call(void 0,
|
|
609
609
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
610
610
|
);
|
|
611
611
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
612
|
-
|
|
612
|
+
_chunkQJKFFDTTjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
613
613
|
"utf8"
|
|
614
614
|
);
|
|
615
615
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -622,7 +622,7 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
622
622
|
}
|
|
623
623
|
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) => {
|
|
624
624
|
if (_optionalChain([projectConfigurations, 'access', _42 => _42.projects, 'optionalAccess', _43 => _43[dep]])) {
|
|
625
|
-
const depPackageJsonPath =
|
|
625
|
+
const depPackageJsonPath = _chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
626
626
|
workspaceRoot3,
|
|
627
627
|
projectConfigurations.projects[dep].root,
|
|
628
628
|
"package.json"
|
|
@@ -653,14 +653,14 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
653
653
|
return ret;
|
|
654
654
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
655
655
|
} else {
|
|
656
|
-
|
|
656
|
+
_chunkQJKFFDTTjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
657
657
|
}
|
|
658
658
|
return packageJson;
|
|
659
659
|
};
|
|
660
660
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
661
|
-
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
661
|
+
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkQJKFFDTTjs.findWorkspaceRoot.call(void 0, );
|
|
662
662
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
663
|
-
|
|
663
|
+
_chunkQJKFFDTTjs.joinPaths.call(void 0, workspaceRoot3, "package.json"),
|
|
664
664
|
"utf8"
|
|
665
665
|
);
|
|
666
666
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -671,7 +671,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
671
671
|
if (distSrc.startsWith("/")) {
|
|
672
672
|
distSrc = distSrc.substring(1);
|
|
673
673
|
}
|
|
674
|
-
packageJson.source ??= `${
|
|
674
|
+
packageJson.source ??= `${_chunkQJKFFDTTjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
675
675
|
}
|
|
676
676
|
packageJson.files ??= ["dist/**/*"];
|
|
677
677
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -696,7 +696,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
696
696
|
packageJson.contributors = [packageJson.author];
|
|
697
697
|
}
|
|
698
698
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
699
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
699
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkQJKFFDTTjs.joinPaths.call(void 0, "packages", projectName);
|
|
700
700
|
return packageJson;
|
|
701
701
|
};
|
|
702
702
|
|
|
@@ -730,11 +730,11 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
|
730
730
|
// ../esbuild/src/assets.ts
|
|
731
731
|
async function copyBuildAssets(context) {
|
|
732
732
|
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])) {
|
|
733
|
-
|
|
733
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0,
|
|
734
734
|
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
|
|
735
735
|
context.workspaceConfig
|
|
736
736
|
);
|
|
737
|
-
const stopwatch =
|
|
737
|
+
const stopwatch = _chunkQJKFFDTTjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
738
738
|
await copyAssets(
|
|
739
739
|
context.workspaceConfig,
|
|
740
740
|
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
@@ -815,15 +815,15 @@ async function resolveContext(userOptions) {
|
|
|
815
815
|
if (!workspaceRoot3) {
|
|
816
816
|
throw new Error("Cannot find Nx workspace root");
|
|
817
817
|
}
|
|
818
|
-
const workspaceConfig = await
|
|
818
|
+
const workspaceConfig = await _chunkCEQXRQUZjs.getWorkspaceConfig.call(void 0, true, {
|
|
819
819
|
workspaceRoot: workspaceRoot3.dir
|
|
820
820
|
});
|
|
821
|
-
|
|
822
|
-
const stopwatch =
|
|
821
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
822
|
+
const stopwatch = _chunkQJKFFDTTjs.getStopwatch.call(void 0, "Build options resolution");
|
|
823
823
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
824
824
|
exitOnError: true
|
|
825
825
|
});
|
|
826
|
-
const projectJsonPath =
|
|
826
|
+
const projectJsonPath = _chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
827
827
|
workspaceRoot3.dir,
|
|
828
828
|
projectRoot,
|
|
829
829
|
"project.json"
|
|
@@ -842,7 +842,7 @@ async function resolveContext(userOptions) {
|
|
|
842
842
|
}
|
|
843
843
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
844
844
|
options.name ??= projectName;
|
|
845
|
-
const packageJsonPath =
|
|
845
|
+
const packageJsonPath = _chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
846
846
|
workspaceRoot3.dir,
|
|
847
847
|
options.projectRoot,
|
|
848
848
|
"package.json"
|
|
@@ -854,7 +854,7 @@ async function resolveContext(userOptions) {
|
|
|
854
854
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
855
855
|
const resolvedOptions = {
|
|
856
856
|
...options,
|
|
857
|
-
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig :
|
|
857
|
+
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : _chunkQJKFFDTTjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "tsconfig.json"),
|
|
858
858
|
metafile: userOptions.mode === "development",
|
|
859
859
|
clean: false,
|
|
860
860
|
env,
|
|
@@ -879,8 +879,8 @@ async function resolveContext(userOptions) {
|
|
|
879
879
|
projectConfigurations,
|
|
880
880
|
projectName,
|
|
881
881
|
projectGraph,
|
|
882
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
883
|
-
outputPath: resolvedOptions.outputPath ||
|
|
882
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkQJKFFDTTjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
883
|
+
outputPath: resolvedOptions.outputPath || _chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
884
884
|
workspaceConfig.workspaceRoot,
|
|
885
885
|
"dist",
|
|
886
886
|
resolvedOptions.projectRoot
|
|
@@ -889,10 +889,10 @@ async function resolveContext(userOptions) {
|
|
|
889
889
|
};
|
|
890
890
|
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
891
891
|
if (context.options.verbose) {
|
|
892
|
-
|
|
892
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0,
|
|
893
893
|
` \u2699\uFE0F Build options resolved:
|
|
894
894
|
|
|
895
|
-
${
|
|
895
|
+
${_chunkQJKFFDTTjs.formatLogMessage.call(void 0, context.options)}`,
|
|
896
896
|
workspaceConfig
|
|
897
897
|
);
|
|
898
898
|
}
|
|
@@ -904,10 +904,10 @@ ${_chunkFTBPZGRQjs.formatLogMessage.call(void 0, context.options)}`,
|
|
|
904
904
|
|
|
905
905
|
|
|
906
906
|
async function generatePackageJson(context) {
|
|
907
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
908
|
-
|
|
909
|
-
const stopwatch =
|
|
910
|
-
const packageJsonPath =
|
|
907
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkQJKFFDTTjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
908
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
909
|
+
const stopwatch = _chunkQJKFFDTTjs.getStopwatch.call(void 0, "Write package.json file");
|
|
910
|
+
const packageJsonPath = _chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
911
911
|
context.options.projectRoot,
|
|
912
912
|
"project.json"
|
|
913
913
|
);
|
|
@@ -915,7 +915,7 @@ async function generatePackageJson(context) {
|
|
|
915
915
|
throw new Error("Cannot find package.json configuration");
|
|
916
916
|
}
|
|
917
917
|
const packageJsonFile = await _promises2.default.readFile(
|
|
918
|
-
|
|
918
|
+
_chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
919
919
|
context.workspaceConfig.workspaceRoot,
|
|
920
920
|
context.options.projectRoot,
|
|
921
921
|
"package.json"
|
|
@@ -1021,7 +1021,7 @@ async function generatePackageJson(context) {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
1023
|
await _devkit.writeJsonFile.call(void 0,
|
|
1024
|
-
|
|
1024
|
+
_chunkQJKFFDTTjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
1025
1025
|
packageJson
|
|
1026
1026
|
);
|
|
1027
1027
|
stopwatch();
|
|
@@ -1096,10 +1096,10 @@ var depsCheckPlugin = (bundle) => ({
|
|
|
1096
1096
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
1097
1097
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
1098
1098
|
});
|
|
1099
|
-
|
|
1099
|
+
_chunkQJKFFDTTjs.writeWarning.call(void 0,
|
|
1100
1100
|
`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
|
|
1101
1101
|
);
|
|
1102
|
-
|
|
1102
|
+
_chunkQJKFFDTTjs.writeError.call(void 0,
|
|
1103
1103
|
`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
|
|
1104
1104
|
);
|
|
1105
1105
|
if (filteredMissingDeps.length > 0) {
|
|
@@ -1114,14 +1114,14 @@ ${JSON.stringify(filteredMissingDeps)}
|
|
|
1114
1114
|
// ../esbuild/src/tsup.ts
|
|
1115
1115
|
var _tsup = require('tsup');
|
|
1116
1116
|
async function executeTsup(context) {
|
|
1117
|
-
|
|
1117
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0,
|
|
1118
1118
|
` \u{1F680} Running ${context.options.name} build`,
|
|
1119
1119
|
context.workspaceConfig
|
|
1120
1120
|
);
|
|
1121
|
-
const stopwatch =
|
|
1121
|
+
const stopwatch = _chunkQJKFFDTTjs.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
1122
1122
|
await _tsup.build.call(void 0, {
|
|
1123
1123
|
...context.options,
|
|
1124
|
-
outDir: context.options.distDir ?
|
|
1124
|
+
outDir: context.options.distDir ? _chunkQJKFFDTTjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
1125
1125
|
workspaceConfig: context.workspaceConfig
|
|
1126
1126
|
});
|
|
1127
1127
|
stopwatch();
|
|
@@ -1132,17 +1132,17 @@ async function executeTsup(context) {
|
|
|
1132
1132
|
async function reportResults(context) {
|
|
1133
1133
|
if (_optionalChain([context, 'access', _60 => _60.result, 'optionalAccess', _61 => _61.errors, 'access', _62 => _62.length]) === 0) {
|
|
1134
1134
|
if (context.result.warnings.length > 0) {
|
|
1135
|
-
|
|
1135
|
+
_chunkQJKFFDTTjs.writeWarning.call(void 0,
|
|
1136
1136
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
1137
1137
|
context.workspaceConfig
|
|
1138
1138
|
);
|
|
1139
1139
|
}
|
|
1140
|
-
|
|
1140
|
+
_chunkQJKFFDTTjs.writeSuccess.call(void 0,
|
|
1141
1141
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
1142
1142
|
context.workspaceConfig
|
|
1143
1143
|
);
|
|
1144
1144
|
} 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) {
|
|
1145
|
-
|
|
1145
|
+
_chunkQJKFFDTTjs.writeError.call(void 0,
|
|
1146
1146
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
1147
1147
|
context.workspaceConfig
|
|
1148
1148
|
);
|
|
@@ -1179,19 +1179,19 @@ async function dependencyCheck(options) {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
async function cleanOutputPath(context) {
|
|
1181
1181
|
if (context.clean !== false && context.outputPath) {
|
|
1182
|
-
|
|
1182
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0,
|
|
1183
1183
|
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
1184
1184
|
context.workspaceConfig
|
|
1185
1185
|
);
|
|
1186
|
-
const stopwatch =
|
|
1186
|
+
const stopwatch = _chunkQJKFFDTTjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
1187
1187
|
await cleanDirectories(context.outputPath);
|
|
1188
1188
|
stopwatch();
|
|
1189
1189
|
}
|
|
1190
1190
|
return context;
|
|
1191
1191
|
}
|
|
1192
1192
|
async function build2(options) {
|
|
1193
|
-
|
|
1194
|
-
const stopwatch =
|
|
1193
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1194
|
+
const stopwatch = _chunkQJKFFDTTjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1195
1195
|
try {
|
|
1196
1196
|
const opts = Array.isArray(options) ? options : [options];
|
|
1197
1197
|
if (opts.length === 0) {
|
|
@@ -1206,9 +1206,9 @@ async function build2(options) {
|
|
|
1206
1206
|
executeTsup(context)
|
|
1207
1207
|
]);
|
|
1208
1208
|
await reportResults(context);
|
|
1209
|
-
|
|
1209
|
+
_chunkQJKFFDTTjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1210
1210
|
} catch (error) {
|
|
1211
|
-
|
|
1211
|
+
_chunkQJKFFDTTjs.writeFatal.call(void 0,
|
|
1212
1212
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1213
1213
|
);
|
|
1214
1214
|
throw error;
|
|
@@ -1219,7 +1219,7 @@ async function build2(options) {
|
|
|
1219
1219
|
|
|
1220
1220
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1221
1221
|
async function esbuildExecutorFn(options, context, config) {
|
|
1222
|
-
|
|
1222
|
+
_chunkQJKFFDTTjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1223
1223
|
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])) {
|
|
1224
1224
|
throw new Error(
|
|
1225
1225
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1283,14 +1283,14 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
1283
1283
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
1284
1284
|
);
|
|
1285
1285
|
}
|
|
1286
|
-
|
|
1286
|
+
_chunkQJKFFDTTjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
1287
1287
|
_sizelimit2.default.call(void 0, [_file2.default, _esbuild3.default, _esbuildwhy2.default], {
|
|
1288
1288
|
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _85 => _85.projectsConfigurations, 'access', _86 => _86.projects, 'access', _87 => _87[context.projectName], 'optionalAccess', _88 => _88.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0,
|
|
1289
1289
|
_nullishCoalesce(_optionalChain([context, 'access', _89 => _89.projectsConfigurations, 'access', _90 => _90.projects, 'access', _91 => _91[context.projectName], 'optionalAccess', _92 => _92.root]), () => ( "./")),
|
|
1290
1290
|
"src"
|
|
1291
1291
|
)))
|
|
1292
1292
|
}).then((result) => {
|
|
1293
|
-
|
|
1293
|
+
_chunkQJKFFDTTjs.writeInfo.call(void 0,
|
|
1294
1294
|
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
1295
1295
|
config
|
|
1296
1296
|
);
|
|
@@ -1317,12 +1317,12 @@ var _fsextra = require('fs-extra');
|
|
|
1317
1317
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1318
1318
|
async function typiaExecutorFn(options, _, config) {
|
|
1319
1319
|
if (options.clean !== false) {
|
|
1320
|
-
|
|
1320
|
+
_chunkQJKFFDTTjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1321
1321
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1322
1322
|
}
|
|
1323
1323
|
await Promise.all(
|
|
1324
1324
|
options.entry.map((entry) => {
|
|
1325
|
-
|
|
1325
|
+
_chunkQJKFFDTTjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1326
1326
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1327
1327
|
input: entry,
|
|
1328
1328
|
output: options.outputPath,
|
|
@@ -1355,7 +1355,7 @@ var executor_default8 = withRunExecutor(
|
|
|
1355
1355
|
|
|
1356
1356
|
var _jiti = require('jiti');
|
|
1357
1357
|
async function unbuildExecutorFn(options, context, config) {
|
|
1358
|
-
|
|
1358
|
+
_chunkQJKFFDTTjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1359
1359
|
if (!_optionalChain([context, 'access', _93 => _93.projectsConfigurations, 'optionalAccess', _94 => _94.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1360
1360
|
throw new Error(
|
|
1361
1361
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
@@ -1372,7 +1372,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1372
1372
|
);
|
|
1373
1373
|
}
|
|
1374
1374
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1375
|
-
fsCache: config.skipCache ? false :
|
|
1375
|
+
fsCache: config.skipCache ? false : _chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
1376
1376
|
config.workspaceRoot,
|
|
1377
1377
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1378
1378
|
"jiti"
|
|
@@ -1394,7 +1394,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1394
1394
|
{
|
|
1395
1395
|
stubOptions: {
|
|
1396
1396
|
jiti: {
|
|
1397
|
-
fsCache: config.skipCache ? false :
|
|
1397
|
+
fsCache: config.skipCache ? false : _chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
1398
1398
|
config.workspaceRoot,
|
|
1399
1399
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1400
1400
|
"jiti"
|
|
@@ -1454,30 +1454,30 @@ var executor_default9 = withRunExecutor(
|
|
|
1454
1454
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
1455
1455
|
skipReadingConfig: false
|
|
1456
1456
|
}) => async (tree, _options) => {
|
|
1457
|
-
const stopwatch =
|
|
1457
|
+
const stopwatch = _chunkQJKFFDTTjs.getStopwatch.call(void 0, name);
|
|
1458
1458
|
let options = _options;
|
|
1459
1459
|
let config;
|
|
1460
1460
|
try {
|
|
1461
|
-
|
|
1461
|
+
_chunkQJKFFDTTjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
1462
1462
|
|
|
1463
1463
|
`, config);
|
|
1464
|
-
const workspaceRoot3 =
|
|
1464
|
+
const workspaceRoot3 = _chunkQJKFFDTTjs.findWorkspaceRoot.call(void 0, );
|
|
1465
1465
|
if (!generatorOptions.skipReadingConfig) {
|
|
1466
|
-
|
|
1466
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0,
|
|
1467
1467
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1468
1468
|
- workspaceRoot: ${workspaceRoot3}`,
|
|
1469
1469
|
config
|
|
1470
1470
|
);
|
|
1471
|
-
config = await
|
|
1471
|
+
config = await _chunkCEQXRQUZjs.getConfig.call(void 0, workspaceRoot3);
|
|
1472
1472
|
}
|
|
1473
1473
|
if (_optionalChain([generatorOptions, 'optionalAccess', _95 => _95.hooks, 'optionalAccess', _96 => _96.applyDefaultOptions])) {
|
|
1474
|
-
|
|
1474
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1475
1475
|
options = await Promise.resolve(
|
|
1476
1476
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
1477
1477
|
);
|
|
1478
|
-
|
|
1478
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1479
1479
|
}
|
|
1480
|
-
|
|
1480
|
+
_chunkQJKFFDTTjs.writeTrace.call(void 0,
|
|
1481
1481
|
`Generator schema options \u2699\uFE0F
|
|
1482
1482
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
1483
1483
|
config
|
|
@@ -1488,11 +1488,11 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1488
1488
|
applyWorkspaceBaseTokens
|
|
1489
1489
|
);
|
|
1490
1490
|
if (_optionalChain([generatorOptions, 'optionalAccess', _97 => _97.hooks, 'optionalAccess', _98 => _98.preProcess])) {
|
|
1491
|
-
|
|
1491
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
1492
1492
|
await Promise.resolve(
|
|
1493
1493
|
generatorOptions.hooks.preProcess(tokenized, config)
|
|
1494
1494
|
);
|
|
1495
|
-
|
|
1495
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
1496
1496
|
}
|
|
1497
1497
|
const result = await Promise.resolve(
|
|
1498
1498
|
generatorFn(tree, tokenized, config)
|
|
@@ -1507,21 +1507,21 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
1509
|
if (_optionalChain([generatorOptions, 'optionalAccess', _108 => _108.hooks, 'optionalAccess', _109 => _109.postProcess])) {
|
|
1510
|
-
|
|
1510
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
1511
1511
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1512
|
-
|
|
1512
|
+
_chunkQJKFFDTTjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
1513
1513
|
}
|
|
1514
1514
|
return () => {
|
|
1515
|
-
|
|
1515
|
+
_chunkQJKFFDTTjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
1516
1516
|
`, config);
|
|
1517
1517
|
};
|
|
1518
1518
|
} catch (error) {
|
|
1519
1519
|
return () => {
|
|
1520
|
-
|
|
1520
|
+
_chunkQJKFFDTTjs.writeFatal.call(void 0,
|
|
1521
1521
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
1522
1522
|
config
|
|
1523
1523
|
);
|
|
1524
|
-
|
|
1524
|
+
_chunkQJKFFDTTjs.writeError.call(void 0,
|
|
1525
1525
|
`An exception was thrown in the generator's process
|
|
1526
1526
|
- Details: ${error.message}
|
|
1527
1527
|
- Stacktrace: ${error.stack}`,
|
|
@@ -1587,16 +1587,16 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1587
1587
|
const projectConfig = {
|
|
1588
1588
|
root: normalized.directory,
|
|
1589
1589
|
projectType: "library",
|
|
1590
|
-
sourceRoot:
|
|
1590
|
+
sourceRoot: _chunkQJKFFDTTjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
1591
1591
|
targets: {
|
|
1592
1592
|
build: {
|
|
1593
1593
|
executor: options.buildExecutor,
|
|
1594
1594
|
outputs: ["{options.outputPath}"],
|
|
1595
1595
|
options: {
|
|
1596
|
-
entry: [
|
|
1596
|
+
entry: [_chunkQJKFFDTTjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
|
|
1597
1597
|
outputPath: getOutputPath(normalized),
|
|
1598
|
-
tsconfig:
|
|
1599
|
-
project:
|
|
1598
|
+
tsconfig: _chunkQJKFFDTTjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
1599
|
+
project: _chunkQJKFFDTTjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
1600
1600
|
defaultConfiguration: "production",
|
|
1601
1601
|
platform: "neutral",
|
|
1602
1602
|
assets: [
|
|
@@ -1653,7 +1653,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1653
1653
|
if (!normalized.importPath) {
|
|
1654
1654
|
normalized.importPath = normalized.name;
|
|
1655
1655
|
}
|
|
1656
|
-
const packageJsonPath =
|
|
1656
|
+
const packageJsonPath = _chunkQJKFFDTTjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
1657
1657
|
if (tree.exists(packageJsonPath)) {
|
|
1658
1658
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
1659
1659
|
if (!normalized.importPath) {
|
|
@@ -1710,14 +1710,14 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1710
1710
|
}));
|
|
1711
1711
|
}
|
|
1712
1712
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
1713
|
-
|
|
1713
|
+
_chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
1714
1714
|
normalized.projectRoot,
|
|
1715
1715
|
"./src",
|
|
1716
1716
|
`index.${normalized.js ? "js" : "ts"}`
|
|
1717
1717
|
)
|
|
1718
1718
|
]);
|
|
1719
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
1720
|
-
|
|
1719
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkQJKFFDTTjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
1720
|
+
_chunkQJKFFDTTjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
1721
1721
|
]);
|
|
1722
1722
|
if (tree.exists("package.json")) {
|
|
1723
1723
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -1728,7 +1728,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1728
1728
|
description = packageJson.description;
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
1731
|
-
const tsconfigPath =
|
|
1731
|
+
const tsconfigPath = _chunkQJKFFDTTjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
1732
1732
|
if (tree.exists(tsconfigPath)) {
|
|
1733
1733
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
1734
1734
|
json.composite ??= true;
|
|
@@ -1756,7 +1756,7 @@ function getOutputPath(options) {
|
|
|
1756
1756
|
} else {
|
|
1757
1757
|
parts.push(options.projectRoot);
|
|
1758
1758
|
}
|
|
1759
|
-
return
|
|
1759
|
+
return _chunkQJKFFDTTjs.joinPaths.call(void 0, ...parts);
|
|
1760
1760
|
}
|
|
1761
1761
|
function createProjectTsConfigJson(tree, options) {
|
|
1762
1762
|
const tsconfig = {
|
|
@@ -1764,7 +1764,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
1764
1764
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _124 => _124.tsconfigOptions]), () => ( {})),
|
|
1765
1765
|
compilerOptions: {
|
|
1766
1766
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
1767
|
-
outDir:
|
|
1767
|
+
outDir: _chunkQJKFFDTTjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
1768
1768
|
noEmit: true,
|
|
1769
1769
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _125 => _125.tsconfigOptions, 'optionalAccess', _126 => _126.compilerOptions]), () => ( {}))
|
|
1770
1770
|
},
|
|
@@ -1782,7 +1782,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
1782
1782
|
"src/**/*.test.ts"
|
|
1783
1783
|
]
|
|
1784
1784
|
};
|
|
1785
|
-
_devkit.writeJson.call(void 0, tree,
|
|
1785
|
+
_devkit.writeJson.call(void 0, tree, _chunkQJKFFDTTjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
1786
1786
|
}
|
|
1787
1787
|
async function normalizeOptions(tree, options, config) {
|
|
1788
1788
|
let importPath = options.importPath;
|
|
@@ -1847,7 +1847,7 @@ async function normalizeOptions(tree, options, config) {
|
|
|
1847
1847
|
|
|
1848
1848
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
1849
1849
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
1850
|
-
const filesDir =
|
|
1850
|
+
const filesDir = _chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
1851
1851
|
__dirname,
|
|
1852
1852
|
"src",
|
|
1853
1853
|
"generators",
|
|
@@ -1930,37 +1930,37 @@ var generator_default = withRunGenerator(
|
|
|
1930
1930
|
|
|
1931
1931
|
var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
|
|
1932
1932
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
1933
|
-
|
|
1933
|
+
_chunkQJKFFDTTjs.writeInfo.call(void 0,
|
|
1934
1934
|
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
1935
1935
|
config
|
|
1936
1936
|
);
|
|
1937
|
-
|
|
1937
|
+
_chunkQJKFFDTTjs.writeTrace.call(void 0,
|
|
1938
1938
|
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
1939
1939
|
config
|
|
1940
1940
|
);
|
|
1941
|
-
const jsonSchema = z.toJSONSchema(
|
|
1941
|
+
const jsonSchema = z.toJSONSchema(_chunkQJKFFDTTjs.stormWorkspaceConfigSchema, {
|
|
1942
1942
|
target: "draft-7"
|
|
1943
1943
|
});
|
|
1944
1944
|
jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
|
|
1945
1945
|
jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
|
|
1946
1946
|
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.";
|
|
1947
|
-
|
|
1947
|
+
_chunkQJKFFDTTjs.writeTrace.call(void 0, jsonSchema, config);
|
|
1948
1948
|
if (!options.outputFile) {
|
|
1949
1949
|
throw new Error(
|
|
1950
1950
|
"The `outputFile` option is required. Please specify the output file path."
|
|
1951
1951
|
);
|
|
1952
1952
|
}
|
|
1953
1953
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
1954
|
-
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _135 => _135.workspaceRoot]), () => (
|
|
1954
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _135 => _135.workspaceRoot]), () => ( _chunkQJKFFDTTjs.findWorkspaceRoot.call(void 0, ))),
|
|
1955
1955
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
1956
1956
|
);
|
|
1957
|
-
|
|
1957
|
+
_chunkQJKFFDTTjs.writeTrace.call(void 0,
|
|
1958
1958
|
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
1959
1959
|
config
|
|
1960
1960
|
);
|
|
1961
1961
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
1962
1962
|
await _devkit.formatFiles.call(void 0, tree);
|
|
1963
|
-
|
|
1963
|
+
_chunkQJKFFDTTjs.writeSuccess.call(void 0,
|
|
1964
1964
|
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
1965
1965
|
config
|
|
1966
1966
|
);
|
|
@@ -1995,7 +1995,7 @@ var generator_default2 = withRunGenerator(
|
|
|
1995
1995
|
|
|
1996
1996
|
|
|
1997
1997
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
1998
|
-
const filesDir =
|
|
1998
|
+
const filesDir = _chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
1999
1999
|
__dirname,
|
|
2000
2000
|
"src",
|
|
2001
2001
|
"generators",
|
|
@@ -2054,7 +2054,7 @@ var generator_default3 = withRunGenerator(
|
|
|
2054
2054
|
|
|
2055
2055
|
|
|
2056
2056
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
2057
|
-
const filesDir =
|
|
2057
|
+
const filesDir = _chunkQJKFFDTTjs.joinPaths.call(void 0,
|
|
2058
2058
|
__dirname,
|
|
2059
2059
|
"src",
|
|
2060
2060
|
"generators",
|