@storm-software/cloudflare-tools 0.62.7 → 0.63.0
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 +13 -0
- package/README.md +1 -1
- package/dist/{chunk-VPZXQH7S.mjs → chunk-2BTH7LON.mjs} +1 -1
- package/dist/{chunk-RIUVF72K.js → chunk-2HJQOPBD.js} +3 -3
- package/dist/{chunk-2SPHXGUN.mjs → chunk-5M3ADTI2.mjs} +3 -3
- package/dist/{chunk-GPAI4NHQ.mjs → chunk-7H2K6PT4.mjs} +12 -5
- package/dist/{chunk-PNHYOFJH.js → chunk-APB3HUAN.js} +12 -12
- package/dist/{chunk-P3LN6TP3.js → chunk-F3SWUKOS.js} +2 -2
- package/dist/{chunk-IXU6D3AC.mjs → chunk-FMTD7H3D.mjs} +4 -4
- package/dist/{chunk-MV24QW26.mjs → chunk-GOL5LHR6.mjs} +52 -15
- package/dist/{chunk-FABNT5TZ.mjs → chunk-JHXH6ZN3.mjs} +1 -1
- package/dist/{chunk-DPAEOWHQ.mjs → chunk-OJTXF2HH.mjs} +1 -1
- package/dist/{chunk-HBASMEU5.js → chunk-OL65RB72.js} +50 -43
- package/dist/{chunk-FUSFC5AM.js → chunk-Q6WFFOSW.js} +16 -16
- package/dist/{chunk-FL2QPQC4.mjs → chunk-QFLZSWVY.mjs} +4 -4
- package/dist/{chunk-JZJDF2HT.mjs → chunk-QKV3MDW3.mjs} +3 -3
- package/dist/{chunk-PZ5CI56F.js → chunk-SQUJ3SXL.js} +55 -18
- package/dist/{chunk-FF4AKPZG.js → chunk-UWFMN677.js} +116 -116
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +7 -7
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +5 -5
- package/dist/index.js +8 -8
- package/dist/index.mjs +9 -9
- package/dist/src/executors/cloudflare-publish/executor.js +3 -3
- package/dist/src/executors/cloudflare-publish/executor.mjs +5 -5
- package/dist/src/executors/r2-upload-publish/executor.js +5 -5
- package/dist/src/executors/r2-upload-publish/executor.mjs +5 -5
- package/dist/src/executors/serve/executor.js +4 -4
- package/dist/src/executors/serve/executor.mjs +4 -4
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +2 -2
- package/dist/src/generators/worker/generator.js +5 -5
- package/dist/src/generators/worker/generator.mjs +5 -5
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.mjs +3 -3
- package/dist/src/utils/r2-bucket-helpers.js +3 -3
- package/dist/src/utils/r2-bucket-helpers.mjs +3 -3
- package/dist/tsup.config.mjs +1 -1
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@ var _chunkKTFMIXUNjs = require('./chunk-KTFMIXUN.js');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkOL65RB72js = require('./chunk-OL65RB72.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -19,7 +19,7 @@ var _chunkHBASMEU5js = require('./chunk-HBASMEU5.js');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkSQUJ3SXLjs = require('./chunk-SQUJ3SXL.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]))), () => ( _chunkSQUJ3SXLjs.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 = _chunkSQUJ3SXLjs.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 = _chunkSQUJ3SXLjs.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
|
+
_chunkSQUJ3SXLjs.writeInfo.call(void 0, `\u26A1 Running the ${name} executor for ${projectName} `, config);
|
|
117
117
|
if (!executorOptions.skipReadingConfig) {
|
|
118
|
-
|
|
118
|
+
_chunkSQUJ3SXLjs.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 _chunkOL65RB72js.getConfig.call(void 0, workspaceRoot3);
|
|
128
128
|
}
|
|
129
129
|
if (_optionalChain([executorOptions, 'optionalAccess', _7 => _7.hooks, 'optionalAccess', _8 => _8.applyDefaultOptions])) {
|
|
130
|
-
|
|
130
|
+
_chunkSQUJ3SXLjs.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
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
_chunkSQUJ3SXLjs.writeTrace.call(void 0,
|
|
137
137
|
`Executor schema options \u2699\uFE0F
|
|
138
|
-
${
|
|
138
|
+
${_chunkSQUJ3SXLjs.formatLogMessage.call(void 0, options)}
|
|
139
139
|
`,
|
|
140
140
|
config
|
|
141
141
|
);
|
|
@@ -148,18 +148,18 @@ ${_chunkPZ5CI56Fjs.formatLogMessage.call(void 0, options)}
|
|
|
148
148
|
),
|
|
149
149
|
applyWorkspaceProjectTokens
|
|
150
150
|
);
|
|
151
|
-
|
|
151
|
+
_chunkSQUJ3SXLjs.writeTrace.call(void 0,
|
|
152
152
|
`Executor schema tokenized options \u2699\uFE0F
|
|
153
|
-
${
|
|
153
|
+
${_chunkSQUJ3SXLjs.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
|
+
_chunkSQUJ3SXLjs.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
|
+
_chunkSQUJ3SXLjs.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 @@ ${_chunkPZ5CI56Fjs.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
|
+
_chunkSQUJ3SXLjs.writeTrace.call(void 0,
|
|
176
176
|
`Failure determined by the ${name} executor
|
|
177
|
-
${
|
|
177
|
+
${_chunkSQUJ3SXLjs.formatLogMessage.call(void 0, result)}`,
|
|
178
178
|
config
|
|
179
179
|
);
|
|
180
180
|
console.error(result);
|
|
@@ -183,21 +183,21 @@ ${_chunkPZ5CI56Fjs.formatLogMessage.call(void 0, result)}`,
|
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
if (_optionalChain([executorOptions, 'optionalAccess', _21 => _21.hooks, 'optionalAccess', _22 => _22.postProcess])) {
|
|
186
|
-
|
|
186
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
187
187
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
188
|
-
|
|
188
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
_chunkSQUJ3SXLjs.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
|
+
_chunkSQUJ3SXLjs.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
|
+
_chunkSQUJ3SXLjs.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
|
+
_chunkSQUJ3SXLjs.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} -> ${_chunkSQUJ3SXLjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
513
513
|
config
|
|
514
514
|
);
|
|
515
515
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
@@ -520,18 +520,18 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
520
520
|
});
|
|
521
521
|
await assetHandler.processAllAssetsOnce();
|
|
522
522
|
if (includeSrc === true) {
|
|
523
|
-
|
|
524
|
-
`\u{1F4DD} Adding banner and writing source files: ${
|
|
523
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0,
|
|
524
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
525
525
|
outputPath,
|
|
526
526
|
"src"
|
|
527
527
|
)}`,
|
|
528
528
|
config
|
|
529
529
|
);
|
|
530
530
|
const files = await _glob.glob.call(void 0, [
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
531
|
+
_chunkSQUJ3SXLjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
532
|
+
_chunkSQUJ3SXLjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
533
|
+
_chunkSQUJ3SXLjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
534
|
+
_chunkSQUJ3SXLjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
535
535
|
]);
|
|
536
536
|
await Promise.allSettled(
|
|
537
537
|
files.map(
|
|
@@ -586,7 +586,7 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
586
586
|
)) {
|
|
587
587
|
const projectNode = project.node;
|
|
588
588
|
if (projectNode.data.root) {
|
|
589
|
-
const projectPackageJsonPath =
|
|
589
|
+
const projectPackageJsonPath = _chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
590
590
|
workspaceRoot3,
|
|
591
591
|
projectNode.data.root,
|
|
592
592
|
"package.json"
|
|
@@ -604,11 +604,11 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
606
|
if (localPackages.length > 0) {
|
|
607
|
-
|
|
607
|
+
_chunkSQUJ3SXLjs.writeTrace.call(void 0,
|
|
608
608
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
609
609
|
);
|
|
610
610
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
611
|
-
|
|
611
|
+
_chunkSQUJ3SXLjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
612
612
|
"utf8"
|
|
613
613
|
);
|
|
614
614
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -621,7 +621,7 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
621
621
|
}
|
|
622
622
|
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) => {
|
|
623
623
|
if (_optionalChain([projectConfigurations, 'access', _42 => _42.projects, 'optionalAccess', _43 => _43[dep]])) {
|
|
624
|
-
const depPackageJsonPath =
|
|
624
|
+
const depPackageJsonPath = _chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
625
625
|
workspaceRoot3,
|
|
626
626
|
projectConfigurations.projects[dep].root,
|
|
627
627
|
"package.json"
|
|
@@ -652,14 +652,14 @@ var addPackageDependencies = async (workspaceRoot3, projectRoot, projectName, pa
|
|
|
652
652
|
return ret;
|
|
653
653
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
654
654
|
} else {
|
|
655
|
-
|
|
655
|
+
_chunkSQUJ3SXLjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
656
656
|
}
|
|
657
657
|
return packageJson;
|
|
658
658
|
};
|
|
659
659
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
660
|
-
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
660
|
+
const workspaceRoot3 = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkSQUJ3SXLjs.findWorkspaceRoot.call(void 0, );
|
|
661
661
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
662
|
-
|
|
662
|
+
_chunkSQUJ3SXLjs.joinPaths.call(void 0, workspaceRoot3, "package.json"),
|
|
663
663
|
"utf8"
|
|
664
664
|
);
|
|
665
665
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -670,7 +670,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
670
670
|
if (distSrc.startsWith("/")) {
|
|
671
671
|
distSrc = distSrc.substring(1);
|
|
672
672
|
}
|
|
673
|
-
packageJson.source ??= `${
|
|
673
|
+
packageJson.source ??= `${_chunkSQUJ3SXLjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
674
674
|
}
|
|
675
675
|
packageJson.files ??= ["dist/**/*"];
|
|
676
676
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -695,7 +695,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
695
695
|
packageJson.contributors = [packageJson.author];
|
|
696
696
|
}
|
|
697
697
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
698
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
698
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkSQUJ3SXLjs.joinPaths.call(void 0, "packages", projectName);
|
|
699
699
|
return packageJson;
|
|
700
700
|
};
|
|
701
701
|
|
|
@@ -729,11 +729,11 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
|
729
729
|
// ../esbuild/src/assets.ts
|
|
730
730
|
async function copyBuildAssets(context) {
|
|
731
731
|
if (_optionalChain([context, 'access', _52 => _52.result, 'optionalAccess', _53 => _53.errors, 'access', _54 => _54.length]) === 0) {
|
|
732
|
-
|
|
732
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0,
|
|
733
733
|
` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`,
|
|
734
734
|
context.workspaceConfig
|
|
735
735
|
);
|
|
736
|
-
const stopwatch =
|
|
736
|
+
const stopwatch = _chunkSQUJ3SXLjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
737
737
|
await copyAssets(
|
|
738
738
|
context.workspaceConfig,
|
|
739
739
|
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
@@ -816,15 +816,15 @@ async function resolveContext(userOptions) {
|
|
|
816
816
|
if (!workspaceRoot3) {
|
|
817
817
|
throw new Error("Cannot find Nx workspace root");
|
|
818
818
|
}
|
|
819
|
-
const workspaceConfig = await
|
|
819
|
+
const workspaceConfig = await _chunkOL65RB72js.getWorkspaceConfig.call(void 0, true, {
|
|
820
820
|
workspaceRoot: workspaceRoot3.dir
|
|
821
821
|
});
|
|
822
|
-
|
|
823
|
-
const stopwatch =
|
|
822
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
823
|
+
const stopwatch = _chunkSQUJ3SXLjs.getStopwatch.call(void 0, "Build options resolution");
|
|
824
824
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
825
825
|
exitOnError: true
|
|
826
826
|
});
|
|
827
|
-
const projectJsonPath =
|
|
827
|
+
const projectJsonPath = _chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
828
828
|
workspaceRoot3.dir,
|
|
829
829
|
projectRoot,
|
|
830
830
|
"project.json"
|
|
@@ -843,7 +843,7 @@ async function resolveContext(userOptions) {
|
|
|
843
843
|
}
|
|
844
844
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
845
845
|
options.name ??= projectName;
|
|
846
|
-
const packageJsonPath =
|
|
846
|
+
const packageJsonPath = _chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
847
847
|
workspaceRoot3.dir,
|
|
848
848
|
options.projectRoot,
|
|
849
849
|
"package.json"
|
|
@@ -854,7 +854,7 @@ async function resolveContext(userOptions) {
|
|
|
854
854
|
const env = getEnv("esbuild", options);
|
|
855
855
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
856
856
|
const resolvedOptions = {
|
|
857
|
-
tsconfig:
|
|
857
|
+
tsconfig: _chunkSQUJ3SXLjs.joinPaths.call(void 0, workspaceRoot3.dir, projectRoot, "tsconfig.json"),
|
|
858
858
|
...options,
|
|
859
859
|
metafile: userOptions.mode === "development",
|
|
860
860
|
clean: false,
|
|
@@ -880,8 +880,8 @@ async function resolveContext(userOptions) {
|
|
|
880
880
|
projectConfigurations,
|
|
881
881
|
projectName,
|
|
882
882
|
projectGraph,
|
|
883
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
884
|
-
outputPath: resolvedOptions.outputPath ||
|
|
883
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkSQUJ3SXLjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
884
|
+
outputPath: resolvedOptions.outputPath || _chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
885
885
|
workspaceConfig.workspaceRoot,
|
|
886
886
|
"dist",
|
|
887
887
|
resolvedOptions.projectRoot
|
|
@@ -897,10 +897,10 @@ async function resolveContext(userOptions) {
|
|
|
897
897
|
|
|
898
898
|
|
|
899
899
|
async function generatePackageJson(context) {
|
|
900
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
901
|
-
|
|
902
|
-
const stopwatch =
|
|
903
|
-
const packageJsonPath =
|
|
900
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkSQUJ3SXLjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
901
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
902
|
+
const stopwatch = _chunkSQUJ3SXLjs.getStopwatch.call(void 0, "Write package.json file");
|
|
903
|
+
const packageJsonPath = _chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
904
904
|
context.options.projectRoot,
|
|
905
905
|
"project.json"
|
|
906
906
|
);
|
|
@@ -908,7 +908,7 @@ async function generatePackageJson(context) {
|
|
|
908
908
|
throw new Error("Cannot find package.json configuration");
|
|
909
909
|
}
|
|
910
910
|
const packageJsonFile = await _promises2.default.readFile(
|
|
911
|
-
|
|
911
|
+
_chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
912
912
|
context.workspaceConfig.workspaceRoot,
|
|
913
913
|
context.options.projectRoot,
|
|
914
914
|
"package.json"
|
|
@@ -1014,7 +1014,7 @@ async function generatePackageJson(context) {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
1016
|
await _devkit.writeJsonFile.call(void 0,
|
|
1017
|
-
|
|
1017
|
+
_chunkSQUJ3SXLjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
1018
1018
|
packageJson
|
|
1019
1019
|
);
|
|
1020
1020
|
stopwatch();
|
|
@@ -1089,10 +1089,10 @@ var depsCheckPlugin = (bundle) => ({
|
|
|
1089
1089
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
1090
1090
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
1091
1091
|
});
|
|
1092
|
-
|
|
1092
|
+
_chunkSQUJ3SXLjs.writeWarning.call(void 0,
|
|
1093
1093
|
`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
|
|
1094
1094
|
);
|
|
1095
|
-
|
|
1095
|
+
_chunkSQUJ3SXLjs.writeError.call(void 0,
|
|
1096
1096
|
`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
|
|
1097
1097
|
);
|
|
1098
1098
|
if (filteredMissingDeps.length > 0) {
|
|
@@ -1107,14 +1107,14 @@ ${JSON.stringify(filteredMissingDeps)}
|
|
|
1107
1107
|
// ../esbuild/src/tsup.ts
|
|
1108
1108
|
var _tsup = require('tsup');
|
|
1109
1109
|
async function executeTsup(context) {
|
|
1110
|
-
|
|
1110
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0,
|
|
1111
1111
|
` \u{1F680} Running ${context.options.name} build`,
|
|
1112
1112
|
context.workspaceConfig
|
|
1113
1113
|
);
|
|
1114
|
-
const stopwatch =
|
|
1114
|
+
const stopwatch = _chunkSQUJ3SXLjs.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
1115
1115
|
await _tsup.build.call(void 0, {
|
|
1116
1116
|
...context.options,
|
|
1117
|
-
outDir: context.options.distDir ?
|
|
1117
|
+
outDir: context.options.distDir ? _chunkSQUJ3SXLjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
1118
1118
|
workspaceConfig: context.workspaceConfig
|
|
1119
1119
|
});
|
|
1120
1120
|
stopwatch();
|
|
@@ -1125,17 +1125,17 @@ async function executeTsup(context) {
|
|
|
1125
1125
|
async function reportResults(context) {
|
|
1126
1126
|
if (_optionalChain([context, 'access', _57 => _57.result, 'optionalAccess', _58 => _58.errors, 'access', _59 => _59.length]) === 0) {
|
|
1127
1127
|
if (context.result.warnings.length > 0) {
|
|
1128
|
-
|
|
1128
|
+
_chunkSQUJ3SXLjs.writeWarning.call(void 0,
|
|
1129
1129
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
1130
1130
|
context.workspaceConfig
|
|
1131
1131
|
);
|
|
1132
1132
|
}
|
|
1133
|
-
|
|
1133
|
+
_chunkSQUJ3SXLjs.writeSuccess.call(void 0,
|
|
1134
1134
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
1135
1135
|
context.workspaceConfig
|
|
1136
1136
|
);
|
|
1137
1137
|
} else if (_optionalChain([context, 'access', _60 => _60.result, 'optionalAccess', _61 => _61.errors]) && _optionalChain([context, 'access', _62 => _62.result, 'optionalAccess', _63 => _63.errors, 'access', _64 => _64.length]) > 0) {
|
|
1138
|
-
|
|
1138
|
+
_chunkSQUJ3SXLjs.writeError.call(void 0,
|
|
1139
1139
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
1140
1140
|
context.workspaceConfig
|
|
1141
1141
|
);
|
|
@@ -1172,19 +1172,19 @@ async function dependencyCheck(options) {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
async function cleanOutputPath(context) {
|
|
1174
1174
|
if (context.clean !== false && context.outputPath) {
|
|
1175
|
-
|
|
1175
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0,
|
|
1176
1176
|
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
1177
1177
|
context.workspaceConfig
|
|
1178
1178
|
);
|
|
1179
|
-
const stopwatch =
|
|
1179
|
+
const stopwatch = _chunkSQUJ3SXLjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
1180
1180
|
await cleanDirectories(context.outputPath);
|
|
1181
1181
|
stopwatch();
|
|
1182
1182
|
}
|
|
1183
1183
|
return context;
|
|
1184
1184
|
}
|
|
1185
1185
|
async function build2(options) {
|
|
1186
|
-
|
|
1187
|
-
const stopwatch =
|
|
1186
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1187
|
+
const stopwatch = _chunkSQUJ3SXLjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1188
1188
|
try {
|
|
1189
1189
|
const opts = Array.isArray(options) ? options : [options];
|
|
1190
1190
|
if (opts.length === 0) {
|
|
@@ -1199,9 +1199,9 @@ async function build2(options) {
|
|
|
1199
1199
|
executeTsup(context)
|
|
1200
1200
|
]);
|
|
1201
1201
|
await reportResults(context);
|
|
1202
|
-
|
|
1202
|
+
_chunkSQUJ3SXLjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1203
1203
|
} catch (error) {
|
|
1204
|
-
|
|
1204
|
+
_chunkSQUJ3SXLjs.writeFatal.call(void 0,
|
|
1205
1205
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
1206
1206
|
);
|
|
1207
1207
|
throw error;
|
|
@@ -1212,7 +1212,7 @@ async function build2(options) {
|
|
|
1212
1212
|
|
|
1213
1213
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
1214
1214
|
async function esbuildExecutorFn(options, context, config) {
|
|
1215
|
-
|
|
1215
|
+
_chunkSQUJ3SXLjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1216
1216
|
if (!_optionalChain([context, 'access', _65 => _65.projectsConfigurations, 'optionalAccess', _66 => _66.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _67 => _67.projectsConfigurations, 'access', _68 => _68.projects, 'access', _69 => _69[context.projectName], 'optionalAccess', _70 => _70.root])) {
|
|
1217
1217
|
throw new Error(
|
|
1218
1218
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -1276,14 +1276,14 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
1276
1276
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
1277
1277
|
);
|
|
1278
1278
|
}
|
|
1279
|
-
|
|
1279
|
+
_chunkSQUJ3SXLjs.writeInfo.call(void 0, `\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
1280
1280
|
_sizelimit2.default.call(void 0, [_file2.default, _esbuild3.default, _esbuildwhy2.default], {
|
|
1281
1281
|
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _82 => _82.projectsConfigurations, 'access', _83 => _83.projects, 'access', _84 => _84[context.projectName], 'optionalAccess', _85 => _85.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0,
|
|
1282
1282
|
_nullishCoalesce(_optionalChain([context, 'access', _86 => _86.projectsConfigurations, 'access', _87 => _87.projects, 'access', _88 => _88[context.projectName], 'optionalAccess', _89 => _89.root]), () => ( "./")),
|
|
1283
1283
|
"src"
|
|
1284
1284
|
)))
|
|
1285
1285
|
}).then((result) => {
|
|
1286
|
-
|
|
1286
|
+
_chunkSQUJ3SXLjs.writeInfo.call(void 0,
|
|
1287
1287
|
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
1288
1288
|
config
|
|
1289
1289
|
);
|
|
@@ -1310,12 +1310,12 @@ var _fsextra = require('fs-extra');
|
|
|
1310
1310
|
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
1311
1311
|
async function typiaExecutorFn(options, _, config) {
|
|
1312
1312
|
if (options.clean !== false) {
|
|
1313
|
-
|
|
1313
|
+
_chunkSQUJ3SXLjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
1314
1314
|
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
1315
1315
|
}
|
|
1316
1316
|
await Promise.all(
|
|
1317
1317
|
options.entry.map((entry) => {
|
|
1318
|
-
|
|
1318
|
+
_chunkSQUJ3SXLjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
1319
1319
|
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
1320
1320
|
input: entry,
|
|
1321
1321
|
output: options.outputPath,
|
|
@@ -1348,7 +1348,7 @@ var executor_default8 = withRunExecutor(
|
|
|
1348
1348
|
|
|
1349
1349
|
var _jiti = require('jiti');
|
|
1350
1350
|
async function unbuildExecutorFn(options, context, config) {
|
|
1351
|
-
|
|
1351
|
+
_chunkSQUJ3SXLjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
1352
1352
|
if (!_optionalChain([context, 'access', _90 => _90.projectsConfigurations, 'optionalAccess', _91 => _91.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1353
1353
|
throw new Error(
|
|
1354
1354
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
@@ -1365,7 +1365,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1365
1365
|
);
|
|
1366
1366
|
}
|
|
1367
1367
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
1368
|
-
fsCache: config.skipCache ? false :
|
|
1368
|
+
fsCache: config.skipCache ? false : _chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
1369
1369
|
config.workspaceRoot,
|
|
1370
1370
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1371
1371
|
"jiti"
|
|
@@ -1387,7 +1387,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
1387
1387
|
{
|
|
1388
1388
|
stubOptions: {
|
|
1389
1389
|
jiti: {
|
|
1390
|
-
fsCache: config.skipCache ? false :
|
|
1390
|
+
fsCache: config.skipCache ? false : _chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
1391
1391
|
config.workspaceRoot,
|
|
1392
1392
|
config.directories.cache || "node_modules/.cache/storm",
|
|
1393
1393
|
"jiti"
|
|
@@ -1447,30 +1447,30 @@ var executor_default9 = withRunExecutor(
|
|
|
1447
1447
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
1448
1448
|
skipReadingConfig: false
|
|
1449
1449
|
}) => async (tree, _options) => {
|
|
1450
|
-
const stopwatch =
|
|
1450
|
+
const stopwatch = _chunkSQUJ3SXLjs.getStopwatch.call(void 0, name);
|
|
1451
1451
|
let options = _options;
|
|
1452
1452
|
let config;
|
|
1453
1453
|
try {
|
|
1454
|
-
|
|
1454
|
+
_chunkSQUJ3SXLjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
1455
1455
|
|
|
1456
1456
|
`, config);
|
|
1457
|
-
const workspaceRoot3 =
|
|
1457
|
+
const workspaceRoot3 = _chunkSQUJ3SXLjs.findWorkspaceRoot.call(void 0, );
|
|
1458
1458
|
if (!generatorOptions.skipReadingConfig) {
|
|
1459
|
-
|
|
1459
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0,
|
|
1460
1460
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
1461
1461
|
- workspaceRoot: ${workspaceRoot3}`,
|
|
1462
1462
|
config
|
|
1463
1463
|
);
|
|
1464
|
-
config = await
|
|
1464
|
+
config = await _chunkOL65RB72js.getConfig.call(void 0, workspaceRoot3);
|
|
1465
1465
|
}
|
|
1466
1466
|
if (_optionalChain([generatorOptions, 'optionalAccess', _92 => _92.hooks, 'optionalAccess', _93 => _93.applyDefaultOptions])) {
|
|
1467
|
-
|
|
1467
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
1468
1468
|
options = await Promise.resolve(
|
|
1469
1469
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
1470
1470
|
);
|
|
1471
|
-
|
|
1471
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
1472
1472
|
}
|
|
1473
|
-
|
|
1473
|
+
_chunkSQUJ3SXLjs.writeTrace.call(void 0,
|
|
1474
1474
|
`Generator schema options \u2699\uFE0F
|
|
1475
1475
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
1476
1476
|
config
|
|
@@ -1481,11 +1481,11 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1481
1481
|
applyWorkspaceBaseTokens
|
|
1482
1482
|
);
|
|
1483
1483
|
if (_optionalChain([generatorOptions, 'optionalAccess', _94 => _94.hooks, 'optionalAccess', _95 => _95.preProcess])) {
|
|
1484
|
-
|
|
1484
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
1485
1485
|
await Promise.resolve(
|
|
1486
1486
|
generatorOptions.hooks.preProcess(tokenized, config)
|
|
1487
1487
|
);
|
|
1488
|
-
|
|
1488
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
1489
1489
|
}
|
|
1490
1490
|
const result = await Promise.resolve(
|
|
1491
1491
|
generatorFn(tree, tokenized, config)
|
|
@@ -1500,21 +1500,21 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
1502
|
if (_optionalChain([generatorOptions, 'optionalAccess', _105 => _105.hooks, 'optionalAccess', _106 => _106.postProcess])) {
|
|
1503
|
-
|
|
1503
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
1504
1504
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
1505
|
-
|
|
1505
|
+
_chunkSQUJ3SXLjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
1506
1506
|
}
|
|
1507
1507
|
return () => {
|
|
1508
|
-
|
|
1508
|
+
_chunkSQUJ3SXLjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
1509
1509
|
`, config);
|
|
1510
1510
|
};
|
|
1511
1511
|
} catch (error) {
|
|
1512
1512
|
return () => {
|
|
1513
|
-
|
|
1513
|
+
_chunkSQUJ3SXLjs.writeFatal.call(void 0,
|
|
1514
1514
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
1515
1515
|
config
|
|
1516
1516
|
);
|
|
1517
|
-
|
|
1517
|
+
_chunkSQUJ3SXLjs.writeError.call(void 0,
|
|
1518
1518
|
`An exception was thrown in the generator's process
|
|
1519
1519
|
- Details: ${error.message}
|
|
1520
1520
|
- Stacktrace: ${error.stack}`,
|
|
@@ -1580,16 +1580,16 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1580
1580
|
const projectConfig = {
|
|
1581
1581
|
root: normalized.directory,
|
|
1582
1582
|
projectType: "library",
|
|
1583
|
-
sourceRoot:
|
|
1583
|
+
sourceRoot: _chunkSQUJ3SXLjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
1584
1584
|
targets: {
|
|
1585
1585
|
build: {
|
|
1586
1586
|
executor: options.buildExecutor,
|
|
1587
1587
|
outputs: ["{options.outputPath}"],
|
|
1588
1588
|
options: {
|
|
1589
|
-
entry: [
|
|
1589
|
+
entry: [_chunkSQUJ3SXLjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")],
|
|
1590
1590
|
outputPath: getOutputPath(normalized),
|
|
1591
|
-
tsconfig:
|
|
1592
|
-
project:
|
|
1591
|
+
tsconfig: _chunkSQUJ3SXLjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
1592
|
+
project: _chunkSQUJ3SXLjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
1593
1593
|
defaultConfiguration: "production",
|
|
1594
1594
|
platform: "neutral",
|
|
1595
1595
|
assets: [
|
|
@@ -1646,7 +1646,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1646
1646
|
if (!normalized.importPath) {
|
|
1647
1647
|
normalized.importPath = normalized.name;
|
|
1648
1648
|
}
|
|
1649
|
-
const packageJsonPath =
|
|
1649
|
+
const packageJsonPath = _chunkSQUJ3SXLjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
1650
1650
|
if (tree.exists(packageJsonPath)) {
|
|
1651
1651
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
1652
1652
|
if (!normalized.importPath) {
|
|
@@ -1703,14 +1703,14 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1703
1703
|
}));
|
|
1704
1704
|
}
|
|
1705
1705
|
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
1706
|
-
|
|
1706
|
+
_chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
1707
1707
|
normalized.projectRoot,
|
|
1708
1708
|
"./src",
|
|
1709
1709
|
`index.${normalized.js ? "js" : "ts"}`
|
|
1710
1710
|
)
|
|
1711
1711
|
]);
|
|
1712
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
1713
|
-
|
|
1712
|
+
_js.addTsConfigPath.call(void 0, tree, _chunkSQUJ3SXLjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
1713
|
+
_chunkSQUJ3SXLjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
1714
1714
|
]);
|
|
1715
1715
|
if (tree.exists("package.json")) {
|
|
1716
1716
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -1721,7 +1721,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
1721
1721
|
description = packageJson.description;
|
|
1722
1722
|
}
|
|
1723
1723
|
}
|
|
1724
|
-
const tsconfigPath =
|
|
1724
|
+
const tsconfigPath = _chunkSQUJ3SXLjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
1725
1725
|
if (tree.exists(tsconfigPath)) {
|
|
1726
1726
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
1727
1727
|
json.composite ??= true;
|
|
@@ -1749,7 +1749,7 @@ function getOutputPath(options) {
|
|
|
1749
1749
|
} else {
|
|
1750
1750
|
parts.push(options.projectRoot);
|
|
1751
1751
|
}
|
|
1752
|
-
return
|
|
1752
|
+
return _chunkSQUJ3SXLjs.joinPaths.call(void 0, ...parts);
|
|
1753
1753
|
}
|
|
1754
1754
|
function createProjectTsConfigJson(tree, options) {
|
|
1755
1755
|
const tsconfig = {
|
|
@@ -1757,7 +1757,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
1757
1757
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _118 => _118.tsconfigOptions]), () => ( {})),
|
|
1758
1758
|
compilerOptions: {
|
|
1759
1759
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
1760
|
-
outDir:
|
|
1760
|
+
outDir: _chunkSQUJ3SXLjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
1761
1761
|
noEmit: true,
|
|
1762
1762
|
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _119 => _119.tsconfigOptions, 'optionalAccess', _120 => _120.compilerOptions]), () => ( {}))
|
|
1763
1763
|
},
|
|
@@ -1775,7 +1775,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
1775
1775
|
"src/**/*.test.ts"
|
|
1776
1776
|
]
|
|
1777
1777
|
};
|
|
1778
|
-
_devkit.writeJson.call(void 0, tree,
|
|
1778
|
+
_devkit.writeJson.call(void 0, tree, _chunkSQUJ3SXLjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
1779
1779
|
}
|
|
1780
1780
|
async function normalizeOptions(tree, options, config) {
|
|
1781
1781
|
let importPath = options.importPath;
|
|
@@ -1840,7 +1840,7 @@ async function normalizeOptions(tree, options, config) {
|
|
|
1840
1840
|
|
|
1841
1841
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
1842
1842
|
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
1843
|
-
const filesDir =
|
|
1843
|
+
const filesDir = _chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
1844
1844
|
__dirname,
|
|
1845
1845
|
"src",
|
|
1846
1846
|
"generators",
|
|
@@ -1923,29 +1923,29 @@ var generator_default = withRunGenerator(
|
|
|
1923
1923
|
|
|
1924
1924
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
1925
1925
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
1926
|
-
|
|
1926
|
+
_chunkSQUJ3SXLjs.writeInfo.call(void 0,
|
|
1927
1927
|
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
1928
1928
|
config
|
|
1929
1929
|
);
|
|
1930
|
-
|
|
1930
|
+
_chunkSQUJ3SXLjs.writeTrace.call(void 0,
|
|
1931
1931
|
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
1932
1932
|
config
|
|
1933
1933
|
);
|
|
1934
|
-
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0,
|
|
1934
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkSQUJ3SXLjs.stormWorkspaceConfigSchema, {
|
|
1935
1935
|
name: "StormWorkspaceConfiguration"
|
|
1936
1936
|
});
|
|
1937
|
-
|
|
1937
|
+
_chunkSQUJ3SXLjs.writeTrace.call(void 0, jsonSchema, config);
|
|
1938
1938
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
1939
|
-
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _129 => _129.workspaceRoot]), () => (
|
|
1939
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _129 => _129.workspaceRoot]), () => ( _chunkSQUJ3SXLjs.findWorkspaceRoot.call(void 0, ))),
|
|
1940
1940
|
_optionalChain([options, 'access', _130 => _130.outputFile, 'optionalAccess', _131 => _131.startsWith, 'call', _132 => _132("./")]) ? "" : "./"
|
|
1941
1941
|
);
|
|
1942
|
-
|
|
1942
|
+
_chunkSQUJ3SXLjs.writeTrace.call(void 0,
|
|
1943
1943
|
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
1944
1944
|
config
|
|
1945
1945
|
);
|
|
1946
1946
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
1947
1947
|
await _devkit.formatFiles.call(void 0, tree);
|
|
1948
|
-
|
|
1948
|
+
_chunkSQUJ3SXLjs.writeSuccess.call(void 0,
|
|
1949
1949
|
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
1950
1950
|
config
|
|
1951
1951
|
);
|
|
@@ -1980,7 +1980,7 @@ var generator_default2 = withRunGenerator(
|
|
|
1980
1980
|
|
|
1981
1981
|
|
|
1982
1982
|
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
1983
|
-
const filesDir =
|
|
1983
|
+
const filesDir = _chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
1984
1984
|
__dirname,
|
|
1985
1985
|
"src",
|
|
1986
1986
|
"generators",
|
|
@@ -2039,7 +2039,7 @@ var generator_default3 = withRunGenerator(
|
|
|
2039
2039
|
|
|
2040
2040
|
|
|
2041
2041
|
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
2042
|
-
const filesDir =
|
|
2042
|
+
const filesDir = _chunkSQUJ3SXLjs.joinPaths.call(void 0,
|
|
2043
2043
|
__dirname,
|
|
2044
2044
|
"src",
|
|
2045
2045
|
"generators",
|
|
@@ -2765,7 +2765,7 @@ var typescript_build_executor_untyped_default = _untyped.defineUntypedSchema.cal
|
|
|
2765
2765
|
]
|
|
2766
2766
|
},
|
|
2767
2767
|
$default: "esnext",
|
|
2768
|
-
$resolve: (val = "esnext") => val.toLowerCase()
|
|
2768
|
+
$resolve: (val = "esnext") => typeof val === "string" ? val.toLowerCase() : val
|
|
2769
2769
|
},
|
|
2770
2770
|
format: {
|
|
2771
2771
|
$schema: {
|