@storm-software/workspace-tools 1.62.5 → 1.62.7
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 +24 -0
- package/index.js +109 -84
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +52 -37
- package/src/executors/tsup/executor.js +74 -57
- package/src/executors/tsup-browser/executor.js +74 -57
- package/src/executors/tsup-neutral/executor.js +74 -57
- package/src/executors/tsup-node/executor.js +74 -57
- package/src/executors/typia/executor.js +28 -21
- package/src/generators/browser-library/generator.js +26 -20
- package/src/generators/config-schema/generator.js +30 -24
- package/src/generators/neutral-library/generator.js +26 -20
- package/src/generators/node-library/generator.js +26 -20
- package/src/generators/preset/generator.js +26 -20
- package/src/generators/release-version/generator.js +31 -25
- package/src/utils/index.js +24 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## 1.62.7 (2024-02-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### 🩹 Fixes
|
|
5
|
+
|
|
6
|
+
- **workspace-tools:** Update base methods to no longer use dynamic imports ([e3f68252](https://github.com/storm-software/storm-ops/commit/e3f68252))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ❤️ Thank You
|
|
10
|
+
|
|
11
|
+
- Patrick Sullivan
|
|
12
|
+
|
|
13
|
+
## 1.62.6 (2024-02-27)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### 🩹 Fixes
|
|
17
|
+
|
|
18
|
+
- **workspace-tools:** Resolved issue with missing index.ts entry point ([8d1401ca](https://github.com/storm-software/storm-ops/commit/8d1401ca))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### ❤️ Thank You
|
|
22
|
+
|
|
23
|
+
- Patrick Sullivan
|
|
24
|
+
|
|
1
25
|
## 1.62.5 (2024-02-27)
|
|
2
26
|
|
|
3
27
|
|
package/index.js
CHANGED
|
@@ -181082,20 +181082,20 @@ var require_typescript = __commonJS({
|
|
|
181082
181082
|
})();
|
|
181083
181083
|
}
|
|
181084
181084
|
});
|
|
181085
|
-
var
|
|
181085
|
+
var LogLevel, Debug;
|
|
181086
181086
|
var init_debug = __esm2({
|
|
181087
181087
|
"src/compiler/debug.ts"() {
|
|
181088
181088
|
"use strict";
|
|
181089
181089
|
init_ts2();
|
|
181090
181090
|
init_ts2();
|
|
181091
|
-
|
|
181092
|
-
|
|
181093
|
-
|
|
181094
|
-
|
|
181095
|
-
|
|
181096
|
-
|
|
181097
|
-
return
|
|
181098
|
-
})(
|
|
181091
|
+
LogLevel = /* @__PURE__ */ ((LogLevel3) => {
|
|
181092
|
+
LogLevel3[LogLevel3["Off"] = 0] = "Off";
|
|
181093
|
+
LogLevel3[LogLevel3["Error"] = 1] = "Error";
|
|
181094
|
+
LogLevel3[LogLevel3["Warning"] = 2] = "Warning";
|
|
181095
|
+
LogLevel3[LogLevel3["Info"] = 3] = "Info";
|
|
181096
|
+
LogLevel3[LogLevel3["Verbose"] = 4] = "Verbose";
|
|
181097
|
+
return LogLevel3;
|
|
181098
|
+
})(LogLevel || {});
|
|
181099
181099
|
((Debug2) => {
|
|
181100
181100
|
let currentAssertionLevel = 0;
|
|
181101
181101
|
Debug2.currentLogLevel = 2;
|
|
@@ -363664,12 +363664,12 @@ ${options8.prefix}` : "\n" : options8.prefix
|
|
|
363664
363664
|
"src/server/utilitiesPublic.ts"() {
|
|
363665
363665
|
"use strict";
|
|
363666
363666
|
init_ts7();
|
|
363667
|
-
LogLevel22 = /* @__PURE__ */ ((
|
|
363668
|
-
|
|
363669
|
-
|
|
363670
|
-
|
|
363671
|
-
|
|
363672
|
-
return
|
|
363667
|
+
LogLevel22 = /* @__PURE__ */ ((LogLevel3) => {
|
|
363668
|
+
LogLevel3[LogLevel3["terse"] = 0] = "terse";
|
|
363669
|
+
LogLevel3[LogLevel3["normal"] = 1] = "normal";
|
|
363670
|
+
LogLevel3[LogLevel3["requestTime"] = 2] = "requestTime";
|
|
363671
|
+
LogLevel3[LogLevel3["verbose"] = 3] = "verbose";
|
|
363672
|
+
return LogLevel3;
|
|
363673
363673
|
})(LogLevel22 || {});
|
|
363674
363674
|
emptyArray22 = createSortedArray22();
|
|
363675
363675
|
Msg2 = /* @__PURE__ */ ((Msg22) => {
|
|
@@ -375200,7 +375200,7 @@ ${e3.message}`;
|
|
|
375200
375200
|
LanguageVariant: () => LanguageVariant,
|
|
375201
375201
|
LexicalEnvironmentFlags: () => LexicalEnvironmentFlags,
|
|
375202
375202
|
ListFormat: () => ListFormat,
|
|
375203
|
-
LogLevel: () =>
|
|
375203
|
+
LogLevel: () => LogLevel,
|
|
375204
375204
|
MemberOverrideStatus: () => MemberOverrideStatus,
|
|
375205
375205
|
ModifierFlags: () => ModifierFlags,
|
|
375206
375206
|
ModuleDetectionKind: () => ModuleDetectionKind,
|
|
@@ -377604,7 +377604,7 @@ ${e3.message}`;
|
|
|
377604
377604
|
LanguageVariant: () => LanguageVariant,
|
|
377605
377605
|
LexicalEnvironmentFlags: () => LexicalEnvironmentFlags,
|
|
377606
377606
|
ListFormat: () => ListFormat,
|
|
377607
|
-
LogLevel: () =>
|
|
377607
|
+
LogLevel: () => LogLevel,
|
|
377608
377608
|
MemberOverrideStatus: () => MemberOverrideStatus,
|
|
377609
377609
|
ModifierFlags: () => ModifierFlags,
|
|
377610
377610
|
ModuleDetectionKind: () => ModuleDetectionKind,
|
|
@@ -476153,9 +476153,6 @@ __export(workspace_tools_exports, {
|
|
|
476153
476153
|
});
|
|
476154
476154
|
module.exports = __toCommonJS(workspace_tools_exports);
|
|
476155
476155
|
|
|
476156
|
-
// packages/workspace-tools/src/base/base-executor.ts
|
|
476157
|
-
var import_config_tools2 = require("@storm-software/config-tools");
|
|
476158
|
-
|
|
476159
476156
|
// packages/workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
476160
476157
|
var import_config_tools = require("@storm-software/config-tools");
|
|
476161
476158
|
var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
@@ -476252,24 +476249,34 @@ var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
|
|
|
476252
476249
|
|
|
476253
476250
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
476254
476251
|
var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
|
|
476255
|
-
const
|
|
476252
|
+
const {
|
|
476253
|
+
getStopwatch,
|
|
476254
|
+
writeDebug,
|
|
476255
|
+
writeError,
|
|
476256
|
+
writeFatal,
|
|
476257
|
+
writeInfo: writeInfo3,
|
|
476258
|
+
writeSuccess,
|
|
476259
|
+
writeTrace,
|
|
476260
|
+
findWorkspaceRoot: findWorkspaceRoot5,
|
|
476261
|
+
loadStormConfig
|
|
476262
|
+
} = await import("@storm-software/config-tools");
|
|
476263
|
+
const stopwatch = getStopwatch(name);
|
|
476256
476264
|
let options8 = _options;
|
|
476257
476265
|
let config;
|
|
476258
476266
|
try {
|
|
476259
|
-
(
|
|
476267
|
+
writeInfo3(config, `\u26A1 Running the ${name} executor...
|
|
476260
476268
|
`);
|
|
476261
476269
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
476262
476270
|
throw new Error(
|
|
476263
476271
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
476264
476272
|
);
|
|
476265
476273
|
}
|
|
476266
|
-
const workspaceRoot = (
|
|
476274
|
+
const workspaceRoot = findWorkspaceRoot5();
|
|
476267
476275
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
476268
476276
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
476269
476277
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
476270
476278
|
if (!executorOptions.skipReadingConfig) {
|
|
476271
|
-
|
|
476272
|
-
(0, import_config_tools2.writeDebug)(
|
|
476279
|
+
writeDebug(
|
|
476273
476280
|
config,
|
|
476274
476281
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
476275
476282
|
- workspaceRoot: ${workspaceRoot}
|
|
@@ -476279,7 +476286,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
476279
476286
|
`
|
|
476280
476287
|
);
|
|
476281
476288
|
config = await loadStormConfig(workspaceRoot);
|
|
476282
|
-
|
|
476289
|
+
writeTrace(
|
|
476283
476290
|
config,
|
|
476284
476291
|
`Loaded Storm config into env:
|
|
476285
476292
|
${Object.keys(process.env).filter((key2) => key2.startsWith("STORM_")).map(
|
|
@@ -476288,11 +476295,11 @@ ${Object.keys(process.env).filter((key2) => key2.startsWith("STORM_")).map(
|
|
|
476288
476295
|
);
|
|
476289
476296
|
}
|
|
476290
476297
|
if (executorOptions?.hooks?.applyDefaultOptions) {
|
|
476291
|
-
|
|
476298
|
+
writeDebug(config, "Running the applyDefaultOptions hook...");
|
|
476292
476299
|
options8 = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options8, config));
|
|
476293
|
-
|
|
476300
|
+
writeDebug(config, "Completed the applyDefaultOptions hook");
|
|
476294
476301
|
}
|
|
476295
|
-
|
|
476302
|
+
writeTrace(
|
|
476296
476303
|
config,
|
|
476297
476304
|
`Executor schema options \u2699\uFE0F
|
|
476298
476305
|
${Object.keys(options8).map(
|
|
@@ -476313,9 +476320,9 @@ ${Object.keys(options8).map(
|
|
|
476313
476320
|
applyWorkspaceExecutorTokens
|
|
476314
476321
|
);
|
|
476315
476322
|
if (executorOptions?.hooks?.preProcess) {
|
|
476316
|
-
|
|
476323
|
+
writeDebug(config, "Running the preProcess hook...");
|
|
476317
476324
|
await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
|
|
476318
|
-
|
|
476325
|
+
writeDebug(config, "Completed the preProcess hook");
|
|
476319
476326
|
}
|
|
476320
476327
|
const result = await Promise.resolve(executorFn(tokenized, context, config));
|
|
476321
476328
|
if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
|
|
@@ -476324,21 +476331,21 @@ ${Object.keys(options8).map(
|
|
|
476324
476331
|
});
|
|
476325
476332
|
}
|
|
476326
476333
|
if (executorOptions?.hooks?.postProcess) {
|
|
476327
|
-
|
|
476334
|
+
writeDebug(config, "Running the postProcess hook...");
|
|
476328
476335
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
476329
|
-
|
|
476336
|
+
writeDebug(config, "Completed the postProcess hook");
|
|
476330
476337
|
}
|
|
476331
|
-
|
|
476338
|
+
writeSuccess(config, `Completed running the ${name} task executor!
|
|
476332
476339
|
`);
|
|
476333
476340
|
return {
|
|
476334
476341
|
success: true
|
|
476335
476342
|
};
|
|
476336
476343
|
} catch (error) {
|
|
476337
|
-
|
|
476344
|
+
writeFatal(
|
|
476338
476345
|
config,
|
|
476339
476346
|
"A fatal error occurred while running the executor - the process was forced to terminate"
|
|
476340
476347
|
);
|
|
476341
|
-
|
|
476348
|
+
writeError(
|
|
476342
476349
|
config,
|
|
476343
476350
|
`An exception was thrown in the executor's process
|
|
476344
476351
|
- Details: ${error.message}
|
|
@@ -476360,41 +476367,49 @@ var _isFunction = (value) => {
|
|
|
476360
476367
|
};
|
|
476361
476368
|
|
|
476362
476369
|
// packages/workspace-tools/src/base/base-generator.ts
|
|
476363
|
-
var import_config_tools3 = require("@storm-software/config-tools");
|
|
476364
|
-
var import_config_tools4 = require("@storm-software/config-tools");
|
|
476365
476370
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
476366
476371
|
skipReadingConfig: false
|
|
476367
476372
|
}) => async (tree, _options) => {
|
|
476368
|
-
const
|
|
476373
|
+
const {
|
|
476374
|
+
getStopwatch,
|
|
476375
|
+
writeDebug,
|
|
476376
|
+
writeError,
|
|
476377
|
+
writeFatal,
|
|
476378
|
+
writeInfo: writeInfo3,
|
|
476379
|
+
writeSuccess,
|
|
476380
|
+
writeTrace,
|
|
476381
|
+
findWorkspaceRootSafe,
|
|
476382
|
+
loadStormConfig
|
|
476383
|
+
} = await import("@storm-software/config-tools");
|
|
476384
|
+
const stopwatch = getStopwatch(name);
|
|
476369
476385
|
let options8 = _options;
|
|
476370
476386
|
let config;
|
|
476371
476387
|
try {
|
|
476372
|
-
(
|
|
476388
|
+
writeInfo3(config, `\u26A1 Running the ${name} generator...
|
|
476373
476389
|
|
|
476374
476390
|
`);
|
|
476375
|
-
const workspaceRoot =
|
|
476391
|
+
const workspaceRoot = findWorkspaceRootSafe();
|
|
476376
476392
|
if (!generatorOptions.skipReadingConfig) {
|
|
476377
|
-
|
|
476378
|
-
(0, import_config_tools3.writeDebug)(
|
|
476393
|
+
writeDebug(
|
|
476379
476394
|
config,
|
|
476380
476395
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
476381
476396
|
- workspaceRoot: ${workspaceRoot}`
|
|
476382
476397
|
);
|
|
476383
476398
|
config = await loadStormConfig(workspaceRoot);
|
|
476384
|
-
|
|
476399
|
+
writeTrace(
|
|
476385
476400
|
config,
|
|
476386
476401
|
`Loaded Storm config into env:
|
|
476387
476402
|
${Object.keys(process.env).map((key2) => ` - ${key2}=${JSON.stringify(process.env[key2])}`).join("\n")}`
|
|
476388
476403
|
);
|
|
476389
476404
|
}
|
|
476390
476405
|
if (generatorOptions?.hooks?.applyDefaultOptions) {
|
|
476391
|
-
|
|
476406
|
+
writeDebug(config, "Running the applyDefaultOptions hook...");
|
|
476392
476407
|
options8 = await Promise.resolve(
|
|
476393
476408
|
generatorOptions.hooks.applyDefaultOptions(options8, config)
|
|
476394
476409
|
);
|
|
476395
|
-
|
|
476410
|
+
writeDebug(config, "Completed the applyDefaultOptions hook");
|
|
476396
476411
|
}
|
|
476397
|
-
|
|
476412
|
+
writeTrace(
|
|
476398
476413
|
config,
|
|
476399
476414
|
`Generator schema options \u2699\uFE0F
|
|
476400
476415
|
${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
|
|
@@ -476405,9 +476420,9 @@ ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options
|
|
|
476405
476420
|
applyWorkspaceGeneratorTokens
|
|
476406
476421
|
);
|
|
476407
476422
|
if (generatorOptions?.hooks?.preProcess) {
|
|
476408
|
-
|
|
476423
|
+
writeDebug(config, "Running the preProcess hook...");
|
|
476409
476424
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
476410
|
-
|
|
476425
|
+
writeDebug(config, "Completed the preProcess hook");
|
|
476411
476426
|
}
|
|
476412
476427
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
476413
476428
|
if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
|
|
@@ -476416,22 +476431,22 @@ ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options
|
|
|
476416
476431
|
});
|
|
476417
476432
|
}
|
|
476418
476433
|
if (generatorOptions?.hooks?.postProcess) {
|
|
476419
|
-
|
|
476434
|
+
writeDebug(config, "Running the postProcess hook...");
|
|
476420
476435
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
476421
|
-
|
|
476436
|
+
writeDebug(config, "Completed the postProcess hook");
|
|
476422
476437
|
}
|
|
476423
|
-
|
|
476438
|
+
writeSuccess(config, `Completed running the ${name} task executor!
|
|
476424
476439
|
`);
|
|
476425
476440
|
return {
|
|
476426
476441
|
...result,
|
|
476427
476442
|
success: true
|
|
476428
476443
|
};
|
|
476429
476444
|
} catch (error) {
|
|
476430
|
-
|
|
476445
|
+
writeFatal(
|
|
476431
476446
|
config,
|
|
476432
476447
|
"A fatal error occurred while running the generator - the process was forced to terminate"
|
|
476433
476448
|
);
|
|
476434
|
-
|
|
476449
|
+
writeError(
|
|
476435
476450
|
config,
|
|
476436
476451
|
`An exception was thrown in the generator's process
|
|
476437
476452
|
- Details: ${error.message}
|
|
@@ -476955,7 +476970,6 @@ var import_esbuild_decorators = __toESM(require_src6());
|
|
|
476955
476970
|
var import_devkit3 = __toESM(require_devkit());
|
|
476956
476971
|
var import_get_custom_transformers_factory = __toESM(require_get_custom_transformers_factory());
|
|
476957
476972
|
var import_normalize_options = __toESM(require_normalize_options());
|
|
476958
|
-
var import_config_tools5 = require("@storm-software/config-tools");
|
|
476959
476973
|
|
|
476960
476974
|
// node_modules/.pnpm/esbuild-plugin-define@0.4.0_esbuild@0.19.12/node_modules/esbuild-plugin-define/dist/mjs/utils.js
|
|
476961
476975
|
var makeKey = (...inputs) => inputs.filter((input) => !!input).join(".");
|
|
@@ -477053,7 +477067,8 @@ var applyDefaultOptions = (options8) => {
|
|
|
477053
477067
|
return options8;
|
|
477054
477068
|
};
|
|
477055
477069
|
var runTsupBuild = async (context, config, options8) => {
|
|
477056
|
-
const
|
|
477070
|
+
const { LogLevel, getLogLevel, writeInfo: writeInfo3, writeWarning, findWorkspaceRoot: findWorkspaceRoot5 } = await import("@storm-software/config-tools");
|
|
477071
|
+
const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot5();
|
|
477057
477072
|
const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
|
|
477058
477073
|
ret[key2] = options8.env?.[key2];
|
|
477059
477074
|
return ret;
|
|
@@ -477112,7 +477127,7 @@ ${options8.banner}
|
|
|
477112
477127
|
outputPath: options8.outputPath
|
|
477113
477128
|
};
|
|
477114
477129
|
if (options8.getConfig) {
|
|
477115
|
-
(
|
|
477130
|
+
writeInfo3(config, "\u26A1 Running the Build process");
|
|
477116
477131
|
const getConfigFns = [options8.getConfig];
|
|
477117
477132
|
const tsupConfig = (0, import_tsup.defineConfig)(
|
|
477118
477133
|
getConfigFns.map(
|
|
@@ -477125,8 +477140,8 @@ ${options8.banner}
|
|
|
477125
477140
|
} else {
|
|
477126
477141
|
await build(tsupConfig, config);
|
|
477127
477142
|
}
|
|
477128
|
-
} else if (
|
|
477129
|
-
|
|
477143
|
+
} else if (getLogLevel(config?.logLevel ?? "debug") >= LogLevel.WARN) {
|
|
477144
|
+
writeWarning(
|
|
477130
477145
|
config,
|
|
477131
477146
|
"The Build process did not run because no `getConfig` parameter was provided"
|
|
477132
477147
|
);
|
|
@@ -477161,6 +477176,7 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options8) {
|
|
|
477161
477176
|
return tsConfig;
|
|
477162
477177
|
}
|
|
477163
477178
|
var build = async (options8, config) => {
|
|
477179
|
+
const { writeDebug } = await import("@storm-software/config-tools");
|
|
477164
477180
|
if (Array.isArray(options8)) {
|
|
477165
477181
|
await Promise.all(options8.map((buildOptions) => build(buildOptions, config)));
|
|
477166
477182
|
} else {
|
|
@@ -477168,7 +477184,7 @@ var build = async (options8, config) => {
|
|
|
477168
477184
|
if (_isFunction2(tsupOptions)) {
|
|
477169
477185
|
tsupOptions = await Promise.resolve(tsupOptions({}));
|
|
477170
477186
|
}
|
|
477171
|
-
|
|
477187
|
+
writeDebug(
|
|
477172
477188
|
config,
|
|
477173
477189
|
`\u2699\uFE0F Tsup Build options:
|
|
477174
477190
|
${!_isFunction2(tsupOptions) ? Object.keys(tsupOptions).map(
|
|
@@ -477210,7 +477226,6 @@ var createTypeScriptCompilationOptions = (normalizedOptions, projectName) => {
|
|
|
477210
477226
|
var import_node_fs = require("node:fs");
|
|
477211
477227
|
var import_devkit4 = __toESM(require_devkit());
|
|
477212
477228
|
var import_js2 = __toESM(require_src5());
|
|
477213
|
-
var import_config_tools7 = require("@storm-software/config-tools");
|
|
477214
477229
|
var import_fs_extra = __toESM(require_lib4());
|
|
477215
477230
|
|
|
477216
477231
|
// node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/mjs/index.js
|
|
@@ -483392,8 +483407,8 @@ var import_fileutils = require("nx/src/utils/fileutils.js");
|
|
|
483392
483407
|
|
|
483393
483408
|
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
483394
483409
|
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
483395
|
-
var
|
|
483396
|
-
var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)((0,
|
|
483410
|
+
var import_config_tools2 = require("@storm-software/config-tools");
|
|
483411
|
+
var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)((0, import_config_tools2.findWorkspaceRoot)());
|
|
483397
483412
|
var getProjectConfiguration = (projectName) => getProjectConfigurations()?.[projectName];
|
|
483398
483413
|
|
|
483399
483414
|
// packages/workspace-tools/src/utils/get-project-deps.ts
|
|
@@ -483453,8 +483468,18 @@ function getExternalDependencies(projectName, graph) {
|
|
|
483453
483468
|
|
|
483454
483469
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
483455
483470
|
async function tsupExecutorFn(options8, context, config) {
|
|
483456
|
-
|
|
483457
|
-
|
|
483471
|
+
const {
|
|
483472
|
+
LogLevel,
|
|
483473
|
+
getLogLevel,
|
|
483474
|
+
writeDebug,
|
|
483475
|
+
writeInfo: writeInfo3,
|
|
483476
|
+
writeSuccess,
|
|
483477
|
+
writeTrace,
|
|
483478
|
+
writeWarning,
|
|
483479
|
+
findWorkspaceRoot: findWorkspaceRoot5
|
|
483480
|
+
} = await import("@storm-software/config-tools");
|
|
483481
|
+
writeInfo3(config, "\u{1F4E6} Running Storm build executor on the workspace");
|
|
483482
|
+
writeDebug(
|
|
483458
483483
|
config,
|
|
483459
483484
|
`\u2699\uFE0F Executor options:
|
|
483460
483485
|
${Object.keys(options8).map(
|
|
@@ -483467,11 +483492,11 @@ ${Object.keys(options8).map(
|
|
|
483467
483492
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
483468
483493
|
);
|
|
483469
483494
|
}
|
|
483470
|
-
const workspaceRoot = (
|
|
483495
|
+
const workspaceRoot = findWorkspaceRoot5();
|
|
483471
483496
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
483472
483497
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
483473
483498
|
if (options8.clean !== false) {
|
|
483474
|
-
(
|
|
483499
|
+
writeInfo3(config, `\u{1F9F9} Cleaning output path: ${options8.outputPath}`);
|
|
483475
483500
|
(0, import_fs_extra.removeSync)(options8.outputPath);
|
|
483476
483501
|
}
|
|
483477
483502
|
const assets = Array.from(options8.assets);
|
|
@@ -483540,13 +483565,13 @@ ${Object.keys(options8).map(
|
|
|
483540
483565
|
const implicitDependencies = context.projectsConfigurations.projects[context.projectName]?.implicitDependencies;
|
|
483541
483566
|
const internalDependencies = [];
|
|
483542
483567
|
const projectConfigs = await Promise.resolve(getProjectConfigurations());
|
|
483543
|
-
if (
|
|
483544
|
-
|
|
483568
|
+
if (getLogLevel(config?.logLevel) >= LogLevel.TRACE) {
|
|
483569
|
+
writeDebug(config, "Project Configs:");
|
|
483545
483570
|
console.log(projectConfigs);
|
|
483546
483571
|
}
|
|
483547
483572
|
if (implicitDependencies && implicitDependencies.length > 0) {
|
|
483548
483573
|
options8.external = implicitDependencies.reduce((ret, key2) => {
|
|
483549
|
-
|
|
483574
|
+
writeDebug(config, `\u26A1 Adding implicit dependency: ${key2}`);
|
|
483550
483575
|
const projectConfig = projectConfigs[key2];
|
|
483551
483576
|
if (projectConfig?.targets?.build) {
|
|
483552
483577
|
const projectPackageJson = (0, import_devkit4.readJsonFile)(projectConfig.targets?.build.options.project);
|
|
@@ -483571,7 +483596,7 @@ ${Object.keys(options8).map(
|
|
|
483571
483596
|
externalDependencies.push(thirdPartyDependency);
|
|
483572
483597
|
}
|
|
483573
483598
|
}
|
|
483574
|
-
|
|
483599
|
+
writeTrace(
|
|
483575
483600
|
config,
|
|
483576
483601
|
`Building with the following dependencies marked as external:
|
|
483577
483602
|
${externalDependencies.map((dep) => {
|
|
@@ -483598,7 +483623,7 @@ ${externalDependencies.map((dep) => {
|
|
|
483598
483623
|
while (propertyKey.startsWith("/")) {
|
|
483599
483624
|
propertyKey = propertyKey.substring(1);
|
|
483600
483625
|
}
|
|
483601
|
-
|
|
483626
|
+
writeDebug(
|
|
483602
483627
|
config,
|
|
483603
483628
|
`Trying to add entry point ${propertyKey} at "${(0, import_devkit4.joinPathFragments)(
|
|
483604
483629
|
filePath.path,
|
|
@@ -483718,10 +483743,10 @@ ${externalDependencies.map((dep) => {
|
|
|
483718
483743
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
483719
483744
|
packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_devkit4.joinPathFragments)("packages", context.projectName);
|
|
483720
483745
|
const packageJsonPath = (0, import_devkit4.joinPathFragments)(context.root, options8.outputPath, "package.json");
|
|
483721
|
-
|
|
483746
|
+
writeDebug(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
|
|
483722
483747
|
(0, import_node_fs.writeFileSync)(packageJsonPath, JSON.stringify(packageJson));
|
|
483723
483748
|
} else {
|
|
483724
|
-
|
|
483749
|
+
writeWarning(config, "Skipping writing to package.json file");
|
|
483725
483750
|
}
|
|
483726
483751
|
if (options8.includeSrc === true) {
|
|
483727
483752
|
const files = globSync([
|
|
@@ -483757,7 +483782,7 @@ ${(0, import_node_fs.readFileSync)(file, "utf-8")}`,
|
|
|
483757
483782
|
)
|
|
483758
483783
|
)
|
|
483759
483784
|
);
|
|
483760
|
-
|
|
483785
|
+
writeSuccess(config, "\u26A1 The Build process has completed successfully");
|
|
483761
483786
|
return {
|
|
483762
483787
|
success: true
|
|
483763
483788
|
};
|
|
@@ -484169,12 +484194,12 @@ var executor_default4 = withRunExecutor(
|
|
|
484169
484194
|
);
|
|
484170
484195
|
|
|
484171
484196
|
// packages/workspace-tools/src/executors/typia/executor.ts
|
|
484172
|
-
var
|
|
484197
|
+
var import_config_tools3 = require("@storm-software/config-tools");
|
|
484173
484198
|
var import_fs_extra2 = __toESM(require_lib4());
|
|
484174
484199
|
var import_TypiaProgrammer = __toESM(require_TypiaProgrammer());
|
|
484175
484200
|
async function typiaExecutorFn(options8, _4, config) {
|
|
484176
484201
|
if (options8.clean !== false) {
|
|
484177
|
-
(0,
|
|
484202
|
+
(0, import_config_tools3.writeInfo)(config, `\u{1F9F9} Cleaning output path: ${options8.outputPath}`);
|
|
484178
484203
|
(0, import_fs_extra2.removeSync)(options8.outputPath);
|
|
484179
484204
|
}
|
|
484180
484205
|
await import_TypiaProgrammer.TypiaProgrammer.build({
|
|
@@ -488798,10 +488823,10 @@ var zodToJsonSchema = (schema2, options8) => {
|
|
|
488798
488823
|
};
|
|
488799
488824
|
|
|
488800
488825
|
// packages/workspace-tools/src/generators/config-schema/generator.ts
|
|
488801
|
-
var
|
|
488826
|
+
var import_config_tools4 = require("@storm-software/config-tools");
|
|
488802
488827
|
async function configSchemaGeneratorFn(tree, options8, config) {
|
|
488803
488828
|
const projectConfigurations = getProjectConfigurations();
|
|
488804
|
-
const workspaceRoot = config?.workspaceRoot ?? (0,
|
|
488829
|
+
const workspaceRoot = config?.workspaceRoot ?? (0, import_config_tools4.findWorkspaceRoot)();
|
|
488805
488830
|
const modules = await Promise.all(
|
|
488806
488831
|
Object.keys(projectConfigurations).map(async (key2) => {
|
|
488807
488832
|
if (projectConfigurations[key2]?.config) {
|
|
@@ -489135,7 +489160,7 @@ var import_version = require("nx/src/command-line/release/version");
|
|
|
489135
489160
|
var import_utils2 = require("nx/src/tasks-runner/utils");
|
|
489136
489161
|
var import_semver = require("nx/src/command-line/release/utils/semver");
|
|
489137
489162
|
var import_node_path4 = require("node:path");
|
|
489138
|
-
var
|
|
489163
|
+
var import_config_tools5 = require("@storm-software/config-tools");
|
|
489139
489164
|
var import_update_lock_file = __toESM(require_update_lock_file());
|
|
489140
489165
|
var import_node_child_process = require("node:child_process");
|
|
489141
489166
|
var import_git = require("nx/src/command-line/release/utils/git");
|
|
@@ -489166,7 +489191,7 @@ Valid values are: ${import_version.validReleaseVersionPrefixes.map((s) => `"${s}
|
|
|
489166
489191
|
const projects = options8.projects;
|
|
489167
489192
|
const createResolvePackageRoot = (customPackageRoot) => (projectNode) => {
|
|
489168
489193
|
if (projectNode?.data?.root === config?.workspaceRoot || projectNode?.data?.root === ".") {
|
|
489169
|
-
return config?.workspaceRoot ?? (0,
|
|
489194
|
+
return config?.workspaceRoot ?? (0, import_config_tools5.findWorkspaceRoot)();
|
|
489170
489195
|
}
|
|
489171
489196
|
if (!customPackageRoot) {
|
|
489172
489197
|
return projectNode.data.root;
|
|
@@ -489191,11 +489216,11 @@ Valid values are: ${import_version.validReleaseVersionPrefixes.map((s) => `"${s}
|
|
|
489191
489216
|
const packageRoot = projectNameToPackageRootMap.get(projectName);
|
|
489192
489217
|
const packageJsonPath = (0, import_devkit13.joinPathFragments)(packageRoot ?? "./", "package.json");
|
|
489193
489218
|
const workspaceRelativePackageJsonPath = (0, import_node_path4.relative)(
|
|
489194
|
-
config?.workspaceRoot ?? (0,
|
|
489219
|
+
config?.workspaceRoot ?? (0, import_config_tools5.findWorkspaceRoot)(),
|
|
489195
489220
|
packageJsonPath
|
|
489196
489221
|
);
|
|
489197
489222
|
const log = (msg) => {
|
|
489198
|
-
(0,
|
|
489223
|
+
(0, import_config_tools5.writeInfo)(config, `${projectName}: ${msg}`);
|
|
489199
489224
|
};
|
|
489200
489225
|
if (!tree.exists(packageJsonPath)) {
|
|
489201
489226
|
throw new Error(
|
|
@@ -489204,7 +489229,7 @@ Valid values are: ${import_version.validReleaseVersionPrefixes.map((s) => `"${s}
|
|
|
489204
489229
|
To fix this you will either need to add a package.json file at that location, or configure "release" within your nx.json to exclude "${projectName}" from the current release group, or amend the packageRoot configuration to point to where the package.json should be.`
|
|
489205
489230
|
);
|
|
489206
489231
|
}
|
|
489207
|
-
(0,
|
|
489232
|
+
(0, import_config_tools5.writeInfo)(config, `Running release version for project: ${project.name}`);
|
|
489208
489233
|
const projectPackageJson = (0, import_devkit13.readJson)(tree, packageJsonPath);
|
|
489209
489234
|
log(
|
|
489210
489235
|
`\u{1F50D} Reading data for package "${projectPackageJson.name}" from ${workspaceRelativePackageJsonPath}`
|