@storm-software/build-tools 0.135.5 → 0.136.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.
Files changed (51) hide show
  1. package/README.md +1 -1
  2. package/dist/{chunk-KJNY2WFO.mjs → chunk-4CEXR3WS.mjs} +1 -1
  3. package/dist/{chunk-HCFLWTVN.mjs → chunk-4QSSCZ4Z.mjs} +88 -39
  4. package/dist/{chunk-L7W4YZE4.js → chunk-6LPGL3E4.js} +2 -2
  5. package/dist/{chunk-RCQ3JZXR.mjs → chunk-AMQI4RIK.mjs} +10 -36
  6. package/dist/{chunk-QMLJ4YOF.js → chunk-BIVPMVHQ.js} +120 -71
  7. package/dist/{chunk-275E2SAD.js → chunk-DNAOERFD.js} +71 -72
  8. package/dist/{chunk-7TZNJMAB.js → chunk-DZ22WFPY.js} +8 -8
  9. package/dist/{chunk-DRXCFXBB.mjs → chunk-E6JPW774.mjs} +69 -70
  10. package/dist/{chunk-YXBRJJCU.js → chunk-FJUDK5FI.js} +5 -5
  11. package/dist/{chunk-TYWDA4EL.mjs → chunk-KJY2LZUC.mjs} +1 -1
  12. package/dist/{chunk-SZMRYRJK.mjs → chunk-QE75GUF6.mjs} +1 -1
  13. package/dist/{chunk-ASTOW4W7.mjs → chunk-ULC227WD.mjs} +1 -1
  14. package/dist/chunk-VKRZOCAB.js +67 -0
  15. package/dist/{chunk-SYSXNB3M.js → chunk-YHNGJ2PU.js} +8 -8
  16. package/dist/index.d.mts +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +9 -9
  19. package/dist/index.mjs +9 -9
  20. package/dist/plugins/analyze.js +3 -3
  21. package/dist/plugins/analyze.mjs +2 -2
  22. package/dist/plugins/index.js +4 -4
  23. package/dist/plugins/index.mjs +3 -3
  24. package/dist/plugins/ts-resolve.js +3 -3
  25. package/dist/plugins/ts-resolve.mjs +2 -2
  26. package/dist/{types-v0neDT-G.d.ts → types-Km4Ix66C.d.mts} +3 -3
  27. package/dist/{types-v0neDT-G.d.mts → types-Km4Ix66C.d.ts} +3 -3
  28. package/dist/types.d.mts +1 -1
  29. package/dist/types.d.ts +1 -1
  30. package/dist/utilities/copy-assets.d.mts +2 -2
  31. package/dist/utilities/copy-assets.d.ts +2 -2
  32. package/dist/utilities/copy-assets.js +3 -4
  33. package/dist/utilities/copy-assets.mjs +2 -3
  34. package/dist/utilities/generate-package-json.d.mts +1 -1
  35. package/dist/utilities/generate-package-json.d.ts +1 -1
  36. package/dist/utilities/generate-package-json.js +3 -3
  37. package/dist/utilities/generate-package-json.mjs +2 -2
  38. package/dist/utilities/get-entry-points.d.mts +1 -1
  39. package/dist/utilities/get-entry-points.d.ts +1 -1
  40. package/dist/utilities/get-entry-points.js +3 -3
  41. package/dist/utilities/get-entry-points.mjs +2 -2
  42. package/dist/utilities/get-env.d.mts +1 -1
  43. package/dist/utilities/get-env.d.ts +1 -1
  44. package/dist/utilities/index.d.mts +1 -1
  45. package/dist/utilities/index.d.ts +1 -1
  46. package/dist/utilities/index.js +7 -7
  47. package/dist/utilities/index.mjs +7 -7
  48. package/dist/utilities/read-nx-config.js +3 -3
  49. package/dist/utilities/read-nx-config.mjs +2 -2
  50. package/package.json +1 -1
  51. package/dist/chunk-D7IEQ7P2.js +0 -93
@@ -116,61 +116,6 @@ var LogLevelLabel = {
116
116
  ALL: "all"
117
117
  };
118
118
 
119
- // ../config-tools/src/logger/get-log-level.ts
120
- var getLogLevel = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (label) => {
121
- switch (label) {
122
- case "all":
123
- return LogLevel.ALL;
124
- case "trace":
125
- return LogLevel.TRACE;
126
- case "debug":
127
- return LogLevel.DEBUG;
128
- case "info":
129
- return LogLevel.INFO;
130
- case "warn":
131
- return LogLevel.WARN;
132
- case "error":
133
- return LogLevel.ERROR;
134
- case "fatal":
135
- return LogLevel.FATAL;
136
- case "silent":
137
- return LogLevel.SILENT;
138
- default:
139
- return LogLevel.INFO;
140
- }
141
- }, "getLogLevel");
142
- var getLogLevelLabel = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (logLevel = LogLevel.INFO) => {
143
- if (logLevel >= LogLevel.ALL) {
144
- return LogLevelLabel.ALL;
145
- }
146
- if (logLevel >= LogLevel.TRACE) {
147
- return LogLevelLabel.TRACE;
148
- }
149
- if (logLevel >= LogLevel.DEBUG) {
150
- return LogLevelLabel.DEBUG;
151
- }
152
- if (logLevel >= LogLevel.INFO) {
153
- return LogLevelLabel.INFO;
154
- }
155
- if (logLevel >= LogLevel.WARN) {
156
- return LogLevelLabel.WARN;
157
- }
158
- if (logLevel >= LogLevel.ERROR) {
159
- return LogLevelLabel.ERROR;
160
- }
161
- if (logLevel >= LogLevel.FATAL) {
162
- return LogLevelLabel.FATAL;
163
- }
164
- if (logLevel <= LogLevel.SILENT) {
165
- return LogLevelLabel.SILENT;
166
- }
167
- return LogLevelLabel.INFO;
168
- }, "getLogLevelLabel");
169
- var isVerbose = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (label = LogLevelLabel.SILENT) => {
170
- const logLevel = typeof label === "string" ? getLogLevel(label) : label;
171
- return logLevel >= LogLevel.DEBUG;
172
- }, "isVerbose");
173
-
174
119
  // ../config/src/constants.ts
175
120
  var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
176
121
  var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
@@ -260,6 +205,8 @@ var ColorConfigMapSchema = _zod2.default.union([
260
205
  }),
261
206
  _zod2.default.record(_zod2.default.string(), ColorConfigSchema)
262
207
  ]);
208
+ var ExtendsItemSchema = _zod2.default.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
209
+ var ExtendsSchema = ExtendsItemSchema.or(_zod2.default.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
263
210
  var WorkspaceBotConfigSchema = _zod2.default.object({
264
211
  name: _zod2.default.string().trim().default("Stormie-Bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
265
212
  email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
@@ -274,11 +221,11 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
274
221
  }).describe("Various directories used by the workspace to store data, cache, and configuration files");
275
222
  var StormConfigSchema = _zod2.default.object({
276
223
  $schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
277
- extends: _zod2.default.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),
224
+ extends: ExtendsSchema.optional(),
278
225
  name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
279
226
  namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
280
227
  organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
281
- repository: _zod2.default.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
228
+ repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
282
229
  license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
283
230
  homepage: _zod2.default.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
284
231
  docs: _zod2.default.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
@@ -342,6 +289,7 @@ var COLOR_KEYS = [
342
289
 
343
290
  // ../config-tools/src/utilities/get-default-config.ts
344
291
 
292
+ var _promises = require('fs/promises');
345
293
 
346
294
  var DEFAULT_COLOR_CONFIG = {
347
295
  "light": {
@@ -371,17 +319,15 @@ var DEFAULT_COLOR_CONFIG = {
371
319
  "negative": "#dc2626"
372
320
  }
373
321
  };
374
- var getDefaultConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (root) => {
322
+ var getDefaultConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (root) => {
375
323
  let license = STORM_DEFAULT_LICENSE;
376
324
  let homepage = STORM_DEFAULT_HOMEPAGE;
377
- let name;
378
- let namespace;
379
- let repository;
325
+ let name = void 0;
326
+ let namespace = void 0;
327
+ let repository = void 0;
380
328
  const workspaceRoot = findWorkspaceRoot(root);
381
329
  if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
382
- const file = _fs.readFileSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"), {
383
- encoding: "utf8"
384
- });
330
+ const file = await _promises.readFile.call(void 0, joinPaths(workspaceRoot, "package.json"), "utf8");
385
331
  if (file) {
386
332
  const packageJson = JSON.parse(file);
387
333
  if (packageJson.name) {
@@ -390,8 +336,12 @@ var getDefaultConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (roo
390
336
  if (packageJson.namespace) {
391
337
  namespace = packageJson.namespace;
392
338
  }
393
- if (_optionalChain([packageJson, 'access', _2 => _2.repository, 'optionalAccess', _3 => _3.url])) {
394
- repository = _optionalChain([packageJson, 'access', _4 => _4.repository, 'optionalAccess', _5 => _5.url]);
339
+ if (packageJson.repository) {
340
+ if (typeof packageJson.repository === "string") {
341
+ repository = packageJson.repository;
342
+ } else if (packageJson.repository.url) {
343
+ repository = packageJson.repository.url;
344
+ }
395
345
  }
396
346
  if (packageJson.license) {
397
347
  license = packageJson.license;
@@ -436,7 +386,7 @@ var chalkDefault = {
436
386
  };
437
387
  var getChalk = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, () => {
438
388
  let _chalk = _chalk3.default;
439
- if (!_optionalChain([_chalk, 'optionalAccess', _6 => _6.hex]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.bold, 'optionalAccess', _8 => _8.hex]) || !_optionalChain([_chalk, 'optionalAccess', _9 => _9.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _10 => _10.whiteBright])) {
389
+ if (!_optionalChain([_chalk, 'optionalAccess', _2 => _2.hex]) || !_optionalChain([_chalk, 'optionalAccess', _3 => _3.bold, 'optionalAccess', _4 => _4.hex]) || !_optionalChain([_chalk, 'optionalAccess', _5 => _5.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _6 => _6.whiteBright])) {
440
390
  _chalk = chalkDefault;
441
391
  }
442
392
  return _chalk;
@@ -475,9 +425,60 @@ var formatTimestamp = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (date
475
425
  return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
476
426
  }, "formatTimestamp");
477
427
 
428
+ // ../config-tools/src/logger/get-log-level.ts
429
+ var getLogLevel = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (label) => {
430
+ switch (label) {
431
+ case "all":
432
+ return LogLevel.ALL;
433
+ case "trace":
434
+ return LogLevel.TRACE;
435
+ case "debug":
436
+ return LogLevel.DEBUG;
437
+ case "info":
438
+ return LogLevel.INFO;
439
+ case "warn":
440
+ return LogLevel.WARN;
441
+ case "error":
442
+ return LogLevel.ERROR;
443
+ case "fatal":
444
+ return LogLevel.FATAL;
445
+ case "silent":
446
+ return LogLevel.SILENT;
447
+ default:
448
+ return LogLevel.INFO;
449
+ }
450
+ }, "getLogLevel");
451
+ var getLogLevelLabel = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (logLevel = LogLevel.INFO) => {
452
+ if (logLevel >= LogLevel.ALL) {
453
+ return LogLevelLabel.ALL;
454
+ }
455
+ if (logLevel >= LogLevel.TRACE) {
456
+ return LogLevelLabel.TRACE;
457
+ }
458
+ if (logLevel >= LogLevel.DEBUG) {
459
+ return LogLevelLabel.DEBUG;
460
+ }
461
+ if (logLevel >= LogLevel.INFO) {
462
+ return LogLevelLabel.INFO;
463
+ }
464
+ if (logLevel >= LogLevel.WARN) {
465
+ return LogLevelLabel.WARN;
466
+ }
467
+ if (logLevel >= LogLevel.ERROR) {
468
+ return LogLevelLabel.ERROR;
469
+ }
470
+ if (logLevel >= LogLevel.FATAL) {
471
+ return LogLevelLabel.FATAL;
472
+ }
473
+ if (logLevel <= LogLevel.SILENT) {
474
+ return LogLevelLabel.SILENT;
475
+ }
476
+ return LogLevelLabel.INFO;
477
+ }, "getLogLevelLabel");
478
+
478
479
  // ../config-tools/src/logger/console.ts
479
480
  var getLogFn = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
480
- const colors = !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12.dark]) && !_optionalChain([config, 'access', _13 => _13.colors, 'optionalAccess', _14 => _14["base"]]) && !_optionalChain([config, 'access', _15 => _15.colors, 'optionalAccess', _16 => _16["base"], 'optionalAccess', _17 => _17.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _18 => _18.colors, 'optionalAccess', _19 => _19.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _20 => _20.colors, 'optionalAccess', _21 => _21["base"], 'optionalAccess', _22 => _22.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _23 => _23.colors, 'optionalAccess', _24 => _24["base"]]) ? _optionalChain([config, 'access', _25 => _25.colors, 'optionalAccess', _26 => _26["base"]]) : DEFAULT_COLOR_CONFIG;
481
+ const colors = !_optionalChain([config, 'access', _7 => _7.colors, 'optionalAccess', _8 => _8.dark]) && !_optionalChain([config, 'access', _9 => _9.colors, 'optionalAccess', _10 => _10["base"]]) && !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12["base"], 'optionalAccess', _13 => _13.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"], 'optionalAccess', _18 => _18.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _19 => _19.colors, 'optionalAccess', _20 => _20["base"]]) ? _optionalChain([config, 'access', _21 => _21.colors, 'optionalAccess', _22 => _22["base"]]) : DEFAULT_COLOR_CONFIG;
481
482
  const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
482
483
  if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
483
484
  return (_) => {
@@ -542,7 +543,6 @@ var writeWarning = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (message
542
543
  var writeInfo = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.INFO, config)(message), "writeInfo");
543
544
  var writeDebug = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
544
545
  var writeTrace = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
545
- var writeSystem = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ALL, config)(message), "writeSystem");
546
546
  var MAX_DEPTH = 4;
547
547
  var formatLogMessage = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (message, options = {}, depth2 = 0) => {
548
548
  if (depth2 > MAX_DEPTH) {
@@ -562,7 +562,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${pre
562
562
  }, "formatLogMessage");
563
563
  var _isFunction = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (value) => {
564
564
  try {
565
- return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _27 => _27.constructor]) && _optionalChain([value, 'optionalAccess', _28 => _28.call]) && _optionalChain([value, 'optionalAccess', _29 => _29.apply]));
565
+ return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _23 => _23.constructor]) && _optionalChain([value, 'optionalAccess', _24 => _24.call]) && _optionalChain([value, 'optionalAccess', _25 => _25.apply]));
566
566
  } catch (e) {
567
567
  return false;
568
568
  }
@@ -586,5 +586,4 @@ var _isFunction = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (value) =
586
586
 
587
587
 
588
588
 
589
-
590
- exports.LogLevel = LogLevel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.COLOR_KEYS = COLOR_KEYS; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.findWorkspaceRoot = findWorkspaceRoot; exports.getDefaultConfig = getDefaultConfig; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.isVerbose = isVerbose; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.writeSystem = writeSystem; exports.formatLogMessage = formatLogMessage;
589
+ exports.LogLevel = LogLevel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.StormConfigSchema = StormConfigSchema; exports.COLOR_KEYS = COLOR_KEYS; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.findWorkspaceRoot = findWorkspaceRoot; exports.getDefaultConfig = getDefaultConfig; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.formatLogMessage = formatLogMessage;
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunk275E2SADjs = require('./chunk-275E2SAD.js');
3
+ var _chunkDNAOERFDjs = require('./chunk-DNAOERFD.js');
4
4
 
5
5
 
6
6
  var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
@@ -25,8 +25,8 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
25
25
  return {
26
26
  name: `storm:ts-resolve`,
27
27
  async resolveId(source, importer) {
28
- _chunk275E2SADjs.writeDebug.call(void 0, `ts-resolve - resolveId source: ${source}`);
29
- _chunk275E2SADjs.writeDebug.call(void 0, `ts-resolve - resolveId importer: ${importer}`);
28
+ _chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - resolveId source: ${source}`);
29
+ _chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - resolveId importer: ${importer}`);
30
30
  if (!importer) {
31
31
  return null;
32
32
  }
@@ -37,7 +37,7 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
37
37
  return false;
38
38
  }
39
39
  if (ignore && ignore(source, importer)) {
40
- _chunk275E2SADjs.writeDebug.call(void 0, `ts-resolve - ignored ${source}`);
40
+ _chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - ignored ${source}`);
41
41
  return null;
42
42
  }
43
43
  if (resolveOnly) {
@@ -46,12 +46,12 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
46
46
  return v.test(source);
47
47
  });
48
48
  if (!shouldResolve) {
49
- _chunk275E2SADjs.writeDebug.call(void 0, `ts-resolve - skipped by matching resolveOnly ${source}`);
49
+ _chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - skipped by matching resolveOnly ${source}`);
50
50
  return null;
51
51
  }
52
52
  }
53
53
  if (_path2.default.isAbsolute(source)) {
54
- _chunk275E2SADjs.writeDebug.call(void 0, `ts-resolve - skipped absolute path: ${source}`);
54
+ _chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - skipped absolute path: ${source}`);
55
55
  return null;
56
56
  }
57
57
  const basedir = importer ? await _fs2.default.promises.realpath(_path2.default.dirname(importer)) : process.cwd();
@@ -83,10 +83,10 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
83
83
  });
84
84
  }
85
85
  if (id) {
86
- _chunk275E2SADjs.writeDebug.call(void 0, `ts-resolve - resolved ${source} to ${id}`);
86
+ _chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - resolved ${source} to ${id}`);
87
87
  return id;
88
88
  }
89
- _chunk275E2SADjs.writeDebug.call(void 0, `ts-resolve - mark ${source} as external`);
89
+ _chunkDNAOERFDjs.writeDebug.call(void 0, `ts-resolve - mark ${source} as external`);
90
90
  return false;
91
91
  }
92
92
  };
@@ -116,61 +116,6 @@ var LogLevelLabel = {
116
116
  ALL: "all"
117
117
  };
118
118
 
119
- // ../config-tools/src/logger/get-log-level.ts
120
- var getLogLevel = /* @__PURE__ */ __name((label) => {
121
- switch (label) {
122
- case "all":
123
- return LogLevel.ALL;
124
- case "trace":
125
- return LogLevel.TRACE;
126
- case "debug":
127
- return LogLevel.DEBUG;
128
- case "info":
129
- return LogLevel.INFO;
130
- case "warn":
131
- return LogLevel.WARN;
132
- case "error":
133
- return LogLevel.ERROR;
134
- case "fatal":
135
- return LogLevel.FATAL;
136
- case "silent":
137
- return LogLevel.SILENT;
138
- default:
139
- return LogLevel.INFO;
140
- }
141
- }, "getLogLevel");
142
- var getLogLevelLabel = /* @__PURE__ */ __name((logLevel = LogLevel.INFO) => {
143
- if (logLevel >= LogLevel.ALL) {
144
- return LogLevelLabel.ALL;
145
- }
146
- if (logLevel >= LogLevel.TRACE) {
147
- return LogLevelLabel.TRACE;
148
- }
149
- if (logLevel >= LogLevel.DEBUG) {
150
- return LogLevelLabel.DEBUG;
151
- }
152
- if (logLevel >= LogLevel.INFO) {
153
- return LogLevelLabel.INFO;
154
- }
155
- if (logLevel >= LogLevel.WARN) {
156
- return LogLevelLabel.WARN;
157
- }
158
- if (logLevel >= LogLevel.ERROR) {
159
- return LogLevelLabel.ERROR;
160
- }
161
- if (logLevel >= LogLevel.FATAL) {
162
- return LogLevelLabel.FATAL;
163
- }
164
- if (logLevel <= LogLevel.SILENT) {
165
- return LogLevelLabel.SILENT;
166
- }
167
- return LogLevelLabel.INFO;
168
- }, "getLogLevelLabel");
169
- var isVerbose = /* @__PURE__ */ __name((label = LogLevelLabel.SILENT) => {
170
- const logLevel = typeof label === "string" ? getLogLevel(label) : label;
171
- return logLevel >= LogLevel.DEBUG;
172
- }, "isVerbose");
173
-
174
119
  // ../config/src/constants.ts
175
120
  var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
176
121
  var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
@@ -260,6 +205,8 @@ var ColorConfigMapSchema = z.union([
260
205
  }),
261
206
  z.record(z.string(), ColorConfigSchema)
262
207
  ]);
208
+ var ExtendsItemSchema = z.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
209
+ var ExtendsSchema = ExtendsItemSchema.or(z.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
263
210
  var WorkspaceBotConfigSchema = z.object({
264
211
  name: z.string().trim().default("Stormie-Bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
265
212
  email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
@@ -274,11 +221,11 @@ var WorkspaceDirectoryConfigSchema = z.object({
274
221
  }).describe("Various directories used by the workspace to store data, cache, and configuration files");
275
222
  var StormConfigSchema = z.object({
276
223
  $schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
277
- extends: z.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),
224
+ extends: ExtendsSchema.optional(),
278
225
  name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
279
226
  namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
280
227
  organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
281
- repository: z.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
228
+ repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
282
229
  license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
283
230
  homepage: z.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
284
231
  docs: z.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
@@ -341,7 +288,8 @@ var COLOR_KEYS = [
341
288
  ];
342
289
 
343
290
  // ../config-tools/src/utilities/get-default-config.ts
344
- import { existsSync as existsSync2, readFileSync } from "node:fs";
291
+ import { existsSync as existsSync2 } from "node:fs";
292
+ import { readFile } from "node:fs/promises";
345
293
  import { join as join2 } from "node:path";
346
294
  var DEFAULT_COLOR_CONFIG = {
347
295
  "light": {
@@ -371,17 +319,15 @@ var DEFAULT_COLOR_CONFIG = {
371
319
  "negative": "#dc2626"
372
320
  }
373
321
  };
374
- var getDefaultConfig = /* @__PURE__ */ __name((root) => {
322
+ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
375
323
  let license = STORM_DEFAULT_LICENSE;
376
324
  let homepage = STORM_DEFAULT_HOMEPAGE;
377
- let name;
378
- let namespace;
379
- let repository;
325
+ let name = void 0;
326
+ let namespace = void 0;
327
+ let repository = void 0;
380
328
  const workspaceRoot = findWorkspaceRoot(root);
381
329
  if (existsSync2(join2(workspaceRoot, "package.json"))) {
382
- const file = readFileSync(join2(workspaceRoot, "package.json"), {
383
- encoding: "utf8"
384
- });
330
+ const file = await readFile(joinPaths(workspaceRoot, "package.json"), "utf8");
385
331
  if (file) {
386
332
  const packageJson = JSON.parse(file);
387
333
  if (packageJson.name) {
@@ -390,8 +336,12 @@ var getDefaultConfig = /* @__PURE__ */ __name((root) => {
390
336
  if (packageJson.namespace) {
391
337
  namespace = packageJson.namespace;
392
338
  }
393
- if (packageJson.repository?.url) {
394
- repository = packageJson.repository?.url;
339
+ if (packageJson.repository) {
340
+ if (typeof packageJson.repository === "string") {
341
+ repository = packageJson.repository;
342
+ } else if (packageJson.repository.url) {
343
+ repository = packageJson.repository.url;
344
+ }
395
345
  }
396
346
  if (packageJson.license) {
397
347
  license = packageJson.license;
@@ -475,6 +425,57 @@ var formatTimestamp = /* @__PURE__ */ __name((date = /* @__PURE__ */ new Date())
475
425
  return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
476
426
  }, "formatTimestamp");
477
427
 
428
+ // ../config-tools/src/logger/get-log-level.ts
429
+ var getLogLevel = /* @__PURE__ */ __name((label) => {
430
+ switch (label) {
431
+ case "all":
432
+ return LogLevel.ALL;
433
+ case "trace":
434
+ return LogLevel.TRACE;
435
+ case "debug":
436
+ return LogLevel.DEBUG;
437
+ case "info":
438
+ return LogLevel.INFO;
439
+ case "warn":
440
+ return LogLevel.WARN;
441
+ case "error":
442
+ return LogLevel.ERROR;
443
+ case "fatal":
444
+ return LogLevel.FATAL;
445
+ case "silent":
446
+ return LogLevel.SILENT;
447
+ default:
448
+ return LogLevel.INFO;
449
+ }
450
+ }, "getLogLevel");
451
+ var getLogLevelLabel = /* @__PURE__ */ __name((logLevel = LogLevel.INFO) => {
452
+ if (logLevel >= LogLevel.ALL) {
453
+ return LogLevelLabel.ALL;
454
+ }
455
+ if (logLevel >= LogLevel.TRACE) {
456
+ return LogLevelLabel.TRACE;
457
+ }
458
+ if (logLevel >= LogLevel.DEBUG) {
459
+ return LogLevelLabel.DEBUG;
460
+ }
461
+ if (logLevel >= LogLevel.INFO) {
462
+ return LogLevelLabel.INFO;
463
+ }
464
+ if (logLevel >= LogLevel.WARN) {
465
+ return LogLevelLabel.WARN;
466
+ }
467
+ if (logLevel >= LogLevel.ERROR) {
468
+ return LogLevelLabel.ERROR;
469
+ }
470
+ if (logLevel >= LogLevel.FATAL) {
471
+ return LogLevelLabel.FATAL;
472
+ }
473
+ if (logLevel <= LogLevel.SILENT) {
474
+ return LogLevelLabel.SILENT;
475
+ }
476
+ return LogLevelLabel.INFO;
477
+ }, "getLogLevelLabel");
478
+
478
479
  // ../config-tools/src/logger/console.ts
479
480
  var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
480
481
  const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
@@ -542,7 +543,6 @@ var writeWarning = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel
542
543
  var writeInfo = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.INFO, config)(message), "writeInfo");
543
544
  var writeDebug = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
544
545
  var writeTrace = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
545
- var writeSystem = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.ALL, config)(message), "writeSystem");
546
546
  var MAX_DEPTH = 4;
547
547
  var formatLogMessage = /* @__PURE__ */ __name((message, options = {}, depth2 = 0) => {
548
548
  if (depth2 > MAX_DEPTH) {
@@ -573,6 +573,7 @@ export {
573
573
  STORM_DEFAULT_DOCS,
574
574
  STORM_DEFAULT_HOMEPAGE,
575
575
  STORM_DEFAULT_LICENSING,
576
+ StormConfigSchema,
576
577
  COLOR_KEYS,
577
578
  correctPaths,
578
579
  joinPaths,
@@ -580,11 +581,9 @@ export {
580
581
  getDefaultConfig,
581
582
  getLogLevel,
582
583
  getLogLevelLabel,
583
- isVerbose,
584
584
  writeWarning,
585
585
  writeInfo,
586
586
  writeDebug,
587
587
  writeTrace,
588
- writeSystem,
589
588
  formatLogMessage
590
589
  };
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunk275E2SADjs = require('./chunk-275E2SAD.js');
6
+ var _chunkDNAOERFDjs = require('./chunk-DNAOERFD.js');
7
7
 
8
8
 
9
9
  var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
@@ -11,7 +11,7 @@ var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
11
11
  // src/utilities/get-entry-points.ts
12
12
  var _glob = require('glob');
13
13
  var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
14
- const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk275E2SADjs.findWorkspaceRoot.call(void 0, );
14
+ const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkDNAOERFDjs.findWorkspaceRoot.call(void 0, );
15
15
  const entryPoints = [];
16
16
  if (entry) {
17
17
  if (Array.isArray(entry)) {
@@ -23,7 +23,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async
23
23
  }
24
24
  }
25
25
  if (emitOnAll) {
26
- entryPoints.push(_chunk275E2SADjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
26
+ entryPoints.push(_chunkDNAOERFDjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
27
27
  }
28
28
  const results = [];
29
29
  for (const entryPoint in entryPoints) {
@@ -32,9 +32,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async
32
32
  withFileTypes: true
33
33
  });
34
34
  results.push(...files.reduce((ret, filePath) => {
35
- const result = _chunk275E2SADjs.correctPaths.call(void 0, _chunk275E2SADjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunk275E2SADjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunk275E2SADjs.correctPaths.call(void 0, projectRoot), ""));
35
+ const result = _chunkDNAOERFDjs.correctPaths.call(void 0, _chunkDNAOERFDjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkDNAOERFDjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkDNAOERFDjs.correctPaths.call(void 0, projectRoot), ""));
36
36
  if (result) {
37
- _chunk275E2SADjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunk275E2SADjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
37
+ _chunkDNAOERFDjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkDNAOERFDjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
38
38
  if (!results.includes(result)) {
39
39
  results.push(result);
40
40
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeInfo
3
- } from "./chunk-DRXCFXBB.mjs";
3
+ } from "./chunk-E6JPW774.mjs";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-O6YSETKJ.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeDebug
3
- } from "./chunk-DRXCFXBB.mjs";
3
+ } from "./chunk-E6JPW774.mjs";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-O6YSETKJ.mjs";
@@ -2,7 +2,7 @@ import {
2
2
  findWorkspaceRoot,
3
3
  joinPaths,
4
4
  writeTrace
5
- } from "./chunk-DRXCFXBB.mjs";
5
+ } from "./chunk-E6JPW774.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-O6YSETKJ.mjs";
@@ -0,0 +1,67 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+
4
+
5
+ var _chunkDNAOERFDjs = require('./chunk-DNAOERFD.js');
6
+
7
+
8
+ var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
9
+
10
+ // src/utilities/copy-assets.ts
11
+ var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
12
+ var _glob = require('glob');
13
+ var _promises = require('fs/promises');
14
+ var copyAssets = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson = true, includeSrc = false, banner, footer) => {
15
+ const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
16
+ pendingAssets.push({
17
+ input: projectRoot,
18
+ glob: "*.md",
19
+ output: "."
20
+ });
21
+ pendingAssets.push({
22
+ input: ".",
23
+ glob: "LICENSE",
24
+ output: "."
25
+ });
26
+ if (generatePackageJson === false) {
27
+ pendingAssets.push({
28
+ input: projectRoot,
29
+ glob: "package.json",
30
+ output: "."
31
+ });
32
+ }
33
+ if (includeSrc === true) {
34
+ pendingAssets.push({
35
+ input: sourceRoot,
36
+ glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
37
+ output: "src/"
38
+ });
39
+ }
40
+ _chunkDNAOERFDjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
41
+ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkDNAOERFDjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
42
+ const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
43
+ projectDir: projectRoot,
44
+ rootDir: config.workspaceRoot,
45
+ outputDir: outputPath,
46
+ assets: pendingAssets
47
+ });
48
+ await assetHandler.processAllAssetsOnce();
49
+ if (includeSrc === true) {
50
+ _chunkDNAOERFDjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkDNAOERFDjs.joinPaths.call(void 0, outputPath, "src")}`, config);
51
+ const files = await _glob.glob.call(void 0, [
52
+ _chunkDNAOERFDjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
53
+ _chunkDNAOERFDjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
54
+ _chunkDNAOERFDjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
55
+ _chunkDNAOERFDjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
56
+ ]);
57
+ await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
58
+
59
+ ${await _promises.readFile.call(void 0, file, "utf8")}
60
+
61
+ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
62
+ }
63
+ }, "copyAssets");
64
+
65
+
66
+
67
+ exports.copyAssets = copyAssets;