@storm-software/config-tools 1.190.120 → 1.190.122

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 (157) hide show
  1. package/README.md +1 -1
  2. package/bin/config.cjs +1272 -105
  3. package/bin/config.mjs +1271 -0
  4. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  5. package/dist/config-file/get-config-file.cjs +63 -79
  6. package/dist/config-file/get-config-file.d.cts +5 -5
  7. package/dist/config-file/{get-config-file.d.ts → get-config-file.d.mts} +7 -5
  8. package/dist/config-file/get-config-file.mjs +66 -0
  9. package/dist/config-file/index.cjs +4 -1
  10. package/dist/config-file/index.d.cts +2 -3
  11. package/dist/config-file/index.d.mts +4 -0
  12. package/dist/config-file/index.mjs +5 -0
  13. package/dist/create-storm-config.cjs +105 -136
  14. package/dist/create-storm-config.d.cts +5 -5
  15. package/dist/{create-storm-config.d.ts → create-storm-config.d.mts} +7 -5
  16. package/dist/create-storm-config.mjs +113 -0
  17. package/dist/env/get-env.cjs +190 -214
  18. package/dist/env/get-env.d.cts +5 -5
  19. package/dist/env/{get-env.d.ts → get-env.d.mts} +7 -5
  20. package/dist/env/get-env.mjs +203 -0
  21. package/dist/env/index.cjs +7 -2
  22. package/dist/env/index.d.cts +3 -4
  23. package/dist/env/index.d.mts +5 -0
  24. package/dist/env/index.mjs +6 -0
  25. package/dist/env/set-env.cjs +218 -374
  26. package/dist/env/set-env.d.cts +8 -8
  27. package/dist/env/{set-env.d.ts → set-env.d.mts} +10 -8
  28. package/dist/env/set-env.mjs +231 -0
  29. package/dist/get-config.cjs +40 -29
  30. package/dist/get-config.d.cts +18 -18
  31. package/dist/{get-config.d.ts → get-config.d.mts} +20 -18
  32. package/dist/get-config.mjs +46 -0
  33. package/dist/index.cjs +98 -7
  34. package/dist/index.d.cts +27 -28
  35. package/dist/index.d.mts +29 -0
  36. package/dist/index.mjs +26 -0
  37. package/dist/logger/chalk.cjs +38 -29
  38. package/dist/logger/chalk.d.cts +18 -17
  39. package/dist/logger/chalk.d.mts +37 -0
  40. package/dist/logger/chalk.mjs +43 -0
  41. package/dist/logger/console-icons.cjs +15 -14
  42. package/dist/logger/console-icons.d.cts +5 -8
  43. package/dist/logger/console-icons.d.mts +7 -0
  44. package/dist/logger/console-icons.mjs +20 -0
  45. package/dist/logger/console.cjs +187 -183
  46. package/dist/logger/console.d.cts +25 -25
  47. package/dist/logger/{console.d.ts → console.d.mts} +27 -25
  48. package/dist/logger/console.mjs +185 -0
  49. package/dist/logger/create-logger.cjs +31 -24
  50. package/dist/logger/create-logger.d.cts +5 -6
  51. package/dist/logger/{create-logger.d.ts → create-logger.d.mts} +7 -6
  52. package/dist/logger/create-logger.mjs +34 -0
  53. package/dist/logger/format-timestamp.cjs +12 -4
  54. package/dist/logger/format-timestamp.d.cts +3 -2
  55. package/dist/logger/{format-timestamp.d.ts → format-timestamp.d.mts} +5 -2
  56. package/dist/logger/format-timestamp.mjs +16 -0
  57. package/dist/logger/get-log-level.cjs +50 -60
  58. package/dist/logger/get-log-level.d.cts +4 -5
  59. package/dist/logger/{get-log-level.d.ts → get-log-level.d.mts} +6 -5
  60. package/dist/logger/get-log-level.mjs +54 -0
  61. package/dist/logger/index.cjs +29 -7
  62. package/dist/logger/index.d.cts +8 -10
  63. package/dist/logger/index.d.mts +10 -0
  64. package/dist/logger/index.mjs +11 -0
  65. package/dist/logger/is-unicode-supported.cjs +6 -10
  66. package/dist/logger/is-unicode-supported.d.cts +3 -2
  67. package/dist/logger/is-unicode-supported.d.mts +6 -0
  68. package/dist/logger/is-unicode-supported.mjs +10 -0
  69. package/dist/types.cjs +26 -25
  70. package/dist/types.d.cts +39 -41
  71. package/dist/types.d.mts +53 -0
  72. package/dist/types.mjs +30 -0
  73. package/dist/utilities/apply-workspace-tokens.cjs +31 -70
  74. package/dist/utilities/apply-workspace-tokens.d.cts +4 -5
  75. package/dist/utilities/{apply-workspace-tokens.d.ts → apply-workspace-tokens.d.mts} +6 -5
  76. package/dist/utilities/apply-workspace-tokens.mjs +37 -0
  77. package/dist/utilities/colors.cjs +91 -74
  78. package/dist/utilities/colors.d.cts +4 -4
  79. package/dist/utilities/{colors.d.ts → colors.d.mts} +6 -4
  80. package/dist/utilities/colors.mjs +97 -0
  81. package/dist/utilities/correct-paths.cjs +166 -196
  82. package/dist/utilities/correct-paths.d.cts +4 -4
  83. package/dist/utilities/{correct-paths.d.ts → correct-paths.d.mts} +6 -4
  84. package/dist/utilities/correct-paths.mjs +190 -0
  85. package/dist/utilities/file-path-utils.cjs +42 -27
  86. package/dist/utilities/file-path-utils.d.cts +15 -14
  87. package/dist/utilities/{file-path-utils.d.ts → file-path-utils.d.mts} +17 -14
  88. package/dist/utilities/file-path-utils.mjs +48 -0
  89. package/dist/utilities/find-up.cjs +12 -18
  90. package/dist/utilities/find-up.d.cts +3 -2
  91. package/dist/utilities/{find-up.d.ts → find-up.d.mts} +5 -2
  92. package/dist/utilities/find-up.mjs +19 -0
  93. package/dist/utilities/find-workspace-root.cjs +64 -69
  94. package/dist/utilities/find-workspace-root.d.cts +3 -2
  95. package/dist/utilities/{find-workspace-root.d.ts → find-workspace-root.d.mts} +5 -2
  96. package/dist/utilities/find-workspace-root.mjs +73 -0
  97. package/dist/utilities/get-default-config.cjs +69 -91
  98. package/dist/utilities/get-default-config.d.cts +4 -4
  99. package/dist/utilities/{get-default-config.d.ts → get-default-config.d.mts} +6 -4
  100. package/dist/utilities/get-default-config.mjs +74 -0
  101. package/dist/utilities/index.cjs +49 -9
  102. package/dist/utilities/index.d.cts +10 -14
  103. package/dist/utilities/index.d.mts +12 -0
  104. package/dist/utilities/index.mjs +13 -0
  105. package/dist/utilities/process-handler.cjs +32 -47
  106. package/dist/utilities/process-handler.d.cts +4 -4
  107. package/dist/utilities/process-handler.d.mts +9 -0
  108. package/dist/utilities/process-handler.mjs +38 -0
  109. package/dist/utilities/run.cjs +62 -36
  110. package/dist/utilities/run.d.cts +5 -6
  111. package/dist/utilities/{run.d.ts → run.d.mts} +7 -6
  112. package/dist/utilities/run.mjs +64 -0
  113. package/dist/utilities/toml.cjs +27 -32
  114. package/dist/utilities/toml.d.cts +148 -147
  115. package/dist/utilities/toml.d.mts +192 -0
  116. package/dist/utilities/toml.mjs +33 -0
  117. package/package.json +105 -157
  118. package/bin/config.js +0 -108
  119. package/dist/config-file/get-config-file.js +0 -83
  120. package/dist/config-file/index.d.ts +0 -3
  121. package/dist/config-file/index.js +0 -1
  122. package/dist/create-storm-config.js +0 -147
  123. package/dist/env/get-env.js +0 -226
  124. package/dist/env/index.d.ts +0 -4
  125. package/dist/env/index.js +0 -2
  126. package/dist/env/set-env.js +0 -386
  127. package/dist/get-config.js +0 -35
  128. package/dist/index.d.ts +0 -28
  129. package/dist/index.js +0 -7
  130. package/dist/logger/chalk.d.ts +0 -34
  131. package/dist/logger/chalk.js +0 -34
  132. package/dist/logger/console-icons.d.ts +0 -8
  133. package/dist/logger/console-icons.js +0 -17
  134. package/dist/logger/console.js +0 -191
  135. package/dist/logger/create-logger.js +0 -27
  136. package/dist/logger/format-timestamp.js +0 -6
  137. package/dist/logger/get-log-level.js +0 -64
  138. package/dist/logger/index.d.ts +0 -10
  139. package/dist/logger/index.js +0 -7
  140. package/dist/logger/is-unicode-supported.d.ts +0 -3
  141. package/dist/logger/is-unicode-supported.js +0 -12
  142. package/dist/types.d.ts +0 -53
  143. package/dist/types.js +0 -28
  144. package/dist/utilities/apply-workspace-tokens.js +0 -76
  145. package/dist/utilities/colors.js +0 -81
  146. package/dist/utilities/correct-paths.js +0 -231
  147. package/dist/utilities/file-path-utils.js +0 -33
  148. package/dist/utilities/find-up.js +0 -23
  149. package/dist/utilities/find-workspace-root.js +0 -77
  150. package/dist/utilities/get-default-config.js +0 -95
  151. package/dist/utilities/index.d.ts +0 -14
  152. package/dist/utilities/index.js +0 -9
  153. package/dist/utilities/process-handler.d.ts +0 -7
  154. package/dist/utilities/process-handler.js +0 -53
  155. package/dist/utilities/run.js +0 -38
  156. package/dist/utilities/toml.d.ts +0 -189
  157. package/dist/utilities/toml.js +0 -42
@@ -1,95 +1,73 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
-
4
- var _config = require('@storm-software/config');
5
- var _nodefs = require('node:fs');
6
- var _promises = require('node:fs/promises');
7
- var _nodepath = require('node:path');
8
- var _correctpaths = require('./correct-paths');
9
- var _findworkspaceroot = require('./find-workspace-root');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_utilities_correct_paths = require("./correct-paths.cjs");
3
+ const require_utilities_find_workspace_root = require("./find-workspace-root.cjs");
4
+ let node_fs = require("node:fs");
5
+ let node_path = require("node:path");
6
+ let _storm_software_config = require("@storm-software/config");
7
+ let node_fs_promises = require("node:fs/promises");
8
+ //#region src/utilities/get-default-config.ts
9
+ /**
10
+ * Get the default Storm config values used during various dev-ops processes
11
+ *
12
+ * @returns The default Storm config values
13
+ */
10
14
  async function getPackageJsonConfig(root) {
11
- let license = _config.STORM_DEFAULT_LICENSE;
12
- let homepage = void 0;
13
- let support = void 0;
14
- let name = void 0;
15
- let namespace = void 0;
16
- let repository = void 0;
17
- const workspaceRoot = _findworkspaceroot.findWorkspaceRoot.call(void 0, root);
18
- if (_nodefs.existsSync.call(void 0, _nodepath.join.call(void 0, workspaceRoot, "package.json"))) {
19
- const file = await _promises.readFile.call(void 0,
20
- _correctpaths.joinPaths.call(void 0, workspaceRoot, "package.json"),
21
- "utf8"
22
- );
23
- if (file) {
24
- const packageJson = JSON.parse(file);
25
- if (packageJson.name) {
26
- name = packageJson.name;
27
- }
28
- if (packageJson.namespace) {
29
- namespace = packageJson.namespace;
30
- }
31
- if (packageJson.repository) {
32
- if (typeof packageJson.repository === "string") {
33
- repository = packageJson.repository;
34
- } else if (packageJson.repository.url) {
35
- repository = packageJson.repository.url;
36
- }
37
- }
38
- if (packageJson.license) {
39
- license = packageJson.license;
40
- }
41
- if (packageJson.homepage) {
42
- homepage = packageJson.homepage;
43
- }
44
- if (packageJson.bugs) {
45
- if (typeof packageJson.bugs === "string") {
46
- support = packageJson.bugs;
47
- } else if (packageJson.bugs.url) {
48
- support = packageJson.bugs.url;
49
- }
50
- }
51
- }
52
- }
53
- return {
54
- workspaceRoot,
55
- name,
56
- namespace,
57
- repository,
58
- license,
59
- homepage,
60
- support
61
- };
15
+ let license = _storm_software_config.STORM_DEFAULT_LICENSE;
16
+ let homepage = void 0;
17
+ let support = void 0;
18
+ let name = void 0;
19
+ let namespace = void 0;
20
+ let repository = void 0;
21
+ const workspaceRoot = require_utilities_find_workspace_root.findWorkspaceRoot(root);
22
+ if ((0, node_fs.existsSync)((0, node_path.join)(workspaceRoot, "package.json"))) {
23
+ const file = await (0, node_fs_promises.readFile)(require_utilities_correct_paths.joinPaths(workspaceRoot, "package.json"), "utf8");
24
+ if (file) {
25
+ const packageJson = JSON.parse(file);
26
+ if (packageJson.name) name = packageJson.name;
27
+ if (packageJson.namespace) namespace = packageJson.namespace;
28
+ if (packageJson.repository) {
29
+ if (typeof packageJson.repository === "string") repository = packageJson.repository;
30
+ else if (packageJson.repository.url) repository = packageJson.repository.url;
31
+ }
32
+ if (packageJson.license) license = packageJson.license;
33
+ if (packageJson.homepage) homepage = packageJson.homepage;
34
+ if (packageJson.bugs) {
35
+ if (typeof packageJson.bugs === "string") support = packageJson.bugs;
36
+ else if (packageJson.bugs.url) support = packageJson.bugs.url;
37
+ }
38
+ }
39
+ }
40
+ return {
41
+ workspaceRoot,
42
+ name,
43
+ namespace,
44
+ repository,
45
+ license,
46
+ homepage,
47
+ support
48
+ };
62
49
  }
50
+ /**
51
+ * Apply default config values to the given config object
52
+ *
53
+ * @param config - The config object to apply defaults to
54
+ * @returns The config object with defaults applied
55
+ */
63
56
  function applyDefaultConfig(config) {
64
- if (!config.support && config.contact) {
65
- config.support = config.contact;
66
- }
67
- if (!config.contact && config.support) {
68
- config.contact = config.support;
69
- }
70
- if (config.homepage) {
71
- if (!config.docs) {
72
- config.docs = `${config.homepage}/docs`;
73
- }
74
- if (!config.license) {
75
- config.license = `${config.homepage}/license`;
76
- }
77
- if (!config.support) {
78
- config.support = `${config.homepage}/support`;
79
- }
80
- if (!config.contact) {
81
- config.contact = `${config.homepage}/contact`;
82
- }
83
- if (!_optionalChain([config, 'access', _ => _.error, 'optionalAccess', _2 => _2.codesFile]) || !_optionalChain([config, 'optionalAccess', _3 => _3.error, 'optionalAccess', _4 => _4.url])) {
84
- config.error ??= { codesFile: _config.STORM_DEFAULT_ERROR_CODES_FILE };
85
- if (config.homepage) {
86
- config.error.url ??= `${config.homepage}/errors`;
87
- }
88
- }
89
- }
90
- return config;
57
+ if (!config.support && config.contact) config.support = config.contact;
58
+ if (!config.contact && config.support) config.contact = config.support;
59
+ if (config.homepage) {
60
+ if (!config.docs) config.docs = `${config.homepage}/docs`;
61
+ if (!config.license) config.license = `${config.homepage}/license`;
62
+ if (!config.support) config.support = `${config.homepage}/support`;
63
+ if (!config.contact) config.contact = `${config.homepage}/contact`;
64
+ if (!config.error?.codesFile || !config?.error?.url) {
65
+ config.error ??= { codesFile: _storm_software_config.STORM_DEFAULT_ERROR_CODES_FILE };
66
+ if (config.homepage) config.error.url ??= `${config.homepage}/errors`;
67
+ }
68
+ }
69
+ return config;
91
70
  }
92
-
93
-
94
-
95
- exports.applyDefaultConfig = applyDefaultConfig; exports.getPackageJsonConfig = getPackageJsonConfig;
71
+ //#endregion
72
+ exports.applyDefaultConfig = applyDefaultConfig;
73
+ exports.getPackageJsonConfig = getPackageJsonConfig;
@@ -1,5 +1,5 @@
1
- import { StormWorkspaceConfig } from '@storm-software/config';
2
-
1
+ import { StormWorkspaceConfig } from "@storm-software/config";
2
+ //#region src/utilities/get-default-config.d.ts
3
3
  /**
4
4
  * Get the default Storm config values used during various dev-ops processes
5
5
  *
@@ -13,5 +13,5 @@ declare function getPackageJsonConfig(root?: string): Promise<Pick<StormWorkspac
13
13
  * @returns The config object with defaults applied
14
14
  */
15
15
  declare function applyDefaultConfig(config: Partial<StormWorkspaceConfig>): Partial<StormWorkspaceConfig>;
16
-
17
- export { applyDefaultConfig, getPackageJsonConfig };
16
+ //#endregion
17
+ export { applyDefaultConfig, getPackageJsonConfig };
@@ -1,5 +1,7 @@
1
- import { StormWorkspaceConfig } from '@storm-software/config';
2
-
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { StormWorkspaceConfig } from "@storm-software/config";
4
+ //#region src/utilities/get-default-config.d.ts
3
5
  /**
4
6
  * Get the default Storm config values used during various dev-ops processes
5
7
  *
@@ -13,5 +15,5 @@ declare function getPackageJsonConfig(root?: string): Promise<Pick<StormWorkspac
13
15
  * @returns The config object with defaults applied
14
16
  */
15
17
  declare function applyDefaultConfig(config: Partial<StormWorkspaceConfig>): Partial<StormWorkspaceConfig>;
16
-
17
- export { applyDefaultConfig, getPackageJsonConfig };
18
+ //#endregion
19
+ export { applyDefaultConfig, getPackageJsonConfig };
@@ -0,0 +1,74 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { joinPaths } from "./correct-paths.mjs";
5
+ import { findWorkspaceRoot } from "./find-workspace-root.mjs";
6
+ import { existsSync } from "node:fs";
7
+ import { join } from "node:path";
8
+ import { STORM_DEFAULT_ERROR_CODES_FILE, STORM_DEFAULT_LICENSE } from "@storm-software/config";
9
+ import { readFile } from "node:fs/promises";
10
+ //#region src/utilities/get-default-config.ts
11
+ /**
12
+ * Get the default Storm config values used during various dev-ops processes
13
+ *
14
+ * @returns The default Storm config values
15
+ */
16
+ async function getPackageJsonConfig(root) {
17
+ let license = STORM_DEFAULT_LICENSE;
18
+ let homepage = void 0;
19
+ let support = void 0;
20
+ let name = void 0;
21
+ let namespace = void 0;
22
+ let repository = void 0;
23
+ const workspaceRoot = findWorkspaceRoot(root);
24
+ if (existsSync(join(workspaceRoot, "package.json"))) {
25
+ const file = await readFile(joinPaths(workspaceRoot, "package.json"), "utf8");
26
+ if (file) {
27
+ const packageJson = JSON.parse(file);
28
+ if (packageJson.name) name = packageJson.name;
29
+ if (packageJson.namespace) namespace = packageJson.namespace;
30
+ if (packageJson.repository) {
31
+ if (typeof packageJson.repository === "string") repository = packageJson.repository;
32
+ else if (packageJson.repository.url) repository = packageJson.repository.url;
33
+ }
34
+ if (packageJson.license) license = packageJson.license;
35
+ if (packageJson.homepage) homepage = packageJson.homepage;
36
+ if (packageJson.bugs) {
37
+ if (typeof packageJson.bugs === "string") support = packageJson.bugs;
38
+ else if (packageJson.bugs.url) support = packageJson.bugs.url;
39
+ }
40
+ }
41
+ }
42
+ return {
43
+ workspaceRoot,
44
+ name,
45
+ namespace,
46
+ repository,
47
+ license,
48
+ homepage,
49
+ support
50
+ };
51
+ }
52
+ /**
53
+ * Apply default config values to the given config object
54
+ *
55
+ * @param config - The config object to apply defaults to
56
+ * @returns The config object with defaults applied
57
+ */
58
+ function applyDefaultConfig(config) {
59
+ if (!config.support && config.contact) config.support = config.contact;
60
+ if (!config.contact && config.support) config.contact = config.support;
61
+ if (config.homepage) {
62
+ if (!config.docs) config.docs = `${config.homepage}/docs`;
63
+ if (!config.license) config.license = `${config.homepage}/license`;
64
+ if (!config.support) config.support = `${config.homepage}/support`;
65
+ if (!config.contact) config.contact = `${config.homepage}/contact`;
66
+ if (!config.error?.codesFile || !config?.error?.url) {
67
+ config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
68
+ if (config.homepage) config.error.url ??= `${config.homepage}/errors`;
69
+ }
70
+ }
71
+ return config;
72
+ }
73
+ //#endregion
74
+ export { applyDefaultConfig, getPackageJsonConfig };
@@ -1,9 +1,49 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }var _applyworkspacetokens = require('./apply-workspace-tokens'); _createStarExport(_applyworkspacetokens);
2
- var _colors = require('./colors'); _createStarExport(_colors);
3
- var _correctpaths = require('./correct-paths'); _createStarExport(_correctpaths);
4
- var _filepathutils = require('./file-path-utils'); _createStarExport(_filepathutils);
5
- var _findworkspaceroot = require('./find-workspace-root'); _createStarExport(_findworkspaceroot);
6
- var _getdefaultconfig = require('./get-default-config'); _createStarExport(_getdefaultconfig);
7
- var _processhandler = require('./process-handler'); _createStarExport(_processhandler);
8
- var _run = require('./run'); _createStarExport(_run);
9
- var _toml = require('./toml'); _createStarExport(_toml);
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_utilities_colors = require("./colors.cjs");
3
+ const require_utilities_correct_paths = require("./correct-paths.cjs");
4
+ const require_utilities_find_workspace_root = require("./find-workspace-root.cjs");
5
+ const require_utilities_apply_workspace_tokens = require("./apply-workspace-tokens.cjs");
6
+ const require_utilities_file_path_utils = require("./file-path-utils.cjs");
7
+ const require_utilities_get_default_config = require("./get-default-config.cjs");
8
+ const require_utilities_process_handler = require("./process-handler.cjs");
9
+ const require_utilities_run = require("./run.cjs");
10
+ const require_utilities_toml = require("./toml.cjs");
11
+ exports.DEFAULT_COLOR_CONFIG = require_utilities_colors.DEFAULT_COLOR_CONFIG;
12
+ exports.LARGE_BUFFER = require_utilities_run.LARGE_BUFFER;
13
+ exports.applyDefaultConfig = require_utilities_get_default_config.applyDefaultConfig;
14
+ exports.applyWorkspaceBaseTokens = require_utilities_apply_workspace_tokens.applyWorkspaceBaseTokens;
15
+ exports.applyWorkspaceProjectTokens = require_utilities_apply_workspace_tokens.applyWorkspaceProjectTokens;
16
+ exports.applyWorkspaceTokens = require_utilities_apply_workspace_tokens.applyWorkspaceTokens;
17
+ exports.basename = require_utilities_correct_paths.basename;
18
+ exports.correctPaths = require_utilities_correct_paths.correctPaths;
19
+ exports.dirname = require_utilities_correct_paths.dirname;
20
+ exports.exitWithError = require_utilities_process_handler.exitWithError;
21
+ exports.exitWithSuccess = require_utilities_process_handler.exitWithSuccess;
22
+ exports.extname = require_utilities_correct_paths.extname;
23
+ exports.findFileName = require_utilities_file_path_utils.findFileName;
24
+ exports.findFilePath = require_utilities_file_path_utils.findFilePath;
25
+ exports.findWorkspaceRoot = require_utilities_find_workspace_root.findWorkspaceRoot;
26
+ exports.findWorkspaceRootSafe = require_utilities_find_workspace_root.findWorkspaceRootSafe;
27
+ exports.format = require_utilities_correct_paths.format;
28
+ exports.getColor = require_utilities_colors.getColor;
29
+ exports.getColors = require_utilities_colors.getColors;
30
+ exports.getGradient = require_utilities_colors.getGradient;
31
+ exports.getPackageJsonConfig = require_utilities_get_default_config.getPackageJsonConfig;
32
+ exports.handleProcess = require_utilities_process_handler.handleProcess;
33
+ exports.isAbsolute = require_utilities_correct_paths.isAbsolute;
34
+ exports.joinPaths = require_utilities_correct_paths.joinPaths;
35
+ exports.modifyCargoNestedTable = require_utilities_toml.modifyCargoNestedTable;
36
+ exports.modifyCargoTable = require_utilities_toml.modifyCargoTable;
37
+ exports.normalizeString = require_utilities_correct_paths.normalizeString;
38
+ exports.normalizeWindowsPath = require_utilities_correct_paths.normalizeWindowsPath;
39
+ exports.parse = require_utilities_correct_paths.parse;
40
+ exports.parseCargoToml = require_utilities_toml.parseCargoToml;
41
+ exports.parseCargoTomlWithTree = require_utilities_toml.parseCargoTomlWithTree;
42
+ exports.relative = require_utilities_correct_paths.relative;
43
+ exports.removeExtension = require_utilities_file_path_utils.removeExtension;
44
+ exports.resolve = require_utilities_correct_paths.resolve;
45
+ exports.run = require_utilities_run.run;
46
+ exports.runAsync = require_utilities_run.runAsync;
47
+ exports.sep = require_utilities_correct_paths.sep;
48
+ exports.stringifyCargoToml = require_utilities_toml.stringifyCargoToml;
49
+ exports.toNamespacedPath = require_utilities_correct_paths.toNamespacedPath;
@@ -1,14 +1,10 @@
1
- export { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from './apply-workspace-tokens.cjs';
2
- export { DEFAULT_COLOR_CONFIG, getColor, getColors, getGradient } from './colors.cjs';
3
- export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from './correct-paths.cjs';
4
- export { FindFileNameOptions, findFileName, findFilePath, removeExtension } from './file-path-utils.cjs';
5
- export { findWorkspaceRoot, findWorkspaceRootSafe } from './find-workspace-root.cjs';
6
- export { applyDefaultConfig, getPackageJsonConfig } from './get-default-config.cjs';
7
- export { exitWithError, exitWithSuccess, handleProcess } from './process-handler.cjs';
8
- export { IOType, LARGE_BUFFER, StdioOptions, run, runAsync } from './run.cjs';
9
- export { CargoMetadata, CargoToml, Dep, DepKind, Dependency, Docs, Docs2, Features, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, Target, Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml } from './toml.cjs';
10
- import '../types.cjs';
11
- import '@storm-software/config';
12
- import '@storm-software/config/types';
13
- import 'node:path';
14
- import 'node:child_process';
1
+ import { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from "./apply-workspace-tokens.cjs";
2
+ import { DEFAULT_COLOR_CONFIG, getColor, getColors, getGradient } from "./colors.cjs";
3
+ import { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from "./correct-paths.cjs";
4
+ import { FindFileNameOptions, findFileName, findFilePath, removeExtension } from "./file-path-utils.cjs";
5
+ import { findWorkspaceRoot, findWorkspaceRootSafe } from "./find-workspace-root.cjs";
6
+ import { applyDefaultConfig, getPackageJsonConfig } from "./get-default-config.cjs";
7
+ import { exitWithError, exitWithSuccess, handleProcess } from "./process-handler.cjs";
8
+ import { IOType, LARGE_BUFFER, StdioOptions, run, runAsync } from "./run.cjs";
9
+ import { CargoMetadata, CargoToml, Dep, DepKind, Dependency, Docs, Docs2, Features, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, Target, Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml } from "./toml.cjs";
10
+ export { CargoMetadata, CargoToml, DEFAULT_COLOR_CONFIG, Dep, DepKind, Dependency, Docs, Docs2, Features, FindFileNameOptions, IOType, LARGE_BUFFER, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, StdioOptions, Target, Tree, applyDefaultConfig, applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens, basename, correctPaths, dirname, exitWithError, exitWithSuccess, extname, findFileName, findFilePath, findWorkspaceRoot, findWorkspaceRootSafe, format, getColor, getColors, getGradient, getPackageJsonConfig, handleProcess, isAbsolute, joinPaths, modifyCargoNestedTable, modifyCargoTable, normalizeString, normalizeWindowsPath, parse, parseCargoToml, parseCargoTomlWithTree, relative, removeExtension, resolve, run, runAsync, sep, stringifyCargoToml, toNamespacedPath };
@@ -0,0 +1,12 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from "./apply-workspace-tokens.mjs";
4
+ import { DEFAULT_COLOR_CONFIG, getColor, getColors, getGradient } from "./colors.mjs";
5
+ import { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from "./correct-paths.mjs";
6
+ import { FindFileNameOptions, findFileName, findFilePath, removeExtension } from "./file-path-utils.mjs";
7
+ import { findWorkspaceRoot, findWorkspaceRootSafe } from "./find-workspace-root.mjs";
8
+ import { applyDefaultConfig, getPackageJsonConfig } from "./get-default-config.mjs";
9
+ import { exitWithError, exitWithSuccess, handleProcess } from "./process-handler.mjs";
10
+ import { IOType, LARGE_BUFFER, StdioOptions, run, runAsync } from "./run.mjs";
11
+ import { CargoMetadata, CargoToml, Dep, DepKind, Dependency, Docs, Docs2, Features, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, Target, Tree, modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml } from "./toml.mjs";
12
+ export { CargoMetadata, CargoToml, DEFAULT_COLOR_CONFIG, Dep, DepKind, Dependency, Docs, Docs2, Features, FindFileNameOptions, IOType, LARGE_BUFFER, Metadata, Metadata2, Node, Package, Resolve, Rs, Rs2, StdioOptions, Target, Tree, applyDefaultConfig, applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens, basename, correctPaths, dirname, exitWithError, exitWithSuccess, extname, findFileName, findFilePath, findWorkspaceRoot, findWorkspaceRootSafe, format, getColor, getColors, getGradient, getPackageJsonConfig, handleProcess, isAbsolute, joinPaths, modifyCargoNestedTable, modifyCargoTable, normalizeString, normalizeWindowsPath, parse, parseCargoToml, parseCargoTomlWithTree, relative, removeExtension, resolve, run, runAsync, sep, stringifyCargoToml, toNamespacedPath };
@@ -0,0 +1,13 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { DEFAULT_COLOR_CONFIG, getColor, getColors, getGradient } from "./colors.mjs";
5
+ import { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath } from "./correct-paths.mjs";
6
+ import { findWorkspaceRoot, findWorkspaceRootSafe } from "./find-workspace-root.mjs";
7
+ import { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens } from "./apply-workspace-tokens.mjs";
8
+ import { findFileName, findFilePath, removeExtension } from "./file-path-utils.mjs";
9
+ import { applyDefaultConfig, getPackageJsonConfig } from "./get-default-config.mjs";
10
+ import { exitWithError, exitWithSuccess, handleProcess } from "./process-handler.mjs";
11
+ import { LARGE_BUFFER, run, runAsync } from "./run.mjs";
12
+ import { modifyCargoNestedTable, modifyCargoTable, parseCargoToml, parseCargoTomlWithTree, stringifyCargoToml } from "./toml.mjs";
13
+ export { DEFAULT_COLOR_CONFIG, LARGE_BUFFER, applyDefaultConfig, applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens, basename, correctPaths, dirname, exitWithError, exitWithSuccess, extname, findFileName, findFilePath, findWorkspaceRoot, findWorkspaceRootSafe, format, getColor, getColors, getGradient, getPackageJsonConfig, handleProcess, isAbsolute, joinPaths, modifyCargoNestedTable, modifyCargoTable, normalizeString, normalizeWindowsPath, parse, parseCargoToml, parseCargoTomlWithTree, relative, removeExtension, resolve, run, runAsync, sep, stringifyCargoToml, toNamespacedPath };
@@ -1,53 +1,38 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
-
4
-
5
-
6
- var _console = require('../logger/console');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_logger_console = require("../logger/console.cjs");
3
+ //#region src/utilities/process-handler.ts
7
4
  const exitWithError = (config) => {
8
- _console.writeFatal.call(void 0, "Exiting script with an error status...", config);
9
- process.exit(1);
5
+ require_logger_console.writeFatal("Exiting script with an error status...", config);
6
+ process.exit(1);
10
7
  };
11
8
  const exitWithSuccess = (config) => {
12
- _console.writeSuccess.call(void 0, "Script completed successfully. Exiting...", config);
13
- process.exit(0);
9
+ require_logger_console.writeSuccess("Script completed successfully. Exiting...", config);
10
+ process.exit(0);
14
11
  };
15
12
  const handleProcess = (config) => {
16
- _console.writeTrace.call(void 0,
17
- `Using the following arguments to process the script: ${process.argv.join(", ")}`,
18
- config
19
- );
20
- process.on("unhandledRejection", (error) => {
21
- _console.writeError.call(void 0,
22
- `An Unhandled Rejection occurred while running the program: ${error && typeof error === "object" && "message" in error && _optionalChain([error, 'optionalAccess', _ => _.message]) ? error.message : typeof error === "string" ? error : "Unknown error"}
23
- Stacktrace: ${error && typeof error === "object" && "stack" in error && _optionalChain([error, 'optionalAccess', _2 => _2.stack]) ? error.stack : ""}`,
24
- config
25
- );
26
- exitWithError(config);
27
- });
28
- process.on("uncaughtException", (error) => {
29
- _console.writeError.call(void 0,
30
- `An Uncaught Exception occurred while running the program: ${error && typeof error === "object" && "message" in error && _optionalChain([error, 'optionalAccess', _3 => _3.message]) ? error.message : typeof error === "string" ? error : "Unknown error"}
31
- Stacktrace: ${error && typeof error === "object" && "stack" in error && _optionalChain([error, 'optionalAccess', _4 => _4.stack]) ? error.stack : ""}`,
32
- config
33
- );
34
- exitWithError(config);
35
- });
36
- process.on("SIGTERM", (signal) => {
37
- _console.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
38
- exitWithError(config);
39
- });
40
- process.on("SIGINT", (signal) => {
41
- _console.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
42
- exitWithError(config);
43
- });
44
- process.on("SIGHUP", (signal) => {
45
- _console.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
46
- exitWithError(config);
47
- });
13
+ require_logger_console.writeTrace(`Using the following arguments to process the script: ${process.argv.join(", ")}`, config);
14
+ process.on("unhandledRejection", (error) => {
15
+ require_logger_console.writeError(`An Unhandled Rejection occurred while running the program: ${error && typeof error === "object" && "message" in error && error?.message ? error.message : typeof error === "string" ? error : "Unknown error"} \nStacktrace: ${error && typeof error === "object" && "stack" in error && error?.stack ? error.stack : ""}`, config);
16
+ exitWithError(config);
17
+ });
18
+ process.on("uncaughtException", (error) => {
19
+ require_logger_console.writeError(`An Uncaught Exception occurred while running the program: ${error && typeof error === "object" && "message" in error && error?.message ? error.message : typeof error === "string" ? error : "Unknown error"} \nStacktrace: ${error && typeof error === "object" && "stack" in error && error?.stack ? error.stack : ""}`, config);
20
+ exitWithError(config);
21
+ });
22
+ process.on("SIGTERM", (signal) => {
23
+ require_logger_console.writeError(`The program terminated with signal code: ${signal}`, config);
24
+ exitWithError(config);
25
+ });
26
+ process.on("SIGINT", (signal) => {
27
+ require_logger_console.writeError(`The program terminated with signal code: ${signal}`, config);
28
+ exitWithError(config);
29
+ });
30
+ process.on("SIGHUP", (signal) => {
31
+ require_logger_console.writeError(`The program terminated with signal code: ${signal}`, config);
32
+ exitWithError(config);
33
+ });
48
34
  };
49
-
50
-
51
-
52
-
53
- exports.exitWithError = exitWithError; exports.exitWithSuccess = exitWithSuccess; exports.handleProcess = handleProcess;
35
+ //#endregion
36
+ exports.exitWithError = exitWithError;
37
+ exports.exitWithSuccess = exitWithSuccess;
38
+ exports.handleProcess = handleProcess;
@@ -1,7 +1,7 @@
1
- import { StormWorkspaceConfig } from '@storm-software/config';
2
-
1
+ import { StormWorkspaceConfig } from "@storm-software/config";
2
+ //#region src/utilities/process-handler.d.ts
3
3
  declare const exitWithError: (config?: Partial<StormWorkspaceConfig>) => never;
4
4
  declare const exitWithSuccess: (config?: Partial<StormWorkspaceConfig>) => never;
5
5
  declare const handleProcess: (config?: Partial<StormWorkspaceConfig>) => void;
6
-
7
- export { exitWithError, exitWithSuccess, handleProcess };
6
+ //#endregion
7
+ export { exitWithError, exitWithSuccess, handleProcess };
@@ -0,0 +1,9 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { StormWorkspaceConfig } from "@storm-software/config";
4
+ //#region src/utilities/process-handler.d.ts
5
+ declare const exitWithError: (config?: Partial<StormWorkspaceConfig>) => never;
6
+ declare const exitWithSuccess: (config?: Partial<StormWorkspaceConfig>) => never;
7
+ declare const handleProcess: (config?: Partial<StormWorkspaceConfig>) => void;
8
+ //#endregion
9
+ export { exitWithError, exitWithSuccess, handleProcess };
@@ -0,0 +1,38 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { writeError, writeFatal, writeSuccess, writeTrace } from "../logger/console.mjs";
5
+ //#region src/utilities/process-handler.ts
6
+ const exitWithError = (config) => {
7
+ writeFatal("Exiting script with an error status...", config);
8
+ process.exit(1);
9
+ };
10
+ const exitWithSuccess = (config) => {
11
+ writeSuccess("Script completed successfully. Exiting...", config);
12
+ process.exit(0);
13
+ };
14
+ const handleProcess = (config) => {
15
+ writeTrace(`Using the following arguments to process the script: ${process.argv.join(", ")}`, config);
16
+ process.on("unhandledRejection", (error) => {
17
+ writeError(`An Unhandled Rejection occurred while running the program: ${error && typeof error === "object" && "message" in error && error?.message ? error.message : typeof error === "string" ? error : "Unknown error"} \nStacktrace: ${error && typeof error === "object" && "stack" in error && error?.stack ? error.stack : ""}`, config);
18
+ exitWithError(config);
19
+ });
20
+ process.on("uncaughtException", (error) => {
21
+ writeError(`An Uncaught Exception occurred while running the program: ${error && typeof error === "object" && "message" in error && error?.message ? error.message : typeof error === "string" ? error : "Unknown error"} \nStacktrace: ${error && typeof error === "object" && "stack" in error && error?.stack ? error.stack : ""}`, config);
22
+ exitWithError(config);
23
+ });
24
+ process.on("SIGTERM", (signal) => {
25
+ writeError(`The program terminated with signal code: ${signal}`, config);
26
+ exitWithError(config);
27
+ });
28
+ process.on("SIGINT", (signal) => {
29
+ writeError(`The program terminated with signal code: ${signal}`, config);
30
+ exitWithError(config);
31
+ });
32
+ process.on("SIGHUP", (signal) => {
33
+ writeError(`The program terminated with signal code: ${signal}`, config);
34
+ exitWithError(config);
35
+ });
36
+ };
37
+ //#endregion
38
+ export { exitWithError, exitWithSuccess, handleProcess };