@storm-software/unbuild 0.41.21 → 0.41.23

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 (40) hide show
  1. package/README.md +1 -2
  2. package/bin/unbuild.cjs +798 -412
  3. package/bin/unbuild.js +826 -420
  4. package/dist/build.cjs +8 -8
  5. package/dist/build.js +7 -7
  6. package/dist/{chunk-3GQAWCBQ.js → chunk-3RG5ZIWI.js} +0 -3
  7. package/dist/{chunk-HZNOKNKE.js → chunk-4KHUAP4R.js} +13 -10
  8. package/dist/{chunk-BFBEOACU.cjs → chunk-ALGMIE4E.cjs} +471 -257
  9. package/dist/{chunk-5FQ2QYFQ.js → chunk-ATN45QRM.js} +418 -204
  10. package/dist/{chunk-F4MPFQDI.cjs → chunk-FAW45G3E.cjs} +13 -10
  11. package/dist/{chunk-3BXXHK3F.cjs → chunk-MO3MUSJO.cjs} +7 -15
  12. package/dist/chunk-OBGZSXTJ.cjs +10 -0
  13. package/dist/{chunk-DUDE4LYM.js → chunk-PCGRQKDH.js} +2 -10
  14. package/dist/{chunk-PWE7CANF.cjs → chunk-Q2G4VMOW.cjs} +198 -130
  15. package/dist/{chunk-ITHOVA3D.cjs → chunk-Q3NBYYR4.cjs} +4 -12
  16. package/dist/{chunk-ZB2JWLJS.cjs → chunk-Q4VUCJPK.cjs} +51 -16
  17. package/dist/chunk-WQLDD6CA.js +106 -0
  18. package/dist/{chunk-3BDIPKMO.js → chunk-XQLLOGJZ.js} +197 -129
  19. package/dist/{chunk-SMAV5VSP.js → chunk-XWLZOFQ4.js} +6 -14
  20. package/dist/clean.cjs +4 -4
  21. package/dist/clean.js +3 -3
  22. package/dist/index.cjs +9 -9
  23. package/dist/index.js +8 -8
  24. package/dist/plugins/analyze.cjs +4 -4
  25. package/dist/plugins/analyze.js +3 -3
  26. package/dist/plugins/on-error.cjs +4 -4
  27. package/dist/plugins/on-error.js +3 -3
  28. package/dist/plugins/swc.cjs +5 -8
  29. package/dist/plugins/swc.js +4 -7
  30. package/dist/plugins/tsc.cjs +4 -4
  31. package/dist/plugins/tsc.js +3 -3
  32. package/dist/plugins/type-definitions.cjs +9 -6
  33. package/dist/plugins/type-definitions.js +9 -6
  34. package/dist/types.cjs +1 -1
  35. package/dist/types.js +1 -1
  36. package/package.json +1 -1
  37. package/dist/chunk-BGYQAVKQ.cjs +0 -13
  38. package/dist/chunk-XXRSY6EE.js +0 -71
  39. /package/dist/{chunk-OULCUN6I.js → chunk-GGNOJ77I.js} +0 -0
  40. /package/dist/{chunk-ORA4UQMU.cjs → chunk-SFZRYJZ2.cjs} +0 -0
@@ -1,8 +1,4 @@
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
-
3
- var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
4
-
5
- // ../config-tools/src/types.ts
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; }// ../config-tools/src/types.ts
6
2
  var LogLevel = {
7
3
  SILENT: 0,
8
4
  FATAL: 10,
@@ -34,11 +30,10 @@ function normalizeWindowsPath(input = "") {
34
30
  }
35
31
  return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
36
32
  }
37
- _chunkBGYQAVKQcjs.__name.call(void 0, normalizeWindowsPath, "normalizeWindowsPath");
38
33
  var _UNC_REGEX = /^[/\\]{2}/;
39
34
  var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
40
35
  var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
41
- var correctPaths = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, function(path) {
36
+ var correctPaths = function(path) {
42
37
  if (!path || path.length === 0) {
43
38
  return ".";
44
39
  }
@@ -66,8 +61,8 @@ var correctPaths = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, functio
66
61
  return `//${path}`;
67
62
  }
68
63
  return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
69
- }, "correctPaths");
70
- var joinPaths = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, function(...segments) {
64
+ };
65
+ var joinPaths = function(...segments) {
71
66
  let path = "";
72
67
  for (const seg of segments) {
73
68
  if (!seg) {
@@ -87,7 +82,7 @@ var joinPaths = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, function(.
87
82
  }
88
83
  }
89
84
  return correctPaths(path);
90
- }, "joinPaths");
85
+ };
91
86
  function normalizeString(path, allowAboveRoot) {
92
87
  let res = "";
93
88
  let lastSegmentLength = 0;
@@ -148,13 +143,12 @@ function normalizeString(path, allowAboveRoot) {
148
143
  }
149
144
  return res;
150
145
  }
151
- _chunkBGYQAVKQcjs.__name.call(void 0, normalizeString, "normalizeString");
152
- var isAbsolute = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, function(p) {
146
+ var isAbsolute = function(p) {
153
147
  return _IS_ABSOLUTE_RE.test(p);
154
- }, "isAbsolute");
148
+ };
155
149
 
156
150
  // ../config-tools/src/logger/get-log-level.ts
157
- var getLogLevel = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (label) => {
151
+ var getLogLevel = (label) => {
158
152
  switch (label) {
159
153
  case "all":
160
154
  return LogLevel.ALL;
@@ -175,8 +169,8 @@ var getLogLevel = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (label)
175
169
  default:
176
170
  return LogLevel.INFO;
177
171
  }
178
- }, "getLogLevel");
179
- var getLogLevelLabel = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (logLevel = LogLevel.INFO) => {
172
+ };
173
+ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
180
174
  if (logLevel >= LogLevel.ALL) {
181
175
  return LogLevelLabel.ALL;
182
176
  }
@@ -202,11 +196,11 @@ var getLogLevelLabel = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (lo
202
196
  return LogLevelLabel.SILENT;
203
197
  }
204
198
  return LogLevelLabel.INFO;
205
- }, "getLogLevelLabel");
206
- var isVerbose = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (label = LogLevelLabel.SILENT) => {
199
+ };
200
+ var isVerbose = (label = LogLevelLabel.SILENT) => {
207
201
  const logLevel = typeof label === "string" ? getLogLevel(label) : label;
208
202
  return logLevel >= LogLevel.DEBUG;
209
- }, "isVerbose");
203
+ };
210
204
 
211
205
  // ../config/src/constants.ts
212
206
  var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
@@ -306,23 +300,39 @@ var RegistryConfigSchema = _zod2.default.object({
306
300
  cyclone: RegistryUrlConfigSchema,
307
301
  container: RegistryUrlConfigSchema
308
302
  }).default({}).describe("A list of remote registry URLs used by Storm Software");
309
- var ColorConfigSchema = SingleThemeColorConfigSchema.or(MultiThemeColorConfigSchema).describe("Colors used for various workspace elements");
303
+ var ColorConfigSchema = SingleThemeColorConfigSchema.or(
304
+ MultiThemeColorConfigSchema
305
+ ).describe("Colors used for various workspace elements");
310
306
  var ColorConfigMapSchema = _zod2.default.union([
311
- _zod2.default.object({
312
- base: ColorConfigSchema
313
- }),
307
+ _zod2.default.object({ base: ColorConfigSchema }),
314
308
  _zod2.default.record(_zod2.default.string(), ColorConfigSchema)
315
309
  ]);
316
- 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.");
317
- 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.");
310
+ var ExtendsItemSchema = _zod2.default.string().trim().describe(
311
+ "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."
312
+ );
313
+ var ExtendsSchema = ExtendsItemSchema.or(
314
+ _zod2.default.array(ExtendsItemSchema)
315
+ ).describe(
316
+ "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."
317
+ );
318
318
  var WorkspaceBotConfigSchema = _zod2.default.object({
319
- 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)"),
319
+ name: _zod2.default.string().trim().default("stormie-bot").describe(
320
+ "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
321
+ ),
320
322
  email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
321
- }).describe("The workspace's bot user's config used to automated various operations tasks");
323
+ }).describe(
324
+ "The workspace's bot user's config used to automated various operations tasks"
325
+ );
322
326
  var WorkspaceReleaseConfigSchema = _zod2.default.object({
323
- banner: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("A URL to a banner image used to display the workspace's release"),
324
- header: _zod2.default.string().trim().optional().describe("A header message appended to the start of the workspace's release notes"),
325
- footer: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe("A footer message appended to the end of the workspace's release notes")
327
+ banner: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe(
328
+ "A URL to a banner image used to display the workspace's release"
329
+ ),
330
+ header: _zod2.default.string().trim().optional().describe(
331
+ "A header message appended to the start of the workspace's release notes"
332
+ ),
333
+ footer: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe(
334
+ "A footer message appended to the end of the workspace's release notes"
335
+ )
326
336
  }).describe("The workspace's release config used during the release process");
327
337
  var WorkspaceAccountConfigSchema = _zod2.default.object({
328
338
  twitter: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_TWITTER).describe("A Twitter/X account associated with the organization/project"),
@@ -331,23 +341,41 @@ var WorkspaceAccountConfigSchema = _zod2.default.object({
331
341
  slack: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_SLACK).describe("A Slack account associated with the organization/project"),
332
342
  medium: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_MEDIUM).describe("A Medium account associated with the organization/project"),
333
343
  github: _zod2.default.string().trim().default(STORM_DEFAULT_ACCOUNT_GITHUB).describe("A GitHub account associated with the organization/project")
334
- }).describe("The workspace's account config used to store various social media links");
344
+ }).describe(
345
+ "The workspace's account config used to store various social media links"
346
+ );
335
347
  var WorkspaceDirectoryConfigSchema = _zod2.default.object({
336
- cache: _zod2.default.string().trim().optional().describe("The directory used to store the environment's cached file data"),
348
+ cache: _zod2.default.string().trim().optional().describe(
349
+ "The directory used to store the environment's cached file data"
350
+ ),
337
351
  data: _zod2.default.string().trim().optional().describe("The directory used to store the environment's data files"),
338
- config: _zod2.default.string().trim().optional().describe("The directory used to store the environment's configuration files"),
352
+ config: _zod2.default.string().trim().optional().describe(
353
+ "The directory used to store the environment's configuration files"
354
+ ),
339
355
  temp: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
340
356
  log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
341
- build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
342
- }).describe("Various directories used by the workspace to store data, cache, and configuration files");
357
+ build: _zod2.default.string().trim().default("dist").describe(
358
+ "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
359
+ )
360
+ }).describe(
361
+ "Various directories used by the workspace to store data, cache, and configuration files"
362
+ );
343
363
  var errorConfigSchema = _zod2.default.object({
344
364
  codesFile: _zod2.default.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
345
- url: _zod2.default.string().trim().url().optional().describe("A URL to a page that looks up the workspace's error messages given a specific error code")
365
+ url: _zod2.default.string().trim().url().optional().describe(
366
+ "A URL to a page that looks up the workspace's error messages given a specific error code"
367
+ )
346
368
  }).describe("The workspace's error config used during the error process");
347
369
  var stormWorkspaceConfigSchema = _zod2.default.object({
348
- $schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
370
+ $schema: _zod2.default.string().trim().default(
371
+ "https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json"
372
+ ).optional().nullish().describe(
373
+ "The URL to the JSON schema file that describes the Storm configuration file"
374
+ ),
349
375
  extends: ExtendsSchema.optional(),
350
- name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
376
+ name: _zod2.default.string().trim().toLowerCase().optional().describe(
377
+ "The name of the service/package/scope using this configuration"
378
+ ),
351
379
  namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
352
380
  organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
353
381
  repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
@@ -363,21 +391,16 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
363
391
  release: WorkspaceReleaseConfigSchema,
364
392
  account: WorkspaceAccountConfigSchema,
365
393
  error: errorConfigSchema,
366
- mode: _zod2.default.enum([
367
- "development",
368
- "staging",
369
- "production"
370
- ]).default("production").describe("The current runtime environment mode for the package"),
394
+ mode: _zod2.default.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment mode for the package"),
371
395
  workspaceRoot: _zod2.default.string().trim().describe("The root directory of the workspace"),
372
- externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
396
+ externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe(
397
+ "The build will use these package patterns to determine if they should be external to the bundle"
398
+ ),
373
399
  skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
374
400
  directories: WorkspaceDirectoryConfigSchema,
375
- packageManager: _zod2.default.enum([
376
- "npm",
377
- "yarn",
378
- "pnpm",
379
- "bun"
380
- ]).default("npm").describe("The JavaScript/TypeScript package manager used by the repository"),
401
+ packageManager: _zod2.default.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
402
+ "The JavaScript/TypeScript package manager used by the repository"
403
+ ),
381
404
  timezone: _zod2.default.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
382
405
  locale: _zod2.default.string().trim().default("en-US").describe("The default locale of the workspace"),
383
406
  logLevel: _zod2.default.enum([
@@ -390,13 +413,23 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
390
413
  "debug",
391
414
  "trace",
392
415
  "all"
393
- ]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
394
- skipConfigLogging: _zod2.default.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
416
+ ]).default("info").describe(
417
+ "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
418
+ ),
419
+ skipConfigLogging: _zod2.default.boolean().optional().describe(
420
+ "Should the logging of the current Storm Workspace configuration be skipped?"
421
+ ),
395
422
  registry: RegistryConfigSchema,
396
- configFile: _zod2.default.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
397
- colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
423
+ configFile: _zod2.default.string().trim().nullable().default(null).describe(
424
+ "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
425
+ ),
426
+ colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
427
+ "Storm theme config values used for styling various package elements"
428
+ ),
398
429
  extensions: _zod2.default.record(_zod2.default.any()).optional().default({}).describe("Configuration of each used extension")
399
- }).describe("Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo.");
430
+ }).describe(
431
+ "Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo."
432
+ );
400
433
 
401
434
  // ../config/src/types.ts
402
435
  var COLOR_KEYS = [
@@ -429,10 +462,14 @@ var MAX_PATH_SEARCH_DEPTH = 30;
429
462
  var depth = 0;
430
463
  function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
431
464
  const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
432
- if (endDirectoryNames.some((endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName)))) {
465
+ if (endDirectoryNames.some(
466
+ (endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName))
467
+ )) {
433
468
  return _startPath;
434
469
  }
435
- if (endFileNames.some((endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName)))) {
470
+ if (endFileNames.some(
471
+ (endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName))
472
+ )) {
436
473
  return _startPath;
437
474
  }
438
475
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
@@ -441,7 +478,6 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
441
478
  }
442
479
  return void 0;
443
480
  }
444
- _chunkBGYQAVKQcjs.__name.call(void 0, findFolderUp, "findFolderUp");
445
481
 
446
482
  // ../config-tools/src/utilities/find-workspace-root.ts
447
483
  var rootFiles = [
@@ -488,21 +524,31 @@ var rootDirectories = [
488
524
  ];
489
525
  function findWorkspaceRootSafe(pathInsideMonorepo) {
490
526
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
491
- return correctPaths(_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
492
- }
493
- return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles, rootDirectories));
527
+ return correctPaths(
528
+ _nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
529
+ );
530
+ }
531
+ return correctPaths(
532
+ findFolderUp(
533
+ _nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
534
+ rootFiles,
535
+ rootDirectories
536
+ )
537
+ );
494
538
  }
495
- _chunkBGYQAVKQcjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
496
539
  function findWorkspaceRoot(pathInsideMonorepo) {
497
540
  const result = findWorkspaceRootSafe(pathInsideMonorepo);
498
541
  if (!result) {
499
- throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
500
- ${rootFiles.join("\n")}
501
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
542
+ throw new Error(
543
+ `Cannot find workspace root upwards from known path. Files search list includes:
544
+ ${rootFiles.join(
545
+ "\n"
546
+ )}
547
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
548
+ );
502
549
  }
503
550
  return result;
504
551
  }
505
- _chunkBGYQAVKQcjs.__name.call(void 0, findWorkspaceRoot, "findWorkspaceRoot");
506
552
 
507
553
  // ../config-tools/src/utilities/get-default-config.ts
508
554
  var DEFAULT_COLOR_CONFIG = {
@@ -533,7 +579,7 @@ var DEFAULT_COLOR_CONFIG = {
533
579
  negative: "#dc2626"
534
580
  }
535
581
  };
536
- var getDefaultConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (root) => {
582
+ var getDefaultConfig = async (root) => {
537
583
  let license = STORM_DEFAULT_LICENSE;
538
584
  let homepage = STORM_DEFAULT_HOMEPAGE;
539
585
  let name = void 0;
@@ -541,7 +587,10 @@ var getDefaultConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, asy
541
587
  let repository = void 0;
542
588
  const workspaceRoot = findWorkspaceRoot(root);
543
589
  if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
544
- const file = await _promises.readFile.call(void 0, joinPaths(workspaceRoot, "package.json"), "utf8");
590
+ const file = await _promises.readFile.call(void 0,
591
+ joinPaths(workspaceRoot, "package.json"),
592
+ "utf8"
593
+ );
545
594
  if (file) {
546
595
  const packageJson = JSON.parse(file);
547
596
  if (packageJson.name) {
@@ -578,36 +627,36 @@ var getDefaultConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, asy
578
627
  url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
579
628
  }
580
629
  };
581
- }, "getDefaultConfig");
630
+ };
582
631
 
583
632
  // ../config-tools/src/logger/chalk.ts
584
633
  var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
585
634
  var chalkDefault = {
586
- hex: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (_) => (message) => message, "hex"),
587
- bgHex: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (_) => ({
588
- whiteBright: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message) => message, "whiteBright")
589
- }), "bgHex"),
590
- whiteBright: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message) => message, "whiteBright"),
591
- gray: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message) => message, "gray"),
635
+ hex: (_) => (message) => message,
636
+ bgHex: (_) => ({
637
+ whiteBright: (message) => message
638
+ }),
639
+ whiteBright: (message) => message,
640
+ gray: (message) => message,
592
641
  bold: {
593
- hex: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (_) => (message) => message, "hex"),
594
- bgHex: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (_) => ({
595
- whiteBright: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message) => message, "whiteBright")
596
- }), "bgHex"),
597
- whiteBright: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message) => message, "whiteBright")
642
+ hex: (_) => (message) => message,
643
+ bgHex: (_) => ({
644
+ whiteBright: (message) => message
645
+ }),
646
+ whiteBright: (message) => message
598
647
  },
599
648
  dim: {
600
- hex: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (_) => (message) => message, "hex"),
601
- gray: /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message) => message, "gray")
649
+ hex: (_) => (message) => message,
650
+ gray: (message) => message
602
651
  }
603
652
  };
604
- var getChalk = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
653
+ var getChalk = () => {
605
654
  let _chalk = _chalk3.default;
606
655
  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])) {
607
656
  _chalk = chalkDefault;
608
657
  }
609
658
  return _chalk;
610
- }, "getChalk");
659
+ };
611
660
 
612
661
  // ../config-tools/src/logger/is-unicode-supported.ts
613
662
  function isUnicodeSupported() {
@@ -619,10 +668,9 @@ function isUnicodeSupported() {
619
668
  process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
620
669
  process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
621
670
  }
622
- _chunkBGYQAVKQcjs.__name.call(void 0, isUnicodeSupported, "isUnicodeSupported");
623
671
 
624
672
  // ../config-tools/src/logger/console-icons.ts
625
- var useIcon = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
673
+ var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
626
674
  var CONSOLE_ICONS = {
627
675
  [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
628
676
  [LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
@@ -635,12 +683,12 @@ var CONSOLE_ICONS = {
635
683
  };
636
684
 
637
685
  // ../config-tools/src/logger/format-timestamp.ts
638
- var formatTimestamp = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (date = /* @__PURE__ */ new Date()) => {
686
+ var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
639
687
  return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
640
- }, "formatTimestamp");
688
+ };
641
689
 
642
690
  // ../config-tools/src/logger/console.ts
643
- var getLogFn = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
691
+ var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
644
692
  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;
645
693
  const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
646
694
  if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
@@ -649,99 +697,119 @@ var getLogFn = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (logLevel =
649
697
  }
650
698
  if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
651
699
  return (message) => {
652
- console.error(`
700
+ console.error(
701
+ `
653
702
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
654
- `);
703
+ `
704
+ );
655
705
  };
656
706
  }
657
707
  if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
658
708
  return (message) => {
659
- console.error(`
709
+ console.error(
710
+ `
660
711
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
661
- `);
712
+ `
713
+ );
662
714
  };
663
715
  }
664
716
  if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
665
717
  return (message) => {
666
- console.warn(`
718
+ console.warn(
719
+ `
667
720
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
668
- `);
721
+ `
722
+ );
669
723
  };
670
724
  }
671
725
  if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
672
726
  return (message) => {
673
- console.info(`
727
+ console.info(
728
+ `
674
729
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
675
- `);
730
+ `
731
+ );
676
732
  };
677
733
  }
678
734
  if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
679
735
  return (message) => {
680
- console.info(`
736
+ console.info(
737
+ `
681
738
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
682
- `);
739
+ `
740
+ );
683
741
  };
684
742
  }
685
743
  if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
686
744
  return (message) => {
687
- console.debug(`
745
+ console.debug(
746
+ `
688
747
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
689
- `);
748
+ `
749
+ );
690
750
  };
691
751
  }
692
752
  if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
693
753
  return (message) => {
694
- console.debug(`
754
+ console.debug(
755
+ `
695
756
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
696
- `);
757
+ `
758
+ );
697
759
  };
698
760
  }
699
761
  return (message) => {
700
- console.log(`
762
+ console.log(
763
+ `
701
764
  ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
702
- `);
765
+ `
766
+ );
703
767
  };
704
- }, "getLogFn");
705
- var writeFatal = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.FATAL, config)(message), "writeFatal");
706
- var writeError = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ERROR, config)(message), "writeError");
707
- var writeWarning = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.WARN, config)(message), "writeWarning");
708
- var writeInfo = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.INFO, config)(message), "writeInfo");
709
- var writeSuccess = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
710
- var writeDebug = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
711
- var writeTrace = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
712
- var getStopwatch = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (name) => {
768
+ };
769
+ var writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);
770
+ var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
771
+ var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
772
+ var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
773
+ var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
774
+ var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
775
+ var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
776
+ var getStopwatch = (name) => {
713
777
  const start = process.hrtime();
714
778
  return () => {
715
779
  const end = process.hrtime(start);
716
- console.info(`
717
- > \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(end[0] * 1e3 + end[1] / 1e6)}ms to complete
718
- `);
780
+ console.info(
781
+ `
782
+ > \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
783
+ end[0] * 1e3 + end[1] / 1e6
784
+ )}ms to complete
785
+ `
786
+ );
719
787
  };
720
- }, "getStopwatch");
788
+ };
721
789
  var MAX_DEPTH = 4;
722
- var formatLogMessage = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (message, options = {}, depth2 = 0) => {
790
+ var formatLogMessage = (message, options = {}, depth2 = 0) => {
723
791
  if (depth2 > MAX_DEPTH) {
724
792
  return "<max depth>";
725
793
  }
726
794
  const prefix = _nullishCoalesce(options.prefix, () => ( "-"));
727
795
  const skip = _nullishCoalesce(options.skip, () => ( []));
728
796
  return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
729
- ${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, {
730
- prefix: `${prefix}-`,
731
- skip
732
- }, depth2 + 1)}`).join("\n")}` : typeof message === "object" ? `
733
- ${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(message[key], {
734
- prefix: `${prefix}-`,
735
- skip
736
- }, depth2 + 1) : message[key]}`).join("\n")}` : message;
737
- }, "formatLogMessage");
738
- var _isFunction = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (value) => {
797
+ ${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, { prefix: `${prefix}-`, skip }, depth2 + 1)}`).join("\n")}` : typeof message === "object" ? `
798
+ ${Object.keys(message).filter((key) => !skip.includes(key)).map(
799
+ (key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(
800
+ message[key],
801
+ { prefix: `${prefix}-`, skip },
802
+ depth2 + 1
803
+ ) : message[key]}`
804
+ ).join("\n")}` : message;
805
+ };
806
+ var _isFunction = (value) => {
739
807
  try {
740
808
  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]));
741
809
  } catch (e) {
742
810
  return false;
743
811
  }
744
- }, "_isFunction");
812
+ };
745
813
 
746
814
 
747
815
 
@@ -1,27 +1,19 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkPWE7CANFcjs = require('./chunk-PWE7CANF.cjs');
5
-
6
-
7
- var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
4
+ var _chunkQ2G4VMOWcjs = require('./chunk-Q2G4VMOW.cjs');
8
5
 
9
6
  // src/clean.ts
10
7
  var _promises = require('fs/promises');
11
8
  async function clean(name = "Unbuild", directory, config) {
12
- _chunkPWE7CANFcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
13
- const stopwatch = _chunkPWE7CANFcjs.getStopwatch.call(void 0, `${name} output clean`);
9
+ _chunkQ2G4VMOWcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
10
+ const stopwatch = _chunkQ2G4VMOWcjs.getStopwatch.call(void 0, `${name} output clean`);
14
11
  await cleanDirectories(name, directory, config);
15
12
  stopwatch();
16
13
  }
17
- _chunkBGYQAVKQcjs.__name.call(void 0, clean, "clean");
18
14
  async function cleanDirectories(name = "Unbuild", directory, config) {
19
- await _promises.rm.call(void 0, directory, {
20
- recursive: true,
21
- force: true
22
- });
15
+ await _promises.rm.call(void 0, directory, { recursive: true, force: true });
23
16
  }
24
- _chunkBGYQAVKQcjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
25
17
 
26
18
 
27
19