@quilted/create 0.2.43 → 0.2.45

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 (476) 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/index7.mjs +2 -2
  13. package/build/esm/_virtual/index8.mjs +3 -0
  14. package/build/esm/_virtual/index9.mjs +3 -0
  15. package/build/esm/_virtual/minimatch.mjs +12 -0
  16. package/build/esm/app.mjs +2 -2
  17. package/build/esm/cli.mjs +1 -1
  18. package/build/esm/module.mjs +2 -2
  19. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.mjs +29 -21
  20. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.mjs +24 -18
  21. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.mjs +35 -32
  22. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.mjs +103 -101
  23. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.mjs +19 -13
  24. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.mjs +63 -61
  25. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.mjs +33 -27
  26. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.mjs +25 -19
  27. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.mjs +15 -10
  28. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.mjs +27 -19
  29. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.mjs +35 -32
  30. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.mjs +40 -34
  31. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.mjs +27 -21
  32. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.mjs +24 -17
  33. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.mjs +44 -42
  34. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.mjs +37 -30
  35. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.mjs +41 -34
  36. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.mjs +22 -15
  37. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.mjs +104 -99
  38. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.mjs +35 -29
  39. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.mjs +19 -12
  40. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.mjs +65 -60
  41. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.mjs +34 -27
  42. package/build/esm/node_modules/.pnpm/arg@5.0.2/node_modules/arg/index.mjs +116 -112
  43. package/build/esm/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.mjs +54 -47
  44. package/build/esm/node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.mjs +144 -137
  45. package/build/esm/node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.mjs +175 -0
  46. package/build/esm/node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.mjs +62 -0
  47. package/build/esm/node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.mjs +106 -0
  48. package/build/esm/node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.mjs +100 -0
  49. package/build/esm/node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.mjs +374 -0
  50. package/build/esm/node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.mjs +35 -0
  51. package/build/esm/node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.mjs +128 -0
  52. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.mjs +1 -3
  53. package/build/esm/node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.mjs +63 -63
  54. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/index.mjs +115 -0
  55. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/managers/tasks.mjs +120 -0
  56. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/async.mjs +36 -0
  57. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/deep.mjs +75 -0
  58. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/entry.mjs +101 -0
  59. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/error.mjs +27 -0
  60. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/matcher.mjs +57 -0
  61. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/partial.mjs +50 -0
  62. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.mjs +64 -0
  63. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/stream.mjs +44 -0
  64. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/sync.mjs +36 -0
  65. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/transformers/entry.mjs +40 -0
  66. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/async.mjs +48 -0
  67. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.mjs +47 -0
  68. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/stream.mjs +68 -0
  69. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/sync.mjs +56 -0
  70. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/settings.mjs +75 -0
  71. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.mjs +32 -0
  72. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/errno.mjs +18 -0
  73. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/fs.mjs +30 -0
  74. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/index.mjs +35 -0
  75. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.mjs +79 -0
  76. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.mjs +229 -0
  77. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/stream.mjs +29 -0
  78. package/build/esm/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/string.mjs +22 -0
  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.1.1/node_modules/fill-range/index.mjs +223 -0
  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 +53 -46
  83. package/build/esm/node_modules/.pnpm/{globby@13.1.1 → globby@13.2.2}/node_modules/globby/ignore.mjs +11 -5
  84. package/build/esm/node_modules/.pnpm/{globby@13.1.1 → globby@13.2.2}/node_modules/globby/index.mjs +6 -8
  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.8/node_modules/micromatch/index.mjs +479 -0
  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 → prettier@3.5.1}/node_modules/prettier/plugins/babel.mjs +2810 -3362
  101. package/build/esm/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/plugins/estree.mjs +6611 -0
  102. package/build/esm/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/plugins/typescript.mjs +22 -0
  103. package/build/esm/node_modules/.pnpm/{prettier@3.0.0 → prettier@3.5.1}/node_modules/prettier/plugins/yaml.mjs +1259 -1271
  104. package/build/esm/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/standalone.mjs +3878 -0
  105. package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/date.mjs +0 -1
  106. package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.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/elements/date.mjs +0 -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.7.0/node_modules/yaml/browser/dist/compose/compose-collection.mjs +67 -0
  115. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/compose-doc.mjs +3 -0
  116. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/compose-node.mjs +13 -3
  117. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/compose-scalar.mjs +8 -4
  118. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/composer.mjs +1 -1
  119. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-block-map.mjs +12 -5
  120. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-block-scalar.mjs +6 -2
  121. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-block-seq.mjs +10 -7
  122. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-flow-collection.mjs +11 -3
  123. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.mjs +14 -1
  124. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-props.mjs +20 -7
  125. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-map-includes.mjs +2 -2
  126. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/Document.mjs +13 -10
  127. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/anchors.mjs +1 -1
  128. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/applyReviver.mjs +1 -0
  129. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/createNode.mjs +4 -4
  130. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/directives.mjs +10 -3
  131. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/errors.mjs +1 -1
  132. package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/log.mjs +7 -0
  133. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Alias.mjs +9 -2
  134. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Collection.mjs +2 -2
  135. package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/nodes/Node.mjs +44 -0
  136. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Pair.mjs +1 -1
  137. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Scalar.mjs +2 -1
  138. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/YAMLMap.mjs +28 -4
  139. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/YAMLSeq.mjs +22 -4
  140. package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/nodes/addPairToJSMap.mjs +53 -0
  141. package/build/esm/node_modules/.pnpm/{yaml@2.1.1/node_modules/yaml/browser/dist/nodes/Node.mjs → yaml@2.7.0/node_modules/yaml/browser/dist/nodes/identity.mjs} +1 -14
  142. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/toJS.mjs +1 -1
  143. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/cst.mjs +1 -0
  144. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/lexer.mjs +34 -21
  145. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/parser.mjs +16 -9
  146. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/public-api.mjs +2 -0
  147. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/Schema.mjs +2 -3
  148. package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/common/map.mjs +16 -0
  149. package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/common/seq.mjs +16 -0
  150. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/float.mjs +1 -1
  151. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/json/schema.mjs +1 -1
  152. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/tags.mjs +23 -12
  153. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.mjs +3 -6
  154. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.mjs +1 -1
  155. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/float.mjs +1 -1
  156. package/build/esm/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.mjs +48 -0
  157. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.mjs +9 -8
  158. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.mjs +5 -3
  159. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.mjs +2 -1
  160. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/set.mjs +14 -13
  161. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.mjs +2 -4
  162. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/foldFlowLines.mjs +19 -10
  163. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringify.mjs +8 -2
  164. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyCollection.mjs +9 -17
  165. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyDocument.mjs +1 -1
  166. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyPair.mjs +40 -17
  167. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyString.mjs +41 -21
  168. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/visit.mjs +1 -1
  169. package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/index.mjs +2 -1
  170. package/build/esm/package.mjs +3 -3
  171. package/build/esm/packages/cli-kit/build/esnext/prompt.esnext.mjs +1 -1
  172. package/build/esm/server.mjs +5 -9
  173. package/build/esm/shared/package-manager.mjs +2 -3
  174. package/build/esm/shared/prompts.mjs +1 -1
  175. package/build/esm/shared.mjs +1 -3
  176. package/build/esnext/_virtual/index.esnext +6 -2
  177. package/build/esnext/_virtual/index10.esnext +3 -0
  178. package/build/esnext/_virtual/index11.esnext +3 -0
  179. package/build/esnext/_virtual/index12.esnext +3 -0
  180. package/build/esnext/_virtual/index13.esnext +3 -0
  181. package/build/esnext/_virtual/index2.esnext +2 -2
  182. package/build/esnext/_virtual/index3.esnext +6 -2
  183. package/build/esnext/_virtual/index4.esnext +6 -2
  184. package/build/esnext/_virtual/index5.esnext +6 -2
  185. package/build/esnext/_virtual/index6.esnext +6 -2
  186. package/build/esnext/_virtual/index8.esnext +3 -0
  187. package/build/esnext/_virtual/index9.esnext +3 -0
  188. package/build/esnext/_virtual/minimatch.esnext +12 -0
  189. package/build/esnext/app.esnext +2 -2
  190. package/build/esnext/module.esnext +2 -2
  191. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.esnext +27 -19
  192. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.esnext +19 -13
  193. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.esnext +33 -30
  194. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.esnext +99 -97
  195. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.esnext +14 -8
  196. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.esnext +59 -57
  197. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.esnext +31 -25
  198. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.esnext +23 -17
  199. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.esnext +13 -8
  200. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.esnext +25 -17
  201. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.esnext +33 -30
  202. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.esnext +37 -31
  203. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.esnext +24 -18
  204. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.esnext +22 -15
  205. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.esnext +42 -40
  206. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.esnext +35 -28
  207. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.esnext +40 -33
  208. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.esnext +20 -13
  209. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.esnext +98 -93
  210. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.esnext +30 -24
  211. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.esnext +17 -10
  212. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.esnext +59 -54
  213. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.esnext +32 -25
  214. package/build/esnext/node_modules/.pnpm/arg@5.0.2/node_modules/arg/index.esnext +132 -128
  215. package/build/esnext/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.esnext +54 -47
  216. package/build/esnext/node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.esnext +137 -130
  217. package/build/esnext/node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.esnext +70 -0
  218. package/build/esnext/node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.esnext +57 -0
  219. package/build/esnext/node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.esnext +103 -0
  220. package/build/esnext/node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.esnext +100 -0
  221. package/build/esnext/node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.esnext +243 -0
  222. package/build/esnext/node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.esnext +35 -0
  223. package/build/esnext/node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.esnext +87 -0
  224. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.esnext +1 -3
  225. package/build/esnext/node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.esnext +63 -61
  226. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/index.esnext +108 -0
  227. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/managers/tasks.esnext +100 -0
  228. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/async.esnext +34 -0
  229. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/deep.esnext +70 -0
  230. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/entry.esnext +92 -0
  231. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/error.esnext +25 -0
  232. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/matcher.esnext +55 -0
  233. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/partial.esnext +41 -0
  234. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.esnext +62 -0
  235. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/stream.esnext +40 -0
  236. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/sync.esnext +34 -0
  237. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/transformers/entry.esnext +36 -0
  238. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/async.esnext +45 -0
  239. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.esnext +45 -0
  240. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/stream.esnext +64 -0
  241. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/sync.esnext +54 -0
  242. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/settings.esnext +67 -0
  243. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.esnext +30 -0
  244. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/errno.esnext +16 -0
  245. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/fs.esnext +28 -0
  246. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/index.esnext +33 -0
  247. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.esnext +58 -0
  248. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.esnext +171 -0
  249. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/stream.esnext +27 -0
  250. package/build/esnext/node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/string.esnext +20 -0
  251. package/build/esnext/node_modules/.pnpm/fastq@1.13.0/node_modules/fastq/queue.esnext +220 -215
  252. package/build/esnext/node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.esnext +199 -0
  253. package/build/esnext/node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.esnext +1 -6
  254. package/build/esnext/node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.esnext +32 -25
  255. package/build/esnext/node_modules/.pnpm/{globby@13.1.1 → globby@13.2.2}/node_modules/globby/ignore.esnext +8 -6
  256. package/build/esnext/node_modules/.pnpm/{globby@13.1.1 → globby@13.2.2}/node_modules/globby/index.esnext +6 -6
  257. package/build/esnext/node_modules/.pnpm/ignore@5.2.4/node_modules/ignore/index.esnext +357 -353
  258. package/build/esnext/node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.esnext +18 -11
  259. package/build/esnext/node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.esnext +111 -104
  260. package/build/esnext/node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.esnext +17 -10
  261. package/build/esnext/node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.esnext +103 -96
  262. package/build/esnext/node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.esnext +168 -0
  263. package/build/esnext/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/lib/path.esnext +10 -3
  264. package/build/esnext/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/minimatch.esnext +495 -491
  265. package/build/esnext/node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.esnext +38 -32
  266. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.esnext +10 -3
  267. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.esnext +198 -191
  268. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.esnext +683 -677
  269. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.esnext +137 -131
  270. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.esnext +279 -273
  271. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.esnext +65 -57
  272. package/build/esnext/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/plugins/babel.esnext +6956 -0
  273. package/build/esnext/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/plugins/estree.esnext +4320 -0
  274. package/build/esnext/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/plugins/typescript.esnext +12888 -0
  275. package/build/esnext/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/plugins/yaml.esnext +4156 -0
  276. package/build/esnext/node_modules/.pnpm/prettier@3.5.1/node_modules/prettier/standalone.esnext +2369 -0
  277. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.esnext +1 -1
  278. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/clear.esnext +1 -1
  279. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/index.esnext +16 -11
  280. package/build/esnext/node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.esnext +12 -5
  281. package/build/esnext/node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.esnext +29 -22
  282. package/build/esnext/node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.esnext +47 -40
  283. package/build/esnext/node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.esnext +196 -189
  284. package/build/esnext/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/compose/compose-collection.esnext +60 -0
  285. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/compose-doc.esnext +2 -0
  286. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/compose-node.esnext +11 -3
  287. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/compose-scalar.esnext +13 -5
  288. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/composer.esnext +1 -1
  289. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-block-map.esnext +13 -4
  290. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-block-scalar.esnext +8 -2
  291. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-block-seq.esnext +11 -6
  292. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-flow-collection.esnext +12 -3
  293. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.esnext +16 -1
  294. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-props.esnext +21 -9
  295. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-map-includes.esnext +2 -2
  296. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/Document.esnext +8 -13
  297. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/anchors.esnext +1 -1
  298. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/createNode.esnext +5 -3
  299. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/directives.esnext +10 -4
  300. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/errors.esnext +1 -1
  301. package/build/esnext/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/log.esnext +7 -0
  302. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Alias.esnext +8 -2
  303. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Collection.esnext +2 -2
  304. package/build/esnext/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/nodes/Node.esnext +36 -0
  305. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Pair.esnext +1 -1
  306. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/Scalar.esnext +2 -1
  307. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/YAMLMap.esnext +31 -4
  308. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/YAMLSeq.esnext +20 -4
  309. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/addPairToJSMap.esnext +8 -38
  310. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1/node_modules/yaml/browser/dist/nodes/Node.esnext → yaml@2.7.0/node_modules/yaml/browser/dist/nodes/identity.esnext} +1 -13
  311. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/nodes/toJS.esnext +1 -1
  312. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/cst.esnext +1 -0
  313. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/lexer.esnext +50 -33
  314. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/parser.esnext +16 -9
  315. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/public-api.esnext +3 -0
  316. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/Schema.esnext +2 -3
  317. package/build/esnext/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/common/map.esnext +17 -0
  318. package/build/esnext/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/common/seq.esnext +17 -0
  319. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/float.esnext +1 -1
  320. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/json/schema.esnext +1 -1
  321. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/tags.esnext +25 -14
  322. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.esnext +3 -6
  323. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.esnext +1 -1
  324. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/float.esnext +1 -1
  325. package/build/esnext/node_modules/.pnpm/yaml@2.7.0/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.esnext +50 -0
  326. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.esnext +9 -8
  327. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.esnext +5 -4
  328. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.esnext +2 -0
  329. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/set.esnext +14 -13
  330. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.esnext +2 -2
  331. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/foldFlowLines.esnext +20 -10
  332. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringify.esnext +9 -2
  333. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyCollection.esnext +20 -28
  334. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyDocument.esnext +1 -1
  335. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyPair.esnext +44 -23
  336. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyString.esnext +39 -21
  337. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/visit.esnext +1 -1
  338. package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/index.esnext +2 -1
  339. package/build/esnext/package.esnext +3 -3
  340. package/build/esnext/packages/cli-kit/build/esnext/prompt.esnext.esnext +1 -1
  341. package/build/esnext/server.esnext +5 -9
  342. package/build/esnext/shared/package-manager.esnext +2 -2
  343. package/build/esnext/shared/prompts.esnext +1 -1
  344. package/build/esnext/shared.esnext +5 -6
  345. package/build/tsconfig.tsbuildinfo +1 -1
  346. package/build/typescript/shared/package-manager.d.ts.map +1 -1
  347. package/build/typescript/shared.d.ts.map +1 -1
  348. package/package.json +8 -8
  349. package/source/shared/package-manager.ts +0 -1
  350. package/source/shared/prompts.ts +1 -1
  351. package/source/shared.ts +1 -2
  352. package/templates/app-basic/package.json +4 -4
  353. package/templates/app-empty/package.json +3 -3
  354. package/templates/app-graphql/package.json +4 -4
  355. package/templates/app-trpc/package.json +4 -4
  356. package/templates/package/package.json +3 -3
  357. package/templates/workspace/_nvmrc +1 -1
  358. package/templates/workspace/package.json +4 -4
  359. package/build/esm/_virtual/patterns.mjs +0 -3
  360. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.mjs +0 -168
  361. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.mjs +0 -54
  362. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.mjs +0 -99
  363. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.mjs +0 -94
  364. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.mjs +0 -367
  365. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.mjs +0 -29
  366. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.mjs +0 -114
  367. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/index.mjs +0 -86
  368. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/patterns.mjs +0 -26
  369. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/tasks.mjs +0 -85
  370. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/async.mjs +0 -30
  371. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/deep.mjs +0 -69
  372. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/entry.mjs +0 -69
  373. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/error.mjs +0 -20
  374. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/matcher.mjs +0 -55
  375. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/partial.mjs +0 -43
  376. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/provider.mjs +0 -60
  377. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/stream.mjs +0 -38
  378. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/sync.mjs +0 -30
  379. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/transformers/entry.mjs +0 -33
  380. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/async.mjs +0 -43
  381. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/reader.mjs +0 -41
  382. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/stream.mjs +0 -63
  383. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/sync.mjs +0 -51
  384. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/settings.mjs +0 -65
  385. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/array.mjs +0 -26
  386. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/errno.mjs +0 -12
  387. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/fs.mjs +0 -24
  388. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/index.mjs +0 -36
  389. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/path.mjs +0 -39
  390. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/pattern.mjs +0 -183
  391. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/stream.mjs +0 -23
  392. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/string.mjs +0 -16
  393. package/build/esm/node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.mjs +0 -216
  394. package/build/esm/node_modules/.pnpm/micromatch@4.0.5/node_modules/micromatch/index.mjs +0 -467
  395. package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/estree.mjs +0 -6188
  396. package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/typescript.mjs +0 -29
  397. package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/standalone.mjs +0 -4076
  398. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/compose-collection.mjs +0 -58
  399. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/log.mjs +0 -7
  400. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/addPairToJSMap.mjs +0 -83
  401. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/common/map.mjs +0 -37
  402. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/common/seq.mjs +0 -34
  403. package/build/esnext/_virtual/patterns.esnext +0 -3
  404. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.esnext +0 -63
  405. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.esnext +0 -50
  406. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.esnext +0 -96
  407. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.esnext +0 -94
  408. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.esnext +0 -236
  409. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.esnext +0 -29
  410. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.esnext +0 -73
  411. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/index.esnext +0 -79
  412. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/patterns.esnext +0 -15
  413. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/tasks.esnext +0 -83
  414. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/async.esnext +0 -28
  415. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/deep.esnext +0 -64
  416. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/entry.esnext +0 -64
  417. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/error.esnext +0 -18
  418. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/matcher.esnext +0 -49
  419. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/partial.esnext +0 -34
  420. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/provider.esnext +0 -58
  421. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/stream.esnext +0 -34
  422. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/sync.esnext +0 -28
  423. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/transformers/entry.esnext +0 -29
  424. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/async.esnext +0 -40
  425. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/reader.esnext +0 -39
  426. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/stream.esnext +0 -59
  427. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/sync.esnext +0 -49
  428. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/settings.esnext +0 -58
  429. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/array.esnext +0 -24
  430. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/errno.esnext +0 -10
  431. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/fs.esnext +0 -22
  432. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/index.esnext +0 -34
  433. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/path.esnext +0 -32
  434. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/pattern.esnext +0 -144
  435. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/stream.esnext +0 -21
  436. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/string.esnext +0 -14
  437. package/build/esnext/node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.esnext +0 -192
  438. package/build/esnext/node_modules/.pnpm/micromatch@4.0.5/node_modules/micromatch/index.esnext +0 -157
  439. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/babel.esnext +0 -18
  440. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/estree.esnext +0 -37
  441. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/typescript.esnext +0 -29
  442. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/yaml.esnext +0 -163
  443. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/standalone.esnext +0 -36
  444. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/compose-collection.esnext +0 -55
  445. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/log.esnext +0 -10
  446. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/common/map.esnext +0 -41
  447. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/common/seq.esnext +0 -33
  448. /package/build/esm/node_modules/.pnpm/{globby@13.1.1 → globby@13.2.2}/node_modules/globby/utilities.mjs +0 -0
  449. /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-end.mjs +0 -0
  450. /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-contains-newline.mjs +0 -0
  451. /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.mjs +0 -0
  452. /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-flow-indent-check.mjs +0 -0
  453. /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/line-counter.mjs +0 -0
  454. /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/common/null.mjs +0 -0
  455. /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/common/string.mjs +0 -0
  456. /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/bool.mjs +0 -0
  457. /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/int.mjs +0 -0
  458. /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/schema.mjs +0 -0
  459. /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/int.mjs +0 -0
  460. /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyComment.mjs +0 -0
  461. /package/build/esm/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyNumber.mjs +0 -0
  462. /package/build/esnext/node_modules/.pnpm/{globby@13.1.1 → globby@13.2.2}/node_modules/globby/utilities.esnext +0 -0
  463. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/resolve-end.esnext +0 -0
  464. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-contains-newline.esnext +0 -0
  465. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.esnext +0 -0
  466. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/compose/util-flow-indent-check.esnext +0 -0
  467. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/doc/applyReviver.esnext +0 -0
  468. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/parse/line-counter.esnext +0 -0
  469. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/common/null.esnext +0 -0
  470. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/common/string.esnext +0 -0
  471. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/bool.esnext +0 -0
  472. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/int.esnext +0 -0
  473. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/core/schema.esnext +0 -0
  474. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/schema/yaml-1.1/int.esnext +0 -0
  475. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyComment.esnext +0 -0
  476. /package/build/esnext/node_modules/.pnpm/{yaml@2.1.1 → yaml@2.7.0}/node_modules/yaml/browser/dist/stringify/stringifyNumber.esnext +0 -0
@@ -1,1099 +1,1105 @@
1
- import { constants as constants$1 } from './constants.mjs';
2
- import './utils.mjs';
3
- import { __exports as utils$1 } from '../../../../../../_virtual/utils.mjs';
4
-
5
- const constants = constants$1;
6
- const utils = utils$1;
7
-
8
- /**
9
- * Constants
10
- */
11
-
12
- const {
13
- MAX_LENGTH,
14
- POSIX_REGEX_SOURCE,
15
- REGEX_NON_SPECIAL_CHARS,
16
- REGEX_SPECIAL_CHARS_BACKREF,
17
- REPLACEMENTS
18
- } = constants;
19
-
20
- /**
21
- * Helpers
22
- */
23
-
24
- const expandRange = (args, options) => {
25
- if (typeof options.expandRange === 'function') {
26
- return options.expandRange(...args, options);
27
- }
28
- args.sort();
29
- const value = `[${args.join('-')}]`;
30
- try {
31
- /* eslint-disable-next-line no-new */
32
- new RegExp(value);
33
- } catch (ex) {
34
- return args.map(v => utils.escapeRegex(v)).join('..');
35
- }
36
- return value;
37
- };
38
-
39
- /**
40
- * Create the message for a syntax error
41
- */
42
-
43
- const syntaxError = (type, char) => {
44
- return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
45
- };
46
-
47
- /**
48
- * Parse the given input string.
49
- * @param {String} input
50
- * @param {Object} options
51
- * @return {Object}
52
- */
53
-
54
- const parse = (input, options) => {
55
- if (typeof input !== 'string') {
56
- throw new TypeError('Expected a string');
57
- }
58
- input = REPLACEMENTS[input] || input;
59
- const opts = {
60
- ...options
61
- };
62
- const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
63
- let len = input.length;
64
- if (len > max) {
65
- throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
66
- }
67
- const bos = {
68
- type: 'bos',
69
- value: '',
70
- output: opts.prepend || ''
71
- };
72
- const tokens = [bos];
73
- const capture = opts.capture ? '' : '?:';
74
- const win32 = utils.isWindows(options);
1
+ import { __require as requireConstants } from './constants.mjs';
2
+ import { __require as requireUtils } from './utils.mjs';
3
+
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();
11
+
12
+ /**
13
+ * Constants
14
+ */
75
15
 
76
- // create constants based on platform, for windows or posix
77
- const PLATFORM_CHARS = constants.globChars(win32);
78
- const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
79
16
  const {
80
- DOT_LITERAL,
81
- PLUS_LITERAL,
82
- SLASH_LITERAL,
83
- ONE_CHAR,
84
- DOTS_SLASH,
85
- NO_DOT,
86
- NO_DOT_SLASH,
87
- NO_DOTS_SLASH,
88
- QMARK,
89
- QMARK_NO_DOT,
90
- STAR,
91
- START_ANCHOR
92
- } = PLATFORM_CHARS;
93
- const globstar = opts => {
94
- return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
95
- };
96
- const nodot = opts.dot ? '' : NO_DOT;
97
- const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
98
- let star = opts.bash === true ? globstar(opts) : STAR;
99
- if (opts.capture) {
100
- star = `(${star})`;
101
- }
102
-
103
- // minimatch options support
104
- if (typeof opts.noext === 'boolean') {
105
- opts.noextglob = opts.noext;
106
- }
107
- const state = {
108
- input,
109
- index: -1,
110
- start: 0,
111
- dot: opts.dot === true,
112
- consumed: '',
113
- output: '',
114
- prefix: '',
115
- backtrack: false,
116
- negated: false,
117
- brackets: 0,
118
- braces: 0,
119
- parens: 0,
120
- quotes: 0,
121
- globstar: false,
122
- tokens
123
- };
124
- input = utils.removePrefix(input, state);
125
- len = input.length;
126
- const extglobs = [];
127
- const braces = [];
128
- const stack = [];
129
- let prev = bos;
130
- let value;
17
+ MAX_LENGTH,
18
+ POSIX_REGEX_SOURCE,
19
+ REGEX_NON_SPECIAL_CHARS,
20
+ REGEX_SPECIAL_CHARS_BACKREF,
21
+ REPLACEMENTS
22
+ } = constants;
131
23
 
132
24
  /**
133
- * Tokenizing helpers
25
+ * Helpers
134
26
  */
135
27
 
136
- const eos = () => state.index === len - 1;
137
- const peek = state.peek = (n = 1) => input[state.index + n];
138
- const advance = state.advance = () => input[++state.index] || '';
139
- const remaining = () => input.slice(state.index + 1);
140
- const consume = (value = '', num = 0) => {
141
- state.consumed += value;
142
- state.index += num;
143
- };
144
- const append = token => {
145
- state.output += token.output != null ? token.output : token.value;
146
- consume(token.value);
147
- };
148
- const negate = () => {
149
- let count = 1;
150
- while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
151
- advance();
152
- state.start++;
153
- count++;
28
+ const expandRange = (args, options) => {
29
+ if (typeof options.expandRange === 'function') {
30
+ return options.expandRange(...args, options);
154
31
  }
155
- if (count % 2 === 0) {
156
- return false;
32
+ args.sort();
33
+ const value = `[${args.join('-')}]`;
34
+ try {
35
+ /* eslint-disable-next-line no-new */
36
+ new RegExp(value);
37
+ } catch (ex) {
38
+ return args.map(v => utils.escapeRegex(v)).join('..');
157
39
  }
158
- state.negated = true;
159
- state.start++;
160
- return true;
161
- };
162
- const increment = type => {
163
- state[type]++;
164
- stack.push(type);
165
- };
166
- const decrement = type => {
167
- state[type]--;
168
- stack.pop();
40
+ return value;
169
41
  };
170
42
 
171
43
  /**
172
- * Push tokens onto the tokens array. This helper speeds up
173
- * tokenizing by 1) helping us avoid backtracking as much as possible,
174
- * and 2) helping us avoid creating extra tokens when consecutive
175
- * characters are plain text. This improves performance and simplifies
176
- * lookbehinds.
44
+ * Create the message for a syntax error
177
45
  */
178
46
 
179
- const push = tok => {
180
- if (prev.type === 'globstar') {
181
- const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
182
- const isExtglob = tok.extglob === true || extglobs.length && (tok.type === 'pipe' || tok.type === 'paren');
183
- if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
184
- state.output = state.output.slice(0, -prev.output.length);
185
- prev.type = 'star';
186
- prev.value = '*';
187
- prev.output = star;
188
- state.output += prev.output;
189
- }
190
- }
191
- if (extglobs.length && tok.type !== 'paren') {
192
- extglobs[extglobs.length - 1].inner += tok.value;
193
- }
194
- if (tok.value || tok.output) append(tok);
195
- if (prev && prev.type === 'text' && tok.type === 'text') {
196
- prev.value += tok.value;
197
- prev.output = (prev.output || '') + tok.value;
198
- return;
199
- }
200
- tok.prev = prev;
201
- tokens.push(tok);
202
- prev = tok;
203
- };
204
- const extglobOpen = (type, value) => {
205
- const token = {
206
- ...EXTGLOB_CHARS[value],
207
- conditions: 1,
208
- inner: ''
209
- };
210
- token.prev = prev;
211
- token.parens = state.parens;
212
- token.output = state.output;
213
- const output = (opts.capture ? '(' : '') + token.open;
214
- increment('parens');
215
- push({
216
- type,
217
- value,
218
- output: state.output ? '' : ONE_CHAR
219
- });
220
- push({
221
- type: 'paren',
222
- extglob: true,
223
- value: advance(),
224
- output
225
- });
226
- extglobs.push(token);
227
- };
228
- const extglobClose = token => {
229
- let output = token.close + (opts.capture ? ')' : '');
230
- let rest;
231
- if (token.type === 'negate') {
232
- let extglobStar = star;
233
- if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
234
- extglobStar = globstar(opts);
235
- }
236
- if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
237
- output = token.close = `)$))${extglobStar}`;
238
- }
239
- if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
240
- // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.
241
- // In this case, we need to parse the string and use it in the output of the original pattern.
242
- // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
243
- //
244
- // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
245
- const expression = parse(rest, {
246
- ...options,
247
- fastpaths: false
248
- }).output;
249
- output = token.close = `)${expression})${extglobStar})`;
250
- }
251
- if (token.prev.type === 'bos') {
252
- state.negatedExtglob = true;
253
- }
254
- }
255
- push({
256
- type: 'paren',
257
- extglob: true,
258
- value,
259
- output
260
- });
261
- decrement('parens');
47
+ const syntaxError = (type, char) => {
48
+ return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
262
49
  };
263
50
 
264
51
  /**
265
- * Fast paths
52
+ * Parse the given input string.
53
+ * @param {String} input
54
+ * @param {Object} options
55
+ * @return {Object}
266
56
  */
267
57
 
268
- if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
269
- let backslashes = false;
270
- let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
271
- if (first === '\\') {
272
- backslashes = true;
273
- return m;
274
- }
275
- if (first === '?') {
276
- if (esc) {
277
- return esc + first + (rest ? QMARK.repeat(rest.length) : '');
278
- }
279
- if (index === 0) {
280
- return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
281
- }
282
- return QMARK.repeat(chars.length);
283
- }
284
- if (first === '.') {
285
- return DOT_LITERAL.repeat(chars.length);
286
- }
287
- if (first === '*') {
288
- if (esc) {
289
- return esc + first + (rest ? star : '');
290
- }
291
- return star;
292
- }
293
- return esc ? m : `\\${m}`;
294
- });
295
- if (backslashes === true) {
296
- if (opts.unescape === true) {
297
- output = output.replace(/\\/g, '');
298
- } else {
299
- output = output.replace(/\\+/g, m => {
300
- return m.length % 2 === 0 ? '\\\\' : m ? '\\' : '';
301
- });
302
- }
58
+ const parse = (input, options) => {
59
+ if (typeof input !== 'string') {
60
+ throw new TypeError('Expected a string');
303
61
  }
304
- if (output === input && opts.contains === true) {
305
- state.output = input;
306
- return state;
62
+ input = REPLACEMENTS[input] || input;
63
+ const opts = {
64
+ ...options
65
+ };
66
+ const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
67
+ let len = input.length;
68
+ if (len > max) {
69
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
70
+ }
71
+ const bos = {
72
+ type: 'bos',
73
+ value: '',
74
+ output: opts.prepend || ''
75
+ };
76
+ const tokens = [bos];
77
+ const capture = opts.capture ? '' : '?:';
78
+ const win32 = utils.isWindows(options);
79
+
80
+ // create constants based on platform, for windows or posix
81
+ const PLATFORM_CHARS = constants.globChars(win32);
82
+ const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
83
+ const {
84
+ DOT_LITERAL,
85
+ PLUS_LITERAL,
86
+ SLASH_LITERAL,
87
+ ONE_CHAR,
88
+ DOTS_SLASH,
89
+ NO_DOT,
90
+ NO_DOT_SLASH,
91
+ NO_DOTS_SLASH,
92
+ QMARK,
93
+ QMARK_NO_DOT,
94
+ STAR,
95
+ START_ANCHOR
96
+ } = PLATFORM_CHARS;
97
+ const globstar = opts => {
98
+ return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
99
+ };
100
+ const nodot = opts.dot ? '' : NO_DOT;
101
+ const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
102
+ let star = opts.bash === true ? globstar(opts) : STAR;
103
+ if (opts.capture) {
104
+ star = `(${star})`;
307
105
  }
308
- state.output = utils.wrapOutput(output, state, options);
309
- return state;
310
- }
311
-
312
- /**
313
- * Tokenize input until we reach end-of-string
314
- */
315
106
 
316
- while (!eos()) {
317
- value = advance();
318
- if (value === '\u0000') {
319
- continue;
107
+ // minimatch options support
108
+ if (typeof opts.noext === 'boolean') {
109
+ opts.noextglob = opts.noext;
320
110
  }
111
+ const state = {
112
+ input,
113
+ index: -1,
114
+ start: 0,
115
+ dot: opts.dot === true,
116
+ consumed: '',
117
+ output: '',
118
+ prefix: '',
119
+ backtrack: false,
120
+ negated: false,
121
+ brackets: 0,
122
+ braces: 0,
123
+ parens: 0,
124
+ quotes: 0,
125
+ globstar: false,
126
+ tokens
127
+ };
128
+ input = utils.removePrefix(input, state);
129
+ len = input.length;
130
+ const extglobs = [];
131
+ const braces = [];
132
+ const stack = [];
133
+ let prev = bos;
134
+ let value;
321
135
 
322
136
  /**
323
- * Escaped characters
137
+ * Tokenizing helpers
324
138
  */
325
139
 
326
- if (value === '\\') {
327
- const next = peek();
328
- if (next === '/' && opts.bash !== true) {
329
- continue;
330
- }
331
- if (next === '.' || next === ';') {
332
- continue;
333
- }
334
- if (!next) {
335
- value += '\\';
336
- push({
337
- type: 'text',
338
- value
339
- });
340
- continue;
341
- }
342
-
343
- // collapse slashes to reduce potential for exploits
344
- const match = /^\\+/.exec(remaining());
345
- let slashes = 0;
346
- if (match && match[0].length > 2) {
347
- slashes = match[0].length;
348
- state.index += slashes;
349
- if (slashes % 2 !== 0) {
350
- value += '\\';
351
- }
352
- }
353
- if (opts.unescape === true) {
354
- value = advance();
355
- } else {
356
- value += advance();
140
+ const eos = () => state.index === len - 1;
141
+ const peek = state.peek = (n = 1) => input[state.index + n];
142
+ const advance = state.advance = () => input[++state.index] || '';
143
+ const remaining = () => input.slice(state.index + 1);
144
+ const consume = (value = '', num = 0) => {
145
+ state.consumed += value;
146
+ state.index += num;
147
+ };
148
+ const append = token => {
149
+ state.output += token.output != null ? token.output : token.value;
150
+ consume(token.value);
151
+ };
152
+ const negate = () => {
153
+ let count = 1;
154
+ while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
155
+ advance();
156
+ state.start++;
157
+ count++;
357
158
  }
358
- if (state.brackets === 0) {
359
- push({
360
- type: 'text',
361
- value
362
- });
363
- continue;
159
+ if (count % 2 === 0) {
160
+ return false;
364
161
  }
365
- }
162
+ state.negated = true;
163
+ state.start++;
164
+ return true;
165
+ };
166
+ const increment = type => {
167
+ state[type]++;
168
+ stack.push(type);
169
+ };
170
+ const decrement = type => {
171
+ state[type]--;
172
+ stack.pop();
173
+ };
366
174
 
367
175
  /**
368
- * If we're inside a regex character class, continue
369
- * until we reach the closing bracket.
176
+ * Push tokens onto the tokens array. This helper speeds up
177
+ * tokenizing by 1) helping us avoid backtracking as much as possible,
178
+ * and 2) helping us avoid creating extra tokens when consecutive
179
+ * characters are plain text. This improves performance and simplifies
180
+ * lookbehinds.
370
181
  */
371
182
 
372
- if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
373
- if (opts.posix !== false && value === ':') {
374
- const inner = prev.value.slice(1);
375
- if (inner.includes('[')) {
376
- prev.posix = true;
377
- if (inner.includes(':')) {
378
- const idx = prev.value.lastIndexOf('[');
379
- const pre = prev.value.slice(0, idx);
380
- const rest = prev.value.slice(idx + 2);
381
- const posix = POSIX_REGEX_SOURCE[rest];
382
- if (posix) {
383
- prev.value = pre + posix;
384
- state.backtrack = true;
385
- advance();
386
- if (!bos.output && tokens.indexOf(prev) === 1) {
387
- bos.output = ONE_CHAR;
388
- }
389
- continue;
390
- }
391
- }
183
+ const push = tok => {
184
+ if (prev.type === 'globstar') {
185
+ const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
186
+ const isExtglob = tok.extglob === true || extglobs.length && (tok.type === 'pipe' || tok.type === 'paren');
187
+ if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
188
+ state.output = state.output.slice(0, -prev.output.length);
189
+ prev.type = 'star';
190
+ prev.value = '*';
191
+ prev.output = star;
192
+ state.output += prev.output;
392
193
  }
393
194
  }
394
- if (value === '[' && peek() !== ':' || value === '-' && peek() === ']') {
395
- value = `\\${value}`;
195
+ if (extglobs.length && tok.type !== 'paren') {
196
+ extglobs[extglobs.length - 1].inner += tok.value;
396
197
  }
397
- if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
398
- value = `\\${value}`;
198
+ if (tok.value || tok.output) append(tok);
199
+ if (prev && prev.type === 'text' && tok.type === 'text') {
200
+ prev.value += tok.value;
201
+ prev.output = (prev.output || '') + tok.value;
202
+ return;
399
203
  }
400
- if (opts.posix === true && value === '!' && prev.value === '[') {
401
- value = '^';
204
+ tok.prev = prev;
205
+ tokens.push(tok);
206
+ prev = tok;
207
+ };
208
+ const extglobOpen = (type, value) => {
209
+ const token = {
210
+ ...EXTGLOB_CHARS[value],
211
+ conditions: 1,
212
+ inner: ''
213
+ };
214
+ token.prev = prev;
215
+ token.parens = state.parens;
216
+ token.output = state.output;
217
+ const output = (opts.capture ? '(' : '') + token.open;
218
+ increment('parens');
219
+ push({
220
+ type,
221
+ value,
222
+ output: state.output ? '' : ONE_CHAR
223
+ });
224
+ push({
225
+ type: 'paren',
226
+ extglob: true,
227
+ value: advance(),
228
+ output
229
+ });
230
+ extglobs.push(token);
231
+ };
232
+ const extglobClose = token => {
233
+ let output = token.close + (opts.capture ? ')' : '');
234
+ let rest;
235
+ if (token.type === 'negate') {
236
+ let extglobStar = star;
237
+ if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
238
+ extglobStar = globstar(opts);
239
+ }
240
+ if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
241
+ output = token.close = `)$))${extglobStar}`;
242
+ }
243
+ if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
244
+ // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.
245
+ // In this case, we need to parse the string and use it in the output of the original pattern.
246
+ // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
247
+ //
248
+ // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
249
+ const expression = parse(rest, {
250
+ ...options,
251
+ fastpaths: false
252
+ }).output;
253
+ output = token.close = `)${expression})${extglobStar})`;
254
+ }
255
+ if (token.prev.type === 'bos') {
256
+ state.negatedExtglob = true;
257
+ }
402
258
  }
403
- prev.value += value;
404
- append({
405
- value
259
+ push({
260
+ type: 'paren',
261
+ extglob: true,
262
+ value,
263
+ output
406
264
  });
407
- continue;
408
- }
265
+ decrement('parens');
266
+ };
409
267
 
410
268
  /**
411
- * If we're inside a quoted string, continue
412
- * until we reach the closing double quote.
269
+ * Fast paths
413
270
  */
414
271
 
415
- if (state.quotes === 1 && value !== '"') {
416
- value = utils.escapeRegex(value);
417
- prev.value += value;
418
- append({
419
- value
272
+ if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
273
+ let backslashes = false;
274
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
275
+ if (first === '\\') {
276
+ backslashes = true;
277
+ return m;
278
+ }
279
+ if (first === '?') {
280
+ if (esc) {
281
+ return esc + first + (rest ? QMARK.repeat(rest.length) : '');
282
+ }
283
+ if (index === 0) {
284
+ return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
285
+ }
286
+ return QMARK.repeat(chars.length);
287
+ }
288
+ if (first === '.') {
289
+ return DOT_LITERAL.repeat(chars.length);
290
+ }
291
+ if (first === '*') {
292
+ if (esc) {
293
+ return esc + first + (rest ? star : '');
294
+ }
295
+ return star;
296
+ }
297
+ return esc ? m : `\\${m}`;
420
298
  });
421
- continue;
299
+ if (backslashes === true) {
300
+ if (opts.unescape === true) {
301
+ output = output.replace(/\\/g, '');
302
+ } else {
303
+ output = output.replace(/\\+/g, m => {
304
+ return m.length % 2 === 0 ? '\\\\' : m ? '\\' : '';
305
+ });
306
+ }
307
+ }
308
+ if (output === input && opts.contains === true) {
309
+ state.output = input;
310
+ return state;
311
+ }
312
+ state.output = utils.wrapOutput(output, state, options);
313
+ return state;
422
314
  }
423
315
 
424
316
  /**
425
- * Double quotes
317
+ * Tokenize input until we reach end-of-string
426
318
  */
427
319
 
428
- if (value === '"') {
429
- state.quotes = state.quotes === 1 ? 0 : 1;
430
- if (opts.keepQuotes === true) {
431
- push({
432
- type: 'text',
433
- value
434
- });
320
+ while (!eos()) {
321
+ value = advance();
322
+ if (value === '\u0000') {
323
+ continue;
435
324
  }
436
- continue;
437
- }
438
325
 
439
- /**
440
- * Parentheses
441
- */
326
+ /**
327
+ * Escaped characters
328
+ */
442
329
 
443
- if (value === '(') {
444
- increment('parens');
445
- push({
446
- type: 'paren',
447
- value
448
- });
449
- continue;
450
- }
451
- if (value === ')') {
452
- if (state.parens === 0 && opts.strictBrackets === true) {
453
- throw new SyntaxError(syntaxError('opening', '('));
330
+ if (value === '\\') {
331
+ const next = peek();
332
+ if (next === '/' && opts.bash !== true) {
333
+ continue;
334
+ }
335
+ if (next === '.' || next === ';') {
336
+ continue;
337
+ }
338
+ if (!next) {
339
+ value += '\\';
340
+ push({
341
+ type: 'text',
342
+ value
343
+ });
344
+ continue;
345
+ }
346
+
347
+ // collapse slashes to reduce potential for exploits
348
+ const match = /^\\+/.exec(remaining());
349
+ let slashes = 0;
350
+ if (match && match[0].length > 2) {
351
+ slashes = match[0].length;
352
+ state.index += slashes;
353
+ if (slashes % 2 !== 0) {
354
+ value += '\\';
355
+ }
356
+ }
357
+ if (opts.unescape === true) {
358
+ value = advance();
359
+ } else {
360
+ value += advance();
361
+ }
362
+ if (state.brackets === 0) {
363
+ push({
364
+ type: 'text',
365
+ value
366
+ });
367
+ continue;
368
+ }
454
369
  }
455
- const extglob = extglobs[extglobs.length - 1];
456
- if (extglob && state.parens === extglob.parens + 1) {
457
- extglobClose(extglobs.pop());
370
+
371
+ /**
372
+ * If we're inside a regex character class, continue
373
+ * until we reach the closing bracket.
374
+ */
375
+
376
+ if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
377
+ if (opts.posix !== false && value === ':') {
378
+ const inner = prev.value.slice(1);
379
+ if (inner.includes('[')) {
380
+ prev.posix = true;
381
+ if (inner.includes(':')) {
382
+ const idx = prev.value.lastIndexOf('[');
383
+ const pre = prev.value.slice(0, idx);
384
+ const rest = prev.value.slice(idx + 2);
385
+ const posix = POSIX_REGEX_SOURCE[rest];
386
+ if (posix) {
387
+ prev.value = pre + posix;
388
+ state.backtrack = true;
389
+ advance();
390
+ if (!bos.output && tokens.indexOf(prev) === 1) {
391
+ bos.output = ONE_CHAR;
392
+ }
393
+ continue;
394
+ }
395
+ }
396
+ }
397
+ }
398
+ if (value === '[' && peek() !== ':' || value === '-' && peek() === ']') {
399
+ value = `\\${value}`;
400
+ }
401
+ if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
402
+ value = `\\${value}`;
403
+ }
404
+ if (opts.posix === true && value === '!' && prev.value === '[') {
405
+ value = '^';
406
+ }
407
+ prev.value += value;
408
+ append({
409
+ value
410
+ });
458
411
  continue;
459
412
  }
460
- push({
461
- type: 'paren',
462
- value,
463
- output: state.parens ? ')' : '\\)'
464
- });
465
- decrement('parens');
466
- continue;
467
- }
468
413
 
469
- /**
470
- * Square brackets
471
- */
414
+ /**
415
+ * If we're inside a quoted string, continue
416
+ * until we reach the closing double quote.
417
+ */
418
+
419
+ if (state.quotes === 1 && value !== '"') {
420
+ value = utils.escapeRegex(value);
421
+ prev.value += value;
422
+ append({
423
+ value
424
+ });
425
+ continue;
426
+ }
472
427
 
473
- if (value === '[') {
474
- if (opts.nobracket === true || !remaining().includes(']')) {
475
- if (opts.nobracket !== true && opts.strictBrackets === true) {
476
- throw new SyntaxError(syntaxError('closing', ']'));
428
+ /**
429
+ * Double quotes
430
+ */
431
+
432
+ if (value === '"') {
433
+ state.quotes = state.quotes === 1 ? 0 : 1;
434
+ if (opts.keepQuotes === true) {
435
+ push({
436
+ type: 'text',
437
+ value
438
+ });
477
439
  }
478
- value = `\\${value}`;
479
- } else {
480
- increment('brackets');
440
+ continue;
481
441
  }
482
- push({
483
- type: 'bracket',
484
- value
485
- });
486
- continue;
487
- }
488
- if (value === ']') {
489
- if (opts.nobracket === true || prev && prev.type === 'bracket' && prev.value.length === 1) {
442
+
443
+ /**
444
+ * Parentheses
445
+ */
446
+
447
+ if (value === '(') {
448
+ increment('parens');
490
449
  push({
491
- type: 'text',
492
- value,
493
- output: `\\${value}`
450
+ type: 'paren',
451
+ value
494
452
  });
495
453
  continue;
496
454
  }
497
- if (state.brackets === 0) {
498
- if (opts.strictBrackets === true) {
499
- throw new SyntaxError(syntaxError('opening', '['));
455
+ if (value === ')') {
456
+ if (state.parens === 0 && opts.strictBrackets === true) {
457
+ throw new SyntaxError(syntaxError('opening', '('));
458
+ }
459
+ const extglob = extglobs[extglobs.length - 1];
460
+ if (extglob && state.parens === extglob.parens + 1) {
461
+ extglobClose(extglobs.pop());
462
+ continue;
500
463
  }
501
464
  push({
502
- type: 'text',
465
+ type: 'paren',
503
466
  value,
504
- output: `\\${value}`
467
+ output: state.parens ? ')' : '\\)'
505
468
  });
506
- continue;
507
- }
508
- decrement('brackets');
509
- const prevValue = prev.value.slice(1);
510
- if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
511
- value = `/${value}`;
512
- }
513
- prev.value += value;
514
- append({
515
- value
516
- });
517
-
518
- // when literal brackets are explicitly disabled
519
- // assume we should match with a regex character class
520
- if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
521
- continue;
522
- }
523
- const escaped = utils.escapeRegex(prev.value);
524
- state.output = state.output.slice(0, -prev.value.length);
525
-
526
- // when literal brackets are explicitly enabled
527
- // assume we should escape the brackets to match literal characters
528
- if (opts.literalBrackets === true) {
529
- state.output += escaped;
530
- prev.value = escaped;
469
+ decrement('parens');
531
470
  continue;
532
471
  }
533
472
 
534
- // when the user specifies nothing, try to match both
535
- prev.value = `(${capture}${escaped}|${prev.value})`;
536
- state.output += prev.value;
537
- continue;
538
- }
473
+ /**
474
+ * Square brackets
475
+ */
539
476
 
540
- /**
541
- * Braces
542
- */
543
-
544
- if (value === '{' && opts.nobrace !== true) {
545
- increment('braces');
546
- const open = {
547
- type: 'brace',
548
- value,
549
- output: '(',
550
- outputIndex: state.output.length,
551
- tokensIndex: state.tokens.length
552
- };
553
- braces.push(open);
554
- push(open);
555
- continue;
556
- }
557
- if (value === '}') {
558
- const brace = braces[braces.length - 1];
559
- if (opts.nobrace === true || !brace) {
477
+ if (value === '[') {
478
+ if (opts.nobracket === true || !remaining().includes(']')) {
479
+ if (opts.nobracket !== true && opts.strictBrackets === true) {
480
+ throw new SyntaxError(syntaxError('closing', ']'));
481
+ }
482
+ value = `\\${value}`;
483
+ } else {
484
+ increment('brackets');
485
+ }
560
486
  push({
561
- type: 'text',
562
- value,
563
- output: value
487
+ type: 'bracket',
488
+ value
564
489
  });
565
490
  continue;
566
491
  }
567
- let output = ')';
568
- if (brace.dots === true) {
569
- const arr = tokens.slice();
570
- const range = [];
571
- for (let i = arr.length - 1; i >= 0; i--) {
572
- tokens.pop();
573
- if (arr[i].type === 'brace') {
574
- break;
575
- }
576
- if (arr[i].type !== 'dots') {
577
- range.unshift(arr[i].value);
492
+ if (value === ']') {
493
+ if (opts.nobracket === true || prev && prev.type === 'bracket' && prev.value.length === 1) {
494
+ push({
495
+ type: 'text',
496
+ value,
497
+ output: `\\${value}`
498
+ });
499
+ continue;
500
+ }
501
+ if (state.brackets === 0) {
502
+ if (opts.strictBrackets === true) {
503
+ throw new SyntaxError(syntaxError('opening', '['));
578
504
  }
505
+ push({
506
+ type: 'text',
507
+ value,
508
+ output: `\\${value}`
509
+ });
510
+ continue;
579
511
  }
580
- output = expandRange(range, opts);
581
- state.backtrack = true;
582
- }
583
- if (brace.comma !== true && brace.dots !== true) {
584
- const out = state.output.slice(0, brace.outputIndex);
585
- const toks = state.tokens.slice(brace.tokensIndex);
586
- brace.value = brace.output = '\\{';
587
- value = output = '\\}';
588
- state.output = out;
589
- for (const t of toks) {
590
- state.output += t.output || t.value;
512
+ decrement('brackets');
513
+ const prevValue = prev.value.slice(1);
514
+ if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
515
+ value = `/${value}`;
591
516
  }
592
- }
593
- push({
594
- type: 'brace',
595
- value,
596
- output
597
- });
598
- decrement('braces');
599
- braces.pop();
600
- continue;
601
- }
517
+ prev.value += value;
518
+ append({
519
+ value
520
+ });
602
521
 
603
- /**
604
- * Pipes
605
- */
522
+ // when literal brackets are explicitly disabled
523
+ // assume we should match with a regex character class
524
+ if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
525
+ continue;
526
+ }
527
+ const escaped = utils.escapeRegex(prev.value);
528
+ state.output = state.output.slice(0, -prev.value.length);
529
+
530
+ // when literal brackets are explicitly enabled
531
+ // assume we should escape the brackets to match literal characters
532
+ if (opts.literalBrackets === true) {
533
+ state.output += escaped;
534
+ prev.value = escaped;
535
+ continue;
536
+ }
606
537
 
607
- if (value === '|') {
608
- if (extglobs.length > 0) {
609
- extglobs[extglobs.length - 1].conditions++;
538
+ // when the user specifies nothing, try to match both
539
+ prev.value = `(${capture}${escaped}|${prev.value})`;
540
+ state.output += prev.value;
541
+ continue;
610
542
  }
611
- push({
612
- type: 'text',
613
- value
614
- });
615
- continue;
616
- }
617
543
 
618
- /**
619
- * Commas
620
- */
544
+ /**
545
+ * Braces
546
+ */
621
547
 
622
- if (value === ',') {
623
- let output = value;
624
- const brace = braces[braces.length - 1];
625
- if (brace && stack[stack.length - 1] === 'braces') {
626
- brace.comma = true;
627
- output = '|';
548
+ if (value === '{' && opts.nobrace !== true) {
549
+ increment('braces');
550
+ const open = {
551
+ type: 'brace',
552
+ value,
553
+ output: '(',
554
+ outputIndex: state.output.length,
555
+ tokensIndex: state.tokens.length
556
+ };
557
+ braces.push(open);
558
+ push(open);
559
+ continue;
560
+ }
561
+ if (value === '}') {
562
+ const brace = braces[braces.length - 1];
563
+ if (opts.nobrace === true || !brace) {
564
+ push({
565
+ type: 'text',
566
+ value,
567
+ output: value
568
+ });
569
+ continue;
570
+ }
571
+ let output = ')';
572
+ if (brace.dots === true) {
573
+ const arr = tokens.slice();
574
+ const range = [];
575
+ for (let i = arr.length - 1; i >= 0; i--) {
576
+ tokens.pop();
577
+ if (arr[i].type === 'brace') {
578
+ break;
579
+ }
580
+ if (arr[i].type !== 'dots') {
581
+ range.unshift(arr[i].value);
582
+ }
583
+ }
584
+ output = expandRange(range, opts);
585
+ state.backtrack = true;
586
+ }
587
+ if (brace.comma !== true && brace.dots !== true) {
588
+ const out = state.output.slice(0, brace.outputIndex);
589
+ const toks = state.tokens.slice(brace.tokensIndex);
590
+ brace.value = brace.output = '\\{';
591
+ value = output = '\\}';
592
+ state.output = out;
593
+ for (const t of toks) {
594
+ state.output += t.output || t.value;
595
+ }
596
+ }
597
+ push({
598
+ type: 'brace',
599
+ value,
600
+ output
601
+ });
602
+ decrement('braces');
603
+ braces.pop();
604
+ continue;
628
605
  }
629
- push({
630
- type: 'comma',
631
- value,
632
- output
633
- });
634
- continue;
635
- }
636
606
 
637
- /**
638
- * Slashes
639
- */
607
+ /**
608
+ * Pipes
609
+ */
640
610
 
641
- if (value === '/') {
642
- // if the beginning of the glob is "./", advance the start
643
- // to the current index, and don't add the "./" characters
644
- // to the state. This greatly simplifies lookbehinds when
645
- // checking for BOS characters like "!" and "." (not "./")
646
- if (prev.type === 'dot' && state.index === state.start + 1) {
647
- state.start = state.index + 1;
648
- state.consumed = '';
649
- state.output = '';
650
- tokens.pop();
651
- prev = bos; // reset "prev" to the first token
611
+ if (value === '|') {
612
+ if (extglobs.length > 0) {
613
+ extglobs[extglobs.length - 1].conditions++;
614
+ }
615
+ push({
616
+ type: 'text',
617
+ value
618
+ });
652
619
  continue;
653
620
  }
654
- push({
655
- type: 'slash',
656
- value,
657
- output: SLASH_LITERAL
658
- });
659
- continue;
660
- }
661
621
 
662
- /**
663
- * Dots
664
- */
622
+ /**
623
+ * Commas
624
+ */
665
625
 
666
- if (value === '.') {
667
- if (state.braces > 0 && prev.type === 'dot') {
668
- if (prev.value === '.') prev.output = DOT_LITERAL;
626
+ if (value === ',') {
627
+ let output = value;
669
628
  const brace = braces[braces.length - 1];
670
- prev.type = 'dots';
671
- prev.output += value;
672
- prev.value += value;
673
- brace.dots = true;
674
- continue;
675
- }
676
- if (state.braces + state.parens === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
629
+ if (brace && stack[stack.length - 1] === 'braces') {
630
+ brace.comma = true;
631
+ output = '|';
632
+ }
677
633
  push({
678
- type: 'text',
634
+ type: 'comma',
679
635
  value,
680
- output: DOT_LITERAL
636
+ output
681
637
  });
682
638
  continue;
683
639
  }
684
- push({
685
- type: 'dot',
686
- value,
687
- output: DOT_LITERAL
688
- });
689
- continue;
690
- }
691
-
692
- /**
693
- * Question marks
694
- */
695
640
 
696
- if (value === '?') {
697
- const isGroup = prev && prev.value === '(';
698
- if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
699
- extglobOpen('qmark', value);
641
+ /**
642
+ * Slashes
643
+ */
644
+
645
+ if (value === '/') {
646
+ // if the beginning of the glob is "./", advance the start
647
+ // to the current index, and don't add the "./" characters
648
+ // to the state. This greatly simplifies lookbehinds when
649
+ // checking for BOS characters like "!" and "." (not "./")
650
+ if (prev.type === 'dot' && state.index === state.start + 1) {
651
+ state.start = state.index + 1;
652
+ state.consumed = '';
653
+ state.output = '';
654
+ tokens.pop();
655
+ prev = bos; // reset "prev" to the first token
656
+ continue;
657
+ }
658
+ push({
659
+ type: 'slash',
660
+ value,
661
+ output: SLASH_LITERAL
662
+ });
700
663
  continue;
701
664
  }
702
- if (prev && prev.type === 'paren') {
703
- const next = peek();
704
- let output = value;
705
- if (next === '<' && !utils.supportsLookbehinds()) {
706
- throw new Error('Node.js v10 or higher is required for regex lookbehinds');
665
+
666
+ /**
667
+ * Dots
668
+ */
669
+
670
+ if (value === '.') {
671
+ if (state.braces > 0 && prev.type === 'dot') {
672
+ if (prev.value === '.') prev.output = DOT_LITERAL;
673
+ const brace = braces[braces.length - 1];
674
+ prev.type = 'dots';
675
+ prev.output += value;
676
+ prev.value += value;
677
+ brace.dots = true;
678
+ continue;
707
679
  }
708
- if (prev.value === '(' && !/[!=<:]/.test(next) || next === '<' && !/<([!=]|\w+>)/.test(remaining())) {
709
- output = `\\${value}`;
680
+ if (state.braces + state.parens === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
681
+ push({
682
+ type: 'text',
683
+ value,
684
+ output: DOT_LITERAL
685
+ });
686
+ continue;
710
687
  }
711
688
  push({
712
- type: 'text',
689
+ type: 'dot',
713
690
  value,
714
- output
691
+ output: DOT_LITERAL
715
692
  });
716
693
  continue;
717
694
  }
718
- if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
695
+
696
+ /**
697
+ * Question marks
698
+ */
699
+
700
+ if (value === '?') {
701
+ const isGroup = prev && prev.value === '(';
702
+ if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
703
+ extglobOpen('qmark', value);
704
+ continue;
705
+ }
706
+ if (prev && prev.type === 'paren') {
707
+ const next = peek();
708
+ let output = value;
709
+ if (next === '<' && !utils.supportsLookbehinds()) {
710
+ throw new Error('Node.js v10 or higher is required for regex lookbehinds');
711
+ }
712
+ if (prev.value === '(' && !/[!=<:]/.test(next) || next === '<' && !/<([!=]|\w+>)/.test(remaining())) {
713
+ output = `\\${value}`;
714
+ }
715
+ push({
716
+ type: 'text',
717
+ value,
718
+ output
719
+ });
720
+ continue;
721
+ }
722
+ if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
723
+ push({
724
+ type: 'qmark',
725
+ value,
726
+ output: QMARK_NO_DOT
727
+ });
728
+ continue;
729
+ }
719
730
  push({
720
731
  type: 'qmark',
721
732
  value,
722
- output: QMARK_NO_DOT
733
+ output: QMARK
723
734
  });
724
735
  continue;
725
736
  }
726
- push({
727
- type: 'qmark',
728
- value,
729
- output: QMARK
730
- });
731
- continue;
732
- }
733
737
 
734
- /**
735
- * Exclamation
736
- */
738
+ /**
739
+ * Exclamation
740
+ */
737
741
 
738
- if (value === '!') {
739
- if (opts.noextglob !== true && peek() === '(') {
740
- if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
741
- extglobOpen('negate', value);
742
+ if (value === '!') {
743
+ if (opts.noextglob !== true && peek() === '(') {
744
+ if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
745
+ extglobOpen('negate', value);
746
+ continue;
747
+ }
748
+ }
749
+ if (opts.nonegate !== true && state.index === 0) {
750
+ negate();
742
751
  continue;
743
752
  }
744
753
  }
745
- if (opts.nonegate !== true && state.index === 0) {
746
- negate();
747
- continue;
748
- }
749
- }
750
754
 
751
- /**
752
- * Plus
753
- */
755
+ /**
756
+ * Plus
757
+ */
754
758
 
755
- if (value === '+') {
756
- if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
757
- extglobOpen('plus', value);
758
- continue;
759
- }
760
- if (prev && prev.value === '(' || opts.regex === false) {
759
+ if (value === '+') {
760
+ if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
761
+ extglobOpen('plus', value);
762
+ continue;
763
+ }
764
+ if (prev && prev.value === '(' || opts.regex === false) {
765
+ push({
766
+ type: 'plus',
767
+ value,
768
+ output: PLUS_LITERAL
769
+ });
770
+ continue;
771
+ }
772
+ if (prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace') || state.parens > 0) {
773
+ push({
774
+ type: 'plus',
775
+ value
776
+ });
777
+ continue;
778
+ }
761
779
  push({
762
780
  type: 'plus',
763
- value,
764
- output: PLUS_LITERAL
781
+ value: PLUS_LITERAL
765
782
  });
766
783
  continue;
767
784
  }
768
- if (prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace') || state.parens > 0) {
785
+
786
+ /**
787
+ * Plain text
788
+ */
789
+
790
+ if (value === '@') {
791
+ if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
792
+ push({
793
+ type: 'at',
794
+ extglob: true,
795
+ value,
796
+ output: ''
797
+ });
798
+ continue;
799
+ }
769
800
  push({
770
- type: 'plus',
801
+ type: 'text',
771
802
  value
772
803
  });
773
804
  continue;
774
805
  }
775
- push({
776
- type: 'plus',
777
- value: PLUS_LITERAL
778
- });
779
- continue;
780
- }
781
806
 
782
- /**
783
- * Plain text
784
- */
807
+ /**
808
+ * Plain text
809
+ */
785
810
 
786
- if (value === '@') {
787
- if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
811
+ if (value !== '*') {
812
+ if (value === '$' || value === '^') {
813
+ value = `\\${value}`;
814
+ }
815
+ const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
816
+ if (match) {
817
+ value += match[0];
818
+ state.index += match[0].length;
819
+ }
788
820
  push({
789
- type: 'at',
790
- extglob: true,
791
- value,
792
- output: ''
821
+ type: 'text',
822
+ value
793
823
  });
794
824
  continue;
795
825
  }
796
- push({
797
- type: 'text',
798
- value
799
- });
800
- continue;
801
- }
802
-
803
- /**
804
- * Plain text
805
- */
806
-
807
- if (value !== '*') {
808
- if (value === '$' || value === '^') {
809
- value = `\\${value}`;
810
- }
811
- const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
812
- if (match) {
813
- value += match[0];
814
- state.index += match[0].length;
815
- }
816
- push({
817
- type: 'text',
818
- value
819
- });
820
- continue;
821
- }
822
826
 
823
- /**
824
- * Stars
825
- */
827
+ /**
828
+ * Stars
829
+ */
826
830
 
827
- if (prev && (prev.type === 'globstar' || prev.star === true)) {
828
- prev.type = 'star';
829
- prev.star = true;
830
- prev.value += value;
831
- prev.output = star;
832
- state.backtrack = true;
833
- state.globstar = true;
834
- consume(value);
835
- continue;
836
- }
837
- let rest = remaining();
838
- if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
839
- extglobOpen('star', value);
840
- continue;
841
- }
842
- if (prev.type === 'star') {
843
- if (opts.noglobstar === true) {
831
+ if (prev && (prev.type === 'globstar' || prev.star === true)) {
832
+ prev.type = 'star';
833
+ prev.star = true;
834
+ prev.value += value;
835
+ prev.output = star;
836
+ state.backtrack = true;
837
+ state.globstar = true;
844
838
  consume(value);
845
839
  continue;
846
840
  }
847
- const prior = prev.prev;
848
- const before = prior.prev;
849
- const isStart = prior.type === 'slash' || prior.type === 'bos';
850
- const afterStar = before && (before.type === 'star' || before.type === 'globstar');
851
- if (opts.bash === true && (!isStart || rest[0] && rest[0] !== '/')) {
852
- push({
853
- type: 'star',
854
- value,
855
- output: ''
856
- });
857
- continue;
858
- }
859
- const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
860
- const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
861
- if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
862
- push({
863
- type: 'star',
864
- value,
865
- output: ''
866
- });
841
+ let rest = remaining();
842
+ if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
843
+ extglobOpen('star', value);
867
844
  continue;
868
845
  }
846
+ if (prev.type === 'star') {
847
+ if (opts.noglobstar === true) {
848
+ consume(value);
849
+ continue;
850
+ }
851
+ const prior = prev.prev;
852
+ const before = prior.prev;
853
+ const isStart = prior.type === 'slash' || prior.type === 'bos';
854
+ const afterStar = before && (before.type === 'star' || before.type === 'globstar');
855
+ if (opts.bash === true && (!isStart || rest[0] && rest[0] !== '/')) {
856
+ push({
857
+ type: 'star',
858
+ value,
859
+ output: ''
860
+ });
861
+ continue;
862
+ }
863
+ const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
864
+ const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
865
+ if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
866
+ push({
867
+ type: 'star',
868
+ value,
869
+ output: ''
870
+ });
871
+ continue;
872
+ }
869
873
 
870
- // strip consecutive `/**/`
871
- while (rest.slice(0, 3) === '/**') {
872
- const after = input[state.index + 4];
873
- if (after && after !== '/') {
874
- break;
874
+ // strip consecutive `/**/`
875
+ while (rest.slice(0, 3) === '/**') {
876
+ const after = input[state.index + 4];
877
+ if (after && after !== '/') {
878
+ break;
879
+ }
880
+ rest = rest.slice(3);
881
+ consume('/**', 3);
875
882
  }
876
- rest = rest.slice(3);
877
- consume('/**', 3);
878
- }
879
- if (prior.type === 'bos' && eos()) {
883
+ if (prior.type === 'bos' && eos()) {
884
+ prev.type = 'globstar';
885
+ prev.value += value;
886
+ prev.output = globstar(opts);
887
+ state.output = prev.output;
888
+ state.globstar = true;
889
+ consume(value);
890
+ continue;
891
+ }
892
+ if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
893
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
894
+ prior.output = `(?:${prior.output}`;
895
+ prev.type = 'globstar';
896
+ prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
897
+ prev.value += value;
898
+ state.globstar = true;
899
+ state.output += prior.output + prev.output;
900
+ consume(value);
901
+ continue;
902
+ }
903
+ if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
904
+ const end = rest[1] !== void 0 ? '|$' : '';
905
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
906
+ prior.output = `(?:${prior.output}`;
907
+ prev.type = 'globstar';
908
+ prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
909
+ prev.value += value;
910
+ state.output += prior.output + prev.output;
911
+ state.globstar = true;
912
+ consume(value + advance());
913
+ push({
914
+ type: 'slash',
915
+ value: '/',
916
+ output: ''
917
+ });
918
+ continue;
919
+ }
920
+ if (prior.type === 'bos' && rest[0] === '/') {
921
+ prev.type = 'globstar';
922
+ prev.value += value;
923
+ prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
924
+ state.output = prev.output;
925
+ state.globstar = true;
926
+ consume(value + advance());
927
+ push({
928
+ type: 'slash',
929
+ value: '/',
930
+ output: ''
931
+ });
932
+ continue;
933
+ }
934
+
935
+ // remove single star from output
936
+ state.output = state.output.slice(0, -prev.output.length);
937
+
938
+ // reset previous token to globstar
880
939
  prev.type = 'globstar';
881
- prev.value += value;
882
940
  prev.output = globstar(opts);
883
- state.output = prev.output;
884
- state.globstar = true;
885
- consume(value);
886
- continue;
887
- }
888
- if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
889
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
890
- prior.output = `(?:${prior.output}`;
891
- prev.type = 'globstar';
892
- prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
893
941
  prev.value += value;
942
+
943
+ // reset output with globstar
944
+ state.output += prev.output;
894
945
  state.globstar = true;
895
- state.output += prior.output + prev.output;
896
946
  consume(value);
897
947
  continue;
898
948
  }
899
- if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
900
- const end = rest[1] !== void 0 ? '|$' : '';
901
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
902
- prior.output = `(?:${prior.output}`;
903
- prev.type = 'globstar';
904
- prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
905
- prev.value += value;
906
- state.output += prior.output + prev.output;
907
- state.globstar = true;
908
- consume(value + advance());
909
- push({
910
- type: 'slash',
911
- value: '/',
912
- output: ''
913
- });
949
+ const token = {
950
+ type: 'star',
951
+ value,
952
+ output: star
953
+ };
954
+ if (opts.bash === true) {
955
+ token.output = '.*?';
956
+ if (prev.type === 'bos' || prev.type === 'slash') {
957
+ token.output = nodot + token.output;
958
+ }
959
+ push(token);
914
960
  continue;
915
961
  }
916
- if (prior.type === 'bos' && rest[0] === '/') {
917
- prev.type = 'globstar';
918
- prev.value += value;
919
- prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
920
- state.output = prev.output;
921
- state.globstar = true;
922
- consume(value + advance());
923
- push({
924
- type: 'slash',
925
- value: '/',
926
- output: ''
927
- });
962
+ if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
963
+ token.output = value;
964
+ push(token);
928
965
  continue;
929
966
  }
930
-
931
- // remove single star from output
932
- state.output = state.output.slice(0, -prev.output.length);
933
-
934
- // reset previous token to globstar
935
- prev.type = 'globstar';
936
- prev.output = globstar(opts);
937
- prev.value += value;
938
-
939
- // reset output with globstar
940
- state.output += prev.output;
941
- state.globstar = true;
942
- consume(value);
943
- continue;
944
- }
945
- const token = {
946
- type: 'star',
947
- value,
948
- output: star
949
- };
950
- if (opts.bash === true) {
951
- token.output = '.*?';
952
- if (prev.type === 'bos' || prev.type === 'slash') {
953
- token.output = nodot + token.output;
967
+ if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
968
+ if (prev.type === 'dot') {
969
+ state.output += NO_DOT_SLASH;
970
+ prev.output += NO_DOT_SLASH;
971
+ } else if (opts.dot === true) {
972
+ state.output += NO_DOTS_SLASH;
973
+ prev.output += NO_DOTS_SLASH;
974
+ } else {
975
+ state.output += nodot;
976
+ prev.output += nodot;
977
+ }
978
+ if (peek() !== '*') {
979
+ state.output += ONE_CHAR;
980
+ prev.output += ONE_CHAR;
981
+ }
954
982
  }
955
983
  push(token);
956
- continue;
957
984
  }
958
- if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
959
- token.output = value;
960
- push(token);
961
- continue;
985
+ while (state.brackets > 0) {
986
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
987
+ state.output = utils.escapeLast(state.output, '[');
988
+ decrement('brackets');
962
989
  }
963
- if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
964
- if (prev.type === 'dot') {
965
- state.output += NO_DOT_SLASH;
966
- prev.output += NO_DOT_SLASH;
967
- } else if (opts.dot === true) {
968
- state.output += NO_DOTS_SLASH;
969
- prev.output += NO_DOTS_SLASH;
970
- } else {
971
- state.output += nodot;
972
- prev.output += nodot;
973
- }
974
- if (peek() !== '*') {
975
- state.output += ONE_CHAR;
976
- prev.output += ONE_CHAR;
977
- }
990
+ while (state.parens > 0) {
991
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
992
+ state.output = utils.escapeLast(state.output, '(');
993
+ decrement('parens');
978
994
  }
979
- push(token);
980
- }
981
- while (state.brackets > 0) {
982
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
983
- state.output = utils.escapeLast(state.output, '[');
984
- decrement('brackets');
985
- }
986
- while (state.parens > 0) {
987
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
988
- state.output = utils.escapeLast(state.output, '(');
989
- decrement('parens');
990
- }
991
- while (state.braces > 0) {
992
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
993
- state.output = utils.escapeLast(state.output, '{');
994
- decrement('braces');
995
- }
996
- if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
997
- push({
998
- type: 'maybe_slash',
999
- value: '',
1000
- output: `${SLASH_LITERAL}?`
1001
- });
1002
- }
1003
-
1004
- // rebuild the output if we had to backtrack at any point
1005
- if (state.backtrack === true) {
1006
- state.output = '';
1007
- for (const token of state.tokens) {
1008
- state.output += token.output != null ? token.output : token.value;
1009
- if (token.suffix) {
1010
- state.output += token.suffix;
995
+ while (state.braces > 0) {
996
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
997
+ state.output = utils.escapeLast(state.output, '{');
998
+ decrement('braces');
999
+ }
1000
+ if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
1001
+ push({
1002
+ type: 'maybe_slash',
1003
+ value: '',
1004
+ output: `${SLASH_LITERAL}?`
1005
+ });
1006
+ }
1007
+
1008
+ // rebuild the output if we had to backtrack at any point
1009
+ if (state.backtrack === true) {
1010
+ state.output = '';
1011
+ for (const token of state.tokens) {
1012
+ state.output += token.output != null ? token.output : token.value;
1013
+ if (token.suffix) {
1014
+ state.output += token.suffix;
1015
+ }
1011
1016
  }
1012
1017
  }
1013
- }
1014
- return state;
1015
- };
1016
-
1017
- /**
1018
- * Fast paths for creating regular expressions for common glob patterns.
1019
- * This can significantly speed up processing and has very little downside
1020
- * impact when none of the fast paths match.
1021
- */
1022
-
1023
- parse.fastpaths = (input, options) => {
1024
- const opts = {
1025
- ...options
1026
- };
1027
- const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
1028
- const len = input.length;
1029
- if (len > max) {
1030
- throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
1031
- }
1032
- input = REPLACEMENTS[input] || input;
1033
- const win32 = utils.isWindows(options);
1034
-
1035
- // create constants based on platform, for windows or posix
1036
- const {
1037
- DOT_LITERAL,
1038
- SLASH_LITERAL,
1039
- ONE_CHAR,
1040
- DOTS_SLASH,
1041
- NO_DOT,
1042
- NO_DOTS,
1043
- NO_DOTS_SLASH,
1044
- STAR,
1045
- START_ANCHOR
1046
- } = constants.globChars(win32);
1047
- const nodot = opts.dot ? NO_DOTS : NO_DOT;
1048
- const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
1049
- const capture = opts.capture ? '' : '?:';
1050
- const state = {
1051
- negated: false,
1052
- prefix: ''
1053
- };
1054
- let star = opts.bash === true ? '.*?' : STAR;
1055
- if (opts.capture) {
1056
- star = `(${star})`;
1057
- }
1058
- const globstar = opts => {
1059
- if (opts.noglobstar === true) return star;
1060
- return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
1018
+ return state;
1061
1019
  };
1062
- const create = str => {
1063
- switch (str) {
1064
- case '*':
1065
- return `${nodot}${ONE_CHAR}${star}`;
1066
- case '.*':
1067
- return `${DOT_LITERAL}${ONE_CHAR}${star}`;
1068
- case '*.*':
1069
- return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
1070
- case '*/*':
1071
- return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
1072
- case '**':
1073
- return nodot + globstar(opts);
1074
- case '**/*':
1075
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
1076
- case '**/*.*':
1077
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
1078
- case '**/.*':
1079
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
1080
- default:
1081
- {
1082
- const match = /^(.*?)\.(\w+)$/.exec(str);
1083
- if (!match) return;
1084
- const source = create(match[1]);
1085
- if (!source) return;
1086
- return source + DOT_LITERAL + match[2];
1087
- }
1020
+
1021
+ /**
1022
+ * Fast paths for creating regular expressions for common glob patterns.
1023
+ * This can significantly speed up processing and has very little downside
1024
+ * impact when none of the fast paths match.
1025
+ */
1026
+
1027
+ parse.fastpaths = (input, options) => {
1028
+ const opts = {
1029
+ ...options
1030
+ };
1031
+ const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
1032
+ const len = input.length;
1033
+ if (len > max) {
1034
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
1035
+ }
1036
+ input = REPLACEMENTS[input] || input;
1037
+ const win32 = utils.isWindows(options);
1038
+
1039
+ // create constants based on platform, for windows or posix
1040
+ const {
1041
+ DOT_LITERAL,
1042
+ SLASH_LITERAL,
1043
+ ONE_CHAR,
1044
+ DOTS_SLASH,
1045
+ NO_DOT,
1046
+ NO_DOTS,
1047
+ NO_DOTS_SLASH,
1048
+ STAR,
1049
+ START_ANCHOR
1050
+ } = constants.globChars(win32);
1051
+ const nodot = opts.dot ? NO_DOTS : NO_DOT;
1052
+ const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
1053
+ const capture = opts.capture ? '' : '?:';
1054
+ const state = {
1055
+ negated: false,
1056
+ prefix: ''
1057
+ };
1058
+ let star = opts.bash === true ? '.*?' : STAR;
1059
+ if (opts.capture) {
1060
+ star = `(${star})`;
1088
1061
  }
1062
+ const globstar = opts => {
1063
+ if (opts.noglobstar === true) return star;
1064
+ return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
1065
+ };
1066
+ const create = str => {
1067
+ switch (str) {
1068
+ case '*':
1069
+ return `${nodot}${ONE_CHAR}${star}`;
1070
+ case '.*':
1071
+ return `${DOT_LITERAL}${ONE_CHAR}${star}`;
1072
+ case '*.*':
1073
+ return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
1074
+ case '*/*':
1075
+ return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
1076
+ case '**':
1077
+ return nodot + globstar(opts);
1078
+ case '**/*':
1079
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
1080
+ case '**/*.*':
1081
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
1082
+ case '**/.*':
1083
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
1084
+ default:
1085
+ {
1086
+ const match = /^(.*?)\.(\w+)$/.exec(str);
1087
+ if (!match) return;
1088
+ const source = create(match[1]);
1089
+ if (!source) return;
1090
+ return source + DOT_LITERAL + match[2];
1091
+ }
1092
+ }
1093
+ };
1094
+ const output = utils.removePrefix(input, state);
1095
+ let source = create(output);
1096
+ if (source && opts.strictSlashes !== true) {
1097
+ source += `${SLASH_LITERAL}?`;
1098
+ }
1099
+ return source;
1089
1100
  };
1090
- const output = utils.removePrefix(input, state);
1091
- let source = create(output);
1092
- if (source && opts.strictSlashes !== true) {
1093
- source += `${SLASH_LITERAL}?`;
1094
- }
1095
- return source;
1096
- };
1097
- var parse_1 = parse;
1098
-
1099
- export { parse_1 };
1101
+ parse_1 = parse;
1102
+ return parse_1;
1103
+ }
1104
+
1105
+ export { requireParse as __require };