@powerlines/plugin-automd 0.1.340 → 0.1.342

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 (113) hide show
  1. package/README.md +14 -16
  2. package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -3
  3. package/dist/_virtual/_rolldown/runtime.mjs +3 -0
  4. package/dist/index.cjs +26 -27
  5. package/dist/index.d.cts +0 -1
  6. package/dist/index.d.cts.map +1 -1
  7. package/dist/index.d.mts +0 -1
  8. package/dist/index.d.mts.map +1 -1
  9. package/dist/index.mjs +5 -6
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/types/plugin.d.cts.map +1 -1
  12. package/dist/types/plugin.d.mts +1 -1
  13. package/dist/types/plugin.d.mts.map +1 -1
  14. package/dist/types/toc.d.cts.map +1 -1
  15. package/dist/types/toc.d.mts.map +1 -1
  16. package/package.json +20 -18
  17. package/dist/_virtual/rolldown_runtime.mjs +0 -32
  18. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.cjs +0 -78
  19. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +0 -78
  20. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +0 -1
  21. package/dist/node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.cjs +0 -5089
  22. package/dist/node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.mjs +0 -5089
  23. package/dist/node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.mjs.map +0 -1
  24. package/dist/node_modules/.pnpm/automd@0.4.3_patch_hash_5b5d5334735dce5e1ae79d8924a5aa49e4139453056613d618786b961793a42b_magicast@0.5.2/node_modules/automd/dist/index.cjs +0 -654
  25. package/dist/node_modules/.pnpm/automd@0.4.3_patch_hash_5b5d5334735dce5e1ae79d8924a5aa49e4139453056613d618786b961793a42b_magicast@0.5.2/node_modules/automd/dist/index.mjs +0 -652
  26. package/dist/node_modules/.pnpm/automd@0.4.3_patch_hash_5b5d5334735dce5e1ae79d8924a5aa49e4139453056613d618786b961793a42b_magicast@0.5.2/node_modules/automd/dist/index.mjs.map +0 -1
  27. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.cjs +0 -23
  28. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs +0 -23
  29. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs.map +0 -1
  30. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.cjs +0 -10
  31. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs +0 -11
  32. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs.map +0 -1
  33. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.cjs +0 -388
  34. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs +0 -388
  35. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs.map +0 -1
  36. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.cjs +0 -11
  37. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs +0 -12
  38. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs.map +0 -1
  39. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +0 -46
  40. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +0 -46
  41. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs.map +0 -1
  42. package/dist/node_modules/.pnpm/didyoumean2@7.0.4/node_modules/didyoumean2/dist/index.cjs +0 -204
  43. package/dist/node_modules/.pnpm/didyoumean2@7.0.4/node_modules/didyoumean2/dist/index.mjs +0 -203
  44. package/dist/node_modules/.pnpm/didyoumean2@7.0.4/node_modules/didyoumean2/dist/index.mjs.map +0 -1
  45. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +0 -1013
  46. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +0 -1008
  47. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +0 -1
  48. package/dist/node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/mod.cjs +0 -128
  49. package/dist/node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/mod.mjs +0 -124
  50. package/dist/node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/mod.mjs.map +0 -1
  51. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/babel.cjs +0 -41464
  52. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/babel.mjs +0 -41462
  53. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/babel.mjs.map +0 -1
  54. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/jiti.cjs +0 -4387
  55. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/jiti.mjs +0 -4385
  56. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/dist/jiti.mjs.map +0 -1
  57. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.cjs +0 -26
  58. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.mjs +0 -27
  59. package/dist/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.mjs.map +0 -1
  60. package/dist/node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.cjs +0 -370
  61. package/dist/node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.mjs +0 -368
  62. package/dist/node_modules/.pnpm/lodash.deburr@4.1.0/node_modules/lodash.deburr/index.mjs.map +0 -1
  63. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.cjs +0 -939
  64. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs +0 -940
  65. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs.map +0 -1
  66. package/dist/node_modules/.pnpm/mdbox@0.1.1/node_modules/mdbox/dist/index.cjs +0 -67
  67. package/dist/node_modules/.pnpm/mdbox@0.1.1/node_modules/mdbox/dist/index.mjs +0 -65
  68. package/dist/node_modules/.pnpm/mdbox@0.1.1/node_modules/mdbox/dist/index.mjs.map +0 -1
  69. package/dist/node_modules/.pnpm/mlly@1.8.1/node_modules/mlly/dist/index.cjs +0 -1350
  70. package/dist/node_modules/.pnpm/mlly@1.8.1/node_modules/mlly/dist/index.mjs +0 -1343
  71. package/dist/node_modules/.pnpm/mlly@1.8.1/node_modules/mlly/dist/index.mjs.map +0 -1
  72. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +0 -179
  73. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +0 -178
  74. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +0 -1
  75. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +0 -20
  76. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +0 -17
  77. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs.map +0 -1
  78. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs +0 -3975
  79. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +0 -3962
  80. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +0 -1
  81. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.cjs +0 -16
  82. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs +0 -15
  83. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs.map +0 -1
  84. package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.cjs +0 -36
  85. package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs +0 -34
  86. package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs.map +0 -1
  87. package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.cjs +0 -227
  88. package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs +0 -226
  89. package/dist/node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs.map +0 -1
  90. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs +0 -139
  91. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +0 -134
  92. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs.map +0 -1
  93. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +0 -78
  94. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +0 -78
  95. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +0 -1
  96. package/dist/node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.cjs +0 -72
  97. package/dist/node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs +0 -70
  98. package/dist/node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs.map +0 -1
  99. package/dist/node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.cjs +0 -181
  100. package/dist/node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs +0 -179
  101. package/dist/node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs.map +0 -1
  102. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/babel.cjs +0 -12337
  103. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/babel.mjs +0 -12338
  104. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/babel.mjs.map +0 -1
  105. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.cjs +0 -19
  106. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.mjs +0 -19
  107. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.mjs.map +0 -1
  108. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.cjs +0 -71
  109. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs +0 -72
  110. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs.map +0 -1
  111. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.cjs +0 -110
  112. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs +0 -101
  113. package/dist/node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs.map +0 -1
@@ -1,139 +0,0 @@
1
-
2
- //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
3
- const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
4
- function normalizeWindowsPath(input = "") {
5
- if (!input) return input;
6
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
7
- }
8
- const _UNC_REGEX = /^[/\\]{2}/;
9
- const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
10
- const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
11
- const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
12
- const normalize = function(path) {
13
- if (path.length === 0) return ".";
14
- path = normalizeWindowsPath(path);
15
- const isUNCPath = path.match(_UNC_REGEX);
16
- const isPathAbsolute = isAbsolute(path);
17
- const trailingSeparator = path[path.length - 1] === "/";
18
- path = normalizeString(path, !isPathAbsolute);
19
- if (path.length === 0) {
20
- if (isPathAbsolute) return "/";
21
- return trailingSeparator ? "./" : ".";
22
- }
23
- if (trailingSeparator) path += "/";
24
- if (_DRIVE_LETTER_RE.test(path)) path += "/";
25
- if (isUNCPath) {
26
- if (!isPathAbsolute) return `//./${path}`;
27
- return `//${path}`;
28
- }
29
- return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
30
- };
31
- const join = function(...segments) {
32
- let path = "";
33
- for (const seg of segments) {
34
- if (!seg) continue;
35
- if (path.length > 0) {
36
- const pathTrailing = path[path.length - 1] === "/";
37
- const segLeading = seg[0] === "/";
38
- if (pathTrailing && segLeading) path += seg.slice(1);
39
- else path += pathTrailing || segLeading ? seg : `/${seg}`;
40
- } else path += seg;
41
- }
42
- return normalize(path);
43
- };
44
- function cwd() {
45
- if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/");
46
- return "/";
47
- }
48
- const resolve = function(...arguments_) {
49
- arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
50
- let resolvedPath = "";
51
- let resolvedAbsolute = false;
52
- for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
53
- const path = index >= 0 ? arguments_[index] : cwd();
54
- if (!path || path.length === 0) continue;
55
- resolvedPath = `${path}/${resolvedPath}`;
56
- resolvedAbsolute = isAbsolute(path);
57
- }
58
- resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
59
- if (resolvedAbsolute && !isAbsolute(resolvedPath)) return `/${resolvedPath}`;
60
- return resolvedPath.length > 0 ? resolvedPath : ".";
61
- };
62
- function normalizeString(path, allowAboveRoot) {
63
- let res = "";
64
- let lastSegmentLength = 0;
65
- let lastSlash = -1;
66
- let dots = 0;
67
- let char = null;
68
- for (let index = 0; index <= path.length; ++index) {
69
- if (index < path.length) char = path[index];
70
- else if (char === "/") break;
71
- else char = "/";
72
- if (char === "/") {
73
- if (lastSlash === index - 1 || dots === 1);
74
- else if (dots === 2) {
75
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
76
- if (res.length > 2) {
77
- const lastSlashIndex = res.lastIndexOf("/");
78
- if (lastSlashIndex === -1) {
79
- res = "";
80
- lastSegmentLength = 0;
81
- } else {
82
- res = res.slice(0, lastSlashIndex);
83
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
84
- }
85
- lastSlash = index;
86
- dots = 0;
87
- continue;
88
- } else if (res.length > 0) {
89
- res = "";
90
- lastSegmentLength = 0;
91
- lastSlash = index;
92
- dots = 0;
93
- continue;
94
- }
95
- }
96
- if (allowAboveRoot) {
97
- res += res.length > 0 ? "/.." : "..";
98
- lastSegmentLength = 2;
99
- }
100
- } else {
101
- if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
102
- else res = path.slice(lastSlash + 1, index);
103
- lastSegmentLength = index - lastSlash - 1;
104
- }
105
- lastSlash = index;
106
- dots = 0;
107
- } else if (char === "." && dots !== -1) ++dots;
108
- else dots = -1;
109
- }
110
- return res;
111
- }
112
- const isAbsolute = function(p) {
113
- return _IS_ABSOLUTE_RE.test(p);
114
- };
115
- const extname = function(p) {
116
- if (p === "..") return "";
117
- const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
118
- return match && match[1] || "";
119
- };
120
- const basename = function(p, extension) {
121
- const segments = normalizeWindowsPath(p).split("/");
122
- let lastSegment = "";
123
- for (let i = segments.length - 1; i >= 0; i--) {
124
- const val = segments[i];
125
- if (val) {
126
- lastSegment = val;
127
- break;
128
- }
129
- }
130
- return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
131
- };
132
-
133
- //#endregion
134
- exports.basename = basename;
135
- exports.extname = extname;
136
- exports.isAbsolute = isAbsolute;
137
- exports.join = join;
138
- exports.normalize = normalize;
139
- exports.resolve = resolve;
@@ -1,134 +0,0 @@
1
- //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
2
- const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
3
- function normalizeWindowsPath(input = "") {
4
- if (!input) return input;
5
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
6
- }
7
- const _UNC_REGEX = /^[/\\]{2}/;
8
- const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
9
- const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
10
- const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
11
- const normalize = function(path) {
12
- if (path.length === 0) return ".";
13
- path = normalizeWindowsPath(path);
14
- const isUNCPath = path.match(_UNC_REGEX);
15
- const isPathAbsolute = isAbsolute(path);
16
- const trailingSeparator = path[path.length - 1] === "/";
17
- path = normalizeString(path, !isPathAbsolute);
18
- if (path.length === 0) {
19
- if (isPathAbsolute) return "/";
20
- return trailingSeparator ? "./" : ".";
21
- }
22
- if (trailingSeparator) path += "/";
23
- if (_DRIVE_LETTER_RE.test(path)) path += "/";
24
- if (isUNCPath) {
25
- if (!isPathAbsolute) return `//./${path}`;
26
- return `//${path}`;
27
- }
28
- return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
29
- };
30
- const join = function(...segments) {
31
- let path = "";
32
- for (const seg of segments) {
33
- if (!seg) continue;
34
- if (path.length > 0) {
35
- const pathTrailing = path[path.length - 1] === "/";
36
- const segLeading = seg[0] === "/";
37
- if (pathTrailing && segLeading) path += seg.slice(1);
38
- else path += pathTrailing || segLeading ? seg : `/${seg}`;
39
- } else path += seg;
40
- }
41
- return normalize(path);
42
- };
43
- function cwd() {
44
- if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/");
45
- return "/";
46
- }
47
- const resolve = function(...arguments_) {
48
- arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
49
- let resolvedPath = "";
50
- let resolvedAbsolute = false;
51
- for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
52
- const path = index >= 0 ? arguments_[index] : cwd();
53
- if (!path || path.length === 0) continue;
54
- resolvedPath = `${path}/${resolvedPath}`;
55
- resolvedAbsolute = isAbsolute(path);
56
- }
57
- resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
58
- if (resolvedAbsolute && !isAbsolute(resolvedPath)) return `/${resolvedPath}`;
59
- return resolvedPath.length > 0 ? resolvedPath : ".";
60
- };
61
- function normalizeString(path, allowAboveRoot) {
62
- let res = "";
63
- let lastSegmentLength = 0;
64
- let lastSlash = -1;
65
- let dots = 0;
66
- let char = null;
67
- for (let index = 0; index <= path.length; ++index) {
68
- if (index < path.length) char = path[index];
69
- else if (char === "/") break;
70
- else char = "/";
71
- if (char === "/") {
72
- if (lastSlash === index - 1 || dots === 1);
73
- else if (dots === 2) {
74
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
75
- if (res.length > 2) {
76
- const lastSlashIndex = res.lastIndexOf("/");
77
- if (lastSlashIndex === -1) {
78
- res = "";
79
- lastSegmentLength = 0;
80
- } else {
81
- res = res.slice(0, lastSlashIndex);
82
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
83
- }
84
- lastSlash = index;
85
- dots = 0;
86
- continue;
87
- } else if (res.length > 0) {
88
- res = "";
89
- lastSegmentLength = 0;
90
- lastSlash = index;
91
- dots = 0;
92
- continue;
93
- }
94
- }
95
- if (allowAboveRoot) {
96
- res += res.length > 0 ? "/.." : "..";
97
- lastSegmentLength = 2;
98
- }
99
- } else {
100
- if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
101
- else res = path.slice(lastSlash + 1, index);
102
- lastSegmentLength = index - lastSlash - 1;
103
- }
104
- lastSlash = index;
105
- dots = 0;
106
- } else if (char === "." && dots !== -1) ++dots;
107
- else dots = -1;
108
- }
109
- return res;
110
- }
111
- const isAbsolute = function(p) {
112
- return _IS_ABSOLUTE_RE.test(p);
113
- };
114
- const extname = function(p) {
115
- if (p === "..") return "";
116
- const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
117
- return match && match[1] || "";
118
- };
119
- const basename = function(p, extension) {
120
- const segments = normalizeWindowsPath(p).split("/");
121
- let lastSegment = "";
122
- for (let i = segments.length - 1; i >= 0; i--) {
123
- const val = segments[i];
124
- if (val) {
125
- lastSegment = val;
126
- break;
127
- }
128
- }
129
- return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
130
- };
131
-
132
- //#endregion
133
- export { basename, extname, isAbsolute, join, normalize, resolve };
134
- //# sourceMappingURL=pathe.M-eThtNZ.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pathe.M-eThtNZ.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs"],"sourcesContent":["let _lazyMatch = () => { var __lib__=(()=>{var m=Object.defineProperty,V=Object.getOwnPropertyDescriptor,G=Object.getOwnPropertyNames,T=Object.prototype.hasOwnProperty,q=(r,e)=>{for(var n in e)m(r,n,{get:e[n],enumerable:true});},H=(r,e,n,a)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let t of G(e))!T.call(r,t)&&t!==n&&m(r,t,{get:()=>e[t],enumerable:!(a=V(e,t))||a.enumerable});return r},J=r=>H(m({},\"__esModule\",{value:true}),r),w={};q(w,{default:()=>re});var A=r=>Array.isArray(r),d=r=>typeof r==\"function\",Q=r=>r.length===0,W=r=>typeof r==\"number\",K=r=>typeof r==\"object\"&&r!==null,X=r=>r instanceof RegExp,b=r=>typeof r==\"string\",h=r=>r===void 0,Y=r=>{const e=new Map;return n=>{const a=e.get(n);if(a)return a;const t=r(n);return e.set(n,t),t}},rr=(r,e,n={})=>{const a={cache:{},input:r,index:0,indexMax:0,options:n,output:[]};if(v(e)(a)&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${a.indexMax}`)},i=(r,e)=>A(r)?er(r,e):b(r)?ar(r,e):nr(r,e),er=(r,e)=>{const n={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: \"${a}\"`);const t=a.charCodeAt(0);n[t]=true;}return a=>{const t=a.index,o=a.input;for(;a.index<o.length&&o.charCodeAt(a.index)in n;)a.index+=1;const u=a.index;if(u>t){if(!h(e)&&!a.options.silent){const s=a.input.slice(t,u),c=d(e)?e(s,o,String(t)):e;h(c)||a.output.push(c);}a.indexMax=Math.max(a.indexMax,a.index);}return true}},nr=(r,e)=>{const n=r.source,a=r.flags.replace(/y|$/,\"y\"),t=new RegExp(n,a);return g(o=>{t.lastIndex=o.index;const u=t.exec(o.input);if(u){if(!h(e)&&!o.options.silent){const s=d(e)?e(...u,o.input,String(o.index)):e;h(s)||o.output.push(s);}return o.index+=u[0].length,o.indexMax=Math.max(o.indexMax,o.index),true}else return false})},ar=(r,e)=>n=>{if(n.input.startsWith(r,n.index)){if(!h(e)&&!n.options.silent){const t=d(e)?e(r,n.input,String(n.index)):e;h(t)||n.output.push(t);}return n.index+=r.length,n.indexMax=Math.max(n.indexMax,n.index),true}else return false},C=(r,e,n,a)=>{const t=v(r);return g(_(M(o=>{let u=0;for(;u<n;){const s=o.index;if(!t(o)||(u+=1,o.index===s))break}return u>=e})))},tr=(r,e)=>C(r,0,1),f=(r,e)=>C(r,0,1/0),x=(r,e)=>{const n=r.map(v);return g(_(M(a=>{for(let t=0,o=n.length;t<o;t++)if(!n[t](a))return false;return true})))},l=(r,e)=>{const n=r.map(v);return g(_(a=>{for(let t=0,o=n.length;t<o;t++)if(n[t](a))return true;return false}))},M=(r,e=false)=>{const n=v(r);return a=>{const t=a.index,o=a.output.length,u=n(a);return (!u||e)&&(a.index=t,a.output.length!==o&&(a.output.length=o)),u}},_=(r,e)=>{const n=v(r);return n},g=(()=>{let r=0;return e=>{const n=v(e),a=r+=1;return t=>{var o;if(t.options.memoization===false)return n(t);const u=t.index,s=(o=t.cache)[a]||(o[a]=new Map),c=s.get(u);if(c===false)return false;if(W(c))return t.index=c,true;if(c)return t.index=c.index,c.output?.length&&t.output.push(...c.output),true;{const Z=t.output.length;if(n(t)){const D=t.index,U=t.output.length;if(U>Z){const ee=t.output.slice(Z,U);s.set(u,{index:D,output:ee});}else s.set(u,D);return true}else return s.set(u,false),false}}}})(),E=r=>{let e;return n=>(e||(e=v(r())),e(n))},v=Y(r=>{if(d(r))return Q(r)?E(r):r;if(b(r)||X(r))return i(r);if(A(r))return x(r);if(K(r))return l(Object.values(r));throw new Error(\"Invalid rule\")}),P=\"abcdefghijklmnopqrstuvwxyz\",ir=r=>{let e=\"\";for(;r>0;){const n=(r-1)%26;e=P[n]+e,r=Math.floor((r-1)/26);}return e},O=r=>{let e=0;for(let n=0,a=r.length;n<a;n++)e=e*26+P.indexOf(r[n])+1;return e},S=(r,e)=>{if(e<r)return S(e,r);const n=[];for(;r<=e;)n.push(r++);return n},or=(r,e,n)=>S(r,e).map(a=>String(a).padStart(n,\"0\")),R=(r,e)=>S(O(r),O(e)).map(ir),p=r=>r,z=r=>ur(e=>rr(e,r,{memoization:false}).join(\"\")),ur=r=>{const e={};return n=>e[n]??(e[n]=r(n))},sr=i(/^\\*\\*\\/\\*$/,\".*\"),cr=i(/^\\*\\*\\/(\\*)?([ a-zA-Z0-9._-]+)$/,(r,e,n)=>`.*${e?\"\":\"(?:^|/)\"}${n.replaceAll(\".\",\"\\\\.\")}`),lr=i(/^\\*\\*\\/(\\*)?([ a-zA-Z0-9._-]*)\\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\\}$/,(r,e,n,a)=>`.*${e?\"\":\"(?:^|/)\"}${n.replaceAll(\".\",\"\\\\.\")}(?:${a.replaceAll(\",\",\"|\").replaceAll(\".\",\"\\\\.\")})`),y=i(/\\\\./,p),pr=i(/[$.*+?^(){}[\\]\\|]/,r=>`\\\\${r}`),vr=i(/./,p),hr=i(/^(?:!!)*!(.*)$/,(r,e)=>`(?!^${L(e)}$).*?`),dr=i(/^(!!)+/,\"\"),fr=l([hr,dr]),xr=i(/\\/(\\*\\*\\/)+/,\"(?:/.+/|/)\"),gr=i(/^(\\*\\*\\/)+/,\"(?:^|.*/)\"),mr=i(/\\/(\\*\\*)$/,\"(?:/.*|$)\"),_r=i(/\\*\\*/,\".*\"),j=l([xr,gr,mr,_r]),Sr=i(/\\*\\/(?!\\*\\*\\/)/,\"[^/]*/\"),yr=i(/\\*/,\"[^/]*\"),N=l([Sr,yr]),k=i(\"?\",\"[^/]\"),$r=i(\"[\",p),wr=i(\"]\",p),Ar=i(/[!^]/,\"^/\"),br=i(/[a-z]-[a-z]|[0-9]-[0-9]/i,p),Cr=i(/[$.*+?^(){}[\\|]/,r=>`\\\\${r}`),Mr=i(/[^\\]]/,p),Er=l([y,Cr,br,Mr]),B=x([$r,tr(Ar),f(Er),wr]),Pr=i(\"{\",\"(?:\"),Or=i(\"}\",\")\"),Rr=i(/(\\d+)\\.\\.(\\d+)/,(r,e,n)=>or(+e,+n,Math.min(e.length,n.length)).join(\"|\")),zr=i(/([a-z]+)\\.\\.([a-z]+)/,(r,e,n)=>R(e,n).join(\"|\")),jr=i(/([A-Z]+)\\.\\.([A-Z]+)/,(r,e,n)=>R(e.toLowerCase(),n.toLowerCase()).join(\"|\").toUpperCase()),Nr=l([Rr,zr,jr]),I=x([Pr,Nr,Or]),kr=i(\"{\",\"(?:\"),Br=i(\"}\",\")\"),Ir=i(\",\",\"|\"),Fr=i(/[$.*+?^(){[\\]\\|]/,r=>`\\\\${r}`),Lr=i(/[^}]/,p),Zr=E(()=>F),Dr=l([j,N,k,B,I,Zr,y,Fr,Ir,Lr]),F=x([kr,f(Dr),Br]),Ur=f(l([sr,cr,lr,fr,j,N,k,B,I,F,y,pr,vr])),Vr=Ur,Gr=z(Vr),L=Gr,Tr=i(/\\\\./,p),qr=i(/./,p),Hr=i(/\\*\\*\\*+/,\"*\"),Jr=i(/([^/{[(!])\\*\\*/,(r,e)=>`${e}*`),Qr=i(/(^|.)\\*\\*(?=[^*/)\\]}])/,(r,e)=>`${e}*`),Wr=f(l([Tr,Hr,Jr,Qr,qr])),Kr=Wr,Xr=z(Kr),Yr=Xr,$=(r,e)=>{const n=Array.isArray(r)?r:[r];if(!n.length)return false;const a=n.map($.compile),t=n.every(s=>/(\\/(?:\\*\\*)?|\\[\\/\\])$/.test(s)),o=e.replace(/[\\\\\\/]+/g,\"/\").replace(/\\/$/,t?\"/\":\"\");return a.some(s=>s.test(o))};$.compile=r=>new RegExp(`^${L(Yr(r))}$`,\"s\");var re=$;return J(w)})();\n return __lib__.default || __lib__; };\nlet _match;\nconst zeptomatch = (path, pattern) => {\n if (!_match) {\n _match = _lazyMatch();\n _lazyMatch = null;\n }\n return _match(path, pattern);\n};\n\nconst _DRIVE_LETTER_START_RE = /^[A-Za-z]:\\//;\nfunction normalizeWindowsPath(input = \"\") {\n if (!input) {\n return input;\n }\n return input.replace(/\\\\/g, \"/\").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());\n}\n\nconst _UNC_REGEX = /^[/\\\\]{2}/;\nconst _IS_ABSOLUTE_RE = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^[A-Za-z]:[/\\\\]/;\nconst _DRIVE_LETTER_RE = /^[A-Za-z]:$/;\nconst _ROOT_FOLDER_RE = /^\\/([A-Za-z]:)?$/;\nconst _EXTNAME_RE = /.(\\.[^./]+|\\.)$/;\nconst _PATH_ROOT_RE = /^[/\\\\]|^[a-zA-Z]:[/\\\\]/;\nconst sep = \"/\";\nconst normalize = function(path) {\n if (path.length === 0) {\n return \".\";\n }\n path = normalizeWindowsPath(path);\n const isUNCPath = path.match(_UNC_REGEX);\n const isPathAbsolute = isAbsolute(path);\n const trailingSeparator = path[path.length - 1] === \"/\";\n path = normalizeString(path, !isPathAbsolute);\n if (path.length === 0) {\n if (isPathAbsolute) {\n return \"/\";\n }\n return trailingSeparator ? \"./\" : \".\";\n }\n if (trailingSeparator) {\n path += \"/\";\n }\n if (_DRIVE_LETTER_RE.test(path)) {\n path += \"/\";\n }\n if (isUNCPath) {\n if (!isPathAbsolute) {\n return `//./${path}`;\n }\n return `//${path}`;\n }\n return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n};\nconst join = function(...segments) {\n let path = \"\";\n for (const seg of segments) {\n if (!seg) {\n continue;\n }\n if (path.length > 0) {\n const pathTrailing = path[path.length - 1] === \"/\";\n const segLeading = seg[0] === \"/\";\n const both = pathTrailing && segLeading;\n if (both) {\n path += seg.slice(1);\n } else {\n path += pathTrailing || segLeading ? seg : `/${seg}`;\n }\n } else {\n path += seg;\n }\n }\n return normalize(path);\n};\nfunction cwd() {\n if (typeof process !== \"undefined\" && typeof process.cwd === \"function\") {\n return process.cwd().replace(/\\\\/g, \"/\");\n }\n return \"/\";\n}\nconst resolve = function(...arguments_) {\n arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));\n let resolvedPath = \"\";\n let resolvedAbsolute = false;\n for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {\n const path = index >= 0 ? arguments_[index] : cwd();\n if (!path || path.length === 0) {\n continue;\n }\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = isAbsolute(path);\n }\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);\n if (resolvedAbsolute && !isAbsolute(resolvedPath)) {\n return `/${resolvedPath}`;\n }\n return resolvedPath.length > 0 ? resolvedPath : \".\";\n};\nfunction normalizeString(path, allowAboveRoot) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let char = null;\n for (let index = 0; index <= path.length; ++index) {\n if (index < path.length) {\n char = path[index];\n } else if (char === \"/\") {\n break;\n } else {\n char = \"/\";\n }\n if (char === \"/\") {\n if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(\"/\");\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n }\n lastSlash = index;\n dots = 0;\n continue;\n } else if (res.length > 0) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = index;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? \"/..\" : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) {\n res += `/${path.slice(lastSlash + 1, index)}`;\n } else {\n res = path.slice(lastSlash + 1, index);\n }\n lastSegmentLength = index - lastSlash - 1;\n }\n lastSlash = index;\n dots = 0;\n } else if (char === \".\" && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\nconst isAbsolute = function(p) {\n return _IS_ABSOLUTE_RE.test(p);\n};\nconst toNamespacedPath = function(p) {\n return normalizeWindowsPath(p);\n};\nconst extname = function(p) {\n if (p === \"..\") return \"\";\n const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));\n return match && match[1] || \"\";\n};\nconst relative = function(from, to) {\n const _from = resolve(from).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n const _to = resolve(to).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n if (_to[0][1] === \":\" && _from[0][1] === \":\" && _from[0] !== _to[0]) {\n return _to.join(\"/\");\n }\n const _fromCopy = [..._from];\n for (const segment of _fromCopy) {\n if (_to[0] !== segment) {\n break;\n }\n _from.shift();\n _to.shift();\n }\n return [..._from.map(() => \"..\"), ..._to].join(\"/\");\n};\nconst dirname = function(p) {\n const segments = normalizeWindowsPath(p).replace(/\\/$/, \"\").split(\"/\").slice(0, -1);\n if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {\n segments[0] += \"/\";\n }\n return segments.join(\"/\") || (isAbsolute(p) ? \"/\" : \".\");\n};\nconst format = function(p) {\n const ext = p.ext ? p.ext.startsWith(\".\") ? p.ext : `.${p.ext}` : \"\";\n const segments = [p.root, p.dir, p.base ?? (p.name ?? \"\") + ext].filter(\n Boolean\n );\n return normalizeWindowsPath(\n p.root ? resolve(...segments) : segments.join(\"/\")\n );\n};\nconst basename = function(p, extension) {\n const segments = normalizeWindowsPath(p).split(\"/\");\n let lastSegment = \"\";\n for (let i = segments.length - 1; i >= 0; i--) {\n const val = segments[i];\n if (val) {\n lastSegment = val;\n break;\n }\n }\n return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;\n};\nconst parse = function(p) {\n const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\\\/g, \"/\") || \"\";\n const base = basename(p);\n const extension = extname(base);\n return {\n root,\n dir: dirname(p),\n base,\n ext: extension,\n name: base.slice(0, base.length - extension.length)\n };\n};\nconst matchesGlob = (path, pattern) => {\n return zeptomatch(pattern, normalize(path));\n};\n\nconst _path = {\n __proto__: null,\n basename: basename,\n dirname: dirname,\n extname: extname,\n format: format,\n isAbsolute: isAbsolute,\n join: join,\n matchesGlob: matchesGlob,\n normalize: normalize,\n normalizeString: normalizeString,\n parse: parse,\n relative: relative,\n resolve: resolve,\n sep: sep,\n toNamespacedPath: toNamespacedPath\n};\n\nexport { _path as _, normalizeString as a, relative as b, basename as c, dirname as d, extname as e, format as f, normalizeWindowsPath as g, isAbsolute as i, join as j, matchesGlob as m, normalize as n, parse as p, resolve as r, sep as s, toNamespacedPath as t };\n"],"x_google_ignoreList":[0],"mappings":";AAWA,MAAM,yBAAyB;AAC/B,SAAS,qBAAqB,QAAQ,IAAI;AACxC,KAAI,CAAC,MACH,QAAO;AAET,QAAO,MAAM,QAAQ,OAAO,IAAI,CAAC,QAAQ,yBAAyB,MAAM,EAAE,aAAa,CAAC;;AAG1F,MAAM,aAAa;AACnB,MAAM,kBAAkB;AACxB,MAAM,mBAAmB;AAEzB,MAAM,cAAc;AAGpB,MAAM,YAAY,SAAS,MAAM;AAC/B,KAAI,KAAK,WAAW,EAClB,QAAO;AAET,QAAO,qBAAqB,KAAK;CACjC,MAAM,YAAY,KAAK,MAAM,WAAW;CACxC,MAAM,iBAAiB,WAAW,KAAK;CACvC,MAAM,oBAAoB,KAAK,KAAK,SAAS,OAAO;AACpD,QAAO,gBAAgB,MAAM,CAAC,eAAe;AAC7C,KAAI,KAAK,WAAW,GAAG;AACrB,MAAI,eACF,QAAO;AAET,SAAO,oBAAoB,OAAO;;A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MAAM,WAAW,SAAS,GAAG,WAAW;CACtC,MAAM,WAAW,qBAAqB,EAAE,CAAC,MAAM,IAAI;CACnD,IAAI,cAAc;AAClB,MAAK,IAAI,IAAI,SAAS,SAAS,GAAG,KAAK,GAAG,KAAK;EAC7C,MAAM,MAAM,SAAS;AACrB,MAAI,KAAK;AACP,iBAAc;AACd;;;AAGJ,QAAO,aAAa,YAAY,SAAS,UAAU,GAAG,YAAY,MAAM,GAAG,CAAC,UAAU,OAAO,GAAG"}
@@ -1,78 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.cjs');
2
- const require_pathe_M_eThtNZ = require('../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs');
3
- const require_json = require('../../../../confbox@0.2.4/node_modules/confbox/dist/_chunks/json.cjs');
4
- const require_jsonc = require('../../../../confbox@0.2.4/node_modules/confbox/dist/jsonc.cjs');
5
- const require_index = require('../../../../exsolve@1.0.8/node_modules/exsolve/dist/index.cjs');
6
- let node_fs = require("node:fs");
7
- let node_url = require("node:url");
8
- let node_fs_promises = require("node:fs/promises");
9
-
10
- //#region ../../node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs
11
- const defaultFindOptions = {
12
- startingFrom: ".",
13
- rootPattern: /^node_modules$/,
14
- reverse: false,
15
- test: (filePath) => {
16
- try {
17
- if ((0, node_fs.statSync)(filePath).isFile()) return true;
18
- } catch {}
19
- }
20
- };
21
- async function findFile(filename, _options = {}) {
22
- const filenames = Array.isArray(filename) ? filename : [filename];
23
- const options = {
24
- ...defaultFindOptions,
25
- ..._options
26
- };
27
- const basePath = require_pathe_M_eThtNZ.resolve(options.startingFrom);
28
- const leadingSlash = basePath[0] === "/";
29
- const segments = basePath.split("/").filter(Boolean);
30
- if (filenames.includes(segments.at(-1)) && await options.test(basePath)) return basePath;
31
- if (leadingSlash) segments[0] = "/" + segments[0];
32
- let root = segments.findIndex((r$2) => r$2.match(options.rootPattern));
33
- if (root === -1) root = 0;
34
- if (options.reverse) for (let index = root + 1; index <= segments.length; index++) for (const filename2 of filenames) {
35
- const filePath = require_pathe_M_eThtNZ.join(...segments.slice(0, index), filename2);
36
- if (await options.test(filePath)) return filePath;
37
- }
38
- else for (let index = segments.length; index > root; index--) for (const filename2 of filenames) {
39
- const filePath = require_pathe_M_eThtNZ.join(...segments.slice(0, index), filename2);
40
- if (await options.test(filePath)) return filePath;
41
- }
42
- throw new Error(`Cannot find matching ${filename} in ${options.startingFrom} or parent directories`);
43
- }
44
- function findNearestFile(filename, options = {}) {
45
- return findFile(filename, options);
46
- }
47
- function _resolvePath(id, opts = {}) {
48
- if (id instanceof URL || id.startsWith("file://")) return require_pathe_M_eThtNZ.normalize((0, node_url.fileURLToPath)(id));
49
- if (require_pathe_M_eThtNZ.isAbsolute(id)) return require_pathe_M_eThtNZ.normalize(id);
50
- return require_index.resolveModulePath(id, {
51
- ...opts,
52
- from: opts.from || opts.parent || opts.url
53
- });
54
- }
55
- const FileCache = /* @__PURE__ */ new Map();
56
- async function readPackageJSON(id, options = {}) {
57
- const resolvedPath = await resolvePackageJSON(id, options);
58
- const cache = options.cache && typeof options.cache !== "boolean" ? options.cache : FileCache;
59
- if (options.cache && cache.has(resolvedPath)) return cache.get(resolvedPath);
60
- const blob = await node_fs.promises.readFile(resolvedPath, "utf8");
61
- let parsed;
62
- try {
63
- parsed = require_json.n(blob);
64
- } catch {
65
- parsed = require_jsonc.r(blob);
66
- }
67
- cache.set(resolvedPath, parsed);
68
- return parsed;
69
- }
70
- async function resolvePackageJSON(id = process.cwd(), options = {}) {
71
- return findNearestFile("package.json", {
72
- ...options,
73
- startingFrom: _resolvePath(id, options)
74
- });
75
- }
76
-
77
- //#endregion
78
- exports.readPackageJSON = readPackageJSON;
@@ -1,78 +0,0 @@
1
- import { isAbsolute, join, normalize, resolve } from "../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs";
2
- import { n } from "../../../../confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs";
3
- import { r } from "../../../../confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs";
4
- import { resolveModulePath } from "../../../../exsolve@1.0.8/node_modules/exsolve/dist/index.mjs";
5
- import { promises, statSync } from "node:fs";
6
- import { fileURLToPath } from "node:url";
7
- import { readFile } from "node:fs/promises";
8
-
9
- //#region ../../node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs
10
- const defaultFindOptions = {
11
- startingFrom: ".",
12
- rootPattern: /^node_modules$/,
13
- reverse: false,
14
- test: (filePath) => {
15
- try {
16
- if (statSync(filePath).isFile()) return true;
17
- } catch {}
18
- }
19
- };
20
- async function findFile(filename, _options = {}) {
21
- const filenames = Array.isArray(filename) ? filename : [filename];
22
- const options = {
23
- ...defaultFindOptions,
24
- ..._options
25
- };
26
- const basePath = resolve(options.startingFrom);
27
- const leadingSlash = basePath[0] === "/";
28
- const segments = basePath.split("/").filter(Boolean);
29
- if (filenames.includes(segments.at(-1)) && await options.test(basePath)) return basePath;
30
- if (leadingSlash) segments[0] = "/" + segments[0];
31
- let root = segments.findIndex((r$2) => r$2.match(options.rootPattern));
32
- if (root === -1) root = 0;
33
- if (options.reverse) for (let index = root + 1; index <= segments.length; index++) for (const filename2 of filenames) {
34
- const filePath = join(...segments.slice(0, index), filename2);
35
- if (await options.test(filePath)) return filePath;
36
- }
37
- else for (let index = segments.length; index > root; index--) for (const filename2 of filenames) {
38
- const filePath = join(...segments.slice(0, index), filename2);
39
- if (await options.test(filePath)) return filePath;
40
- }
41
- throw new Error(`Cannot find matching ${filename} in ${options.startingFrom} or parent directories`);
42
- }
43
- function findNearestFile(filename, options = {}) {
44
- return findFile(filename, options);
45
- }
46
- function _resolvePath(id, opts = {}) {
47
- if (id instanceof URL || id.startsWith("file://")) return normalize(fileURLToPath(id));
48
- if (isAbsolute(id)) return normalize(id);
49
- return resolveModulePath(id, {
50
- ...opts,
51
- from: opts.from || opts.parent || opts.url
52
- });
53
- }
54
- const FileCache = /* @__PURE__ */ new Map();
55
- async function readPackageJSON(id, options = {}) {
56
- const resolvedPath = await resolvePackageJSON(id, options);
57
- const cache = options.cache && typeof options.cache !== "boolean" ? options.cache : FileCache;
58
- if (options.cache && cache.has(resolvedPath)) return cache.get(resolvedPath);
59
- const blob = await promises.readFile(resolvedPath, "utf8");
60
- let parsed;
61
- try {
62
- parsed = n(blob);
63
- } catch {
64
- parsed = r(blob);
65
- }
66
- cache.set(resolvedPath, parsed);
67
- return parsed;
68
- }
69
- async function resolvePackageJSON(id = process.cwd(), options = {}) {
70
- return findNearestFile("package.json", {
71
- ...options,
72
- startingFrom: _resolvePath(id, options)
73
- });
74
- }
75
-
76
- //#endregion
77
- export { readPackageJSON };
78
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["r","parseJSON","parseJSONC"],"sources":["../../../../../../../../../node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs"],"sourcesContent":["import { statSync, promises } from 'node:fs';\nimport { resolve, join, normalize, isAbsolute, dirname } from 'pathe';\nimport { parseJSONC, stringifyJSONC, parseJSON, stringifyJSON, parseJSON5, parseYAML, stringifyJSON5, stringifyYAML } from 'confbox';\nimport { resolveModulePath } from 'exsolve';\nimport { fileURLToPath } from 'node:url';\nimport { readFile, writeFile } from 'node:fs/promises';\nimport { parseINI, stringifyINI } from 'confbox/ini';\n\nconst defaultFindOptions = {\n startingFrom: \".\",\n rootPattern: /^node_modules$/,\n reverse: false,\n test: (filePath) => {\n try {\n if (statSync(filePath).isFile()) {\n return true;\n }\n } catch {\n }\n }\n};\nasync function findFile(filename, _options = {}) {\n const filenames = Array.isArray(filename) ? filename : [filename];\n const options = { ...defaultFindOptions, ..._options };\n const basePath = resolve(options.startingFrom);\n const leadingSlash = basePath[0] === \"/\";\n const segments = basePath.split(\"/\").filter(Boolean);\n if (filenames.includes(segments.at(-1)) && await options.test(basePath)) {\n return basePath;\n }\n if (leadingSlash) {\n segments[0] = \"/\" + segments[0];\n }\n let root = segments.findIndex((r) => r.match(options.rootPattern));\n if (root === -1) {\n root = 0;\n }\n if (options.reverse) {\n for (let index = root + 1; index <= segments.length; index++) {\n for (const filename2 of filenames) {\n const filePath = join(...segments.slice(0, index), filename2);\n if (await options.test(filePath)) {\n return filePath;\n }\n }\n }\n } else {\n for (let index = segments.length; index > root; index--) {\n for (const filename2 of filenames) {\n const filePath = join(...segments.slice(0, index), filename2);\n if (await options.test(filePath)) {\n return filePath;\n }\n }\n }\n }\n throw new Error(\n `Cannot find matching ${filename} in ${options.startingFrom} or parent directories`\n );\n}\nfunction findNearestFile(filename, options = {}) {\n return findFile(filename, options);\n}\nfunction findFarthestFile(filename, options = {}) {\n return findFile(filename, { ...options, reverse: true });\n}\n\nfunction _resolvePath(id, opts = {}) {\n if (id instanceof URL || id.startsWith(\"file://\")) {\n return normalize(fileURLToPath(id));\n }\n if (isAbsolute(id)) {\n return normalize(id);\n }\n return resolveModulePath(id, {\n ...opts,\n from: opts.from || opts.parent || opts.url\n });\n}\n\nconst FileCache$1 = /* @__PURE__ */ new Map();\nfunction defineTSConfig(tsconfig) {\n return tsconfig;\n}\nasync function readTSConfig(id, options = {}) {\n const resolvedPath = await resolveTSConfig(id, options);\n const cache = options.cache && typeof options.cache !== \"boolean\" ? options.cache : FileCache$1;\n if (options.cache && cache.has(resolvedPath)) {\n return cache.get(resolvedPath);\n }\n const text = await promises.readFile(resolvedPath, \"utf8\");\n const parsed = parseJSONC(text);\n cache.set(resolvedPath, parsed);\n return parsed;\n}\nasync function writeTSConfig(path, tsconfig) {\n await promises.writeFile(path, stringifyJSONC(tsconfig));\n}\nasync function resolveTSConfig(id = process.cwd(), options = {}) {\n return findNearestFile(\"tsconfig.json\", {\n ...options,\n startingFrom: _resolvePath(id, options)\n });\n}\n\nconst lockFiles = [\n \"yarn.lock\",\n \"package-lock.json\",\n \"pnpm-lock.yaml\",\n \"npm-shrinkwrap.json\",\n \"bun.lockb\",\n \"bun.lock\",\n \"deno.lock\"\n];\nconst packageFiles = [\"package.json\", \"package.json5\", \"package.yaml\"];\nconst workspaceFiles = [\n \"pnpm-workspace.yaml\",\n \"lerna.json\",\n \"turbo.json\",\n \"rush.json\",\n \"deno.json\",\n \"deno.jsonc\"\n];\nconst FileCache = /* @__PURE__ */ new Map();\nfunction definePackageJSON(pkg) {\n return pkg;\n}\nasync function findPackage(id = process.cwd(), options = {}) {\n return findNearestFile(packageFiles, {\n ...options,\n startingFrom: _resolvePath(id, options)\n });\n}\nasync function readPackage(id, options = {}) {\n const resolvedPath = await findPackage(id, options);\n const cache = options.cache && typeof options.cache !== \"boolean\" ? options.cache : FileCache;\n if (options.cache && cache.has(resolvedPath)) {\n return cache.get(resolvedPath);\n }\n const blob = await promises.readFile(resolvedPath, \"utf8\");\n let parsed;\n if (resolvedPath.endsWith(\".json5\")) {\n parsed = parseJSON5(blob);\n } else if (resolvedPath.endsWith(\".yaml\")) {\n parsed = parseYAML(blob);\n } else {\n try {\n parsed = parseJSON(blob);\n } catch {\n parsed = parseJSONC(blob);\n }\n }\n cache.set(resolvedPath, parsed);\n return parsed;\n}\nasync function writePackage(path, pkg) {\n let content;\n if (path.endsWith(\".json5\")) {\n content = stringifyJSON5(pkg);\n } else if (path.endsWith(\".yaml\")) {\n content = stringifyYAML(pkg);\n } else {\n content = stringifyJSON(pkg);\n }\n await promises.writeFile(path, content);\n}\nasync function readPackageJSON(id, options = {}) {\n const resolvedPath = await resolvePackageJSON(id, options);\n const cache = options.cache && typeof options.cache !== \"boolean\" ? options.cache : FileCache;\n if (options.cache && cache.has(resolvedPath)) {\n return cache.get(resolvedPath);\n }\n const blob = await promises.readFile(resolvedPath, \"utf8\");\n let parsed;\n try {\n parsed = parseJSON(blob);\n } catch {\n parsed = parseJSONC(blob);\n }\n cache.set(resolvedPath, parsed);\n return parsed;\n}\nasync function writePackageJSON(path, pkg) {\n await promises.writeFile(path, stringifyJSON(pkg));\n}\nasync function resolvePackageJSON(id = process.cwd(), options = {}) {\n return findNearestFile(\"package.json\", {\n ...options,\n startingFrom: _resolvePath(id, options)\n });\n}\nasync function resolveLockfile(id = process.cwd(), options = {}) {\n return findNearestFile(lockFiles, {\n ...options,\n startingFrom: _resolvePath(id, options)\n });\n}\nconst workspaceTests = {\n workspaceFile: (opts) => findFile(workspaceFiles, opts).then((r) => dirname(r)),\n gitConfig: (opts) => findFile(\".git/config\", opts).then((r) => resolve(r, \"../..\")),\n lockFile: (opts) => findFile(lockFiles, opts).then((r) => dirname(r)),\n packageJson: (opts) => findFile(packageFiles, opts).then((r) => dirname(r))\n};\nasync function findWorkspaceDir(id = process.cwd(), options = {}) {\n const startingFrom = _resolvePath(id, options);\n const tests = options.tests || [\"workspaceFile\", \"gitConfig\", \"lockFile\", \"packageJson\"];\n for (const testName of tests) {\n const test = workspaceTests[testName];\n if (options[testName] === false || !test) {\n continue;\n }\n const direction = options[testName] || (testName === \"gitConfig\" ? \"closest\" : \"furthest\");\n const detected = await test({\n ...options,\n startingFrom,\n reverse: direction === \"furthest\"\n }).catch(() => {\n });\n if (detected) {\n return detected;\n }\n }\n throw new Error(`Cannot detect workspace root from ${id}`);\n}\nasync function updatePackage(id, callback, options = {}) {\n const resolvedPath = await findPackage(id, options);\n const pkg = await readPackage(id, options);\n const proxy = new Proxy(pkg, {\n get(target, prop) {\n if (typeof prop === \"string\" && objectKeys.has(prop) && !Object.hasOwn(target, prop)) {\n target[prop] = {};\n }\n return Reflect.get(target, prop);\n }\n });\n const updated = await callback(proxy) || pkg;\n await writePackage(resolvedPath, updated);\n}\nfunction sortPackage(pkg) {\n const sorted = {};\n const originalKeys = Object.keys(pkg);\n const knownKeysPresent = defaultFieldOrder.filter(\n (key) => Object.hasOwn(pkg, key)\n );\n for (const key of originalKeys) {\n const currentIndex = knownKeysPresent.indexOf(key);\n if (currentIndex === -1) {\n sorted[key] = pkg[key];\n continue;\n }\n for (let i = 0; i <= currentIndex; i++) {\n const knownKey = knownKeysPresent[i];\n if (!Object.hasOwn(sorted, knownKey)) {\n sorted[knownKey] = pkg[knownKey];\n }\n }\n }\n for (const key of [...dependencyKeys, \"scripts\"]) {\n const value = sorted[key];\n if (isObject(value)) {\n sorted[key] = sortObject(value);\n }\n }\n return sorted;\n}\nfunction normalizePackage(pkg) {\n const normalized = sortPackage(pkg);\n for (const key of dependencyKeys) {\n if (!Object.hasOwn(normalized, key)) {\n continue;\n }\n const value = normalized[key];\n if (!isObject(value)) {\n delete normalized[key];\n }\n }\n return normalized;\n}\nfunction isObject(value) {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction sortObject(obj) {\n return Object.fromEntries(\n Object.entries(obj).sort(([a], [b]) => a.localeCompare(b))\n );\n}\nconst dependencyKeys = [\n \"dependencies\",\n \"devDependencies\",\n \"optionalDependencies\",\n \"peerDependencies\"\n];\nconst objectKeys = /* @__PURE__ */ new Set([\n \"typesVersions\",\n \"scripts\",\n \"resolutions\",\n \"overrides\",\n \"dependencies\",\n \"devDependencies\",\n \"dependenciesMeta\",\n \"peerDependencies\",\n \"peerDependenciesMeta\",\n \"optionalDependencies\",\n \"engines\",\n \"publishConfig\"\n]);\nconst defaultFieldOrder = [\n \"$schema\",\n \"name\",\n \"version\",\n \"private\",\n \"description\",\n \"keywords\",\n \"homepage\",\n \"bugs\",\n \"repository\",\n \"funding\",\n \"license\",\n \"author\",\n \"sideEffects\",\n \"type\",\n \"imports\",\n \"exports\",\n \"main\",\n \"module\",\n \"browser\",\n \"types\",\n \"typesVersions\",\n \"typings\",\n \"bin\",\n \"man\",\n \"files\",\n \"workspaces\",\n \"scripts\",\n \"resolutions\",\n \"overrides\",\n \"dependencies\",\n \"devDependencies\",\n \"dependenciesMeta\",\n \"peerDependencies\",\n \"peerDependenciesMeta\",\n \"optionalDependencies\",\n \"bundledDependencies\",\n \"bundleDependencies\",\n \"packageManager\",\n \"engines\",\n \"publishConfig\"\n];\n\nfunction defineGitConfig(config) {\n return config;\n}\nasync function resolveGitConfig(dir, opts) {\n return findNearestFile(\".git/config\", { ...opts, startingFrom: dir });\n}\nasync function readGitConfig(dir, opts) {\n const path = await resolveGitConfig(dir, opts);\n const ini = await readFile(path, \"utf8\");\n return parseGitConfig(ini);\n}\nasync function writeGitConfig(path, config) {\n await writeFile(path, stringifyGitConfig(config));\n}\nfunction parseGitConfig(ini) {\n return parseINI(ini.replaceAll(/^\\[(\\w+) \"(.+)\"\\]$/gm, \"[$1.$2]\"));\n}\nfunction stringifyGitConfig(config) {\n return stringifyINI(config).replaceAll(/^\\[(\\w+)\\.(\\w+)\\]$/gm, '[$1 \"$2\"]');\n}\n\nexport { defineGitConfig, definePackageJSON, defineTSConfig, findFarthestFile, findFile, findNearestFile, findPackage, findWorkspaceDir, normalizePackage, parseGitConfig, readGitConfig, readPackage, readPackageJSON, readTSConfig, resolveGitConfig, resolveLockfile, resolvePackageJSON, resolveTSConfig, sortPackage, stringifyGitConfig, updatePackage, writeGitConfig, writePackage, writePackageJSON, writeTSConfig };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AAQA,MAAM,qBAAqB;CACzB,cAAc;CACd,aAAa;CACb,SAAS;CACT,OAAO,aAAa;AAClB,MAAI;AACF,OAAI,SAAS,SAAS,CAAC,QAAQ,CAC7B,QAAO;UAEH;;CAGX;AACD,eAAe,SAAS,UAAU,WAAW,EAAE,EAAE;CAC/C,MAAM,YAAY,MAAM,QAAQ,SAAS,GAAG,WAAW,CAAC,SAAS;CACjE,MAAM,UAAU;EAAE,GAAG;EAAoB,GAAG;EAAU;CACtD,MAAM,WAAW,QAAQ,QAAQ,aAAa;CAC9C,MAAM,eAAe,SAAS,OAAO;CACrC,MAAM,WAAW,SAAS,MAAM,IAAI,CAAC,OAAO,QAAQ;AACpD,KAAI,UAAU,SAAS,SAAS,GAAG,GAAG,CAAC,IAAI,MAAM,QAAQ,KAAK,SAAS,CACrE,QAAO;AAET,KAAI,aACF,UAAS,KAAK,MAAM,SAAS;C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AM,SAAS,SAAS,cAAc,OAAO;CAC1D,IAAI;AACJ,KAAI;AACF,WAASC,EAAU,KAAK;SAClB;AACN,WAASC,EAAW,KAAK;;AAE3B,OAAM,IAAI,cAAc,OAAO;AAC/B,QAAO;;AAKT,eAAe,mBAAmB,KAAK,QAAQ,KAAK,EAAE,UAAU,EAAE,EAAE;AAClE,QAAO,gBAAgB,gBAAgB;EACrC,GAAG;EACH,cAAc,aAAa,IAAI,QAAQ;EACxC,CAAC"}
@@ -1,72 +0,0 @@
1
-
2
- //#region ../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs
3
- const NUMBER_CHAR_RE = /\d/;
4
- const STR_SPLITTERS = [
5
- "-",
6
- "_",
7
- "/",
8
- "."
9
- ];
10
- function isUppercase(char = "") {
11
- if (NUMBER_CHAR_RE.test(char)) return;
12
- return char !== char.toLowerCase();
13
- }
14
- function splitByCase(str, separators) {
15
- const splitters = separators ?? STR_SPLITTERS;
16
- const parts = [];
17
- if (!str || typeof str !== "string") return parts;
18
- let buff = "";
19
- let previousUpper;
20
- let previousSplitter;
21
- for (const char of str) {
22
- const isSplitter = splitters.includes(char);
23
- if (isSplitter === true) {
24
- parts.push(buff);
25
- buff = "";
26
- previousUpper = void 0;
27
- continue;
28
- }
29
- const isUpper = isUppercase(char);
30
- if (previousSplitter === false) {
31
- if (previousUpper === false && isUpper === true) {
32
- parts.push(buff);
33
- buff = char;
34
- previousUpper = isUpper;
35
- continue;
36
- }
37
- if (previousUpper === true && isUpper === false && buff.length > 1) {
38
- const lastChar = buff.at(-1);
39
- parts.push(buff.slice(0, Math.max(0, buff.length - 1)));
40
- buff = lastChar + char;
41
- previousUpper = isUpper;
42
- continue;
43
- }
44
- }
45
- buff += char;
46
- previousUpper = isUpper;
47
- previousSplitter = isSplitter;
48
- }
49
- parts.push(buff);
50
- return parts;
51
- }
52
- function upperFirst(str) {
53
- return str ? str[0].toUpperCase() + str.slice(1) : "";
54
- }
55
- function lowerFirst(str) {
56
- return str ? str[0].toLowerCase() + str.slice(1) : "";
57
- }
58
- function pascalCase(str, opts) {
59
- return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => upperFirst(opts?.normalize ? p.toLowerCase() : p)).join("") : "";
60
- }
61
- function camelCase(str, opts) {
62
- return lowerFirst(pascalCase(str || "", opts));
63
- }
64
- const titleCaseExceptions = /^(a|an|and|as|at|but|by|for|if|in|is|nor|of|on|or|the|to|with)$/i;
65
- function titleCase(str, opts) {
66
- return (Array.isArray(str) ? str : splitByCase(str)).filter(Boolean).map((p) => titleCaseExceptions.test(p) ? p.toLowerCase() : upperFirst(opts?.normalize ? p.toLowerCase() : p)).join(" ");
67
- }
68
-
69
- //#endregion
70
- exports.camelCase = camelCase;
71
- exports.pascalCase = pascalCase;
72
- exports.titleCase = titleCase;
@@ -1,70 +0,0 @@
1
- //#region ../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs
2
- const NUMBER_CHAR_RE = /\d/;
3
- const STR_SPLITTERS = [
4
- "-",
5
- "_",
6
- "/",
7
- "."
8
- ];
9
- function isUppercase(char = "") {
10
- if (NUMBER_CHAR_RE.test(char)) return;
11
- return char !== char.toLowerCase();
12
- }
13
- function splitByCase(str, separators) {
14
- const splitters = separators ?? STR_SPLITTERS;
15
- const parts = [];
16
- if (!str || typeof str !== "string") return parts;
17
- let buff = "";
18
- let previousUpper;
19
- let previousSplitter;
20
- for (const char of str) {
21
- const isSplitter = splitters.includes(char);
22
- if (isSplitter === true) {
23
- parts.push(buff);
24
- buff = "";
25
- previousUpper = void 0;
26
- continue;
27
- }
28
- const isUpper = isUppercase(char);
29
- if (previousSplitter === false) {
30
- if (previousUpper === false && isUpper === true) {
31
- parts.push(buff);
32
- buff = char;
33
- previousUpper = isUpper;
34
- continue;
35
- }
36
- if (previousUpper === true && isUpper === false && buff.length > 1) {
37
- const lastChar = buff.at(-1);
38
- parts.push(buff.slice(0, Math.max(0, buff.length - 1)));
39
- buff = lastChar + char;
40
- previousUpper = isUpper;
41
- continue;
42
- }
43
- }
44
- buff += char;
45
- previousUpper = isUpper;
46
- previousSplitter = isSplitter;
47
- }
48
- parts.push(buff);
49
- return parts;
50
- }
51
- function upperFirst(str) {
52
- return str ? str[0].toUpperCase() + str.slice(1) : "";
53
- }
54
- function lowerFirst(str) {
55
- return str ? str[0].toLowerCase() + str.slice(1) : "";
56
- }
57
- function pascalCase(str, opts) {
58
- return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => upperFirst(opts?.normalize ? p.toLowerCase() : p)).join("") : "";
59
- }
60
- function camelCase(str, opts) {
61
- return lowerFirst(pascalCase(str || "", opts));
62
- }
63
- const titleCaseExceptions = /^(a|an|and|as|at|but|by|for|if|in|is|nor|of|on|or|the|to|with)$/i;
64
- function titleCase(str, opts) {
65
- return (Array.isArray(str) ? str : splitByCase(str)).filter(Boolean).map((p) => titleCaseExceptions.test(p) ? p.toLowerCase() : upperFirst(opts?.normalize ? p.toLowerCase() : p)).join(" ");
66
- }
67
-
68
- //#endregion
69
- export { camelCase, pascalCase, titleCase };
70
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs"],"sourcesContent":["const NUMBER_CHAR_RE = /\\d/;\nconst STR_SPLITTERS = [\"-\", \"_\", \"/\", \".\"];\nfunction isUppercase(char = \"\") {\n if (NUMBER_CHAR_RE.test(char)) {\n return void 0;\n }\n return char !== char.toLowerCase();\n}\nfunction splitByCase(str, separators) {\n const splitters = separators ?? STR_SPLITTERS;\n const parts = [];\n if (!str || typeof str !== \"string\") {\n return parts;\n }\n let buff = \"\";\n let previousUpper;\n let previousSplitter;\n for (const char of str) {\n const isSplitter = splitters.includes(char);\n if (isSplitter === true) {\n parts.push(buff);\n buff = \"\";\n previousUpper = void 0;\n continue;\n }\n const isUpper = isUppercase(char);\n if (previousSplitter === false) {\n if (previousUpper === false && isUpper === true) {\n parts.push(buff);\n buff = char;\n previousUpper = isUpper;\n continue;\n }\n if (previousUpper === true && isUpper === false && buff.length > 1) {\n const lastChar = buff.at(-1);\n parts.push(buff.slice(0, Math.max(0, buff.length - 1)));\n buff = lastChar + char;\n previousUpper = isUpper;\n continue;\n }\n }\n buff += char;\n previousUpper = isUpper;\n previousSplitter = isSplitter;\n }\n parts.push(buff);\n return parts;\n}\nfunction upperFirst(str) {\n return str ? str[0].toUpperCase() + str.slice(1) : \"\";\n}\nfunction lowerFirst(str) {\n return str ? str[0].toLowerCase() + str.slice(1) : \"\";\n}\nfunction pascalCase(str, opts) {\n return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => upperFirst(opts?.normalize ? p.toLowerCase() : p)).join(\"\") : \"\";\n}\nfunction camelCase(str, opts) {\n return lowerFirst(pascalCase(str || \"\", opts));\n}\nfunction kebabCase(str, joiner) {\n return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => p.toLowerCase()).join(joiner ?? \"-\") : \"\";\n}\nfunction snakeCase(str) {\n return kebabCase(str || \"\", \"_\");\n}\nfunction flatCase(str) {\n return kebabCase(str || \"\", \"\");\n}\nfunction trainCase(str, opts) {\n return (Array.isArray(str) ? str : splitByCase(str)).filter(Boolean).map((p) => upperFirst(opts?.normalize ? p.toLowerCase() : p)).join(\"-\");\n}\nconst titleCaseExceptions = /^(a|an|and|as|at|but|by|for|if|in|is|nor|of|on|or|the|to|with)$/i;\nfunction titleCase(str, opts) {\n return (Array.isArray(str) ? str : splitByCase(str)).filter(Boolean).map(\n (p) => titleCaseExceptions.test(p) ? p.toLowerCase() : upperFirst(opts?.normalize ? p.toLowerCase() : p)\n ).join(\" \");\n}\n\nexport { camelCase, flatCase, isUppercase, kebabCase, lowerFirst, pascalCase, snakeCase, splitByCase, titleCase, trainCase, upperFirst };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,MAAM,iBAAiB;AACvB,MAAM,gBAAgB;CAAC;CAAK;CAAK;CAAK;C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