@quilted/create 0.2.42 → 0.2.44

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 (285) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/build/esm/_virtual/index.mjs +6 -2
  3. package/build/esm/_virtual/index10.mjs +3 -0
  4. package/build/esm/_virtual/index11.mjs +3 -0
  5. package/build/esm/_virtual/index12.mjs +3 -0
  6. package/build/esm/_virtual/index13.mjs +3 -0
  7. package/build/esm/_virtual/index2.mjs +2 -2
  8. package/build/esm/_virtual/index3.mjs +6 -2
  9. package/build/esm/_virtual/index4.mjs +6 -2
  10. package/build/esm/_virtual/index5.mjs +6 -2
  11. package/build/esm/_virtual/index6.mjs +6 -2
  12. package/build/esm/_virtual/index8.mjs +3 -0
  13. package/build/esm/_virtual/index9.mjs +3 -0
  14. package/build/esm/_virtual/minimatch.mjs +12 -0
  15. package/build/esm/app.mjs +2 -2
  16. package/build/esm/cli.mjs +1 -1
  17. package/build/esm/module.mjs +2 -2
  18. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.mjs +29 -21
  19. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.mjs +24 -18
  20. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.mjs +35 -32
  21. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.mjs +103 -101
  22. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.mjs +19 -13
  23. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.mjs +63 -61
  24. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.mjs +33 -27
  25. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.mjs +25 -19
  26. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.mjs +15 -10
  27. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.mjs +27 -19
  28. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.mjs +35 -32
  29. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.mjs +39 -33
  30. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.mjs +26 -20
  31. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.mjs +24 -17
  32. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.mjs +44 -42
  33. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.mjs +37 -30
  34. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.mjs +41 -34
  35. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.mjs +22 -15
  36. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.mjs +103 -98
  37. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.mjs +35 -29
  38. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.mjs +19 -12
  39. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.mjs +64 -59
  40. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.mjs +34 -27
  41. package/build/esm/node_modules/.pnpm/arg@5.0.2/node_modules/arg/index.mjs +116 -112
  42. package/build/esm/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.mjs +54 -47
  43. package/build/esm/node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.mjs +144 -137
  44. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.mjs +173 -166
  45. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.mjs +57 -51
  46. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.mjs +102 -94
  47. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.mjs +89 -83
  48. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.mjs +312 -305
  49. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.mjs +30 -24
  50. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.mjs +116 -108
  51. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.mjs +1 -3
  52. package/build/esm/node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.mjs +63 -61
  53. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/index.mjs +75 -77
  54. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/patterns.mjs +28 -22
  55. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/tasks.mjs +83 -78
  56. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/async.mjs +31 -25
  57. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/deep.mjs +66 -60
  58. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/entry.mjs +66 -59
  59. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/error.mjs +23 -16
  60. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/matcher.mjs +55 -48
  61. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/partial.mjs +40 -33
  62. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/provider.mjs +59 -55
  63. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/stream.mjs +38 -32
  64. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/sync.mjs +31 -25
  65. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/transformers/entry.mjs +33 -26
  66. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/async.mjs +43 -38
  67. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/reader.mjs +41 -35
  68. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/stream.mjs +60 -55
  69. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/sync.mjs +48 -43
  70. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/settings.mjs +65 -57
  71. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/array.mjs +26 -20
  72. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/errno.mjs +14 -8
  73. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/fs.mjs +25 -19
  74. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/index.mjs +33 -34
  75. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/path.mjs +39 -33
  76. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/pattern.mjs +170 -164
  77. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/stream.mjs +24 -18
  78. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/string.mjs +18 -12
  79. package/build/esm/node_modules/.pnpm/fastq@1.13.0/node_modules/fastq/queue.mjs +227 -221
  80. package/build/esm/node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.mjs +207 -200
  81. package/build/esm/node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.mjs +1 -6
  82. package/build/esm/node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.mjs +51 -44
  83. package/build/esm/node_modules/.pnpm/globby@13.1.1/node_modules/globby/ignore.mjs +2 -2
  84. package/build/esm/node_modules/.pnpm/globby@13.1.1/node_modules/globby/index.mjs +3 -3
  85. package/build/esm/node_modules/.pnpm/ignore@5.2.4/node_modules/ignore/index.mjs +443 -439
  86. package/build/esm/node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.mjs +18 -11
  87. package/build/esm/node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.mjs +116 -109
  88. package/build/esm/node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.mjs +17 -10
  89. package/build/esm/node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.mjs +117 -110
  90. package/build/esm/node_modules/.pnpm/micromatch@4.0.5/node_modules/micromatch/index.mjs +457 -451
  91. package/build/esm/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/lib/path.mjs +14 -7
  92. package/build/esm/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/minimatch.mjs +770 -770
  93. package/build/esm/node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.mjs +40 -34
  94. package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.mjs +10 -3
  95. package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.mjs +227 -220
  96. package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.mjs +941 -935
  97. package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.mjs +331 -325
  98. package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.mjs +303 -297
  99. package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.mjs +65 -57
  100. package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/babel.mjs +605 -605
  101. package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/estree.mjs +378 -394
  102. package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/typescript.mjs +15 -15
  103. package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/yaml.mjs +281 -294
  104. package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/standalone.mjs +155 -155
  105. package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.mjs +1 -1
  106. package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/prompts.mjs +1 -1
  107. package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/clear.mjs +1 -1
  108. package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/index.mjs +17 -12
  109. package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/prompts.mjs +1 -1
  110. package/build/esm/node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.mjs +14 -7
  111. package/build/esm/node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.mjs +29 -22
  112. package/build/esm/node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.mjs +49 -42
  113. package/build/esm/node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.mjs +231 -224
  114. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/YAMLMap.mjs +1 -1
  115. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/addPairToJSMap.mjs +1 -1
  116. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/tags.mjs +3 -3
  117. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.mjs +2 -2
  118. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.mjs +1 -1
  119. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/set.mjs +2 -2
  120. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/stringify/stringifyString.mjs +1 -1
  121. package/build/esm/package.mjs +2 -2
  122. package/build/esm/packages/cli-kit/build/esnext/prompt.esnext.mjs +1 -1
  123. package/build/esm/server.mjs +5 -9
  124. package/build/esm/shared/package-manager.mjs +1 -1
  125. package/build/esm/shared/prompts.mjs +1 -1
  126. package/build/esnext/_virtual/index.esnext +6 -2
  127. package/build/esnext/_virtual/index10.esnext +3 -0
  128. package/build/esnext/_virtual/index11.esnext +3 -0
  129. package/build/esnext/_virtual/index12.esnext +3 -0
  130. package/build/esnext/_virtual/index13.esnext +3 -0
  131. package/build/esnext/_virtual/index2.esnext +2 -2
  132. package/build/esnext/_virtual/index3.esnext +6 -2
  133. package/build/esnext/_virtual/index4.esnext +6 -2
  134. package/build/esnext/_virtual/index5.esnext +6 -2
  135. package/build/esnext/_virtual/index6.esnext +6 -2
  136. package/build/esnext/_virtual/index8.esnext +3 -0
  137. package/build/esnext/_virtual/index9.esnext +3 -0
  138. package/build/esnext/_virtual/minimatch.esnext +12 -0
  139. package/build/esnext/app.esnext +2 -2
  140. package/build/esnext/module.esnext +2 -2
  141. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.esnext +27 -19
  142. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.esnext +19 -13
  143. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.esnext +33 -30
  144. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.esnext +99 -97
  145. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.esnext +14 -8
  146. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.esnext +59 -57
  147. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.esnext +31 -25
  148. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.esnext +23 -17
  149. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.esnext +13 -8
  150. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.esnext +25 -17
  151. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.esnext +33 -30
  152. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.esnext +38 -32
  153. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.esnext +25 -19
  154. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.esnext +23 -16
  155. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.esnext +42 -40
  156. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.esnext +36 -29
  157. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.esnext +40 -33
  158. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.esnext +21 -14
  159. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.esnext +98 -93
  160. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.esnext +30 -24
  161. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.esnext +17 -10
  162. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.esnext +59 -54
  163. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.esnext +33 -26
  164. package/build/esnext/node_modules/.pnpm/arg@5.0.2/node_modules/arg/index.esnext +132 -128
  165. package/build/esnext/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.esnext +54 -47
  166. package/build/esnext/node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.esnext +137 -130
  167. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.esnext +66 -59
  168. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.esnext +53 -47
  169. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.esnext +102 -95
  170. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.esnext +89 -83
  171. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.esnext +217 -210
  172. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.esnext +30 -24
  173. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.esnext +75 -67
  174. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.esnext +1 -3
  175. package/build/esnext/node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.esnext +63 -61
  176. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/index.esnext +68 -70
  177. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/patterns.esnext +17 -11
  178. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/tasks.esnext +81 -76
  179. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/async.esnext +29 -23
  180. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/deep.esnext +61 -55
  181. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/entry.esnext +61 -54
  182. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/error.esnext +21 -14
  183. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/matcher.esnext +49 -42
  184. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/partial.esnext +31 -24
  185. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/provider.esnext +57 -53
  186. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/stream.esnext +34 -28
  187. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/sync.esnext +29 -23
  188. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/transformers/entry.esnext +29 -22
  189. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/async.esnext +40 -35
  190. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/reader.esnext +39 -33
  191. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/stream.esnext +56 -51
  192. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/sync.esnext +46 -41
  193. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/settings.esnext +59 -51
  194. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/array.esnext +24 -18
  195. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/errno.esnext +12 -6
  196. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/fs.esnext +23 -17
  197. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/index.esnext +31 -32
  198. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/path.esnext +32 -26
  199. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/pattern.esnext +135 -129
  200. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/stream.esnext +23 -17
  201. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/string.esnext +16 -10
  202. package/build/esnext/node_modules/.pnpm/fastq@1.13.0/node_modules/fastq/queue.esnext +220 -215
  203. package/build/esnext/node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.esnext +193 -186
  204. package/build/esnext/node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.esnext +1 -6
  205. package/build/esnext/node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.esnext +31 -24
  206. package/build/esnext/node_modules/.pnpm/globby@13.1.1/node_modules/globby/ignore.esnext +2 -2
  207. package/build/esnext/node_modules/.pnpm/globby@13.1.1/node_modules/globby/index.esnext +3 -3
  208. package/build/esnext/node_modules/.pnpm/ignore@5.2.4/node_modules/ignore/index.esnext +357 -353
  209. package/build/esnext/node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.esnext +18 -11
  210. package/build/esnext/node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.esnext +111 -104
  211. package/build/esnext/node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.esnext +17 -10
  212. package/build/esnext/node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.esnext +103 -96
  213. package/build/esnext/node_modules/.pnpm/micromatch@4.0.5/node_modules/micromatch/index.esnext +147 -141
  214. package/build/esnext/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/lib/path.esnext +10 -3
  215. package/build/esnext/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/minimatch.esnext +495 -491
  216. package/build/esnext/node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.esnext +38 -32
  217. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.esnext +10 -3
  218. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.esnext +198 -191
  219. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.esnext +683 -677
  220. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.esnext +137 -131
  221. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.esnext +279 -273
  222. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.esnext +65 -57
  223. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/babel.esnext +9 -9
  224. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/estree.esnext +20 -20
  225. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/typescript.esnext +15 -15
  226. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/yaml.esnext +64 -64
  227. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/standalone.esnext +19 -19
  228. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.esnext +1 -1
  229. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/clear.esnext +1 -1
  230. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/index.esnext +16 -11
  231. package/build/esnext/node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.esnext +12 -5
  232. package/build/esnext/node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.esnext +29 -22
  233. package/build/esnext/node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.esnext +47 -40
  234. package/build/esnext/node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.esnext +196 -189
  235. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/resolve-block-scalar.esnext +2 -0
  236. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.esnext +2 -0
  237. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/resolve-props.esnext +1 -0
  238. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/YAMLMap.esnext +1 -1
  239. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/addPairToJSMap.esnext +1 -1
  240. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/parse/lexer.esnext +5 -0
  241. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/parse/parser.esnext +4 -0
  242. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/tags.esnext +3 -3
  243. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.esnext +2 -2
  244. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.esnext +1 -1
  245. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/set.esnext +2 -2
  246. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/stringify/stringifyString.esnext +1 -1
  247. package/build/esnext/package.esnext +2 -2
  248. package/build/esnext/packages/cli-kit/build/esnext/prompt.esnext.esnext +1 -1
  249. package/build/esnext/server.esnext +5 -9
  250. package/build/esnext/shared/package-manager.esnext +1 -1
  251. package/build/esnext/shared/prompts.esnext +1 -1
  252. package/build/tsconfig.tsbuildinfo +1 -1
  253. package/package.json +3 -3
  254. package/source/shared/prompts.ts +1 -1
  255. package/templates/app-basic/App.tsx +3 -4
  256. package/templates/app-basic/browser.tsx +5 -1
  257. package/templates/app-basic/foundation/html/Head.test.tsx +42 -0
  258. package/templates/app-basic/foundation/html/Head.tsx +34 -0
  259. package/templates/app-basic/foundation/html.ts +1 -1
  260. package/templates/app-basic/package.json +4 -4
  261. package/templates/app-basic/server.tsx +89 -3
  262. package/templates/app-empty/package.json +3 -3
  263. package/templates/app-empty/server.tsx +4 -3
  264. package/templates/app-graphql/App.tsx +3 -4
  265. package/templates/app-graphql/browser.tsx +5 -1
  266. package/templates/app-graphql/foundation/html/Head.test.tsx +42 -0
  267. package/templates/app-graphql/foundation/html/Head.tsx +34 -0
  268. package/templates/app-graphql/foundation/html.ts +1 -1
  269. package/templates/app-graphql/package.json +4 -4
  270. package/templates/app-graphql/server.tsx +93 -9
  271. package/templates/app-trpc/App.tsx +3 -4
  272. package/templates/app-trpc/browser.tsx +5 -1
  273. package/templates/app-trpc/foundation/html/Head.test.tsx +42 -0
  274. package/templates/app-trpc/foundation/html/Head.tsx +34 -0
  275. package/templates/app-trpc/foundation/html.ts +1 -1
  276. package/templates/app-trpc/package.json +4 -4
  277. package/templates/app-trpc/server.tsx +93 -8
  278. package/templates/package/package.json +3 -3
  279. package/templates/workspace/package.json +4 -4
  280. package/templates/app-basic/foundation/html/HTML.test.tsx +0 -46
  281. package/templates/app-basic/foundation/html/HTML.tsx +0 -159
  282. package/templates/app-graphql/foundation/html/HTML.test.tsx +0 -46
  283. package/templates/app-graphql/foundation/html/HTML.tsx +0 -159
  284. package/templates/app-trpc/foundation/html/HTML.test.tsx +0 -46
  285. package/templates/app-trpc/foundation/html/HTML.tsx +0 -159
@@ -1,534 +1,538 @@
1
- import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.esnext';
2
- import { p as path$1 } from './lib/path.esnext';
3
- import { b as braceExpansion } from '../../../brace-expansion@2.0.1/node_modules/brace-expansion/index.esnext';
1
+ import { __require as requirePath } from './lib/path.esnext';
2
+ import { __require as requireBraceExpansion } from '../../../brace-expansion@2.0.1/node_modules/brace-expansion/index.esnext';
4
3
 
5
- const minimatch = minimatch_1 = (p, pattern, options = {}) => {
6
- assertValidPattern(pattern);
7
- if (!options.nocomment && pattern.charAt(0) === "#") {
8
- return false;
9
- }
10
- return new Minimatch(pattern, options).match(p);
11
- };
12
- var minimatch_1 = minimatch;
13
- const path = path$1;
14
- minimatch.sep = path.sep;
15
- const GLOBSTAR = Symbol("globstar **");
16
- minimatch.GLOBSTAR = GLOBSTAR;
17
- const expand = braceExpansion;
18
- const plTypes = {
19
- "!": { open: "(?:(?!(?:", close: "))[^/]*?)" },
20
- "?": { open: "(?:", close: ")?" },
21
- "+": { open: "(?:", close: ")+" },
22
- "*": { open: "(?:", close: ")*" },
23
- "@": { open: "(?:", close: ")" }
24
- };
25
- const qmark = "[^/]";
26
- const star = qmark + "*?";
27
- const twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
28
- const twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
29
- const charSet = (s) => s.split("").reduce((set, c) => {
30
- set[c] = true;
31
- return set;
32
- }, {});
33
- const reSpecials = charSet("().*{}+?[]^$\\!");
34
- const addPatternStartSet = charSet("[.(");
35
- const slashSplit = /\/+/;
36
- minimatch.filter = (pattern, options = {}) => (p, i, list) => minimatch(p, pattern, options);
37
- const ext = (a, b = {}) => {
38
- const t = {};
39
- Object.keys(a).forEach((k) => t[k] = a[k]);
40
- Object.keys(b).forEach((k) => t[k] = b[k]);
41
- return t;
42
- };
43
- minimatch.defaults = (def) => {
44
- if (!def || typeof def !== "object" || !Object.keys(def).length) {
45
- return minimatch;
46
- }
47
- const orig = minimatch;
48
- const m = (p, pattern, options) => orig(p, pattern, ext(def, options));
49
- m.Minimatch = class Minimatch extends orig.Minimatch {
50
- constructor(pattern, options) {
51
- super(pattern, ext(def, options));
4
+ var minimatch_1;
5
+ var hasRequiredMinimatch;
6
+ function requireMinimatch() {
7
+ if (hasRequiredMinimatch) return minimatch_1;
8
+ hasRequiredMinimatch = 1;
9
+ const minimatch = minimatch_1 = (p, pattern, options = {}) => {
10
+ assertValidPattern(pattern);
11
+ if (!options.nocomment && pattern.charAt(0) === "#") {
12
+ return false;
52
13
  }
14
+ return new Minimatch(pattern, options).match(p);
53
15
  };
54
- m.Minimatch.defaults = (options) => orig.defaults(ext(def, options)).Minimatch;
55
- m.filter = (pattern, options) => orig.filter(pattern, ext(def, options));
56
- m.defaults = (options) => orig.defaults(ext(def, options));
57
- m.makeRe = (pattern, options) => orig.makeRe(pattern, ext(def, options));
58
- m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext(def, options));
59
- m.match = (list, pattern, options) => orig.match(list, pattern, ext(def, options));
60
- return m;
61
- };
62
- minimatch.braceExpand = (pattern, options) => braceExpand(pattern, options);
63
- const braceExpand = (pattern, options = {}) => {
64
- assertValidPattern(pattern);
65
- if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
66
- return [pattern];
67
- }
68
- return expand(pattern);
69
- };
70
- const MAX_PATTERN_LENGTH = 1024 * 64;
71
- const assertValidPattern = (pattern) => {
72
- if (typeof pattern !== "string") {
73
- throw new TypeError("invalid pattern");
74
- }
75
- if (pattern.length > MAX_PATTERN_LENGTH) {
76
- throw new TypeError("pattern is too long");
77
- }
78
- };
79
- const SUBPARSE = Symbol("subparse");
80
- minimatch.makeRe = (pattern, options) => new Minimatch(pattern, options || {}).makeRe();
81
- minimatch.match = (list, pattern, options = {}) => {
82
- const mm = new Minimatch(pattern, options);
83
- list = list.filter((f) => mm.match(f));
84
- if (mm.options.nonull && !list.length) {
85
- list.push(pattern);
86
- }
87
- return list;
88
- };
89
- const globUnescape = (s) => s.replace(/\\(.)/g, "$1");
90
- const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
91
- class Minimatch {
92
- constructor(pattern, options) {
16
+ minimatch_1 = minimatch;
17
+ const path = requirePath();
18
+ minimatch.sep = path.sep;
19
+ const GLOBSTAR = Symbol("globstar **");
20
+ minimatch.GLOBSTAR = GLOBSTAR;
21
+ const expand = requireBraceExpansion();
22
+ const plTypes = {
23
+ "!": { open: "(?:(?!(?:", close: "))[^/]*?)" },
24
+ "?": { open: "(?:", close: ")?" },
25
+ "+": { open: "(?:", close: ")+" },
26
+ "*": { open: "(?:", close: ")*" },
27
+ "@": { open: "(?:", close: ")" }
28
+ };
29
+ const qmark = "[^/]";
30
+ const star = qmark + "*?";
31
+ const twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
32
+ const twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
33
+ const charSet = (s) => s.split("").reduce((set, c) => {
34
+ set[c] = true;
35
+ return set;
36
+ }, {});
37
+ const reSpecials = charSet("().*{}+?[]^$\\!");
38
+ const addPatternStartSet = charSet("[.(");
39
+ const slashSplit = /\/+/;
40
+ minimatch.filter = (pattern, options = {}) => (p, i, list) => minimatch(p, pattern, options);
41
+ const ext = (a, b = {}) => {
42
+ const t = {};
43
+ Object.keys(a).forEach((k) => t[k] = a[k]);
44
+ Object.keys(b).forEach((k) => t[k] = b[k]);
45
+ return t;
46
+ };
47
+ minimatch.defaults = (def) => {
48
+ if (!def || typeof def !== "object" || !Object.keys(def).length) {
49
+ return minimatch;
50
+ }
51
+ const orig = minimatch;
52
+ const m = (p, pattern, options) => orig(p, pattern, ext(def, options));
53
+ m.Minimatch = class Minimatch extends orig.Minimatch {
54
+ constructor(pattern, options) {
55
+ super(pattern, ext(def, options));
56
+ }
57
+ };
58
+ m.Minimatch.defaults = (options) => orig.defaults(ext(def, options)).Minimatch;
59
+ m.filter = (pattern, options) => orig.filter(pattern, ext(def, options));
60
+ m.defaults = (options) => orig.defaults(ext(def, options));
61
+ m.makeRe = (pattern, options) => orig.makeRe(pattern, ext(def, options));
62
+ m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext(def, options));
63
+ m.match = (list, pattern, options) => orig.match(list, pattern, ext(def, options));
64
+ return m;
65
+ };
66
+ minimatch.braceExpand = (pattern, options) => braceExpand(pattern, options);
67
+ const braceExpand = (pattern, options = {}) => {
93
68
  assertValidPattern(pattern);
94
- if (!options) options = {};
95
- this.options = options;
96
- this.set = [];
97
- this.pattern = pattern;
98
- this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
99
- if (this.windowsPathsNoEscape) {
100
- this.pattern = this.pattern.replace(/\\/g, "/");
69
+ if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
70
+ return [pattern];
101
71
  }
102
- this.regexp = null;
103
- this.negate = false;
104
- this.comment = false;
105
- this.empty = false;
106
- this.partial = !!options.partial;
107
- this.make();
108
- }
109
- debug() {
110
- }
111
- make() {
112
- const pattern = this.pattern;
113
- const options = this.options;
114
- if (!options.nocomment && pattern.charAt(0) === "#") {
115
- this.comment = true;
116
- return;
72
+ return expand(pattern);
73
+ };
74
+ const MAX_PATTERN_LENGTH = 1024 * 64;
75
+ const assertValidPattern = (pattern) => {
76
+ if (typeof pattern !== "string") {
77
+ throw new TypeError("invalid pattern");
117
78
  }
118
- if (!pattern) {
119
- this.empty = true;
120
- return;
79
+ if (pattern.length > MAX_PATTERN_LENGTH) {
80
+ throw new TypeError("pattern is too long");
121
81
  }
122
- this.parseNegate();
123
- let set = this.globSet = this.braceExpand();
124
- if (options.debug) this.debug = (...args) => console.error(...args);
125
- this.debug(this.pattern, set);
126
- set = this.globParts = set.map((s) => s.split(slashSplit));
127
- this.debug(this.pattern, set);
128
- set = set.map((s, si, set2) => s.map(this.parse, this));
129
- this.debug(this.pattern, set);
130
- set = set.filter((s) => s.indexOf(false) === -1);
131
- this.debug(this.pattern, set);
132
- this.set = set;
133
- }
134
- parseNegate() {
135
- if (this.options.nonegate) return;
136
- const pattern = this.pattern;
137
- let negate = false;
138
- let negateOffset = 0;
139
- for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) {
140
- negate = !negate;
141
- negateOffset++;
82
+ };
83
+ const SUBPARSE = Symbol("subparse");
84
+ minimatch.makeRe = (pattern, options) => new Minimatch(pattern, options || {}).makeRe();
85
+ minimatch.match = (list, pattern, options = {}) => {
86
+ const mm = new Minimatch(pattern, options);
87
+ list = list.filter((f) => mm.match(f));
88
+ if (mm.options.nonull && !list.length) {
89
+ list.push(pattern);
142
90
  }
143
- if (negateOffset) this.pattern = pattern.substr(negateOffset);
144
- this.negate = negate;
145
- }
146
- // set partial to true to test if, for example,
147
- // "/a/b" matches the start of "/*/b/*/d"
148
- // Partial means, if you run out of file before you run
149
- // out of pattern, then that's fine, as long as all
150
- // the parts match.
151
- matchOne(file, pattern, partial) {
152
- var options = this.options;
153
- this.debug(
154
- "matchOne",
155
- { "this": this, file, pattern }
156
- );
157
- this.debug("matchOne", file.length, pattern.length);
158
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
159
- this.debug("matchOne loop");
160
- var p = pattern[pi];
161
- var f = file[fi];
162
- this.debug(pattern, p, f);
163
- if (p === false) return false;
164
- if (p === GLOBSTAR) {
165
- this.debug("GLOBSTAR", [pattern, p, f]);
166
- var fr = fi;
167
- var pr = pi + 1;
168
- if (pr === pl) {
169
- this.debug("** at the end");
170
- for (; fi < fl; fi++) {
171
- if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false;
172
- }
173
- return true;
174
- }
175
- while (fr < fl) {
176
- var swallowee = file[fr];
177
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
178
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
179
- this.debug("globstar found match!", fr, fl, swallowee);
91
+ return list;
92
+ };
93
+ const globUnescape = (s) => s.replace(/\\(.)/g, "$1");
94
+ const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
95
+ class Minimatch {
96
+ constructor(pattern, options) {
97
+ assertValidPattern(pattern);
98
+ if (!options) options = {};
99
+ this.options = options;
100
+ this.set = [];
101
+ this.pattern = pattern;
102
+ this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
103
+ if (this.windowsPathsNoEscape) {
104
+ this.pattern = this.pattern.replace(/\\/g, "/");
105
+ }
106
+ this.regexp = null;
107
+ this.negate = false;
108
+ this.comment = false;
109
+ this.empty = false;
110
+ this.partial = !!options.partial;
111
+ this.make();
112
+ }
113
+ debug() {
114
+ }
115
+ make() {
116
+ const pattern = this.pattern;
117
+ const options = this.options;
118
+ if (!options.nocomment && pattern.charAt(0) === "#") {
119
+ this.comment = true;
120
+ return;
121
+ }
122
+ if (!pattern) {
123
+ this.empty = true;
124
+ return;
125
+ }
126
+ this.parseNegate();
127
+ let set = this.globSet = this.braceExpand();
128
+ if (options.debug) this.debug = (...args) => console.error(...args);
129
+ this.debug(this.pattern, set);
130
+ set = this.globParts = set.map((s) => s.split(slashSplit));
131
+ this.debug(this.pattern, set);
132
+ set = set.map((s, si, set2) => s.map(this.parse, this));
133
+ this.debug(this.pattern, set);
134
+ set = set.filter((s) => s.indexOf(false) === -1);
135
+ this.debug(this.pattern, set);
136
+ this.set = set;
137
+ }
138
+ parseNegate() {
139
+ if (this.options.nonegate) return;
140
+ const pattern = this.pattern;
141
+ let negate = false;
142
+ let negateOffset = 0;
143
+ for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) {
144
+ negate = !negate;
145
+ negateOffset++;
146
+ }
147
+ if (negateOffset) this.pattern = pattern.substr(negateOffset);
148
+ this.negate = negate;
149
+ }
150
+ // set partial to true to test if, for example,
151
+ // "/a/b" matches the start of "/*/b/*/d"
152
+ // Partial means, if you run out of file before you run
153
+ // out of pattern, then that's fine, as long as all
154
+ // the parts match.
155
+ matchOne(file, pattern, partial) {
156
+ var options = this.options;
157
+ this.debug(
158
+ "matchOne",
159
+ { "this": this, file, pattern }
160
+ );
161
+ this.debug("matchOne", file.length, pattern.length);
162
+ for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
163
+ this.debug("matchOne loop");
164
+ var p = pattern[pi];
165
+ var f = file[fi];
166
+ this.debug(pattern, p, f);
167
+ if (p === false) return false;
168
+ if (p === GLOBSTAR) {
169
+ this.debug("GLOBSTAR", [pattern, p, f]);
170
+ var fr = fi;
171
+ var pr = pi + 1;
172
+ if (pr === pl) {
173
+ this.debug("** at the end");
174
+ for (; fi < fl; fi++) {
175
+ if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false;
176
+ }
180
177
  return true;
181
- } else {
182
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
183
- this.debug("dot detected!", file, fr, pattern, pr);
184
- break;
178
+ }
179
+ while (fr < fl) {
180
+ var swallowee = file[fr];
181
+ this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
182
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
183
+ this.debug("globstar found match!", fr, fl, swallowee);
184
+ return true;
185
+ } else {
186
+ if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
187
+ this.debug("dot detected!", file, fr, pattern, pr);
188
+ break;
189
+ }
190
+ this.debug("globstar swallow a segment, and continue");
191
+ fr++;
185
192
  }
186
- this.debug("globstar swallow a segment, and continue");
187
- fr++;
188
193
  }
194
+ if (partial) {
195
+ this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
196
+ if (fr === fl) return true;
197
+ }
198
+ return false;
189
199
  }
190
- if (partial) {
191
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
192
- if (fr === fl) return true;
200
+ var hit;
201
+ if (typeof p === "string") {
202
+ hit = f === p;
203
+ this.debug("string match", p, f, hit);
204
+ } else {
205
+ hit = f.match(p);
206
+ this.debug("pattern match", p, f, hit);
193
207
  }
194
- return false;
208
+ if (!hit) return false;
195
209
  }
196
- var hit;
197
- if (typeof p === "string") {
198
- hit = f === p;
199
- this.debug("string match", p, f, hit);
200
- } else {
201
- hit = f.match(p);
202
- this.debug("pattern match", p, f, hit);
210
+ if (fi === fl && pi === pl) {
211
+ return true;
212
+ } else if (fi === fl) {
213
+ return partial;
214
+ } else if (pi === pl) {
215
+ return fi === fl - 1 && file[fi] === "";
203
216
  }
204
- if (!hit) return false;
217
+ throw new Error("wtf?");
205
218
  }
206
- if (fi === fl && pi === pl) {
207
- return true;
208
- } else if (fi === fl) {
209
- return partial;
210
- } else if (pi === pl) {
211
- return fi === fl - 1 && file[fi] === "";
212
- }
213
- throw new Error("wtf?");
214
- }
215
- braceExpand() {
216
- return braceExpand(this.pattern, this.options);
217
- }
218
- parse(pattern, isSub) {
219
- assertValidPattern(pattern);
220
- const options = this.options;
221
- if (pattern === "**") {
222
- if (!options.noglobstar)
223
- return GLOBSTAR;
224
- else
225
- pattern = "*";
219
+ braceExpand() {
220
+ return braceExpand(this.pattern, this.options);
226
221
  }
227
- if (pattern === "") return "";
228
- let re = "";
229
- let hasMagic = !!options.nocase;
230
- let escaping = false;
231
- const patternListStack = [];
232
- const negativeLists = [];
233
- let stateChar;
234
- let inClass = false;
235
- let reClassStart = -1;
236
- let classStart = -1;
237
- let cs;
238
- let pl;
239
- let sp;
240
- const patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
241
- const clearStateChar = () => {
242
- if (stateChar) {
243
- switch (stateChar) {
244
- case "*":
245
- re += star;
246
- hasMagic = true;
247
- break;
248
- case "?":
249
- re += qmark;
250
- hasMagic = true;
251
- break;
252
- default:
253
- re += "\\" + stateChar;
254
- break;
255
- }
256
- this.debug("clearStateChar %j %j", stateChar, re);
257
- stateChar = false;
258
- }
259
- };
260
- for (let i = 0, c; i < pattern.length && (c = pattern.charAt(i)); i++) {
261
- this.debug("%s %s %s %j", pattern, i, re, c);
262
- if (escaping) {
263
- if (c === "/") {
264
- return false;
265
- }
266
- if (reSpecials[c]) {
267
- re += "\\";
268
- }
269
- re += c;
270
- escaping = false;
271
- continue;
222
+ parse(pattern, isSub) {
223
+ assertValidPattern(pattern);
224
+ const options = this.options;
225
+ if (pattern === "**") {
226
+ if (!options.noglobstar)
227
+ return GLOBSTAR;
228
+ else
229
+ pattern = "*";
272
230
  }
273
- switch (c) {
274
- case "/": {
275
- return false;
231
+ if (pattern === "") return "";
232
+ let re = "";
233
+ let hasMagic = !!options.nocase;
234
+ let escaping = false;
235
+ const patternListStack = [];
236
+ const negativeLists = [];
237
+ let stateChar;
238
+ let inClass = false;
239
+ let reClassStart = -1;
240
+ let classStart = -1;
241
+ let cs;
242
+ let pl;
243
+ let sp;
244
+ const patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
245
+ const clearStateChar = () => {
246
+ if (stateChar) {
247
+ switch (stateChar) {
248
+ case "*":
249
+ re += star;
250
+ hasMagic = true;
251
+ break;
252
+ case "?":
253
+ re += qmark;
254
+ hasMagic = true;
255
+ break;
256
+ default:
257
+ re += "\\" + stateChar;
258
+ break;
259
+ }
260
+ this.debug("clearStateChar %j %j", stateChar, re);
261
+ stateChar = false;
276
262
  }
277
- case "\\":
278
- clearStateChar();
279
- escaping = true;
280
- continue;
281
- case "?":
282
- case "*":
283
- case "+":
284
- case "@":
285
- case "!":
286
- this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c);
287
- if (inClass) {
288
- this.debug(" in class");
289
- if (c === "!" && i === classStart + 1) c = "^";
290
- re += c;
291
- continue;
263
+ };
264
+ for (let i = 0, c; i < pattern.length && (c = pattern.charAt(i)); i++) {
265
+ this.debug("%s %s %s %j", pattern, i, re, c);
266
+ if (escaping) {
267
+ if (c === "/") {
268
+ return false;
292
269
  }
293
- this.debug("call clearStateChar %j", stateChar);
294
- clearStateChar();
295
- stateChar = c;
296
- if (options.noext) clearStateChar();
270
+ if (reSpecials[c]) {
271
+ re += "\\";
272
+ }
273
+ re += c;
274
+ escaping = false;
297
275
  continue;
298
- case "(":
299
- if (inClass) {
300
- re += "(";
301
- continue;
276
+ }
277
+ switch (c) {
278
+ /* istanbul ignore next */
279
+ case "/": {
280
+ return false;
302
281
  }
303
- if (!stateChar) {
304
- re += "\\(";
282
+ case "\\":
283
+ clearStateChar();
284
+ escaping = true;
305
285
  continue;
306
- }
307
- patternListStack.push({
308
- type: stateChar,
309
- start: i - 1,
310
- reStart: re.length,
311
- open: plTypes[stateChar].open,
312
- close: plTypes[stateChar].close
313
- });
314
- re += stateChar === "!" ? "(?:(?!(?:" : "(?:";
315
- this.debug("plType %j %j", stateChar, re);
316
- stateChar = false;
317
- continue;
318
- case ")":
319
- if (inClass || !patternListStack.length) {
320
- re += "\\)";
286
+ // the various stateChar values
287
+ // for the "extglob" stuff.
288
+ case "?":
289
+ case "*":
290
+ case "+":
291
+ case "@":
292
+ case "!":
293
+ this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c);
294
+ if (inClass) {
295
+ this.debug(" in class");
296
+ if (c === "!" && i === classStart + 1) c = "^";
297
+ re += c;
298
+ continue;
299
+ }
300
+ this.debug("call clearStateChar %j", stateChar);
301
+ clearStateChar();
302
+ stateChar = c;
303
+ if (options.noext) clearStateChar();
321
304
  continue;
322
- }
323
- clearStateChar();
324
- hasMagic = true;
325
- pl = patternListStack.pop();
326
- re += pl.close;
327
- if (pl.type === "!") {
328
- negativeLists.push(pl);
329
- }
330
- pl.reEnd = re.length;
331
- continue;
332
- case "|":
333
- if (inClass || !patternListStack.length) {
334
- re += "\\|";
305
+ case "(":
306
+ if (inClass) {
307
+ re += "(";
308
+ continue;
309
+ }
310
+ if (!stateChar) {
311
+ re += "\\(";
312
+ continue;
313
+ }
314
+ patternListStack.push({
315
+ type: stateChar,
316
+ start: i - 1,
317
+ reStart: re.length,
318
+ open: plTypes[stateChar].open,
319
+ close: plTypes[stateChar].close
320
+ });
321
+ re += stateChar === "!" ? "(?:(?!(?:" : "(?:";
322
+ this.debug("plType %j %j", stateChar, re);
323
+ stateChar = false;
335
324
  continue;
336
- }
337
- clearStateChar();
338
- re += "|";
339
- continue;
340
- case "[":
341
- clearStateChar();
342
- if (inClass) {
343
- re += "\\" + c;
325
+ case ")":
326
+ if (inClass || !patternListStack.length) {
327
+ re += "\\)";
328
+ continue;
329
+ }
330
+ clearStateChar();
331
+ hasMagic = true;
332
+ pl = patternListStack.pop();
333
+ re += pl.close;
334
+ if (pl.type === "!") {
335
+ negativeLists.push(pl);
336
+ }
337
+ pl.reEnd = re.length;
344
338
  continue;
345
- }
346
- inClass = true;
347
- classStart = i;
348
- reClassStart = re.length;
349
- re += c;
350
- continue;
351
- case "]":
352
- if (i === classStart + 1 || !inClass) {
353
- re += "\\" + c;
339
+ case "|":
340
+ if (inClass || !patternListStack.length) {
341
+ re += "\\|";
342
+ continue;
343
+ }
344
+ clearStateChar();
345
+ re += "|";
354
346
  continue;
355
- }
356
- cs = pattern.substring(classStart + 1, i);
357
- try {
358
- RegExp("[" + cs + "]");
359
- } catch (er) {
360
- sp = this.parse(cs, SUBPARSE);
361
- re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
362
- hasMagic = hasMagic || sp[1];
347
+ // these are mostly the same in regexp and glob
348
+ case "[":
349
+ clearStateChar();
350
+ if (inClass) {
351
+ re += "\\" + c;
352
+ continue;
353
+ }
354
+ inClass = true;
355
+ classStart = i;
356
+ reClassStart = re.length;
357
+ re += c;
358
+ continue;
359
+ case "]":
360
+ if (i === classStart + 1 || !inClass) {
361
+ re += "\\" + c;
362
+ continue;
363
+ }
364
+ cs = pattern.substring(classStart + 1, i);
365
+ try {
366
+ RegExp("[" + cs + "]");
367
+ } catch (er) {
368
+ sp = this.parse(cs, SUBPARSE);
369
+ re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
370
+ hasMagic = hasMagic || sp[1];
371
+ inClass = false;
372
+ continue;
373
+ }
374
+ hasMagic = true;
363
375
  inClass = false;
376
+ re += c;
364
377
  continue;
378
+ default:
379
+ clearStateChar();
380
+ if (reSpecials[c] && !(c === "^" && inClass)) {
381
+ re += "\\";
382
+ }
383
+ re += c;
384
+ break;
385
+ }
386
+ }
387
+ if (inClass) {
388
+ cs = pattern.substr(classStart + 1);
389
+ sp = this.parse(cs, SUBPARSE);
390
+ re = re.substr(0, reClassStart) + "\\[" + sp[0];
391
+ hasMagic = hasMagic || sp[1];
392
+ }
393
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
394
+ let tail;
395
+ tail = re.slice(pl.reStart + pl.open.length);
396
+ this.debug("setting tail", re, pl);
397
+ tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => {
398
+ if (!$2) {
399
+ $2 = "\\";
365
400
  }
366
- hasMagic = true;
367
- inClass = false;
368
- re += c;
369
- continue;
370
- default:
371
- clearStateChar();
372
- if (reSpecials[c] && !(c === "^" && inClass)) {
373
- re += "\\";
374
- }
375
- re += c;
376
- break;
401
+ return $1 + $1 + $2 + "|";
402
+ });
403
+ this.debug("tail=%j\n %s", tail, tail, pl, re);
404
+ const t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type;
405
+ hasMagic = true;
406
+ re = re.slice(0, pl.reStart) + t + "\\(" + tail;
377
407
  }
378
- }
379
- if (inClass) {
380
- cs = pattern.substr(classStart + 1);
381
- sp = this.parse(cs, SUBPARSE);
382
- re = re.substr(0, reClassStart) + "\\[" + sp[0];
383
- hasMagic = hasMagic || sp[1];
384
- }
385
- for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
386
- let tail;
387
- tail = re.slice(pl.reStart + pl.open.length);
388
- this.debug("setting tail", re, pl);
389
- tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => {
390
- if (!$2) {
391
- $2 = "\\";
408
+ clearStateChar();
409
+ if (escaping) {
410
+ re += "\\\\";
411
+ }
412
+ const addPatternStart = addPatternStartSet[re.charAt(0)];
413
+ for (let n = negativeLists.length - 1; n > -1; n--) {
414
+ const nl = negativeLists[n];
415
+ const nlBefore = re.slice(0, nl.reStart);
416
+ const nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
417
+ let nlAfter = re.slice(nl.reEnd);
418
+ const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter;
419
+ const openParensBefore = nlBefore.split("(").length - 1;
420
+ let cleanAfter = nlAfter;
421
+ for (let i = 0; i < openParensBefore; i++) {
422
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
392
423
  }
393
- return $1 + $1 + $2 + "|";
394
- });
395
- this.debug("tail=%j\n %s", tail, tail, pl, re);
396
- const t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type;
397
- hasMagic = true;
398
- re = re.slice(0, pl.reStart) + t + "\\(" + tail;
399
- }
400
- clearStateChar();
401
- if (escaping) {
402
- re += "\\\\";
403
- }
404
- const addPatternStart = addPatternStartSet[re.charAt(0)];
405
- for (let n = negativeLists.length - 1; n > -1; n--) {
406
- const nl = negativeLists[n];
407
- const nlBefore = re.slice(0, nl.reStart);
408
- const nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
409
- let nlAfter = re.slice(nl.reEnd);
410
- const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter;
411
- const openParensBefore = nlBefore.split("(").length - 1;
412
- let cleanAfter = nlAfter;
413
- for (let i = 0; i < openParensBefore; i++) {
414
- cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
424
+ nlAfter = cleanAfter;
425
+ const dollar = nlAfter === "" && isSub !== SUBPARSE ? "$" : "";
426
+ re = nlBefore + nlFirst + nlAfter + dollar + nlLast;
427
+ }
428
+ if (re !== "" && hasMagic) {
429
+ re = "(?=.)" + re;
430
+ }
431
+ if (addPatternStart) {
432
+ re = patternStart + re;
433
+ }
434
+ if (isSub === SUBPARSE) {
435
+ return [re, hasMagic];
436
+ }
437
+ if (!hasMagic) {
438
+ return globUnescape(pattern);
439
+ }
440
+ const flags = options.nocase ? "i" : "";
441
+ try {
442
+ return Object.assign(new RegExp("^" + re + "$", flags), {
443
+ _glob: pattern,
444
+ _src: re
445
+ });
446
+ } catch (er) {
447
+ return new RegExp("$.");
415
448
  }
416
- nlAfter = cleanAfter;
417
- const dollar = nlAfter === "" && isSub !== SUBPARSE ? "$" : "";
418
- re = nlBefore + nlFirst + nlAfter + dollar + nlLast;
419
- }
420
- if (re !== "" && hasMagic) {
421
- re = "(?=.)" + re;
422
- }
423
- if (addPatternStart) {
424
- re = patternStart + re;
425
- }
426
- if (isSub === SUBPARSE) {
427
- return [re, hasMagic];
428
- }
429
- if (!hasMagic) {
430
- return globUnescape(pattern);
431
- }
432
- const flags = options.nocase ? "i" : "";
433
- try {
434
- return Object.assign(new RegExp("^" + re + "$", flags), {
435
- _glob: pattern,
436
- _src: re
437
- });
438
- } catch (er) {
439
- return new RegExp("$.");
440
- }
441
- }
442
- makeRe() {
443
- if (this.regexp || this.regexp === false) return this.regexp;
444
- const set = this.set;
445
- if (!set.length) {
446
- this.regexp = false;
447
- return this.regexp;
448
449
  }
449
- const options = this.options;
450
- const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
451
- const flags = options.nocase ? "i" : "";
452
- let re = set.map((pattern) => {
453
- pattern = pattern.map(
454
- (p) => typeof p === "string" ? regExpEscape(p) : p === GLOBSTAR ? GLOBSTAR : p._src
455
- ).reduce((set2, p) => {
456
- if (!(set2[set2.length - 1] === GLOBSTAR && p === GLOBSTAR)) {
457
- set2.push(p);
458
- }
459
- return set2;
460
- }, []);
461
- pattern.forEach((p, i) => {
462
- if (p !== GLOBSTAR || pattern[i - 1] === GLOBSTAR) {
463
- return;
464
- }
465
- if (i === 0) {
466
- if (pattern.length > 1) {
467
- pattern[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + pattern[i + 1];
450
+ makeRe() {
451
+ if (this.regexp || this.regexp === false) return this.regexp;
452
+ const set = this.set;
453
+ if (!set.length) {
454
+ this.regexp = false;
455
+ return this.regexp;
456
+ }
457
+ const options = this.options;
458
+ const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
459
+ const flags = options.nocase ? "i" : "";
460
+ let re = set.map((pattern) => {
461
+ pattern = pattern.map(
462
+ (p) => typeof p === "string" ? regExpEscape(p) : p === GLOBSTAR ? GLOBSTAR : p._src
463
+ ).reduce((set2, p) => {
464
+ if (!(set2[set2.length - 1] === GLOBSTAR && p === GLOBSTAR)) {
465
+ set2.push(p);
466
+ }
467
+ return set2;
468
+ }, []);
469
+ pattern.forEach((p, i) => {
470
+ if (p !== GLOBSTAR || pattern[i - 1] === GLOBSTAR) {
471
+ return;
472
+ }
473
+ if (i === 0) {
474
+ if (pattern.length > 1) {
475
+ pattern[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + pattern[i + 1];
476
+ } else {
477
+ pattern[i] = twoStar;
478
+ }
479
+ } else if (i === pattern.length - 1) {
480
+ pattern[i - 1] += "(?:\\/|" + twoStar + ")?";
468
481
  } else {
469
- pattern[i] = twoStar;
482
+ pattern[i - 1] += "(?:\\/|\\/" + twoStar + "\\/)" + pattern[i + 1];
483
+ pattern[i + 1] = GLOBSTAR;
470
484
  }
471
- } else if (i === pattern.length - 1) {
472
- pattern[i - 1] += "(?:\\/|" + twoStar + ")?";
473
- } else {
474
- pattern[i - 1] += "(?:\\/|\\/" + twoStar + "\\/)" + pattern[i + 1];
475
- pattern[i + 1] = GLOBSTAR;
476
- }
477
- });
478
- return pattern.filter((p) => p !== GLOBSTAR).join("/");
479
- }).join("|");
480
- re = "^(?:" + re + ")$";
481
- if (this.negate) re = "^(?!" + re + ").*$";
482
- try {
483
- this.regexp = new RegExp(re, flags);
484
- } catch (ex) {
485
- this.regexp = false;
486
- }
487
- return this.regexp;
488
- }
489
- match(f, partial = this.partial) {
490
- this.debug("match", f, this.pattern);
491
- if (this.comment) return false;
492
- if (this.empty) return f === "";
493
- if (f === "/" && partial) return true;
494
- const options = this.options;
495
- if (path.sep !== "/") {
496
- f = f.split(path.sep).join("/");
497
- }
498
- f = f.split(slashSplit);
499
- this.debug(this.pattern, "split", f);
500
- const set = this.set;
501
- this.debug(this.pattern, "set", set);
502
- let filename;
503
- for (let i = f.length - 1; i >= 0; i--) {
504
- filename = f[i];
505
- if (filename) break;
485
+ });
486
+ return pattern.filter((p) => p !== GLOBSTAR).join("/");
487
+ }).join("|");
488
+ re = "^(?:" + re + ")$";
489
+ if (this.negate) re = "^(?!" + re + ").*$";
490
+ try {
491
+ this.regexp = new RegExp(re, flags);
492
+ } catch (ex) {
493
+ this.regexp = false;
494
+ }
495
+ return this.regexp;
506
496
  }
507
- for (let i = 0; i < set.length; i++) {
508
- const pattern = set[i];
509
- let file = f;
510
- if (options.matchBase && pattern.length === 1) {
511
- file = [filename];
497
+ match(f, partial = this.partial) {
498
+ this.debug("match", f, this.pattern);
499
+ if (this.comment) return false;
500
+ if (this.empty) return f === "";
501
+ if (f === "/" && partial) return true;
502
+ const options = this.options;
503
+ if (path.sep !== "/") {
504
+ f = f.split(path.sep).join("/");
512
505
  }
513
- const hit = this.matchOne(file, pattern, partial);
514
- if (hit) {
515
- if (options.flipNegate) return true;
516
- return !this.negate;
506
+ f = f.split(slashSplit);
507
+ this.debug(this.pattern, "split", f);
508
+ const set = this.set;
509
+ this.debug(this.pattern, "set", set);
510
+ let filename;
511
+ for (let i = f.length - 1; i >= 0; i--) {
512
+ filename = f[i];
513
+ if (filename) break;
517
514
  }
515
+ for (let i = 0; i < set.length; i++) {
516
+ const pattern = set[i];
517
+ let file = f;
518
+ if (options.matchBase && pattern.length === 1) {
519
+ file = [filename];
520
+ }
521
+ const hit = this.matchOne(file, pattern, partial);
522
+ if (hit) {
523
+ if (options.flipNegate) return true;
524
+ return !this.negate;
525
+ }
526
+ }
527
+ if (options.flipNegate) return false;
528
+ return this.negate;
529
+ }
530
+ static defaults(def) {
531
+ return minimatch.defaults(def).Minimatch;
518
532
  }
519
- if (options.flipNegate) return false;
520
- return this.negate;
521
- }
522
- static defaults(def) {
523
- return minimatch.defaults(def).Minimatch;
524
533
  }
534
+ minimatch.Minimatch = Minimatch;
535
+ return minimatch_1;
525
536
  }
526
- minimatch.Minimatch = Minimatch;
527
- const minimatch$1 = /* @__PURE__ */ getDefaultExportFromCjs(minimatch_1);
528
-
529
- const minimatch$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
530
- __proto__: null,
531
- default: minimatch$1
532
- }, Symbol.toStringTag, { value: 'Module' }));
533
537
 
534
- export { minimatch$1 as default, minimatch$2 as m };
538
+ export { requireMinimatch as __require };