luckerr 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +267 -0
  2. package/README.zh-CN.md +237 -0
  3. package/dashboard/app.css +3022 -0
  4. package/dashboard/dist/app.js +30137 -0
  5. package/dashboard/dist/app.js.map +1 -0
  6. package/dashboard/dist/vendor-hljs.css +10 -0
  7. package/dashboard/dist/vendor-uplot.css +1 -0
  8. package/dashboard/index.html +19 -0
  9. package/data/deepseek-tokenizer.json.gz +0 -0
  10. package/dist/cli/acp-EOOAI4F5.js +712 -0
  11. package/dist/cli/acp-EOOAI4F5.js.map +1 -0
  12. package/dist/cli/chat-7J6GJXL2.js +51 -0
  13. package/dist/cli/chat-7J6GJXL2.js.map +1 -0
  14. package/dist/cli/chunk-2425HK6U.js +54 -0
  15. package/dist/cli/chunk-2425HK6U.js.map +1 -0
  16. package/dist/cli/chunk-25T6CVUP.js +172 -0
  17. package/dist/cli/chunk-25T6CVUP.js.map +1 -0
  18. package/dist/cli/chunk-2UQP6H6T.js +31 -0
  19. package/dist/cli/chunk-2UQP6H6T.js.map +1 -0
  20. package/dist/cli/chunk-56OAJILV.js +47 -0
  21. package/dist/cli/chunk-56OAJILV.js.map +1 -0
  22. package/dist/cli/chunk-5FTI4KXH.js +150 -0
  23. package/dist/cli/chunk-5FTI4KXH.js.map +1 -0
  24. package/dist/cli/chunk-5TWQD73O.js +2846 -0
  25. package/dist/cli/chunk-5TWQD73O.js.map +1 -0
  26. package/dist/cli/chunk-653BOCMK.js +40 -0
  27. package/dist/cli/chunk-653BOCMK.js.map +1 -0
  28. package/dist/cli/chunk-6ALJTWWQ.js +2663 -0
  29. package/dist/cli/chunk-6ALJTWWQ.js.map +1 -0
  30. package/dist/cli/chunk-6DRKA2IL.js +341 -0
  31. package/dist/cli/chunk-6DRKA2IL.js.map +1 -0
  32. package/dist/cli/chunk-6LV63NJV.js +634 -0
  33. package/dist/cli/chunk-6LV63NJV.js.map +1 -0
  34. package/dist/cli/chunk-74EX7SUH.js +25293 -0
  35. package/dist/cli/chunk-74EX7SUH.js.map +1 -0
  36. package/dist/cli/chunk-74U5RKTX.js +60611 -0
  37. package/dist/cli/chunk-74U5RKTX.js.map +1 -0
  38. package/dist/cli/chunk-ANJSUESV.js +143 -0
  39. package/dist/cli/chunk-ANJSUESV.js.map +1 -0
  40. package/dist/cli/chunk-DB2Z3DKZ.js +54 -0
  41. package/dist/cli/chunk-DB2Z3DKZ.js.map +1 -0
  42. package/dist/cli/chunk-DDIH3ZAA.js +400 -0
  43. package/dist/cli/chunk-DDIH3ZAA.js.map +1 -0
  44. package/dist/cli/chunk-ELN3Z3B2.js +621 -0
  45. package/dist/cli/chunk-ELN3Z3B2.js.map +1 -0
  46. package/dist/cli/chunk-F6BSQJGV.js +200 -0
  47. package/dist/cli/chunk-F6BSQJGV.js.map +1 -0
  48. package/dist/cli/chunk-FET2UAG5.js +246 -0
  49. package/dist/cli/chunk-FET2UAG5.js.map +1 -0
  50. package/dist/cli/chunk-FFJ342IJ.js +190 -0
  51. package/dist/cli/chunk-FFJ342IJ.js.map +1 -0
  52. package/dist/cli/chunk-GB3247B6.js +130 -0
  53. package/dist/cli/chunk-GB3247B6.js.map +1 -0
  54. package/dist/cli/chunk-HC2J4U3G.js +373 -0
  55. package/dist/cli/chunk-HC2J4U3G.js.map +1 -0
  56. package/dist/cli/chunk-HRUZAIHQ.js +42 -0
  57. package/dist/cli/chunk-HRUZAIHQ.js.map +1 -0
  58. package/dist/cli/chunk-J3ZJFUDL.js +308 -0
  59. package/dist/cli/chunk-J3ZJFUDL.js.map +1 -0
  60. package/dist/cli/chunk-J5XJHLWM.js +55 -0
  61. package/dist/cli/chunk-J5XJHLWM.js.map +1 -0
  62. package/dist/cli/chunk-JFGLMRZ6.js +160 -0
  63. package/dist/cli/chunk-JFGLMRZ6.js.map +1 -0
  64. package/dist/cli/chunk-JMBMLOBP.js +26 -0
  65. package/dist/cli/chunk-JMBMLOBP.js.map +1 -0
  66. package/dist/cli/chunk-JMWHXZEL.js +551 -0
  67. package/dist/cli/chunk-JMWHXZEL.js.map +1 -0
  68. package/dist/cli/chunk-KEQGPJBO.js +209 -0
  69. package/dist/cli/chunk-KEQGPJBO.js.map +1 -0
  70. package/dist/cli/chunk-M4K6U37F.js +232 -0
  71. package/dist/cli/chunk-M4K6U37F.js.map +1 -0
  72. package/dist/cli/chunk-MIJI2WMN.js +95 -0
  73. package/dist/cli/chunk-MIJI2WMN.js.map +1 -0
  74. package/dist/cli/chunk-MPAO3JNR.js +128 -0
  75. package/dist/cli/chunk-MPAO3JNR.js.map +1 -0
  76. package/dist/cli/chunk-PZOFBEDC.js +873 -0
  77. package/dist/cli/chunk-PZOFBEDC.js.map +1 -0
  78. package/dist/cli/chunk-RAILYQLN.js +46 -0
  79. package/dist/cli/chunk-RAILYQLN.js.map +1 -0
  80. package/dist/cli/chunk-RR35VQVT.js +90 -0
  81. package/dist/cli/chunk-RR35VQVT.js.map +1 -0
  82. package/dist/cli/chunk-RRA7VPW4.js +417 -0
  83. package/dist/cli/chunk-RRA7VPW4.js.map +1 -0
  84. package/dist/cli/chunk-RU36QVN3.js +452 -0
  85. package/dist/cli/chunk-RU36QVN3.js.map +1 -0
  86. package/dist/cli/chunk-RUBIINXR.js +1819 -0
  87. package/dist/cli/chunk-RUBIINXR.js.map +1 -0
  88. package/dist/cli/chunk-S4XVGLRW.js +499 -0
  89. package/dist/cli/chunk-S4XVGLRW.js.map +1 -0
  90. package/dist/cli/chunk-TUK7OWJA.js +51 -0
  91. package/dist/cli/chunk-TUK7OWJA.js.map +1 -0
  92. package/dist/cli/chunk-VALDDV76.js +580 -0
  93. package/dist/cli/chunk-VALDDV76.js.map +1 -0
  94. package/dist/cli/chunk-WQOGPYGN.js +11390 -0
  95. package/dist/cli/chunk-WQOGPYGN.js.map +1 -0
  96. package/dist/cli/chunk-WREKDFXT.js +34320 -0
  97. package/dist/cli/chunk-WREKDFXT.js.map +1 -0
  98. package/dist/cli/chunk-Y7XQU2EL.js +270 -0
  99. package/dist/cli/chunk-Y7XQU2EL.js.map +1 -0
  100. package/dist/cli/chunk-YBVCZJU4.js +54 -0
  101. package/dist/cli/chunk-YBVCZJU4.js.map +1 -0
  102. package/dist/cli/chunk-YLIHDXUQ.js +749 -0
  103. package/dist/cli/chunk-YLIHDXUQ.js.map +1 -0
  104. package/dist/cli/chunk-YV5XXFD7.js +767 -0
  105. package/dist/cli/chunk-YV5XXFD7.js.map +1 -0
  106. package/dist/cli/chunk-ZRCNIYRQ.js +101 -0
  107. package/dist/cli/chunk-ZRCNIYRQ.js.map +1 -0
  108. package/dist/cli/code-CRKVCMFZ.js +155 -0
  109. package/dist/cli/code-CRKVCMFZ.js.map +1 -0
  110. package/dist/cli/commands-QLMD3T7B.js +356 -0
  111. package/dist/cli/commands-QLMD3T7B.js.map +1 -0
  112. package/dist/cli/commit-53PP32NC.js +293 -0
  113. package/dist/cli/commit-53PP32NC.js.map +1 -0
  114. package/dist/cli/desktop-R6W5CLJ5.js +1046 -0
  115. package/dist/cli/desktop-R6W5CLJ5.js.map +1 -0
  116. package/dist/cli/devtools-YECO25QO.js +3719 -0
  117. package/dist/cli/devtools-YECO25QO.js.map +1 -0
  118. package/dist/cli/diff-LYNRCJZE.js +166 -0
  119. package/dist/cli/diff-LYNRCJZE.js.map +1 -0
  120. package/dist/cli/doctor-5IBP4R5J.js +28 -0
  121. package/dist/cli/doctor-5IBP4R5J.js.map +1 -0
  122. package/dist/cli/events-QN6KLN2V.js +340 -0
  123. package/dist/cli/events-QN6KLN2V.js.map +1 -0
  124. package/dist/cli/index.js +3500 -0
  125. package/dist/cli/index.js.map +1 -0
  126. package/dist/cli/mcp-FGKEH7RG.js +277 -0
  127. package/dist/cli/mcp-FGKEH7RG.js.map +1 -0
  128. package/dist/cli/mcp-browse-YCND4NWT.js +178 -0
  129. package/dist/cli/mcp-browse-YCND4NWT.js.map +1 -0
  130. package/dist/cli/mcp-inspect-V34J3VX5.js +143 -0
  131. package/dist/cli/mcp-inspect-V34J3VX5.js.map +1 -0
  132. package/dist/cli/package.json +3 -0
  133. package/dist/cli/prompt-I775PNKT.js +16 -0
  134. package/dist/cli/prompt-I775PNKT.js.map +1 -0
  135. package/dist/cli/prune-sessions-KGIIYD3P.js +44 -0
  136. package/dist/cli/prune-sessions-KGIIYD3P.js.map +1 -0
  137. package/dist/cli/replay-RDXLUAOE.js +292 -0
  138. package/dist/cli/replay-RDXLUAOE.js.map +1 -0
  139. package/dist/cli/run-RCAC2RYW.js +223 -0
  140. package/dist/cli/run-RCAC2RYW.js.map +1 -0
  141. package/dist/cli/server-FFU6TLYJ.js +3658 -0
  142. package/dist/cli/server-FFU6TLYJ.js.map +1 -0
  143. package/dist/cli/sessions-QT26MQAE.js +107 -0
  144. package/dist/cli/sessions-QT26MQAE.js.map +1 -0
  145. package/dist/cli/setup-VV4WKXHV.js +767 -0
  146. package/dist/cli/setup-VV4WKXHV.js.map +1 -0
  147. package/dist/cli/stats-JVZPQWAN.js +15 -0
  148. package/dist/cli/stats-JVZPQWAN.js.map +1 -0
  149. package/dist/cli/update-KYI3OVJP.js +15 -0
  150. package/dist/cli/update-KYI3OVJP.js.map +1 -0
  151. package/dist/cli/version-ANYORXTI.js +34 -0
  152. package/dist/cli/version-ANYORXTI.js.map +1 -0
  153. package/dist/index.d.ts +2557 -0
  154. package/dist/index.js +15000 -0
  155. package/dist/index.js.map +1 -0
  156. package/package.json +106 -0
@@ -0,0 +1,499 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __cr } from 'node:module'; if (typeof globalThis.require === 'undefined') { globalThis.require = __cr(import.meta.url); }
3
+ import {
4
+ __commonJS,
5
+ __toESM
6
+ } from "./chunk-TUK7OWJA.js";
7
+
8
+ // node_modules/ignore/index.js
9
+ var require_ignore = __commonJS({
10
+ "node_modules/ignore/index.js"(exports, module) {
11
+ "use strict";
12
+ function makeArray(subject) {
13
+ return Array.isArray(subject) ? subject : [subject];
14
+ }
15
+ var UNDEFINED = void 0;
16
+ var EMPTY = "";
17
+ var SPACE = " ";
18
+ var ESCAPE = "\\";
19
+ var REGEX_TEST_BLANK_LINE = /^\s+$/;
20
+ var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
21
+ var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
22
+ var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
23
+ var REGEX_SPLITALL_CRLF = /\r?\n/g;
24
+ var REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/;
25
+ var REGEX_TEST_TRAILING_SLASH = /\/$/;
26
+ var SLASH = "/";
27
+ var TMP_KEY_IGNORE = "node-ignore";
28
+ if (typeof Symbol !== "undefined") {
29
+ TMP_KEY_IGNORE = /* @__PURE__ */ Symbol.for("node-ignore");
30
+ }
31
+ var KEY_IGNORE = TMP_KEY_IGNORE;
32
+ var define = (object, key, value) => {
33
+ Object.defineProperty(object, key, { value });
34
+ return value;
35
+ };
36
+ var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
37
+ var RETURN_FALSE = () => false;
38
+ var sanitizeRange = (range) => range.replace(
39
+ REGEX_REGEXP_RANGE,
40
+ (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY
41
+ );
42
+ var cleanRangeBackSlash = (slashes) => {
43
+ const { length } = slashes;
44
+ return slashes.slice(0, length - length % 2);
45
+ };
46
+ var REPLACERS = [
47
+ [
48
+ // Remove BOM
49
+ // TODO:
50
+ // Other similar zero-width characters?
51
+ /^\uFEFF/,
52
+ () => EMPTY
53
+ ],
54
+ // > Trailing spaces are ignored unless they are quoted with backslash ("\")
55
+ [
56
+ // (a\ ) -> (a )
57
+ // (a ) -> (a)
58
+ // (a ) -> (a)
59
+ // (a \ ) -> (a )
60
+ /((?:\\\\)*?)(\\?\s+)$/,
61
+ (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)
62
+ ],
63
+ // Replace (\ ) with ' '
64
+ // (\ ) -> ' '
65
+ // (\\ ) -> '\\ '
66
+ // (\\\ ) -> '\\ '
67
+ [
68
+ /(\\+?)\s/g,
69
+ (_, m1) => {
70
+ const { length } = m1;
71
+ return m1.slice(0, length - length % 2) + SPACE;
72
+ }
73
+ ],
74
+ // Escape metacharacters
75
+ // which is written down by users but means special for regular expressions.
76
+ // > There are 12 characters with special meanings:
77
+ // > - the backslash \,
78
+ // > - the caret ^,
79
+ // > - the dollar sign $,
80
+ // > - the period or dot .,
81
+ // > - the vertical bar or pipe symbol |,
82
+ // > - the question mark ?,
83
+ // > - the asterisk or star *,
84
+ // > - the plus sign +,
85
+ // > - the opening parenthesis (,
86
+ // > - the closing parenthesis ),
87
+ // > - and the opening square bracket [,
88
+ // > - the opening curly brace {,
89
+ // > These special characters are often called "metacharacters".
90
+ [
91
+ /[\\$.|*+(){^]/g,
92
+ (match) => `\\${match}`
93
+ ],
94
+ [
95
+ // > a question mark (?) matches a single character
96
+ /(?!\\)\?/g,
97
+ () => "[^/]"
98
+ ],
99
+ // leading slash
100
+ [
101
+ // > A leading slash matches the beginning of the pathname.
102
+ // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
103
+ // A leading slash matches the beginning of the pathname
104
+ /^\//,
105
+ () => "^"
106
+ ],
107
+ // replace special metacharacter slash after the leading slash
108
+ [
109
+ /\//g,
110
+ () => "\\/"
111
+ ],
112
+ [
113
+ // > A leading "**" followed by a slash means match in all directories.
114
+ // > For example, "**/foo" matches file or directory "foo" anywhere,
115
+ // > the same as pattern "foo".
116
+ // > "**/foo/bar" matches file or directory "bar" anywhere that is directly
117
+ // > under directory "foo".
118
+ // Notice that the '*'s have been replaced as '\\*'
119
+ /^\^*\\\*\\\*\\\//,
120
+ // '**/foo' <-> 'foo'
121
+ () => "^(?:.*\\/)?"
122
+ ],
123
+ // starting
124
+ [
125
+ // there will be no leading '/'
126
+ // (which has been replaced by section "leading slash")
127
+ // If starts with '**', adding a '^' to the regular expression also works
128
+ /^(?=[^^])/,
129
+ function startingReplacer() {
130
+ return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^";
131
+ }
132
+ ],
133
+ // two globstars
134
+ [
135
+ // Use lookahead assertions so that we could match more than one `'/**'`
136
+ /\\\/\\\*\\\*(?=\\\/|$)/g,
137
+ // Zero, one or several directories
138
+ // should not use '*', or it will be replaced by the next replacer
139
+ // Check if it is not the last `'/**'`
140
+ (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"
141
+ ],
142
+ // normal intermediate wildcards
143
+ [
144
+ // Never replace escaped '*'
145
+ // ignore rule '\*' will match the path '*'
146
+ // 'abc.*/' -> go
147
+ // 'abc.*' -> skip this rule,
148
+ // coz trailing single wildcard will be handed by [trailing wildcard]
149
+ /(^|[^\\]+)(\\\*)+(?=.+)/g,
150
+ // '*.js' matches '.js'
151
+ // '*.js' doesn't match 'abc'
152
+ (_, p1, p2) => {
153
+ const unescaped = p2.replace(/\\\*/g, "[^\\/]*");
154
+ return p1 + unescaped;
155
+ }
156
+ ],
157
+ [
158
+ // unescape, revert step 3 except for back slash
159
+ // For example, if a user escape a '\\*',
160
+ // after step 3, the result will be '\\\\\\*'
161
+ /\\\\\\(?=[$.|*+(){^])/g,
162
+ () => ESCAPE
163
+ ],
164
+ [
165
+ // '\\\\' -> '\\'
166
+ /\\\\/g,
167
+ () => ESCAPE
168
+ ],
169
+ [
170
+ // > The range notation, e.g. [a-zA-Z],
171
+ // > can be used to match one of the characters in a range.
172
+ // `\` is escaped by step 3
173
+ /(\\)?\[([^\]/]*?)(\\*)($|\])/g,
174
+ (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]"
175
+ ],
176
+ // ending
177
+ [
178
+ // 'js' will not match 'js.'
179
+ // 'ab' will not match 'abc'
180
+ /(?:[^*])$/,
181
+ // WTF!
182
+ // https://git-scm.com/docs/gitignore
183
+ // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
184
+ // which re-fixes #24, #38
185
+ // > If there is a separator at the end of the pattern then the pattern
186
+ // > will only match directories, otherwise the pattern can match both
187
+ // > files and directories.
188
+ // 'js*' will not match 'a.js'
189
+ // 'js/' will not match 'a.js'
190
+ // 'js' will match 'a.js' and 'a.js/'
191
+ (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`
192
+ ]
193
+ ];
194
+ var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/;
195
+ var MODE_IGNORE = "regex";
196
+ var MODE_CHECK_IGNORE = "checkRegex";
197
+ var UNDERSCORE = "_";
198
+ var TRAILING_WILD_CARD_REPLACERS = {
199
+ [MODE_IGNORE](_, p1) {
200
+ const prefix = p1 ? `${p1}[^/]+` : "[^/]*";
201
+ return `${prefix}(?=$|\\/$)`;
202
+ },
203
+ [MODE_CHECK_IGNORE](_, p1) {
204
+ const prefix = p1 ? `${p1}[^/]*` : "[^/]*";
205
+ return `${prefix}(?=$|\\/$)`;
206
+ }
207
+ };
208
+ var makeRegexPrefix = (pattern) => REPLACERS.reduce(
209
+ (prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)),
210
+ pattern
211
+ );
212
+ var isString = (subject) => typeof subject === "string";
213
+ var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0;
214
+ var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean);
215
+ var IgnoreRule = class {
216
+ constructor(pattern, mark, body, ignoreCase, negative, prefix) {
217
+ this.pattern = pattern;
218
+ this.mark = mark;
219
+ this.negative = negative;
220
+ define(this, "body", body);
221
+ define(this, "ignoreCase", ignoreCase);
222
+ define(this, "regexPrefix", prefix);
223
+ }
224
+ get regex() {
225
+ const key = UNDERSCORE + MODE_IGNORE;
226
+ if (this[key]) {
227
+ return this[key];
228
+ }
229
+ return this._make(MODE_IGNORE, key);
230
+ }
231
+ get checkRegex() {
232
+ const key = UNDERSCORE + MODE_CHECK_IGNORE;
233
+ if (this[key]) {
234
+ return this[key];
235
+ }
236
+ return this._make(MODE_CHECK_IGNORE, key);
237
+ }
238
+ _make(mode, key) {
239
+ const str = this.regexPrefix.replace(
240
+ REGEX_REPLACE_TRAILING_WILDCARD,
241
+ // It does not need to bind pattern
242
+ TRAILING_WILD_CARD_REPLACERS[mode]
243
+ );
244
+ const regex = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
245
+ return define(this, key, regex);
246
+ }
247
+ };
248
+ var createRule = ({
249
+ pattern,
250
+ mark
251
+ }, ignoreCase) => {
252
+ let negative = false;
253
+ let body = pattern;
254
+ if (body.indexOf("!") === 0) {
255
+ negative = true;
256
+ body = body.substr(1);
257
+ }
258
+ body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
259
+ const regexPrefix = makeRegexPrefix(body);
260
+ return new IgnoreRule(
261
+ pattern,
262
+ mark,
263
+ body,
264
+ ignoreCase,
265
+ negative,
266
+ regexPrefix
267
+ );
268
+ };
269
+ var RuleManager = class {
270
+ constructor(ignoreCase) {
271
+ this._ignoreCase = ignoreCase;
272
+ this._rules = [];
273
+ }
274
+ _add(pattern) {
275
+ if (pattern && pattern[KEY_IGNORE]) {
276
+ this._rules = this._rules.concat(pattern._rules._rules);
277
+ this._added = true;
278
+ return;
279
+ }
280
+ if (isString(pattern)) {
281
+ pattern = {
282
+ pattern
283
+ };
284
+ }
285
+ if (checkPattern(pattern.pattern)) {
286
+ const rule = createRule(pattern, this._ignoreCase);
287
+ this._added = true;
288
+ this._rules.push(rule);
289
+ }
290
+ }
291
+ // @param {Array<string> | string | Ignore} pattern
292
+ add(pattern) {
293
+ this._added = false;
294
+ makeArray(
295
+ isString(pattern) ? splitPattern(pattern) : pattern
296
+ ).forEach(this._add, this);
297
+ return this._added;
298
+ }
299
+ // Test one single path without recursively checking parent directories
300
+ //
301
+ // - checkUnignored `boolean` whether should check if the path is unignored,
302
+ // setting `checkUnignored` to `false` could reduce additional
303
+ // path matching.
304
+ // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
305
+ // @returns {TestResult} true if a file is ignored
306
+ test(path2, checkUnignored, mode) {
307
+ let ignored = false;
308
+ let unignored = false;
309
+ let matchedRule;
310
+ this._rules.forEach((rule) => {
311
+ const { negative } = rule;
312
+ if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
313
+ return;
314
+ }
315
+ const matched = rule[mode].test(path2);
316
+ if (!matched) {
317
+ return;
318
+ }
319
+ ignored = !negative;
320
+ unignored = negative;
321
+ matchedRule = negative ? UNDEFINED : rule;
322
+ });
323
+ const ret = {
324
+ ignored,
325
+ unignored
326
+ };
327
+ if (matchedRule) {
328
+ ret.rule = matchedRule;
329
+ }
330
+ return ret;
331
+ }
332
+ };
333
+ var throwError = (message, Ctor) => {
334
+ throw new Ctor(message);
335
+ };
336
+ var checkPath = (path2, originalPath, doThrow) => {
337
+ if (!isString(path2)) {
338
+ return doThrow(
339
+ `path must be a string, but got \`${originalPath}\``,
340
+ TypeError
341
+ );
342
+ }
343
+ if (!path2) {
344
+ return doThrow(`path must not be empty`, TypeError);
345
+ }
346
+ if (checkPath.isNotRelative(path2)) {
347
+ const r = "`path.relative()`d";
348
+ return doThrow(
349
+ `path should be a ${r} string, but got "${originalPath}"`,
350
+ RangeError
351
+ );
352
+ }
353
+ return true;
354
+ };
355
+ var isNotRelative = (path2) => REGEX_TEST_INVALID_PATH.test(path2);
356
+ checkPath.isNotRelative = isNotRelative;
357
+ checkPath.convert = (p) => p;
358
+ var Ignore = class {
359
+ constructor({
360
+ ignorecase = true,
361
+ ignoreCase = ignorecase,
362
+ allowRelativePaths = false
363
+ } = {}) {
364
+ define(this, KEY_IGNORE, true);
365
+ this._rules = new RuleManager(ignoreCase);
366
+ this._strictPathCheck = !allowRelativePaths;
367
+ this._initCache();
368
+ }
369
+ _initCache() {
370
+ this._ignoreCache = /* @__PURE__ */ Object.create(null);
371
+ this._testCache = /* @__PURE__ */ Object.create(null);
372
+ }
373
+ add(pattern) {
374
+ if (this._rules.add(pattern)) {
375
+ this._initCache();
376
+ }
377
+ return this;
378
+ }
379
+ // legacy
380
+ addPattern(pattern) {
381
+ return this.add(pattern);
382
+ }
383
+ // @returns {TestResult}
384
+ _test(originalPath, cache, checkUnignored, slices) {
385
+ const path2 = originalPath && checkPath.convert(originalPath);
386
+ checkPath(
387
+ path2,
388
+ originalPath,
389
+ this._strictPathCheck ? throwError : RETURN_FALSE
390
+ );
391
+ return this._t(path2, cache, checkUnignored, slices);
392
+ }
393
+ checkIgnore(path2) {
394
+ if (!REGEX_TEST_TRAILING_SLASH.test(path2)) {
395
+ return this.test(path2);
396
+ }
397
+ const slices = path2.split(SLASH).filter(Boolean);
398
+ slices.pop();
399
+ if (slices.length) {
400
+ const parent = this._t(
401
+ slices.join(SLASH) + SLASH,
402
+ this._testCache,
403
+ true,
404
+ slices
405
+ );
406
+ if (parent.ignored) {
407
+ return parent;
408
+ }
409
+ }
410
+ return this._rules.test(path2, false, MODE_CHECK_IGNORE);
411
+ }
412
+ _t(path2, cache, checkUnignored, slices) {
413
+ if (path2 in cache) {
414
+ return cache[path2];
415
+ }
416
+ if (!slices) {
417
+ slices = path2.split(SLASH).filter(Boolean);
418
+ }
419
+ slices.pop();
420
+ if (!slices.length) {
421
+ return cache[path2] = this._rules.test(path2, checkUnignored, MODE_IGNORE);
422
+ }
423
+ const parent = this._t(
424
+ slices.join(SLASH) + SLASH,
425
+ cache,
426
+ checkUnignored,
427
+ slices
428
+ );
429
+ return cache[path2] = parent.ignored ? parent : this._rules.test(path2, checkUnignored, MODE_IGNORE);
430
+ }
431
+ ignores(path2) {
432
+ return this._test(path2, this._ignoreCache, false).ignored;
433
+ }
434
+ createFilter() {
435
+ return (path2) => !this.ignores(path2);
436
+ }
437
+ filter(paths) {
438
+ return makeArray(paths).filter(this.createFilter());
439
+ }
440
+ // @returns {TestResult}
441
+ test(path2) {
442
+ return this._test(path2, this._testCache, true);
443
+ }
444
+ };
445
+ var factory = (options) => new Ignore(options);
446
+ var isPathValid = (path2) => checkPath(path2 && checkPath.convert(path2), path2, RETURN_FALSE);
447
+ var setupWindows = () => {
448
+ const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
449
+ checkPath.convert = makePosix;
450
+ const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
451
+ checkPath.isNotRelative = (path2) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path2) || isNotRelative(path2);
452
+ };
453
+ if (
454
+ // Detect `process` so that it can run in browsers.
455
+ typeof process !== "undefined" && process.platform === "win32"
456
+ ) {
457
+ setupWindows();
458
+ }
459
+ module.exports = factory;
460
+ factory.default = factory;
461
+ module.exports.isPathValid = isPathValid;
462
+ define(module.exports, /* @__PURE__ */ Symbol.for("setupWindows"), setupWindows);
463
+ }
464
+ });
465
+
466
+ // src/gitignore.ts
467
+ var import_ignore = __toESM(require_ignore(), 1);
468
+ import { readFileSync } from "fs";
469
+ import { readFile } from "fs/promises";
470
+ import path from "path";
471
+ async function loadGitignoreAt(dirAbs) {
472
+ try {
473
+ return (0, import_ignore.default)().add(await readFile(path.join(dirAbs, ".gitignore"), "utf8"));
474
+ } catch {
475
+ return null;
476
+ }
477
+ }
478
+ function loadGitignoreAtSync(dirAbs) {
479
+ try {
480
+ return (0, import_ignore.default)().add(readFileSync(path.join(dirAbs, ".gitignore"), "utf8"));
481
+ } catch {
482
+ return null;
483
+ }
484
+ }
485
+ function ignoredByLayers(layers, abs, isDir) {
486
+ for (const layer of layers) {
487
+ const rel = path.relative(layer.dirAbs, abs).split(path.sep).join("/");
488
+ if (!rel || rel.startsWith("..")) continue;
489
+ if (layer.ig.ignores(isDir ? `${rel}/` : rel)) return true;
490
+ }
491
+ return false;
492
+ }
493
+
494
+ export {
495
+ loadGitignoreAt,
496
+ loadGitignoreAtSync,
497
+ ignoredByLayers
498
+ };
499
+ //# sourceMappingURL=chunk-S4XVGLRW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../node_modules/ignore/index.js","../../src/gitignore.ts"],"sourcesContent":["// A simple implementation of make-array\nfunction makeArray (subject) {\n return Array.isArray(subject)\n ? subject\n : [subject]\n}\n\nconst UNDEFINED = undefined\nconst EMPTY = ''\nconst SPACE = ' '\nconst ESCAPE = '\\\\'\nconst REGEX_TEST_BLANK_LINE = /^\\s+$/\nconst REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\\\]|^)\\\\$/\nconst REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\\\!/\nconst REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\\\#/\nconst REGEX_SPLITALL_CRLF = /\\r?\\n/g\n\n// Invalid:\n// - /foo,\n// - ./foo,\n// - ../foo,\n// - .\n// - ..\n// Valid:\n// - .foo\nconst REGEX_TEST_INVALID_PATH = /^\\.{0,2}\\/|^\\.{1,2}$/\n\nconst REGEX_TEST_TRAILING_SLASH = /\\/$/\n\nconst SLASH = '/'\n\n// Do not use ternary expression here, since \"istanbul ignore next\" is buggy\nlet TMP_KEY_IGNORE = 'node-ignore'\n/* istanbul ignore else */\nif (typeof Symbol !== 'undefined') {\n TMP_KEY_IGNORE = Symbol.for('node-ignore')\n}\nconst KEY_IGNORE = TMP_KEY_IGNORE\n\nconst define = (object, key, value) => {\n Object.defineProperty(object, key, {value})\n return value\n}\n\nconst REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g\n\nconst RETURN_FALSE = () => false\n\n// Sanitize the range of a regular expression\n// The cases are complicated, see test cases for details\nconst sanitizeRange = range => range.replace(\n REGEX_REGEXP_RANGE,\n (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)\n ? match\n // Invalid range (out of order) which is ok for gitignore rules but\n // fatal for JavaScript regular expression, so eliminate it.\n : EMPTY\n)\n\n// See fixtures #59\nconst cleanRangeBackSlash = slashes => {\n const {length} = slashes\n return slashes.slice(0, length - length % 2)\n}\n\n// > If the pattern ends with a slash,\n// > it is removed for the purpose of the following description,\n// > but it would only find a match with a directory.\n// > In other words, foo/ will match a directory foo and paths underneath it,\n// > but will not match a regular file or a symbolic link foo\n// > (this is consistent with the way how pathspec works in general in Git).\n// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'\n// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call\n// you could use option `mark: true` with `glob`\n\n// '`foo/`' should not continue with the '`..`'\nconst REPLACERS = [\n\n [\n // Remove BOM\n // TODO:\n // Other similar zero-width characters?\n /^\\uFEFF/,\n () => EMPTY\n ],\n\n // > Trailing spaces are ignored unless they are quoted with backslash (\"\\\")\n [\n // (a\\ ) -> (a )\n // (a ) -> (a)\n // (a ) -> (a)\n // (a \\ ) -> (a )\n /((?:\\\\\\\\)*?)(\\\\?\\s+)$/,\n (_, m1, m2) => m1 + (\n m2.indexOf('\\\\') === 0\n ? SPACE\n : EMPTY\n )\n ],\n\n // Replace (\\ ) with ' '\n // (\\ ) -> ' '\n // (\\\\ ) -> '\\\\ '\n // (\\\\\\ ) -> '\\\\ '\n [\n /(\\\\+?)\\s/g,\n (_, m1) => {\n const {length} = m1\n return m1.slice(0, length - length % 2) + SPACE\n }\n ],\n\n // Escape metacharacters\n // which is written down by users but means special for regular expressions.\n\n // > There are 12 characters with special meanings:\n // > - the backslash \\,\n // > - the caret ^,\n // > - the dollar sign $,\n // > - the period or dot .,\n // > - the vertical bar or pipe symbol |,\n // > - the question mark ?,\n // > - the asterisk or star *,\n // > - the plus sign +,\n // > - the opening parenthesis (,\n // > - the closing parenthesis ),\n // > - and the opening square bracket [,\n // > - the opening curly brace {,\n // > These special characters are often called \"metacharacters\".\n [\n /[\\\\$.|*+(){^]/g,\n match => `\\\\${match}`\n ],\n\n [\n // > a question mark (?) matches a single character\n /(?!\\\\)\\?/g,\n () => '[^/]'\n ],\n\n // leading slash\n [\n\n // > A leading slash matches the beginning of the pathname.\n // > For example, \"/*.c\" matches \"cat-file.c\" but not \"mozilla-sha1/sha1.c\".\n // A leading slash matches the beginning of the pathname\n /^\\//,\n () => '^'\n ],\n\n // replace special metacharacter slash after the leading slash\n [\n /\\//g,\n () => '\\\\/'\n ],\n\n [\n // > A leading \"**\" followed by a slash means match in all directories.\n // > For example, \"**/foo\" matches file or directory \"foo\" anywhere,\n // > the same as pattern \"foo\".\n // > \"**/foo/bar\" matches file or directory \"bar\" anywhere that is directly\n // > under directory \"foo\".\n // Notice that the '*'s have been replaced as '\\\\*'\n /^\\^*\\\\\\*\\\\\\*\\\\\\//,\n\n // '**/foo' <-> 'foo'\n () => '^(?:.*\\\\/)?'\n ],\n\n // starting\n [\n // there will be no leading '/'\n // (which has been replaced by section \"leading slash\")\n // If starts with '**', adding a '^' to the regular expression also works\n /^(?=[^^])/,\n function startingReplacer () {\n // If has a slash `/` at the beginning or middle\n return !/\\/(?!$)/.test(this)\n // > Prior to 2.22.1\n // > If the pattern does not contain a slash /,\n // > Git treats it as a shell glob pattern\n // Actually, if there is only a trailing slash,\n // git also treats it as a shell glob pattern\n\n // After 2.22.1 (compatible but clearer)\n // > If there is a separator at the beginning or middle (or both)\n // > of the pattern, then the pattern is relative to the directory\n // > level of the particular .gitignore file itself.\n // > Otherwise the pattern may also match at any level below\n // > the .gitignore level.\n ? '(?:^|\\\\/)'\n\n // > Otherwise, Git treats the pattern as a shell glob suitable for\n // > consumption by fnmatch(3)\n : '^'\n }\n ],\n\n // two globstars\n [\n // Use lookahead assertions so that we could match more than one `'/**'`\n /\\\\\\/\\\\\\*\\\\\\*(?=\\\\\\/|$)/g,\n\n // Zero, one or several directories\n // should not use '*', or it will be replaced by the next replacer\n\n // Check if it is not the last `'/**'`\n (_, index, str) => index + 6 < str.length\n\n // case: /**/\n // > A slash followed by two consecutive asterisks then a slash matches\n // > zero or more directories.\n // > For example, \"a/**/b\" matches \"a/b\", \"a/x/b\", \"a/x/y/b\" and so on.\n // '/**/'\n ? '(?:\\\\/[^\\\\/]+)*'\n\n // case: /**\n // > A trailing `\"/**\"` matches everything inside.\n\n // #21: everything inside but it should not include the current folder\n : '\\\\/.+'\n ],\n\n // normal intermediate wildcards\n [\n // Never replace escaped '*'\n // ignore rule '\\*' will match the path '*'\n\n // 'abc.*/' -> go\n // 'abc.*' -> skip this rule,\n // coz trailing single wildcard will be handed by [trailing wildcard]\n /(^|[^\\\\]+)(\\\\\\*)+(?=.+)/g,\n\n // '*.js' matches '.js'\n // '*.js' doesn't match 'abc'\n (_, p1, p2) => {\n // 1.\n // > An asterisk \"*\" matches anything except a slash.\n // 2.\n // > Other consecutive asterisks are considered regular asterisks\n // > and will match according to the previous rules.\n const unescaped = p2.replace(/\\\\\\*/g, '[^\\\\/]*')\n return p1 + unescaped\n }\n ],\n\n [\n // unescape, revert step 3 except for back slash\n // For example, if a user escape a '\\\\*',\n // after step 3, the result will be '\\\\\\\\\\\\*'\n /\\\\\\\\\\\\(?=[$.|*+(){^])/g,\n () => ESCAPE\n ],\n\n [\n // '\\\\\\\\' -> '\\\\'\n /\\\\\\\\/g,\n () => ESCAPE\n ],\n\n [\n // > The range notation, e.g. [a-zA-Z],\n // > can be used to match one of the characters in a range.\n\n // `\\` is escaped by step 3\n /(\\\\)?\\[([^\\]/]*?)(\\\\*)($|\\])/g,\n (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE\n // '\\\\[bar]' -> '\\\\\\\\[bar\\\\]'\n ? `\\\\[${range}${cleanRangeBackSlash(endEscape)}${close}`\n : close === ']'\n ? endEscape.length % 2 === 0\n // A normal case, and it is a range notation\n // '[bar]'\n // '[bar\\\\\\\\]'\n ? `[${sanitizeRange(range)}${endEscape}]`\n // Invalid range notaton\n // '[bar\\\\]' -> '[bar\\\\\\\\]'\n : '[]'\n : '[]'\n ],\n\n // ending\n [\n // 'js' will not match 'js.'\n // 'ab' will not match 'abc'\n /(?:[^*])$/,\n\n // WTF!\n // https://git-scm.com/docs/gitignore\n // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)\n // which re-fixes #24, #38\n\n // > If there is a separator at the end of the pattern then the pattern\n // > will only match directories, otherwise the pattern can match both\n // > files and directories.\n\n // 'js*' will not match 'a.js'\n // 'js/' will not match 'a.js'\n // 'js' will match 'a.js' and 'a.js/'\n match => /\\/$/.test(match)\n // foo/ will not match 'foo'\n ? `${match}$`\n // foo matches 'foo' and 'foo/'\n : `${match}(?=$|\\\\/$)`\n ]\n]\n\nconst REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\\\\/)?\\\\\\*$/\nconst MODE_IGNORE = 'regex'\nconst MODE_CHECK_IGNORE = 'checkRegex'\nconst UNDERSCORE = '_'\n\nconst TRAILING_WILD_CARD_REPLACERS = {\n [MODE_IGNORE] (_, p1) {\n const prefix = p1\n // '\\^':\n // '/*' does not match EMPTY\n // '/*' does not match everything\n\n // '\\\\\\/':\n // 'abc/*' does not match 'abc/'\n ? `${p1}[^/]+`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n },\n\n [MODE_CHECK_IGNORE] (_, p1) {\n // When doing `git check-ignore`\n const prefix = p1\n // '\\\\\\/':\n // 'abc/*' DOES match 'abc/' !\n ? `${p1}[^/]*`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n }\n}\n\n// @param {pattern}\nconst makeRegexPrefix = pattern => REPLACERS.reduce(\n (prev, [matcher, replacer]) =>\n prev.replace(matcher, replacer.bind(pattern)),\n pattern\n)\n\nconst isString = subject => typeof subject === 'string'\n\n// > A blank line matches no files, so it can serve as a separator for readability.\nconst checkPattern = pattern => pattern\n && isString(pattern)\n && !REGEX_TEST_BLANK_LINE.test(pattern)\n && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)\n\n // > A line starting with # serves as a comment.\n && pattern.indexOf('#') !== 0\n\nconst splitPattern = pattern => pattern\n.split(REGEX_SPLITALL_CRLF)\n.filter(Boolean)\n\nclass IgnoreRule {\n constructor (\n pattern,\n mark,\n body,\n ignoreCase,\n negative,\n prefix\n ) {\n this.pattern = pattern\n this.mark = mark\n this.negative = negative\n\n define(this, 'body', body)\n define(this, 'ignoreCase', ignoreCase)\n define(this, 'regexPrefix', prefix)\n }\n\n get regex () {\n const key = UNDERSCORE + MODE_IGNORE\n\n if (this[key]) {\n return this[key]\n }\n\n return this._make(MODE_IGNORE, key)\n }\n\n get checkRegex () {\n const key = UNDERSCORE + MODE_CHECK_IGNORE\n\n if (this[key]) {\n return this[key]\n }\n\n return this._make(MODE_CHECK_IGNORE, key)\n }\n\n _make (mode, key) {\n const str = this.regexPrefix.replace(\n REGEX_REPLACE_TRAILING_WILDCARD,\n\n // It does not need to bind pattern\n TRAILING_WILD_CARD_REPLACERS[mode]\n )\n\n const regex = this.ignoreCase\n ? new RegExp(str, 'i')\n : new RegExp(str)\n\n return define(this, key, regex)\n }\n}\n\nconst createRule = ({\n pattern,\n mark\n}, ignoreCase) => {\n let negative = false\n let body = pattern\n\n // > An optional prefix \"!\" which negates the pattern;\n if (body.indexOf('!') === 0) {\n negative = true\n body = body.substr(1)\n }\n\n body = body\n // > Put a backslash (\"\\\") in front of the first \"!\" for patterns that\n // > begin with a literal \"!\", for example, `\"\\!important!.txt\"`.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')\n // > Put a backslash (\"\\\") in front of the first hash for patterns that\n // > begin with a hash.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#')\n\n const regexPrefix = makeRegexPrefix(body)\n\n return new IgnoreRule(\n pattern,\n mark,\n body,\n ignoreCase,\n negative,\n regexPrefix\n )\n}\n\nclass RuleManager {\n constructor (ignoreCase) {\n this._ignoreCase = ignoreCase\n this._rules = []\n }\n\n _add (pattern) {\n // #32\n if (pattern && pattern[KEY_IGNORE]) {\n this._rules = this._rules.concat(pattern._rules._rules)\n this._added = true\n return\n }\n\n if (isString(pattern)) {\n pattern = {\n pattern\n }\n }\n\n if (checkPattern(pattern.pattern)) {\n const rule = createRule(pattern, this._ignoreCase)\n this._added = true\n this._rules.push(rule)\n }\n }\n\n // @param {Array<string> | string | Ignore} pattern\n add (pattern) {\n this._added = false\n\n makeArray(\n isString(pattern)\n ? splitPattern(pattern)\n : pattern\n ).forEach(this._add, this)\n\n return this._added\n }\n\n // Test one single path without recursively checking parent directories\n //\n // - checkUnignored `boolean` whether should check if the path is unignored,\n // setting `checkUnignored` to `false` could reduce additional\n // path matching.\n // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`\n\n // @returns {TestResult} true if a file is ignored\n test (path, checkUnignored, mode) {\n let ignored = false\n let unignored = false\n let matchedRule\n\n this._rules.forEach(rule => {\n const {negative} = rule\n\n // | ignored : unignored\n // -------- | ---------------------------------------\n // negative | 0:0 | 0:1 | 1:0 | 1:1\n // -------- | ------- | ------- | ------- | --------\n // 0 | TEST | TEST | SKIP | X\n // 1 | TESTIF | SKIP | TEST | X\n\n // - SKIP: always skip\n // - TEST: always test\n // - TESTIF: only test if checkUnignored\n // - X: that never happen\n if (\n unignored === negative && ignored !== unignored\n || negative && !ignored && !unignored && !checkUnignored\n ) {\n return\n }\n\n const matched = rule[mode].test(path)\n\n if (!matched) {\n return\n }\n\n ignored = !negative\n unignored = negative\n\n matchedRule = negative\n ? UNDEFINED\n : rule\n })\n\n const ret = {\n ignored,\n unignored\n }\n\n if (matchedRule) {\n ret.rule = matchedRule\n }\n\n return ret\n }\n}\n\nconst throwError = (message, Ctor) => {\n throw new Ctor(message)\n}\n\nconst checkPath = (path, originalPath, doThrow) => {\n if (!isString(path)) {\n return doThrow(\n `path must be a string, but got \\`${originalPath}\\``,\n TypeError\n )\n }\n\n // We don't know if we should ignore EMPTY, so throw\n if (!path) {\n return doThrow(`path must not be empty`, TypeError)\n }\n\n // Check if it is a relative path\n if (checkPath.isNotRelative(path)) {\n const r = '`path.relative()`d'\n return doThrow(\n `path should be a ${r} string, but got \"${originalPath}\"`,\n RangeError\n )\n }\n\n return true\n}\n\nconst isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path)\n\ncheckPath.isNotRelative = isNotRelative\n\n// On windows, the following function will be replaced\n/* istanbul ignore next */\ncheckPath.convert = p => p\n\n\nclass Ignore {\n constructor ({\n ignorecase = true,\n ignoreCase = ignorecase,\n allowRelativePaths = false\n } = {}) {\n define(this, KEY_IGNORE, true)\n\n this._rules = new RuleManager(ignoreCase)\n this._strictPathCheck = !allowRelativePaths\n this._initCache()\n }\n\n _initCache () {\n // A cache for the result of `.ignores()`\n this._ignoreCache = Object.create(null)\n\n // A cache for the result of `.test()`\n this._testCache = Object.create(null)\n }\n\n add (pattern) {\n if (this._rules.add(pattern)) {\n // Some rules have just added to the ignore,\n // making the behavior changed,\n // so we need to re-initialize the result cache\n this._initCache()\n }\n\n return this\n }\n\n // legacy\n addPattern (pattern) {\n return this.add(pattern)\n }\n\n // @returns {TestResult}\n _test (originalPath, cache, checkUnignored, slices) {\n const path = originalPath\n // Supports nullable path\n && checkPath.convert(originalPath)\n\n checkPath(\n path,\n originalPath,\n this._strictPathCheck\n ? throwError\n : RETURN_FALSE\n )\n\n return this._t(path, cache, checkUnignored, slices)\n }\n\n checkIgnore (path) {\n // If the path doest not end with a slash, `.ignores()` is much equivalent\n // to `git check-ignore`\n if (!REGEX_TEST_TRAILING_SLASH.test(path)) {\n return this.test(path)\n }\n\n const slices = path.split(SLASH).filter(Boolean)\n slices.pop()\n\n if (slices.length) {\n const parent = this._t(\n slices.join(SLASH) + SLASH,\n this._testCache,\n true,\n slices\n )\n\n if (parent.ignored) {\n return parent\n }\n }\n\n return this._rules.test(path, false, MODE_CHECK_IGNORE)\n }\n\n _t (\n // The path to be tested\n path,\n\n // The cache for the result of a certain checking\n cache,\n\n // Whether should check if the path is unignored\n checkUnignored,\n\n // The path slices\n slices\n ) {\n if (path in cache) {\n return cache[path]\n }\n\n if (!slices) {\n // path/to/a.js\n // ['path', 'to', 'a.js']\n slices = path.split(SLASH).filter(Boolean)\n }\n\n slices.pop()\n\n // If the path has no parent directory, just test it\n if (!slices.length) {\n return cache[path] = this._rules.test(path, checkUnignored, MODE_IGNORE)\n }\n\n const parent = this._t(\n slices.join(SLASH) + SLASH,\n cache,\n checkUnignored,\n slices\n )\n\n // If the path contains a parent directory, check the parent first\n return cache[path] = parent.ignored\n // > It is not possible to re-include a file if a parent directory of\n // > that file is excluded.\n ? parent\n : this._rules.test(path, checkUnignored, MODE_IGNORE)\n }\n\n ignores (path) {\n return this._test(path, this._ignoreCache, false).ignored\n }\n\n createFilter () {\n return path => !this.ignores(path)\n }\n\n filter (paths) {\n return makeArray(paths).filter(this.createFilter())\n }\n\n // @returns {TestResult}\n test (path) {\n return this._test(path, this._testCache, true)\n }\n}\n\nconst factory = options => new Ignore(options)\n\nconst isPathValid = path =>\n checkPath(path && checkPath.convert(path), path, RETURN_FALSE)\n\n/* istanbul ignore next */\nconst setupWindows = () => {\n /* eslint no-control-regex: \"off\" */\n const makePosix = str => /^\\\\\\\\\\?\\\\/.test(str)\n || /[\"<>|\\u0000-\\u001F]+/u.test(str)\n ? str\n : str.replace(/\\\\/g, '/')\n\n checkPath.convert = makePosix\n\n // 'C:\\\\foo' <- 'C:\\\\foo' has been converted to 'C:/'\n // 'd:\\\\foo'\n const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\\//i\n checkPath.isNotRelative = path =>\n REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path)\n || isNotRelative(path)\n}\n\n\n// Windows\n// --------------------------------------------------------------\n/* istanbul ignore next */\nif (\n // Detect `process` so that it can run in browsers.\n typeof process !== 'undefined'\n && process.platform === 'win32'\n) {\n setupWindows()\n}\n\n// COMMONJS_EXPORTS ////////////////////////////////////////////////////////////\n\nmodule.exports = factory\n\n// Although it is an anti-pattern,\n// it is still widely misused by a lot of libraries in github\n// Ref: https://github.com/search?q=ignore.default%28%29&type=code\nfactory.default = factory\n\nmodule.exports.isPathValid = isPathValid\n\n// For testing purposes\ndefine(module.exports, Symbol.for('setupWindows'), setupWindows)\n","/** Nested .gitignore evaluation — shared by the at-mention picker walker and the semantic chunker. */\n\nimport { readFileSync } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport ignore, { type Ignore } from \"ignore\";\n\nexport interface GitignoreLayer {\n /** Absolute dir the .gitignore lives in. Patterns evaluate relative to this. */\n dirAbs: string;\n ig: Ignore;\n}\n\nexport async function loadGitignoreAt(dirAbs: string): Promise<Ignore | null> {\n try {\n return ignore().add(await readFile(path.join(dirAbs, \".gitignore\"), \"utf8\"));\n } catch {\n return null;\n }\n}\n\nexport function loadGitignoreAtSync(dirAbs: string): Ignore | null {\n try {\n return ignore().add(readFileSync(path.join(dirAbs, \".gitignore\"), \"utf8\"));\n } catch {\n return null;\n }\n}\n\n/** True if any layer — outermost to innermost — ignores this path. */\nexport function ignoredByLayers(\n layers: readonly GitignoreLayer[],\n abs: string,\n isDir: boolean,\n): boolean {\n for (const layer of layers) {\n const rel = path.relative(layer.dirAbs, abs).split(path.sep).join(\"/\");\n if (!rel || rel.startsWith(\"..\")) continue;\n if (layer.ig.ignores(isDir ? `${rel}/` : rel)) return true;\n }\n return false;\n}\n"],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AACA,aAAS,UAAW,SAAS;AAC3B,aAAO,MAAM,QAAQ,OAAO,IACxB,UACA,CAAC,OAAO;AAAA,IACd;AAEA,QAAM,YAAY;AAClB,QAAM,QAAQ;AACd,QAAM,QAAQ;AACd,QAAM,SAAS;AACf,QAAM,wBAAwB;AAC9B,QAAM,mCAAmC;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,51 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __cr } from 'node:module'; if (typeof globalThis.require === 'undefined') { globalThis.require = __cr(import.meta.url); }
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
10
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
11
+ }) : x)(function(x) {
12
+ if (typeof require !== "undefined") return require.apply(this, arguments);
13
+ throw Error('Dynamic require of "' + x + '" is not supported');
14
+ });
15
+ var __esm = (fn, res) => function __init() {
16
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
17
+ };
18
+ var __commonJS = (cb, mod) => function __require2() {
19
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
20
+ };
21
+ var __export = (target, all) => {
22
+ for (var name in all)
23
+ __defProp(target, name, { get: all[name], enumerable: true });
24
+ };
25
+ var __copyProps = (to, from, except, desc) => {
26
+ if (from && typeof from === "object" || typeof from === "function") {
27
+ for (let key of __getOwnPropNames(from))
28
+ if (!__hasOwnProp.call(to, key) && key !== except)
29
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
30
+ }
31
+ return to;
32
+ };
33
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
34
+ // If the importer is in node compatibility mode or this is not an ESM
35
+ // file that has been converted to a CommonJS file using a Babel-
36
+ // compatible transform (i.e. "__esModule" has not been set), then set
37
+ // "default" to the CommonJS "module.exports" for node compatibility.
38
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
39
+ mod
40
+ ));
41
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
42
+
43
+ export {
44
+ __require,
45
+ __esm,
46
+ __commonJS,
47
+ __export,
48
+ __toESM,
49
+ __toCommonJS
50
+ };
51
+ //# sourceMappingURL=chunk-TUK7OWJA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}