@storm-software/unbuild 0.22.0 → 0.23.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.
@@ -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 _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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 _chunk4WKFVYTIjs = require('./chunk-4WKFVYTI.js');
3
+ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
4
4
 
5
5
  // ../config-tools/src/types.ts
6
6
  var LogLevel = {
@@ -28,7 +28,7 @@ var LogLevelLabel = {
28
28
 
29
29
  // ../config-tools/src/utilities/correct-paths.ts
30
30
  var _devkit = require('@nx/devkit');
31
- var correctPaths = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (path) => {
31
+ var correctPaths = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (path) => {
32
32
  if (!path) {
33
33
  return "";
34
34
  }
@@ -37,7 +37,7 @@ var correctPaths = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (path) =
37
37
  }
38
38
  return path.replaceAll("\\", "/");
39
39
  }, "correctPaths");
40
- var joinPaths = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (...paths) => {
40
+ var joinPaths = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (...paths) => {
41
41
  if (!paths || paths.length === 0) {
42
42
  return "";
43
43
  }
@@ -45,7 +45,7 @@ var joinPaths = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (...paths)
45
45
  }, "joinPaths");
46
46
 
47
47
  // ../config-tools/src/logger/get-log-level.ts
48
- var getLogLevel = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (label) => {
48
+ var getLogLevel = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (label) => {
49
49
  switch (label) {
50
50
  case "all":
51
51
  return LogLevel.ALL;
@@ -67,7 +67,7 @@ var getLogLevel = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (label) =
67
67
  return LogLevel.INFO;
68
68
  }
69
69
  }, "getLogLevel");
70
- var getLogLevelLabel = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (logLevel = LogLevel.INFO) => {
70
+ var getLogLevelLabel = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (logLevel = LogLevel.INFO) => {
71
71
  if (logLevel >= LogLevel.ALL) {
72
72
  return LogLevelLabel.ALL;
73
73
  }
@@ -94,7 +94,7 @@ var getLogLevelLabel = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (log
94
94
  }
95
95
  return LogLevelLabel.INFO;
96
96
  }, "getLogLevelLabel");
97
- var isVerbose = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (label = LogLevelLabel.SILENT) => {
97
+ var isVerbose = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (label = LogLevelLabel.SILENT) => {
98
98
  const logLevel = typeof label === "string" ? getLogLevel(label) : label;
99
99
  return logLevel >= LogLevel.DEBUG;
100
100
  }, "isVerbose");
@@ -288,7 +288,7 @@ function findFolderUp(startPath, endFileNames) {
288
288
  }
289
289
  return void 0;
290
290
  }
291
- _chunk4WKFVYTIjs.__name.call(void 0, findFolderUp, "findFolderUp");
291
+ _chunk3GQAWCBQjs.__name.call(void 0, findFolderUp, "findFolderUp");
292
292
 
293
293
  // ../config-tools/src/utilities/find-workspace-root.ts
294
294
  var rootFiles = [
@@ -332,7 +332,7 @@ function findWorkspaceRootSafe(pathInsideMonorepo) {
332
332
  }
333
333
  return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles));
334
334
  }
335
- _chunk4WKFVYTIjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
335
+ _chunk3GQAWCBQjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
336
336
  function findWorkspaceRoot(pathInsideMonorepo) {
337
337
  const result = findWorkspaceRootSafe(pathInsideMonorepo);
338
338
  if (!result) {
@@ -342,7 +342,7 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
342
342
  }
343
343
  return result;
344
344
  }
345
- _chunk4WKFVYTIjs.__name.call(void 0, findWorkspaceRoot, "findWorkspaceRoot");
345
+ _chunk3GQAWCBQjs.__name.call(void 0, findWorkspaceRoot, "findWorkspaceRoot");
346
346
 
347
347
  // ../config-tools/src/utilities/get-default-config.ts
348
348
  var DEFAULT_COLOR_CONFIG = {
@@ -373,7 +373,7 @@ var DEFAULT_COLOR_CONFIG = {
373
373
  "negative": "#dc2626"
374
374
  }
375
375
  };
376
- var getDefaultConfig = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (root) => {
376
+ var getDefaultConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (root) => {
377
377
  let license = STORM_DEFAULT_LICENSE;
378
378
  let homepage = STORM_DEFAULT_HOMEPAGE;
379
379
  let name;
@@ -418,25 +418,25 @@ var getDefaultConfig = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (roo
418
418
  // ../config-tools/src/logger/chalk.ts
419
419
  var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
420
420
  var chalkDefault = {
421
- hex: /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (_) => (message) => message, "hex"),
422
- bgHex: /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (_) => ({
423
- whiteBright: /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message) => message, "whiteBright")
421
+ hex: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (_) => (message) => message, "hex"),
422
+ bgHex: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (_) => ({
423
+ whiteBright: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message) => message, "whiteBright")
424
424
  }), "bgHex"),
425
- whiteBright: /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message) => message, "whiteBright"),
426
- gray: /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message) => message, "gray"),
425
+ whiteBright: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message) => message, "whiteBright"),
426
+ gray: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message) => message, "gray"),
427
427
  bold: {
428
- hex: /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (_) => (message) => message, "hex"),
429
- bgHex: /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (_) => ({
430
- whiteBright: /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message) => message, "whiteBright")
428
+ hex: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (_) => (message) => message, "hex"),
429
+ bgHex: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (_) => ({
430
+ whiteBright: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message) => message, "whiteBright")
431
431
  }), "bgHex"),
432
- whiteBright: /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message) => message, "whiteBright")
432
+ whiteBright: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message) => message, "whiteBright")
433
433
  },
434
434
  dim: {
435
- hex: /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (_) => (message) => message, "hex"),
436
- gray: /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message) => message, "gray")
435
+ hex: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (_) => (message) => message, "hex"),
436
+ gray: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message) => message, "gray")
437
437
  }
438
438
  };
439
- var getChalk = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, () => {
439
+ var getChalk = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
440
440
  let _chalk = _chalk3.default;
441
441
  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])) {
442
442
  _chalk = chalkDefault;
@@ -457,10 +457,10 @@ function isUnicodeSupported() {
457
457
  env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
458
458
  TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
459
459
  }
460
- _chunk4WKFVYTIjs.__name.call(void 0, isUnicodeSupported, "isUnicodeSupported");
460
+ _chunk3GQAWCBQjs.__name.call(void 0, isUnicodeSupported, "isUnicodeSupported");
461
461
 
462
462
  // ../config-tools/src/logger/console-icons.ts
463
- var useIcon = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
463
+ var useIcon = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
464
464
  var CONSOLE_ICONS = {
465
465
  [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
466
466
  [LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
@@ -473,12 +473,12 @@ var CONSOLE_ICONS = {
473
473
  };
474
474
 
475
475
  // ../config-tools/src/logger/format-timestamp.ts
476
- var formatTimestamp = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (date = /* @__PURE__ */ new Date()) => {
476
+ var formatTimestamp = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (date = /* @__PURE__ */ new Date()) => {
477
477
  return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
478
478
  }, "formatTimestamp");
479
479
 
480
480
  // ../config-tools/src/logger/console.ts
481
- var getLogFn = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}) => {
481
+ var getLogFn = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}) => {
482
482
  const _chalk = getChalk();
483
483
  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;
484
484
  const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
@@ -534,15 +534,15 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, ()
534
534
  `);
535
535
  };
536
536
  }, "getLogFn");
537
- var writeFatal = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.FATAL, config)(message), "writeFatal");
538
- var writeError = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ERROR, config)(message), "writeError");
539
- var writeWarning = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.WARN, config)(message), "writeWarning");
540
- var writeInfo = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.INFO, config)(message), "writeInfo");
541
- var writeSuccess = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
542
- var writeDebug = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
543
- var writeTrace = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
544
- var writeSystem = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ALL, config)(message), "writeSystem");
545
- var getStopwatch = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (name) => {
537
+ var writeFatal = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.FATAL, config)(message), "writeFatal");
538
+ var writeError = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ERROR, config)(message), "writeError");
539
+ var writeWarning = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.WARN, config)(message), "writeWarning");
540
+ var writeInfo = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.INFO, config)(message), "writeInfo");
541
+ var writeSuccess = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
542
+ var writeDebug = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
543
+ var writeTrace = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
544
+ var writeSystem = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ALL, config)(message), "writeSystem");
545
+ var getStopwatch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name) => {
546
546
  const start = process.hrtime();
547
547
  return () => {
548
548
  const end = process.hrtime(start);
@@ -553,7 +553,7 @@ var getStopwatch = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (name) =
553
553
  };
554
554
  }, "getStopwatch");
555
555
  var MAX_DEPTH = 4;
556
- var formatLogMessage = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (message, options = {}, depth2 = 0) => {
556
+ var formatLogMessage = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, options = {}, depth2 = 0) => {
557
557
  if (depth2 > MAX_DEPTH) {
558
558
  return "<max depth>";
559
559
  }
@@ -569,7 +569,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${pre
569
569
  skip
570
570
  }, depth2 + 1) : message[key]}`).join("\n")}` : message;
571
571
  }, "formatLogMessage");
572
- var _isFunction = /* @__PURE__ */ _chunk4WKFVYTIjs.__name.call(void 0, (value) => {
572
+ var _isFunction = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (value) => {
573
573
  try {
574
574
  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]));
575
575
  } catch (e) {
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk4WKFVYTIjs = require('./chunk-4WKFVYTI.js');
3
+ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
4
4
 
5
5
  // src/plugins/type-definitions.ts
6
6
  var _path = require('path');
@@ -31,7 +31,7 @@ export { default } from ${relativeSourceDtsName};
31
31
  }
32
32
  };
33
33
  }
34
- _chunk4WKFVYTIjs.__name.call(void 0, typeDefinitions, "typeDefinitions");
34
+ _chunk3GQAWCBQjs.__name.call(void 0, typeDefinitions, "typeDefinitions");
35
35
 
36
36
 
37
37