@storm-software/config-tools 1.150.5 → 1.150.9

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 (130) hide show
  1. package/README.md +1 -1
  2. package/bin/config.cjs +14795 -283
  3. package/bin/config.js +14806 -266
  4. package/dist/chunk-2MY3KGBB.cjs +70 -0
  5. package/dist/chunk-322YBAWX.js +6 -0
  6. package/dist/chunk-3BGF4LNL.cjs +67 -0
  7. package/dist/chunk-3OZGKUMC.js +1120 -0
  8. package/dist/chunk-4CTFS6DM.js +143 -0
  9. package/dist/chunk-4YA7DJB5.cjs +451 -0
  10. package/dist/chunk-56RY3KW7.cjs +6 -0
  11. package/dist/chunk-5LYWI7E7.cjs +49 -0
  12. package/dist/chunk-5SDU662B.js +274 -0
  13. package/dist/chunk-5XAQKBRL.js +510 -0
  14. package/dist/chunk-6JG5O6FD.js +2645 -0
  15. package/dist/chunk-6R6FJLKT.cjs +84 -0
  16. package/dist/chunk-6ZPVROB4.js +51 -0
  17. package/dist/chunk-73C3QB67.js +27 -0
  18. package/dist/chunk-77YC3XPW.js +9228 -0
  19. package/dist/chunk-7PDFNXOV.js +67 -0
  20. package/dist/chunk-B2HXAAFT.cjs +274 -0
  21. package/dist/chunk-BKJUQIEL.cjs +6 -0
  22. package/dist/chunk-CHYZZRN6.cjs +165 -0
  23. package/dist/chunk-CUX3BOLK.cjs +6 -0
  24. package/dist/chunk-DYTSQ3L3.js +14 -0
  25. package/dist/chunk-E554LMEP.cjs +28 -0
  26. package/dist/chunk-FUALBFYR.cjs +247 -0
  27. package/dist/chunk-FZMUKCM5.js +50 -0
  28. package/dist/chunk-G62PQROD.cjs +510 -0
  29. package/dist/chunk-GJDVCWVL.cjs +27 -0
  30. package/dist/chunk-GZ6SGFYZ.cjs +2645 -0
  31. package/dist/chunk-HAYTD5F2.js +247 -0
  32. package/dist/chunk-HBJSM6VU.js +6 -0
  33. package/dist/chunk-HLB4MOTZ.js +6 -0
  34. package/dist/chunk-HUMXKKE6.js +765 -0
  35. package/dist/chunk-HVVHVCVH.js +24 -0
  36. package/dist/chunk-I2LFMHGF.cjs +14 -0
  37. package/dist/chunk-I5FJ2QOS.js +84 -0
  38. package/dist/chunk-IYMLNFGA.cjs +33 -0
  39. package/dist/chunk-JN37L7NL.js +33 -0
  40. package/dist/chunk-JVONSFJS.cjs +765 -0
  41. package/dist/chunk-KN7POPML.cjs +21 -0
  42. package/dist/chunk-KONO4OMT.cjs +9231 -0
  43. package/dist/chunk-KQLERSRE.js +93 -0
  44. package/dist/chunk-KXHNOCVY.cjs +24 -0
  45. package/dist/chunk-LAIQ2Z5B.cjs +93 -0
  46. package/dist/chunk-LUQRLSMI.js +6 -0
  47. package/dist/chunk-M3KQNO7N.cjs +93 -0
  48. package/dist/chunk-MJL6D7T3.js +28 -0
  49. package/dist/chunk-MKB5GTL4.js +451 -0
  50. package/dist/chunk-MMMRCNC6.js +77 -0
  51. package/dist/chunk-NERZUU47.js +93 -0
  52. package/dist/chunk-NVXMXDZM.js +70 -0
  53. package/dist/chunk-NWFS53UA.js +21 -0
  54. package/dist/chunk-PBEGXSGU.js +165 -0
  55. package/dist/chunk-PMRCDW2Q.cjs +44 -0
  56. package/dist/chunk-RDWCJD4I.cjs +30 -0
  57. package/dist/chunk-RN5XBSCX.cjs +77 -0
  58. package/dist/chunk-TJ7RSPG3.cjs +6 -0
  59. package/dist/chunk-US52HP52.cjs +143 -0
  60. package/dist/chunk-UXYX4UF4.cjs +50 -0
  61. package/dist/chunk-W7YJIINP.js +49 -0
  62. package/dist/chunk-WTHXS4H2.js +44 -0
  63. package/dist/chunk-X3T2GC65.cjs +51 -0
  64. package/dist/chunk-XUGBUGHC.cjs +1120 -0
  65. package/dist/chunk-YO6XHACG.js +30 -0
  66. package/dist/config-file/get-config-file.cjs +26 -66
  67. package/dist/config-file/get-config-file.js +25 -65
  68. package/dist/config-file/index.cjs +31 -1
  69. package/dist/config-file/index.js +31 -1
  70. package/dist/create-storm-config.cjs +30 -68
  71. package/dist/create-storm-config.js +29 -67
  72. package/dist/env/get-env.cjs +8 -152
  73. package/dist/env/get-env.js +7 -151
  74. package/dist/env/index.cjs +19 -2
  75. package/dist/env/index.js +19 -2
  76. package/dist/env/set-env.cjs +8 -259
  77. package/dist/env/set-env.js +7 -258
  78. package/dist/esm-HKV66HQZ.js +1716 -0
  79. package/dist/esm-TZUWSATN.cjs +1716 -0
  80. package/dist/get-config.cjs +29 -9
  81. package/dist/get-config.js +29 -9
  82. package/dist/index.cjs +180 -7
  83. package/dist/index.js +180 -7
  84. package/dist/json5-NI4CISQP.cjs +10 -0
  85. package/dist/json5-XMK3UBET.js +10 -0
  86. package/dist/jsonc-GYGN4BMZ.js +15 -0
  87. package/dist/jsonc-TDL6NXBV.cjs +15 -0
  88. package/dist/logger/chalk.cjs +4 -30
  89. package/dist/logger/chalk.js +3 -29
  90. package/dist/logger/console-icons.cjs +5 -15
  91. package/dist/logger/console-icons.js +5 -15
  92. package/dist/logger/console.cjs +37 -125
  93. package/dist/logger/console.js +23 -111
  94. package/dist/logger/create-logger.cjs +15 -31
  95. package/dist/logger/create-logger.js +14 -30
  96. package/dist/logger/format-timestamp.cjs +3 -5
  97. package/dist/logger/format-timestamp.js +3 -5
  98. package/dist/logger/get-log-level.cjs +6 -56
  99. package/dist/logger/get-log-level.js +6 -56
  100. package/dist/logger/index.cjs +61 -7
  101. package/dist/logger/index.js +61 -7
  102. package/dist/logger/is-unicode-supported.cjs +4 -16
  103. package/dist/logger/is-unicode-supported.js +3 -15
  104. package/dist/toml-5NX5FGDD.cjs +10 -0
  105. package/dist/toml-ZYXFVZLI.js +10 -0
  106. package/dist/types.cjs +6 -24
  107. package/dist/types.js +5 -23
  108. package/dist/utilities/apply-workspace-tokens.cjs +9 -55
  109. package/dist/utilities/apply-workspace-tokens.js +8 -54
  110. package/dist/utilities/correct-paths.cjs +33 -242
  111. package/dist/utilities/correct-paths.js +16 -225
  112. package/dist/utilities/file-path-utils.cjs +5 -18
  113. package/dist/utilities/file-path-utils.js +4 -17
  114. package/dist/utilities/find-up.cjs +4 -22
  115. package/dist/utilities/find-up.js +3 -21
  116. package/dist/utilities/find-workspace-root.cjs +7 -64
  117. package/dist/utilities/find-workspace-root.js +6 -63
  118. package/dist/utilities/get-default-config.cjs +7 -79
  119. package/dist/utilities/get-default-config.js +7 -79
  120. package/dist/utilities/index.cjs +84 -7
  121. package/dist/utilities/index.js +84 -7
  122. package/dist/utilities/process-handler.cjs +16 -35
  123. package/dist/utilities/process-handler.js +16 -35
  124. package/dist/utilities/run.cjs +6 -34
  125. package/dist/utilities/run.js +5 -33
  126. package/dist/yaml-GRT7ORXT.cjs +10 -0
  127. package/dist/yaml-WD4DF2QH.js +10 -0
  128. package/package.json +7 -4
  129. package/dist/chunk-SHUYVCID.js +0 -6
  130. package/dist/chunk-USNT2KNT.cjs +0 -6
@@ -1,7 +1,61 @@
1
- export * from "./chalk";
2
- export * from "./console";
3
- export * from "./console-icons";
4
- export * from "./create-logger";
5
- export * from "./format-timestamp";
6
- export * from "./get-log-level";
7
- export * from "./is-unicode-supported";
1
+ import "../chunk-HBJSM6VU.js";
2
+ import {
3
+ createLogger
4
+ } from "../chunk-FZMUKCM5.js";
5
+ import {
6
+ formatLogMessage,
7
+ getLogFn,
8
+ getStopwatch,
9
+ writeDebug,
10
+ writeError,
11
+ writeFatal,
12
+ writeInfo,
13
+ writeSuccess,
14
+ writeSystem,
15
+ writeTrace,
16
+ writeWarning
17
+ } from "../chunk-4CTFS6DM.js";
18
+ import "../chunk-KQLERSRE.js";
19
+ import "../chunk-MMMRCNC6.js";
20
+ import "../chunk-YO6XHACG.js";
21
+ import {
22
+ getChalk
23
+ } from "../chunk-6JG5O6FD.js";
24
+ import {
25
+ CONSOLE_ICONS
26
+ } from "../chunk-MJL6D7T3.js";
27
+ import {
28
+ isUnicodeSupported
29
+ } from "../chunk-HVVHVCVH.js";
30
+ import {
31
+ formatTimestamp
32
+ } from "../chunk-DYTSQ3L3.js";
33
+ import "../chunk-HAYTD5F2.js";
34
+ import {
35
+ getLogLevel,
36
+ getLogLevelLabel,
37
+ isVerbose
38
+ } from "../chunk-NVXMXDZM.js";
39
+ import "../chunk-JN37L7NL.js";
40
+ import "../chunk-W7YJIINP.js";
41
+ export {
42
+ CONSOLE_ICONS,
43
+ createLogger,
44
+ formatLogMessage,
45
+ formatTimestamp,
46
+ getChalk,
47
+ getLogFn,
48
+ getLogLevel,
49
+ getLogLevelLabel,
50
+ getStopwatch,
51
+ isUnicodeSupported,
52
+ isVerbose,
53
+ writeDebug,
54
+ writeError,
55
+ writeFatal,
56
+ writeInfo,
57
+ writeSuccess,
58
+ writeSystem,
59
+ writeTrace,
60
+ writeWarning
61
+ };
@@ -1,19 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkUSNT2KNTcjs = require('../chunk-USNT2KNT.cjs');
4
- var _nodeprocess = require('node:process'); var _nodeprocess2 = _interopRequireDefault(_nodeprocess);
5
- function isUnicodeSupported() {
6
- const { env } = _nodeprocess2.default;
7
- const { TERM, TERM_PROGRAM } = env;
8
- if (_nodeprocess2.default.platform !== "win32") {
9
- return TERM !== "linux";
10
- }
11
- return Boolean(env.WT_SESSION) || // Windows Terminal
12
- Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
13
- env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
14
- TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
15
- }
16
- _chunkUSNT2KNTcjs.__name.call(void 0, isUnicodeSupported, "isUnicodeSupported");
3
+ var _chunkKXHNOCVYcjs = require('../chunk-KXHNOCVY.cjs');
4
+ require('../chunk-5LYWI7E7.cjs');
17
5
 
18
6
 
19
- exports.isUnicodeSupported = isUnicodeSupported;
7
+ exports.isUnicodeSupported = _chunkKXHNOCVYcjs.isUnicodeSupported;
@@ -1,19 +1,7 @@
1
1
  import {
2
- __name
3
- } from "../chunk-SHUYVCID.js";
4
- import process from "node:process";
5
- function isUnicodeSupported() {
6
- const { env } = process;
7
- const { TERM, TERM_PROGRAM } = env;
8
- if (process.platform !== "win32") {
9
- return TERM !== "linux";
10
- }
11
- return Boolean(env.WT_SESSION) || // Windows Terminal
12
- Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
13
- env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
14
- TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
15
- }
16
- __name(isUnicodeSupported, "isUnicodeSupported");
2
+ isUnicodeSupported
3
+ } from "../chunk-HVVHVCVH.js";
4
+ import "../chunk-W7YJIINP.js";
17
5
  export {
18
6
  isUnicodeSupported
19
7
  };
@@ -0,0 +1,10 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkG62PQRODcjs = require('./chunk-G62PQROD.cjs');
5
+ require('./chunk-6R6FJLKT.cjs');
6
+ require('./chunk-5LYWI7E7.cjs');
7
+
8
+
9
+
10
+ exports.parseTOML = _chunkG62PQRODcjs.ae; exports.stringifyTOML = _chunkG62PQRODcjs.ue;
@@ -0,0 +1,10 @@
1
+ import {
2
+ ae,
3
+ ue
4
+ } from "./chunk-5XAQKBRL.js";
5
+ import "./chunk-I5FJ2QOS.js";
6
+ import "./chunk-W7YJIINP.js";
7
+ export {
8
+ ae as parseTOML,
9
+ ue as stringifyTOML
10
+ };
package/dist/types.cjs CHANGED
@@ -1,27 +1,9 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-USNT2KNT.cjs');
2
- const LogLevel = {
3
- SILENT: 0,
4
- FATAL: 10,
5
- ERROR: 20,
6
- WARN: 30,
7
- SUCCESS: 35,
8
- INFO: 40,
9
- DEBUG: 60,
10
- TRACE: 70,
11
- ALL: 100
12
- };
13
- const LogLevelLabel = {
14
- SILENT: "silent",
15
- FATAL: "fatal",
16
- ERROR: "error",
17
- WARN: "warn",
18
- SUCCESS: "success",
19
- INFO: "info",
20
- DEBUG: "debug",
21
- TRACE: "trace",
22
- ALL: "all"
23
- };
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
24
2
 
25
3
 
4
+ var _chunkIYMLNFGAcjs = require('./chunk-IYMLNFGA.cjs');
5
+ require('./chunk-5LYWI7E7.cjs');
26
6
 
27
- exports.LogLevel = LogLevel; exports.LogLevelLabel = LogLevelLabel;
7
+
8
+
9
+ exports.LogLevel = _chunkIYMLNFGAcjs.LogLevel; exports.LogLevelLabel = _chunkIYMLNFGAcjs.LogLevelLabel;
package/dist/types.js CHANGED
@@ -1,26 +1,8 @@
1
- import "./chunk-SHUYVCID.js";
2
- const LogLevel = {
3
- SILENT: 0,
4
- FATAL: 10,
5
- ERROR: 20,
6
- WARN: 30,
7
- SUCCESS: 35,
8
- INFO: 40,
9
- DEBUG: 60,
10
- TRACE: 70,
11
- ALL: 100
12
- };
13
- const LogLevelLabel = {
14
- SILENT: "silent",
15
- FATAL: "fatal",
16
- ERROR: "error",
17
- WARN: "warn",
18
- SUCCESS: "success",
19
- INFO: "info",
20
- DEBUG: "debug",
21
- TRACE: "trace",
22
- ALL: "all"
23
- };
1
+ import {
2
+ LogLevel,
3
+ LogLevelLabel
4
+ } from "./chunk-JN37L7NL.js";
5
+ import "./chunk-W7YJIINP.js";
24
6
  export {
25
7
  LogLevel,
26
8
  LogLevelLabel
@@ -1,60 +1,14 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkUSNT2KNTcjs = require('../chunk-USNT2KNT.cjs');
4
- var _findworkspaceroot = require('./find-workspace-root');
5
- const applyWorkspaceBaseTokens = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (option, tokenParams) => {
6
- let result = option;
7
- if (!result) {
8
- return result;
9
- }
10
- if (tokenParams) {
11
- const optionKeys = Object.keys(tokenParams);
12
- if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
13
- for (const optionKey of optionKeys) {
14
- if (result.includes(`{${optionKey}}`)) {
15
- result = result.replaceAll(`{${optionKey}}`, _optionalChain([tokenParams, 'optionalAccess', _ => _[optionKey]]) || "");
16
- }
17
- }
18
- }
19
- }
20
- if (tokenParams.config) {
21
- const configKeys = Object.keys(tokenParams.config);
22
- if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
23
- for (const configKey of configKeys) {
24
- if (result.includes(`{${configKey}}`)) {
25
- result = result.replaceAll(`{${configKey}}`, tokenParams.config[configKey] || "");
26
- }
27
- }
28
- }
29
- }
30
- if (result.includes("{workspaceRoot}")) {
31
- result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.workspaceRoot]))), () => ( _findworkspaceroot.findWorkspaceRoot.call(void 0, ))));
32
- }
33
- return result;
34
- }, "applyWorkspaceBaseTokens");
35
- const applyWorkspaceProjectTokens = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (option, tokenParams) => {
36
- return applyWorkspaceBaseTokens(option, tokenParams);
37
- }, "applyWorkspaceProjectTokens");
38
- const applyWorkspaceTokens = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (options, tokenParams, tokenizerFn) => {
39
- if (!options) {
40
- return {};
41
- }
42
- const result = {};
43
- for (const option of Object.keys(options)) {
44
- if (typeof options[option] === "string") {
45
- result[option] = await Promise.resolve(tokenizerFn(options[option], tokenParams));
46
- } else if (Array.isArray(options[option])) {
47
- result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item));
48
- } else if (typeof options[option] === "object") {
49
- result[option] = await applyWorkspaceTokens(options[option], tokenParams, tokenizerFn);
50
- } else {
51
- result[option] = options[option];
52
- }
53
- }
54
- return result;
55
- }, "applyWorkspaceTokens");
56
3
 
57
4
 
5
+ var _chunk3BGF4LNLcjs = require('../chunk-3BGF4LNL.cjs');
6
+ require('../chunk-RN5XBSCX.cjs');
7
+ require('../chunk-RDWCJD4I.cjs');
8
+ require('../chunk-FUALBFYR.cjs');
9
+ require('../chunk-5LYWI7E7.cjs');
58
10
 
59
11
 
60
- exports.applyWorkspaceBaseTokens = applyWorkspaceBaseTokens; exports.applyWorkspaceProjectTokens = applyWorkspaceProjectTokens; exports.applyWorkspaceTokens = applyWorkspaceTokens;
12
+
13
+
14
+ exports.applyWorkspaceBaseTokens = _chunk3BGF4LNLcjs.applyWorkspaceBaseTokens; exports.applyWorkspaceProjectTokens = _chunk3BGF4LNLcjs.applyWorkspaceProjectTokens; exports.applyWorkspaceTokens = _chunk3BGF4LNLcjs.applyWorkspaceTokens;
@@ -1,58 +1,12 @@
1
1
  import {
2
- __name
3
- } from "../chunk-SHUYVCID.js";
4
- import { findWorkspaceRoot } from "./find-workspace-root";
5
- const applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams) => {
6
- let result = option;
7
- if (!result) {
8
- return result;
9
- }
10
- if (tokenParams) {
11
- const optionKeys = Object.keys(tokenParams);
12
- if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
13
- for (const optionKey of optionKeys) {
14
- if (result.includes(`{${optionKey}}`)) {
15
- result = result.replaceAll(`{${optionKey}}`, tokenParams?.[optionKey] || "");
16
- }
17
- }
18
- }
19
- }
20
- if (tokenParams.config) {
21
- const configKeys = Object.keys(tokenParams.config);
22
- if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
23
- for (const configKey of configKeys) {
24
- if (result.includes(`{${configKey}}`)) {
25
- result = result.replaceAll(`{${configKey}}`, tokenParams.config[configKey] || "");
26
- }
27
- }
28
- }
29
- }
30
- if (result.includes("{workspaceRoot}")) {
31
- result = result.replaceAll("{workspaceRoot}", tokenParams.workspaceRoot ?? tokenParams.config?.workspaceRoot ?? findWorkspaceRoot());
32
- }
33
- return result;
34
- }, "applyWorkspaceBaseTokens");
35
- const applyWorkspaceProjectTokens = /* @__PURE__ */ __name((option, tokenParams) => {
36
- return applyWorkspaceBaseTokens(option, tokenParams);
37
- }, "applyWorkspaceProjectTokens");
38
- const applyWorkspaceTokens = /* @__PURE__ */ __name(async (options, tokenParams, tokenizerFn) => {
39
- if (!options) {
40
- return {};
41
- }
42
- const result = {};
43
- for (const option of Object.keys(options)) {
44
- if (typeof options[option] === "string") {
45
- result[option] = await Promise.resolve(tokenizerFn(options[option], tokenParams));
46
- } else if (Array.isArray(options[option])) {
47
- result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item));
48
- } else if (typeof options[option] === "object") {
49
- result[option] = await applyWorkspaceTokens(options[option], tokenParams, tokenizerFn);
50
- } else {
51
- result[option] = options[option];
52
- }
53
- }
54
- return result;
55
- }, "applyWorkspaceTokens");
2
+ applyWorkspaceBaseTokens,
3
+ applyWorkspaceProjectTokens,
4
+ applyWorkspaceTokens
5
+ } from "../chunk-7PDFNXOV.js";
6
+ import "../chunk-MMMRCNC6.js";
7
+ import "../chunk-YO6XHACG.js";
8
+ import "../chunk-HAYTD5F2.js";
9
+ import "../chunk-W7YJIINP.js";
56
10
  export {
57
11
  applyWorkspaceBaseTokens,
58
12
  applyWorkspaceProjectTokens,
@@ -1,242 +1,33 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkUSNT2KNTcjs = require('../chunk-USNT2KNT.cjs');
4
- const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
5
- function normalizeWindowsPath(input = "") {
6
- if (!input) {
7
- return input;
8
- }
9
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
10
- }
11
- _chunkUSNT2KNTcjs.__name.call(void 0, normalizeWindowsPath, "normalizeWindowsPath");
12
- const _UNC_REGEX = /^[/\\]{2}/;
13
- const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
14
- const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
15
- const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
16
- const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
17
- const _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
18
- const sep = "/";
19
- const correctPaths = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(path) {
20
- if (!path || path.length === 0) {
21
- return ".";
22
- }
23
- path = normalizeWindowsPath(path);
24
- const isUNCPath = path.match(_UNC_REGEX);
25
- const isPathAbsolute = isAbsolute(path);
26
- const trailingSeparator = path[path.length - 1] === "/";
27
- path = normalizeString(path, !isPathAbsolute);
28
- if (path.length === 0) {
29
- if (isPathAbsolute) {
30
- return "/";
31
- }
32
- return trailingSeparator ? "./" : ".";
33
- }
34
- if (trailingSeparator) {
35
- path += "/";
36
- }
37
- if (_DRIVE_LETTER_RE.test(path)) {
38
- path += "/";
39
- }
40
- if (isUNCPath) {
41
- if (!isPathAbsolute) {
42
- return `//./${path}`;
43
- }
44
- return `//${path}`;
45
- }
46
- return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
47
- }, "correctPaths");
48
- const joinPaths = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(...segments) {
49
- let path = "";
50
- for (const seg of segments) {
51
- if (!seg) {
52
- continue;
53
- }
54
- if (path.length > 0) {
55
- const pathTrailing = path[path.length - 1] === "/";
56
- const segLeading = seg[0] === "/";
57
- const both = pathTrailing && segLeading;
58
- if (both) {
59
- path += seg.slice(1);
60
- } else {
61
- path += pathTrailing || segLeading ? seg : `/${seg}`;
62
- }
63
- } else {
64
- path += seg;
65
- }
66
- }
67
- return correctPaths(path);
68
- }, "joinPaths");
69
- function cwd() {
70
- if (typeof process !== "undefined" && typeof process.cwd === "function") {
71
- return process.cwd().replace(/\\/g, "/");
72
- }
73
- return "/";
74
- }
75
- _chunkUSNT2KNTcjs.__name.call(void 0, cwd, "cwd");
76
- const resolve = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(...arguments_) {
77
- arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
78
- let resolvedPath = "";
79
- let resolvedAbsolute = false;
80
- for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
81
- const path = index >= 0 ? arguments_[index] : cwd();
82
- if (!path || path.length === 0) {
83
- continue;
84
- }
85
- resolvedPath = `${path}/${resolvedPath}`;
86
- resolvedAbsolute = isAbsolute(path);
87
- }
88
- resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
89
- if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
90
- return `/${resolvedPath}`;
91
- }
92
- return resolvedPath.length > 0 ? resolvedPath : ".";
93
- }, "resolve");
94
- function normalizeString(path, allowAboveRoot) {
95
- let res = "";
96
- let lastSegmentLength = 0;
97
- let lastSlash = -1;
98
- let dots = 0;
99
- let char = null;
100
- for (let index = 0; index <= path.length; ++index) {
101
- if (index < path.length) {
102
- char = path[index];
103
- } else if (char === "/") {
104
- break;
105
- } else {
106
- char = "/";
107
- }
108
- if (char === "/") {
109
- if (lastSlash === index - 1 || dots === 1) {
110
- } else if (dots === 2) {
111
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
112
- if (res.length > 2) {
113
- const lastSlashIndex = res.lastIndexOf("/");
114
- if (lastSlashIndex === -1) {
115
- res = "";
116
- lastSegmentLength = 0;
117
- } else {
118
- res = res.slice(0, lastSlashIndex);
119
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
120
- }
121
- lastSlash = index;
122
- dots = 0;
123
- continue;
124
- } else if (res.length > 0) {
125
- res = "";
126
- lastSegmentLength = 0;
127
- lastSlash = index;
128
- dots = 0;
129
- continue;
130
- }
131
- }
132
- if (allowAboveRoot) {
133
- res += res.length > 0 ? "/.." : "..";
134
- lastSegmentLength = 2;
135
- }
136
- } else {
137
- if (res.length > 0) {
138
- res += `/${path.slice(lastSlash + 1, index)}`;
139
- } else {
140
- res = path.slice(lastSlash + 1, index);
141
- }
142
- lastSegmentLength = index - lastSlash - 1;
143
- }
144
- lastSlash = index;
145
- dots = 0;
146
- } else if (char === "." && dots !== -1) {
147
- ++dots;
148
- } else {
149
- dots = -1;
150
- }
151
- }
152
- return res;
153
- }
154
- _chunkUSNT2KNTcjs.__name.call(void 0, normalizeString, "normalizeString");
155
- const isAbsolute = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p) {
156
- return _IS_ABSOLUTE_RE.test(p);
157
- }, "isAbsolute");
158
- const toNamespacedPath = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p) {
159
- return normalizeWindowsPath(p);
160
- }, "toNamespacedPath");
161
- const extname = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p) {
162
- if (p === "..") return "";
163
- const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
164
- return match && match[1] || "";
165
- }, "extname");
166
- const relative = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(from, to) {
167
- const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
168
- const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
169
- if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
170
- return _to.join("/");
171
- }
172
- const _fromCopy = [
173
- ..._from
174
- ];
175
- for (const segment of _fromCopy) {
176
- if (_to[0] !== segment) {
177
- break;
178
- }
179
- _from.shift();
180
- _to.shift();
181
- }
182
- return [
183
- ..._from.map(() => ".."),
184
- ..._to
185
- ].join("/");
186
- }, "relative");
187
- const dirname = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p) {
188
- const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
189
- if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
190
- segments[0] += "/";
191
- }
192
- return segments.join("/") || (isAbsolute(p) ? "/" : ".");
193
- }, "dirname");
194
- const format = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p) {
195
- const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
196
- const segments = [
197
- p.root,
198
- p.dir,
199
- _nullishCoalesce(p.base, () => ( (_nullishCoalesce(p.name, () => ( ""))) + ext))
200
- ].filter(Boolean);
201
- return normalizeWindowsPath(p.root ? resolve(...segments) : segments.join("/"));
202
- }, "format");
203
- const basename = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p, extension) {
204
- const segments = normalizeWindowsPath(p).split("/");
205
- let lastSegment = "";
206
- for (let i = segments.length - 1; i >= 0; i--) {
207
- const val = segments[i];
208
- if (val) {
209
- lastSegment = val;
210
- break;
211
- }
212
- }
213
- return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
214
- }, "basename");
215
- const parse = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p) {
216
- const root = _optionalChain([_PATH_ROOT_RE, 'access', _ => _.exec, 'call', _2 => _2(p), 'optionalAccess', _3 => _3[0], 'optionalAccess', _4 => _4.replace, 'call', _5 => _5(/\\/g, "/")]) || "";
217
- const base = basename(p);
218
- const extension = extname(base);
219
- return {
220
- root,
221
- dir: dirname(p),
222
- base,
223
- ext: extension,
224
- name: base.slice(0, base.length - extension.length)
225
- };
226
- }, "parse");
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
-
238
-
239
-
240
-
241
-
242
- exports.basename = basename; exports.correctPaths = correctPaths; exports.dirname = dirname; exports.extname = extname; exports.format = format; exports.isAbsolute = isAbsolute; exports.joinPaths = joinPaths; exports.normalizeString = normalizeString; exports.normalizeWindowsPath = normalizeWindowsPath; exports.parse = parse; exports.relative = relative; exports.resolve = resolve; exports.sep = sep; exports.toNamespacedPath = toNamespacedPath;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+ var _chunkFUALBFYRcjs = require('../chunk-FUALBFYR.cjs');
17
+ require('../chunk-5LYWI7E7.cjs');
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+ exports.basename = _chunkFUALBFYRcjs.basename; exports.correctPaths = _chunkFUALBFYRcjs.correctPaths; exports.dirname = _chunkFUALBFYRcjs.dirname; exports.extname = _chunkFUALBFYRcjs.extname; exports.format = _chunkFUALBFYRcjs.format; exports.isAbsolute = _chunkFUALBFYRcjs.isAbsolute; exports.joinPaths = _chunkFUALBFYRcjs.joinPaths; exports.normalizeString = _chunkFUALBFYRcjs.normalizeString; exports.normalizeWindowsPath = _chunkFUALBFYRcjs.normalizeWindowsPath; exports.parse = _chunkFUALBFYRcjs.parse; exports.relative = _chunkFUALBFYRcjs.relative; exports.resolve = _chunkFUALBFYRcjs.resolve; exports.sep = _chunkFUALBFYRcjs.sep; exports.toNamespacedPath = _chunkFUALBFYRcjs.toNamespacedPath;