@uides/stepwise 2.0.0-rc.32 → 2.0.2

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 (782) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/LICENSE +0 -0
  3. package/generators/componentExtractor.d.mts +1 -0
  4. package/generators/componentReducer.d.mts +1 -0
  5. package/generators/node_modules/@isaacs/cliui/build/lib/index.js +211 -0
  6. package/generators/node_modules/@pkgjs/parseargs/examples/is-default-value.js +31 -0
  7. package/generators/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js +33 -0
  8. package/generators/node_modules/@pkgjs/parseargs/examples/negate.js +48 -0
  9. package/generators/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js +38 -0
  10. package/generators/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js +36 -0
  11. package/generators/node_modules/@pkgjs/parseargs/index.js +263 -0
  12. package/generators/node_modules/@pkgjs/parseargs/internal/errors.js +55 -0
  13. package/generators/node_modules/@pkgjs/parseargs/internal/primordials.js +258 -0
  14. package/generators/node_modules/@pkgjs/parseargs/internal/util.js +24 -0
  15. package/generators/node_modules/@pkgjs/parseargs/internal/validators.js +61 -0
  16. package/generators/node_modules/@pkgjs/parseargs/utils.js +86 -0
  17. package/generators/node_modules/ansi-regex/index.js +5 -0
  18. package/generators/node_modules/ansi-styles/index.js +304 -0
  19. package/generators/node_modules/balanced-match/index.js +70 -0
  20. package/generators/node_modules/brace-expansion/index.js +153 -0
  21. package/generators/node_modules/change-case/dist/index.js +135 -0
  22. package/generators/node_modules/change-case/dist/keys.js +28 -0
  23. package/generators/node_modules/color-convert/conversions.js +840 -0
  24. package/generators/node_modules/color-convert/index.js +66 -0
  25. package/generators/node_modules/color-convert/route.js +81 -0
  26. package/generators/node_modules/color-name/index.js +757 -0
  27. package/generators/node_modules/cross-spawn/index.js +47 -0
  28. package/generators/node_modules/cross-spawn/lib/enoent.js +50 -0
  29. package/generators/node_modules/cross-spawn/lib/parse.js +91 -0
  30. package/generators/node_modules/cross-spawn/lib/util/escape.js +31 -0
  31. package/generators/node_modules/cross-spawn/lib/util/readShebang.js +37 -0
  32. package/generators/node_modules/cross-spawn/lib/util/resolveCommand.js +56 -0
  33. package/generators/node_modules/eastasianwidth/eastasianwidth.js +66 -0
  34. package/generators/node_modules/emoji-regex/RGI_Emoji.js +18 -0
  35. package/generators/node_modules/emoji-regex/es2015/RGI_Emoji.js +16 -0
  36. package/generators/node_modules/emoji-regex/es2015/index.js +16 -0
  37. package/generators/node_modules/emoji-regex/es2015/text.js +16 -0
  38. package/generators/node_modules/emoji-regex/index.js +18 -0
  39. package/generators/node_modules/emoji-regex/text.js +18 -0
  40. package/generators/node_modules/flat/cli.js +31 -0
  41. package/generators/node_modules/flat/index.js +83 -0
  42. package/generators/node_modules/foreground-child/dist/cjs/all-signals.js +30 -0
  43. package/generators/node_modules/foreground-child/dist/cjs/index.js +156 -0
  44. package/generators/node_modules/foreground-child/dist/cjs/watchdog.js +63 -0
  45. package/generators/node_modules/foreground-child/dist/mjs/all-signals.js +3 -0
  46. package/generators/node_modules/foreground-child/dist/mjs/index.js +111 -0
  47. package/generators/node_modules/foreground-child/dist/mjs/watchdog.js +39 -0
  48. package/generators/node_modules/glob/dist/commonjs/glob.js +205 -0
  49. package/generators/node_modules/glob/dist/commonjs/has-magic.js +33 -0
  50. package/generators/node_modules/glob/dist/commonjs/ignore.js +87 -0
  51. package/generators/node_modules/glob/dist/commonjs/index.js +114 -0
  52. package/generators/node_modules/glob/dist/commonjs/pattern.js +154 -0
  53. package/generators/node_modules/glob/dist/commonjs/processor.js +214 -0
  54. package/generators/node_modules/glob/dist/commonjs/walker.js +271 -0
  55. package/generators/node_modules/glob/dist/esm/glob.js +165 -0
  56. package/generators/node_modules/glob/dist/esm/has-magic.js +9 -0
  57. package/generators/node_modules/glob/dist/esm/ignore.js +59 -0
  58. package/generators/node_modules/glob/dist/esm/index.js +52 -0
  59. package/generators/node_modules/glob/dist/esm/pattern.js +130 -0
  60. package/generators/node_modules/glob/dist/esm/processor.js +187 -0
  61. package/generators/node_modules/glob/dist/esm/walker.js +237 -0
  62. package/generators/node_modules/is-fullwidth-code-point/index.js +22 -0
  63. package/generators/node_modules/isexe/index.js +64 -0
  64. package/generators/node_modules/isexe/mode.js +46 -0
  65. package/generators/node_modules/isexe/test/basic.js +229 -0
  66. package/generators/node_modules/isexe/windows.js +45 -0
  67. package/generators/node_modules/jackspeak/dist/commonjs/index.js +683 -0
  68. package/generators/node_modules/jackspeak/dist/commonjs/parse-args.js +65 -0
  69. package/generators/node_modules/jackspeak/dist/esm/index.js +640 -0
  70. package/generators/node_modules/jackspeak/dist/esm/parse-args.js +127 -0
  71. package/generators/node_modules/lru-cache/dist/commonjs/index.js +889 -0
  72. package/generators/node_modules/lru-cache/dist/esm/index.js +881 -0
  73. package/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +14 -0
  74. package/generators/node_modules/minimatch/dist/cjs/ast.js +389 -0
  75. package/generators/node_modules/minimatch/dist/cjs/brace-expressions.js +169 -0
  76. package/generators/node_modules/minimatch/dist/cjs/escape.js +10 -0
  77. package/generators/node_modules/minimatch/dist/cjs/index.js +680 -0
  78. package/generators/node_modules/minimatch/dist/cjs/unescape.js +10 -0
  79. package/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +6 -0
  80. package/generators/node_modules/minimatch/dist/mjs/ast.js +361 -0
  81. package/generators/node_modules/minimatch/dist/mjs/brace-expressions.js +161 -0
  82. package/generators/node_modules/minimatch/dist/mjs/escape.js +2 -0
  83. package/generators/node_modules/minimatch/dist/mjs/index.js +612 -0
  84. package/generators/node_modules/minimatch/dist/mjs/unescape.js +2 -0
  85. package/generators/node_modules/minipass/dist/commonjs/index.js +623 -0
  86. package/generators/node_modules/minipass/dist/esm/index.js +584 -0
  87. package/generators/node_modules/path-key/index.js +23 -0
  88. package/generators/node_modules/path-scurry/dist/cjs/index.js +1161 -0
  89. package/generators/node_modules/path-scurry/dist/mjs/index.js +1078 -0
  90. package/generators/node_modules/shebang-command/index.js +28 -0
  91. package/generators/node_modules/shebang-regex/index.js +16 -0
  92. package/generators/node_modules/signal-exit/dist/cjs/browser.js +14 -0
  93. package/generators/node_modules/signal-exit/dist/cjs/index.js +176 -0
  94. package/generators/node_modules/signal-exit/dist/cjs/signals.js +14 -0
  95. package/generators/node_modules/signal-exit/dist/mjs/browser.js +4 -0
  96. package/generators/node_modules/signal-exit/dist/mjs/index.js +146 -0
  97. package/generators/node_modules/signal-exit/dist/mjs/signals.js +5 -0
  98. package/generators/node_modules/string-width/index.js +34 -0
  99. package/generators/node_modules/string-width-cjs/index.js +49 -0
  100. package/generators/node_modules/string-width-cjs/node_modules/ansi-regex/index.js +19 -0
  101. package/generators/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/index.js +16 -0
  102. package/generators/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/text.js +16 -0
  103. package/generators/node_modules/string-width-cjs/node_modules/emoji-regex/index.js +18 -0
  104. package/generators/node_modules/string-width-cjs/node_modules/emoji-regex/text.js +18 -0
  105. package/generators/node_modules/string-width-cjs/node_modules/strip-ansi/index.js +21 -0
  106. package/generators/node_modules/strip-ansi/index.js +7 -0
  107. package/generators/node_modules/strip-ansi-cjs/index.js +21 -0
  108. package/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js +19 -0
  109. package/generators/node_modules/which/which.js +108 -0
  110. package/generators/node_modules/wrap-ansi/index.js +134 -0
  111. package/generators/node_modules/wrap-ansi-cjs/index.js +158 -0
  112. package/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js +19 -0
  113. package/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.js +281 -0
  114. package/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/index.js +16 -0
  115. package/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/text.js +16 -0
  116. package/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.js +18 -0
  117. package/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/text.js +18 -0
  118. package/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/index.js +49 -0
  119. package/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js +21 -0
  120. package/generators/templateGenerator.d.mts +1 -0
  121. package/index.d.ts +2 -0
  122. package/index.js +7 -0
  123. package/package.json +6 -21
  124. package/schemas/action.d.ts +2366 -0
  125. package/schemas/action.js +196 -0
  126. package/schemas/application.d.ts +19 -0
  127. package/schemas/application.js +14 -0
  128. package/schemas/attributes.d.ts +16 -0
  129. package/schemas/attributes.js +14 -0
  130. package/schemas/common.d.ts +25 -0
  131. package/schemas/common.js +41 -0
  132. package/schemas/document.d.ts +395 -0
  133. package/schemas/document.js +79 -0
  134. package/schemas/edupass-healthstate.d.ts +77 -0
  135. package/schemas/edupass-healthstate.js +76 -0
  136. package/schemas/field/afm/index.d.ts +52 -0
  137. package/schemas/field/afm/index.js +20 -0
  138. package/schemas/field/amka/index.d.ts +60 -0
  139. package/schemas/field/amka/index.js +21 -0
  140. package/schemas/field/attachment/index.d.ts +68 -0
  141. package/schemas/field/attachment/index.js +38 -0
  142. package/schemas/field/captcha/index.d.ts +48 -0
  143. package/schemas/field/captcha/index.js +15 -0
  144. package/schemas/field/choice/index.d.ts +73 -0
  145. package/schemas/field/choice/index.js +32 -0
  146. package/schemas/field/common.d.ts +82 -0
  147. package/schemas/field/common.js +63 -0
  148. package/schemas/field/consent-content/index.d.ts +68 -0
  149. package/schemas/field/consent-content/index.js +19 -0
  150. package/schemas/field/date/index.d.ts +90 -0
  151. package/schemas/field/date/index.js +42 -0
  152. package/schemas/field/doc_subtitle/index.d.ts +51 -0
  153. package/schemas/field/doc_subtitle/index.js +14 -0
  154. package/schemas/field/doc_title/index.d.ts +60 -0
  155. package/schemas/field/doc_title/index.js +21 -0
  156. package/schemas/field/dynamically-filled-text/index.d.ts +85 -0
  157. package/schemas/field/dynamically-filled-text/index.js +36 -0
  158. package/schemas/field/email/index.d.ts +60 -0
  159. package/schemas/field/email/index.js +21 -0
  160. package/schemas/field/fillable-string/index.d.ts +64 -0
  161. package/schemas/field/fillable-string/index.js +25 -0
  162. package/schemas/field/five-block-date/index.d.ts +48 -0
  163. package/schemas/field/five-block-date/index.js +15 -0
  164. package/schemas/field/hidden/index.d.ts +59 -0
  165. package/schemas/field/hidden/index.js +25 -0
  166. package/schemas/field/hierarchical-selector/index.d.ts +89 -0
  167. package/schemas/field/hierarchical-selector/index.js +35 -0
  168. package/schemas/field/iban/index.d.ts +58 -0
  169. package/schemas/field/iban/index.js +19 -0
  170. package/schemas/field/image/index.d.ts +68 -0
  171. package/schemas/field/image/index.js +36 -0
  172. package/schemas/field/image-crop/index.d.ts +59 -0
  173. package/schemas/field/image-crop/index.js +19 -0
  174. package/schemas/field/index.d.ts +48 -0
  175. package/schemas/field/index.js +167 -0
  176. package/schemas/field/int/index.d.ts +60 -0
  177. package/schemas/field/int/index.js +21 -0
  178. package/schemas/field/intl_mobile_phone/index.d.ts +49 -0
  179. package/schemas/field/intl_mobile_phone/index.js +15 -0
  180. package/schemas/field/lab-results/index.d.ts +49 -0
  181. package/schemas/field/lab-results/index.js +12 -0
  182. package/schemas/field/landline_phone/index.d.ts +48 -0
  183. package/schemas/field/landline_phone/index.js +14 -0
  184. package/schemas/field/link/index.d.ts +50 -0
  185. package/schemas/field/link/index.js +16 -0
  186. package/schemas/field/mobile_phone/index.d.ts +51 -0
  187. package/schemas/field/mobile_phone/index.js +18 -0
  188. package/schemas/field/multiple-choice/index.d.ts +70 -0
  189. package/schemas/field/multiple-choice/index.js +31 -0
  190. package/schemas/field/password/index.d.ts +48 -0
  191. package/schemas/field/password/index.js +15 -0
  192. package/schemas/field/pdf-image/index.d.ts +66 -0
  193. package/schemas/field/pdf-image/index.js +27 -0
  194. package/schemas/field/phone/index.d.ts +48 -0
  195. package/schemas/field/phone/index.js +14 -0
  196. package/schemas/field/postal_code/index.d.ts +50 -0
  197. package/schemas/field/postal_code/index.js +17 -0
  198. package/schemas/field/preference-multiple-choice/index.d.ts +90 -0
  199. package/schemas/field/preference-multiple-choice/index.js +31 -0
  200. package/schemas/field/qrcode/index.d.ts +71 -0
  201. package/schemas/field/qrcode/index.js +30 -0
  202. package/schemas/field/quote/index.d.ts +63 -0
  203. package/schemas/field/quote/index.js +30 -0
  204. package/schemas/field/radio-choice/index.d.ts +67 -0
  205. package/schemas/field/radio-choice/index.js +31 -0
  206. package/schemas/field/rate/index.d.ts +60 -0
  207. package/schemas/field/rate/index.js +18 -0
  208. package/schemas/field/recipient/index.d.ts +51 -0
  209. package/schemas/field/recipient/index.js +20 -0
  210. package/schemas/field/redirect/index.d.ts +52 -0
  211. package/schemas/field/redirect/index.js +15 -0
  212. package/schemas/field/refcode/index.d.ts +68 -0
  213. package/schemas/field/refcode/index.js +29 -0
  214. package/schemas/field/string/index.d.ts +135 -0
  215. package/schemas/field/string/index.js +80 -0
  216. package/schemas/field/text/index.d.ts +85 -0
  217. package/schemas/field/text/index.js +45 -0
  218. package/schemas/field/three-block-date/index.d.ts +64 -0
  219. package/schemas/field/three-block-date/index.js +26 -0
  220. package/schemas/field/url-param/index.d.ts +57 -0
  221. package/schemas/field/url-param/index.js +14 -0
  222. package/schemas/fieldset/component-params.d.ts +102 -0
  223. package/schemas/fieldset/component-params.js +63 -0
  224. package/schemas/fieldset/display-components.d.ts +353 -0
  225. package/schemas/fieldset/display-components.js +36 -0
  226. package/schemas/fieldset/enums.d.ts +32 -0
  227. package/schemas/fieldset/enums.js +21 -0
  228. package/schemas/fieldset/index.d.ts +180 -0
  229. package/schemas/fieldset/index.js +11 -0
  230. package/schemas/index.d.ts +15 -0
  231. package/schemas/index.js +15 -0
  232. package/schemas/layout.d.ts +91 -0
  233. package/schemas/layout.js +43 -0
  234. package/schemas/outputs.d.ts +44 -0
  235. package/schemas/outputs.js +15 -0
  236. package/schemas/resolve.d.ts +5 -0
  237. package/schemas/resolve.js +13 -0
  238. package/schemas/resource/enums.d.ts +58 -0
  239. package/schemas/resource/enums.js +41 -0
  240. package/schemas/resource/field.d.ts +15 -0
  241. package/schemas/resource/field.js +12 -0
  242. package/schemas/resource/index.d.ts +5 -0
  243. package/schemas/resource/index.js +5 -0
  244. package/schemas/resource/object-action.d.ts +30 -0
  245. package/schemas/resource/object-action.js +24 -0
  246. package/schemas/resource/resource-action.d.ts +35 -0
  247. package/schemas/resource/resource-action.js +29 -0
  248. package/schemas/resource/resource.d.ts +133 -0
  249. package/schemas/resource/resource.js +31 -0
  250. package/schemas/step.d.ts +592 -0
  251. package/schemas/step.js +115 -0
  252. package/schemas/template/index.d.ts +2 -0
  253. package/schemas/template/index.js +2 -0
  254. package/schemas/template/template-base.d.ts +53 -0
  255. package/schemas/template/template-base.js +15 -0
  256. package/schemas/template/template-source.d.ts +50 -0
  257. package/schemas/template/template-source.js +14 -0
  258. package/schemas/template/template.d.ts +54 -0
  259. package/schemas/template/template.js +22 -0
  260. package/schemas/validation-context/enums.d.ts +10 -0
  261. package/schemas/validation-context/enums.js +7 -0
  262. package/schemas/validation-context/index.d.ts +2 -0
  263. package/schemas/validation-context/index.js +2 -0
  264. package/schemas/validation-context/validation-context.d.ts +131 -0
  265. package/schemas/validation-context/validation-context.js +55 -0
  266. package/src/generators/node_modules/.package-lock.json +458 -0
  267. package/src/generators/node_modules/@isaacs/cliui/LICENSE.txt +14 -0
  268. package/src/generators/node_modules/@isaacs/cliui/README.md +143 -0
  269. package/src/generators/node_modules/@isaacs/cliui/build/index.cjs +317 -0
  270. package/src/generators/node_modules/@isaacs/cliui/build/index.d.cts +43 -0
  271. package/src/generators/node_modules/@isaacs/cliui/build/lib/index.js +302 -0
  272. package/src/generators/node_modules/@isaacs/cliui/index.mjs +14 -0
  273. package/src/generators/node_modules/@isaacs/cliui/package.json +86 -0
  274. package/src/generators/node_modules/@pkgjs/parseargs/.editorconfig +14 -0
  275. package/src/generators/node_modules/@pkgjs/parseargs/CHANGELOG.md +147 -0
  276. package/src/generators/node_modules/@pkgjs/parseargs/LICENSE +201 -0
  277. package/src/generators/node_modules/@pkgjs/parseargs/README.md +413 -0
  278. package/src/generators/node_modules/@pkgjs/parseargs/examples/is-default-value.js +25 -0
  279. package/src/generators/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js +35 -0
  280. package/src/generators/node_modules/@pkgjs/parseargs/examples/negate.js +43 -0
  281. package/src/generators/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js +31 -0
  282. package/src/generators/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs +41 -0
  283. package/src/generators/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js +26 -0
  284. package/src/generators/node_modules/@pkgjs/parseargs/index.js +396 -0
  285. package/src/generators/node_modules/@pkgjs/parseargs/internal/errors.js +47 -0
  286. package/src/generators/node_modules/@pkgjs/parseargs/internal/primordials.js +393 -0
  287. package/src/generators/node_modules/@pkgjs/parseargs/internal/util.js +14 -0
  288. package/src/generators/node_modules/@pkgjs/parseargs/internal/validators.js +89 -0
  289. package/src/generators/node_modules/@pkgjs/parseargs/package.json +36 -0
  290. package/src/generators/node_modules/@pkgjs/parseargs/utils.js +198 -0
  291. package/src/generators/node_modules/ansi-regex/index.d.ts +33 -0
  292. package/src/generators/node_modules/ansi-regex/index.js +8 -0
  293. package/src/generators/node_modules/ansi-regex/license +9 -0
  294. package/src/generators/node_modules/ansi-regex/package.json +58 -0
  295. package/src/generators/node_modules/ansi-regex/readme.md +72 -0
  296. package/src/generators/node_modules/ansi-styles/index.d.ts +236 -0
  297. package/src/generators/node_modules/ansi-styles/index.js +223 -0
  298. package/src/generators/node_modules/ansi-styles/license +9 -0
  299. package/src/generators/node_modules/ansi-styles/package.json +54 -0
  300. package/src/generators/node_modules/ansi-styles/readme.md +173 -0
  301. package/src/generators/node_modules/balanced-match/.github/FUNDING.yml +2 -0
  302. package/src/generators/node_modules/balanced-match/LICENSE.md +21 -0
  303. package/src/generators/node_modules/balanced-match/README.md +97 -0
  304. package/src/generators/node_modules/balanced-match/index.js +62 -0
  305. package/src/generators/node_modules/balanced-match/package.json +48 -0
  306. package/src/generators/node_modules/brace-expansion/.github/FUNDING.yml +2 -0
  307. package/src/generators/node_modules/brace-expansion/LICENSE +21 -0
  308. package/src/generators/node_modules/brace-expansion/README.md +135 -0
  309. package/src/generators/node_modules/brace-expansion/index.js +203 -0
  310. package/src/generators/node_modules/brace-expansion/package.json +46 -0
  311. package/src/generators/node_modules/change-case/README.md +78 -0
  312. package/src/generators/node_modules/change-case/dist/index.d.ts +78 -0
  313. package/src/generators/node_modules/change-case/dist/index.js +206 -0
  314. package/src/generators/node_modules/change-case/dist/index.js.map +1 -0
  315. package/src/generators/node_modules/change-case/dist/keys.d.ts +11 -0
  316. package/src/generators/node_modules/change-case/dist/keys.js +31 -0
  317. package/src/generators/node_modules/change-case/dist/keys.js.map +1 -0
  318. package/src/generators/node_modules/change-case/package.json +56 -0
  319. package/src/generators/node_modules/color-convert/CHANGELOG.md +54 -0
  320. package/src/generators/node_modules/color-convert/LICENSE +21 -0
  321. package/src/generators/node_modules/color-convert/README.md +68 -0
  322. package/src/generators/node_modules/color-convert/conversions.js +839 -0
  323. package/src/generators/node_modules/color-convert/index.js +81 -0
  324. package/src/generators/node_modules/color-convert/package.json +48 -0
  325. package/src/generators/node_modules/color-convert/route.js +97 -0
  326. package/src/generators/node_modules/color-name/LICENSE +8 -0
  327. package/src/generators/node_modules/color-name/README.md +11 -0
  328. package/src/generators/node_modules/color-name/index.js +152 -0
  329. package/src/generators/node_modules/color-name/package.json +28 -0
  330. package/src/generators/node_modules/cross-spawn/CHANGELOG.md +130 -0
  331. package/src/generators/node_modules/cross-spawn/LICENSE +21 -0
  332. package/src/generators/node_modules/cross-spawn/README.md +96 -0
  333. package/src/generators/node_modules/cross-spawn/index.js +39 -0
  334. package/src/generators/node_modules/cross-spawn/lib/enoent.js +59 -0
  335. package/src/generators/node_modules/cross-spawn/lib/parse.js +91 -0
  336. package/src/generators/node_modules/cross-spawn/lib/util/escape.js +45 -0
  337. package/src/generators/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
  338. package/src/generators/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
  339. package/src/generators/node_modules/cross-spawn/package.json +73 -0
  340. package/src/generators/node_modules/eastasianwidth/README.md +32 -0
  341. package/src/generators/node_modules/eastasianwidth/eastasianwidth.js +311 -0
  342. package/src/generators/node_modules/eastasianwidth/package.json +18 -0
  343. package/src/generators/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  344. package/src/generators/node_modules/emoji-regex/README.md +137 -0
  345. package/src/generators/node_modules/emoji-regex/RGI_Emoji.d.ts +5 -0
  346. package/src/generators/node_modules/emoji-regex/RGI_Emoji.js +6 -0
  347. package/src/generators/node_modules/emoji-regex/es2015/RGI_Emoji.d.ts +5 -0
  348. package/src/generators/node_modules/emoji-regex/es2015/RGI_Emoji.js +6 -0
  349. package/src/generators/node_modules/emoji-regex/es2015/index.d.ts +5 -0
  350. package/src/generators/node_modules/emoji-regex/es2015/index.js +6 -0
  351. package/src/generators/node_modules/emoji-regex/es2015/text.d.ts +5 -0
  352. package/src/generators/node_modules/emoji-regex/es2015/text.js +6 -0
  353. package/src/generators/node_modules/emoji-regex/index.d.ts +5 -0
  354. package/src/generators/node_modules/emoji-regex/index.js +6 -0
  355. package/src/generators/node_modules/emoji-regex/package.json +52 -0
  356. package/src/generators/node_modules/emoji-regex/text.d.ts +5 -0
  357. package/src/generators/node_modules/emoji-regex/text.js +6 -0
  358. package/src/generators/node_modules/flat/LICENSE +12 -0
  359. package/src/generators/node_modules/flat/README.md +234 -0
  360. package/src/generators/node_modules/flat/cli.js +40 -0
  361. package/src/generators/node_modules/flat/index.d.ts +17 -0
  362. package/src/generators/node_modules/flat/index.js +157 -0
  363. package/src/generators/node_modules/flat/package.json +49 -0
  364. package/src/generators/node_modules/foreground-child/LICENSE +15 -0
  365. package/src/generators/node_modules/foreground-child/README.md +90 -0
  366. package/src/generators/node_modules/foreground-child/dist/cjs/all-signals.d.ts +3 -0
  367. package/src/generators/node_modules/foreground-child/dist/cjs/all-signals.d.ts.map +1 -0
  368. package/src/generators/node_modules/foreground-child/dist/cjs/all-signals.js +58 -0
  369. package/src/generators/node_modules/foreground-child/dist/cjs/all-signals.js.map +1 -0
  370. package/src/generators/node_modules/foreground-child/dist/cjs/index.d.ts +54 -0
  371. package/src/generators/node_modules/foreground-child/dist/cjs/index.d.ts.map +1 -0
  372. package/src/generators/node_modules/foreground-child/dist/cjs/index.js +154 -0
  373. package/src/generators/node_modules/foreground-child/dist/cjs/index.js.map +1 -0
  374. package/src/generators/node_modules/foreground-child/dist/cjs/package.json +3 -0
  375. package/src/generators/node_modules/foreground-child/dist/cjs/watchdog.d.ts +4 -0
  376. package/src/generators/node_modules/foreground-child/dist/cjs/watchdog.d.ts.map +1 -0
  377. package/src/generators/node_modules/foreground-child/dist/cjs/watchdog.js +43 -0
  378. package/src/generators/node_modules/foreground-child/dist/cjs/watchdog.js.map +1 -0
  379. package/src/generators/node_modules/foreground-child/dist/mjs/all-signals.d.ts +3 -0
  380. package/src/generators/node_modules/foreground-child/dist/mjs/all-signals.d.ts.map +1 -0
  381. package/src/generators/node_modules/foreground-child/dist/mjs/all-signals.js +52 -0
  382. package/src/generators/node_modules/foreground-child/dist/mjs/all-signals.js.map +1 -0
  383. package/src/generators/node_modules/foreground-child/dist/mjs/index.d.ts +54 -0
  384. package/src/generators/node_modules/foreground-child/dist/mjs/index.d.ts.map +1 -0
  385. package/src/generators/node_modules/foreground-child/dist/mjs/index.js +146 -0
  386. package/src/generators/node_modules/foreground-child/dist/mjs/index.js.map +1 -0
  387. package/src/generators/node_modules/foreground-child/dist/mjs/package.json +3 -0
  388. package/src/generators/node_modules/foreground-child/dist/mjs/watchdog.d.ts +4 -0
  389. package/src/generators/node_modules/foreground-child/dist/mjs/watchdog.d.ts.map +1 -0
  390. package/src/generators/node_modules/foreground-child/dist/mjs/watchdog.js +39 -0
  391. package/src/generators/node_modules/foreground-child/dist/mjs/watchdog.js.map +1 -0
  392. package/src/generators/node_modules/foreground-child/package.json +83 -0
  393. package/src/generators/node_modules/glob/LICENSE +15 -0
  394. package/src/generators/node_modules/glob/README.md +1214 -0
  395. package/src/generators/node_modules/glob/dist/commonjs/glob.d.ts +344 -0
  396. package/src/generators/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -0
  397. package/src/generators/node_modules/glob/dist/commonjs/glob.js +243 -0
  398. package/src/generators/node_modules/glob/dist/commonjs/glob.js.map +1 -0
  399. package/src/generators/node_modules/glob/dist/commonjs/has-magic.d.ts +14 -0
  400. package/src/generators/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -0
  401. package/src/generators/node_modules/glob/dist/commonjs/has-magic.js +27 -0
  402. package/src/generators/node_modules/glob/dist/commonjs/has-magic.js.map +1 -0
  403. package/src/generators/node_modules/glob/dist/commonjs/ignore.d.ts +20 -0
  404. package/src/generators/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -0
  405. package/src/generators/node_modules/glob/dist/commonjs/ignore.js +108 -0
  406. package/src/generators/node_modules/glob/dist/commonjs/ignore.js.map +1 -0
  407. package/src/generators/node_modules/glob/dist/commonjs/index.d.ts +96 -0
  408. package/src/generators/node_modules/glob/dist/commonjs/index.d.ts.map +1 -0
  409. package/src/generators/node_modules/glob/dist/commonjs/index.js +68 -0
  410. package/src/generators/node_modules/glob/dist/commonjs/index.js.map +1 -0
  411. package/src/generators/node_modules/glob/dist/commonjs/package.json +1 -0
  412. package/src/generators/node_modules/glob/dist/commonjs/pattern.d.ts +77 -0
  413. package/src/generators/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -0
  414. package/src/generators/node_modules/glob/dist/commonjs/pattern.js +219 -0
  415. package/src/generators/node_modules/glob/dist/commonjs/pattern.js.map +1 -0
  416. package/src/generators/node_modules/glob/dist/commonjs/processor.d.ts +59 -0
  417. package/src/generators/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -0
  418. package/src/generators/node_modules/glob/dist/commonjs/processor.js +302 -0
  419. package/src/generators/node_modules/glob/dist/commonjs/processor.js.map +1 -0
  420. package/src/generators/node_modules/glob/dist/commonjs/walker.d.ts +96 -0
  421. package/src/generators/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -0
  422. package/src/generators/node_modules/glob/dist/commonjs/walker.js +358 -0
  423. package/src/generators/node_modules/glob/dist/commonjs/walker.js.map +1 -0
  424. package/src/generators/node_modules/glob/dist/esm/bin.d.mts +3 -0
  425. package/src/generators/node_modules/glob/dist/esm/bin.d.mts.map +1 -0
  426. package/src/generators/node_modules/glob/dist/esm/bin.mjs +275 -0
  427. package/src/generators/node_modules/glob/dist/esm/bin.mjs.map +1 -0
  428. package/src/generators/node_modules/glob/dist/esm/glob.d.ts +344 -0
  429. package/src/generators/node_modules/glob/dist/esm/glob.d.ts.map +1 -0
  430. package/src/generators/node_modules/glob/dist/esm/glob.js +239 -0
  431. package/src/generators/node_modules/glob/dist/esm/glob.js.map +1 -0
  432. package/src/generators/node_modules/glob/dist/esm/has-magic.d.ts +14 -0
  433. package/src/generators/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -0
  434. package/src/generators/node_modules/glob/dist/esm/has-magic.js +23 -0
  435. package/src/generators/node_modules/glob/dist/esm/has-magic.js.map +1 -0
  436. package/src/generators/node_modules/glob/dist/esm/ignore.d.ts +20 -0
  437. package/src/generators/node_modules/glob/dist/esm/ignore.d.ts.map +1 -0
  438. package/src/generators/node_modules/glob/dist/esm/ignore.js +104 -0
  439. package/src/generators/node_modules/glob/dist/esm/ignore.js.map +1 -0
  440. package/src/generators/node_modules/glob/dist/esm/index.d.ts +96 -0
  441. package/src/generators/node_modules/glob/dist/esm/index.d.ts.map +1 -0
  442. package/src/generators/node_modules/glob/dist/esm/index.js +56 -0
  443. package/src/generators/node_modules/glob/dist/esm/index.js.map +1 -0
  444. package/src/generators/node_modules/glob/dist/esm/package.json +1 -0
  445. package/src/generators/node_modules/glob/dist/esm/pattern.d.ts +77 -0
  446. package/src/generators/node_modules/glob/dist/esm/pattern.d.ts.map +1 -0
  447. package/src/generators/node_modules/glob/dist/esm/pattern.js +215 -0
  448. package/src/generators/node_modules/glob/dist/esm/pattern.js.map +1 -0
  449. package/src/generators/node_modules/glob/dist/esm/processor.d.ts +59 -0
  450. package/src/generators/node_modules/glob/dist/esm/processor.d.ts.map +1 -0
  451. package/src/generators/node_modules/glob/dist/esm/processor.js +295 -0
  452. package/src/generators/node_modules/glob/dist/esm/processor.js.map +1 -0
  453. package/src/generators/node_modules/glob/dist/esm/walker.d.ts +96 -0
  454. package/src/generators/node_modules/glob/dist/esm/walker.d.ts.map +1 -0
  455. package/src/generators/node_modules/glob/dist/esm/walker.js +352 -0
  456. package/src/generators/node_modules/glob/dist/esm/walker.js.map +1 -0
  457. package/src/generators/node_modules/glob/package.json +97 -0
  458. package/src/generators/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  459. package/src/generators/node_modules/is-fullwidth-code-point/index.js +50 -0
  460. package/src/generators/node_modules/is-fullwidth-code-point/license +9 -0
  461. package/src/generators/node_modules/is-fullwidth-code-point/package.json +42 -0
  462. package/src/generators/node_modules/is-fullwidth-code-point/readme.md +39 -0
  463. package/src/generators/node_modules/isexe/LICENSE +15 -0
  464. package/src/generators/node_modules/isexe/README.md +51 -0
  465. package/src/generators/node_modules/isexe/index.js +57 -0
  466. package/src/generators/node_modules/isexe/mode.js +41 -0
  467. package/src/generators/node_modules/isexe/package.json +31 -0
  468. package/src/generators/node_modules/isexe/test/basic.js +221 -0
  469. package/src/generators/node_modules/isexe/windows.js +42 -0
  470. package/src/generators/node_modules/jackspeak/LICENSE.md +55 -0
  471. package/src/generators/node_modules/jackspeak/README.md +348 -0
  472. package/src/generators/node_modules/jackspeak/dist/commonjs/index.d.ts +292 -0
  473. package/src/generators/node_modules/jackspeak/dist/commonjs/index.d.ts.map +1 -0
  474. package/src/generators/node_modules/jackspeak/dist/commonjs/index.js +850 -0
  475. package/src/generators/node_modules/jackspeak/dist/commonjs/index.js.map +1 -0
  476. package/src/generators/node_modules/jackspeak/dist/commonjs/package.json +1 -0
  477. package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args-cjs.cjs.map +1 -0
  478. package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args-cjs.d.cts.map +1 -0
  479. package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args.d.ts +4 -0
  480. package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args.d.ts.map +1 -0
  481. package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args.js +50 -0
  482. package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args.js.map +1 -0
  483. package/src/generators/node_modules/jackspeak/dist/esm/index.d.ts +292 -0
  484. package/src/generators/node_modules/jackspeak/dist/esm/index.d.ts.map +1 -0
  485. package/src/generators/node_modules/jackspeak/dist/esm/index.js +840 -0
  486. package/src/generators/node_modules/jackspeak/dist/esm/index.js.map +1 -0
  487. package/src/generators/node_modules/jackspeak/dist/esm/package.json +1 -0
  488. package/src/generators/node_modules/jackspeak/dist/esm/parse-args.d.ts +4 -0
  489. package/src/generators/node_modules/jackspeak/dist/esm/parse-args.d.ts.map +1 -0
  490. package/src/generators/node_modules/jackspeak/dist/esm/parse-args.js +26 -0
  491. package/src/generators/node_modules/jackspeak/dist/esm/parse-args.js.map +1 -0
  492. package/src/generators/node_modules/jackspeak/package.json +94 -0
  493. package/src/generators/node_modules/lru-cache/LICENSE +15 -0
  494. package/src/generators/node_modules/lru-cache/README.md +1204 -0
  495. package/src/generators/node_modules/lru-cache/dist/commonjs/index.d.ts +851 -0
  496. package/src/generators/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
  497. package/src/generators/node_modules/lru-cache/dist/commonjs/index.js +1441 -0
  498. package/src/generators/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
  499. package/src/generators/node_modules/lru-cache/dist/commonjs/package.json +3 -0
  500. package/src/generators/node_modules/lru-cache/dist/esm/index.d.ts +851 -0
  501. package/src/generators/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
  502. package/src/generators/node_modules/lru-cache/dist/esm/index.js +1437 -0
  503. package/src/generators/node_modules/lru-cache/dist/esm/index.js.map +1 -0
  504. package/src/generators/node_modules/lru-cache/dist/esm/package.json +3 -0
  505. package/src/generators/node_modules/lru-cache/package.json +118 -0
  506. package/src/generators/node_modules/minimatch/LICENSE +15 -0
  507. package/src/generators/node_modules/minimatch/README.md +454 -0
  508. package/src/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +2 -0
  509. package/src/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +1 -0
  510. package/src/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +14 -0
  511. package/src/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +1 -0
  512. package/src/generators/node_modules/minimatch/dist/cjs/ast.d.ts +19 -0
  513. package/src/generators/node_modules/minimatch/dist/cjs/ast.d.ts.map +1 -0
  514. package/src/generators/node_modules/minimatch/dist/cjs/ast.js +589 -0
  515. package/src/generators/node_modules/minimatch/dist/cjs/ast.js.map +1 -0
  516. package/src/generators/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +8 -0
  517. package/src/generators/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +1 -0
  518. package/src/generators/node_modules/minimatch/dist/cjs/brace-expressions.js +152 -0
  519. package/src/generators/node_modules/minimatch/dist/cjs/brace-expressions.js.map +1 -0
  520. package/src/generators/node_modules/minimatch/dist/cjs/escape.d.ts +12 -0
  521. package/src/generators/node_modules/minimatch/dist/cjs/escape.d.ts.map +1 -0
  522. package/src/generators/node_modules/minimatch/dist/cjs/escape.js +22 -0
  523. package/src/generators/node_modules/minimatch/dist/cjs/escape.js.map +1 -0
  524. package/src/generators/node_modules/minimatch/dist/cjs/index.d.ts +94 -0
  525. package/src/generators/node_modules/minimatch/dist/cjs/index.d.ts.map +1 -0
  526. package/src/generators/node_modules/minimatch/dist/cjs/index.js +1011 -0
  527. package/src/generators/node_modules/minimatch/dist/cjs/index.js.map +1 -0
  528. package/src/generators/node_modules/minimatch/dist/cjs/package.json +3 -0
  529. package/src/generators/node_modules/minimatch/dist/cjs/unescape.d.ts +17 -0
  530. package/src/generators/node_modules/minimatch/dist/cjs/unescape.d.ts.map +1 -0
  531. package/src/generators/node_modules/minimatch/dist/cjs/unescape.js +24 -0
  532. package/src/generators/node_modules/minimatch/dist/cjs/unescape.js.map +1 -0
  533. package/src/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +2 -0
  534. package/src/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +1 -0
  535. package/src/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +10 -0
  536. package/src/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +1 -0
  537. package/src/generators/node_modules/minimatch/dist/mjs/ast.d.ts +19 -0
  538. package/src/generators/node_modules/minimatch/dist/mjs/ast.d.ts.map +1 -0
  539. package/src/generators/node_modules/minimatch/dist/mjs/ast.js +585 -0
  540. package/src/generators/node_modules/minimatch/dist/mjs/ast.js.map +1 -0
  541. package/src/generators/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +8 -0
  542. package/src/generators/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +1 -0
  543. package/src/generators/node_modules/minimatch/dist/mjs/brace-expressions.js +148 -0
  544. package/src/generators/node_modules/minimatch/dist/mjs/brace-expressions.js.map +1 -0
  545. package/src/generators/node_modules/minimatch/dist/mjs/escape.d.ts +12 -0
  546. package/src/generators/node_modules/minimatch/dist/mjs/escape.d.ts.map +1 -0
  547. package/src/generators/node_modules/minimatch/dist/mjs/escape.js +18 -0
  548. package/src/generators/node_modules/minimatch/dist/mjs/escape.js.map +1 -0
  549. package/src/generators/node_modules/minimatch/dist/mjs/index.d.ts +94 -0
  550. package/src/generators/node_modules/minimatch/dist/mjs/index.d.ts.map +1 -0
  551. package/src/generators/node_modules/minimatch/dist/mjs/index.js +995 -0
  552. package/src/generators/node_modules/minimatch/dist/mjs/index.js.map +1 -0
  553. package/src/generators/node_modules/minimatch/dist/mjs/package.json +3 -0
  554. package/src/generators/node_modules/minimatch/dist/mjs/unescape.d.ts +17 -0
  555. package/src/generators/node_modules/minimatch/dist/mjs/unescape.d.ts.map +1 -0
  556. package/src/generators/node_modules/minimatch/dist/mjs/unescape.js +20 -0
  557. package/src/generators/node_modules/minimatch/dist/mjs/unescape.js.map +1 -0
  558. package/src/generators/node_modules/minimatch/package.json +86 -0
  559. package/src/generators/node_modules/minipass/LICENSE +15 -0
  560. package/src/generators/node_modules/minipass/README.md +825 -0
  561. package/src/generators/node_modules/minipass/dist/commonjs/index.d.ts +549 -0
  562. package/src/generators/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
  563. package/src/generators/node_modules/minipass/dist/commonjs/index.js +1028 -0
  564. package/src/generators/node_modules/minipass/dist/commonjs/index.js.map +1 -0
  565. package/src/generators/node_modules/minipass/dist/commonjs/package.json +1 -0
  566. package/src/generators/node_modules/minipass/dist/esm/index.d.ts +549 -0
  567. package/src/generators/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
  568. package/src/generators/node_modules/minipass/dist/esm/index.js +1018 -0
  569. package/src/generators/node_modules/minipass/dist/esm/index.js.map +1 -0
  570. package/src/generators/node_modules/minipass/dist/esm/package.json +1 -0
  571. package/src/generators/node_modules/minipass/package.json +82 -0
  572. package/src/generators/node_modules/path-key/index.d.ts +40 -0
  573. package/src/generators/node_modules/path-key/index.js +16 -0
  574. package/src/generators/node_modules/path-key/license +9 -0
  575. package/src/generators/node_modules/path-key/package.json +39 -0
  576. package/src/generators/node_modules/path-key/readme.md +61 -0
  577. package/src/generators/node_modules/path-scurry/LICENSE.md +55 -0
  578. package/src/generators/node_modules/path-scurry/README.md +631 -0
  579. package/src/generators/node_modules/path-scurry/dist/cjs/index.d.ts +1107 -0
  580. package/src/generators/node_modules/path-scurry/dist/cjs/index.d.ts.map +1 -0
  581. package/src/generators/node_modules/path-scurry/dist/cjs/index.js +2018 -0
  582. package/src/generators/node_modules/path-scurry/dist/cjs/index.js.map +1 -0
  583. package/src/generators/node_modules/path-scurry/dist/cjs/package.json +3 -0
  584. package/src/generators/node_modules/path-scurry/dist/mjs/index.d.ts +1107 -0
  585. package/src/generators/node_modules/path-scurry/dist/mjs/index.d.ts.map +1 -0
  586. package/src/generators/node_modules/path-scurry/dist/mjs/index.js +1983 -0
  587. package/src/generators/node_modules/path-scurry/dist/mjs/index.js.map +1 -0
  588. package/src/generators/node_modules/path-scurry/dist/mjs/package.json +3 -0
  589. package/src/generators/node_modules/path-scurry/package.json +87 -0
  590. package/src/generators/node_modules/shebang-command/index.js +19 -0
  591. package/src/generators/node_modules/shebang-command/license +9 -0
  592. package/src/generators/node_modules/shebang-command/package.json +34 -0
  593. package/src/generators/node_modules/shebang-command/readme.md +34 -0
  594. package/src/generators/node_modules/shebang-regex/index.d.ts +22 -0
  595. package/src/generators/node_modules/shebang-regex/index.js +2 -0
  596. package/src/generators/node_modules/shebang-regex/license +9 -0
  597. package/src/generators/node_modules/shebang-regex/package.json +35 -0
  598. package/src/generators/node_modules/shebang-regex/readme.md +33 -0
  599. package/src/generators/node_modules/signal-exit/LICENSE.txt +16 -0
  600. package/src/generators/node_modules/signal-exit/README.md +74 -0
  601. package/src/generators/node_modules/signal-exit/dist/cjs/browser.d.ts +12 -0
  602. package/src/generators/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
  603. package/src/generators/node_modules/signal-exit/dist/cjs/browser.js +10 -0
  604. package/src/generators/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
  605. package/src/generators/node_modules/signal-exit/dist/cjs/index.d.ts +48 -0
  606. package/src/generators/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
  607. package/src/generators/node_modules/signal-exit/dist/cjs/index.js +279 -0
  608. package/src/generators/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
  609. package/src/generators/node_modules/signal-exit/dist/cjs/package.json +3 -0
  610. package/src/generators/node_modules/signal-exit/dist/cjs/signals.d.ts +29 -0
  611. package/src/generators/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
  612. package/src/generators/node_modules/signal-exit/dist/cjs/signals.js +42 -0
  613. package/src/generators/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
  614. package/src/generators/node_modules/signal-exit/dist/mjs/browser.d.ts +12 -0
  615. package/src/generators/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
  616. package/src/generators/node_modules/signal-exit/dist/mjs/browser.js +4 -0
  617. package/src/generators/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
  618. package/src/generators/node_modules/signal-exit/dist/mjs/index.d.ts +48 -0
  619. package/src/generators/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
  620. package/src/generators/node_modules/signal-exit/dist/mjs/index.js +275 -0
  621. package/src/generators/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
  622. package/src/generators/node_modules/signal-exit/dist/mjs/package.json +3 -0
  623. package/src/generators/node_modules/signal-exit/dist/mjs/signals.d.ts +29 -0
  624. package/src/generators/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
  625. package/src/generators/node_modules/signal-exit/dist/mjs/signals.js +39 -0
  626. package/src/generators/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
  627. package/src/generators/node_modules/signal-exit/package.json +106 -0
  628. package/src/generators/node_modules/string-width/index.d.ts +29 -0
  629. package/src/generators/node_modules/string-width/index.js +54 -0
  630. package/src/generators/node_modules/string-width/license +9 -0
  631. package/src/generators/node_modules/string-width/package.json +59 -0
  632. package/src/generators/node_modules/string-width/readme.md +67 -0
  633. package/src/generators/node_modules/string-width-cjs/index.d.ts +29 -0
  634. package/src/generators/node_modules/string-width-cjs/index.js +47 -0
  635. package/src/generators/node_modules/string-width-cjs/license +9 -0
  636. package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/index.d.ts +37 -0
  637. package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/index.js +10 -0
  638. package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/license +9 -0
  639. package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/package.json +55 -0
  640. package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/readme.md +78 -0
  641. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  642. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/README.md +73 -0
  643. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/index.js +6 -0
  644. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/text.js +6 -0
  645. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/index.d.ts +23 -0
  646. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/index.js +6 -0
  647. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/package.json +50 -0
  648. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/text.js +6 -0
  649. package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/index.d.ts +17 -0
  650. package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/index.js +4 -0
  651. package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/license +9 -0
  652. package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/package.json +54 -0
  653. package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/readme.md +46 -0
  654. package/src/generators/node_modules/string-width-cjs/package.json +56 -0
  655. package/src/generators/node_modules/string-width-cjs/readme.md +50 -0
  656. package/src/generators/node_modules/strip-ansi/index.d.ts +15 -0
  657. package/src/generators/node_modules/strip-ansi/index.js +14 -0
  658. package/src/generators/node_modules/strip-ansi/license +9 -0
  659. package/src/generators/node_modules/strip-ansi/package.json +57 -0
  660. package/src/generators/node_modules/strip-ansi/readme.md +41 -0
  661. package/src/generators/node_modules/strip-ansi-cjs/index.d.ts +17 -0
  662. package/src/generators/node_modules/strip-ansi-cjs/index.js +4 -0
  663. package/src/generators/node_modules/strip-ansi-cjs/license +9 -0
  664. package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.d.ts +37 -0
  665. package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js +10 -0
  666. package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/license +9 -0
  667. package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/package.json +55 -0
  668. package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/readme.md +78 -0
  669. package/src/generators/node_modules/strip-ansi-cjs/package.json +54 -0
  670. package/src/generators/node_modules/strip-ansi-cjs/readme.md +46 -0
  671. package/src/generators/node_modules/which/CHANGELOG.md +166 -0
  672. package/src/generators/node_modules/which/LICENSE +15 -0
  673. package/src/generators/node_modules/which/README.md +54 -0
  674. package/src/generators/node_modules/which/bin/node-which +52 -0
  675. package/src/generators/node_modules/which/package.json +43 -0
  676. package/src/generators/node_modules/which/which.js +125 -0
  677. package/src/generators/node_modules/wrap-ansi/index.d.ts +41 -0
  678. package/src/generators/node_modules/wrap-ansi/index.js +214 -0
  679. package/src/generators/node_modules/wrap-ansi/license +9 -0
  680. package/src/generators/node_modules/wrap-ansi/package.json +69 -0
  681. package/src/generators/node_modules/wrap-ansi/readme.md +91 -0
  682. package/src/generators/node_modules/wrap-ansi-cjs/index.js +216 -0
  683. package/src/generators/node_modules/wrap-ansi-cjs/license +9 -0
  684. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.d.ts +37 -0
  685. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js +10 -0
  686. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/license +9 -0
  687. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/package.json +55 -0
  688. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/readme.md +78 -0
  689. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.d.ts +345 -0
  690. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.js +163 -0
  691. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/license +9 -0
  692. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/package.json +56 -0
  693. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/readme.md +152 -0
  694. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  695. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/README.md +73 -0
  696. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/index.js +6 -0
  697. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/text.js +6 -0
  698. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.d.ts +23 -0
  699. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.js +6 -0
  700. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/package.json +50 -0
  701. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/text.js +6 -0
  702. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/index.d.ts +29 -0
  703. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/index.js +47 -0
  704. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/license +9 -0
  705. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/package.json +56 -0
  706. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/readme.md +50 -0
  707. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.d.ts +17 -0
  708. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js +4 -0
  709. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/license +9 -0
  710. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/package.json +54 -0
  711. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/readme.md +46 -0
  712. package/src/generators/node_modules/wrap-ansi-cjs/package.json +62 -0
  713. package/src/generators/node_modules/wrap-ansi-cjs/readme.md +91 -0
  714. package/src/schemas/action.ts +15 -0
  715. package/src/schemas/common.ts +16 -0
  716. package/src/schemas/field/afm/index.ts +2 -18
  717. package/src/schemas/field/amka/index.ts +7 -2
  718. package/src/schemas/field/attachment/index.ts +12 -24
  719. package/src/schemas/field/choice/index.ts +2 -13
  720. package/src/schemas/field/common.ts +75 -51
  721. package/src/schemas/field/consent-content/index.ts +28 -0
  722. package/src/schemas/field/date/index.ts +5 -32
  723. package/src/schemas/field/doc_subtitle/index.ts +1 -0
  724. package/src/schemas/field/doc_title/index.ts +9 -16
  725. package/src/schemas/field/dynamically-filled-text/index.ts +4 -5
  726. package/src/schemas/field/email/index.ts +6 -9
  727. package/src/schemas/field/fillable-string/index.ts +1 -1
  728. package/src/schemas/field/hidden/index.ts +4 -43
  729. package/src/schemas/field/hierarchical-selector/index.ts +3 -9
  730. package/src/schemas/field/image/index.ts +5 -24
  731. package/src/schemas/field/image-crop/index.ts +25 -0
  732. package/src/schemas/field/index.spec.ts +0 -42
  733. package/src/schemas/field/index.ts +64 -12
  734. package/src/schemas/field/int/index.ts +2 -0
  735. package/src/schemas/field/intl_mobile_phone/index.ts +19 -0
  736. package/src/schemas/field/lab-results/index.ts +1 -2
  737. package/src/schemas/field/link/index.ts +20 -0
  738. package/src/schemas/field/mobile_phone/index.ts +1 -12
  739. package/src/schemas/field/multiple-choice/index.ts +4 -3
  740. package/src/schemas/field/password/index.ts +18 -0
  741. package/src/schemas/field/pdf-image/index.ts +3 -15
  742. package/src/schemas/field/phone/index.ts +18 -0
  743. package/src/schemas/field/postal_code/index.ts +1 -1
  744. package/src/schemas/field/preference-multiple-choice/index.ts +41 -0
  745. package/src/schemas/field/qrcode/index.ts +1 -0
  746. package/src/schemas/field/quote/index.ts +2 -19
  747. package/src/schemas/field/radio-choice/index.ts +1 -7
  748. package/src/schemas/field/rate/index.ts +1 -9
  749. package/src/schemas/field/recipient/index.ts +2 -2
  750. package/src/schemas/field/redirect/index.ts +4 -13
  751. package/src/schemas/field/refcode/index.ts +10 -15
  752. package/src/schemas/field/string/index.ts +13 -0
  753. package/src/schemas/field/text/index.ts +4 -18
  754. package/src/schemas/field/url-param/index.ts +23 -0
  755. package/src/schemas/resolve.ts +3 -0
  756. package/src/schemas/step.ts +2 -0
  757. package/src/schemas/template/index.ts +0 -1
  758. package/src/schemas/template/template-base.ts +0 -10
  759. package/src/schemas/template/template.ts +1 -2
  760. package/src/schemas/validation-context/enums.ts +0 -16
  761. package/src/schemas/validation-context/validation-context.ts +2 -4
  762. package/src/utils/index.ts +10 -1
  763. package/utils/index.d.ts +6 -0
  764. package/utils/index.js +55 -0
  765. package/.prettierrc.js +0 -1
  766. package/.rush/temp/chunked-rush-logs/stepwise.build.chunks.jsonl +0 -6
  767. package/.rush/temp/chunked-rush-logs/stepwise.lint.chunks.jsonl +0 -9
  768. package/.rush/temp/chunked-rush-logs/stepwise.publint.chunks.jsonl +0 -72
  769. package/.rush/temp/chunked-rush-logs/stepwise.test.chunks.jsonl +0 -16
  770. package/.rush/temp/package-deps_build.json +0 -185
  771. package/.rush/temp/package-deps_lint.json +0 -185
  772. package/.rush/temp/package-deps_publint.json +0 -949
  773. package/.rush/temp/package-deps_test.json +0 -185
  774. package/.rush/temp/shrinkwrap-deps.json +0 -303
  775. package/eslint.config.mjs +0 -3
  776. package/rush-logs/stepwise.build.log +0 -6
  777. package/rush-logs/stepwise.lint.log +0 -9
  778. package/rush-logs/stepwise.publint.log +0 -72
  779. package/rush-logs/stepwise.test.log +0 -16
  780. package/src/schemas/field/green-pass-qrcode/index.ts +0 -27
  781. package/src/schemas/template/enums.ts +0 -22
  782. package/tsconfig.json +0 -25
@@ -0,0 +1,295 @@
1
+ // synchronous utility for filtering entries and calculating subwalks
2
+ import { GLOBSTAR } from 'minimatch';
3
+ /**
4
+ * A cache of which patterns have been processed for a given Path
5
+ */
6
+ export class HasWalkedCache {
7
+ store;
8
+ constructor(store = new Map()) {
9
+ this.store = store;
10
+ }
11
+ copy() {
12
+ return new HasWalkedCache(new Map(this.store));
13
+ }
14
+ hasWalked(target, pattern) {
15
+ return this.store.get(target.fullpath())?.has(pattern.globString());
16
+ }
17
+ storeWalked(target, pattern) {
18
+ const fullpath = target.fullpath();
19
+ const cached = this.store.get(fullpath);
20
+ if (cached)
21
+ cached.add(pattern.globString());
22
+ else
23
+ this.store.set(fullpath, new Set([pattern.globString()]));
24
+ }
25
+ }
26
+ /**
27
+ * A record of which paths have been matched in a given walk step,
28
+ * and whether they only are considered a match if they are a directory,
29
+ * and whether their absolute or relative path should be returned.
30
+ */
31
+ export class MatchRecord {
32
+ store = new Map();
33
+ add(target, absolute, ifDir) {
34
+ const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0);
35
+ const current = this.store.get(target);
36
+ this.store.set(target, current === undefined ? n : n & current);
37
+ }
38
+ // match, absolute, ifdir
39
+ entries() {
40
+ return [...this.store.entries()].map(([path, n]) => [
41
+ path,
42
+ !!(n & 2),
43
+ !!(n & 1),
44
+ ]);
45
+ }
46
+ }
47
+ /**
48
+ * A collection of patterns that must be processed in a subsequent step
49
+ * for a given path.
50
+ */
51
+ export class SubWalks {
52
+ store = new Map();
53
+ add(target, pattern) {
54
+ if (!target.canReaddir()) {
55
+ return;
56
+ }
57
+ const subs = this.store.get(target);
58
+ if (subs) {
59
+ if (!subs.find(p => p.globString() === pattern.globString())) {
60
+ subs.push(pattern);
61
+ }
62
+ }
63
+ else
64
+ this.store.set(target, [pattern]);
65
+ }
66
+ get(target) {
67
+ const subs = this.store.get(target);
68
+ /* c8 ignore start */
69
+ if (!subs) {
70
+ throw new Error('attempting to walk unknown path');
71
+ }
72
+ /* c8 ignore stop */
73
+ return subs;
74
+ }
75
+ entries() {
76
+ return this.keys().map(k => [k, this.store.get(k)]);
77
+ }
78
+ keys() {
79
+ return [...this.store.keys()].filter(t => t.canReaddir());
80
+ }
81
+ }
82
+ /**
83
+ * The class that processes patterns for a given path.
84
+ *
85
+ * Handles child entry filtering, and determining whether a path's
86
+ * directory contents must be read.
87
+ */
88
+ export class Processor {
89
+ hasWalkedCache;
90
+ matches = new MatchRecord();
91
+ subwalks = new SubWalks();
92
+ patterns;
93
+ follow;
94
+ dot;
95
+ opts;
96
+ constructor(opts, hasWalkedCache) {
97
+ this.opts = opts;
98
+ this.follow = !!opts.follow;
99
+ this.dot = !!opts.dot;
100
+ this.hasWalkedCache = hasWalkedCache
101
+ ? hasWalkedCache.copy()
102
+ : new HasWalkedCache();
103
+ }
104
+ processPatterns(target, patterns) {
105
+ this.patterns = patterns;
106
+ const processingSet = patterns.map(p => [target, p]);
107
+ // map of paths to the magic-starting subwalks they need to walk
108
+ // first item in patterns is the filter
109
+ for (let [t, pattern] of processingSet) {
110
+ this.hasWalkedCache.storeWalked(t, pattern);
111
+ const root = pattern.root();
112
+ const absolute = pattern.isAbsolute() && this.opts.absolute !== false;
113
+ // start absolute patterns at root
114
+ if (root) {
115
+ t = t.resolve(root === '/' && this.opts.root !== undefined
116
+ ? this.opts.root
117
+ : root);
118
+ const rest = pattern.rest();
119
+ if (!rest) {
120
+ this.matches.add(t, true, false);
121
+ continue;
122
+ }
123
+ else {
124
+ pattern = rest;
125
+ }
126
+ }
127
+ if (t.isENOENT())
128
+ continue;
129
+ let p;
130
+ let rest;
131
+ let changed = false;
132
+ while (typeof (p = pattern.pattern()) === 'string' &&
133
+ (rest = pattern.rest())) {
134
+ const c = t.resolve(p);
135
+ t = c;
136
+ pattern = rest;
137
+ changed = true;
138
+ }
139
+ p = pattern.pattern();
140
+ rest = pattern.rest();
141
+ if (changed) {
142
+ if (this.hasWalkedCache.hasWalked(t, pattern))
143
+ continue;
144
+ this.hasWalkedCache.storeWalked(t, pattern);
145
+ }
146
+ // now we have either a final string for a known entry,
147
+ // more strings for an unknown entry,
148
+ // or a pattern starting with magic, mounted on t.
149
+ if (typeof p === 'string') {
150
+ // must not be final entry, otherwise we would have
151
+ // concatenated it earlier.
152
+ const ifDir = p === '..' || p === '' || p === '.';
153
+ this.matches.add(t.resolve(p), absolute, ifDir);
154
+ continue;
155
+ }
156
+ else if (p === GLOBSTAR) {
157
+ // if no rest, match and subwalk pattern
158
+ // if rest, process rest and subwalk pattern
159
+ // if it's a symlink, but we didn't get here by way of a
160
+ // globstar match (meaning it's the first time THIS globstar
161
+ // has traversed a symlink), then we follow it. Otherwise, stop.
162
+ if (!t.isSymbolicLink() ||
163
+ this.follow ||
164
+ pattern.checkFollowGlobstar()) {
165
+ this.subwalks.add(t, pattern);
166
+ }
167
+ const rp = rest?.pattern();
168
+ const rrest = rest?.rest();
169
+ if (!rest || ((rp === '' || rp === '.') && !rrest)) {
170
+ // only HAS to be a dir if it ends in **/ or **/.
171
+ // but ending in ** will match files as well.
172
+ this.matches.add(t, absolute, rp === '' || rp === '.');
173
+ }
174
+ else {
175
+ if (rp === '..') {
176
+ // this would mean you're matching **/.. at the fs root,
177
+ // and no thanks, I'm not gonna test that specific case.
178
+ /* c8 ignore start */
179
+ const tp = t.parent || t;
180
+ /* c8 ignore stop */
181
+ if (!rrest)
182
+ this.matches.add(tp, absolute, true);
183
+ else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {
184
+ this.subwalks.add(tp, rrest);
185
+ }
186
+ }
187
+ }
188
+ }
189
+ else if (p instanceof RegExp) {
190
+ this.subwalks.add(t, pattern);
191
+ }
192
+ }
193
+ return this;
194
+ }
195
+ subwalkTargets() {
196
+ return this.subwalks.keys();
197
+ }
198
+ child() {
199
+ return new Processor(this.opts, this.hasWalkedCache);
200
+ }
201
+ // return a new Processor containing the subwalks for each
202
+ // child entry, and a set of matches, and
203
+ // a hasWalkedCache that's a copy of this one
204
+ // then we're going to call
205
+ filterEntries(parent, entries) {
206
+ const patterns = this.subwalks.get(parent);
207
+ // put matches and entry walks into the results processor
208
+ const results = this.child();
209
+ for (const e of entries) {
210
+ for (const pattern of patterns) {
211
+ const absolute = pattern.isAbsolute();
212
+ const p = pattern.pattern();
213
+ const rest = pattern.rest();
214
+ if (p === GLOBSTAR) {
215
+ results.testGlobstar(e, pattern, rest, absolute);
216
+ }
217
+ else if (p instanceof RegExp) {
218
+ results.testRegExp(e, p, rest, absolute);
219
+ }
220
+ else {
221
+ results.testString(e, p, rest, absolute);
222
+ }
223
+ }
224
+ }
225
+ return results;
226
+ }
227
+ testGlobstar(e, pattern, rest, absolute) {
228
+ if (this.dot || !e.name.startsWith('.')) {
229
+ if (!pattern.hasMore()) {
230
+ this.matches.add(e, absolute, false);
231
+ }
232
+ if (e.canReaddir()) {
233
+ // if we're in follow mode or it's not a symlink, just keep
234
+ // testing the same pattern. If there's more after the globstar,
235
+ // then this symlink consumes the globstar. If not, then we can
236
+ // follow at most ONE symlink along the way, so we mark it, which
237
+ // also checks to ensure that it wasn't already marked.
238
+ if (this.follow || !e.isSymbolicLink()) {
239
+ this.subwalks.add(e, pattern);
240
+ }
241
+ else if (e.isSymbolicLink()) {
242
+ if (rest && pattern.checkFollowGlobstar()) {
243
+ this.subwalks.add(e, rest);
244
+ }
245
+ else if (pattern.markFollowGlobstar()) {
246
+ this.subwalks.add(e, pattern);
247
+ }
248
+ }
249
+ }
250
+ }
251
+ // if the NEXT thing matches this entry, then also add
252
+ // the rest.
253
+ if (rest) {
254
+ const rp = rest.pattern();
255
+ if (typeof rp === 'string' &&
256
+ // dots and empty were handled already
257
+ rp !== '..' &&
258
+ rp !== '' &&
259
+ rp !== '.') {
260
+ this.testString(e, rp, rest.rest(), absolute);
261
+ }
262
+ else if (rp === '..') {
263
+ /* c8 ignore start */
264
+ const ep = e.parent || e;
265
+ /* c8 ignore stop */
266
+ this.subwalks.add(ep, rest);
267
+ }
268
+ else if (rp instanceof RegExp) {
269
+ this.testRegExp(e, rp, rest.rest(), absolute);
270
+ }
271
+ }
272
+ }
273
+ testRegExp(e, p, rest, absolute) {
274
+ if (!p.test(e.name))
275
+ return;
276
+ if (!rest) {
277
+ this.matches.add(e, absolute, false);
278
+ }
279
+ else {
280
+ this.subwalks.add(e, rest);
281
+ }
282
+ }
283
+ testString(e, p, rest, absolute) {
284
+ // should never happen?
285
+ if (!e.isNamed(p))
286
+ return;
287
+ if (!rest) {
288
+ this.matches.add(e, absolute, false);
289
+ }
290
+ else {
291
+ this.subwalks.add(e, rest);
292
+ }
293
+ }
294
+ }
295
+ //# sourceMappingURL=processor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processor.js","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,EAAE,QAAQ,EAAY,MAAM,WAAW,CAAA;AAK9C;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,KAAK,CAA0B;IAC/B,YAAY,QAAkC,IAAI,GAAG,EAAE;QACrD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IACD,IAAI;QACF,OAAO,IAAI,cAAc,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IAChD,CAAC;IACD,SAAS,CAAC,MAAY,EAAE,OAAgB;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACrE,CAAC;IACD,WAAW,CAAC,MAAY,EAAE,OAAgB;QACxC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAA;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QACvC,IAAI,MAAM;YAAE,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;;YACvC,IAAI,CAAC,KAAK,CAAC,GAAG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E,EAAE,IAAI,CAAC,CAAA;aAC5B;iBAAM,IAAI,EAAE,YAAY,MAAM,EAAE;gBAC/B,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAA;aAC9C;SACF;IACH,CAAC;IAED,UAAU,CACR,CAAO,EACP,CAAW,EACX,IAAoB,EACpB,QAAiB;QAEjB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;YAAE,OAAM;QAC3B,IAAI,CAAC,IAAI,EAAE;YACT,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SACrC;aAAM;YACL,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;SAC3B;IACH,CAAC;IAED,UAAU,CAAC,CAAO,EAAE,CAAS,EAAE,IAAoB,EAAE,QAAiB;QACpE,uBAAuB;QACvB,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAAE,OAAM;QACzB,IAAI,CAAC,IAAI,EAAE;YACT,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SACrC;aAAM;YACL,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;SAC3B;IACH,CAAC;CACF","sourcesContent":["// synchronous utility for filtering entries and calculating subwalks\n\nimport { GLOBSTAR, MMRegExp } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { MMPattern, Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\n/**\n * A cache of which patterns have been processed for a given Path\n */\nexport class HasWalkedCache {\n store: Map<string, Set<string>>\n constructor(store: Map<string, Set<string>> = new Map()) {\n this.store = store\n }\n copy() {\n return new HasWalkedCache(new Map(this.store))\n }\n hasWalked(target: Path, pattern: Pattern) {\n return this.store.get(target.fullpath())?.has(pattern.globString())\n }\n storeWalked(target: Path, pattern: Pattern) {\n const fullpath = target.fullpath()\n const cached = this.store.get(fullpath)\n if (cached) cached.add(pattern.globString())\n else this.store.set(fullpath, new Set([pattern.globString()]))\n }\n}\n\n/**\n * A record of which paths have been matched in a given walk step,\n * and whether they only are considered a match if they are a directory,\n * and whether their absolute or relative path should be returned.\n */\nexport class MatchRecord {\n store: Map<Path, number> = new Map()\n add(target: Path, absolute: boolean, ifDir: boolean) {\n const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0)\n const current = this.store.get(target)\n this.store.set(target, current === undefined ? n : n & current)\n }\n // match, absolute, ifdir\n entries(): [Path, boolean, boolean][] {\n return [...this.store.entries()].map(([path, n]) => [\n path,\n !!(n & 2),\n !!(n & 1),\n ])\n }\n}\n\n/**\n * A collection of patterns that must be processed in a subsequent step\n * for a given path.\n */\nexport class SubWalks {\n store: Map<Path, Pattern[]> = new Map()\n add(target: Path, pattern: Pattern) {\n if (!target.canReaddir()) {\n return\n }\n const subs = this.store.get(target)\n if (subs) {\n if (!subs.find(p => p.globString() === pattern.globString())) {\n subs.push(pattern)\n }\n } else this.store.set(target, [pattern])\n }\n get(target: Path): Pattern[] {\n const subs = this.store.get(target)\n /* c8 ignore start */\n if (!subs) {\n throw new Error('attempting to walk unknown path')\n }\n /* c8 ignore stop */\n return subs\n }\n entries(): [Path, Pattern[]][] {\n return this.keys().map(k => [k, this.store.get(k) as Pattern[]])\n }\n keys(): Path[] {\n return [...this.store.keys()].filter(t => t.canReaddir())\n }\n}\n\n/**\n * The class that processes patterns for a given path.\n *\n * Handles child entry filtering, and determining whether a path's\n * directory contents must be read.\n */\nexport class Processor {\n hasWalkedCache: HasWalkedCache\n matches = new MatchRecord()\n subwalks = new SubWalks()\n patterns?: Pattern[]\n follow: boolean\n dot: boolean\n opts: GlobWalkerOpts\n\n constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache) {\n this.opts = opts\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.hasWalkedCache = hasWalkedCache\n ? hasWalkedCache.copy()\n : new HasWalkedCache()\n }\n\n processPatterns(target: Path, patterns: Pattern[]) {\n this.patterns = patterns\n const processingSet: [Path, Pattern][] = patterns.map(p => [target, p])\n\n // map of paths to the magic-starting subwalks they need to walk\n // first item in patterns is the filter\n\n for (let [t, pattern] of processingSet) {\n this.hasWalkedCache.storeWalked(t, pattern)\n\n const root = pattern.root()\n const absolute = pattern.isAbsolute() && this.opts.absolute !== false\n\n // start absolute patterns at root\n if (root) {\n t = t.resolve(\n root === '/' && this.opts.root !== undefined\n ? this.opts.root\n : root\n )\n const rest = pattern.rest()\n if (!rest) {\n this.matches.add(t, true, false)\n continue\n } else {\n pattern = rest\n }\n }\n\n if (t.isENOENT()) continue\n\n let p: MMPattern\n let rest: Pattern | null\n let changed = false\n while (\n typeof (p = pattern.pattern()) === 'string' &&\n (rest = pattern.rest())\n ) {\n const c = t.resolve(p)\n t = c\n pattern = rest\n changed = true\n }\n p = pattern.pattern()\n rest = pattern.rest()\n if (changed) {\n if (this.hasWalkedCache.hasWalked(t, pattern)) continue\n this.hasWalkedCache.storeWalked(t, pattern)\n }\n\n // now we have either a final string for a known entry,\n // more strings for an unknown entry,\n // or a pattern starting with magic, mounted on t.\n if (typeof p === 'string') {\n // must not be final entry, otherwise we would have\n // concatenated it earlier.\n const ifDir = p === '..' || p === '' || p === '.'\n this.matches.add(t.resolve(p), absolute, ifDir)\n continue\n } else if (p === GLOBSTAR) {\n // if no rest, match and subwalk pattern\n // if rest, process rest and subwalk pattern\n // if it's a symlink, but we didn't get here by way of a\n // globstar match (meaning it's the first time THIS globstar\n // has traversed a symlink), then we follow it. Otherwise, stop.\n if (\n !t.isSymbolicLink() ||\n this.follow ||\n pattern.checkFollowGlobstar()\n ) {\n this.subwalks.add(t, pattern)\n }\n const rp = rest?.pattern()\n const rrest = rest?.rest()\n if (!rest || ((rp === '' || rp === '.') && !rrest)) {\n // only HAS to be a dir if it ends in **/ or **/.\n // but ending in ** will match files as well.\n this.matches.add(t, absolute, rp === '' || rp === '.')\n } else {\n if (rp === '..') {\n // this would mean you're matching **/.. at the fs root,\n // and no thanks, I'm not gonna test that specific case.\n /* c8 ignore start */\n const tp = t.parent || t\n /* c8 ignore stop */\n if (!rrest) this.matches.add(tp, absolute, true)\n else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {\n this.subwalks.add(tp, rrest)\n }\n }\n }\n } else if (p instanceof RegExp) {\n this.subwalks.add(t, pattern)\n }\n }\n\n return this\n }\n\n subwalkTargets(): Path[] {\n return this.subwalks.keys()\n }\n\n child() {\n return new Processor(this.opts, this.hasWalkedCache)\n }\n\n // return a new Processor containing the subwalks for each\n // child entry, and a set of matches, and\n // a hasWalkedCache that's a copy of this one\n // then we're going to call\n filterEntries(parent: Path, entries: Path[]): Processor {\n const patterns = this.subwalks.get(parent)\n // put matches and entry walks into the results processor\n const results = this.child()\n for (const e of entries) {\n for (const pattern of patterns) {\n const absolute = pattern.isAbsolute()\n const p = pattern.pattern()\n const rest = pattern.rest()\n if (p === GLOBSTAR) {\n results.testGlobstar(e, pattern, rest, absolute)\n } else if (p instanceof RegExp) {\n results.testRegExp(e, p, rest, absolute)\n } else {\n results.testString(e, p, rest, absolute)\n }\n }\n }\n return results\n }\n\n testGlobstar(\n e: Path,\n pattern: Pattern,\n rest: Pattern | null,\n absolute: boolean\n ) {\n if (this.dot || !e.name.startsWith('.')) {\n if (!pattern.hasMore()) {\n this.matches.add(e, absolute, false)\n }\n if (e.canReaddir()) {\n // if we're in follow mode or it's not a symlink, just keep\n // testing the same pattern. If there's more after the globstar,\n // then this symlink consumes the globstar. If not, then we can\n // follow at most ONE symlink along the way, so we mark it, which\n // also checks to ensure that it wasn't already marked.\n if (this.follow || !e.isSymbolicLink()) {\n this.subwalks.add(e, pattern)\n } else if (e.isSymbolicLink()) {\n if (rest && pattern.checkFollowGlobstar()) {\n this.subwalks.add(e, rest)\n } else if (pattern.markFollowGlobstar()) {\n this.subwalks.add(e, pattern)\n }\n }\n }\n }\n // if the NEXT thing matches this entry, then also add\n // the rest.\n if (rest) {\n const rp = rest.pattern()\n if (\n typeof rp === 'string' &&\n // dots and empty were handled already\n rp !== '..' &&\n rp !== '' &&\n rp !== '.'\n ) {\n this.testString(e, rp, rest.rest(), absolute)\n } else if (rp === '..') {\n /* c8 ignore start */\n const ep = e.parent || e\n /* c8 ignore stop */\n this.subwalks.add(ep, rest)\n } else if (rp instanceof RegExp) {\n this.testRegExp(e, rp, rest.rest(), absolute)\n }\n }\n }\n\n testRegExp(\n e: Path,\n p: MMRegExp,\n rest: Pattern | null,\n absolute: boolean\n ) {\n if (!p.test(e.name)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n\n testString(e: Path, p: string, rest: Pattern | null, absolute: boolean) {\n // should never happen?\n if (!e.isNamed(p)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n}\n"]}
@@ -0,0 +1,96 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ /**
3
+ * Single-use utility classes to provide functionality to the {@link Glob}
4
+ * methods.
5
+ *
6
+ * @module
7
+ */
8
+ import { Minipass } from 'minipass';
9
+ import { Path } from 'path-scurry';
10
+ import { IgnoreLike } from './ignore.js';
11
+ import { Pattern } from './pattern.js';
12
+ import { Processor } from './processor.js';
13
+ export interface GlobWalkerOpts {
14
+ absolute?: boolean;
15
+ allowWindowsEscape?: boolean;
16
+ cwd?: string | URL;
17
+ dot?: boolean;
18
+ dotRelative?: boolean;
19
+ follow?: boolean;
20
+ ignore?: string | string[] | IgnoreLike;
21
+ mark?: boolean;
22
+ matchBase?: boolean;
23
+ maxDepth?: number;
24
+ nobrace?: boolean;
25
+ nocase?: boolean;
26
+ nodir?: boolean;
27
+ noext?: boolean;
28
+ noglobstar?: boolean;
29
+ platform?: NodeJS.Platform;
30
+ posix?: boolean;
31
+ realpath?: boolean;
32
+ root?: string;
33
+ stat?: boolean;
34
+ signal?: AbortSignal;
35
+ windowsPathsNoEscape?: boolean;
36
+ withFileTypes?: boolean;
37
+ }
38
+ export type GWOFileTypesTrue = GlobWalkerOpts & {
39
+ withFileTypes: true;
40
+ };
41
+ export type GWOFileTypesFalse = GlobWalkerOpts & {
42
+ withFileTypes: false;
43
+ };
44
+ export type GWOFileTypesUnset = GlobWalkerOpts & {
45
+ withFileTypes?: undefined;
46
+ };
47
+ export type Result<O extends GlobWalkerOpts> = O extends GWOFileTypesTrue ? Path : O extends GWOFileTypesFalse ? string : O extends GWOFileTypesUnset ? string : Path | string;
48
+ export type Matches<O extends GlobWalkerOpts> = O extends GWOFileTypesTrue ? Set<Path> : O extends GWOFileTypesFalse ? Set<string> : O extends GWOFileTypesUnset ? Set<string> : Set<Path | string>;
49
+ export type MatchStream<O extends GlobWalkerOpts> = O extends GWOFileTypesTrue ? Minipass<Path, Path> : O extends GWOFileTypesFalse ? Minipass<string, string> : O extends GWOFileTypesUnset ? Minipass<string, string> : Minipass<Path | string, Path | string>;
50
+ /**
51
+ * basic walking utilities that all the glob walker types use
52
+ */
53
+ export declare abstract class GlobUtil<O extends GlobWalkerOpts = GlobWalkerOpts> {
54
+ #private;
55
+ path: Path;
56
+ patterns: Pattern[];
57
+ opts: O;
58
+ seen: Set<Path>;
59
+ paused: boolean;
60
+ aborted: boolean;
61
+ signal?: AbortSignal;
62
+ maxDepth: number;
63
+ constructor(patterns: Pattern[], path: Path, opts: O);
64
+ pause(): void;
65
+ resume(): void;
66
+ onResume(fn: () => any): void;
67
+ matchCheck(e: Path, ifDir: boolean): Promise<Path | undefined>;
68
+ matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined;
69
+ matchCheckSync(e: Path, ifDir: boolean): Path | undefined;
70
+ abstract matchEmit(p: Result<O>): void;
71
+ abstract matchEmit(p: string | Path): void;
72
+ matchFinish(e: Path, absolute: boolean): void;
73
+ match(e: Path, absolute: boolean, ifDir: boolean): Promise<void>;
74
+ matchSync(e: Path, absolute: boolean, ifDir: boolean): void;
75
+ walkCB(target: Path, patterns: Pattern[], cb: () => any): void;
76
+ walkCB2(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any;
77
+ walkCB3(target: Path, entries: Path[], processor: Processor, cb: () => any): void;
78
+ walkCBSync(target: Path, patterns: Pattern[], cb: () => any): void;
79
+ walkCB2Sync(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any;
80
+ walkCB3Sync(target: Path, entries: Path[], processor: Processor, cb: () => any): void;
81
+ }
82
+ export declare class GlobWalker<O extends GlobWalkerOpts = GlobWalkerOpts> extends GlobUtil<O> {
83
+ matches: O extends GWOFileTypesTrue ? Set<Path> : O extends GWOFileTypesFalse ? Set<string> : O extends GWOFileTypesUnset ? Set<string> : Set<Path | string>;
84
+ constructor(patterns: Pattern[], path: Path, opts: O);
85
+ matchEmit(e: Result<O>): void;
86
+ walk(): Promise<Matches<O>>;
87
+ walkSync(): Matches<O>;
88
+ }
89
+ export declare class GlobStream<O extends GlobWalkerOpts = GlobWalkerOpts> extends GlobUtil<O> {
90
+ results: O extends GWOFileTypesTrue ? Minipass<Path, Path> : O extends GWOFileTypesFalse ? Minipass<string, string> : O extends GWOFileTypesUnset ? Minipass<string, string> : Minipass<Path | string, Path | string>;
91
+ constructor(patterns: Pattern[], path: Path, opts: O);
92
+ matchEmit(e: Result<O>): void;
93
+ stream(): MatchStream<O>;
94
+ streamSync(): MatchStream<O>;
95
+ }
96
+ //# sourceMappingURL=walker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAU,UAAU,EAAE,MAAM,aAAa,CAAA;AAO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