@uides/stepwise 2.0.2 → 2.0.4-platform-162.23-01-26-13-03

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 (566) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/index.js +1 -1
  3. package/package.json +1 -1
  4. package/generators/node_modules/@isaacs/cliui/build/lib/index.js +0 -211
  5. package/generators/node_modules/@pkgjs/parseargs/examples/is-default-value.js +0 -31
  6. package/generators/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js +0 -33
  7. package/generators/node_modules/@pkgjs/parseargs/examples/negate.js +0 -48
  8. package/generators/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js +0 -38
  9. package/generators/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js +0 -36
  10. package/generators/node_modules/@pkgjs/parseargs/index.js +0 -263
  11. package/generators/node_modules/@pkgjs/parseargs/internal/errors.js +0 -55
  12. package/generators/node_modules/@pkgjs/parseargs/internal/primordials.js +0 -258
  13. package/generators/node_modules/@pkgjs/parseargs/internal/util.js +0 -24
  14. package/generators/node_modules/@pkgjs/parseargs/internal/validators.js +0 -61
  15. package/generators/node_modules/@pkgjs/parseargs/utils.js +0 -86
  16. package/generators/node_modules/ansi-regex/index.js +0 -5
  17. package/generators/node_modules/ansi-styles/index.js +0 -304
  18. package/generators/node_modules/balanced-match/index.js +0 -70
  19. package/generators/node_modules/brace-expansion/index.js +0 -153
  20. package/generators/node_modules/change-case/dist/index.js +0 -135
  21. package/generators/node_modules/change-case/dist/keys.js +0 -28
  22. package/generators/node_modules/color-convert/conversions.js +0 -840
  23. package/generators/node_modules/color-convert/index.js +0 -66
  24. package/generators/node_modules/color-convert/route.js +0 -81
  25. package/generators/node_modules/color-name/index.js +0 -757
  26. package/generators/node_modules/cross-spawn/index.js +0 -47
  27. package/generators/node_modules/cross-spawn/lib/enoent.js +0 -50
  28. package/generators/node_modules/cross-spawn/lib/parse.js +0 -91
  29. package/generators/node_modules/cross-spawn/lib/util/escape.js +0 -31
  30. package/generators/node_modules/cross-spawn/lib/util/readShebang.js +0 -37
  31. package/generators/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -56
  32. package/generators/node_modules/eastasianwidth/eastasianwidth.js +0 -66
  33. package/generators/node_modules/emoji-regex/RGI_Emoji.js +0 -18
  34. package/generators/node_modules/emoji-regex/es2015/RGI_Emoji.js +0 -16
  35. package/generators/node_modules/emoji-regex/es2015/index.js +0 -16
  36. package/generators/node_modules/emoji-regex/es2015/text.js +0 -16
  37. package/generators/node_modules/emoji-regex/index.js +0 -18
  38. package/generators/node_modules/emoji-regex/text.js +0 -18
  39. package/generators/node_modules/flat/cli.js +0 -31
  40. package/generators/node_modules/flat/index.js +0 -83
  41. package/generators/node_modules/foreground-child/dist/cjs/all-signals.js +0 -30
  42. package/generators/node_modules/foreground-child/dist/cjs/index.js +0 -156
  43. package/generators/node_modules/foreground-child/dist/cjs/watchdog.js +0 -63
  44. package/generators/node_modules/foreground-child/dist/mjs/all-signals.js +0 -3
  45. package/generators/node_modules/foreground-child/dist/mjs/index.js +0 -111
  46. package/generators/node_modules/foreground-child/dist/mjs/watchdog.js +0 -39
  47. package/generators/node_modules/glob/dist/commonjs/glob.js +0 -205
  48. package/generators/node_modules/glob/dist/commonjs/has-magic.js +0 -33
  49. package/generators/node_modules/glob/dist/commonjs/ignore.js +0 -87
  50. package/generators/node_modules/glob/dist/commonjs/index.js +0 -114
  51. package/generators/node_modules/glob/dist/commonjs/pattern.js +0 -154
  52. package/generators/node_modules/glob/dist/commonjs/processor.js +0 -214
  53. package/generators/node_modules/glob/dist/commonjs/walker.js +0 -271
  54. package/generators/node_modules/glob/dist/esm/glob.js +0 -165
  55. package/generators/node_modules/glob/dist/esm/has-magic.js +0 -9
  56. package/generators/node_modules/glob/dist/esm/ignore.js +0 -59
  57. package/generators/node_modules/glob/dist/esm/index.js +0 -52
  58. package/generators/node_modules/glob/dist/esm/pattern.js +0 -130
  59. package/generators/node_modules/glob/dist/esm/processor.js +0 -187
  60. package/generators/node_modules/glob/dist/esm/walker.js +0 -237
  61. package/generators/node_modules/is-fullwidth-code-point/index.js +0 -22
  62. package/generators/node_modules/isexe/index.js +0 -64
  63. package/generators/node_modules/isexe/mode.js +0 -46
  64. package/generators/node_modules/isexe/test/basic.js +0 -229
  65. package/generators/node_modules/isexe/windows.js +0 -45
  66. package/generators/node_modules/jackspeak/dist/commonjs/index.js +0 -683
  67. package/generators/node_modules/jackspeak/dist/commonjs/parse-args.js +0 -65
  68. package/generators/node_modules/jackspeak/dist/esm/index.js +0 -640
  69. package/generators/node_modules/jackspeak/dist/esm/parse-args.js +0 -127
  70. package/generators/node_modules/lru-cache/dist/commonjs/index.js +0 -889
  71. package/generators/node_modules/lru-cache/dist/esm/index.js +0 -881
  72. package/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +0 -14
  73. package/generators/node_modules/minimatch/dist/cjs/ast.js +0 -389
  74. package/generators/node_modules/minimatch/dist/cjs/brace-expressions.js +0 -169
  75. package/generators/node_modules/minimatch/dist/cjs/escape.js +0 -10
  76. package/generators/node_modules/minimatch/dist/cjs/index.js +0 -680
  77. package/generators/node_modules/minimatch/dist/cjs/unescape.js +0 -10
  78. package/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +0 -6
  79. package/generators/node_modules/minimatch/dist/mjs/ast.js +0 -361
  80. package/generators/node_modules/minimatch/dist/mjs/brace-expressions.js +0 -161
  81. package/generators/node_modules/minimatch/dist/mjs/escape.js +0 -2
  82. package/generators/node_modules/minimatch/dist/mjs/index.js +0 -612
  83. package/generators/node_modules/minimatch/dist/mjs/unescape.js +0 -2
  84. package/generators/node_modules/minipass/dist/commonjs/index.js +0 -623
  85. package/generators/node_modules/minipass/dist/esm/index.js +0 -584
  86. package/generators/node_modules/path-key/index.js +0 -23
  87. package/generators/node_modules/path-scurry/dist/cjs/index.js +0 -1161
  88. package/generators/node_modules/path-scurry/dist/mjs/index.js +0 -1078
  89. package/generators/node_modules/shebang-command/index.js +0 -28
  90. package/generators/node_modules/shebang-regex/index.js +0 -16
  91. package/generators/node_modules/signal-exit/dist/cjs/browser.js +0 -14
  92. package/generators/node_modules/signal-exit/dist/cjs/index.js +0 -176
  93. package/generators/node_modules/signal-exit/dist/cjs/signals.js +0 -14
  94. package/generators/node_modules/signal-exit/dist/mjs/browser.js +0 -4
  95. package/generators/node_modules/signal-exit/dist/mjs/index.js +0 -146
  96. package/generators/node_modules/signal-exit/dist/mjs/signals.js +0 -5
  97. package/generators/node_modules/string-width/index.js +0 -34
  98. package/generators/node_modules/string-width-cjs/index.js +0 -49
  99. package/generators/node_modules/string-width-cjs/node_modules/ansi-regex/index.js +0 -19
  100. package/generators/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/index.js +0 -16
  101. package/generators/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/text.js +0 -16
  102. package/generators/node_modules/string-width-cjs/node_modules/emoji-regex/index.js +0 -18
  103. package/generators/node_modules/string-width-cjs/node_modules/emoji-regex/text.js +0 -18
  104. package/generators/node_modules/string-width-cjs/node_modules/strip-ansi/index.js +0 -21
  105. package/generators/node_modules/strip-ansi/index.js +0 -7
  106. package/generators/node_modules/strip-ansi-cjs/index.js +0 -21
  107. package/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js +0 -19
  108. package/generators/node_modules/which/which.js +0 -108
  109. package/generators/node_modules/wrap-ansi/index.js +0 -134
  110. package/generators/node_modules/wrap-ansi-cjs/index.js +0 -158
  111. package/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js +0 -19
  112. package/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.js +0 -281
  113. package/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/index.js +0 -16
  114. package/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/text.js +0 -16
  115. package/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.js +0 -18
  116. package/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/text.js +0 -18
  117. package/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/index.js +0 -49
  118. package/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js +0 -21
  119. package/src/generators/node_modules/.package-lock.json +0 -458
  120. package/src/generators/node_modules/@isaacs/cliui/LICENSE.txt +0 -14
  121. package/src/generators/node_modules/@isaacs/cliui/README.md +0 -143
  122. package/src/generators/node_modules/@isaacs/cliui/build/index.cjs +0 -317
  123. package/src/generators/node_modules/@isaacs/cliui/build/index.d.cts +0 -43
  124. package/src/generators/node_modules/@isaacs/cliui/build/lib/index.js +0 -302
  125. package/src/generators/node_modules/@isaacs/cliui/index.mjs +0 -14
  126. package/src/generators/node_modules/@isaacs/cliui/package.json +0 -86
  127. package/src/generators/node_modules/@pkgjs/parseargs/.editorconfig +0 -14
  128. package/src/generators/node_modules/@pkgjs/parseargs/CHANGELOG.md +0 -147
  129. package/src/generators/node_modules/@pkgjs/parseargs/LICENSE +0 -201
  130. package/src/generators/node_modules/@pkgjs/parseargs/README.md +0 -413
  131. package/src/generators/node_modules/@pkgjs/parseargs/examples/is-default-value.js +0 -25
  132. package/src/generators/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js +0 -35
  133. package/src/generators/node_modules/@pkgjs/parseargs/examples/negate.js +0 -43
  134. package/src/generators/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js +0 -31
  135. package/src/generators/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs +0 -41
  136. package/src/generators/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js +0 -26
  137. package/src/generators/node_modules/@pkgjs/parseargs/index.js +0 -396
  138. package/src/generators/node_modules/@pkgjs/parseargs/internal/errors.js +0 -47
  139. package/src/generators/node_modules/@pkgjs/parseargs/internal/primordials.js +0 -393
  140. package/src/generators/node_modules/@pkgjs/parseargs/internal/util.js +0 -14
  141. package/src/generators/node_modules/@pkgjs/parseargs/internal/validators.js +0 -89
  142. package/src/generators/node_modules/@pkgjs/parseargs/package.json +0 -36
  143. package/src/generators/node_modules/@pkgjs/parseargs/utils.js +0 -198
  144. package/src/generators/node_modules/ansi-regex/index.d.ts +0 -33
  145. package/src/generators/node_modules/ansi-regex/index.js +0 -8
  146. package/src/generators/node_modules/ansi-regex/license +0 -9
  147. package/src/generators/node_modules/ansi-regex/package.json +0 -58
  148. package/src/generators/node_modules/ansi-regex/readme.md +0 -72
  149. package/src/generators/node_modules/ansi-styles/index.d.ts +0 -236
  150. package/src/generators/node_modules/ansi-styles/index.js +0 -223
  151. package/src/generators/node_modules/ansi-styles/license +0 -9
  152. package/src/generators/node_modules/ansi-styles/package.json +0 -54
  153. package/src/generators/node_modules/ansi-styles/readme.md +0 -173
  154. package/src/generators/node_modules/balanced-match/.github/FUNDING.yml +0 -2
  155. package/src/generators/node_modules/balanced-match/LICENSE.md +0 -21
  156. package/src/generators/node_modules/balanced-match/README.md +0 -97
  157. package/src/generators/node_modules/balanced-match/index.js +0 -62
  158. package/src/generators/node_modules/balanced-match/package.json +0 -48
  159. package/src/generators/node_modules/brace-expansion/.github/FUNDING.yml +0 -2
  160. package/src/generators/node_modules/brace-expansion/LICENSE +0 -21
  161. package/src/generators/node_modules/brace-expansion/README.md +0 -135
  162. package/src/generators/node_modules/brace-expansion/index.js +0 -203
  163. package/src/generators/node_modules/brace-expansion/package.json +0 -46
  164. package/src/generators/node_modules/change-case/README.md +0 -78
  165. package/src/generators/node_modules/change-case/dist/index.d.ts +0 -78
  166. package/src/generators/node_modules/change-case/dist/index.js +0 -206
  167. package/src/generators/node_modules/change-case/dist/index.js.map +0 -1
  168. package/src/generators/node_modules/change-case/dist/keys.d.ts +0 -11
  169. package/src/generators/node_modules/change-case/dist/keys.js +0 -31
  170. package/src/generators/node_modules/change-case/dist/keys.js.map +0 -1
  171. package/src/generators/node_modules/change-case/package.json +0 -56
  172. package/src/generators/node_modules/color-convert/CHANGELOG.md +0 -54
  173. package/src/generators/node_modules/color-convert/LICENSE +0 -21
  174. package/src/generators/node_modules/color-convert/README.md +0 -68
  175. package/src/generators/node_modules/color-convert/conversions.js +0 -839
  176. package/src/generators/node_modules/color-convert/index.js +0 -81
  177. package/src/generators/node_modules/color-convert/package.json +0 -48
  178. package/src/generators/node_modules/color-convert/route.js +0 -97
  179. package/src/generators/node_modules/color-name/LICENSE +0 -8
  180. package/src/generators/node_modules/color-name/README.md +0 -11
  181. package/src/generators/node_modules/color-name/index.js +0 -152
  182. package/src/generators/node_modules/color-name/package.json +0 -28
  183. package/src/generators/node_modules/cross-spawn/CHANGELOG.md +0 -130
  184. package/src/generators/node_modules/cross-spawn/LICENSE +0 -21
  185. package/src/generators/node_modules/cross-spawn/README.md +0 -96
  186. package/src/generators/node_modules/cross-spawn/index.js +0 -39
  187. package/src/generators/node_modules/cross-spawn/lib/enoent.js +0 -59
  188. package/src/generators/node_modules/cross-spawn/lib/parse.js +0 -91
  189. package/src/generators/node_modules/cross-spawn/lib/util/escape.js +0 -45
  190. package/src/generators/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
  191. package/src/generators/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
  192. package/src/generators/node_modules/cross-spawn/package.json +0 -73
  193. package/src/generators/node_modules/eastasianwidth/README.md +0 -32
  194. package/src/generators/node_modules/eastasianwidth/eastasianwidth.js +0 -311
  195. package/src/generators/node_modules/eastasianwidth/package.json +0 -18
  196. package/src/generators/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  197. package/src/generators/node_modules/emoji-regex/README.md +0 -137
  198. package/src/generators/node_modules/emoji-regex/RGI_Emoji.d.ts +0 -5
  199. package/src/generators/node_modules/emoji-regex/RGI_Emoji.js +0 -6
  200. package/src/generators/node_modules/emoji-regex/es2015/RGI_Emoji.d.ts +0 -5
  201. package/src/generators/node_modules/emoji-regex/es2015/RGI_Emoji.js +0 -6
  202. package/src/generators/node_modules/emoji-regex/es2015/index.d.ts +0 -5
  203. package/src/generators/node_modules/emoji-regex/es2015/index.js +0 -6
  204. package/src/generators/node_modules/emoji-regex/es2015/text.d.ts +0 -5
  205. package/src/generators/node_modules/emoji-regex/es2015/text.js +0 -6
  206. package/src/generators/node_modules/emoji-regex/index.d.ts +0 -5
  207. package/src/generators/node_modules/emoji-regex/index.js +0 -6
  208. package/src/generators/node_modules/emoji-regex/package.json +0 -52
  209. package/src/generators/node_modules/emoji-regex/text.d.ts +0 -5
  210. package/src/generators/node_modules/emoji-regex/text.js +0 -6
  211. package/src/generators/node_modules/flat/LICENSE +0 -12
  212. package/src/generators/node_modules/flat/README.md +0 -234
  213. package/src/generators/node_modules/flat/cli.js +0 -40
  214. package/src/generators/node_modules/flat/index.d.ts +0 -17
  215. package/src/generators/node_modules/flat/index.js +0 -157
  216. package/src/generators/node_modules/flat/package.json +0 -49
  217. package/src/generators/node_modules/foreground-child/LICENSE +0 -15
  218. package/src/generators/node_modules/foreground-child/README.md +0 -90
  219. package/src/generators/node_modules/foreground-child/dist/cjs/all-signals.d.ts +0 -3
  220. package/src/generators/node_modules/foreground-child/dist/cjs/all-signals.d.ts.map +0 -1
  221. package/src/generators/node_modules/foreground-child/dist/cjs/all-signals.js +0 -58
  222. package/src/generators/node_modules/foreground-child/dist/cjs/all-signals.js.map +0 -1
  223. package/src/generators/node_modules/foreground-child/dist/cjs/index.d.ts +0 -54
  224. package/src/generators/node_modules/foreground-child/dist/cjs/index.d.ts.map +0 -1
  225. package/src/generators/node_modules/foreground-child/dist/cjs/index.js +0 -154
  226. package/src/generators/node_modules/foreground-child/dist/cjs/index.js.map +0 -1
  227. package/src/generators/node_modules/foreground-child/dist/cjs/package.json +0 -3
  228. package/src/generators/node_modules/foreground-child/dist/cjs/watchdog.d.ts +0 -4
  229. package/src/generators/node_modules/foreground-child/dist/cjs/watchdog.d.ts.map +0 -1
  230. package/src/generators/node_modules/foreground-child/dist/cjs/watchdog.js +0 -43
  231. package/src/generators/node_modules/foreground-child/dist/cjs/watchdog.js.map +0 -1
  232. package/src/generators/node_modules/foreground-child/dist/mjs/all-signals.d.ts +0 -3
  233. package/src/generators/node_modules/foreground-child/dist/mjs/all-signals.d.ts.map +0 -1
  234. package/src/generators/node_modules/foreground-child/dist/mjs/all-signals.js +0 -52
  235. package/src/generators/node_modules/foreground-child/dist/mjs/all-signals.js.map +0 -1
  236. package/src/generators/node_modules/foreground-child/dist/mjs/index.d.ts +0 -54
  237. package/src/generators/node_modules/foreground-child/dist/mjs/index.d.ts.map +0 -1
  238. package/src/generators/node_modules/foreground-child/dist/mjs/index.js +0 -146
  239. package/src/generators/node_modules/foreground-child/dist/mjs/index.js.map +0 -1
  240. package/src/generators/node_modules/foreground-child/dist/mjs/package.json +0 -3
  241. package/src/generators/node_modules/foreground-child/dist/mjs/watchdog.d.ts +0 -4
  242. package/src/generators/node_modules/foreground-child/dist/mjs/watchdog.d.ts.map +0 -1
  243. package/src/generators/node_modules/foreground-child/dist/mjs/watchdog.js +0 -39
  244. package/src/generators/node_modules/foreground-child/dist/mjs/watchdog.js.map +0 -1
  245. package/src/generators/node_modules/foreground-child/package.json +0 -83
  246. package/src/generators/node_modules/glob/LICENSE +0 -15
  247. package/src/generators/node_modules/glob/README.md +0 -1214
  248. package/src/generators/node_modules/glob/dist/commonjs/glob.d.ts +0 -344
  249. package/src/generators/node_modules/glob/dist/commonjs/glob.d.ts.map +0 -1
  250. package/src/generators/node_modules/glob/dist/commonjs/glob.js +0 -243
  251. package/src/generators/node_modules/glob/dist/commonjs/glob.js.map +0 -1
  252. package/src/generators/node_modules/glob/dist/commonjs/has-magic.d.ts +0 -14
  253. package/src/generators/node_modules/glob/dist/commonjs/has-magic.d.ts.map +0 -1
  254. package/src/generators/node_modules/glob/dist/commonjs/has-magic.js +0 -27
  255. package/src/generators/node_modules/glob/dist/commonjs/has-magic.js.map +0 -1
  256. package/src/generators/node_modules/glob/dist/commonjs/ignore.d.ts +0 -20
  257. package/src/generators/node_modules/glob/dist/commonjs/ignore.d.ts.map +0 -1
  258. package/src/generators/node_modules/glob/dist/commonjs/ignore.js +0 -108
  259. package/src/generators/node_modules/glob/dist/commonjs/ignore.js.map +0 -1
  260. package/src/generators/node_modules/glob/dist/commonjs/index.d.ts +0 -96
  261. package/src/generators/node_modules/glob/dist/commonjs/index.d.ts.map +0 -1
  262. package/src/generators/node_modules/glob/dist/commonjs/index.js +0 -68
  263. package/src/generators/node_modules/glob/dist/commonjs/index.js.map +0 -1
  264. package/src/generators/node_modules/glob/dist/commonjs/package.json +0 -1
  265. package/src/generators/node_modules/glob/dist/commonjs/pattern.d.ts +0 -77
  266. package/src/generators/node_modules/glob/dist/commonjs/pattern.d.ts.map +0 -1
  267. package/src/generators/node_modules/glob/dist/commonjs/pattern.js +0 -219
  268. package/src/generators/node_modules/glob/dist/commonjs/pattern.js.map +0 -1
  269. package/src/generators/node_modules/glob/dist/commonjs/processor.d.ts +0 -59
  270. package/src/generators/node_modules/glob/dist/commonjs/processor.d.ts.map +0 -1
  271. package/src/generators/node_modules/glob/dist/commonjs/processor.js +0 -302
  272. package/src/generators/node_modules/glob/dist/commonjs/processor.js.map +0 -1
  273. package/src/generators/node_modules/glob/dist/commonjs/walker.d.ts +0 -96
  274. package/src/generators/node_modules/glob/dist/commonjs/walker.d.ts.map +0 -1
  275. package/src/generators/node_modules/glob/dist/commonjs/walker.js +0 -358
  276. package/src/generators/node_modules/glob/dist/commonjs/walker.js.map +0 -1
  277. package/src/generators/node_modules/glob/dist/esm/bin.d.mts +0 -3
  278. package/src/generators/node_modules/glob/dist/esm/bin.d.mts.map +0 -1
  279. package/src/generators/node_modules/glob/dist/esm/bin.mjs +0 -275
  280. package/src/generators/node_modules/glob/dist/esm/bin.mjs.map +0 -1
  281. package/src/generators/node_modules/glob/dist/esm/glob.d.ts +0 -344
  282. package/src/generators/node_modules/glob/dist/esm/glob.d.ts.map +0 -1
  283. package/src/generators/node_modules/glob/dist/esm/glob.js +0 -239
  284. package/src/generators/node_modules/glob/dist/esm/glob.js.map +0 -1
  285. package/src/generators/node_modules/glob/dist/esm/has-magic.d.ts +0 -14
  286. package/src/generators/node_modules/glob/dist/esm/has-magic.d.ts.map +0 -1
  287. package/src/generators/node_modules/glob/dist/esm/has-magic.js +0 -23
  288. package/src/generators/node_modules/glob/dist/esm/has-magic.js.map +0 -1
  289. package/src/generators/node_modules/glob/dist/esm/ignore.d.ts +0 -20
  290. package/src/generators/node_modules/glob/dist/esm/ignore.d.ts.map +0 -1
  291. package/src/generators/node_modules/glob/dist/esm/ignore.js +0 -104
  292. package/src/generators/node_modules/glob/dist/esm/ignore.js.map +0 -1
  293. package/src/generators/node_modules/glob/dist/esm/index.d.ts +0 -96
  294. package/src/generators/node_modules/glob/dist/esm/index.d.ts.map +0 -1
  295. package/src/generators/node_modules/glob/dist/esm/index.js +0 -56
  296. package/src/generators/node_modules/glob/dist/esm/index.js.map +0 -1
  297. package/src/generators/node_modules/glob/dist/esm/package.json +0 -1
  298. package/src/generators/node_modules/glob/dist/esm/pattern.d.ts +0 -77
  299. package/src/generators/node_modules/glob/dist/esm/pattern.d.ts.map +0 -1
  300. package/src/generators/node_modules/glob/dist/esm/pattern.js +0 -215
  301. package/src/generators/node_modules/glob/dist/esm/pattern.js.map +0 -1
  302. package/src/generators/node_modules/glob/dist/esm/processor.d.ts +0 -59
  303. package/src/generators/node_modules/glob/dist/esm/processor.d.ts.map +0 -1
  304. package/src/generators/node_modules/glob/dist/esm/processor.js +0 -295
  305. package/src/generators/node_modules/glob/dist/esm/processor.js.map +0 -1
  306. package/src/generators/node_modules/glob/dist/esm/walker.d.ts +0 -96
  307. package/src/generators/node_modules/glob/dist/esm/walker.d.ts.map +0 -1
  308. package/src/generators/node_modules/glob/dist/esm/walker.js +0 -352
  309. package/src/generators/node_modules/glob/dist/esm/walker.js.map +0 -1
  310. package/src/generators/node_modules/glob/package.json +0 -97
  311. package/src/generators/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  312. package/src/generators/node_modules/is-fullwidth-code-point/index.js +0 -50
  313. package/src/generators/node_modules/is-fullwidth-code-point/license +0 -9
  314. package/src/generators/node_modules/is-fullwidth-code-point/package.json +0 -42
  315. package/src/generators/node_modules/is-fullwidth-code-point/readme.md +0 -39
  316. package/src/generators/node_modules/isexe/LICENSE +0 -15
  317. package/src/generators/node_modules/isexe/README.md +0 -51
  318. package/src/generators/node_modules/isexe/index.js +0 -57
  319. package/src/generators/node_modules/isexe/mode.js +0 -41
  320. package/src/generators/node_modules/isexe/package.json +0 -31
  321. package/src/generators/node_modules/isexe/test/basic.js +0 -221
  322. package/src/generators/node_modules/isexe/windows.js +0 -42
  323. package/src/generators/node_modules/jackspeak/LICENSE.md +0 -55
  324. package/src/generators/node_modules/jackspeak/README.md +0 -348
  325. package/src/generators/node_modules/jackspeak/dist/commonjs/index.d.ts +0 -292
  326. package/src/generators/node_modules/jackspeak/dist/commonjs/index.d.ts.map +0 -1
  327. package/src/generators/node_modules/jackspeak/dist/commonjs/index.js +0 -850
  328. package/src/generators/node_modules/jackspeak/dist/commonjs/index.js.map +0 -1
  329. package/src/generators/node_modules/jackspeak/dist/commonjs/package.json +0 -1
  330. package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args-cjs.cjs.map +0 -1
  331. package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args-cjs.d.cts.map +0 -1
  332. package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args.d.ts +0 -4
  333. package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args.d.ts.map +0 -1
  334. package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args.js +0 -50
  335. package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args.js.map +0 -1
  336. package/src/generators/node_modules/jackspeak/dist/esm/index.d.ts +0 -292
  337. package/src/generators/node_modules/jackspeak/dist/esm/index.d.ts.map +0 -1
  338. package/src/generators/node_modules/jackspeak/dist/esm/index.js +0 -840
  339. package/src/generators/node_modules/jackspeak/dist/esm/index.js.map +0 -1
  340. package/src/generators/node_modules/jackspeak/dist/esm/package.json +0 -1
  341. package/src/generators/node_modules/jackspeak/dist/esm/parse-args.d.ts +0 -4
  342. package/src/generators/node_modules/jackspeak/dist/esm/parse-args.d.ts.map +0 -1
  343. package/src/generators/node_modules/jackspeak/dist/esm/parse-args.js +0 -26
  344. package/src/generators/node_modules/jackspeak/dist/esm/parse-args.js.map +0 -1
  345. package/src/generators/node_modules/jackspeak/package.json +0 -94
  346. package/src/generators/node_modules/lru-cache/LICENSE +0 -15
  347. package/src/generators/node_modules/lru-cache/README.md +0 -1204
  348. package/src/generators/node_modules/lru-cache/dist/commonjs/index.d.ts +0 -851
  349. package/src/generators/node_modules/lru-cache/dist/commonjs/index.d.ts.map +0 -1
  350. package/src/generators/node_modules/lru-cache/dist/commonjs/index.js +0 -1441
  351. package/src/generators/node_modules/lru-cache/dist/commonjs/index.js.map +0 -1
  352. package/src/generators/node_modules/lru-cache/dist/commonjs/package.json +0 -3
  353. package/src/generators/node_modules/lru-cache/dist/esm/index.d.ts +0 -851
  354. package/src/generators/node_modules/lru-cache/dist/esm/index.d.ts.map +0 -1
  355. package/src/generators/node_modules/lru-cache/dist/esm/index.js +0 -1437
  356. package/src/generators/node_modules/lru-cache/dist/esm/index.js.map +0 -1
  357. package/src/generators/node_modules/lru-cache/dist/esm/package.json +0 -3
  358. package/src/generators/node_modules/lru-cache/package.json +0 -118
  359. package/src/generators/node_modules/minimatch/LICENSE +0 -15
  360. package/src/generators/node_modules/minimatch/README.md +0 -454
  361. package/src/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +0 -2
  362. package/src/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +0 -1
  363. package/src/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +0 -14
  364. package/src/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +0 -1
  365. package/src/generators/node_modules/minimatch/dist/cjs/ast.d.ts +0 -19
  366. package/src/generators/node_modules/minimatch/dist/cjs/ast.d.ts.map +0 -1
  367. package/src/generators/node_modules/minimatch/dist/cjs/ast.js +0 -589
  368. package/src/generators/node_modules/minimatch/dist/cjs/ast.js.map +0 -1
  369. package/src/generators/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +0 -8
  370. package/src/generators/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +0 -1
  371. package/src/generators/node_modules/minimatch/dist/cjs/brace-expressions.js +0 -152
  372. package/src/generators/node_modules/minimatch/dist/cjs/brace-expressions.js.map +0 -1
  373. package/src/generators/node_modules/minimatch/dist/cjs/escape.d.ts +0 -12
  374. package/src/generators/node_modules/minimatch/dist/cjs/escape.d.ts.map +0 -1
  375. package/src/generators/node_modules/minimatch/dist/cjs/escape.js +0 -22
  376. package/src/generators/node_modules/minimatch/dist/cjs/escape.js.map +0 -1
  377. package/src/generators/node_modules/minimatch/dist/cjs/index.d.ts +0 -94
  378. package/src/generators/node_modules/minimatch/dist/cjs/index.d.ts.map +0 -1
  379. package/src/generators/node_modules/minimatch/dist/cjs/index.js +0 -1011
  380. package/src/generators/node_modules/minimatch/dist/cjs/index.js.map +0 -1
  381. package/src/generators/node_modules/minimatch/dist/cjs/package.json +0 -3
  382. package/src/generators/node_modules/minimatch/dist/cjs/unescape.d.ts +0 -17
  383. package/src/generators/node_modules/minimatch/dist/cjs/unescape.d.ts.map +0 -1
  384. package/src/generators/node_modules/minimatch/dist/cjs/unescape.js +0 -24
  385. package/src/generators/node_modules/minimatch/dist/cjs/unescape.js.map +0 -1
  386. package/src/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +0 -2
  387. package/src/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +0 -1
  388. package/src/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +0 -10
  389. package/src/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +0 -1
  390. package/src/generators/node_modules/minimatch/dist/mjs/ast.d.ts +0 -19
  391. package/src/generators/node_modules/minimatch/dist/mjs/ast.d.ts.map +0 -1
  392. package/src/generators/node_modules/minimatch/dist/mjs/ast.js +0 -585
  393. package/src/generators/node_modules/minimatch/dist/mjs/ast.js.map +0 -1
  394. package/src/generators/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +0 -8
  395. package/src/generators/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +0 -1
  396. package/src/generators/node_modules/minimatch/dist/mjs/brace-expressions.js +0 -148
  397. package/src/generators/node_modules/minimatch/dist/mjs/brace-expressions.js.map +0 -1
  398. package/src/generators/node_modules/minimatch/dist/mjs/escape.d.ts +0 -12
  399. package/src/generators/node_modules/minimatch/dist/mjs/escape.d.ts.map +0 -1
  400. package/src/generators/node_modules/minimatch/dist/mjs/escape.js +0 -18
  401. package/src/generators/node_modules/minimatch/dist/mjs/escape.js.map +0 -1
  402. package/src/generators/node_modules/minimatch/dist/mjs/index.d.ts +0 -94
  403. package/src/generators/node_modules/minimatch/dist/mjs/index.d.ts.map +0 -1
  404. package/src/generators/node_modules/minimatch/dist/mjs/index.js +0 -995
  405. package/src/generators/node_modules/minimatch/dist/mjs/index.js.map +0 -1
  406. package/src/generators/node_modules/minimatch/dist/mjs/package.json +0 -3
  407. package/src/generators/node_modules/minimatch/dist/mjs/unescape.d.ts +0 -17
  408. package/src/generators/node_modules/minimatch/dist/mjs/unescape.d.ts.map +0 -1
  409. package/src/generators/node_modules/minimatch/dist/mjs/unescape.js +0 -20
  410. package/src/generators/node_modules/minimatch/dist/mjs/unescape.js.map +0 -1
  411. package/src/generators/node_modules/minimatch/package.json +0 -86
  412. package/src/generators/node_modules/minipass/LICENSE +0 -15
  413. package/src/generators/node_modules/minipass/README.md +0 -825
  414. package/src/generators/node_modules/minipass/dist/commonjs/index.d.ts +0 -549
  415. package/src/generators/node_modules/minipass/dist/commonjs/index.d.ts.map +0 -1
  416. package/src/generators/node_modules/minipass/dist/commonjs/index.js +0 -1028
  417. package/src/generators/node_modules/minipass/dist/commonjs/index.js.map +0 -1
  418. package/src/generators/node_modules/minipass/dist/commonjs/package.json +0 -1
  419. package/src/generators/node_modules/minipass/dist/esm/index.d.ts +0 -549
  420. package/src/generators/node_modules/minipass/dist/esm/index.d.ts.map +0 -1
  421. package/src/generators/node_modules/minipass/dist/esm/index.js +0 -1018
  422. package/src/generators/node_modules/minipass/dist/esm/index.js.map +0 -1
  423. package/src/generators/node_modules/minipass/dist/esm/package.json +0 -1
  424. package/src/generators/node_modules/minipass/package.json +0 -82
  425. package/src/generators/node_modules/path-key/index.d.ts +0 -40
  426. package/src/generators/node_modules/path-key/index.js +0 -16
  427. package/src/generators/node_modules/path-key/license +0 -9
  428. package/src/generators/node_modules/path-key/package.json +0 -39
  429. package/src/generators/node_modules/path-key/readme.md +0 -61
  430. package/src/generators/node_modules/path-scurry/LICENSE.md +0 -55
  431. package/src/generators/node_modules/path-scurry/README.md +0 -631
  432. package/src/generators/node_modules/path-scurry/dist/cjs/index.d.ts +0 -1107
  433. package/src/generators/node_modules/path-scurry/dist/cjs/index.d.ts.map +0 -1
  434. package/src/generators/node_modules/path-scurry/dist/cjs/index.js +0 -2018
  435. package/src/generators/node_modules/path-scurry/dist/cjs/index.js.map +0 -1
  436. package/src/generators/node_modules/path-scurry/dist/cjs/package.json +0 -3
  437. package/src/generators/node_modules/path-scurry/dist/mjs/index.d.ts +0 -1107
  438. package/src/generators/node_modules/path-scurry/dist/mjs/index.d.ts.map +0 -1
  439. package/src/generators/node_modules/path-scurry/dist/mjs/index.js +0 -1983
  440. package/src/generators/node_modules/path-scurry/dist/mjs/index.js.map +0 -1
  441. package/src/generators/node_modules/path-scurry/dist/mjs/package.json +0 -3
  442. package/src/generators/node_modules/path-scurry/package.json +0 -87
  443. package/src/generators/node_modules/shebang-command/index.js +0 -19
  444. package/src/generators/node_modules/shebang-command/license +0 -9
  445. package/src/generators/node_modules/shebang-command/package.json +0 -34
  446. package/src/generators/node_modules/shebang-command/readme.md +0 -34
  447. package/src/generators/node_modules/shebang-regex/index.d.ts +0 -22
  448. package/src/generators/node_modules/shebang-regex/index.js +0 -2
  449. package/src/generators/node_modules/shebang-regex/license +0 -9
  450. package/src/generators/node_modules/shebang-regex/package.json +0 -35
  451. package/src/generators/node_modules/shebang-regex/readme.md +0 -33
  452. package/src/generators/node_modules/signal-exit/LICENSE.txt +0 -16
  453. package/src/generators/node_modules/signal-exit/README.md +0 -74
  454. package/src/generators/node_modules/signal-exit/dist/cjs/browser.d.ts +0 -12
  455. package/src/generators/node_modules/signal-exit/dist/cjs/browser.d.ts.map +0 -1
  456. package/src/generators/node_modules/signal-exit/dist/cjs/browser.js +0 -10
  457. package/src/generators/node_modules/signal-exit/dist/cjs/browser.js.map +0 -1
  458. package/src/generators/node_modules/signal-exit/dist/cjs/index.d.ts +0 -48
  459. package/src/generators/node_modules/signal-exit/dist/cjs/index.d.ts.map +0 -1
  460. package/src/generators/node_modules/signal-exit/dist/cjs/index.js +0 -279
  461. package/src/generators/node_modules/signal-exit/dist/cjs/index.js.map +0 -1
  462. package/src/generators/node_modules/signal-exit/dist/cjs/package.json +0 -3
  463. package/src/generators/node_modules/signal-exit/dist/cjs/signals.d.ts +0 -29
  464. package/src/generators/node_modules/signal-exit/dist/cjs/signals.d.ts.map +0 -1
  465. package/src/generators/node_modules/signal-exit/dist/cjs/signals.js +0 -42
  466. package/src/generators/node_modules/signal-exit/dist/cjs/signals.js.map +0 -1
  467. package/src/generators/node_modules/signal-exit/dist/mjs/browser.d.ts +0 -12
  468. package/src/generators/node_modules/signal-exit/dist/mjs/browser.d.ts.map +0 -1
  469. package/src/generators/node_modules/signal-exit/dist/mjs/browser.js +0 -4
  470. package/src/generators/node_modules/signal-exit/dist/mjs/browser.js.map +0 -1
  471. package/src/generators/node_modules/signal-exit/dist/mjs/index.d.ts +0 -48
  472. package/src/generators/node_modules/signal-exit/dist/mjs/index.d.ts.map +0 -1
  473. package/src/generators/node_modules/signal-exit/dist/mjs/index.js +0 -275
  474. package/src/generators/node_modules/signal-exit/dist/mjs/index.js.map +0 -1
  475. package/src/generators/node_modules/signal-exit/dist/mjs/package.json +0 -3
  476. package/src/generators/node_modules/signal-exit/dist/mjs/signals.d.ts +0 -29
  477. package/src/generators/node_modules/signal-exit/dist/mjs/signals.d.ts.map +0 -1
  478. package/src/generators/node_modules/signal-exit/dist/mjs/signals.js +0 -39
  479. package/src/generators/node_modules/signal-exit/dist/mjs/signals.js.map +0 -1
  480. package/src/generators/node_modules/signal-exit/package.json +0 -106
  481. package/src/generators/node_modules/string-width/index.d.ts +0 -29
  482. package/src/generators/node_modules/string-width/index.js +0 -54
  483. package/src/generators/node_modules/string-width/license +0 -9
  484. package/src/generators/node_modules/string-width/package.json +0 -59
  485. package/src/generators/node_modules/string-width/readme.md +0 -67
  486. package/src/generators/node_modules/string-width-cjs/index.d.ts +0 -29
  487. package/src/generators/node_modules/string-width-cjs/index.js +0 -47
  488. package/src/generators/node_modules/string-width-cjs/license +0 -9
  489. package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/index.d.ts +0 -37
  490. package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/index.js +0 -10
  491. package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/license +0 -9
  492. package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/package.json +0 -55
  493. package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/readme.md +0 -78
  494. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  495. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/README.md +0 -73
  496. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/index.js +0 -6
  497. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/text.js +0 -6
  498. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/index.d.ts +0 -23
  499. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/index.js +0 -6
  500. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/package.json +0 -50
  501. package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/text.js +0 -6
  502. package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/index.d.ts +0 -17
  503. package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/index.js +0 -4
  504. package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/license +0 -9
  505. package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/package.json +0 -54
  506. package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/readme.md +0 -46
  507. package/src/generators/node_modules/string-width-cjs/package.json +0 -56
  508. package/src/generators/node_modules/string-width-cjs/readme.md +0 -50
  509. package/src/generators/node_modules/strip-ansi/index.d.ts +0 -15
  510. package/src/generators/node_modules/strip-ansi/index.js +0 -14
  511. package/src/generators/node_modules/strip-ansi/license +0 -9
  512. package/src/generators/node_modules/strip-ansi/package.json +0 -57
  513. package/src/generators/node_modules/strip-ansi/readme.md +0 -41
  514. package/src/generators/node_modules/strip-ansi-cjs/index.d.ts +0 -17
  515. package/src/generators/node_modules/strip-ansi-cjs/index.js +0 -4
  516. package/src/generators/node_modules/strip-ansi-cjs/license +0 -9
  517. package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.d.ts +0 -37
  518. package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js +0 -10
  519. package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/license +0 -9
  520. package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/package.json +0 -55
  521. package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/readme.md +0 -78
  522. package/src/generators/node_modules/strip-ansi-cjs/package.json +0 -54
  523. package/src/generators/node_modules/strip-ansi-cjs/readme.md +0 -46
  524. package/src/generators/node_modules/which/CHANGELOG.md +0 -166
  525. package/src/generators/node_modules/which/LICENSE +0 -15
  526. package/src/generators/node_modules/which/README.md +0 -54
  527. package/src/generators/node_modules/which/bin/node-which +0 -52
  528. package/src/generators/node_modules/which/package.json +0 -43
  529. package/src/generators/node_modules/which/which.js +0 -125
  530. package/src/generators/node_modules/wrap-ansi/index.d.ts +0 -41
  531. package/src/generators/node_modules/wrap-ansi/index.js +0 -214
  532. package/src/generators/node_modules/wrap-ansi/license +0 -9
  533. package/src/generators/node_modules/wrap-ansi/package.json +0 -69
  534. package/src/generators/node_modules/wrap-ansi/readme.md +0 -91
  535. package/src/generators/node_modules/wrap-ansi-cjs/index.js +0 -216
  536. package/src/generators/node_modules/wrap-ansi-cjs/license +0 -9
  537. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.d.ts +0 -37
  538. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js +0 -10
  539. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/license +0 -9
  540. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/package.json +0 -55
  541. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/readme.md +0 -78
  542. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.d.ts +0 -345
  543. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.js +0 -163
  544. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/license +0 -9
  545. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/package.json +0 -56
  546. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/readme.md +0 -152
  547. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  548. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/README.md +0 -73
  549. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/index.js +0 -6
  550. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/text.js +0 -6
  551. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.d.ts +0 -23
  552. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.js +0 -6
  553. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/package.json +0 -50
  554. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/text.js +0 -6
  555. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/index.d.ts +0 -29
  556. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/index.js +0 -47
  557. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/license +0 -9
  558. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/package.json +0 -56
  559. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/readme.md +0 -50
  560. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.d.ts +0 -17
  561. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js +0 -4
  562. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/license +0 -9
  563. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/package.json +0 -54
  564. package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/readme.md +0 -46
  565. package/src/generators/node_modules/wrap-ansi-cjs/package.json +0 -62
  566. package/src/generators/node_modules/wrap-ansi-cjs/readme.md +0 -91
@@ -1,1441 +0,0 @@
1
- "use strict";
2
- /**
3
- * @module LRUCache
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.LRUCache = void 0;
7
- const perf = typeof performance === 'object' &&
8
- performance &&
9
- typeof performance.now === 'function'
10
- ? performance
11
- : Date;
12
- const warned = new Set();
13
- /* c8 ignore start */
14
- const PROCESS = (typeof process === 'object' && !!process ? process : {});
15
- /* c8 ignore start */
16
- const emitWarning = (msg, type, code, fn) => {
17
- typeof PROCESS.emitWarning === 'function'
18
- ? PROCESS.emitWarning(msg, type, code, fn)
19
- : console.error(`[${code}] ${type}: ${msg}`);
20
- };
21
- let AC = globalThis.AbortController;
22
- let AS = globalThis.AbortSignal;
23
- /* c8 ignore start */
24
- if (typeof AC === 'undefined') {
25
- //@ts-ignore
26
- AS = class AbortSignal {
27
- onabort;
28
- _onabort = [];
29
- reason;
30
- aborted = false;
31
- addEventListener(_, fn) {
32
- this._onabort.push(fn);
33
- }
34
- };
35
- //@ts-ignore
36
- AC = class AbortController {
37
- constructor() {
38
- warnACPolyfill();
39
- }
40
- signal = new AS();
41
- abort(reason) {
42
- if (this.signal.aborted)
43
- return;
44
- //@ts-ignore
45
- this.signal.reason = reason;
46
- //@ts-ignore
47
- this.signal.aborted = true;
48
- //@ts-ignore
49
- for (const fn of this.signal._onabort) {
50
- fn(reason);
51
- }
52
- this.signal.onabort?.(reason);
53
- }
54
- };
55
- let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1';
56
- const warnACPolyfill = () => {
57
- if (!printACPolyfillWarning)
58
- return;
59
- printACPolyfillWarning = false;
60
- emitWarning('AbortController is not defined. If using lru-cache in ' +
61
- 'node 14, load an AbortController polyfill from the ' +
62
- '`node-abort-controller` package. A minimal polyfill is ' +
63
- 'provided for use by LRUCache.fetch(), but it should not be ' +
64
- 'relied upon in other contexts (eg, passing it to other APIs that ' +
65
- 'use AbortController/AbortSignal might have undesirable effects). ' +
66
- 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill);
67
- };
68
- }
69
- /* c8 ignore stop */
70
- const shouldWarn = (code) => !warned.has(code);
71
- const TYPE = Symbol('type');
72
- const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
73
- /* c8 ignore start */
74
- // This is a little bit ridiculous, tbh.
75
- // The maximum array length is 2^32-1 or thereabouts on most JS impls.
76
- // And well before that point, you're caching the entire world, I mean,
77
- // that's ~32GB of just integers for the next/prev links, plus whatever
78
- // else to hold that many keys and values. Just filling the memory with
79
- // zeroes at init time is brutal when you get that big.
80
- // But why not be complete?
81
- // Maybe in the future, these limits will have expanded.
82
- const getUintArray = (max) => !isPosInt(max)
83
- ? null
84
- : max <= Math.pow(2, 8)
85
- ? Uint8Array
86
- : max <= Math.pow(2, 16)
87
- ? Uint16Array
88
- : max <= Math.pow(2, 32)
89
- ? Uint32Array
90
- : max <= Number.MAX_SAFE_INTEGER
91
- ? ZeroArray
92
- : null;
93
- /* c8 ignore stop */
94
- class ZeroArray extends Array {
95
- constructor(size) {
96
- super(size);
97
- this.fill(0);
98
- }
99
- }
100
- class Stack {
101
- heap;
102
- length;
103
- // private constructor
104
- static #constructing = false;
105
- static create(max) {
106
- const HeapCls = getUintArray(max);
107
- if (!HeapCls)
108
- return [];
109
- Stack.#constructing = true;
110
- const s = new Stack(max, HeapCls);
111
- Stack.#constructing = false;
112
- return s;
113
- }
114
- constructor(max, HeapCls) {
115
- /* c8 ignore start */
116
- if (!Stack.#constructing) {
117
- throw new TypeError('instantiate Stack using Stack.create(n)');
118
- }
119
- /* c8 ignore stop */
120
- this.heap = new HeapCls(max);
121
- this.length = 0;
122
- }
123
- push(n) {
124
- this.heap[this.length++] = n;
125
- }
126
- pop() {
127
- return this.heap[--this.length];
128
- }
129
- }
130
- /**
131
- * Default export, the thing you're using this module to get.
132
- *
133
- * All properties from the options object (with the exception of
134
- * {@link OptionsBase.max} and {@link OptionsBase.maxSize}) are added as
135
- * normal public members. (`max` and `maxBase` are read-only getters.)
136
- * Changing any of these will alter the defaults for subsequent method calls,
137
- * but is otherwise safe.
138
- */
139
- class LRUCache {
140
- // properties coming in from the options of these, only max and maxSize
141
- // really *need* to be protected. The rest can be modified, as they just
142
- // set defaults for various methods.
143
- #max;
144
- #maxSize;
145
- #dispose;
146
- #disposeAfter;
147
- #fetchMethod;
148
- /**
149
- * {@link LRUCache.OptionsBase.ttl}
150
- */
151
- ttl;
152
- /**
153
- * {@link LRUCache.OptionsBase.ttlResolution}
154
- */
155
- ttlResolution;
156
- /**
157
- * {@link LRUCache.OptionsBase.ttlAutopurge}
158
- */
159
- ttlAutopurge;
160
- /**
161
- * {@link LRUCache.OptionsBase.updateAgeOnGet}
162
- */
163
- updateAgeOnGet;
164
- /**
165
- * {@link LRUCache.OptionsBase.updateAgeOnHas}
166
- */
167
- updateAgeOnHas;
168
- /**
169
- * {@link LRUCache.OptionsBase.allowStale}
170
- */
171
- allowStale;
172
- /**
173
- * {@link LRUCache.OptionsBase.noDisposeOnSet}
174
- */
175
- noDisposeOnSet;
176
- /**
177
- * {@link LRUCache.OptionsBase.noUpdateTTL}
178
- */
179
- noUpdateTTL;
180
- /**
181
- * {@link LRUCache.OptionsBase.maxEntrySize}
182
- */
183
- maxEntrySize;
184
- /**
185
- * {@link LRUCache.OptionsBase.sizeCalculation}
186
- */
187
- sizeCalculation;
188
- /**
189
- * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
190
- */
191
- noDeleteOnFetchRejection;
192
- /**
193
- * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
194
- */
195
- noDeleteOnStaleGet;
196
- /**
197
- * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
198
- */
199
- allowStaleOnFetchAbort;
200
- /**
201
- * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
202
- */
203
- allowStaleOnFetchRejection;
204
- /**
205
- * {@link LRUCache.OptionsBase.ignoreFetchAbort}
206
- */
207
- ignoreFetchAbort;
208
- // computed properties
209
- #size;
210
- #calculatedSize;
211
- #keyMap;
212
- #keyList;
213
- #valList;
214
- #next;
215
- #prev;
216
- #head;
217
- #tail;
218
- #free;
219
- #disposed;
220
- #sizes;
221
- #starts;
222
- #ttls;
223
- #hasDispose;
224
- #hasFetchMethod;
225
- #hasDisposeAfter;
226
- /**
227
- * Do not call this method unless you need to inspect the
228
- * inner workings of the cache. If anything returned by this
229
- * object is modified in any way, strange breakage may occur.
230
- *
231
- * These fields are private for a reason!
232
- *
233
- * @internal
234
- */
235
- static unsafeExposeInternals(c) {
236
- return {
237
- // properties
238
- starts: c.#starts,
239
- ttls: c.#ttls,
240
- sizes: c.#sizes,
241
- keyMap: c.#keyMap,
242
- keyList: c.#keyList,
243
- valList: c.#valList,
244
- next: c.#next,
245
- prev: c.#prev,
246
- get head() {
247
- return c.#head;
248
- },
249
- get tail() {
250
- return c.#tail;
251
- },
252
- free: c.#free,
253
- // methods
254
- isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
255
- backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context),
256
- moveToTail: (index) => c.#moveToTail(index),
257
- indexes: (options) => c.#indexes(options),
258
- rindexes: (options) => c.#rindexes(options),
259
- isStale: (index) => c.#isStale(index),
260
- };
261
- }
262
- // Protected read-only members
263
- /**
264
- * {@link LRUCache.OptionsBase.max} (read-only)
265
- */
266
- get max() {
267
- return this.#max;
268
- }
269
- /**
270
- * {@link LRUCache.OptionsBase.maxSize} (read-only)
271
- */
272
- get maxSize() {
273
- return this.#maxSize;
274
- }
275
- /**
276
- * The total computed size of items in the cache (read-only)
277
- */
278
- get calculatedSize() {
279
- return this.#calculatedSize;
280
- }
281
- /**
282
- * The number of items stored in the cache (read-only)
283
- */
284
- get size() {
285
- return this.#size;
286
- }
287
- /**
288
- * {@link LRUCache.OptionsBase.fetchMethod} (read-only)
289
- */
290
- get fetchMethod() {
291
- return this.#fetchMethod;
292
- }
293
- /**
294
- * {@link LRUCache.OptionsBase.dispose} (read-only)
295
- */
296
- get dispose() {
297
- return this.#dispose;
298
- }
299
- /**
300
- * {@link LRUCache.OptionsBase.disposeAfter} (read-only)
301
- */
302
- get disposeAfter() {
303
- return this.#disposeAfter;
304
- }
305
- constructor(options) {
306
- const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options;
307
- if (max !== 0 && !isPosInt(max)) {
308
- throw new TypeError('max option must be a nonnegative integer');
309
- }
310
- const UintArray = max ? getUintArray(max) : Array;
311
- if (!UintArray) {
312
- throw new Error('invalid max value: ' + max);
313
- }
314
- this.#max = max;
315
- this.#maxSize = maxSize;
316
- this.maxEntrySize = maxEntrySize || this.#maxSize;
317
- this.sizeCalculation = sizeCalculation;
318
- if (this.sizeCalculation) {
319
- if (!this.#maxSize && !this.maxEntrySize) {
320
- throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize');
321
- }
322
- if (typeof this.sizeCalculation !== 'function') {
323
- throw new TypeError('sizeCalculation set to non-function');
324
- }
325
- }
326
- if (fetchMethod !== undefined &&
327
- typeof fetchMethod !== 'function') {
328
- throw new TypeError('fetchMethod must be a function if specified');
329
- }
330
- this.#fetchMethod = fetchMethod;
331
- this.#hasFetchMethod = !!fetchMethod;
332
- this.#keyMap = new Map();
333
- this.#keyList = new Array(max).fill(undefined);
334
- this.#valList = new Array(max).fill(undefined);
335
- this.#next = new UintArray(max);
336
- this.#prev = new UintArray(max);
337
- this.#head = 0;
338
- this.#tail = 0;
339
- this.#free = Stack.create(max);
340
- this.#size = 0;
341
- this.#calculatedSize = 0;
342
- if (typeof dispose === 'function') {
343
- this.#dispose = dispose;
344
- }
345
- if (typeof disposeAfter === 'function') {
346
- this.#disposeAfter = disposeAfter;
347
- this.#disposed = [];
348
- }
349
- else {
350
- this.#disposeAfter = undefined;
351
- this.#disposed = undefined;
352
- }
353
- this.#hasDispose = !!this.#dispose;
354
- this.#hasDisposeAfter = !!this.#disposeAfter;
355
- this.noDisposeOnSet = !!noDisposeOnSet;
356
- this.noUpdateTTL = !!noUpdateTTL;
357
- this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
358
- this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
359
- this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
360
- this.ignoreFetchAbort = !!ignoreFetchAbort;
361
- // NB: maxEntrySize is set to maxSize if it's set
362
- if (this.maxEntrySize !== 0) {
363
- if (this.#maxSize !== 0) {
364
- if (!isPosInt(this.#maxSize)) {
365
- throw new TypeError('maxSize must be a positive integer if specified');
366
- }
367
- }
368
- if (!isPosInt(this.maxEntrySize)) {
369
- throw new TypeError('maxEntrySize must be a positive integer if specified');
370
- }
371
- this.#initializeSizeTracking();
372
- }
373
- this.allowStale = !!allowStale;
374
- this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
375
- this.updateAgeOnGet = !!updateAgeOnGet;
376
- this.updateAgeOnHas = !!updateAgeOnHas;
377
- this.ttlResolution =
378
- isPosInt(ttlResolution) || ttlResolution === 0
379
- ? ttlResolution
380
- : 1;
381
- this.ttlAutopurge = !!ttlAutopurge;
382
- this.ttl = ttl || 0;
383
- if (this.ttl) {
384
- if (!isPosInt(this.ttl)) {
385
- throw new TypeError('ttl must be a positive integer if specified');
386
- }
387
- this.#initializeTTLTracking();
388
- }
389
- // do not allow completely unbounded caches
390
- if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {
391
- throw new TypeError('At least one of max, maxSize, or ttl is required');
392
- }
393
- if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
394
- const code = 'LRU_CACHE_UNBOUNDED';
395
- if (shouldWarn(code)) {
396
- warned.add(code);
397
- const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' +
398
- 'result in unbounded memory consumption.';
399
- emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache);
400
- }
401
- }
402
- }
403
- /**
404
- * Return the remaining TTL time for a given entry key
405
- */
406
- getRemainingTTL(key) {
407
- return this.#keyMap.has(key) ? Infinity : 0;
408
- }
409
- #initializeTTLTracking() {
410
- const ttls = new ZeroArray(this.#max);
411
- const starts = new ZeroArray(this.#max);
412
- this.#ttls = ttls;
413
- this.#starts = starts;
414
- this.#setItemTTL = (index, ttl, start = perf.now()) => {
415
- starts[index] = ttl !== 0 ? start : 0;
416
- ttls[index] = ttl;
417
- if (ttl !== 0 && this.ttlAutopurge) {
418
- const t = setTimeout(() => {
419
- if (this.#isStale(index)) {
420
- this.delete(this.#keyList[index]);
421
- }
422
- }, ttl + 1);
423
- // unref() not supported on all platforms
424
- /* c8 ignore start */
425
- if (t.unref) {
426
- t.unref();
427
- }
428
- /* c8 ignore stop */
429
- }
430
- };
431
- this.#updateItemAge = index => {
432
- starts[index] = ttls[index] !== 0 ? perf.now() : 0;
433
- };
434
- this.#statusTTL = (status, index) => {
435
- if (ttls[index]) {
436
- const ttl = ttls[index];
437
- const start = starts[index];
438
- /* c8 ignore next */
439
- if (!ttl || !start)
440
- return;
441
- status.ttl = ttl;
442
- status.start = start;
443
- status.now = cachedNow || getNow();
444
- const age = status.now - start;
445
- status.remainingTTL = ttl - age;
446
- }
447
- };
448
- // debounce calls to perf.now() to 1s so we're not hitting
449
- // that costly call repeatedly.
450
- let cachedNow = 0;
451
- const getNow = () => {
452
- const n = perf.now();
453
- if (this.ttlResolution > 0) {
454
- cachedNow = n;
455
- const t = setTimeout(() => (cachedNow = 0), this.ttlResolution);
456
- // not available on all platforms
457
- /* c8 ignore start */
458
- if (t.unref) {
459
- t.unref();
460
- }
461
- /* c8 ignore stop */
462
- }
463
- return n;
464
- };
465
- this.getRemainingTTL = key => {
466
- const index = this.#keyMap.get(key);
467
- if (index === undefined) {
468
- return 0;
469
- }
470
- const ttl = ttls[index];
471
- const start = starts[index];
472
- if (!ttl || !start) {
473
- return Infinity;
474
- }
475
- const age = (cachedNow || getNow()) - start;
476
- return ttl - age;
477
- };
478
- this.#isStale = index => {
479
- const s = starts[index];
480
- const t = ttls[index];
481
- return !!t && !!s && (cachedNow || getNow()) - s > t;
482
- };
483
- }
484
- // conditionally set private methods related to TTL
485
- #updateItemAge = () => { };
486
- #statusTTL = () => { };
487
- #setItemTTL = () => { };
488
- /* c8 ignore stop */
489
- #isStale = () => false;
490
- #initializeSizeTracking() {
491
- const sizes = new ZeroArray(this.#max);
492
- this.#calculatedSize = 0;
493
- this.#sizes = sizes;
494
- this.#removeItemSize = index => {
495
- this.#calculatedSize -= sizes[index];
496
- sizes[index] = 0;
497
- };
498
- this.#requireSize = (k, v, size, sizeCalculation) => {
499
- // provisionally accept background fetches.
500
- // actual value size will be checked when they return.
501
- if (this.#isBackgroundFetch(v)) {
502
- return 0;
503
- }
504
- if (!isPosInt(size)) {
505
- if (sizeCalculation) {
506
- if (typeof sizeCalculation !== 'function') {
507
- throw new TypeError('sizeCalculation must be a function');
508
- }
509
- size = sizeCalculation(v, k);
510
- if (!isPosInt(size)) {
511
- throw new TypeError('sizeCalculation return invalid (expect positive integer)');
512
- }
513
- }
514
- else {
515
- throw new TypeError('invalid size value (must be positive integer). ' +
516
- 'When maxSize or maxEntrySize is used, sizeCalculation ' +
517
- 'or size must be set.');
518
- }
519
- }
520
- return size;
521
- };
522
- this.#addItemSize = (index, size, status) => {
523
- sizes[index] = size;
524
- if (this.#maxSize) {
525
- const maxSize = this.#maxSize - sizes[index];
526
- while (this.#calculatedSize > maxSize) {
527
- this.#evict(true);
528
- }
529
- }
530
- this.#calculatedSize += sizes[index];
531
- if (status) {
532
- status.entrySize = size;
533
- status.totalCalculatedSize = this.#calculatedSize;
534
- }
535
- };
536
- }
537
- #removeItemSize = _i => { };
538
- #addItemSize = (_i, _s, _st) => { };
539
- #requireSize = (_k, _v, size, sizeCalculation) => {
540
- if (size || sizeCalculation) {
541
- throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache');
542
- }
543
- return 0;
544
- };
545
- *#indexes({ allowStale = this.allowStale } = {}) {
546
- if (this.#size) {
547
- for (let i = this.#tail; true;) {
548
- if (!this.#isValidIndex(i)) {
549
- break;
550
- }
551
- if (allowStale || !this.#isStale(i)) {
552
- yield i;
553
- }
554
- if (i === this.#head) {
555
- break;
556
- }
557
- else {
558
- i = this.#prev[i];
559
- }
560
- }
561
- }
562
- }
563
- *#rindexes({ allowStale = this.allowStale } = {}) {
564
- if (this.#size) {
565
- for (let i = this.#head; true;) {
566
- if (!this.#isValidIndex(i)) {
567
- break;
568
- }
569
- if (allowStale || !this.#isStale(i)) {
570
- yield i;
571
- }
572
- if (i === this.#tail) {
573
- break;
574
- }
575
- else {
576
- i = this.#next[i];
577
- }
578
- }
579
- }
580
- }
581
- #isValidIndex(index) {
582
- return (index !== undefined &&
583
- this.#keyMap.get(this.#keyList[index]) === index);
584
- }
585
- /**
586
- * Return a generator yielding `[key, value]` pairs,
587
- * in order from most recently used to least recently used.
588
- */
589
- *entries() {
590
- for (const i of this.#indexes()) {
591
- if (this.#valList[i] !== undefined &&
592
- this.#keyList[i] !== undefined &&
593
- !this.#isBackgroundFetch(this.#valList[i])) {
594
- yield [this.#keyList[i], this.#valList[i]];
595
- }
596
- }
597
- }
598
- /**
599
- * Inverse order version of {@link LRUCache.entries}
600
- *
601
- * Return a generator yielding `[key, value]` pairs,
602
- * in order from least recently used to most recently used.
603
- */
604
- *rentries() {
605
- for (const i of this.#rindexes()) {
606
- if (this.#valList[i] !== undefined &&
607
- this.#keyList[i] !== undefined &&
608
- !this.#isBackgroundFetch(this.#valList[i])) {
609
- yield [this.#keyList[i], this.#valList[i]];
610
- }
611
- }
612
- }
613
- /**
614
- * Return a generator yielding the keys in the cache,
615
- * in order from most recently used to least recently used.
616
- */
617
- *keys() {
618
- for (const i of this.#indexes()) {
619
- const k = this.#keyList[i];
620
- if (k !== undefined &&
621
- !this.#isBackgroundFetch(this.#valList[i])) {
622
- yield k;
623
- }
624
- }
625
- }
626
- /**
627
- * Inverse order version of {@link LRUCache.keys}
628
- *
629
- * Return a generator yielding the keys in the cache,
630
- * in order from least recently used to most recently used.
631
- */
632
- *rkeys() {
633
- for (const i of this.#rindexes()) {
634
- const k = this.#keyList[i];
635
- if (k !== undefined &&
636
- !this.#isBackgroundFetch(this.#valList[i])) {
637
- yield k;
638
- }
639
- }
640
- }
641
- /**
642
- * Return a generator yielding the values in the cache,
643
- * in order from most recently used to least recently used.
644
- */
645
- *values() {
646
- for (const i of this.#indexes()) {
647
- const v = this.#valList[i];
648
- if (v !== undefined &&
649
- !this.#isBackgroundFetch(this.#valList[i])) {
650
- yield this.#valList[i];
651
- }
652
- }
653
- }
654
- /**
655
- * Inverse order version of {@link LRUCache.values}
656
- *
657
- * Return a generator yielding the values in the cache,
658
- * in order from least recently used to most recently used.
659
- */
660
- *rvalues() {
661
- for (const i of this.#rindexes()) {
662
- const v = this.#valList[i];
663
- if (v !== undefined &&
664
- !this.#isBackgroundFetch(this.#valList[i])) {
665
- yield this.#valList[i];
666
- }
667
- }
668
- }
669
- /**
670
- * Iterating over the cache itself yields the same results as
671
- * {@link LRUCache.entries}
672
- */
673
- [Symbol.iterator]() {
674
- return this.entries();
675
- }
676
- /**
677
- * Find a value for which the supplied fn method returns a truthy value,
678
- * similar to Array.find(). fn is called as fn(value, key, cache).
679
- */
680
- find(fn, getOptions = {}) {
681
- for (const i of this.#indexes()) {
682
- const v = this.#valList[i];
683
- const value = this.#isBackgroundFetch(v)
684
- ? v.__staleWhileFetching
685
- : v;
686
- if (value === undefined)
687
- continue;
688
- if (fn(value, this.#keyList[i], this)) {
689
- return this.get(this.#keyList[i], getOptions);
690
- }
691
- }
692
- }
693
- /**
694
- * Call the supplied function on each item in the cache, in order from
695
- * most recently used to least recently used. fn is called as
696
- * fn(value, key, cache). Does not update age or recenty of use.
697
- * Does not iterate over stale values.
698
- */
699
- forEach(fn, thisp = this) {
700
- for (const i of this.#indexes()) {
701
- const v = this.#valList[i];
702
- const value = this.#isBackgroundFetch(v)
703
- ? v.__staleWhileFetching
704
- : v;
705
- if (value === undefined)
706
- continue;
707
- fn.call(thisp, value, this.#keyList[i], this);
708
- }
709
- }
710
- /**
711
- * The same as {@link LRUCache.forEach} but items are iterated over in
712
- * reverse order. (ie, less recently used items are iterated over first.)
713
- */
714
- rforEach(fn, thisp = this) {
715
- for (const i of this.#rindexes()) {
716
- const v = this.#valList[i];
717
- const value = this.#isBackgroundFetch(v)
718
- ? v.__staleWhileFetching
719
- : v;
720
- if (value === undefined)
721
- continue;
722
- fn.call(thisp, value, this.#keyList[i], this);
723
- }
724
- }
725
- /**
726
- * Delete any stale entries. Returns true if anything was removed,
727
- * false otherwise.
728
- */
729
- purgeStale() {
730
- let deleted = false;
731
- for (const i of this.#rindexes({ allowStale: true })) {
732
- if (this.#isStale(i)) {
733
- this.delete(this.#keyList[i]);
734
- deleted = true;
735
- }
736
- }
737
- return deleted;
738
- }
739
- /**
740
- * Get the extended info about a given entry, to get its value, size, and
741
- * TTL info simultaneously. Like {@link LRUCache#dump}, but just for a
742
- * single key. Always returns stale values, if their info is found in the
743
- * cache, so be sure to check for expired TTLs if relevant.
744
- */
745
- info(key) {
746
- const i = this.#keyMap.get(key);
747
- if (i === undefined)
748
- return undefined;
749
- const v = this.#valList[i];
750
- const value = this.#isBackgroundFetch(v)
751
- ? v.__staleWhileFetching
752
- : v;
753
- if (value === undefined)
754
- return undefined;
755
- const entry = { value };
756
- if (this.#ttls && this.#starts) {
757
- const ttl = this.#ttls[i];
758
- const start = this.#starts[i];
759
- if (ttl && start) {
760
- const remain = ttl - (perf.now() - start);
761
- entry.ttl = remain;
762
- entry.start = Date.now();
763
- }
764
- }
765
- if (this.#sizes) {
766
- entry.size = this.#sizes[i];
767
- }
768
- return entry;
769
- }
770
- /**
771
- * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
772
- * passed to cache.load()
773
- */
774
- dump() {
775
- const arr = [];
776
- for (const i of this.#indexes({ allowStale: true })) {
777
- const key = this.#keyList[i];
778
- const v = this.#valList[i];
779
- const value = this.#isBackgroundFetch(v)
780
- ? v.__staleWhileFetching
781
- : v;
782
- if (value === undefined || key === undefined)
783
- continue;
784
- const entry = { value };
785
- if (this.#ttls && this.#starts) {
786
- entry.ttl = this.#ttls[i];
787
- // always dump the start relative to a portable timestamp
788
- // it's ok for this to be a bit slow, it's a rare operation.
789
- const age = perf.now() - this.#starts[i];
790
- entry.start = Math.floor(Date.now() - age);
791
- }
792
- if (this.#sizes) {
793
- entry.size = this.#sizes[i];
794
- }
795
- arr.unshift([key, entry]);
796
- }
797
- return arr;
798
- }
799
- /**
800
- * Reset the cache and load in the items in entries in the order listed.
801
- * Note that the shape of the resulting cache may be different if the
802
- * same options are not used in both caches.
803
- */
804
- load(arr) {
805
- this.clear();
806
- for (const [key, entry] of arr) {
807
- if (entry.start) {
808
- // entry.start is a portable timestamp, but we may be using
809
- // node's performance.now(), so calculate the offset, so that
810
- // we get the intended remaining TTL, no matter how long it's
811
- // been on ice.
812
- //
813
- // it's ok for this to be a bit slow, it's a rare operation.
814
- const age = Date.now() - entry.start;
815
- entry.start = perf.now() - age;
816
- }
817
- this.set(key, entry.value, entry);
818
- }
819
- }
820
- /**
821
- * Add a value to the cache.
822
- *
823
- * Note: if `undefined` is specified as a value, this is an alias for
824
- * {@link LRUCache#delete}
825
- */
826
- set(k, v, setOptions = {}) {
827
- if (v === undefined) {
828
- this.delete(k);
829
- return this;
830
- }
831
- const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions;
832
- let { noUpdateTTL = this.noUpdateTTL } = setOptions;
833
- const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);
834
- // if the item doesn't fit, don't do anything
835
- // NB: maxEntrySize set to maxSize by default
836
- if (this.maxEntrySize && size > this.maxEntrySize) {
837
- if (status) {
838
- status.set = 'miss';
839
- status.maxEntrySizeExceeded = true;
840
- }
841
- // have to delete, in case something is there already.
842
- this.delete(k);
843
- return this;
844
- }
845
- let index = this.#size === 0 ? undefined : this.#keyMap.get(k);
846
- if (index === undefined) {
847
- // addition
848
- index = (this.#size === 0
849
- ? this.#tail
850
- : this.#free.length !== 0
851
- ? this.#free.pop()
852
- : this.#size === this.#max
853
- ? this.#evict(false)
854
- : this.#size);
855
- this.#keyList[index] = k;
856
- this.#valList[index] = v;
857
- this.#keyMap.set(k, index);
858
- this.#next[this.#tail] = index;
859
- this.#prev[index] = this.#tail;
860
- this.#tail = index;
861
- this.#size++;
862
- this.#addItemSize(index, size, status);
863
- if (status)
864
- status.set = 'add';
865
- noUpdateTTL = false;
866
- }
867
- else {
868
- // update
869
- this.#moveToTail(index);
870
- const oldVal = this.#valList[index];
871
- if (v !== oldVal) {
872
- if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
873
- oldVal.__abortController.abort(new Error('replaced'));
874
- const { __staleWhileFetching: s } = oldVal;
875
- if (s !== undefined && !noDisposeOnSet) {
876
- if (this.#hasDispose) {
877
- this.#dispose?.(s, k, 'set');
878
- }
879
- if (this.#hasDisposeAfter) {
880
- this.#disposed?.push([s, k, 'set']);
881
- }
882
- }
883
- }
884
- else if (!noDisposeOnSet) {
885
- if (this.#hasDispose) {
886
- this.#dispose?.(oldVal, k, 'set');
887
- }
888
- if (this.#hasDisposeAfter) {
889
- this.#disposed?.push([oldVal, k, 'set']);
890
- }
891
- }
892
- this.#removeItemSize(index);
893
- this.#addItemSize(index, size, status);
894
- this.#valList[index] = v;
895
- if (status) {
896
- status.set = 'replace';
897
- const oldValue = oldVal && this.#isBackgroundFetch(oldVal)
898
- ? oldVal.__staleWhileFetching
899
- : oldVal;
900
- if (oldValue !== undefined)
901
- status.oldValue = oldValue;
902
- }
903
- }
904
- else if (status) {
905
- status.set = 'update';
906
- }
907
- }
908
- if (ttl !== 0 && !this.#ttls) {
909
- this.#initializeTTLTracking();
910
- }
911
- if (this.#ttls) {
912
- if (!noUpdateTTL) {
913
- this.#setItemTTL(index, ttl, start);
914
- }
915
- if (status)
916
- this.#statusTTL(status, index);
917
- }
918
- if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
919
- const dt = this.#disposed;
920
- let task;
921
- while ((task = dt?.shift())) {
922
- this.#disposeAfter?.(...task);
923
- }
924
- }
925
- return this;
926
- }
927
- /**
928
- * Evict the least recently used item, returning its value or
929
- * `undefined` if cache is empty.
930
- */
931
- pop() {
932
- try {
933
- while (this.#size) {
934
- const val = this.#valList[this.#head];
935
- this.#evict(true);
936
- if (this.#isBackgroundFetch(val)) {
937
- if (val.__staleWhileFetching) {
938
- return val.__staleWhileFetching;
939
- }
940
- }
941
- else if (val !== undefined) {
942
- return val;
943
- }
944
- }
945
- }
946
- finally {
947
- if (this.#hasDisposeAfter && this.#disposed) {
948
- const dt = this.#disposed;
949
- let task;
950
- while ((task = dt?.shift())) {
951
- this.#disposeAfter?.(...task);
952
- }
953
- }
954
- }
955
- }
956
- #evict(free) {
957
- const head = this.#head;
958
- const k = this.#keyList[head];
959
- const v = this.#valList[head];
960
- if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {
961
- v.__abortController.abort(new Error('evicted'));
962
- }
963
- else if (this.#hasDispose || this.#hasDisposeAfter) {
964
- if (this.#hasDispose) {
965
- this.#dispose?.(v, k, 'evict');
966
- }
967
- if (this.#hasDisposeAfter) {
968
- this.#disposed?.push([v, k, 'evict']);
969
- }
970
- }
971
- this.#removeItemSize(head);
972
- // if we aren't about to use the index, then null these out
973
- if (free) {
974
- this.#keyList[head] = undefined;
975
- this.#valList[head] = undefined;
976
- this.#free.push(head);
977
- }
978
- if (this.#size === 1) {
979
- this.#head = this.#tail = 0;
980
- this.#free.length = 0;
981
- }
982
- else {
983
- this.#head = this.#next[head];
984
- }
985
- this.#keyMap.delete(k);
986
- this.#size--;
987
- return head;
988
- }
989
- /**
990
- * Check if a key is in the cache, without updating the recency of use.
991
- * Will return false if the item is stale, even though it is technically
992
- * in the cache.
993
- *
994
- * Will not update item age unless
995
- * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
996
- */
997
- has(k, hasOptions = {}) {
998
- const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
999
- const index = this.#keyMap.get(k);
1000
- if (index !== undefined) {
1001
- const v = this.#valList[index];
1002
- if (this.#isBackgroundFetch(v) &&
1003
- v.__staleWhileFetching === undefined) {
1004
- return false;
1005
- }
1006
- if (!this.#isStale(index)) {
1007
- if (updateAgeOnHas) {
1008
- this.#updateItemAge(index);
1009
- }
1010
- if (status) {
1011
- status.has = 'hit';
1012
- this.#statusTTL(status, index);
1013
- }
1014
- return true;
1015
- }
1016
- else if (status) {
1017
- status.has = 'stale';
1018
- this.#statusTTL(status, index);
1019
- }
1020
- }
1021
- else if (status) {
1022
- status.has = 'miss';
1023
- }
1024
- return false;
1025
- }
1026
- /**
1027
- * Like {@link LRUCache#get} but doesn't update recency or delete stale
1028
- * items.
1029
- *
1030
- * Returns `undefined` if the item is stale, unless
1031
- * {@link LRUCache.OptionsBase.allowStale} is set.
1032
- */
1033
- peek(k, peekOptions = {}) {
1034
- const { allowStale = this.allowStale } = peekOptions;
1035
- const index = this.#keyMap.get(k);
1036
- if (index === undefined ||
1037
- (!allowStale && this.#isStale(index))) {
1038
- return;
1039
- }
1040
- const v = this.#valList[index];
1041
- // either stale and allowed, or forcing a refresh of non-stale value
1042
- return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
1043
- }
1044
- #backgroundFetch(k, index, options, context) {
1045
- const v = index === undefined ? undefined : this.#valList[index];
1046
- if (this.#isBackgroundFetch(v)) {
1047
- return v;
1048
- }
1049
- const ac = new AC();
1050
- const { signal } = options;
1051
- // when/if our AC signals, then stop listening to theirs.
1052
- signal?.addEventListener('abort', () => ac.abort(signal.reason), {
1053
- signal: ac.signal,
1054
- });
1055
- const fetchOpts = {
1056
- signal: ac.signal,
1057
- options,
1058
- context,
1059
- };
1060
- const cb = (v, updateCache = false) => {
1061
- const { aborted } = ac.signal;
1062
- const ignoreAbort = options.ignoreFetchAbort && v !== undefined;
1063
- if (options.status) {
1064
- if (aborted && !updateCache) {
1065
- options.status.fetchAborted = true;
1066
- options.status.fetchError = ac.signal.reason;
1067
- if (ignoreAbort)
1068
- options.status.fetchAbortIgnored = true;
1069
- }
1070
- else {
1071
- options.status.fetchResolved = true;
1072
- }
1073
- }
1074
- if (aborted && !ignoreAbort && !updateCache) {
1075
- return fetchFail(ac.signal.reason);
1076
- }
1077
- // either we didn't abort, and are still here, or we did, and ignored
1078
- const bf = p;
1079
- if (this.#valList[index] === p) {
1080
- if (v === undefined) {
1081
- if (bf.__staleWhileFetching) {
1082
- this.#valList[index] = bf.__staleWhileFetching;
1083
- }
1084
- else {
1085
- this.delete(k);
1086
- }
1087
- }
1088
- else {
1089
- if (options.status)
1090
- options.status.fetchUpdated = true;
1091
- this.set(k, v, fetchOpts.options);
1092
- }
1093
- }
1094
- return v;
1095
- };
1096
- const eb = (er) => {
1097
- if (options.status) {
1098
- options.status.fetchRejected = true;
1099
- options.status.fetchError = er;
1100
- }
1101
- return fetchFail(er);
1102
- };
1103
- const fetchFail = (er) => {
1104
- const { aborted } = ac.signal;
1105
- const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
1106
- const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
1107
- const noDelete = allowStale || options.noDeleteOnFetchRejection;
1108
- const bf = p;
1109
- if (this.#valList[index] === p) {
1110
- // if we allow stale on fetch rejections, then we need to ensure that
1111
- // the stale value is not removed from the cache when the fetch fails.
1112
- const del = !noDelete || bf.__staleWhileFetching === undefined;
1113
- if (del) {
1114
- this.delete(k);
1115
- }
1116
- else if (!allowStaleAborted) {
1117
- // still replace the *promise* with the stale value,
1118
- // since we are done with the promise at this point.
1119
- // leave it untouched if we're still waiting for an
1120
- // aborted background fetch that hasn't yet returned.
1121
- this.#valList[index] = bf.__staleWhileFetching;
1122
- }
1123
- }
1124
- if (allowStale) {
1125
- if (options.status && bf.__staleWhileFetching !== undefined) {
1126
- options.status.returnedStale = true;
1127
- }
1128
- return bf.__staleWhileFetching;
1129
- }
1130
- else if (bf.__returned === bf) {
1131
- throw er;
1132
- }
1133
- };
1134
- const pcall = (res, rej) => {
1135
- const fmp = this.#fetchMethod?.(k, v, fetchOpts);
1136
- if (fmp && fmp instanceof Promise) {
1137
- fmp.then(v => res(v === undefined ? undefined : v), rej);
1138
- }
1139
- // ignored, we go until we finish, regardless.
1140
- // defer check until we are actually aborting,
1141
- // so fetchMethod can override.
1142
- ac.signal.addEventListener('abort', () => {
1143
- if (!options.ignoreFetchAbort ||
1144
- options.allowStaleOnFetchAbort) {
1145
- res(undefined);
1146
- // when it eventually resolves, update the cache.
1147
- if (options.allowStaleOnFetchAbort) {
1148
- res = v => cb(v, true);
1149
- }
1150
- }
1151
- });
1152
- };
1153
- if (options.status)
1154
- options.status.fetchDispatched = true;
1155
- const p = new Promise(pcall).then(cb, eb);
1156
- const bf = Object.assign(p, {
1157
- __abortController: ac,
1158
- __staleWhileFetching: v,
1159
- __returned: undefined,
1160
- });
1161
- if (index === undefined) {
1162
- // internal, don't expose status.
1163
- this.set(k, bf, { ...fetchOpts.options, status: undefined });
1164
- index = this.#keyMap.get(k);
1165
- }
1166
- else {
1167
- this.#valList[index] = bf;
1168
- }
1169
- return bf;
1170
- }
1171
- #isBackgroundFetch(p) {
1172
- if (!this.#hasFetchMethod)
1173
- return false;
1174
- const b = p;
1175
- return (!!b &&
1176
- b instanceof Promise &&
1177
- b.hasOwnProperty('__staleWhileFetching') &&
1178
- b.__abortController instanceof AC);
1179
- }
1180
- async fetch(k, fetchOptions = {}) {
1181
- const {
1182
- // get options
1183
- allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet,
1184
- // set options
1185
- ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL,
1186
- // fetch exclusive options
1187
- noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions;
1188
- if (!this.#hasFetchMethod) {
1189
- if (status)
1190
- status.fetch = 'get';
1191
- return this.get(k, {
1192
- allowStale,
1193
- updateAgeOnGet,
1194
- noDeleteOnStaleGet,
1195
- status,
1196
- });
1197
- }
1198
- const options = {
1199
- allowStale,
1200
- updateAgeOnGet,
1201
- noDeleteOnStaleGet,
1202
- ttl,
1203
- noDisposeOnSet,
1204
- size,
1205
- sizeCalculation,
1206
- noUpdateTTL,
1207
- noDeleteOnFetchRejection,
1208
- allowStaleOnFetchRejection,
1209
- allowStaleOnFetchAbort,
1210
- ignoreFetchAbort,
1211
- status,
1212
- signal,
1213
- };
1214
- let index = this.#keyMap.get(k);
1215
- if (index === undefined) {
1216
- if (status)
1217
- status.fetch = 'miss';
1218
- const p = this.#backgroundFetch(k, index, options, context);
1219
- return (p.__returned = p);
1220
- }
1221
- else {
1222
- // in cache, maybe already fetching
1223
- const v = this.#valList[index];
1224
- if (this.#isBackgroundFetch(v)) {
1225
- const stale = allowStale && v.__staleWhileFetching !== undefined;
1226
- if (status) {
1227
- status.fetch = 'inflight';
1228
- if (stale)
1229
- status.returnedStale = true;
1230
- }
1231
- return stale ? v.__staleWhileFetching : (v.__returned = v);
1232
- }
1233
- // if we force a refresh, that means do NOT serve the cached value,
1234
- // unless we are already in the process of refreshing the cache.
1235
- const isStale = this.#isStale(index);
1236
- if (!forceRefresh && !isStale) {
1237
- if (status)
1238
- status.fetch = 'hit';
1239
- this.#moveToTail(index);
1240
- if (updateAgeOnGet) {
1241
- this.#updateItemAge(index);
1242
- }
1243
- if (status)
1244
- this.#statusTTL(status, index);
1245
- return v;
1246
- }
1247
- // ok, it is stale or a forced refresh, and not already fetching.
1248
- // refresh the cache.
1249
- const p = this.#backgroundFetch(k, index, options, context);
1250
- const hasStale = p.__staleWhileFetching !== undefined;
1251
- const staleVal = hasStale && allowStale;
1252
- if (status) {
1253
- status.fetch = isStale ? 'stale' : 'refresh';
1254
- if (staleVal && isStale)
1255
- status.returnedStale = true;
1256
- }
1257
- return staleVal ? p.__staleWhileFetching : (p.__returned = p);
1258
- }
1259
- }
1260
- /**
1261
- * Return a value from the cache. Will update the recency of the cache
1262
- * entry found.
1263
- *
1264
- * If the key is not found, get() will return `undefined`.
1265
- */
1266
- get(k, getOptions = {}) {
1267
- const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions;
1268
- const index = this.#keyMap.get(k);
1269
- if (index !== undefined) {
1270
- const value = this.#valList[index];
1271
- const fetching = this.#isBackgroundFetch(value);
1272
- if (status)
1273
- this.#statusTTL(status, index);
1274
- if (this.#isStale(index)) {
1275
- if (status)
1276
- status.get = 'stale';
1277
- // delete only if not an in-flight background fetch
1278
- if (!fetching) {
1279
- if (!noDeleteOnStaleGet) {
1280
- this.delete(k);
1281
- }
1282
- if (status && allowStale)
1283
- status.returnedStale = true;
1284
- return allowStale ? value : undefined;
1285
- }
1286
- else {
1287
- if (status &&
1288
- allowStale &&
1289
- value.__staleWhileFetching !== undefined) {
1290
- status.returnedStale = true;
1291
- }
1292
- return allowStale ? value.__staleWhileFetching : undefined;
1293
- }
1294
- }
1295
- else {
1296
- if (status)
1297
- status.get = 'hit';
1298
- // if we're currently fetching it, we don't actually have it yet
1299
- // it's not stale, which means this isn't a staleWhileRefetching.
1300
- // If it's not stale, and fetching, AND has a __staleWhileFetching
1301
- // value, then that means the user fetched with {forceRefresh:true},
1302
- // so it's safe to return that value.
1303
- if (fetching) {
1304
- return value.__staleWhileFetching;
1305
- }
1306
- this.#moveToTail(index);
1307
- if (updateAgeOnGet) {
1308
- this.#updateItemAge(index);
1309
- }
1310
- return value;
1311
- }
1312
- }
1313
- else if (status) {
1314
- status.get = 'miss';
1315
- }
1316
- }
1317
- #connect(p, n) {
1318
- this.#prev[n] = p;
1319
- this.#next[p] = n;
1320
- }
1321
- #moveToTail(index) {
1322
- // if tail already, nothing to do
1323
- // if head, move head to next[index]
1324
- // else
1325
- // move next[prev[index]] to next[index] (head has no prev)
1326
- // move prev[next[index]] to prev[index]
1327
- // prev[index] = tail
1328
- // next[tail] = index
1329
- // tail = index
1330
- if (index !== this.#tail) {
1331
- if (index === this.#head) {
1332
- this.#head = this.#next[index];
1333
- }
1334
- else {
1335
- this.#connect(this.#prev[index], this.#next[index]);
1336
- }
1337
- this.#connect(this.#tail, index);
1338
- this.#tail = index;
1339
- }
1340
- }
1341
- /**
1342
- * Deletes a key out of the cache.
1343
- * Returns true if the key was deleted, false otherwise.
1344
- */
1345
- delete(k) {
1346
- let deleted = false;
1347
- if (this.#size !== 0) {
1348
- const index = this.#keyMap.get(k);
1349
- if (index !== undefined) {
1350
- deleted = true;
1351
- if (this.#size === 1) {
1352
- this.clear();
1353
- }
1354
- else {
1355
- this.#removeItemSize(index);
1356
- const v = this.#valList[index];
1357
- if (this.#isBackgroundFetch(v)) {
1358
- v.__abortController.abort(new Error('deleted'));
1359
- }
1360
- else if (this.#hasDispose || this.#hasDisposeAfter) {
1361
- if (this.#hasDispose) {
1362
- this.#dispose?.(v, k, 'delete');
1363
- }
1364
- if (this.#hasDisposeAfter) {
1365
- this.#disposed?.push([v, k, 'delete']);
1366
- }
1367
- }
1368
- this.#keyMap.delete(k);
1369
- this.#keyList[index] = undefined;
1370
- this.#valList[index] = undefined;
1371
- if (index === this.#tail) {
1372
- this.#tail = this.#prev[index];
1373
- }
1374
- else if (index === this.#head) {
1375
- this.#head = this.#next[index];
1376
- }
1377
- else {
1378
- const pi = this.#prev[index];
1379
- this.#next[pi] = this.#next[index];
1380
- const ni = this.#next[index];
1381
- this.#prev[ni] = this.#prev[index];
1382
- }
1383
- this.#size--;
1384
- this.#free.push(index);
1385
- }
1386
- }
1387
- }
1388
- if (this.#hasDisposeAfter && this.#disposed?.length) {
1389
- const dt = this.#disposed;
1390
- let task;
1391
- while ((task = dt?.shift())) {
1392
- this.#disposeAfter?.(...task);
1393
- }
1394
- }
1395
- return deleted;
1396
- }
1397
- /**
1398
- * Clear the cache entirely, throwing away all values.
1399
- */
1400
- clear() {
1401
- for (const index of this.#rindexes({ allowStale: true })) {
1402
- const v = this.#valList[index];
1403
- if (this.#isBackgroundFetch(v)) {
1404
- v.__abortController.abort(new Error('deleted'));
1405
- }
1406
- else {
1407
- const k = this.#keyList[index];
1408
- if (this.#hasDispose) {
1409
- this.#dispose?.(v, k, 'delete');
1410
- }
1411
- if (this.#hasDisposeAfter) {
1412
- this.#disposed?.push([v, k, 'delete']);
1413
- }
1414
- }
1415
- }
1416
- this.#keyMap.clear();
1417
- this.#valList.fill(undefined);
1418
- this.#keyList.fill(undefined);
1419
- if (this.#ttls && this.#starts) {
1420
- this.#ttls.fill(0);
1421
- this.#starts.fill(0);
1422
- }
1423
- if (this.#sizes) {
1424
- this.#sizes.fill(0);
1425
- }
1426
- this.#head = 0;
1427
- this.#tail = 0;
1428
- this.#free.length = 0;
1429
- this.#calculatedSize = 0;
1430
- this.#size = 0;
1431
- if (this.#hasDisposeAfter && this.#disposed) {
1432
- const dt = this.#disposed;
1433
- let task;
1434
- while ((task = dt?.shift())) {
1435
- this.#disposeAfter?.(...task);
1436
- }
1437
- }
1438
- }
1439
- }
1440
- exports.LRUCache = LRUCache;
1441
- //# sourceMappingURL=index.js.map