@quilted/create 0.2.43 → 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 (260) hide show
  1. package/CHANGELOG.md +12 -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 +40 -34
  30. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.mjs +27 -21
  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 +104 -99
  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 +65 -60
  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/package.json +4 -4
  256. package/templates/app-empty/package.json +3 -3
  257. package/templates/app-graphql/package.json +4 -4
  258. package/templates/app-trpc/package.json +4 -4
  259. package/templates/package/package.json +3 -3
  260. package/templates/workspace/package.json +4 -4
@@ -1,772 +1,778 @@
1
- import { c as constants$1 } from './constants.esnext';
2
- import './utils.esnext';
3
- import { __exports as utils$1 } from '../../../../../../_virtual/utils.esnext';
1
+ import { __require as requireConstants } from './constants.esnext';
2
+ import { __require as requireUtils } from './utils.esnext';
4
3
 
5
- const constants = constants$1;
6
- const utils = utils$1;
7
- const {
8
- MAX_LENGTH,
9
- POSIX_REGEX_SOURCE,
10
- REGEX_NON_SPECIAL_CHARS,
11
- REGEX_SPECIAL_CHARS_BACKREF,
12
- REPLACEMENTS
13
- } = constants;
14
- const expandRange = (args, options) => {
15
- if (typeof options.expandRange === "function") {
16
- return options.expandRange(...args, options);
17
- }
18
- args.sort();
19
- const value = `[${args.join("-")}]`;
20
- try {
21
- new RegExp(value);
22
- } catch (ex) {
23
- return args.map((v) => utils.escapeRegex(v)).join("..");
24
- }
25
- return value;
26
- };
27
- const syntaxError = (type, char) => {
28
- return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
29
- };
30
- const parse = (input, options) => {
31
- if (typeof input !== "string") {
32
- throw new TypeError("Expected a string");
33
- }
34
- input = REPLACEMENTS[input] || input;
35
- const opts = { ...options };
36
- const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
37
- let len = input.length;
38
- if (len > max) {
39
- throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
40
- }
41
- const bos = { type: "bos", value: "", output: opts.prepend || "" };
42
- const tokens = [bos];
43
- const capture = opts.capture ? "" : "?:";
44
- const win32 = utils.isWindows(options);
45
- const PLATFORM_CHARS = constants.globChars(win32);
46
- const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
4
+ var parse_1;
5
+ var hasRequiredParse;
6
+ function requireParse() {
7
+ if (hasRequiredParse) return parse_1;
8
+ hasRequiredParse = 1;
9
+ const constants = requireConstants();
10
+ const utils = requireUtils();
47
11
  const {
48
- DOT_LITERAL,
49
- PLUS_LITERAL,
50
- SLASH_LITERAL,
51
- ONE_CHAR,
52
- DOTS_SLASH,
53
- NO_DOT,
54
- NO_DOT_SLASH,
55
- NO_DOTS_SLASH,
56
- QMARK,
57
- QMARK_NO_DOT,
58
- STAR,
59
- START_ANCHOR
60
- } = PLATFORM_CHARS;
61
- const globstar = (opts2) => {
62
- return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
12
+ MAX_LENGTH,
13
+ POSIX_REGEX_SOURCE,
14
+ REGEX_NON_SPECIAL_CHARS,
15
+ REGEX_SPECIAL_CHARS_BACKREF,
16
+ REPLACEMENTS
17
+ } = constants;
18
+ const expandRange = (args, options) => {
19
+ if (typeof options.expandRange === "function") {
20
+ return options.expandRange(...args, options);
21
+ }
22
+ args.sort();
23
+ const value = `[${args.join("-")}]`;
24
+ try {
25
+ new RegExp(value);
26
+ } catch (ex) {
27
+ return args.map((v) => utils.escapeRegex(v)).join("..");
28
+ }
29
+ return value;
63
30
  };
64
- const nodot = opts.dot ? "" : NO_DOT;
65
- const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
66
- let star = opts.bash === true ? globstar(opts) : STAR;
67
- if (opts.capture) {
68
- star = `(${star})`;
69
- }
70
- if (typeof opts.noext === "boolean") {
71
- opts.noextglob = opts.noext;
72
- }
73
- const state = {
74
- input,
75
- index: -1,
76
- start: 0,
77
- dot: opts.dot === true,
78
- consumed: "",
79
- output: "",
80
- prefix: "",
81
- backtrack: false,
82
- negated: false,
83
- brackets: 0,
84
- braces: 0,
85
- parens: 0,
86
- quotes: 0,
87
- globstar: false,
88
- tokens
31
+ const syntaxError = (type, char) => {
32
+ return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
89
33
  };
90
- input = utils.removePrefix(input, state);
91
- len = input.length;
92
- const extglobs = [];
93
- const braces = [];
94
- const stack = [];
95
- let prev = bos;
96
- let value;
97
- const eos = () => state.index === len - 1;
98
- const peek = state.peek = (n = 1) => input[state.index + n];
99
- const advance = state.advance = () => input[++state.index] || "";
100
- const remaining = () => input.slice(state.index + 1);
101
- const consume = (value2 = "", num = 0) => {
102
- state.consumed += value2;
103
- state.index += num;
104
- };
105
- const append = (token) => {
106
- state.output += token.output != null ? token.output : token.value;
107
- consume(token.value);
108
- };
109
- const negate = () => {
110
- let count = 1;
111
- while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
112
- advance();
34
+ const parse = (input, options) => {
35
+ if (typeof input !== "string") {
36
+ throw new TypeError("Expected a string");
37
+ }
38
+ input = REPLACEMENTS[input] || input;
39
+ const opts = { ...options };
40
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
41
+ let len = input.length;
42
+ if (len > max) {
43
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
44
+ }
45
+ const bos = { type: "bos", value: "", output: opts.prepend || "" };
46
+ const tokens = [bos];
47
+ const capture = opts.capture ? "" : "?:";
48
+ const win32 = utils.isWindows(options);
49
+ const PLATFORM_CHARS = constants.globChars(win32);
50
+ const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
51
+ const {
52
+ DOT_LITERAL,
53
+ PLUS_LITERAL,
54
+ SLASH_LITERAL,
55
+ ONE_CHAR,
56
+ DOTS_SLASH,
57
+ NO_DOT,
58
+ NO_DOT_SLASH,
59
+ NO_DOTS_SLASH,
60
+ QMARK,
61
+ QMARK_NO_DOT,
62
+ STAR,
63
+ START_ANCHOR
64
+ } = PLATFORM_CHARS;
65
+ const globstar = (opts2) => {
66
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
67
+ };
68
+ const nodot = opts.dot ? "" : NO_DOT;
69
+ const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
70
+ let star = opts.bash === true ? globstar(opts) : STAR;
71
+ if (opts.capture) {
72
+ star = `(${star})`;
73
+ }
74
+ if (typeof opts.noext === "boolean") {
75
+ opts.noextglob = opts.noext;
76
+ }
77
+ const state = {
78
+ input,
79
+ index: -1,
80
+ start: 0,
81
+ dot: opts.dot === true,
82
+ consumed: "",
83
+ output: "",
84
+ prefix: "",
85
+ backtrack: false,
86
+ negated: false,
87
+ brackets: 0,
88
+ braces: 0,
89
+ parens: 0,
90
+ quotes: 0,
91
+ globstar: false,
92
+ tokens
93
+ };
94
+ input = utils.removePrefix(input, state);
95
+ len = input.length;
96
+ const extglobs = [];
97
+ const braces = [];
98
+ const stack = [];
99
+ let prev = bos;
100
+ let value;
101
+ const eos = () => state.index === len - 1;
102
+ const peek = state.peek = (n = 1) => input[state.index + n];
103
+ const advance = state.advance = () => input[++state.index] || "";
104
+ const remaining = () => input.slice(state.index + 1);
105
+ const consume = (value2 = "", num = 0) => {
106
+ state.consumed += value2;
107
+ state.index += num;
108
+ };
109
+ const append = (token) => {
110
+ state.output += token.output != null ? token.output : token.value;
111
+ consume(token.value);
112
+ };
113
+ const negate = () => {
114
+ let count = 1;
115
+ while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
116
+ advance();
117
+ state.start++;
118
+ count++;
119
+ }
120
+ if (count % 2 === 0) {
121
+ return false;
122
+ }
123
+ state.negated = true;
113
124
  state.start++;
114
- count++;
115
- }
116
- if (count % 2 === 0) {
117
- return false;
118
- }
119
- state.negated = true;
120
- state.start++;
121
- return true;
122
- };
123
- const increment = (type) => {
124
- state[type]++;
125
- stack.push(type);
126
- };
127
- const decrement = (type) => {
128
- state[type]--;
129
- stack.pop();
130
- };
131
- const push = (tok) => {
132
- if (prev.type === "globstar") {
133
- const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
134
- const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
135
- if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
136
- state.output = state.output.slice(0, -prev.output.length);
137
- prev.type = "star";
138
- prev.value = "*";
139
- prev.output = star;
140
- state.output += prev.output;
141
- }
142
- }
143
- if (extglobs.length && tok.type !== "paren") {
144
- extglobs[extglobs.length - 1].inner += tok.value;
145
- }
146
- if (tok.value || tok.output) append(tok);
147
- if (prev && prev.type === "text" && tok.type === "text") {
148
- prev.value += tok.value;
149
- prev.output = (prev.output || "") + tok.value;
150
- return;
151
- }
152
- tok.prev = prev;
153
- tokens.push(tok);
154
- prev = tok;
155
- };
156
- const extglobOpen = (type, value2) => {
157
- const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" };
158
- token.prev = prev;
159
- token.parens = state.parens;
160
- token.output = state.output;
161
- const output = (opts.capture ? "(" : "") + token.open;
162
- increment("parens");
163
- push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
164
- push({ type: "paren", extglob: true, value: advance(), output });
165
- extglobs.push(token);
166
- };
167
- const extglobClose = (token) => {
168
- let output = token.close + (opts.capture ? ")" : "");
169
- let rest;
170
- if (token.type === "negate") {
171
- let extglobStar = star;
172
- if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
173
- extglobStar = globstar(opts);
174
- }
175
- if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
176
- output = token.close = `)$))${extglobStar}`;
177
- }
178
- if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
179
- const expression = parse(rest, { ...options, fastpaths: false }).output;
180
- output = token.close = `)${expression})${extglobStar})`;
181
- }
182
- if (token.prev.type === "bos") {
183
- state.negatedExtglob = true;
184
- }
185
- }
186
- push({ type: "paren", extglob: true, value, output });
187
- decrement("parens");
188
- };
189
- if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
190
- let backslashes = false;
191
- let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
192
- if (first === "\\") {
193
- backslashes = true;
194
- return m;
125
+ return true;
126
+ };
127
+ const increment = (type) => {
128
+ state[type]++;
129
+ stack.push(type);
130
+ };
131
+ const decrement = (type) => {
132
+ state[type]--;
133
+ stack.pop();
134
+ };
135
+ const push = (tok) => {
136
+ if (prev.type === "globstar") {
137
+ const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
138
+ const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
139
+ if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
140
+ state.output = state.output.slice(0, -prev.output.length);
141
+ prev.type = "star";
142
+ prev.value = "*";
143
+ prev.output = star;
144
+ state.output += prev.output;
145
+ }
195
146
  }
196
- if (first === "?") {
197
- if (esc) {
198
- return esc + first + (rest ? QMARK.repeat(rest.length) : "");
147
+ if (extglobs.length && tok.type !== "paren") {
148
+ extglobs[extglobs.length - 1].inner += tok.value;
149
+ }
150
+ if (tok.value || tok.output) append(tok);
151
+ if (prev && prev.type === "text" && tok.type === "text") {
152
+ prev.value += tok.value;
153
+ prev.output = (prev.output || "") + tok.value;
154
+ return;
155
+ }
156
+ tok.prev = prev;
157
+ tokens.push(tok);
158
+ prev = tok;
159
+ };
160
+ const extglobOpen = (type, value2) => {
161
+ const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" };
162
+ token.prev = prev;
163
+ token.parens = state.parens;
164
+ token.output = state.output;
165
+ const output = (opts.capture ? "(" : "") + token.open;
166
+ increment("parens");
167
+ push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
168
+ push({ type: "paren", extglob: true, value: advance(), output });
169
+ extglobs.push(token);
170
+ };
171
+ const extglobClose = (token) => {
172
+ let output = token.close + (opts.capture ? ")" : "");
173
+ let rest;
174
+ if (token.type === "negate") {
175
+ let extglobStar = star;
176
+ if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
177
+ extglobStar = globstar(opts);
199
178
  }
200
- if (index === 0) {
201
- return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
179
+ if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
180
+ output = token.close = `)$))${extglobStar}`;
181
+ }
182
+ if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
183
+ const expression = parse(rest, { ...options, fastpaths: false }).output;
184
+ output = token.close = `)${expression})${extglobStar})`;
185
+ }
186
+ if (token.prev.type === "bos") {
187
+ state.negatedExtglob = true;
202
188
  }
203
- return QMARK.repeat(chars.length);
204
- }
205
- if (first === ".") {
206
- return DOT_LITERAL.repeat(chars.length);
207
189
  }
208
- if (first === "*") {
209
- if (esc) {
210
- return esc + first + (rest ? star : "");
190
+ push({ type: "paren", extglob: true, value, output });
191
+ decrement("parens");
192
+ };
193
+ if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
194
+ let backslashes = false;
195
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
196
+ if (first === "\\") {
197
+ backslashes = true;
198
+ return m;
199
+ }
200
+ if (first === "?") {
201
+ if (esc) {
202
+ return esc + first + (rest ? QMARK.repeat(rest.length) : "");
203
+ }
204
+ if (index === 0) {
205
+ return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
206
+ }
207
+ return QMARK.repeat(chars.length);
208
+ }
209
+ if (first === ".") {
210
+ return DOT_LITERAL.repeat(chars.length);
211
+ }
212
+ if (first === "*") {
213
+ if (esc) {
214
+ return esc + first + (rest ? star : "");
215
+ }
216
+ return star;
217
+ }
218
+ return esc ? m : `\\${m}`;
219
+ });
220
+ if (backslashes === true) {
221
+ if (opts.unescape === true) {
222
+ output = output.replace(/\\/g, "");
223
+ } else {
224
+ output = output.replace(/\\+/g, (m) => {
225
+ return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
226
+ });
211
227
  }
212
- return star;
213
228
  }
214
- return esc ? m : `\\${m}`;
215
- });
216
- if (backslashes === true) {
217
- if (opts.unescape === true) {
218
- output = output.replace(/\\/g, "");
219
- } else {
220
- output = output.replace(/\\+/g, (m) => {
221
- return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
222
- });
229
+ if (output === input && opts.contains === true) {
230
+ state.output = input;
231
+ return state;
223
232
  }
224
- }
225
- if (output === input && opts.contains === true) {
226
- state.output = input;
233
+ state.output = utils.wrapOutput(output, state, options);
227
234
  return state;
228
235
  }
229
- state.output = utils.wrapOutput(output, state, options);
230
- return state;
231
- }
232
- while (!eos()) {
233
- value = advance();
234
- if (value === "\0") {
235
- continue;
236
- }
237
- if (value === "\\") {
238
- const next = peek();
239
- if (next === "/" && opts.bash !== true) {
240
- continue;
241
- }
242
- if (next === "." || next === ";") {
236
+ while (!eos()) {
237
+ value = advance();
238
+ if (value === "\0") {
243
239
  continue;
244
240
  }
245
- if (!next) {
246
- value += "\\";
247
- push({ type: "text", value });
248
- continue;
249
- }
250
- const match = /^\\+/.exec(remaining());
251
- let slashes = 0;
252
- if (match && match[0].length > 2) {
253
- slashes = match[0].length;
254
- state.index += slashes;
255
- if (slashes % 2 !== 0) {
241
+ if (value === "\\") {
242
+ const next = peek();
243
+ if (next === "/" && opts.bash !== true) {
244
+ continue;
245
+ }
246
+ if (next === "." || next === ";") {
247
+ continue;
248
+ }
249
+ if (!next) {
256
250
  value += "\\";
251
+ push({ type: "text", value });
252
+ continue;
253
+ }
254
+ const match = /^\\+/.exec(remaining());
255
+ let slashes = 0;
256
+ if (match && match[0].length > 2) {
257
+ slashes = match[0].length;
258
+ state.index += slashes;
259
+ if (slashes % 2 !== 0) {
260
+ value += "\\";
261
+ }
262
+ }
263
+ if (opts.unescape === true) {
264
+ value = advance();
265
+ } else {
266
+ value += advance();
267
+ }
268
+ if (state.brackets === 0) {
269
+ push({ type: "text", value });
270
+ continue;
257
271
  }
258
272
  }
259
- if (opts.unescape === true) {
260
- value = advance();
261
- } else {
262
- value += advance();
263
- }
264
- if (state.brackets === 0) {
265
- push({ type: "text", value });
266
- continue;
267
- }
268
- }
269
- if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
270
- if (opts.posix !== false && value === ":") {
271
- const inner = prev.value.slice(1);
272
- if (inner.includes("[")) {
273
- prev.posix = true;
274
- if (inner.includes(":")) {
275
- const idx = prev.value.lastIndexOf("[");
276
- const pre = prev.value.slice(0, idx);
277
- const rest2 = prev.value.slice(idx + 2);
278
- const posix = POSIX_REGEX_SOURCE[rest2];
279
- if (posix) {
280
- prev.value = pre + posix;
281
- state.backtrack = true;
282
- advance();
283
- if (!bos.output && tokens.indexOf(prev) === 1) {
284
- bos.output = ONE_CHAR;
273
+ if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
274
+ if (opts.posix !== false && value === ":") {
275
+ const inner = prev.value.slice(1);
276
+ if (inner.includes("[")) {
277
+ prev.posix = true;
278
+ if (inner.includes(":")) {
279
+ const idx = prev.value.lastIndexOf("[");
280
+ const pre = prev.value.slice(0, idx);
281
+ const rest2 = prev.value.slice(idx + 2);
282
+ const posix = POSIX_REGEX_SOURCE[rest2];
283
+ if (posix) {
284
+ prev.value = pre + posix;
285
+ state.backtrack = true;
286
+ advance();
287
+ if (!bos.output && tokens.indexOf(prev) === 1) {
288
+ bos.output = ONE_CHAR;
289
+ }
290
+ continue;
285
291
  }
286
- continue;
287
292
  }
288
293
  }
289
294
  }
295
+ if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
296
+ value = `\\${value}`;
297
+ }
298
+ if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
299
+ value = `\\${value}`;
300
+ }
301
+ if (opts.posix === true && value === "!" && prev.value === "[") {
302
+ value = "^";
303
+ }
304
+ prev.value += value;
305
+ append({ value });
306
+ continue;
290
307
  }
291
- if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
292
- value = `\\${value}`;
293
- }
294
- if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
295
- value = `\\${value}`;
296
- }
297
- if (opts.posix === true && value === "!" && prev.value === "[") {
298
- value = "^";
299
- }
300
- prev.value += value;
301
- append({ value });
302
- continue;
303
- }
304
- if (state.quotes === 1 && value !== '"') {
305
- value = utils.escapeRegex(value);
306
- prev.value += value;
307
- append({ value });
308
- continue;
309
- }
310
- if (value === '"') {
311
- state.quotes = state.quotes === 1 ? 0 : 1;
312
- if (opts.keepQuotes === true) {
313
- push({ type: "text", value });
314
- }
315
- continue;
316
- }
317
- if (value === "(") {
318
- increment("parens");
319
- push({ type: "paren", value });
320
- continue;
321
- }
322
- if (value === ")") {
323
- if (state.parens === 0 && opts.strictBrackets === true) {
324
- throw new SyntaxError(syntaxError("opening", "("));
325
- }
326
- const extglob = extglobs[extglobs.length - 1];
327
- if (extglob && state.parens === extglob.parens + 1) {
328
- extglobClose(extglobs.pop());
308
+ if (state.quotes === 1 && value !== '"') {
309
+ value = utils.escapeRegex(value);
310
+ prev.value += value;
311
+ append({ value });
329
312
  continue;
330
313
  }
331
- push({ type: "paren", value, output: state.parens ? ")" : "\\)" });
332
- decrement("parens");
333
- continue;
334
- }
335
- if (value === "[") {
336
- if (opts.nobracket === true || !remaining().includes("]")) {
337
- if (opts.nobracket !== true && opts.strictBrackets === true) {
338
- throw new SyntaxError(syntaxError("closing", "]"));
314
+ if (value === '"') {
315
+ state.quotes = state.quotes === 1 ? 0 : 1;
316
+ if (opts.keepQuotes === true) {
317
+ push({ type: "text", value });
339
318
  }
340
- value = `\\${value}`;
341
- } else {
342
- increment("brackets");
319
+ continue;
343
320
  }
344
- push({ type: "bracket", value });
345
- continue;
346
- }
347
- if (value === "]") {
348
- if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
349
- push({ type: "text", value, output: `\\${value}` });
321
+ if (value === "(") {
322
+ increment("parens");
323
+ push({ type: "paren", value });
350
324
  continue;
351
325
  }
352
- if (state.brackets === 0) {
353
- if (opts.strictBrackets === true) {
354
- throw new SyntaxError(syntaxError("opening", "["));
326
+ if (value === ")") {
327
+ if (state.parens === 0 && opts.strictBrackets === true) {
328
+ throw new SyntaxError(syntaxError("opening", "("));
329
+ }
330
+ const extglob = extglobs[extglobs.length - 1];
331
+ if (extglob && state.parens === extglob.parens + 1) {
332
+ extglobClose(extglobs.pop());
333
+ continue;
355
334
  }
356
- push({ type: "text", value, output: `\\${value}` });
335
+ push({ type: "paren", value, output: state.parens ? ")" : "\\)" });
336
+ decrement("parens");
357
337
  continue;
358
338
  }
359
- decrement("brackets");
360
- const prevValue = prev.value.slice(1);
361
- if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
362
- value = `/${value}`;
363
- }
364
- prev.value += value;
365
- append({ value });
366
- if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
339
+ if (value === "[") {
340
+ if (opts.nobracket === true || !remaining().includes("]")) {
341
+ if (opts.nobracket !== true && opts.strictBrackets === true) {
342
+ throw new SyntaxError(syntaxError("closing", "]"));
343
+ }
344
+ value = `\\${value}`;
345
+ } else {
346
+ increment("brackets");
347
+ }
348
+ push({ type: "bracket", value });
367
349
  continue;
368
350
  }
369
- const escaped = utils.escapeRegex(prev.value);
370
- state.output = state.output.slice(0, -prev.value.length);
371
- if (opts.literalBrackets === true) {
372
- state.output += escaped;
373
- prev.value = escaped;
351
+ if (value === "]") {
352
+ if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
353
+ push({ type: "text", value, output: `\\${value}` });
354
+ continue;
355
+ }
356
+ if (state.brackets === 0) {
357
+ if (opts.strictBrackets === true) {
358
+ throw new SyntaxError(syntaxError("opening", "["));
359
+ }
360
+ push({ type: "text", value, output: `\\${value}` });
361
+ continue;
362
+ }
363
+ decrement("brackets");
364
+ const prevValue = prev.value.slice(1);
365
+ if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
366
+ value = `/${value}`;
367
+ }
368
+ prev.value += value;
369
+ append({ value });
370
+ if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
371
+ continue;
372
+ }
373
+ const escaped = utils.escapeRegex(prev.value);
374
+ state.output = state.output.slice(0, -prev.value.length);
375
+ if (opts.literalBrackets === true) {
376
+ state.output += escaped;
377
+ prev.value = escaped;
378
+ continue;
379
+ }
380
+ prev.value = `(${capture}${escaped}|${prev.value})`;
381
+ state.output += prev.value;
374
382
  continue;
375
383
  }
376
- prev.value = `(${capture}${escaped}|${prev.value})`;
377
- state.output += prev.value;
378
- continue;
379
- }
380
- if (value === "{" && opts.nobrace !== true) {
381
- increment("braces");
382
- const open = {
383
- type: "brace",
384
- value,
385
- output: "(",
386
- outputIndex: state.output.length,
387
- tokensIndex: state.tokens.length
388
- };
389
- braces.push(open);
390
- push(open);
391
- continue;
392
- }
393
- if (value === "}") {
394
- const brace = braces[braces.length - 1];
395
- if (opts.nobrace === true || !brace) {
396
- push({ type: "text", value, output: value });
384
+ if (value === "{" && opts.nobrace !== true) {
385
+ increment("braces");
386
+ const open = {
387
+ type: "brace",
388
+ value,
389
+ output: "(",
390
+ outputIndex: state.output.length,
391
+ tokensIndex: state.tokens.length
392
+ };
393
+ braces.push(open);
394
+ push(open);
397
395
  continue;
398
396
  }
399
- let output = ")";
400
- if (brace.dots === true) {
401
- const arr = tokens.slice();
402
- const range = [];
403
- for (let i = arr.length - 1; i >= 0; i--) {
404
- tokens.pop();
405
- if (arr[i].type === "brace") {
406
- break;
397
+ if (value === "}") {
398
+ const brace = braces[braces.length - 1];
399
+ if (opts.nobrace === true || !brace) {
400
+ push({ type: "text", value, output: value });
401
+ continue;
402
+ }
403
+ let output = ")";
404
+ if (brace.dots === true) {
405
+ const arr = tokens.slice();
406
+ const range = [];
407
+ for (let i = arr.length - 1; i >= 0; i--) {
408
+ tokens.pop();
409
+ if (arr[i].type === "brace") {
410
+ break;
411
+ }
412
+ if (arr[i].type !== "dots") {
413
+ range.unshift(arr[i].value);
414
+ }
407
415
  }
408
- if (arr[i].type !== "dots") {
409
- range.unshift(arr[i].value);
416
+ output = expandRange(range, opts);
417
+ state.backtrack = true;
418
+ }
419
+ if (brace.comma !== true && brace.dots !== true) {
420
+ const out = state.output.slice(0, brace.outputIndex);
421
+ const toks = state.tokens.slice(brace.tokensIndex);
422
+ brace.value = brace.output = "\\{";
423
+ value = output = "\\}";
424
+ state.output = out;
425
+ for (const t of toks) {
426
+ state.output += t.output || t.value;
410
427
  }
411
428
  }
412
- output = expandRange(range, opts);
413
- state.backtrack = true;
429
+ push({ type: "brace", value, output });
430
+ decrement("braces");
431
+ braces.pop();
432
+ continue;
414
433
  }
415
- if (brace.comma !== true && brace.dots !== true) {
416
- const out = state.output.slice(0, brace.outputIndex);
417
- const toks = state.tokens.slice(brace.tokensIndex);
418
- brace.value = brace.output = "\\{";
419
- value = output = "\\}";
420
- state.output = out;
421
- for (const t of toks) {
422
- state.output += t.output || t.value;
434
+ if (value === "|") {
435
+ if (extglobs.length > 0) {
436
+ extglobs[extglobs.length - 1].conditions++;
423
437
  }
424
- }
425
- push({ type: "brace", value, output });
426
- decrement("braces");
427
- braces.pop();
428
- continue;
429
- }
430
- if (value === "|") {
431
- if (extglobs.length > 0) {
432
- extglobs[extglobs.length - 1].conditions++;
433
- }
434
- push({ type: "text", value });
435
- continue;
436
- }
437
- if (value === ",") {
438
- let output = value;
439
- const brace = braces[braces.length - 1];
440
- if (brace && stack[stack.length - 1] === "braces") {
441
- brace.comma = true;
442
- output = "|";
443
- }
444
- push({ type: "comma", value, output });
445
- continue;
446
- }
447
- if (value === "/") {
448
- if (prev.type === "dot" && state.index === state.start + 1) {
449
- state.start = state.index + 1;
450
- state.consumed = "";
451
- state.output = "";
452
- tokens.pop();
453
- prev = bos;
438
+ push({ type: "text", value });
454
439
  continue;
455
440
  }
456
- push({ type: "slash", value, output: SLASH_LITERAL });
457
- continue;
458
- }
459
- if (value === ".") {
460
- if (state.braces > 0 && prev.type === "dot") {
461
- if (prev.value === ".") prev.output = DOT_LITERAL;
441
+ if (value === ",") {
442
+ let output = value;
462
443
  const brace = braces[braces.length - 1];
463
- prev.type = "dots";
464
- prev.output += value;
465
- prev.value += value;
466
- brace.dots = true;
467
- continue;
468
- }
469
- if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
470
- push({ type: "text", value, output: DOT_LITERAL });
444
+ if (brace && stack[stack.length - 1] === "braces") {
445
+ brace.comma = true;
446
+ output = "|";
447
+ }
448
+ push({ type: "comma", value, output });
471
449
  continue;
472
450
  }
473
- push({ type: "dot", value, output: DOT_LITERAL });
474
- continue;
475
- }
476
- if (value === "?") {
477
- const isGroup = prev && prev.value === "(";
478
- if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
479
- extglobOpen("qmark", value);
451
+ if (value === "/") {
452
+ if (prev.type === "dot" && state.index === state.start + 1) {
453
+ state.start = state.index + 1;
454
+ state.consumed = "";
455
+ state.output = "";
456
+ tokens.pop();
457
+ prev = bos;
458
+ continue;
459
+ }
460
+ push({ type: "slash", value, output: SLASH_LITERAL });
480
461
  continue;
481
462
  }
482
- if (prev && prev.type === "paren") {
483
- const next = peek();
484
- let output = value;
485
- if (next === "<" && !utils.supportsLookbehinds()) {
486
- throw new Error("Node.js v10 or higher is required for regex lookbehinds");
463
+ if (value === ".") {
464
+ if (state.braces > 0 && prev.type === "dot") {
465
+ if (prev.value === ".") prev.output = DOT_LITERAL;
466
+ const brace = braces[braces.length - 1];
467
+ prev.type = "dots";
468
+ prev.output += value;
469
+ prev.value += value;
470
+ brace.dots = true;
471
+ continue;
487
472
  }
488
- if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
489
- output = `\\${value}`;
473
+ if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
474
+ push({ type: "text", value, output: DOT_LITERAL });
475
+ continue;
490
476
  }
491
- push({ type: "text", value, output });
477
+ push({ type: "dot", value, output: DOT_LITERAL });
492
478
  continue;
493
479
  }
494
- if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
495
- push({ type: "qmark", value, output: QMARK_NO_DOT });
496
- continue;
497
- }
498
- push({ type: "qmark", value, output: QMARK });
499
- continue;
500
- }
501
- if (value === "!") {
502
- if (opts.noextglob !== true && peek() === "(") {
503
- if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
504
- extglobOpen("negate", value);
480
+ if (value === "?") {
481
+ const isGroup = prev && prev.value === "(";
482
+ if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
483
+ extglobOpen("qmark", value);
505
484
  continue;
506
485
  }
507
- }
508
- if (opts.nonegate !== true && state.index === 0) {
509
- negate();
486
+ if (prev && prev.type === "paren") {
487
+ const next = peek();
488
+ let output = value;
489
+ if (next === "<" && !utils.supportsLookbehinds()) {
490
+ throw new Error("Node.js v10 or higher is required for regex lookbehinds");
491
+ }
492
+ if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
493
+ output = `\\${value}`;
494
+ }
495
+ push({ type: "text", value, output });
496
+ continue;
497
+ }
498
+ if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
499
+ push({ type: "qmark", value, output: QMARK_NO_DOT });
500
+ continue;
501
+ }
502
+ push({ type: "qmark", value, output: QMARK });
510
503
  continue;
511
504
  }
512
- }
513
- if (value === "+") {
514
- if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
515
- extglobOpen("plus", value);
516
- continue;
505
+ if (value === "!") {
506
+ if (opts.noextglob !== true && peek() === "(") {
507
+ if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
508
+ extglobOpen("negate", value);
509
+ continue;
510
+ }
511
+ }
512
+ if (opts.nonegate !== true && state.index === 0) {
513
+ negate();
514
+ continue;
515
+ }
517
516
  }
518
- if (prev && prev.value === "(" || opts.regex === false) {
519
- push({ type: "plus", value, output: PLUS_LITERAL });
517
+ if (value === "+") {
518
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
519
+ extglobOpen("plus", value);
520
+ continue;
521
+ }
522
+ if (prev && prev.value === "(" || opts.regex === false) {
523
+ push({ type: "plus", value, output: PLUS_LITERAL });
524
+ continue;
525
+ }
526
+ if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
527
+ push({ type: "plus", value });
528
+ continue;
529
+ }
530
+ push({ type: "plus", value: PLUS_LITERAL });
520
531
  continue;
521
532
  }
522
- if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
523
- push({ type: "plus", value });
533
+ if (value === "@") {
534
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
535
+ push({ type: "at", extglob: true, value, output: "" });
536
+ continue;
537
+ }
538
+ push({ type: "text", value });
524
539
  continue;
525
540
  }
526
- push({ type: "plus", value: PLUS_LITERAL });
527
- continue;
528
- }
529
- if (value === "@") {
530
- if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
531
- push({ type: "at", extglob: true, value, output: "" });
541
+ if (value !== "*") {
542
+ if (value === "$" || value === "^") {
543
+ value = `\\${value}`;
544
+ }
545
+ const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
546
+ if (match) {
547
+ value += match[0];
548
+ state.index += match[0].length;
549
+ }
550
+ push({ type: "text", value });
532
551
  continue;
533
552
  }
534
- push({ type: "text", value });
535
- continue;
536
- }
537
- if (value !== "*") {
538
- if (value === "$" || value === "^") {
539
- value = `\\${value}`;
540
- }
541
- const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
542
- if (match) {
543
- value += match[0];
544
- state.index += match[0].length;
545
- }
546
- push({ type: "text", value });
547
- continue;
548
- }
549
- if (prev && (prev.type === "globstar" || prev.star === true)) {
550
- prev.type = "star";
551
- prev.star = true;
552
- prev.value += value;
553
- prev.output = star;
554
- state.backtrack = true;
555
- state.globstar = true;
556
- consume(value);
557
- continue;
558
- }
559
- let rest = remaining();
560
- if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
561
- extglobOpen("star", value);
562
- continue;
563
- }
564
- if (prev.type === "star") {
565
- if (opts.noglobstar === true) {
553
+ if (prev && (prev.type === "globstar" || prev.star === true)) {
554
+ prev.type = "star";
555
+ prev.star = true;
556
+ prev.value += value;
557
+ prev.output = star;
558
+ state.backtrack = true;
559
+ state.globstar = true;
566
560
  consume(value);
567
561
  continue;
568
562
  }
569
- const prior = prev.prev;
570
- const before = prior.prev;
571
- const isStart = prior.type === "slash" || prior.type === "bos";
572
- const afterStar = before && (before.type === "star" || before.type === "globstar");
573
- if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
574
- push({ type: "star", value, output: "" });
575
- continue;
576
- }
577
- const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
578
- const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
579
- if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
580
- push({ type: "star", value, output: "" });
563
+ let rest = remaining();
564
+ if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
565
+ extglobOpen("star", value);
581
566
  continue;
582
567
  }
583
- while (rest.slice(0, 3) === "/**") {
584
- const after = input[state.index + 4];
585
- if (after && after !== "/") {
586
- break;
568
+ if (prev.type === "star") {
569
+ if (opts.noglobstar === true) {
570
+ consume(value);
571
+ continue;
587
572
  }
588
- rest = rest.slice(3);
589
- consume("/**", 3);
590
- }
591
- if (prior.type === "bos" && eos()) {
573
+ const prior = prev.prev;
574
+ const before = prior.prev;
575
+ const isStart = prior.type === "slash" || prior.type === "bos";
576
+ const afterStar = before && (before.type === "star" || before.type === "globstar");
577
+ if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
578
+ push({ type: "star", value, output: "" });
579
+ continue;
580
+ }
581
+ const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
582
+ const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
583
+ if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
584
+ push({ type: "star", value, output: "" });
585
+ continue;
586
+ }
587
+ while (rest.slice(0, 3) === "/**") {
588
+ const after = input[state.index + 4];
589
+ if (after && after !== "/") {
590
+ break;
591
+ }
592
+ rest = rest.slice(3);
593
+ consume("/**", 3);
594
+ }
595
+ if (prior.type === "bos" && eos()) {
596
+ prev.type = "globstar";
597
+ prev.value += value;
598
+ prev.output = globstar(opts);
599
+ state.output = prev.output;
600
+ state.globstar = true;
601
+ consume(value);
602
+ continue;
603
+ }
604
+ if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
605
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
606
+ prior.output = `(?:${prior.output}`;
607
+ prev.type = "globstar";
608
+ prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
609
+ prev.value += value;
610
+ state.globstar = true;
611
+ state.output += prior.output + prev.output;
612
+ consume(value);
613
+ continue;
614
+ }
615
+ if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
616
+ const end = rest[1] !== void 0 ? "|$" : "";
617
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
618
+ prior.output = `(?:${prior.output}`;
619
+ prev.type = "globstar";
620
+ prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
621
+ prev.value += value;
622
+ state.output += prior.output + prev.output;
623
+ state.globstar = true;
624
+ consume(value + advance());
625
+ push({ type: "slash", value: "/", output: "" });
626
+ continue;
627
+ }
628
+ if (prior.type === "bos" && rest[0] === "/") {
629
+ prev.type = "globstar";
630
+ prev.value += value;
631
+ prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
632
+ state.output = prev.output;
633
+ state.globstar = true;
634
+ consume(value + advance());
635
+ push({ type: "slash", value: "/", output: "" });
636
+ continue;
637
+ }
638
+ state.output = state.output.slice(0, -prev.output.length);
592
639
  prev.type = "globstar";
593
- prev.value += value;
594
640
  prev.output = globstar(opts);
595
- state.output = prev.output;
596
- state.globstar = true;
597
- consume(value);
598
- continue;
599
- }
600
- if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
601
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
602
- prior.output = `(?:${prior.output}`;
603
- prev.type = "globstar";
604
- prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
605
641
  prev.value += value;
642
+ state.output += prev.output;
606
643
  state.globstar = true;
607
- state.output += prior.output + prev.output;
608
644
  consume(value);
609
645
  continue;
610
646
  }
611
- if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
612
- const end = rest[1] !== void 0 ? "|$" : "";
613
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
614
- prior.output = `(?:${prior.output}`;
615
- prev.type = "globstar";
616
- prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
617
- prev.value += value;
618
- state.output += prior.output + prev.output;
619
- state.globstar = true;
620
- consume(value + advance());
621
- push({ type: "slash", value: "/", output: "" });
647
+ const token = { type: "star", value, output: star };
648
+ if (opts.bash === true) {
649
+ token.output = ".*?";
650
+ if (prev.type === "bos" || prev.type === "slash") {
651
+ token.output = nodot + token.output;
652
+ }
653
+ push(token);
622
654
  continue;
623
655
  }
624
- if (prior.type === "bos" && rest[0] === "/") {
625
- prev.type = "globstar";
626
- prev.value += value;
627
- prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
628
- state.output = prev.output;
629
- state.globstar = true;
630
- consume(value + advance());
631
- push({ type: "slash", value: "/", output: "" });
656
+ if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
657
+ token.output = value;
658
+ push(token);
632
659
  continue;
633
660
  }
634
- state.output = state.output.slice(0, -prev.output.length);
635
- prev.type = "globstar";
636
- prev.output = globstar(opts);
637
- prev.value += value;
638
- state.output += prev.output;
639
- state.globstar = true;
640
- consume(value);
641
- continue;
642
- }
643
- const token = { type: "star", value, output: star };
644
- if (opts.bash === true) {
645
- token.output = ".*?";
646
- if (prev.type === "bos" || prev.type === "slash") {
647
- token.output = nodot + token.output;
661
+ if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
662
+ if (prev.type === "dot") {
663
+ state.output += NO_DOT_SLASH;
664
+ prev.output += NO_DOT_SLASH;
665
+ } else if (opts.dot === true) {
666
+ state.output += NO_DOTS_SLASH;
667
+ prev.output += NO_DOTS_SLASH;
668
+ } else {
669
+ state.output += nodot;
670
+ prev.output += nodot;
671
+ }
672
+ if (peek() !== "*") {
673
+ state.output += ONE_CHAR;
674
+ prev.output += ONE_CHAR;
675
+ }
648
676
  }
649
677
  push(token);
650
- continue;
651
678
  }
652
- if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
653
- token.output = value;
654
- push(token);
655
- continue;
679
+ while (state.brackets > 0) {
680
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
681
+ state.output = utils.escapeLast(state.output, "[");
682
+ decrement("brackets");
656
683
  }
657
- if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
658
- if (prev.type === "dot") {
659
- state.output += NO_DOT_SLASH;
660
- prev.output += NO_DOT_SLASH;
661
- } else if (opts.dot === true) {
662
- state.output += NO_DOTS_SLASH;
663
- prev.output += NO_DOTS_SLASH;
664
- } else {
665
- state.output += nodot;
666
- prev.output += nodot;
667
- }
668
- if (peek() !== "*") {
669
- state.output += ONE_CHAR;
670
- prev.output += ONE_CHAR;
671
- }
684
+ while (state.parens > 0) {
685
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
686
+ state.output = utils.escapeLast(state.output, "(");
687
+ decrement("parens");
672
688
  }
673
- push(token);
674
- }
675
- while (state.brackets > 0) {
676
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
677
- state.output = utils.escapeLast(state.output, "[");
678
- decrement("brackets");
679
- }
680
- while (state.parens > 0) {
681
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
682
- state.output = utils.escapeLast(state.output, "(");
683
- decrement("parens");
684
- }
685
- while (state.braces > 0) {
686
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
687
- state.output = utils.escapeLast(state.output, "{");
688
- decrement("braces");
689
- }
690
- if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
691
- push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` });
692
- }
693
- if (state.backtrack === true) {
694
- state.output = "";
695
- for (const token of state.tokens) {
696
- state.output += token.output != null ? token.output : token.value;
697
- if (token.suffix) {
698
- state.output += token.suffix;
689
+ while (state.braces > 0) {
690
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
691
+ state.output = utils.escapeLast(state.output, "{");
692
+ decrement("braces");
693
+ }
694
+ if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
695
+ push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` });
696
+ }
697
+ if (state.backtrack === true) {
698
+ state.output = "";
699
+ for (const token of state.tokens) {
700
+ state.output += token.output != null ? token.output : token.value;
701
+ if (token.suffix) {
702
+ state.output += token.suffix;
703
+ }
699
704
  }
700
705
  }
701
- }
702
- return state;
703
- };
704
- parse.fastpaths = (input, options) => {
705
- const opts = { ...options };
706
- const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
707
- const len = input.length;
708
- if (len > max) {
709
- throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
710
- }
711
- input = REPLACEMENTS[input] || input;
712
- const win32 = utils.isWindows(options);
713
- const {
714
- DOT_LITERAL,
715
- SLASH_LITERAL,
716
- ONE_CHAR,
717
- DOTS_SLASH,
718
- NO_DOT,
719
- NO_DOTS,
720
- NO_DOTS_SLASH,
721
- STAR,
722
- START_ANCHOR
723
- } = constants.globChars(win32);
724
- const nodot = opts.dot ? NO_DOTS : NO_DOT;
725
- const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
726
- const capture = opts.capture ? "" : "?:";
727
- const state = { negated: false, prefix: "" };
728
- let star = opts.bash === true ? ".*?" : STAR;
729
- if (opts.capture) {
730
- star = `(${star})`;
731
- }
732
- const globstar = (opts2) => {
733
- if (opts2.noglobstar === true) return star;
734
- return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
706
+ return state;
735
707
  };
736
- const create = (str) => {
737
- switch (str) {
738
- case "*":
739
- return `${nodot}${ONE_CHAR}${star}`;
740
- case ".*":
741
- return `${DOT_LITERAL}${ONE_CHAR}${star}`;
742
- case "*.*":
743
- return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
744
- case "*/*":
745
- return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
746
- case "**":
747
- return nodot + globstar(opts);
748
- case "**/*":
749
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
750
- case "**/*.*":
751
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
752
- case "**/.*":
753
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
754
- default: {
755
- const match = /^(.*?)\.(\w+)$/.exec(str);
756
- if (!match) return;
757
- const source2 = create(match[1]);
758
- if (!source2) return;
759
- return source2 + DOT_LITERAL + match[2];
708
+ parse.fastpaths = (input, options) => {
709
+ const opts = { ...options };
710
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
711
+ const len = input.length;
712
+ if (len > max) {
713
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
714
+ }
715
+ input = REPLACEMENTS[input] || input;
716
+ const win32 = utils.isWindows(options);
717
+ const {
718
+ DOT_LITERAL,
719
+ SLASH_LITERAL,
720
+ ONE_CHAR,
721
+ DOTS_SLASH,
722
+ NO_DOT,
723
+ NO_DOTS,
724
+ NO_DOTS_SLASH,
725
+ STAR,
726
+ START_ANCHOR
727
+ } = constants.globChars(win32);
728
+ const nodot = opts.dot ? NO_DOTS : NO_DOT;
729
+ const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
730
+ const capture = opts.capture ? "" : "?:";
731
+ const state = { negated: false, prefix: "" };
732
+ let star = opts.bash === true ? ".*?" : STAR;
733
+ if (opts.capture) {
734
+ star = `(${star})`;
735
+ }
736
+ const globstar = (opts2) => {
737
+ if (opts2.noglobstar === true) return star;
738
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
739
+ };
740
+ const create = (str) => {
741
+ switch (str) {
742
+ case "*":
743
+ return `${nodot}${ONE_CHAR}${star}`;
744
+ case ".*":
745
+ return `${DOT_LITERAL}${ONE_CHAR}${star}`;
746
+ case "*.*":
747
+ return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
748
+ case "*/*":
749
+ return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
750
+ case "**":
751
+ return nodot + globstar(opts);
752
+ case "**/*":
753
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
754
+ case "**/*.*":
755
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
756
+ case "**/.*":
757
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
758
+ default: {
759
+ const match = /^(.*?)\.(\w+)$/.exec(str);
760
+ if (!match) return;
761
+ const source2 = create(match[1]);
762
+ if (!source2) return;
763
+ return source2 + DOT_LITERAL + match[2];
764
+ }
760
765
  }
766
+ };
767
+ const output = utils.removePrefix(input, state);
768
+ let source = create(output);
769
+ if (source && opts.strictSlashes !== true) {
770
+ source += `${SLASH_LITERAL}?`;
761
771
  }
772
+ return source;
762
773
  };
763
- const output = utils.removePrefix(input, state);
764
- let source = create(output);
765
- if (source && opts.strictSlashes !== true) {
766
- source += `${SLASH_LITERAL}?`;
767
- }
768
- return source;
769
- };
770
- var parse_1 = parse;
774
+ parse_1 = parse;
775
+ return parse_1;
776
+ }
771
777
 
772
- export { parse_1 as p };
778
+ export { requireParse as __require };