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