decidim 0.27.2 → 0.27.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim might be problematic. Click here for more details.

Files changed (224) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +17 -10
  3. data/babel.config.json +1 -4
  4. data/docs/modules/customize/pages/data_consent.adoc +1 -1
  5. data/lib/decidim/release_manager.rb.new +43 -0
  6. data/lib/decidim/version.rb +1 -1
  7. data/package-lock.json +343 -255
  8. data/packages/browserslist-config/package.json +1 -1
  9. data/packages/core/node_modules/diff/CONTRIBUTING.md +39 -0
  10. data/packages/core/node_modules/diff/LICENSE +31 -0
  11. data/packages/core/node_modules/diff/README.md +211 -0
  12. data/packages/core/node_modules/diff/dist/diff.js +1627 -0
  13. data/packages/core/node_modules/diff/dist/diff.min.js +38 -0
  14. data/packages/core/node_modules/diff/lib/convert/dmp.js +32 -0
  15. data/packages/core/node_modules/diff/lib/convert/xml.js +42 -0
  16. data/packages/core/node_modules/diff/lib/diff/array.js +45 -0
  17. data/packages/core/node_modules/diff/lib/diff/base.js +307 -0
  18. data/packages/core/node_modules/diff/lib/diff/character.js +37 -0
  19. data/packages/core/node_modules/diff/lib/diff/css.js +41 -0
  20. data/packages/core/node_modules/diff/lib/diff/json.js +163 -0
  21. data/packages/core/node_modules/diff/lib/diff/line.js +89 -0
  22. data/packages/core/node_modules/diff/lib/diff/sentence.js +41 -0
  23. data/packages/core/node_modules/diff/lib/diff/word.js +108 -0
  24. data/packages/core/node_modules/diff/lib/index.es6.js +1561 -0
  25. data/packages/core/node_modules/diff/lib/index.js +216 -0
  26. data/packages/core/node_modules/diff/lib/index.mjs +1561 -0
  27. data/packages/core/node_modules/diff/lib/patch/apply.js +238 -0
  28. data/packages/core/node_modules/diff/lib/patch/create.js +272 -0
  29. data/packages/core/node_modules/diff/lib/patch/merge.js +613 -0
  30. data/packages/core/node_modules/diff/lib/patch/parse.js +167 -0
  31. data/packages/core/node_modules/diff/lib/util/array.js +32 -0
  32. data/packages/core/node_modules/diff/lib/util/distance-iterator.js +57 -0
  33. data/packages/core/node_modules/diff/lib/util/params.js +24 -0
  34. data/packages/core/node_modules/diff/package.json +87 -0
  35. data/packages/core/node_modules/diff/release-notes.md +309 -0
  36. data/packages/core/node_modules/diff/runtime.js +3 -0
  37. data/packages/core/package-lock.json +4889 -0
  38. data/packages/core/package.json +1 -1
  39. data/packages/dev/package.json +1 -1
  40. data/packages/elections/package.json +1 -1
  41. data/packages/eslint-config/package.json +1 -1
  42. data/packages/stylelint-config/package.json +1 -1
  43. data/packages/webpacker/node_modules/argparse/CHANGELOG.md +216 -0
  44. data/packages/webpacker/node_modules/argparse/LICENSE +254 -0
  45. data/packages/webpacker/node_modules/argparse/README.md +84 -0
  46. data/packages/webpacker/node_modules/argparse/argparse.js +3707 -0
  47. data/packages/webpacker/node_modules/argparse/lib/sub.js +67 -0
  48. data/packages/webpacker/node_modules/argparse/lib/textwrap.js +440 -0
  49. data/packages/webpacker/node_modules/argparse/package.json +31 -0
  50. data/packages/{core/node_modules/uuid/LICENSE.md → webpacker/node_modules/brace-expansion/LICENSE} +2 -2
  51. data/packages/webpacker/node_modules/brace-expansion/README.md +135 -0
  52. data/packages/webpacker/node_modules/brace-expansion/index.js +203 -0
  53. data/packages/webpacker/node_modules/brace-expansion/package.json +46 -0
  54. data/packages/webpacker/node_modules/glob/LICENSE +15 -0
  55. data/packages/webpacker/node_modules/glob/README.md +1214 -0
  56. data/packages/webpacker/node_modules/glob/dist/cjs/package.json +4 -0
  57. data/packages/webpacker/node_modules/glob/dist/cjs/src/bin.d.ts +3 -0
  58. data/packages/webpacker/node_modules/glob/dist/cjs/src/bin.d.ts.map +1 -0
  59. data/packages/webpacker/node_modules/glob/dist/cjs/src/bin.js +270 -0
  60. data/packages/webpacker/node_modules/glob/dist/cjs/src/bin.js.map +1 -0
  61. data/packages/webpacker/node_modules/glob/dist/cjs/src/glob.d.ts +344 -0
  62. data/packages/webpacker/node_modules/glob/dist/cjs/src/glob.d.ts.map +1 -0
  63. data/packages/webpacker/node_modules/glob/dist/cjs/src/glob.js +238 -0
  64. data/packages/webpacker/node_modules/glob/dist/cjs/src/glob.js.map +1 -0
  65. data/packages/webpacker/node_modules/glob/dist/cjs/src/has-magic.d.ts +14 -0
  66. data/packages/webpacker/node_modules/glob/dist/cjs/src/has-magic.d.ts.map +1 -0
  67. data/packages/webpacker/node_modules/glob/dist/cjs/src/has-magic.js +27 -0
  68. data/packages/webpacker/node_modules/glob/dist/cjs/src/has-magic.js.map +1 -0
  69. data/packages/webpacker/node_modules/glob/dist/cjs/src/ignore.d.ts +20 -0
  70. data/packages/webpacker/node_modules/glob/dist/cjs/src/ignore.d.ts.map +1 -0
  71. data/packages/webpacker/node_modules/glob/dist/cjs/src/ignore.js +103 -0
  72. data/packages/webpacker/node_modules/glob/dist/cjs/src/ignore.js.map +1 -0
  73. data/packages/webpacker/node_modules/glob/dist/cjs/src/index.d.ts +95 -0
  74. data/packages/webpacker/node_modules/glob/dist/cjs/src/index.d.ts.map +1 -0
  75. data/packages/webpacker/node_modules/glob/dist/cjs/src/index.js +68 -0
  76. data/packages/webpacker/node_modules/glob/dist/cjs/src/index.js.map +1 -0
  77. data/packages/webpacker/node_modules/glob/dist/cjs/src/pattern.d.ts +77 -0
  78. data/packages/webpacker/node_modules/glob/dist/cjs/src/pattern.d.ts.map +1 -0
  79. data/packages/webpacker/node_modules/glob/dist/cjs/src/pattern.js +219 -0
  80. data/packages/webpacker/node_modules/glob/dist/cjs/src/pattern.js.map +1 -0
  81. data/packages/webpacker/node_modules/glob/dist/cjs/src/processor.d.ts +59 -0
  82. data/packages/webpacker/node_modules/glob/dist/cjs/src/processor.d.ts.map +1 -0
  83. data/packages/webpacker/node_modules/glob/dist/cjs/src/processor.js +309 -0
  84. data/packages/webpacker/node_modules/glob/dist/cjs/src/processor.js.map +1 -0
  85. data/packages/webpacker/node_modules/glob/dist/cjs/src/walker.d.ts +96 -0
  86. data/packages/webpacker/node_modules/glob/dist/cjs/src/walker.d.ts.map +1 -0
  87. data/packages/webpacker/node_modules/glob/dist/cjs/src/walker.js +358 -0
  88. data/packages/webpacker/node_modules/glob/dist/cjs/src/walker.js.map +1 -0
  89. data/packages/webpacker/node_modules/glob/dist/mjs/glob.d.ts +344 -0
  90. data/packages/webpacker/node_modules/glob/dist/mjs/glob.d.ts.map +1 -0
  91. data/packages/webpacker/node_modules/glob/dist/mjs/glob.js +234 -0
  92. data/packages/webpacker/node_modules/glob/dist/mjs/glob.js.map +1 -0
  93. data/packages/webpacker/node_modules/glob/dist/mjs/has-magic.d.ts +14 -0
  94. data/packages/webpacker/node_modules/glob/dist/mjs/has-magic.d.ts.map +1 -0
  95. data/packages/webpacker/node_modules/glob/dist/mjs/has-magic.js +23 -0
  96. data/packages/webpacker/node_modules/glob/dist/mjs/has-magic.js.map +1 -0
  97. data/packages/webpacker/node_modules/glob/dist/mjs/ignore.d.ts +20 -0
  98. data/packages/webpacker/node_modules/glob/dist/mjs/ignore.d.ts.map +1 -0
  99. data/packages/webpacker/node_modules/glob/dist/mjs/ignore.js +99 -0
  100. data/packages/webpacker/node_modules/glob/dist/mjs/ignore.js.map +1 -0
  101. data/packages/webpacker/node_modules/glob/dist/mjs/index.d.ts +95 -0
  102. data/packages/webpacker/node_modules/glob/dist/mjs/index.d.ts.map +1 -0
  103. data/packages/webpacker/node_modules/glob/dist/mjs/index.js +56 -0
  104. data/packages/webpacker/node_modules/glob/dist/mjs/index.js.map +1 -0
  105. data/packages/webpacker/node_modules/glob/dist/mjs/package.json +4 -0
  106. data/packages/webpacker/node_modules/glob/dist/mjs/pattern.d.ts +77 -0
  107. data/packages/webpacker/node_modules/glob/dist/mjs/pattern.d.ts.map +1 -0
  108. data/packages/webpacker/node_modules/glob/dist/mjs/pattern.js +215 -0
  109. data/packages/webpacker/node_modules/glob/dist/mjs/pattern.js.map +1 -0
  110. data/packages/webpacker/node_modules/glob/dist/mjs/processor.d.ts +59 -0
  111. data/packages/webpacker/node_modules/glob/dist/mjs/processor.d.ts.map +1 -0
  112. data/packages/webpacker/node_modules/glob/dist/mjs/processor.js +302 -0
  113. data/packages/webpacker/node_modules/glob/dist/mjs/processor.js.map +1 -0
  114. data/packages/webpacker/node_modules/glob/dist/mjs/walker.d.ts +96 -0
  115. data/packages/webpacker/node_modules/glob/dist/mjs/walker.d.ts.map +1 -0
  116. data/packages/webpacker/node_modules/glob/dist/mjs/walker.js +352 -0
  117. data/packages/webpacker/node_modules/glob/dist/mjs/walker.js.map +1 -0
  118. data/packages/webpacker/node_modules/glob/package.json +98 -0
  119. data/packages/webpacker/node_modules/js-yaml/CHANGELOG.md +616 -0
  120. data/packages/webpacker/node_modules/js-yaml/LICENSE +21 -0
  121. data/packages/webpacker/node_modules/js-yaml/README.md +246 -0
  122. data/packages/webpacker/node_modules/js-yaml/bin/js-yaml.js +126 -0
  123. data/packages/webpacker/node_modules/js-yaml/dist/js-yaml.js +3874 -0
  124. data/packages/webpacker/node_modules/js-yaml/dist/js-yaml.min.js +2 -0
  125. data/packages/webpacker/node_modules/js-yaml/dist/js-yaml.mjs +3851 -0
  126. data/packages/webpacker/node_modules/js-yaml/index.js +47 -0
  127. data/packages/webpacker/node_modules/js-yaml/lib/common.js +59 -0
  128. data/packages/webpacker/node_modules/js-yaml/lib/dumper.js +965 -0
  129. data/packages/webpacker/node_modules/js-yaml/lib/exception.js +55 -0
  130. data/packages/webpacker/node_modules/js-yaml/lib/loader.js +1727 -0
  131. data/packages/webpacker/node_modules/js-yaml/lib/schema/core.js +11 -0
  132. data/packages/webpacker/node_modules/js-yaml/lib/schema/default.js +22 -0
  133. data/packages/webpacker/node_modules/js-yaml/lib/schema/failsafe.js +17 -0
  134. data/packages/webpacker/node_modules/js-yaml/lib/schema/json.js +19 -0
  135. data/packages/webpacker/node_modules/js-yaml/lib/schema.js +121 -0
  136. data/packages/webpacker/node_modules/js-yaml/lib/snippet.js +101 -0
  137. data/packages/webpacker/node_modules/js-yaml/lib/type/binary.js +125 -0
  138. data/packages/webpacker/node_modules/js-yaml/lib/type/bool.js +35 -0
  139. data/packages/webpacker/node_modules/js-yaml/lib/type/float.js +97 -0
  140. data/packages/webpacker/node_modules/js-yaml/lib/type/int.js +156 -0
  141. data/packages/webpacker/node_modules/js-yaml/lib/type/map.js +8 -0
  142. data/packages/webpacker/node_modules/js-yaml/lib/type/merge.js +12 -0
  143. data/packages/webpacker/node_modules/js-yaml/lib/type/null.js +35 -0
  144. data/packages/webpacker/node_modules/js-yaml/lib/type/omap.js +44 -0
  145. data/packages/webpacker/node_modules/js-yaml/lib/type/pairs.js +53 -0
  146. data/packages/webpacker/node_modules/js-yaml/lib/type/seq.js +8 -0
  147. data/packages/webpacker/node_modules/js-yaml/lib/type/set.js +29 -0
  148. data/packages/webpacker/node_modules/js-yaml/lib/type/str.js +8 -0
  149. data/packages/webpacker/node_modules/js-yaml/lib/type/timestamp.js +88 -0
  150. data/packages/webpacker/node_modules/js-yaml/lib/type.js +66 -0
  151. data/packages/webpacker/node_modules/js-yaml/package.json +66 -0
  152. data/packages/webpacker/node_modules/minimatch/LICENSE +15 -0
  153. data/packages/webpacker/node_modules/minimatch/README.md +454 -0
  154. data/packages/webpacker/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +2 -0
  155. data/packages/webpacker/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +1 -0
  156. data/packages/webpacker/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +14 -0
  157. data/packages/webpacker/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +1 -0
  158. data/packages/webpacker/node_modules/minimatch/dist/cjs/ast.d.ts +19 -0
  159. data/packages/webpacker/node_modules/minimatch/dist/cjs/ast.d.ts.map +1 -0
  160. data/packages/webpacker/node_modules/minimatch/dist/cjs/ast.js +589 -0
  161. data/packages/webpacker/node_modules/minimatch/dist/cjs/ast.js.map +1 -0
  162. data/packages/webpacker/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +8 -0
  163. data/packages/webpacker/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +1 -0
  164. data/packages/webpacker/node_modules/minimatch/dist/cjs/brace-expressions.js +152 -0
  165. data/packages/webpacker/node_modules/minimatch/dist/cjs/brace-expressions.js.map +1 -0
  166. data/packages/webpacker/node_modules/minimatch/dist/cjs/escape.d.ts +12 -0
  167. data/packages/webpacker/node_modules/minimatch/dist/cjs/escape.d.ts.map +1 -0
  168. data/packages/webpacker/node_modules/minimatch/dist/cjs/escape.js +22 -0
  169. data/packages/webpacker/node_modules/minimatch/dist/cjs/escape.js.map +1 -0
  170. data/packages/webpacker/node_modules/minimatch/dist/cjs/index.d.ts +94 -0
  171. data/packages/webpacker/node_modules/minimatch/dist/cjs/index.d.ts.map +1 -0
  172. data/packages/webpacker/node_modules/minimatch/dist/cjs/index.js +1011 -0
  173. data/packages/webpacker/node_modules/minimatch/dist/cjs/index.js.map +1 -0
  174. data/packages/webpacker/node_modules/minimatch/dist/cjs/package.json +3 -0
  175. data/packages/webpacker/node_modules/minimatch/dist/cjs/unescape.d.ts +17 -0
  176. data/packages/webpacker/node_modules/minimatch/dist/cjs/unescape.d.ts.map +1 -0
  177. data/packages/webpacker/node_modules/minimatch/dist/cjs/unescape.js +24 -0
  178. data/packages/webpacker/node_modules/minimatch/dist/cjs/unescape.js.map +1 -0
  179. data/packages/webpacker/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +2 -0
  180. data/packages/webpacker/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +1 -0
  181. data/packages/webpacker/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +10 -0
  182. data/packages/webpacker/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +1 -0
  183. data/packages/webpacker/node_modules/minimatch/dist/mjs/ast.d.ts +19 -0
  184. data/packages/webpacker/node_modules/minimatch/dist/mjs/ast.d.ts.map +1 -0
  185. data/packages/webpacker/node_modules/minimatch/dist/mjs/ast.js +585 -0
  186. data/packages/webpacker/node_modules/minimatch/dist/mjs/ast.js.map +1 -0
  187. data/packages/webpacker/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +8 -0
  188. data/packages/webpacker/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +1 -0
  189. data/packages/webpacker/node_modules/minimatch/dist/mjs/brace-expressions.js +148 -0
  190. data/packages/webpacker/node_modules/minimatch/dist/mjs/brace-expressions.js.map +1 -0
  191. data/packages/webpacker/node_modules/minimatch/dist/mjs/escape.d.ts +12 -0
  192. data/packages/webpacker/node_modules/minimatch/dist/mjs/escape.d.ts.map +1 -0
  193. data/packages/webpacker/node_modules/minimatch/dist/mjs/escape.js +18 -0
  194. data/packages/webpacker/node_modules/minimatch/dist/mjs/escape.js.map +1 -0
  195. data/packages/webpacker/node_modules/minimatch/dist/mjs/index.d.ts +94 -0
  196. data/packages/webpacker/node_modules/minimatch/dist/mjs/index.d.ts.map +1 -0
  197. data/packages/webpacker/node_modules/minimatch/dist/mjs/index.js +995 -0
  198. data/packages/webpacker/node_modules/minimatch/dist/mjs/index.js.map +1 -0
  199. data/packages/webpacker/node_modules/minimatch/dist/mjs/package.json +3 -0
  200. data/packages/webpacker/node_modules/minimatch/dist/mjs/unescape.d.ts +17 -0
  201. data/packages/webpacker/node_modules/minimatch/dist/mjs/unescape.d.ts.map +1 -0
  202. data/packages/webpacker/node_modules/minimatch/dist/mjs/unescape.js +20 -0
  203. data/packages/webpacker/node_modules/minimatch/dist/mjs/unescape.js.map +1 -0
  204. data/packages/webpacker/node_modules/minimatch/package.json +86 -0
  205. data/packages/webpacker/package.json +2 -2
  206. metadata +238 -65
  207. data/packages/core/node_modules/uuid/AUTHORS +0 -5
  208. data/packages/core/node_modules/uuid/CHANGELOG.md +0 -119
  209. data/packages/core/node_modules/uuid/README.md +0 -276
  210. data/packages/core/node_modules/uuid/bin/uuid +0 -65
  211. data/packages/core/node_modules/uuid/index.js +0 -8
  212. data/packages/core/node_modules/uuid/lib/bytesToUuid.js +0 -26
  213. data/packages/core/node_modules/uuid/lib/md5-browser.js +0 -216
  214. data/packages/core/node_modules/uuid/lib/md5.js +0 -25
  215. data/packages/core/node_modules/uuid/lib/rng-browser.js +0 -34
  216. data/packages/core/node_modules/uuid/lib/rng.js +0 -8
  217. data/packages/core/node_modules/uuid/lib/sha1-browser.js +0 -89
  218. data/packages/core/node_modules/uuid/lib/sha1.js +0 -25
  219. data/packages/core/node_modules/uuid/lib/v35.js +0 -57
  220. data/packages/core/node_modules/uuid/package.json +0 -49
  221. data/packages/core/node_modules/uuid/v1.js +0 -109
  222. data/packages/core/node_modules/uuid/v3.js +0 -4
  223. data/packages/core/node_modules/uuid/v4.js +0 -29
  224. data/packages/core/node_modules/uuid/v5.js +0 -3
@@ -0,0 +1,238 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Glob = void 0;
4
+ const minimatch_1 = require("minimatch");
5
+ const path_scurry_1 = require("path-scurry");
6
+ const url_1 = require("url");
7
+ const pattern_js_1 = require("./pattern.js");
8
+ const walker_js_1 = require("./walker.js");
9
+ // if no process global, just call it linux.
10
+ // so we default to case-sensitive, / separators
11
+ const defaultPlatform = typeof process === 'object' &&
12
+ process &&
13
+ typeof process.platform === 'string'
14
+ ? process.platform
15
+ : 'linux';
16
+ /**
17
+ * An object that can perform glob pattern traversals.
18
+ */
19
+ class Glob {
20
+ absolute;
21
+ cwd;
22
+ root;
23
+ dot;
24
+ dotRelative;
25
+ follow;
26
+ ignore;
27
+ magicalBraces;
28
+ mark;
29
+ matchBase;
30
+ maxDepth;
31
+ nobrace;
32
+ nocase;
33
+ nodir;
34
+ noext;
35
+ noglobstar;
36
+ pattern;
37
+ platform;
38
+ realpath;
39
+ scurry;
40
+ stat;
41
+ signal;
42
+ windowsPathsNoEscape;
43
+ withFileTypes;
44
+ /**
45
+ * The options provided to the constructor.
46
+ */
47
+ opts;
48
+ /**
49
+ * An array of parsed immutable {@link Pattern} objects.
50
+ */
51
+ patterns;
52
+ /**
53
+ * All options are stored as properties on the `Glob` object.
54
+ *
55
+ * See {@link GlobOptions} for full options descriptions.
56
+ *
57
+ * Note that a previous `Glob` object can be passed as the
58
+ * `GlobOptions` to another `Glob` instantiation to re-use settings
59
+ * and caches with a new pattern.
60
+ *
61
+ * Traversal functions can be called multiple times to run the walk
62
+ * again.
63
+ */
64
+ constructor(pattern, opts) {
65
+ /* c8 ignore start */
66
+ if (!opts)
67
+ throw new TypeError('glob options required');
68
+ /* c8 ignore stop */
69
+ this.withFileTypes = !!opts.withFileTypes;
70
+ this.signal = opts.signal;
71
+ this.follow = !!opts.follow;
72
+ this.dot = !!opts.dot;
73
+ this.dotRelative = !!opts.dotRelative;
74
+ this.nodir = !!opts.nodir;
75
+ this.mark = !!opts.mark;
76
+ if (!opts.cwd) {
77
+ this.cwd = '';
78
+ }
79
+ else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {
80
+ opts.cwd = (0, url_1.fileURLToPath)(opts.cwd);
81
+ }
82
+ this.cwd = opts.cwd || '';
83
+ this.root = opts.root;
84
+ this.magicalBraces = !!opts.magicalBraces;
85
+ this.nobrace = !!opts.nobrace;
86
+ this.noext = !!opts.noext;
87
+ this.realpath = !!opts.realpath;
88
+ this.absolute = opts.absolute;
89
+ this.noglobstar = !!opts.noglobstar;
90
+ this.matchBase = !!opts.matchBase;
91
+ this.maxDepth =
92
+ typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity;
93
+ this.stat = !!opts.stat;
94
+ this.ignore = opts.ignore;
95
+ if (this.withFileTypes && this.absolute !== undefined) {
96
+ throw new Error('cannot set absolute and withFileTypes:true');
97
+ }
98
+ if (typeof pattern === 'string') {
99
+ pattern = [pattern];
100
+ }
101
+ this.windowsPathsNoEscape =
102
+ !!opts.windowsPathsNoEscape ||
103
+ opts.allowWindowsEscape === false;
104
+ if (this.windowsPathsNoEscape) {
105
+ pattern = pattern.map(p => p.replace(/\\/g, '/'));
106
+ }
107
+ if (this.matchBase) {
108
+ if (opts.noglobstar) {
109
+ throw new TypeError('base matching requires globstar');
110
+ }
111
+ pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`));
112
+ }
113
+ this.pattern = pattern;
114
+ this.platform = opts.platform || defaultPlatform;
115
+ this.opts = { ...opts, platform: this.platform };
116
+ if (opts.scurry) {
117
+ this.scurry = opts.scurry;
118
+ if (opts.nocase !== undefined &&
119
+ opts.nocase !== opts.scurry.nocase) {
120
+ throw new Error('nocase option contradicts provided scurry option');
121
+ }
122
+ }
123
+ else {
124
+ const Scurry = opts.platform === 'win32'
125
+ ? path_scurry_1.PathScurryWin32
126
+ : opts.platform === 'darwin'
127
+ ? path_scurry_1.PathScurryDarwin
128
+ : opts.platform
129
+ ? path_scurry_1.PathScurryPosix
130
+ : path_scurry_1.PathScurry;
131
+ this.scurry = new Scurry(this.cwd, {
132
+ nocase: opts.nocase,
133
+ fs: opts.fs,
134
+ });
135
+ }
136
+ this.nocase = this.scurry.nocase;
137
+ // If you do nocase:true on a case-sensitive file system, then
138
+ // we need to use regexps instead of strings for non-magic
139
+ // path portions, because statting `aBc` won't return results
140
+ // for the file `AbC` for example.
141
+ const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32';
142
+ const mmo = {
143
+ // default nocase based on platform
144
+ ...opts,
145
+ dot: this.dot,
146
+ matchBase: this.matchBase,
147
+ nobrace: this.nobrace,
148
+ nocase: this.nocase,
149
+ nocaseMagicOnly,
150
+ nocomment: true,
151
+ noext: this.noext,
152
+ nonegate: true,
153
+ optimizationLevel: 2,
154
+ platform: this.platform,
155
+ windowsPathsNoEscape: this.windowsPathsNoEscape,
156
+ debug: !!this.opts.debug,
157
+ };
158
+ const mms = this.pattern.map(p => new minimatch_1.Minimatch(p, mmo));
159
+ const [matchSet, globParts] = mms.reduce((set, m) => {
160
+ set[0].push(...m.set);
161
+ set[1].push(...m.globParts);
162
+ return set;
163
+ }, [[], []]);
164
+ this.patterns = matchSet.map((set, i) => {
165
+ return new pattern_js_1.Pattern(set, globParts[i], 0, this.platform);
166
+ });
167
+ }
168
+ async walk() {
169
+ // Walkers always return array of Path objects, so we just have to
170
+ // coerce them into the right shape. It will have already called
171
+ // realpath() if the option was set to do so, so we know that's cached.
172
+ // start out knowing the cwd, at least
173
+ return [
174
+ ...(await new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, {
175
+ ...this.opts,
176
+ maxDepth: this.maxDepth !== Infinity
177
+ ? this.maxDepth + this.scurry.cwd.depth()
178
+ : Infinity,
179
+ platform: this.platform,
180
+ nocase: this.nocase,
181
+ }).walk()),
182
+ ];
183
+ }
184
+ walkSync() {
185
+ return [
186
+ ...new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, {
187
+ ...this.opts,
188
+ maxDepth: this.maxDepth !== Infinity
189
+ ? this.maxDepth + this.scurry.cwd.depth()
190
+ : Infinity,
191
+ platform: this.platform,
192
+ nocase: this.nocase,
193
+ }).walkSync(),
194
+ ];
195
+ }
196
+ stream() {
197
+ return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, {
198
+ ...this.opts,
199
+ maxDepth: this.maxDepth !== Infinity
200
+ ? this.maxDepth + this.scurry.cwd.depth()
201
+ : Infinity,
202
+ platform: this.platform,
203
+ nocase: this.nocase,
204
+ }).stream();
205
+ }
206
+ streamSync() {
207
+ return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, {
208
+ ...this.opts,
209
+ maxDepth: this.maxDepth !== Infinity
210
+ ? this.maxDepth + this.scurry.cwd.depth()
211
+ : Infinity,
212
+ platform: this.platform,
213
+ nocase: this.nocase,
214
+ }).streamSync();
215
+ }
216
+ /**
217
+ * Default sync iteration function. Returns a Generator that
218
+ * iterates over the results.
219
+ */
220
+ iterateSync() {
221
+ return this.streamSync()[Symbol.iterator]();
222
+ }
223
+ [Symbol.iterator]() {
224
+ return this.iterateSync();
225
+ }
226
+ /**
227
+ * Default async iteration function. Returns an AsyncGenerator that
228
+ * iterates over the results.
229
+ */
230
+ iterate() {
231
+ return this.stream()[Symbol.asyncIterator]();
232
+ }
233
+ [Symbol.asyncIterator]() {
234
+ return this.iterate();
235
+ }
236
+ }
237
+ exports.Glob = Glob;
238
+ //# sourceMappingURL=glob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glob.js","sourceRoot":"","sources":["../../../src/glob.ts"],"names":[],"mappings":";;;AAAA,yCAAuD;AAEvD,6CAOoB;AACpB,6BAAmC;AAEnC,6CAAsC;AACtC,2CAAoD;AAKpD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,eAAe,GACnB,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ;IAClC,CAAC,CAAC,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAgTb;;GAEG;AACH,MAAa,IAAI;IACf,QAAQ,CAAU;IAClB,GAAG,CAAQ;IACX,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,WAAW,CAAS;IACpB,MAAM,CAAS;IACf,MAAM,CAAiC;IACvC,aAAa,CAAS;IACtB,IAAI,CAAU;IACd,SAAS,CAAS;IAClB,QAAQ,CAAQ;IAChB,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,KAAK,CAAS;IACd,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,OAAO,CAAU;IACjB,QAAQ,CAAiB;IACzB,QAAQ,CAAS;IACjB,MAAM,CAAY;IAClB,IAAI,CAAS;IACb,MAAM,CAAc;IACpB,oBAAoB,CAAS;IAC7B,aAAa,CAAiB;IAE9B;;OAEG;IACH,IAAI,CAAM;IAEV;;OAEG;IACH,QAAQ,CAAW;IAEnB;;;;;;;;;;;OAWG;IACH,YAAY,OAA0B,EAAE,IAAU;QAChD,qBAAqB;QACrB,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,SAAS,CAAC,uBAAuB,CAAC,CAAA;QACvD,oBAAoB;QACpB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,aAAgC,CAAA;QAC5D,IAAI,CAAC,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EAAE;YACpD,GAAG,IAAI,CAAC,IAAI;YACZ,QAAQ,EACN,IAAI,CAAC,QAAQ,KAAK,QAAQ;gBACxB,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE;gBACzC,CAAC,CAAC,QAAQ;YACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC,UAAU,EAAE,CAAA;IACjB,CAAC;IAED;;;OAGG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;IAC7C,CAAC;IACD,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAA;IAC9C,CAAC;IACD,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF;AArQD,oBAqQC","sourcesContent":["import { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport {\n FSOption,\n Path,\n PathScurry,\n PathScurryDarwin,\n PathScurryPosix,\n PathScurryWin32,\n} from 'path-scurry'\nimport { fileURLToPath } from 'url'\nimport { IgnoreLike } from './ignore.js'\nimport { Pattern } from './pattern.js'\nimport { GlobStream, GlobWalker } from './walker.js'\n\nexport type MatchSet = Minimatch['set']\nexport type GlobParts = Exclude<Minimatch['globParts'], undefined>\n\n// if no process global, just call it linux.\n// so we default to case-sensitive, / separators\nconst defaultPlatform: NodeJS.Platform =\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ? process.platform\n : 'linux'\n\n/**\n * A `GlobOptions` object may be provided to any of the exported methods, and\n * must be provided to the `Glob` constructor.\n *\n * All options are optional, boolean, and false by default, unless otherwise\n * noted.\n *\n * All resolved options are added to the Glob object as properties.\n *\n * If you are running many `glob` operations, you can pass a Glob object as the\n * `options` argument to a subsequent operation to share the previously loaded\n * cache.\n */\nexport interface GlobOptions {\n /**\n * Set to `true` to always receive absolute paths for\n * matched files. Set to `false` to always return relative paths.\n *\n * When this option is not set, absolute paths are returned for patterns\n * that are absolute, and otherwise paths are returned that are relative\n * to the `cwd` setting.\n *\n * This does _not_ make an extra system call to get\n * the realpath, it only does string path resolution.\n *\n * Conflicts with {@link withFileTypes}\n */\n absolute?: boolean\n\n /**\n * Set to false to enable {@link windowsPathsNoEscape}\n *\n * @deprecated\n */\n allowWindowsEscape?: boolean\n\n /**\n * The current working directory in which to search. Defaults to\n * `process.cwd()`.\n *\n * May be eiher a string path or a `file://` URL object or string.\n */\n cwd?: string | URL\n\n /**\n * Include `.dot` files in normal matches and `globstar`\n * matches. Note that an explicit dot in a portion of the pattern\n * will always match dot files.\n */\n dot?: boolean\n\n /**\n * Prepend all relative path strings with `./` (or `.\\` on Windows).\n *\n * Without this option, returned relative paths are \"bare\", so instead of\n * returning `'./foo/bar'`, they are returned as `'foo/bar'`.\n *\n * Relative patterns starting with `'../'` are not prepended with `./`, even\n * if this option is set.\n */\n dotRelative?: boolean\n\n /**\n * Follow symlinked directories when expanding `**`\n * patterns. This can result in a lot of duplicate references in\n * the presence of cyclic links, and make performance quite bad.\n *\n * By default, a `**` in a pattern will follow 1 symbolic link if\n * it is not the first item in the pattern, or none if it is the\n * first item in the pattern, following the same behavior as Bash.\n */\n follow?: boolean\n\n /**\n * string or string[], or an object with `ignore` and `ignoreChildren`\n * methods.\n *\n * If a string or string[] is provided, then this is treated as a glob\n * pattern or array of glob patterns to exclude from matches. To ignore all\n * children within a directory, as well as the entry itself, append `'/**'`\n * to the ignore pattern.\n *\n * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of\n * any other settings.\n *\n * If an object is provided that has `ignored(path)` and/or\n * `childrenIgnored(path)` methods, then these methods will be called to\n * determine whether any Path is a match or if its children should be\n * traversed, respectively.\n */\n ignore?: string | string[] | IgnoreLike\n\n /**\n * Treat brace expansion like `{a,b}` as a \"magic\" pattern. Has no\n * effect if {@link nobrace} is set.\n *\n * Only has effect on the {@link hasMagic} function.\n */\n magicalBraces?: boolean\n\n /**\n * Add a `/` character to directory matches. Note that this requires\n * additional stat calls in some cases.\n */\n mark?: boolean\n\n /**\n * Perform a basename-only match if the pattern does not contain any slash\n * characters. That is, `*.js` would be treated as equivalent to\n * `**\\/*.js`, matching all js files in all directories.\n */\n matchBase?: boolean\n\n /**\n * Limit the directory traversal to a given depth below the cwd.\n * Note that this does NOT prevent traversal to sibling folders,\n * root patterns, and so on. It only limits the maximum folder depth\n * that the walk will descend, relative to the cwd.\n */\n maxDepth?: number\n\n /**\n * Do not expand `{a,b}` and `{1..3}` brace sets.\n */\n nobrace?: boolean\n\n /**\n * Perform a case-insensitive match. This defaults to `true` on macOS and\n * Windows systems, and `false` on all others.\n *\n * **Note** `nocase` should only be explicitly set when it is\n * known that the filesystem's case sensitivity differs from the\n * platform default. If set `true` on case-sensitive file\n * systems, or `false` on case-insensitive file systems, then the\n * walk may return more or less results than expected.\n */\n nocase?: boolean\n\n /**\n * Do not match directories, only files. (Note: to match\n * _only_ directories, put a `/` at the end of the pattern.)\n */\n nodir?: boolean\n\n /**\n * Do not match \"extglob\" patterns such as `+(a|b)`.\n */\n noext?: boolean\n\n /**\n * Do not match `**` against multiple filenames. (Ie, treat it as a normal\n * `*` instead.)\n *\n * Conflicts with {@link matchBase}\n */\n noglobstar?: boolean\n\n /**\n * Defaults to value of `process.platform` if available, or `'linux'` if\n * not. Setting `platform:'win32'` on non-Windows systems may cause strange\n * behavior.\n */\n platform?: NodeJS.Platform\n\n /**\n * Set to true to call `fs.realpath` on all of the\n * results. In the case of an entry that cannot be resolved, the\n * entry is omitted. This incurs a slight performance penalty, of\n * course, because of the added system calls.\n */\n realpath?: boolean\n\n /**\n *\n * A string path resolved against the `cwd` option, which\n * is used as the starting point for absolute patterns that start\n * with `/`, (but not drive letters or UNC paths on Windows).\n *\n * Note that this _doesn't_ necessarily limit the walk to the\n * `root` directory, and doesn't affect the cwd starting point for\n * non-absolute patterns. A pattern containing `..` will still be\n * able to traverse out of the root directory, if it is not an\n * actual root directory on the filesystem, and any non-absolute\n * patterns will be matched in the `cwd`. For example, the\n * pattern `/../*` with `{root:'/some/path'}` will return all\n * files in `/some`, not all files in `/some/path`. The pattern\n * `*` with `{root:'/some/path'}` will return all the entries in\n * the cwd, not the entries in `/some/path`.\n *\n * To start absolute and non-absolute patterns in the same\n * path, you can use `{root:''}`. However, be aware that on\n * Windows systems, a pattern like `x:/*` or `//host/share/*` will\n * _always_ start in the `x:/` or `//host/share` directory,\n * regardless of the `root` setting.\n */\n root?: string\n\n /**\n * A [PathScurry](http://npm.im/path-scurry) object used\n * to traverse the file system. If the `nocase` option is set\n * explicitly, then any provided `scurry` object must match this\n * setting.\n */\n scurry?: PathScurry\n\n /**\n * Call `lstat()` on all entries, whether required or not to determine\n * if it's a valid match. When used with {@link withFileTypes}, this means\n * that matches will include data such as modified time, permissions, and\n * so on. Note that this will incur a performance cost due to the added\n * system calls.\n */\n stat?: boolean\n\n /**\n * An AbortSignal which will cancel the Glob walk when\n * triggered.\n */\n signal?: AbortSignal\n\n /**\n * Use `\\\\` as a path separator _only_, and\n * _never_ as an escape character. If set, all `\\\\` characters are\n * replaced with `/` in the pattern.\n *\n * Note that this makes it **impossible** to match against paths\n * containing literal glob pattern characters, but allows matching\n * with patterns constructed using `path.join()` and\n * `path.resolve()` on Windows platforms, mimicking the (buggy!)\n * behavior of Glob v7 and before on Windows. Please use with\n * caution, and be mindful of [the caveat below about Windows\n * paths](#windows). (For legacy reasons, this is also set if\n * `allowWindowsEscape` is set to the exact value `false`.)\n */\n windowsPathsNoEscape?: boolean\n\n /**\n * Return [PathScurry](http://npm.im/path-scurry)\n * `Path` objects instead of strings. These are similar to a\n * NodeJS `Dirent` object, but with additional methods and\n * properties.\n *\n * Conflicts with {@link absolute}\n */\n withFileTypes?: boolean\n\n /**\n * An fs implementation to override some or all of the defaults. See\n * http://npm.im/path-scurry for details about what can be overridden.\n */\n fs?: FSOption\n\n /**\n * Just passed along to Minimatch. Note that this makes all pattern\n * matching operations slower and *extremely* noisy.\n */\n debug?: boolean\n\n /**\n * Return `/` delimited paths, even on Windows.\n *\n * On posix systems, this has no effect. But, on Windows, it means that\n * paths will be `/` delimited, and absolute paths will be their full\n * resolved UNC forms, eg instead of `'C:\\\\foo\\\\bar'`, it would return\n * `'//?/C:/foo/bar'`\n */\n posix?: boolean\n}\n\nexport type GlobOptionsWithFileTypesTrue = GlobOptions & {\n withFileTypes: true\n // string options not relevant if returning Path objects.\n absolute?: undefined\n mark?: undefined\n posix?: undefined\n}\n\nexport type GlobOptionsWithFileTypesFalse = GlobOptions & {\n withFileTypes?: false\n}\n\nexport type GlobOptionsWithFileTypesUnset = GlobOptions & {\n withFileTypes?: undefined\n}\n\nexport type Result<Opts> = Opts extends GlobOptionsWithFileTypesTrue\n ? Path\n : Opts extends GlobOptionsWithFileTypesFalse\n ? string\n : Opts extends GlobOptionsWithFileTypesUnset\n ? string\n : string | Path\nexport type Results<Opts> = Result<Opts>[]\n\nexport type FileTypes<Opts> = Opts extends GlobOptionsWithFileTypesTrue\n ? true\n : Opts extends GlobOptionsWithFileTypesFalse\n ? false\n : Opts extends GlobOptionsWithFileTypesUnset\n ? false\n : boolean\n\n/**\n * An object that can perform glob pattern traversals.\n */\nexport class Glob<Opts extends GlobOptions> implements GlobOptions {\n absolute?: boolean\n cwd: string\n root?: string\n dot: boolean\n dotRelative: boolean\n follow: boolean\n ignore?: string | string[] | IgnoreLike\n magicalBraces: boolean\n mark?: boolean\n matchBase: boolean\n maxDepth: number\n nobrace: boolean\n nocase: boolean\n nodir: boolean\n noext: boolean\n noglobstar: boolean\n pattern: string[]\n platform: NodeJS.Platform\n realpath: boolean\n scurry: PathScurry\n stat: boolean\n signal?: AbortSignal\n windowsPathsNoEscape: boolean\n withFileTypes: FileTypes<Opts>\n\n /**\n * The options provided to the constructor.\n */\n opts: Opts\n\n /**\n * An array of parsed immutable {@link Pattern} objects.\n */\n patterns: Pattern[]\n\n /**\n * All options are stored as properties on the `Glob` object.\n *\n * See {@link GlobOptions} for full options descriptions.\n *\n * Note that a previous `Glob` object can be passed as the\n * `GlobOptions` to another `Glob` instantiation to re-use settings\n * and caches with a new pattern.\n *\n * Traversal functions can be called multiple times to run the walk\n * again.\n */\n constructor(pattern: string | string[], opts: Opts) {\n /* c8 ignore start */\n if (!opts) throw new TypeError('glob options required')\n /* c8 ignore stop */\n this.withFileTypes = !!opts.withFileTypes as FileTypes<Opts>\n this.signal = opts.signal\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.dotRelative = !!opts.dotRelative\n this.nodir = !!opts.nodir\n this.mark = !!opts.mark\n if (!opts.cwd) {\n this.cwd = ''\n } else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {\n opts.cwd = fileURLToPath(opts.cwd)\n }\n this.cwd = opts.cwd || ''\n this.root = opts.root\n this.magicalBraces = !!opts.magicalBraces\n this.nobrace = !!opts.nobrace\n this.noext = !!opts.noext\n this.realpath = !!opts.realpath\n this.absolute = opts.absolute\n\n this.noglobstar = !!opts.noglobstar\n this.matchBase = !!opts.matchBase\n this.maxDepth =\n typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity\n this.stat = !!opts.stat\n this.ignore = opts.ignore\n\n if (this.withFileTypes && this.absolute !== undefined) {\n throw new Error('cannot set absolute and withFileTypes:true')\n }\n\n if (typeof pattern === 'string') {\n pattern = [pattern]\n }\n\n this.windowsPathsNoEscape =\n !!opts.windowsPathsNoEscape ||\n (opts as GlobOptions).allowWindowsEscape === false\n\n if (this.windowsPathsNoEscape) {\n pattern = pattern.map(p => p.replace(/\\\\/g, '/'))\n }\n\n if (this.matchBase) {\n if (opts.noglobstar) {\n throw new TypeError('base matching requires globstar')\n }\n pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`))\n }\n\n this.pattern = pattern\n\n this.platform = opts.platform || defaultPlatform\n this.opts = { ...opts, platform: this.platform }\n if (opts.scurry) {\n this.scurry = opts.scurry\n if (\n opts.nocase !== undefined &&\n opts.nocase !== opts.scurry.nocase\n ) {\n throw new Error('nocase option contradicts provided scurry option')\n }\n } else {\n const Scurry =\n opts.platform === 'win32'\n ? PathScurryWin32\n : opts.platform === 'darwin'\n ? PathScurryDarwin\n : opts.platform\n ? PathScurryPosix\n : PathScurry\n this.scurry = new Scurry(this.cwd, {\n nocase: opts.nocase,\n fs: opts.fs,\n })\n }\n this.nocase = this.scurry.nocase\n\n // If you do nocase:true on a case-sensitive file system, then\n // we need to use regexps instead of strings for non-magic\n // path portions, because statting `aBc` won't return results\n // for the file `AbC` for example.\n const nocaseMagicOnly =\n this.platform === 'darwin' || this.platform === 'win32'\n\n const mmo: MinimatchOptions = {\n // default nocase based on platform\n ...opts,\n dot: this.dot,\n matchBase: this.matchBase,\n nobrace: this.nobrace,\n nocase: this.nocase,\n nocaseMagicOnly,\n nocomment: true,\n noext: this.noext,\n nonegate: true,\n optimizationLevel: 2,\n platform: this.platform,\n windowsPathsNoEscape: this.windowsPathsNoEscape,\n debug: !!this.opts.debug,\n }\n\n const mms = this.pattern.map(p => new Minimatch(p, mmo))\n const [matchSet, globParts] = mms.reduce(\n (set: [MatchSet, GlobParts], m) => {\n set[0].push(...m.set)\n set[1].push(...m.globParts)\n return set\n },\n [[], []]\n )\n this.patterns = matchSet.map((set, i) => {\n return new Pattern(set, globParts[i], 0, this.platform)\n })\n }\n\n /**\n * Returns a Promise that resolves to the results array.\n */\n async walk(): Promise<Results<Opts>>\n async walk(): Promise<(string | Path)[]> {\n // Walkers always return array of Path objects, so we just have to\n // coerce them into the right shape. It will have already called\n // realpath() if the option was set to do so, so we know that's cached.\n // start out knowing the cwd, at least\n return [\n ...(await new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).walk()),\n ]\n }\n\n /**\n * synchronous {@link Glob.walk}\n */\n walkSync(): Results<Opts>\n walkSync(): (string | Path)[] {\n return [\n ...new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).walkSync(),\n ]\n }\n\n /**\n * Stream results asynchronously.\n */\n stream(): Minipass<Result<Opts>, Result<Opts>>\n stream(): Minipass<string | Path, string | Path> {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).stream()\n }\n\n /**\n * Stream results synchronously.\n */\n streamSync(): Minipass<Result<Opts>, Result<Opts>>\n streamSync(): Minipass<string | Path, string | Path> {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).streamSync()\n }\n\n /**\n * Default sync iteration function. Returns a Generator that\n * iterates over the results.\n */\n iterateSync(): Generator<Result<Opts>, void, void> {\n return this.streamSync()[Symbol.iterator]()\n }\n [Symbol.iterator]() {\n return this.iterateSync()\n }\n\n /**\n * Default async iteration function. Returns an AsyncGenerator that\n * iterates over the results.\n */\n iterate(): AsyncGenerator<Result<Opts>, void, void> {\n return this.stream()[Symbol.asyncIterator]()\n }\n [Symbol.asyncIterator]() {\n return this.iterate()\n }\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { GlobOptions } from './glob.js';
2
+ /**
3
+ * Return true if the patterns provided contain any magic glob characters,
4
+ * given the options provided.
5
+ *
6
+ * Brace expansion is not considered "magic" unless the `magicalBraces` option
7
+ * is set, as brace expansion just turns one string into an array of strings.
8
+ * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and
9
+ * `'xby'` both do not contain any magic glob characters, and it's treated the
10
+ * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`
11
+ * is in the options, brace expansion _is_ treated as a pattern having magic.
12
+ */
13
+ export declare const hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean;
14
+ //# sourceMappingURL=has-magic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hasMagic = void 0;
4
+ const minimatch_1 = require("minimatch");
5
+ /**
6
+ * Return true if the patterns provided contain any magic glob characters,
7
+ * given the options provided.
8
+ *
9
+ * Brace expansion is not considered "magic" unless the `magicalBraces` option
10
+ * is set, as brace expansion just turns one string into an array of strings.
11
+ * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and
12
+ * `'xby'` both do not contain any magic glob characters, and it's treated the
13
+ * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`
14
+ * is in the options, brace expansion _is_ treated as a pattern having magic.
15
+ */
16
+ const hasMagic = (pattern, options = {}) => {
17
+ if (!Array.isArray(pattern)) {
18
+ pattern = [pattern];
19
+ }
20
+ for (const p of pattern) {
21
+ if (new minimatch_1.Minimatch(p, options).hasMagic())
22
+ return true;
23
+ }
24
+ return false;
25
+ };
26
+ exports.hasMagic = hasMagic;
27
+ //# sourceMappingURL=has-magic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../../src/has-magic.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AAGrC;;;;;;;;;;GAUG;AACI,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;KACpB;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE;QACvB,IAAI,IAAI,qBAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;KACtD;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAXY,QAAA,QAAQ,YAWpB","sourcesContent":["import { Minimatch } from 'minimatch'\nimport { GlobOptions } from './glob.js'\n\n/**\n * Return true if the patterns provided contain any magic glob characters,\n * given the options provided.\n *\n * Brace expansion is not considered \"magic\" unless the `magicalBraces` option\n * is set, as brace expansion just turns one string into an array of strings.\n * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and\n * `'xby'` both do not contain any magic glob characters, and it's treated the\n * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`\n * is in the options, brace expansion _is_ treated as a pattern having magic.\n */\nexport const hasMagic = (\n pattern: string | string[],\n options: GlobOptions = {}\n): boolean => {\n if (!Array.isArray(pattern)) {\n pattern = [pattern]\n }\n for (const p of pattern) {\n if (new Minimatch(p, options).hasMagic()) return true\n }\n return false\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import { Minimatch } from 'minimatch';
2
+ import { Path } from 'path-scurry';
3
+ import { GlobWalkerOpts } from './walker.js';
4
+ export interface IgnoreLike {
5
+ ignored?: (p: Path) => boolean;
6
+ childrenIgnored?: (p: Path) => boolean;
7
+ }
8
+ /**
9
+ * Class used to process ignored patterns
10
+ */
11
+ export declare class Ignore implements IgnoreLike {
12
+ relative: Minimatch[];
13
+ relativeChildren: Minimatch[];
14
+ absolute: Minimatch[];
15
+ absoluteChildren: Minimatch[];
16
+ constructor(ignored: string[], { nobrace, nocase, noext, noglobstar, platform, }: GlobWalkerOpts);
17
+ ignored(p: Path): boolean;
18
+ childrenIgnored(p: Path): boolean;
19
+ }
20
+ //# sourceMappingURL=ignore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../../src/ignore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;CACvC;AASD;;GAEG;AACH,qBAAa,MAAO,YAAW,UAAU;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;gBAG3B,OAAO,EAAE,MAAM,EAAE,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAA0B,GAC3B,EAAE,cAAc;IAiDnB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;IAczB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;CAWlC"}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ // give it a pattern, and it'll be able to tell you if
3
+ // a given path should be ignored.
4
+ // Ignoring a path ignores its children if the pattern ends in /**
5
+ // Ignores are always parsed in dot:true mode
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Ignore = void 0;
8
+ const minimatch_1 = require("minimatch");
9
+ const pattern_js_1 = require("./pattern.js");
10
+ const defaultPlatform = typeof process === 'object' &&
11
+ process &&
12
+ typeof process.platform === 'string'
13
+ ? process.platform
14
+ : 'linux';
15
+ /**
16
+ * Class used to process ignored patterns
17
+ */
18
+ class Ignore {
19
+ relative;
20
+ relativeChildren;
21
+ absolute;
22
+ absoluteChildren;
23
+ constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) {
24
+ this.relative = [];
25
+ this.absolute = [];
26
+ this.relativeChildren = [];
27
+ this.absoluteChildren = [];
28
+ const mmopts = {
29
+ dot: true,
30
+ nobrace,
31
+ nocase,
32
+ noext,
33
+ noglobstar,
34
+ optimizationLevel: 2,
35
+ platform,
36
+ nocomment: true,
37
+ nonegate: true,
38
+ };
39
+ // this is a little weird, but it gives us a clean set of optimized
40
+ // minimatch matchers, without getting tripped up if one of them
41
+ // ends in /** inside a brace section, and it's only inefficient at
42
+ // the start of the walk, not along it.
43
+ // It'd be nice if the Pattern class just had a .test() method, but
44
+ // handling globstars is a bit of a pita, and that code already lives
45
+ // in minimatch anyway.
46
+ // Another way would be if maybe Minimatch could take its set/globParts
47
+ // as an option, and then we could at least just use Pattern to test
48
+ // for absolute-ness.
49
+ // Yet another way, Minimatch could take an array of glob strings, and
50
+ // a cwd option, and do the right thing.
51
+ for (const ign of ignored) {
52
+ const mm = new minimatch_1.Minimatch(ign, mmopts);
53
+ for (let i = 0; i < mm.set.length; i++) {
54
+ const parsed = mm.set[i];
55
+ const globParts = mm.globParts[i];
56
+ const p = new pattern_js_1.Pattern(parsed, globParts, 0, platform);
57
+ const m = new minimatch_1.Minimatch(p.globString(), mmopts);
58
+ const children = globParts[globParts.length - 1] === '**';
59
+ const absolute = p.isAbsolute();
60
+ if (absolute)
61
+ this.absolute.push(m);
62
+ else
63
+ this.relative.push(m);
64
+ if (children) {
65
+ if (absolute)
66
+ this.absoluteChildren.push(m);
67
+ else
68
+ this.relativeChildren.push(m);
69
+ }
70
+ }
71
+ }
72
+ }
73
+ ignored(p) {
74
+ const fullpath = p.fullpath();
75
+ const fullpaths = `${fullpath}/`;
76
+ const relative = p.relative() || '.';
77
+ const relatives = `${relative}/`;
78
+ for (const m of this.relative) {
79
+ if (m.match(relative) || m.match(relatives))
80
+ return true;
81
+ }
82
+ for (const m of this.absolute) {
83
+ if (m.match(fullpath) || m.match(fullpaths))
84
+ return true;
85
+ }
86
+ return false;
87
+ }
88
+ childrenIgnored(p) {
89
+ const fullpath = p.fullpath() + '/';
90
+ const relative = (p.relative() || '.') + '/';
91
+ for (const m of this.relativeChildren) {
92
+ if (m.match(relative))
93
+ return true;
94
+ }
95
+ for (const m of this.absoluteChildren) {
96
+ if (m.match(fullpath))
97
+ true;
98
+ }
99
+ return false;
100
+ }
101
+ }
102
+ exports.Ignore = Ignore;
103
+ //# sourceMappingURL=ignore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../../src/ignore.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,kEAAkE;AAClE,6CAA6C;;;AAE7C,yCAAqC;AAErC,6CAAsC;AAQtC,MAAM,eAAe,GACnB,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ;IAClC,CAAC,CAAC,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAEb;;GAEG;AACH,MAAa,MAAM;IACjB,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAE7B,YACE,OAAiB,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GAAG,eAAe,GACX;QAEjB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,IAAI,CAAC,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CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACrC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,IAAI,CAAA;SAC5B;QACD,OAAO,KAAK,CAAA;IACd,CAAC;CACF;AAxFD,wBAwFC","sourcesContent":["// give it a pattern, and it'll be able to tell you if\n// a given path should be ignored.\n// Ignoring a path ignores its children if the pattern ends in /**\n// Ignores are always parsed in dot:true mode\n\nimport { Minimatch } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\nexport interface IgnoreLike {\n ignored?: (p: Path) => boolean\n childrenIgnored?: (p: Path) => boolean\n}\n\nconst defaultPlatform: NodeJS.Platform =\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ? process.platform\n : 'linux'\n\n/**\n * Class used to process ignored patterns\n */\nexport class Ignore implements IgnoreLike {\n relative: Minimatch[]\n relativeChildren: Minimatch[]\n absolute: Minimatch[]\n absoluteChildren: Minimatch[]\n\n constructor(\n ignored: string[],\n {\n nobrace,\n nocase,\n noext,\n noglobstar,\n platform = defaultPlatform,\n }: GlobWalkerOpts\n ) {\n this.relative = []\n this.absolute = []\n this.relativeChildren = []\n this.absoluteChildren = []\n const mmopts = {\n dot: true,\n nobrace,\n nocase,\n noext,\n noglobstar,\n optimizationLevel: 2,\n platform,\n nocomment: true,\n nonegate: true,\n }\n\n // this is a little weird, but it gives us a clean set of optimized\n // minimatch matchers, without getting tripped up if one of them\n // ends in /** inside a brace section, and it's only inefficient at\n // the start of the walk, not along it.\n // It'd be nice if the Pattern class just had a .test() method, but\n // handling globstars is a bit of a pita, and that code already lives\n // in minimatch anyway.\n // Another way would be if maybe Minimatch could take its set/globParts\n // as an option, and then we could at least just use Pattern to test\n // for absolute-ness.\n // Yet another way, Minimatch could take an array of glob strings, and\n // a cwd option, and do the right thing.\n for (const ign of ignored) {\n const mm = new Minimatch(ign, mmopts)\n for (let i = 0; i < mm.set.length; i++) {\n const parsed = mm.set[i]\n const globParts = mm.globParts[i]\n const p = new Pattern(parsed, globParts, 0, platform)\n const m = new Minimatch(p.globString(), mmopts)\n const children = globParts[globParts.length - 1] === '**'\n const absolute = p.isAbsolute()\n if (absolute) this.absolute.push(m)\n else this.relative.push(m)\n if (children) {\n if (absolute) this.absoluteChildren.push(m)\n else this.relativeChildren.push(m)\n }\n }\n }\n }\n\n ignored(p: Path): boolean {\n const fullpath = p.fullpath()\n const fullpaths = `${fullpath}/`\n const relative = p.relative() || '.'\n const relatives = `${relative}/`\n for (const m of this.relative) {\n if (m.match(relative) || m.match(relatives)) return true\n }\n for (const m of this.absolute) {\n if (m.match(fullpath) || m.match(fullpaths)) return true\n }\n return false\n }\n\n childrenIgnored(p: Path): boolean {\n const fullpath = p.fullpath() + '/'\n const relative = (p.relative() || '.') + '/'\n for (const m of this.relativeChildren) {\n if (m.match(relative)) return true\n }\n for (const m of this.absoluteChildren) {\n if (m.match(fullpath)) true\n }\n return false\n }\n}\n"]}
@@ -0,0 +1,95 @@
1
+ import { Minipass } from 'minipass';
2
+ import { Path } from 'path-scurry';
3
+ import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js';
4
+ import { Glob } from './glob.js';
5
+ /**
6
+ * Syncronous form of {@link globStream}. Will read all the matches as fast as
7
+ * you consume them, even all in a single tick if you consume them immediately,
8
+ * but will still respond to backpressure if they're not consumed immediately.
9
+ */
10
+ export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass<Path, Path>;
11
+ export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass<string, string>;
12
+ export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass<string, string>;
13
+ export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass<Path, Path> | Minipass<string, string>;
14
+ /**
15
+ * Return a stream that emits all the strings or `Path` objects and
16
+ * then emits `end` when completed.
17
+ */
18
+ export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass<string, string>;
19
+ export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass<Path, Path>;
20
+ export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass<string, string>;
21
+ export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass<Path, Path> | Minipass<string, string>;
22
+ /**
23
+ * Synchronous form of {@link glob}
24
+ */
25
+ export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[];
26
+ export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[];
27
+ export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[];
28
+ export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[];
29
+ /**
30
+ * Perform an asynchronous glob search for the pattern(s) specified. Returns
31
+ * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the
32
+ * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for
33
+ * full option descriptions.
34
+ */
35
+ declare function glob_(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise<string[]>;
36
+ declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise<Path[]>;
37
+ declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise<string[]>;
38
+ declare function glob_(pattern: string | string[], options: GlobOptions): Promise<Path[] | string[]>;
39
+ /**
40
+ * Return a sync iterator for walking glob pattern matches.
41
+ */
42
+ export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator<string, void, void>;
43
+ export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator<Path, void, void>;
44
+ export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator<string, void, void>;
45
+ export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator<Path, void, void> | Generator<string, void, void>;
46
+ /**
47
+ * Return an async iterator for walking glob pattern matches.
48
+ */
49
+ export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator<string, void, void>;
50
+ export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator<Path, void, void>;
51
+ export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator<string, void, void>;
52
+ export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator<Path, void, void> | AsyncGenerator<string, void, void>;
53
+ export declare const streamSync: typeof globStreamSync;
54
+ export declare const stream: typeof globStream & {
55
+ sync: typeof globStreamSync;
56
+ };
57
+ export declare const iterateSync: typeof globIterateSync;
58
+ export declare const iterate: typeof globIterate & {
59
+ sync: typeof globIterateSync;
60
+ };
61
+ export declare const sync: typeof globSync & {
62
+ stream: typeof globStreamSync;
63
+ iterate: typeof globIterateSync;
64
+ };
65
+ export { escape, unescape } from 'minimatch';
66
+ export { Glob } from './glob.js';
67
+ export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js';
68
+ export { hasMagic } from './has-magic.js';
69
+ export type { IgnoreLike } from './ignore.js';
70
+ export type { MatchStream } from './walker.js';
71
+ export declare const glob: typeof glob_ & {
72
+ glob: typeof glob_;
73
+ globSync: typeof globSync;
74
+ sync: typeof globSync & {
75
+ stream: typeof globStreamSync;
76
+ iterate: typeof globIterateSync;
77
+ };
78
+ globStream: typeof globStream;
79
+ stream: typeof globStream & {
80
+ sync: typeof globStreamSync;
81
+ };
82
+ globStreamSync: typeof globStreamSync;
83
+ streamSync: typeof globStreamSync;
84
+ globIterate: typeof globIterate;
85
+ iterate: typeof globIterate & {
86
+ sync: typeof globIterateSync;
87
+ };
88
+ globIterateSync: typeof globIterateSync;
89
+ iterateSync: typeof globIterateSync;
90
+ Glob: typeof Glob;
91
+ hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean;
92
+ escape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string;
93
+ unescape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape"> | undefined) => string;
94
+ };
95
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,KAAK,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACvB,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3B,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3B,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAQlD;;;GAGG;AACH,w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