@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.
- package/CHANGELOG.md +6 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/generators/node_modules/@isaacs/cliui/build/lib/index.js +0 -211
- package/generators/node_modules/@pkgjs/parseargs/examples/is-default-value.js +0 -31
- package/generators/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js +0 -33
- package/generators/node_modules/@pkgjs/parseargs/examples/negate.js +0 -48
- package/generators/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js +0 -38
- package/generators/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js +0 -36
- package/generators/node_modules/@pkgjs/parseargs/index.js +0 -263
- package/generators/node_modules/@pkgjs/parseargs/internal/errors.js +0 -55
- package/generators/node_modules/@pkgjs/parseargs/internal/primordials.js +0 -258
- package/generators/node_modules/@pkgjs/parseargs/internal/util.js +0 -24
- package/generators/node_modules/@pkgjs/parseargs/internal/validators.js +0 -61
- package/generators/node_modules/@pkgjs/parseargs/utils.js +0 -86
- package/generators/node_modules/ansi-regex/index.js +0 -5
- package/generators/node_modules/ansi-styles/index.js +0 -304
- package/generators/node_modules/balanced-match/index.js +0 -70
- package/generators/node_modules/brace-expansion/index.js +0 -153
- package/generators/node_modules/change-case/dist/index.js +0 -135
- package/generators/node_modules/change-case/dist/keys.js +0 -28
- package/generators/node_modules/color-convert/conversions.js +0 -840
- package/generators/node_modules/color-convert/index.js +0 -66
- package/generators/node_modules/color-convert/route.js +0 -81
- package/generators/node_modules/color-name/index.js +0 -757
- package/generators/node_modules/cross-spawn/index.js +0 -47
- package/generators/node_modules/cross-spawn/lib/enoent.js +0 -50
- package/generators/node_modules/cross-spawn/lib/parse.js +0 -91
- package/generators/node_modules/cross-spawn/lib/util/escape.js +0 -31
- package/generators/node_modules/cross-spawn/lib/util/readShebang.js +0 -37
- package/generators/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -56
- package/generators/node_modules/eastasianwidth/eastasianwidth.js +0 -66
- package/generators/node_modules/emoji-regex/RGI_Emoji.js +0 -18
- package/generators/node_modules/emoji-regex/es2015/RGI_Emoji.js +0 -16
- package/generators/node_modules/emoji-regex/es2015/index.js +0 -16
- package/generators/node_modules/emoji-regex/es2015/text.js +0 -16
- package/generators/node_modules/emoji-regex/index.js +0 -18
- package/generators/node_modules/emoji-regex/text.js +0 -18
- package/generators/node_modules/flat/cli.js +0 -31
- package/generators/node_modules/flat/index.js +0 -83
- package/generators/node_modules/foreground-child/dist/cjs/all-signals.js +0 -30
- package/generators/node_modules/foreground-child/dist/cjs/index.js +0 -156
- package/generators/node_modules/foreground-child/dist/cjs/watchdog.js +0 -63
- package/generators/node_modules/foreground-child/dist/mjs/all-signals.js +0 -3
- package/generators/node_modules/foreground-child/dist/mjs/index.js +0 -111
- package/generators/node_modules/foreground-child/dist/mjs/watchdog.js +0 -39
- package/generators/node_modules/glob/dist/commonjs/glob.js +0 -205
- package/generators/node_modules/glob/dist/commonjs/has-magic.js +0 -33
- package/generators/node_modules/glob/dist/commonjs/ignore.js +0 -87
- package/generators/node_modules/glob/dist/commonjs/index.js +0 -114
- package/generators/node_modules/glob/dist/commonjs/pattern.js +0 -154
- package/generators/node_modules/glob/dist/commonjs/processor.js +0 -214
- package/generators/node_modules/glob/dist/commonjs/walker.js +0 -271
- package/generators/node_modules/glob/dist/esm/glob.js +0 -165
- package/generators/node_modules/glob/dist/esm/has-magic.js +0 -9
- package/generators/node_modules/glob/dist/esm/ignore.js +0 -59
- package/generators/node_modules/glob/dist/esm/index.js +0 -52
- package/generators/node_modules/glob/dist/esm/pattern.js +0 -130
- package/generators/node_modules/glob/dist/esm/processor.js +0 -187
- package/generators/node_modules/glob/dist/esm/walker.js +0 -237
- package/generators/node_modules/is-fullwidth-code-point/index.js +0 -22
- package/generators/node_modules/isexe/index.js +0 -64
- package/generators/node_modules/isexe/mode.js +0 -46
- package/generators/node_modules/isexe/test/basic.js +0 -229
- package/generators/node_modules/isexe/windows.js +0 -45
- package/generators/node_modules/jackspeak/dist/commonjs/index.js +0 -683
- package/generators/node_modules/jackspeak/dist/commonjs/parse-args.js +0 -65
- package/generators/node_modules/jackspeak/dist/esm/index.js +0 -640
- package/generators/node_modules/jackspeak/dist/esm/parse-args.js +0 -127
- package/generators/node_modules/lru-cache/dist/commonjs/index.js +0 -889
- package/generators/node_modules/lru-cache/dist/esm/index.js +0 -881
- package/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +0 -14
- package/generators/node_modules/minimatch/dist/cjs/ast.js +0 -389
- package/generators/node_modules/minimatch/dist/cjs/brace-expressions.js +0 -169
- package/generators/node_modules/minimatch/dist/cjs/escape.js +0 -10
- package/generators/node_modules/minimatch/dist/cjs/index.js +0 -680
- package/generators/node_modules/minimatch/dist/cjs/unescape.js +0 -10
- package/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +0 -6
- package/generators/node_modules/minimatch/dist/mjs/ast.js +0 -361
- package/generators/node_modules/minimatch/dist/mjs/brace-expressions.js +0 -161
- package/generators/node_modules/minimatch/dist/mjs/escape.js +0 -2
- package/generators/node_modules/minimatch/dist/mjs/index.js +0 -612
- package/generators/node_modules/minimatch/dist/mjs/unescape.js +0 -2
- package/generators/node_modules/minipass/dist/commonjs/index.js +0 -623
- package/generators/node_modules/minipass/dist/esm/index.js +0 -584
- package/generators/node_modules/path-key/index.js +0 -23
- package/generators/node_modules/path-scurry/dist/cjs/index.js +0 -1161
- package/generators/node_modules/path-scurry/dist/mjs/index.js +0 -1078
- package/generators/node_modules/shebang-command/index.js +0 -28
- package/generators/node_modules/shebang-regex/index.js +0 -16
- package/generators/node_modules/signal-exit/dist/cjs/browser.js +0 -14
- package/generators/node_modules/signal-exit/dist/cjs/index.js +0 -176
- package/generators/node_modules/signal-exit/dist/cjs/signals.js +0 -14
- package/generators/node_modules/signal-exit/dist/mjs/browser.js +0 -4
- package/generators/node_modules/signal-exit/dist/mjs/index.js +0 -146
- package/generators/node_modules/signal-exit/dist/mjs/signals.js +0 -5
- package/generators/node_modules/string-width/index.js +0 -34
- package/generators/node_modules/string-width-cjs/index.js +0 -49
- package/generators/node_modules/string-width-cjs/node_modules/ansi-regex/index.js +0 -19
- package/generators/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/index.js +0 -16
- package/generators/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/text.js +0 -16
- package/generators/node_modules/string-width-cjs/node_modules/emoji-regex/index.js +0 -18
- package/generators/node_modules/string-width-cjs/node_modules/emoji-regex/text.js +0 -18
- package/generators/node_modules/string-width-cjs/node_modules/strip-ansi/index.js +0 -21
- package/generators/node_modules/strip-ansi/index.js +0 -7
- package/generators/node_modules/strip-ansi-cjs/index.js +0 -21
- package/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js +0 -19
- package/generators/node_modules/which/which.js +0 -108
- package/generators/node_modules/wrap-ansi/index.js +0 -134
- package/generators/node_modules/wrap-ansi-cjs/index.js +0 -158
- package/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js +0 -19
- package/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.js +0 -281
- package/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/index.js +0 -16
- package/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/text.js +0 -16
- package/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.js +0 -18
- package/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/text.js +0 -18
- package/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/index.js +0 -49
- package/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js +0 -21
- package/src/generators/node_modules/.package-lock.json +0 -458
- package/src/generators/node_modules/@isaacs/cliui/LICENSE.txt +0 -14
- package/src/generators/node_modules/@isaacs/cliui/README.md +0 -143
- package/src/generators/node_modules/@isaacs/cliui/build/index.cjs +0 -317
- package/src/generators/node_modules/@isaacs/cliui/build/index.d.cts +0 -43
- package/src/generators/node_modules/@isaacs/cliui/build/lib/index.js +0 -302
- package/src/generators/node_modules/@isaacs/cliui/index.mjs +0 -14
- package/src/generators/node_modules/@isaacs/cliui/package.json +0 -86
- package/src/generators/node_modules/@pkgjs/parseargs/.editorconfig +0 -14
- package/src/generators/node_modules/@pkgjs/parseargs/CHANGELOG.md +0 -147
- package/src/generators/node_modules/@pkgjs/parseargs/LICENSE +0 -201
- package/src/generators/node_modules/@pkgjs/parseargs/README.md +0 -413
- package/src/generators/node_modules/@pkgjs/parseargs/examples/is-default-value.js +0 -25
- package/src/generators/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js +0 -35
- package/src/generators/node_modules/@pkgjs/parseargs/examples/negate.js +0 -43
- package/src/generators/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js +0 -31
- package/src/generators/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs +0 -41
- package/src/generators/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js +0 -26
- package/src/generators/node_modules/@pkgjs/parseargs/index.js +0 -396
- package/src/generators/node_modules/@pkgjs/parseargs/internal/errors.js +0 -47
- package/src/generators/node_modules/@pkgjs/parseargs/internal/primordials.js +0 -393
- package/src/generators/node_modules/@pkgjs/parseargs/internal/util.js +0 -14
- package/src/generators/node_modules/@pkgjs/parseargs/internal/validators.js +0 -89
- package/src/generators/node_modules/@pkgjs/parseargs/package.json +0 -36
- package/src/generators/node_modules/@pkgjs/parseargs/utils.js +0 -198
- package/src/generators/node_modules/ansi-regex/index.d.ts +0 -33
- package/src/generators/node_modules/ansi-regex/index.js +0 -8
- package/src/generators/node_modules/ansi-regex/license +0 -9
- package/src/generators/node_modules/ansi-regex/package.json +0 -58
- package/src/generators/node_modules/ansi-regex/readme.md +0 -72
- package/src/generators/node_modules/ansi-styles/index.d.ts +0 -236
- package/src/generators/node_modules/ansi-styles/index.js +0 -223
- package/src/generators/node_modules/ansi-styles/license +0 -9
- package/src/generators/node_modules/ansi-styles/package.json +0 -54
- package/src/generators/node_modules/ansi-styles/readme.md +0 -173
- package/src/generators/node_modules/balanced-match/.github/FUNDING.yml +0 -2
- package/src/generators/node_modules/balanced-match/LICENSE.md +0 -21
- package/src/generators/node_modules/balanced-match/README.md +0 -97
- package/src/generators/node_modules/balanced-match/index.js +0 -62
- package/src/generators/node_modules/balanced-match/package.json +0 -48
- package/src/generators/node_modules/brace-expansion/.github/FUNDING.yml +0 -2
- package/src/generators/node_modules/brace-expansion/LICENSE +0 -21
- package/src/generators/node_modules/brace-expansion/README.md +0 -135
- package/src/generators/node_modules/brace-expansion/index.js +0 -203
- package/src/generators/node_modules/brace-expansion/package.json +0 -46
- package/src/generators/node_modules/change-case/README.md +0 -78
- package/src/generators/node_modules/change-case/dist/index.d.ts +0 -78
- package/src/generators/node_modules/change-case/dist/index.js +0 -206
- package/src/generators/node_modules/change-case/dist/index.js.map +0 -1
- package/src/generators/node_modules/change-case/dist/keys.d.ts +0 -11
- package/src/generators/node_modules/change-case/dist/keys.js +0 -31
- package/src/generators/node_modules/change-case/dist/keys.js.map +0 -1
- package/src/generators/node_modules/change-case/package.json +0 -56
- package/src/generators/node_modules/color-convert/CHANGELOG.md +0 -54
- package/src/generators/node_modules/color-convert/LICENSE +0 -21
- package/src/generators/node_modules/color-convert/README.md +0 -68
- package/src/generators/node_modules/color-convert/conversions.js +0 -839
- package/src/generators/node_modules/color-convert/index.js +0 -81
- package/src/generators/node_modules/color-convert/package.json +0 -48
- package/src/generators/node_modules/color-convert/route.js +0 -97
- package/src/generators/node_modules/color-name/LICENSE +0 -8
- package/src/generators/node_modules/color-name/README.md +0 -11
- package/src/generators/node_modules/color-name/index.js +0 -152
- package/src/generators/node_modules/color-name/package.json +0 -28
- package/src/generators/node_modules/cross-spawn/CHANGELOG.md +0 -130
- package/src/generators/node_modules/cross-spawn/LICENSE +0 -21
- package/src/generators/node_modules/cross-spawn/README.md +0 -96
- package/src/generators/node_modules/cross-spawn/index.js +0 -39
- package/src/generators/node_modules/cross-spawn/lib/enoent.js +0 -59
- package/src/generators/node_modules/cross-spawn/lib/parse.js +0 -91
- package/src/generators/node_modules/cross-spawn/lib/util/escape.js +0 -45
- package/src/generators/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
- package/src/generators/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
- package/src/generators/node_modules/cross-spawn/package.json +0 -73
- package/src/generators/node_modules/eastasianwidth/README.md +0 -32
- package/src/generators/node_modules/eastasianwidth/eastasianwidth.js +0 -311
- package/src/generators/node_modules/eastasianwidth/package.json +0 -18
- package/src/generators/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
- package/src/generators/node_modules/emoji-regex/README.md +0 -137
- package/src/generators/node_modules/emoji-regex/RGI_Emoji.d.ts +0 -5
- package/src/generators/node_modules/emoji-regex/RGI_Emoji.js +0 -6
- package/src/generators/node_modules/emoji-regex/es2015/RGI_Emoji.d.ts +0 -5
- package/src/generators/node_modules/emoji-regex/es2015/RGI_Emoji.js +0 -6
- package/src/generators/node_modules/emoji-regex/es2015/index.d.ts +0 -5
- package/src/generators/node_modules/emoji-regex/es2015/index.js +0 -6
- package/src/generators/node_modules/emoji-regex/es2015/text.d.ts +0 -5
- package/src/generators/node_modules/emoji-regex/es2015/text.js +0 -6
- package/src/generators/node_modules/emoji-regex/index.d.ts +0 -5
- package/src/generators/node_modules/emoji-regex/index.js +0 -6
- package/src/generators/node_modules/emoji-regex/package.json +0 -52
- package/src/generators/node_modules/emoji-regex/text.d.ts +0 -5
- package/src/generators/node_modules/emoji-regex/text.js +0 -6
- package/src/generators/node_modules/flat/LICENSE +0 -12
- package/src/generators/node_modules/flat/README.md +0 -234
- package/src/generators/node_modules/flat/cli.js +0 -40
- package/src/generators/node_modules/flat/index.d.ts +0 -17
- package/src/generators/node_modules/flat/index.js +0 -157
- package/src/generators/node_modules/flat/package.json +0 -49
- package/src/generators/node_modules/foreground-child/LICENSE +0 -15
- package/src/generators/node_modules/foreground-child/README.md +0 -90
- package/src/generators/node_modules/foreground-child/dist/cjs/all-signals.d.ts +0 -3
- package/src/generators/node_modules/foreground-child/dist/cjs/all-signals.d.ts.map +0 -1
- package/src/generators/node_modules/foreground-child/dist/cjs/all-signals.js +0 -58
- package/src/generators/node_modules/foreground-child/dist/cjs/all-signals.js.map +0 -1
- package/src/generators/node_modules/foreground-child/dist/cjs/index.d.ts +0 -54
- package/src/generators/node_modules/foreground-child/dist/cjs/index.d.ts.map +0 -1
- package/src/generators/node_modules/foreground-child/dist/cjs/index.js +0 -154
- package/src/generators/node_modules/foreground-child/dist/cjs/index.js.map +0 -1
- package/src/generators/node_modules/foreground-child/dist/cjs/package.json +0 -3
- package/src/generators/node_modules/foreground-child/dist/cjs/watchdog.d.ts +0 -4
- package/src/generators/node_modules/foreground-child/dist/cjs/watchdog.d.ts.map +0 -1
- package/src/generators/node_modules/foreground-child/dist/cjs/watchdog.js +0 -43
- package/src/generators/node_modules/foreground-child/dist/cjs/watchdog.js.map +0 -1
- package/src/generators/node_modules/foreground-child/dist/mjs/all-signals.d.ts +0 -3
- package/src/generators/node_modules/foreground-child/dist/mjs/all-signals.d.ts.map +0 -1
- package/src/generators/node_modules/foreground-child/dist/mjs/all-signals.js +0 -52
- package/src/generators/node_modules/foreground-child/dist/mjs/all-signals.js.map +0 -1
- package/src/generators/node_modules/foreground-child/dist/mjs/index.d.ts +0 -54
- package/src/generators/node_modules/foreground-child/dist/mjs/index.d.ts.map +0 -1
- package/src/generators/node_modules/foreground-child/dist/mjs/index.js +0 -146
- package/src/generators/node_modules/foreground-child/dist/mjs/index.js.map +0 -1
- package/src/generators/node_modules/foreground-child/dist/mjs/package.json +0 -3
- package/src/generators/node_modules/foreground-child/dist/mjs/watchdog.d.ts +0 -4
- package/src/generators/node_modules/foreground-child/dist/mjs/watchdog.d.ts.map +0 -1
- package/src/generators/node_modules/foreground-child/dist/mjs/watchdog.js +0 -39
- package/src/generators/node_modules/foreground-child/dist/mjs/watchdog.js.map +0 -1
- package/src/generators/node_modules/foreground-child/package.json +0 -83
- package/src/generators/node_modules/glob/LICENSE +0 -15
- package/src/generators/node_modules/glob/README.md +0 -1214
- package/src/generators/node_modules/glob/dist/commonjs/glob.d.ts +0 -344
- package/src/generators/node_modules/glob/dist/commonjs/glob.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/glob.js +0 -243
- package/src/generators/node_modules/glob/dist/commonjs/glob.js.map +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/has-magic.d.ts +0 -14
- package/src/generators/node_modules/glob/dist/commonjs/has-magic.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/has-magic.js +0 -27
- package/src/generators/node_modules/glob/dist/commonjs/has-magic.js.map +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/ignore.d.ts +0 -20
- package/src/generators/node_modules/glob/dist/commonjs/ignore.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/ignore.js +0 -108
- package/src/generators/node_modules/glob/dist/commonjs/ignore.js.map +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/index.d.ts +0 -96
- package/src/generators/node_modules/glob/dist/commonjs/index.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/index.js +0 -68
- package/src/generators/node_modules/glob/dist/commonjs/index.js.map +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/package.json +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/pattern.d.ts +0 -77
- package/src/generators/node_modules/glob/dist/commonjs/pattern.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/pattern.js +0 -219
- package/src/generators/node_modules/glob/dist/commonjs/pattern.js.map +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/processor.d.ts +0 -59
- package/src/generators/node_modules/glob/dist/commonjs/processor.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/processor.js +0 -302
- package/src/generators/node_modules/glob/dist/commonjs/processor.js.map +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/walker.d.ts +0 -96
- package/src/generators/node_modules/glob/dist/commonjs/walker.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/commonjs/walker.js +0 -358
- package/src/generators/node_modules/glob/dist/commonjs/walker.js.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/bin.d.mts +0 -3
- package/src/generators/node_modules/glob/dist/esm/bin.d.mts.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/bin.mjs +0 -275
- package/src/generators/node_modules/glob/dist/esm/bin.mjs.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/glob.d.ts +0 -344
- package/src/generators/node_modules/glob/dist/esm/glob.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/glob.js +0 -239
- package/src/generators/node_modules/glob/dist/esm/glob.js.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/has-magic.d.ts +0 -14
- package/src/generators/node_modules/glob/dist/esm/has-magic.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/has-magic.js +0 -23
- package/src/generators/node_modules/glob/dist/esm/has-magic.js.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/ignore.d.ts +0 -20
- package/src/generators/node_modules/glob/dist/esm/ignore.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/ignore.js +0 -104
- package/src/generators/node_modules/glob/dist/esm/ignore.js.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/index.d.ts +0 -96
- package/src/generators/node_modules/glob/dist/esm/index.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/index.js +0 -56
- package/src/generators/node_modules/glob/dist/esm/index.js.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/package.json +0 -1
- package/src/generators/node_modules/glob/dist/esm/pattern.d.ts +0 -77
- package/src/generators/node_modules/glob/dist/esm/pattern.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/pattern.js +0 -215
- package/src/generators/node_modules/glob/dist/esm/pattern.js.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/processor.d.ts +0 -59
- package/src/generators/node_modules/glob/dist/esm/processor.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/processor.js +0 -295
- package/src/generators/node_modules/glob/dist/esm/processor.js.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/walker.d.ts +0 -96
- package/src/generators/node_modules/glob/dist/esm/walker.d.ts.map +0 -1
- package/src/generators/node_modules/glob/dist/esm/walker.js +0 -352
- package/src/generators/node_modules/glob/dist/esm/walker.js.map +0 -1
- package/src/generators/node_modules/glob/package.json +0 -97
- package/src/generators/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- package/src/generators/node_modules/is-fullwidth-code-point/index.js +0 -50
- package/src/generators/node_modules/is-fullwidth-code-point/license +0 -9
- package/src/generators/node_modules/is-fullwidth-code-point/package.json +0 -42
- package/src/generators/node_modules/is-fullwidth-code-point/readme.md +0 -39
- package/src/generators/node_modules/isexe/LICENSE +0 -15
- package/src/generators/node_modules/isexe/README.md +0 -51
- package/src/generators/node_modules/isexe/index.js +0 -57
- package/src/generators/node_modules/isexe/mode.js +0 -41
- package/src/generators/node_modules/isexe/package.json +0 -31
- package/src/generators/node_modules/isexe/test/basic.js +0 -221
- package/src/generators/node_modules/isexe/windows.js +0 -42
- package/src/generators/node_modules/jackspeak/LICENSE.md +0 -55
- package/src/generators/node_modules/jackspeak/README.md +0 -348
- package/src/generators/node_modules/jackspeak/dist/commonjs/index.d.ts +0 -292
- package/src/generators/node_modules/jackspeak/dist/commonjs/index.d.ts.map +0 -1
- package/src/generators/node_modules/jackspeak/dist/commonjs/index.js +0 -850
- package/src/generators/node_modules/jackspeak/dist/commonjs/index.js.map +0 -1
- package/src/generators/node_modules/jackspeak/dist/commonjs/package.json +0 -1
- package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args-cjs.cjs.map +0 -1
- package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args-cjs.d.cts.map +0 -1
- package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args.d.ts +0 -4
- package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args.d.ts.map +0 -1
- package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args.js +0 -50
- package/src/generators/node_modules/jackspeak/dist/commonjs/parse-args.js.map +0 -1
- package/src/generators/node_modules/jackspeak/dist/esm/index.d.ts +0 -292
- package/src/generators/node_modules/jackspeak/dist/esm/index.d.ts.map +0 -1
- package/src/generators/node_modules/jackspeak/dist/esm/index.js +0 -840
- package/src/generators/node_modules/jackspeak/dist/esm/index.js.map +0 -1
- package/src/generators/node_modules/jackspeak/dist/esm/package.json +0 -1
- package/src/generators/node_modules/jackspeak/dist/esm/parse-args.d.ts +0 -4
- package/src/generators/node_modules/jackspeak/dist/esm/parse-args.d.ts.map +0 -1
- package/src/generators/node_modules/jackspeak/dist/esm/parse-args.js +0 -26
- package/src/generators/node_modules/jackspeak/dist/esm/parse-args.js.map +0 -1
- package/src/generators/node_modules/jackspeak/package.json +0 -94
- package/src/generators/node_modules/lru-cache/LICENSE +0 -15
- package/src/generators/node_modules/lru-cache/README.md +0 -1204
- package/src/generators/node_modules/lru-cache/dist/commonjs/index.d.ts +0 -851
- package/src/generators/node_modules/lru-cache/dist/commonjs/index.d.ts.map +0 -1
- package/src/generators/node_modules/lru-cache/dist/commonjs/index.js +0 -1441
- package/src/generators/node_modules/lru-cache/dist/commonjs/index.js.map +0 -1
- package/src/generators/node_modules/lru-cache/dist/commonjs/package.json +0 -3
- package/src/generators/node_modules/lru-cache/dist/esm/index.d.ts +0 -851
- package/src/generators/node_modules/lru-cache/dist/esm/index.d.ts.map +0 -1
- package/src/generators/node_modules/lru-cache/dist/esm/index.js +0 -1437
- package/src/generators/node_modules/lru-cache/dist/esm/index.js.map +0 -1
- package/src/generators/node_modules/lru-cache/dist/esm/package.json +0 -3
- package/src/generators/node_modules/lru-cache/package.json +0 -118
- package/src/generators/node_modules/minimatch/LICENSE +0 -15
- package/src/generators/node_modules/minimatch/README.md +0 -454
- package/src/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +0 -2
- package/src/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +0 -1
- package/src/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +0 -14
- package/src/generators/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +0 -1
- package/src/generators/node_modules/minimatch/dist/cjs/ast.d.ts +0 -19
- package/src/generators/node_modules/minimatch/dist/cjs/ast.d.ts.map +0 -1
- package/src/generators/node_modules/minimatch/dist/cjs/ast.js +0 -589
- package/src/generators/node_modules/minimatch/dist/cjs/ast.js.map +0 -1
- package/src/generators/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +0 -8
- package/src/generators/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +0 -1
- package/src/generators/node_modules/minimatch/dist/cjs/brace-expressions.js +0 -152
- package/src/generators/node_modules/minimatch/dist/cjs/brace-expressions.js.map +0 -1
- package/src/generators/node_modules/minimatch/dist/cjs/escape.d.ts +0 -12
- package/src/generators/node_modules/minimatch/dist/cjs/escape.d.ts.map +0 -1
- package/src/generators/node_modules/minimatch/dist/cjs/escape.js +0 -22
- package/src/generators/node_modules/minimatch/dist/cjs/escape.js.map +0 -1
- package/src/generators/node_modules/minimatch/dist/cjs/index.d.ts +0 -94
- package/src/generators/node_modules/minimatch/dist/cjs/index.d.ts.map +0 -1
- package/src/generators/node_modules/minimatch/dist/cjs/index.js +0 -1011
- package/src/generators/node_modules/minimatch/dist/cjs/index.js.map +0 -1
- package/src/generators/node_modules/minimatch/dist/cjs/package.json +0 -3
- package/src/generators/node_modules/minimatch/dist/cjs/unescape.d.ts +0 -17
- package/src/generators/node_modules/minimatch/dist/cjs/unescape.d.ts.map +0 -1
- package/src/generators/node_modules/minimatch/dist/cjs/unescape.js +0 -24
- package/src/generators/node_modules/minimatch/dist/cjs/unescape.js.map +0 -1
- package/src/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +0 -2
- package/src/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +0 -1
- package/src/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +0 -10
- package/src/generators/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +0 -1
- package/src/generators/node_modules/minimatch/dist/mjs/ast.d.ts +0 -19
- package/src/generators/node_modules/minimatch/dist/mjs/ast.d.ts.map +0 -1
- package/src/generators/node_modules/minimatch/dist/mjs/ast.js +0 -585
- package/src/generators/node_modules/minimatch/dist/mjs/ast.js.map +0 -1
- package/src/generators/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +0 -8
- package/src/generators/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +0 -1
- package/src/generators/node_modules/minimatch/dist/mjs/brace-expressions.js +0 -148
- package/src/generators/node_modules/minimatch/dist/mjs/brace-expressions.js.map +0 -1
- package/src/generators/node_modules/minimatch/dist/mjs/escape.d.ts +0 -12
- package/src/generators/node_modules/minimatch/dist/mjs/escape.d.ts.map +0 -1
- package/src/generators/node_modules/minimatch/dist/mjs/escape.js +0 -18
- package/src/generators/node_modules/minimatch/dist/mjs/escape.js.map +0 -1
- package/src/generators/node_modules/minimatch/dist/mjs/index.d.ts +0 -94
- package/src/generators/node_modules/minimatch/dist/mjs/index.d.ts.map +0 -1
- package/src/generators/node_modules/minimatch/dist/mjs/index.js +0 -995
- package/src/generators/node_modules/minimatch/dist/mjs/index.js.map +0 -1
- package/src/generators/node_modules/minimatch/dist/mjs/package.json +0 -3
- package/src/generators/node_modules/minimatch/dist/mjs/unescape.d.ts +0 -17
- package/src/generators/node_modules/minimatch/dist/mjs/unescape.d.ts.map +0 -1
- package/src/generators/node_modules/minimatch/dist/mjs/unescape.js +0 -20
- package/src/generators/node_modules/minimatch/dist/mjs/unescape.js.map +0 -1
- package/src/generators/node_modules/minimatch/package.json +0 -86
- package/src/generators/node_modules/minipass/LICENSE +0 -15
- package/src/generators/node_modules/minipass/README.md +0 -825
- package/src/generators/node_modules/minipass/dist/commonjs/index.d.ts +0 -549
- package/src/generators/node_modules/minipass/dist/commonjs/index.d.ts.map +0 -1
- package/src/generators/node_modules/minipass/dist/commonjs/index.js +0 -1028
- package/src/generators/node_modules/minipass/dist/commonjs/index.js.map +0 -1
- package/src/generators/node_modules/minipass/dist/commonjs/package.json +0 -1
- package/src/generators/node_modules/minipass/dist/esm/index.d.ts +0 -549
- package/src/generators/node_modules/minipass/dist/esm/index.d.ts.map +0 -1
- package/src/generators/node_modules/minipass/dist/esm/index.js +0 -1018
- package/src/generators/node_modules/minipass/dist/esm/index.js.map +0 -1
- package/src/generators/node_modules/minipass/dist/esm/package.json +0 -1
- package/src/generators/node_modules/minipass/package.json +0 -82
- package/src/generators/node_modules/path-key/index.d.ts +0 -40
- package/src/generators/node_modules/path-key/index.js +0 -16
- package/src/generators/node_modules/path-key/license +0 -9
- package/src/generators/node_modules/path-key/package.json +0 -39
- package/src/generators/node_modules/path-key/readme.md +0 -61
- package/src/generators/node_modules/path-scurry/LICENSE.md +0 -55
- package/src/generators/node_modules/path-scurry/README.md +0 -631
- package/src/generators/node_modules/path-scurry/dist/cjs/index.d.ts +0 -1107
- package/src/generators/node_modules/path-scurry/dist/cjs/index.d.ts.map +0 -1
- package/src/generators/node_modules/path-scurry/dist/cjs/index.js +0 -2018
- package/src/generators/node_modules/path-scurry/dist/cjs/index.js.map +0 -1
- package/src/generators/node_modules/path-scurry/dist/cjs/package.json +0 -3
- package/src/generators/node_modules/path-scurry/dist/mjs/index.d.ts +0 -1107
- package/src/generators/node_modules/path-scurry/dist/mjs/index.d.ts.map +0 -1
- package/src/generators/node_modules/path-scurry/dist/mjs/index.js +0 -1983
- package/src/generators/node_modules/path-scurry/dist/mjs/index.js.map +0 -1
- package/src/generators/node_modules/path-scurry/dist/mjs/package.json +0 -3
- package/src/generators/node_modules/path-scurry/package.json +0 -87
- package/src/generators/node_modules/shebang-command/index.js +0 -19
- package/src/generators/node_modules/shebang-command/license +0 -9
- package/src/generators/node_modules/shebang-command/package.json +0 -34
- package/src/generators/node_modules/shebang-command/readme.md +0 -34
- package/src/generators/node_modules/shebang-regex/index.d.ts +0 -22
- package/src/generators/node_modules/shebang-regex/index.js +0 -2
- package/src/generators/node_modules/shebang-regex/license +0 -9
- package/src/generators/node_modules/shebang-regex/package.json +0 -35
- package/src/generators/node_modules/shebang-regex/readme.md +0 -33
- package/src/generators/node_modules/signal-exit/LICENSE.txt +0 -16
- package/src/generators/node_modules/signal-exit/README.md +0 -74
- package/src/generators/node_modules/signal-exit/dist/cjs/browser.d.ts +0 -12
- package/src/generators/node_modules/signal-exit/dist/cjs/browser.d.ts.map +0 -1
- package/src/generators/node_modules/signal-exit/dist/cjs/browser.js +0 -10
- package/src/generators/node_modules/signal-exit/dist/cjs/browser.js.map +0 -1
- package/src/generators/node_modules/signal-exit/dist/cjs/index.d.ts +0 -48
- package/src/generators/node_modules/signal-exit/dist/cjs/index.d.ts.map +0 -1
- package/src/generators/node_modules/signal-exit/dist/cjs/index.js +0 -279
- package/src/generators/node_modules/signal-exit/dist/cjs/index.js.map +0 -1
- package/src/generators/node_modules/signal-exit/dist/cjs/package.json +0 -3
- package/src/generators/node_modules/signal-exit/dist/cjs/signals.d.ts +0 -29
- package/src/generators/node_modules/signal-exit/dist/cjs/signals.d.ts.map +0 -1
- package/src/generators/node_modules/signal-exit/dist/cjs/signals.js +0 -42
- package/src/generators/node_modules/signal-exit/dist/cjs/signals.js.map +0 -1
- package/src/generators/node_modules/signal-exit/dist/mjs/browser.d.ts +0 -12
- package/src/generators/node_modules/signal-exit/dist/mjs/browser.d.ts.map +0 -1
- package/src/generators/node_modules/signal-exit/dist/mjs/browser.js +0 -4
- package/src/generators/node_modules/signal-exit/dist/mjs/browser.js.map +0 -1
- package/src/generators/node_modules/signal-exit/dist/mjs/index.d.ts +0 -48
- package/src/generators/node_modules/signal-exit/dist/mjs/index.d.ts.map +0 -1
- package/src/generators/node_modules/signal-exit/dist/mjs/index.js +0 -275
- package/src/generators/node_modules/signal-exit/dist/mjs/index.js.map +0 -1
- package/src/generators/node_modules/signal-exit/dist/mjs/package.json +0 -3
- package/src/generators/node_modules/signal-exit/dist/mjs/signals.d.ts +0 -29
- package/src/generators/node_modules/signal-exit/dist/mjs/signals.d.ts.map +0 -1
- package/src/generators/node_modules/signal-exit/dist/mjs/signals.js +0 -39
- package/src/generators/node_modules/signal-exit/dist/mjs/signals.js.map +0 -1
- package/src/generators/node_modules/signal-exit/package.json +0 -106
- package/src/generators/node_modules/string-width/index.d.ts +0 -29
- package/src/generators/node_modules/string-width/index.js +0 -54
- package/src/generators/node_modules/string-width/license +0 -9
- package/src/generators/node_modules/string-width/package.json +0 -59
- package/src/generators/node_modules/string-width/readme.md +0 -67
- package/src/generators/node_modules/string-width-cjs/index.d.ts +0 -29
- package/src/generators/node_modules/string-width-cjs/index.js +0 -47
- package/src/generators/node_modules/string-width-cjs/license +0 -9
- package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/index.d.ts +0 -37
- package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/index.js +0 -10
- package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/license +0 -9
- package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/package.json +0 -55
- package/src/generators/node_modules/string-width-cjs/node_modules/ansi-regex/readme.md +0 -78
- package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
- package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/README.md +0 -73
- package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/index.js +0 -6
- package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/es2015/text.js +0 -6
- package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/index.d.ts +0 -23
- package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/index.js +0 -6
- package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/package.json +0 -50
- package/src/generators/node_modules/string-width-cjs/node_modules/emoji-regex/text.js +0 -6
- package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/index.d.ts +0 -17
- package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/index.js +0 -4
- package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/license +0 -9
- package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/package.json +0 -54
- package/src/generators/node_modules/string-width-cjs/node_modules/strip-ansi/readme.md +0 -46
- package/src/generators/node_modules/string-width-cjs/package.json +0 -56
- package/src/generators/node_modules/string-width-cjs/readme.md +0 -50
- package/src/generators/node_modules/strip-ansi/index.d.ts +0 -15
- package/src/generators/node_modules/strip-ansi/index.js +0 -14
- package/src/generators/node_modules/strip-ansi/license +0 -9
- package/src/generators/node_modules/strip-ansi/package.json +0 -57
- package/src/generators/node_modules/strip-ansi/readme.md +0 -41
- package/src/generators/node_modules/strip-ansi-cjs/index.d.ts +0 -17
- package/src/generators/node_modules/strip-ansi-cjs/index.js +0 -4
- package/src/generators/node_modules/strip-ansi-cjs/license +0 -9
- package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.d.ts +0 -37
- package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js +0 -10
- package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/license +0 -9
- package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/package.json +0 -55
- package/src/generators/node_modules/strip-ansi-cjs/node_modules/ansi-regex/readme.md +0 -78
- package/src/generators/node_modules/strip-ansi-cjs/package.json +0 -54
- package/src/generators/node_modules/strip-ansi-cjs/readme.md +0 -46
- package/src/generators/node_modules/which/CHANGELOG.md +0 -166
- package/src/generators/node_modules/which/LICENSE +0 -15
- package/src/generators/node_modules/which/README.md +0 -54
- package/src/generators/node_modules/which/bin/node-which +0 -52
- package/src/generators/node_modules/which/package.json +0 -43
- package/src/generators/node_modules/which/which.js +0 -125
- package/src/generators/node_modules/wrap-ansi/index.d.ts +0 -41
- package/src/generators/node_modules/wrap-ansi/index.js +0 -214
- package/src/generators/node_modules/wrap-ansi/license +0 -9
- package/src/generators/node_modules/wrap-ansi/package.json +0 -69
- package/src/generators/node_modules/wrap-ansi/readme.md +0 -91
- package/src/generators/node_modules/wrap-ansi-cjs/index.js +0 -216
- package/src/generators/node_modules/wrap-ansi-cjs/license +0 -9
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.d.ts +0 -37
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js +0 -10
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/license +0 -9
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/package.json +0 -55
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/readme.md +0 -78
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.d.ts +0 -345
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.js +0 -163
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/license +0 -9
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/package.json +0 -56
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/readme.md +0 -152
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/README.md +0 -73
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/index.js +0 -6
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/es2015/text.js +0 -6
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.d.ts +0 -23
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/index.js +0 -6
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/package.json +0 -50
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/emoji-regex/text.js +0 -6
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/index.d.ts +0 -29
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/index.js +0 -47
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/license +0 -9
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/package.json +0 -56
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/string-width/readme.md +0 -50
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.d.ts +0 -17
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js +0 -4
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/license +0 -9
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/package.json +0 -54
- package/src/generators/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/readme.md +0 -46
- package/src/generators/node_modules/wrap-ansi-cjs/package.json +0 -62
- package/src/generators/node_modules/wrap-ansi-cjs/readme.md +0 -91
|
@@ -1,889 +0,0 @@
|
|
|
1
|
-
var __webpack_exports__ = {};
|
|
2
|
-
(()=>{
|
|
3
|
-
var exports = __webpack_exports__;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.LRUCache = void 0;
|
|
8
|
-
const perf = 'object' == typeof performance && performance && 'function' == typeof performance.now ? performance : Date;
|
|
9
|
-
const warned = new Set();
|
|
10
|
-
const PROCESS = 'object' == typeof process && process ? process : {};
|
|
11
|
-
const emitWarning = (msg, type, code, fn)=>{
|
|
12
|
-
'function' == typeof PROCESS.emitWarning ? PROCESS.emitWarning(msg, type, code, fn) : console.error(`[${code}] ${type}: ${msg}`);
|
|
13
|
-
};
|
|
14
|
-
let AC = globalThis.AbortController;
|
|
15
|
-
let AS = globalThis.AbortSignal;
|
|
16
|
-
if (void 0 === AC) {
|
|
17
|
-
AS = class {
|
|
18
|
-
onabort;
|
|
19
|
-
_onabort = [];
|
|
20
|
-
reason;
|
|
21
|
-
aborted = false;
|
|
22
|
-
addEventListener(_, fn) {
|
|
23
|
-
this._onabort.push(fn);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
AC = class {
|
|
27
|
-
constructor(){
|
|
28
|
-
warnACPolyfill();
|
|
29
|
-
}
|
|
30
|
-
signal = new AS();
|
|
31
|
-
abort(reason) {
|
|
32
|
-
if (this.signal.aborted) return;
|
|
33
|
-
this.signal.reason = reason;
|
|
34
|
-
this.signal.aborted = true;
|
|
35
|
-
for (const fn of this.signal._onabort)fn(reason);
|
|
36
|
-
this.signal.onabort?.(reason);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1';
|
|
40
|
-
const warnACPolyfill = ()=>{
|
|
41
|
-
if (!printACPolyfillWarning) return;
|
|
42
|
-
printACPolyfillWarning = false;
|
|
43
|
-
emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill);
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
const shouldWarn = (code)=>!warned.has(code);
|
|
47
|
-
Symbol('type');
|
|
48
|
-
const isPosInt = (n)=>n && n === Math.floor(n) && n > 0 && isFinite(n);
|
|
49
|
-
const getUintArray = (max)=>isPosInt(max) ? max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null : null;
|
|
50
|
-
class ZeroArray extends Array {
|
|
51
|
-
constructor(size){
|
|
52
|
-
super(size);
|
|
53
|
-
this.fill(0);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
class Stack {
|
|
57
|
-
heap;
|
|
58
|
-
length;
|
|
59
|
-
static #constructing = false;
|
|
60
|
-
static create(max) {
|
|
61
|
-
const HeapCls = getUintArray(max);
|
|
62
|
-
if (!HeapCls) return [];
|
|
63
|
-
Stack.#constructing = true;
|
|
64
|
-
const s = new Stack(max, HeapCls);
|
|
65
|
-
Stack.#constructing = false;
|
|
66
|
-
return s;
|
|
67
|
-
}
|
|
68
|
-
constructor(max, HeapCls){
|
|
69
|
-
if (!Stack.#constructing) throw new TypeError('instantiate Stack using Stack.create(n)');
|
|
70
|
-
this.heap = new HeapCls(max);
|
|
71
|
-
this.length = 0;
|
|
72
|
-
}
|
|
73
|
-
push(n) {
|
|
74
|
-
this.heap[this.length++] = n;
|
|
75
|
-
}
|
|
76
|
-
pop() {
|
|
77
|
-
return this.heap[--this.length];
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
class LRUCache {
|
|
81
|
-
#max;
|
|
82
|
-
#maxSize;
|
|
83
|
-
#dispose;
|
|
84
|
-
#disposeAfter;
|
|
85
|
-
#fetchMethod;
|
|
86
|
-
ttl;
|
|
87
|
-
ttlResolution;
|
|
88
|
-
ttlAutopurge;
|
|
89
|
-
updateAgeOnGet;
|
|
90
|
-
updateAgeOnHas;
|
|
91
|
-
allowStale;
|
|
92
|
-
noDisposeOnSet;
|
|
93
|
-
noUpdateTTL;
|
|
94
|
-
maxEntrySize;
|
|
95
|
-
sizeCalculation;
|
|
96
|
-
noDeleteOnFetchRejection;
|
|
97
|
-
noDeleteOnStaleGet;
|
|
98
|
-
allowStaleOnFetchAbort;
|
|
99
|
-
allowStaleOnFetchRejection;
|
|
100
|
-
ignoreFetchAbort;
|
|
101
|
-
#size;
|
|
102
|
-
#calculatedSize;
|
|
103
|
-
#keyMap;
|
|
104
|
-
#keyList;
|
|
105
|
-
#valList;
|
|
106
|
-
#next;
|
|
107
|
-
#prev;
|
|
108
|
-
#head;
|
|
109
|
-
#tail;
|
|
110
|
-
#free;
|
|
111
|
-
#disposed;
|
|
112
|
-
#sizes;
|
|
113
|
-
#starts;
|
|
114
|
-
#ttls;
|
|
115
|
-
#hasDispose;
|
|
116
|
-
#hasFetchMethod;
|
|
117
|
-
#hasDisposeAfter;
|
|
118
|
-
static unsafeExposeInternals(c) {
|
|
119
|
-
return {
|
|
120
|
-
starts: c.#starts,
|
|
121
|
-
ttls: c.#ttls,
|
|
122
|
-
sizes: c.#sizes,
|
|
123
|
-
keyMap: c.#keyMap,
|
|
124
|
-
keyList: c.#keyList,
|
|
125
|
-
valList: c.#valList,
|
|
126
|
-
next: c.#next,
|
|
127
|
-
prev: c.#prev,
|
|
128
|
-
get head () {
|
|
129
|
-
return c.#head;
|
|
130
|
-
},
|
|
131
|
-
get tail () {
|
|
132
|
-
return c.#tail;
|
|
133
|
-
},
|
|
134
|
-
free: c.#free,
|
|
135
|
-
isBackgroundFetch: (p)=>c.#isBackgroundFetch(p),
|
|
136
|
-
backgroundFetch: (k, index, options, context)=>c.#backgroundFetch(k, index, options, context),
|
|
137
|
-
moveToTail: (index)=>c.#moveToTail(index),
|
|
138
|
-
indexes: (options)=>c.#indexes(options),
|
|
139
|
-
rindexes: (options)=>c.#rindexes(options),
|
|
140
|
-
isStale: (index)=>c.#isStale(index)
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
get max() {
|
|
144
|
-
return this.#max;
|
|
145
|
-
}
|
|
146
|
-
get maxSize() {
|
|
147
|
-
return this.#maxSize;
|
|
148
|
-
}
|
|
149
|
-
get calculatedSize() {
|
|
150
|
-
return this.#calculatedSize;
|
|
151
|
-
}
|
|
152
|
-
get size() {
|
|
153
|
-
return this.#size;
|
|
154
|
-
}
|
|
155
|
-
get fetchMethod() {
|
|
156
|
-
return this.#fetchMethod;
|
|
157
|
-
}
|
|
158
|
-
get dispose() {
|
|
159
|
-
return this.#dispose;
|
|
160
|
-
}
|
|
161
|
-
get disposeAfter() {
|
|
162
|
-
return this.#disposeAfter;
|
|
163
|
-
}
|
|
164
|
-
constructor(options){
|
|
165
|
-
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;
|
|
166
|
-
if (0 !== max && !isPosInt(max)) throw new TypeError('max option must be a nonnegative integer');
|
|
167
|
-
const UintArray = max ? getUintArray(max) : Array;
|
|
168
|
-
if (!UintArray) throw new Error('invalid max value: ' + max);
|
|
169
|
-
this.#max = max;
|
|
170
|
-
this.#maxSize = maxSize;
|
|
171
|
-
this.maxEntrySize = maxEntrySize || this.#maxSize;
|
|
172
|
-
this.sizeCalculation = sizeCalculation;
|
|
173
|
-
if (this.sizeCalculation) {
|
|
174
|
-
if (!this.#maxSize && !this.maxEntrySize) throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize');
|
|
175
|
-
if ('function' != typeof this.sizeCalculation) throw new TypeError('sizeCalculation set to non-function');
|
|
176
|
-
}
|
|
177
|
-
if (void 0 !== fetchMethod && 'function' != typeof fetchMethod) throw new TypeError('fetchMethod must be a function if specified');
|
|
178
|
-
this.#fetchMethod = fetchMethod;
|
|
179
|
-
this.#hasFetchMethod = !!fetchMethod;
|
|
180
|
-
this.#keyMap = new Map();
|
|
181
|
-
this.#keyList = new Array(max).fill(void 0);
|
|
182
|
-
this.#valList = new Array(max).fill(void 0);
|
|
183
|
-
this.#next = new UintArray(max);
|
|
184
|
-
this.#prev = new UintArray(max);
|
|
185
|
-
this.#head = 0;
|
|
186
|
-
this.#tail = 0;
|
|
187
|
-
this.#free = Stack.create(max);
|
|
188
|
-
this.#size = 0;
|
|
189
|
-
this.#calculatedSize = 0;
|
|
190
|
-
if ('function' == typeof dispose) this.#dispose = dispose;
|
|
191
|
-
if ('function' == typeof disposeAfter) {
|
|
192
|
-
this.#disposeAfter = disposeAfter;
|
|
193
|
-
this.#disposed = [];
|
|
194
|
-
} else {
|
|
195
|
-
this.#disposeAfter = void 0;
|
|
196
|
-
this.#disposed = void 0;
|
|
197
|
-
}
|
|
198
|
-
this.#hasDispose = !!this.#dispose;
|
|
199
|
-
this.#hasDisposeAfter = !!this.#disposeAfter;
|
|
200
|
-
this.noDisposeOnSet = !!noDisposeOnSet;
|
|
201
|
-
this.noUpdateTTL = !!noUpdateTTL;
|
|
202
|
-
this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
|
|
203
|
-
this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
|
|
204
|
-
this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
|
|
205
|
-
this.ignoreFetchAbort = !!ignoreFetchAbort;
|
|
206
|
-
if (0 !== this.maxEntrySize) {
|
|
207
|
-
if (0 !== this.#maxSize) {
|
|
208
|
-
if (!isPosInt(this.#maxSize)) throw new TypeError('maxSize must be a positive integer if specified');
|
|
209
|
-
}
|
|
210
|
-
if (!isPosInt(this.maxEntrySize)) throw new TypeError('maxEntrySize must be a positive integer if specified');
|
|
211
|
-
this.#initializeSizeTracking();
|
|
212
|
-
}
|
|
213
|
-
this.allowStale = !!allowStale;
|
|
214
|
-
this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
|
|
215
|
-
this.updateAgeOnGet = !!updateAgeOnGet;
|
|
216
|
-
this.updateAgeOnHas = !!updateAgeOnHas;
|
|
217
|
-
this.ttlResolution = isPosInt(ttlResolution) || 0 === ttlResolution ? ttlResolution : 1;
|
|
218
|
-
this.ttlAutopurge = !!ttlAutopurge;
|
|
219
|
-
this.ttl = ttl || 0;
|
|
220
|
-
if (this.ttl) {
|
|
221
|
-
if (!isPosInt(this.ttl)) throw new TypeError('ttl must be a positive integer if specified');
|
|
222
|
-
this.#initializeTTLTracking();
|
|
223
|
-
}
|
|
224
|
-
if (0 === this.#max && 0 === this.ttl && 0 === this.#maxSize) throw new TypeError('At least one of max, maxSize, or ttl is required');
|
|
225
|
-
if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
|
|
226
|
-
const code = 'LRU_CACHE_UNBOUNDED';
|
|
227
|
-
if (shouldWarn(code)) {
|
|
228
|
-
warned.add(code);
|
|
229
|
-
const msg = "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";
|
|
230
|
-
emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
getRemainingTTL(key) {
|
|
235
|
-
return this.#keyMap.has(key) ? 1 / 0 : 0;
|
|
236
|
-
}
|
|
237
|
-
#initializeTTLTracking() {
|
|
238
|
-
const ttls = new ZeroArray(this.#max);
|
|
239
|
-
const starts = new ZeroArray(this.#max);
|
|
240
|
-
this.#ttls = ttls;
|
|
241
|
-
this.#starts = starts;
|
|
242
|
-
this.#setItemTTL = (index, ttl, start = perf.now())=>{
|
|
243
|
-
starts[index] = 0 !== ttl ? start : 0;
|
|
244
|
-
ttls[index] = ttl;
|
|
245
|
-
if (0 !== ttl && this.ttlAutopurge) {
|
|
246
|
-
const t = setTimeout(()=>{
|
|
247
|
-
if (this.#isStale(index)) this.delete(this.#keyList[index]);
|
|
248
|
-
}, ttl + 1);
|
|
249
|
-
if (t.unref) t.unref();
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
this.#updateItemAge = (index)=>{
|
|
253
|
-
starts[index] = 0 !== ttls[index] ? perf.now() : 0;
|
|
254
|
-
};
|
|
255
|
-
this.#statusTTL = (status, index)=>{
|
|
256
|
-
if (ttls[index]) {
|
|
257
|
-
const ttl = ttls[index];
|
|
258
|
-
const start = starts[index];
|
|
259
|
-
if (!ttl || !start) return;
|
|
260
|
-
status.ttl = ttl;
|
|
261
|
-
status.start = start;
|
|
262
|
-
status.now = cachedNow || getNow();
|
|
263
|
-
const age = status.now - start;
|
|
264
|
-
status.remainingTTL = ttl - age;
|
|
265
|
-
}
|
|
266
|
-
};
|
|
267
|
-
let cachedNow = 0;
|
|
268
|
-
const getNow = ()=>{
|
|
269
|
-
const n = perf.now();
|
|
270
|
-
if (this.ttlResolution > 0) {
|
|
271
|
-
cachedNow = n;
|
|
272
|
-
const t = setTimeout(()=>cachedNow = 0, this.ttlResolution);
|
|
273
|
-
if (t.unref) t.unref();
|
|
274
|
-
}
|
|
275
|
-
return n;
|
|
276
|
-
};
|
|
277
|
-
this.getRemainingTTL = (key)=>{
|
|
278
|
-
const index = this.#keyMap.get(key);
|
|
279
|
-
if (void 0 === index) return 0;
|
|
280
|
-
const ttl = ttls[index];
|
|
281
|
-
const start = starts[index];
|
|
282
|
-
if (!ttl || !start) return 1 / 0;
|
|
283
|
-
const age = (cachedNow || getNow()) - start;
|
|
284
|
-
return ttl - age;
|
|
285
|
-
};
|
|
286
|
-
this.#isStale = (index)=>{
|
|
287
|
-
const s = starts[index];
|
|
288
|
-
const t = ttls[index];
|
|
289
|
-
return !!t && !!s && (cachedNow || getNow()) - s > t;
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
#updateItemAge = ()=>{};
|
|
293
|
-
#statusTTL = ()=>{};
|
|
294
|
-
#setItemTTL = ()=>{};
|
|
295
|
-
#isStale = ()=>false;
|
|
296
|
-
#initializeSizeTracking() {
|
|
297
|
-
const sizes = new ZeroArray(this.#max);
|
|
298
|
-
this.#calculatedSize = 0;
|
|
299
|
-
this.#sizes = sizes;
|
|
300
|
-
this.#removeItemSize = (index)=>{
|
|
301
|
-
this.#calculatedSize -= sizes[index];
|
|
302
|
-
sizes[index] = 0;
|
|
303
|
-
};
|
|
304
|
-
this.#requireSize = (k, v, size, sizeCalculation)=>{
|
|
305
|
-
if (this.#isBackgroundFetch(v)) return 0;
|
|
306
|
-
if (!isPosInt(size)) if (sizeCalculation) {
|
|
307
|
-
if ('function' != typeof sizeCalculation) throw new TypeError('sizeCalculation must be a function');
|
|
308
|
-
size = sizeCalculation(v, k);
|
|
309
|
-
if (!isPosInt(size)) throw new TypeError('sizeCalculation return invalid (expect positive integer)');
|
|
310
|
-
} else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
311
|
-
return size;
|
|
312
|
-
};
|
|
313
|
-
this.#addItemSize = (index, size, status)=>{
|
|
314
|
-
sizes[index] = size;
|
|
315
|
-
if (this.#maxSize) {
|
|
316
|
-
const maxSize = this.#maxSize - sizes[index];
|
|
317
|
-
while(this.#calculatedSize > maxSize)this.#evict(true);
|
|
318
|
-
}
|
|
319
|
-
this.#calculatedSize += sizes[index];
|
|
320
|
-
if (status) {
|
|
321
|
-
status.entrySize = size;
|
|
322
|
-
status.totalCalculatedSize = this.#calculatedSize;
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
#removeItemSize = (_i)=>{};
|
|
327
|
-
#addItemSize = (_i, _s, _st)=>{};
|
|
328
|
-
#requireSize = (_k, _v, size, sizeCalculation)=>{
|
|
329
|
-
if (size || sizeCalculation) throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache');
|
|
330
|
-
return 0;
|
|
331
|
-
};
|
|
332
|
-
*#indexes({ allowStale = this.allowStale } = {}) {
|
|
333
|
-
if (this.#size) for(let i = this.#tail; true;){
|
|
334
|
-
if (!this.#isValidIndex(i)) break;
|
|
335
|
-
if (allowStale || !this.#isStale(i)) yield i;
|
|
336
|
-
if (i === this.#head) break;
|
|
337
|
-
i = this.#prev[i];
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
*#rindexes({ allowStale = this.allowStale } = {}) {
|
|
341
|
-
if (this.#size) for(let i = this.#head; true;){
|
|
342
|
-
if (!this.#isValidIndex(i)) break;
|
|
343
|
-
if (allowStale || !this.#isStale(i)) yield i;
|
|
344
|
-
if (i === this.#tail) break;
|
|
345
|
-
i = this.#next[i];
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
#isValidIndex(index) {
|
|
349
|
-
return void 0 !== index && this.#keyMap.get(this.#keyList[index]) === index;
|
|
350
|
-
}
|
|
351
|
-
*entries() {
|
|
352
|
-
for (const i of this.#indexes())if (void 0 !== this.#valList[i] && void 0 !== this.#keyList[i] && !this.#isBackgroundFetch(this.#valList[i])) yield [
|
|
353
|
-
this.#keyList[i],
|
|
354
|
-
this.#valList[i]
|
|
355
|
-
];
|
|
356
|
-
}
|
|
357
|
-
*rentries() {
|
|
358
|
-
for (const i of this.#rindexes())if (void 0 !== this.#valList[i] && void 0 !== this.#keyList[i] && !this.#isBackgroundFetch(this.#valList[i])) yield [
|
|
359
|
-
this.#keyList[i],
|
|
360
|
-
this.#valList[i]
|
|
361
|
-
];
|
|
362
|
-
}
|
|
363
|
-
*keys() {
|
|
364
|
-
for (const i of this.#indexes()){
|
|
365
|
-
const k = this.#keyList[i];
|
|
366
|
-
if (void 0 !== k && !this.#isBackgroundFetch(this.#valList[i])) yield k;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
*rkeys() {
|
|
370
|
-
for (const i of this.#rindexes()){
|
|
371
|
-
const k = this.#keyList[i];
|
|
372
|
-
if (void 0 !== k && !this.#isBackgroundFetch(this.#valList[i])) yield k;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
*values() {
|
|
376
|
-
for (const i of this.#indexes()){
|
|
377
|
-
const v = this.#valList[i];
|
|
378
|
-
if (void 0 !== v && !this.#isBackgroundFetch(this.#valList[i])) yield this.#valList[i];
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
*rvalues() {
|
|
382
|
-
for (const i of this.#rindexes()){
|
|
383
|
-
const v = this.#valList[i];
|
|
384
|
-
if (void 0 !== v && !this.#isBackgroundFetch(this.#valList[i])) yield this.#valList[i];
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
[Symbol.iterator]() {
|
|
388
|
-
return this.entries();
|
|
389
|
-
}
|
|
390
|
-
find(fn, getOptions = {}) {
|
|
391
|
-
for (const i of this.#indexes()){
|
|
392
|
-
const v = this.#valList[i];
|
|
393
|
-
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
394
|
-
if (void 0 !== value) {
|
|
395
|
-
if (fn(value, this.#keyList[i], this)) return this.get(this.#keyList[i], getOptions);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
forEach(fn, thisp = this) {
|
|
400
|
-
for (const i of this.#indexes()){
|
|
401
|
-
const v = this.#valList[i];
|
|
402
|
-
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
403
|
-
if (void 0 !== value) fn.call(thisp, value, this.#keyList[i], this);
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
rforEach(fn, thisp = this) {
|
|
407
|
-
for (const i of this.#rindexes()){
|
|
408
|
-
const v = this.#valList[i];
|
|
409
|
-
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
410
|
-
if (void 0 !== value) fn.call(thisp, value, this.#keyList[i], this);
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
purgeStale() {
|
|
414
|
-
let deleted = false;
|
|
415
|
-
for (const i of this.#rindexes({
|
|
416
|
-
allowStale: true
|
|
417
|
-
}))if (this.#isStale(i)) {
|
|
418
|
-
this.delete(this.#keyList[i]);
|
|
419
|
-
deleted = true;
|
|
420
|
-
}
|
|
421
|
-
return deleted;
|
|
422
|
-
}
|
|
423
|
-
info(key) {
|
|
424
|
-
const i = this.#keyMap.get(key);
|
|
425
|
-
if (void 0 === i) return;
|
|
426
|
-
const v = this.#valList[i];
|
|
427
|
-
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
428
|
-
if (void 0 === value) return;
|
|
429
|
-
const entry = {
|
|
430
|
-
value
|
|
431
|
-
};
|
|
432
|
-
if (this.#ttls && this.#starts) {
|
|
433
|
-
const ttl = this.#ttls[i];
|
|
434
|
-
const start = this.#starts[i];
|
|
435
|
-
if (ttl && start) {
|
|
436
|
-
const remain = ttl - (perf.now() - start);
|
|
437
|
-
entry.ttl = remain;
|
|
438
|
-
entry.start = Date.now();
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
if (this.#sizes) entry.size = this.#sizes[i];
|
|
442
|
-
return entry;
|
|
443
|
-
}
|
|
444
|
-
dump() {
|
|
445
|
-
const arr = [];
|
|
446
|
-
for (const i of this.#indexes({
|
|
447
|
-
allowStale: true
|
|
448
|
-
})){
|
|
449
|
-
const key = this.#keyList[i];
|
|
450
|
-
const v = this.#valList[i];
|
|
451
|
-
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
452
|
-
if (void 0 === value || void 0 === key) continue;
|
|
453
|
-
const entry = {
|
|
454
|
-
value
|
|
455
|
-
};
|
|
456
|
-
if (this.#ttls && this.#starts) {
|
|
457
|
-
entry.ttl = this.#ttls[i];
|
|
458
|
-
const age = perf.now() - this.#starts[i];
|
|
459
|
-
entry.start = Math.floor(Date.now() - age);
|
|
460
|
-
}
|
|
461
|
-
if (this.#sizes) entry.size = this.#sizes[i];
|
|
462
|
-
arr.unshift([
|
|
463
|
-
key,
|
|
464
|
-
entry
|
|
465
|
-
]);
|
|
466
|
-
}
|
|
467
|
-
return arr;
|
|
468
|
-
}
|
|
469
|
-
load(arr) {
|
|
470
|
-
this.clear();
|
|
471
|
-
for (const [key, entry] of arr){
|
|
472
|
-
if (entry.start) {
|
|
473
|
-
const age = Date.now() - entry.start;
|
|
474
|
-
entry.start = perf.now() - age;
|
|
475
|
-
}
|
|
476
|
-
this.set(key, entry.value, entry);
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
set(k, v, setOptions = {}) {
|
|
480
|
-
if (void 0 === v) {
|
|
481
|
-
this.delete(k);
|
|
482
|
-
return this;
|
|
483
|
-
}
|
|
484
|
-
const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status } = setOptions;
|
|
485
|
-
let { noUpdateTTL = this.noUpdateTTL } = setOptions;
|
|
486
|
-
const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);
|
|
487
|
-
if (this.maxEntrySize && size > this.maxEntrySize) {
|
|
488
|
-
if (status) {
|
|
489
|
-
status.set = 'miss';
|
|
490
|
-
status.maxEntrySizeExceeded = true;
|
|
491
|
-
}
|
|
492
|
-
this.delete(k);
|
|
493
|
-
return this;
|
|
494
|
-
}
|
|
495
|
-
let index = 0 === this.#size ? void 0 : this.#keyMap.get(k);
|
|
496
|
-
if (void 0 === index) {
|
|
497
|
-
index = 0 === this.#size ? this.#tail : 0 !== this.#free.length ? this.#free.pop() : this.#size === this.#max ? this.#evict(false) : this.#size;
|
|
498
|
-
this.#keyList[index] = k;
|
|
499
|
-
this.#valList[index] = v;
|
|
500
|
-
this.#keyMap.set(k, index);
|
|
501
|
-
this.#next[this.#tail] = index;
|
|
502
|
-
this.#prev[index] = this.#tail;
|
|
503
|
-
this.#tail = index;
|
|
504
|
-
this.#size++;
|
|
505
|
-
this.#addItemSize(index, size, status);
|
|
506
|
-
if (status) status.set = 'add';
|
|
507
|
-
noUpdateTTL = false;
|
|
508
|
-
} else {
|
|
509
|
-
this.#moveToTail(index);
|
|
510
|
-
const oldVal = this.#valList[index];
|
|
511
|
-
if (v !== oldVal) {
|
|
512
|
-
if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
|
|
513
|
-
oldVal.__abortController.abort(new Error('replaced'));
|
|
514
|
-
const { __staleWhileFetching: s } = oldVal;
|
|
515
|
-
if (void 0 !== s && !noDisposeOnSet) {
|
|
516
|
-
if (this.#hasDispose) this.#dispose?.(s, k, 'set');
|
|
517
|
-
if (this.#hasDisposeAfter) this.#disposed?.push([
|
|
518
|
-
s,
|
|
519
|
-
k,
|
|
520
|
-
'set'
|
|
521
|
-
]);
|
|
522
|
-
}
|
|
523
|
-
} else if (!noDisposeOnSet) {
|
|
524
|
-
if (this.#hasDispose) this.#dispose?.(oldVal, k, 'set');
|
|
525
|
-
if (this.#hasDisposeAfter) this.#disposed?.push([
|
|
526
|
-
oldVal,
|
|
527
|
-
k,
|
|
528
|
-
'set'
|
|
529
|
-
]);
|
|
530
|
-
}
|
|
531
|
-
this.#removeItemSize(index);
|
|
532
|
-
this.#addItemSize(index, size, status);
|
|
533
|
-
this.#valList[index] = v;
|
|
534
|
-
if (status) {
|
|
535
|
-
status.set = 'replace';
|
|
536
|
-
const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ? oldVal.__staleWhileFetching : oldVal;
|
|
537
|
-
if (void 0 !== oldValue) status.oldValue = oldValue;
|
|
538
|
-
}
|
|
539
|
-
} else if (status) status.set = 'update';
|
|
540
|
-
}
|
|
541
|
-
if (0 !== ttl && !this.#ttls) this.#initializeTTLTracking();
|
|
542
|
-
if (this.#ttls) {
|
|
543
|
-
if (!noUpdateTTL) this.#setItemTTL(index, ttl, start);
|
|
544
|
-
if (status) this.#statusTTL(status, index);
|
|
545
|
-
}
|
|
546
|
-
if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
|
|
547
|
-
const dt = this.#disposed;
|
|
548
|
-
let task;
|
|
549
|
-
while(task = dt?.shift())this.#disposeAfter?.(...task);
|
|
550
|
-
}
|
|
551
|
-
return this;
|
|
552
|
-
}
|
|
553
|
-
pop() {
|
|
554
|
-
try {
|
|
555
|
-
while(this.#size){
|
|
556
|
-
const val = this.#valList[this.#head];
|
|
557
|
-
this.#evict(true);
|
|
558
|
-
if (this.#isBackgroundFetch(val)) {
|
|
559
|
-
if (val.__staleWhileFetching) return val.__staleWhileFetching;
|
|
560
|
-
} else if (void 0 !== val) return val;
|
|
561
|
-
}
|
|
562
|
-
} finally{
|
|
563
|
-
if (this.#hasDisposeAfter && this.#disposed) {
|
|
564
|
-
const dt = this.#disposed;
|
|
565
|
-
let task;
|
|
566
|
-
while(task = dt?.shift())this.#disposeAfter?.(...task);
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
#evict(free) {
|
|
571
|
-
const head = this.#head;
|
|
572
|
-
const k = this.#keyList[head];
|
|
573
|
-
const v = this.#valList[head];
|
|
574
|
-
if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) v.__abortController.abort(new Error('evicted'));
|
|
575
|
-
else if (this.#hasDispose || this.#hasDisposeAfter) {
|
|
576
|
-
if (this.#hasDispose) this.#dispose?.(v, k, 'evict');
|
|
577
|
-
if (this.#hasDisposeAfter) this.#disposed?.push([
|
|
578
|
-
v,
|
|
579
|
-
k,
|
|
580
|
-
'evict'
|
|
581
|
-
]);
|
|
582
|
-
}
|
|
583
|
-
this.#removeItemSize(head);
|
|
584
|
-
if (free) {
|
|
585
|
-
this.#keyList[head] = void 0;
|
|
586
|
-
this.#valList[head] = void 0;
|
|
587
|
-
this.#free.push(head);
|
|
588
|
-
}
|
|
589
|
-
if (1 === this.#size) {
|
|
590
|
-
this.#head = this.#tail = 0;
|
|
591
|
-
this.#free.length = 0;
|
|
592
|
-
} else this.#head = this.#next[head];
|
|
593
|
-
this.#keyMap.delete(k);
|
|
594
|
-
this.#size--;
|
|
595
|
-
return head;
|
|
596
|
-
}
|
|
597
|
-
has(k, hasOptions = {}) {
|
|
598
|
-
const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
|
|
599
|
-
const index = this.#keyMap.get(k);
|
|
600
|
-
if (void 0 !== index) {
|
|
601
|
-
const v = this.#valList[index];
|
|
602
|
-
if (this.#isBackgroundFetch(v) && void 0 === v.__staleWhileFetching) return false;
|
|
603
|
-
if (this.#isStale(index)) {
|
|
604
|
-
if (status) {
|
|
605
|
-
status.has = 'stale';
|
|
606
|
-
this.#statusTTL(status, index);
|
|
607
|
-
}
|
|
608
|
-
} else {
|
|
609
|
-
if (updateAgeOnHas) this.#updateItemAge(index);
|
|
610
|
-
if (status) {
|
|
611
|
-
status.has = 'hit';
|
|
612
|
-
this.#statusTTL(status, index);
|
|
613
|
-
}
|
|
614
|
-
return true;
|
|
615
|
-
}
|
|
616
|
-
} else if (status) status.has = 'miss';
|
|
617
|
-
return false;
|
|
618
|
-
}
|
|
619
|
-
peek(k, peekOptions = {}) {
|
|
620
|
-
const { allowStale = this.allowStale } = peekOptions;
|
|
621
|
-
const index = this.#keyMap.get(k);
|
|
622
|
-
if (void 0 === index || !allowStale && this.#isStale(index)) return;
|
|
623
|
-
const v = this.#valList[index];
|
|
624
|
-
return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
625
|
-
}
|
|
626
|
-
#backgroundFetch(k, index, options, context) {
|
|
627
|
-
const v = void 0 === index ? void 0 : this.#valList[index];
|
|
628
|
-
if (this.#isBackgroundFetch(v)) return v;
|
|
629
|
-
const ac = new AC();
|
|
630
|
-
const { signal } = options;
|
|
631
|
-
signal?.addEventListener('abort', ()=>ac.abort(signal.reason), {
|
|
632
|
-
signal: ac.signal
|
|
633
|
-
});
|
|
634
|
-
const fetchOpts = {
|
|
635
|
-
signal: ac.signal,
|
|
636
|
-
options,
|
|
637
|
-
context
|
|
638
|
-
};
|
|
639
|
-
const cb = (v, updateCache = false)=>{
|
|
640
|
-
const { aborted } = ac.signal;
|
|
641
|
-
const ignoreAbort = options.ignoreFetchAbort && void 0 !== v;
|
|
642
|
-
if (options.status) if (aborted && !updateCache) {
|
|
643
|
-
options.status.fetchAborted = true;
|
|
644
|
-
options.status.fetchError = ac.signal.reason;
|
|
645
|
-
if (ignoreAbort) options.status.fetchAbortIgnored = true;
|
|
646
|
-
} else options.status.fetchResolved = true;
|
|
647
|
-
if (aborted && !ignoreAbort && !updateCache) return fetchFail(ac.signal.reason);
|
|
648
|
-
const bf = p;
|
|
649
|
-
if (this.#valList[index] === p) if (void 0 === v) if (bf.__staleWhileFetching) this.#valList[index] = bf.__staleWhileFetching;
|
|
650
|
-
else this.delete(k);
|
|
651
|
-
else {
|
|
652
|
-
if (options.status) options.status.fetchUpdated = true;
|
|
653
|
-
this.set(k, v, fetchOpts.options);
|
|
654
|
-
}
|
|
655
|
-
return v;
|
|
656
|
-
};
|
|
657
|
-
const eb = (er)=>{
|
|
658
|
-
if (options.status) {
|
|
659
|
-
options.status.fetchRejected = true;
|
|
660
|
-
options.status.fetchError = er;
|
|
661
|
-
}
|
|
662
|
-
return fetchFail(er);
|
|
663
|
-
};
|
|
664
|
-
const fetchFail = (er)=>{
|
|
665
|
-
const { aborted } = ac.signal;
|
|
666
|
-
const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
|
|
667
|
-
const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
|
|
668
|
-
const noDelete = allowStale || options.noDeleteOnFetchRejection;
|
|
669
|
-
const bf = p;
|
|
670
|
-
if (this.#valList[index] === p) {
|
|
671
|
-
const del = !noDelete || void 0 === bf.__staleWhileFetching;
|
|
672
|
-
if (del) this.delete(k);
|
|
673
|
-
else if (!allowStaleAborted) this.#valList[index] = bf.__staleWhileFetching;
|
|
674
|
-
}
|
|
675
|
-
if (allowStale) {
|
|
676
|
-
if (options.status && void 0 !== bf.__staleWhileFetching) options.status.returnedStale = true;
|
|
677
|
-
return bf.__staleWhileFetching;
|
|
678
|
-
}
|
|
679
|
-
if (bf.__returned === bf) throw er;
|
|
680
|
-
};
|
|
681
|
-
const pcall = (res, rej)=>{
|
|
682
|
-
const fmp = this.#fetchMethod?.(k, v, fetchOpts);
|
|
683
|
-
if (fmp && fmp instanceof Promise) fmp.then((v)=>res(void 0 === v ? void 0 : v), rej);
|
|
684
|
-
ac.signal.addEventListener('abort', ()=>{
|
|
685
|
-
if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
|
|
686
|
-
res(void 0);
|
|
687
|
-
if (options.allowStaleOnFetchAbort) res = (v)=>cb(v, true);
|
|
688
|
-
}
|
|
689
|
-
});
|
|
690
|
-
};
|
|
691
|
-
if (options.status) options.status.fetchDispatched = true;
|
|
692
|
-
const p = new Promise(pcall).then(cb, eb);
|
|
693
|
-
const bf = Object.assign(p, {
|
|
694
|
-
__abortController: ac,
|
|
695
|
-
__staleWhileFetching: v,
|
|
696
|
-
__returned: void 0
|
|
697
|
-
});
|
|
698
|
-
if (void 0 === index) {
|
|
699
|
-
this.set(k, bf, {
|
|
700
|
-
...fetchOpts.options,
|
|
701
|
-
status: void 0
|
|
702
|
-
});
|
|
703
|
-
index = this.#keyMap.get(k);
|
|
704
|
-
} else this.#valList[index] = bf;
|
|
705
|
-
return bf;
|
|
706
|
-
}
|
|
707
|
-
#isBackgroundFetch(p) {
|
|
708
|
-
if (!this.#hasFetchMethod) return false;
|
|
709
|
-
const b = p;
|
|
710
|
-
return !!b && b instanceof Promise && b.hasOwnProperty('__staleWhileFetching') && b.__abortController instanceof AC;
|
|
711
|
-
}
|
|
712
|
-
async fetch(k, fetchOptions = {}) {
|
|
713
|
-
const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal } = fetchOptions;
|
|
714
|
-
if (!this.#hasFetchMethod) {
|
|
715
|
-
if (status) status.fetch = 'get';
|
|
716
|
-
return this.get(k, {
|
|
717
|
-
allowStale,
|
|
718
|
-
updateAgeOnGet,
|
|
719
|
-
noDeleteOnStaleGet,
|
|
720
|
-
status
|
|
721
|
-
});
|
|
722
|
-
}
|
|
723
|
-
const options = {
|
|
724
|
-
allowStale,
|
|
725
|
-
updateAgeOnGet,
|
|
726
|
-
noDeleteOnStaleGet,
|
|
727
|
-
ttl,
|
|
728
|
-
noDisposeOnSet,
|
|
729
|
-
size,
|
|
730
|
-
sizeCalculation,
|
|
731
|
-
noUpdateTTL,
|
|
732
|
-
noDeleteOnFetchRejection,
|
|
733
|
-
allowStaleOnFetchRejection,
|
|
734
|
-
allowStaleOnFetchAbort,
|
|
735
|
-
ignoreFetchAbort,
|
|
736
|
-
status,
|
|
737
|
-
signal
|
|
738
|
-
};
|
|
739
|
-
let index = this.#keyMap.get(k);
|
|
740
|
-
if (void 0 === index) {
|
|
741
|
-
if (status) status.fetch = 'miss';
|
|
742
|
-
const p = this.#backgroundFetch(k, index, options, context);
|
|
743
|
-
return p.__returned = p;
|
|
744
|
-
}
|
|
745
|
-
{
|
|
746
|
-
const v = this.#valList[index];
|
|
747
|
-
if (this.#isBackgroundFetch(v)) {
|
|
748
|
-
const stale = allowStale && void 0 !== v.__staleWhileFetching;
|
|
749
|
-
if (status) {
|
|
750
|
-
status.fetch = 'inflight';
|
|
751
|
-
if (stale) status.returnedStale = true;
|
|
752
|
-
}
|
|
753
|
-
return stale ? v.__staleWhileFetching : v.__returned = v;
|
|
754
|
-
}
|
|
755
|
-
const isStale = this.#isStale(index);
|
|
756
|
-
if (!forceRefresh && !isStale) {
|
|
757
|
-
if (status) status.fetch = 'hit';
|
|
758
|
-
this.#moveToTail(index);
|
|
759
|
-
if (updateAgeOnGet) this.#updateItemAge(index);
|
|
760
|
-
if (status) this.#statusTTL(status, index);
|
|
761
|
-
return v;
|
|
762
|
-
}
|
|
763
|
-
const p = this.#backgroundFetch(k, index, options, context);
|
|
764
|
-
const hasStale = void 0 !== p.__staleWhileFetching;
|
|
765
|
-
const staleVal = hasStale && allowStale;
|
|
766
|
-
if (status) {
|
|
767
|
-
status.fetch = isStale ? 'stale' : 'refresh';
|
|
768
|
-
if (staleVal && isStale) status.returnedStale = true;
|
|
769
|
-
}
|
|
770
|
-
return staleVal ? p.__staleWhileFetching : p.__returned = p;
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
get(k, getOptions = {}) {
|
|
774
|
-
const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status } = getOptions;
|
|
775
|
-
const index = this.#keyMap.get(k);
|
|
776
|
-
if (void 0 !== index) {
|
|
777
|
-
const value = this.#valList[index];
|
|
778
|
-
const fetching = this.#isBackgroundFetch(value);
|
|
779
|
-
if (status) this.#statusTTL(status, index);
|
|
780
|
-
if (this.#isStale(index)) {
|
|
781
|
-
if (status) status.get = 'stale';
|
|
782
|
-
if (fetching) {
|
|
783
|
-
if (status && allowStale && void 0 !== value.__staleWhileFetching) status.returnedStale = true;
|
|
784
|
-
return allowStale ? value.__staleWhileFetching : void 0;
|
|
785
|
-
}
|
|
786
|
-
if (!noDeleteOnStaleGet) this.delete(k);
|
|
787
|
-
if (status && allowStale) status.returnedStale = true;
|
|
788
|
-
return allowStale ? value : void 0;
|
|
789
|
-
}
|
|
790
|
-
if (status) status.get = 'hit';
|
|
791
|
-
if (fetching) return value.__staleWhileFetching;
|
|
792
|
-
this.#moveToTail(index);
|
|
793
|
-
if (updateAgeOnGet) this.#updateItemAge(index);
|
|
794
|
-
return value;
|
|
795
|
-
}
|
|
796
|
-
if (status) status.get = 'miss';
|
|
797
|
-
}
|
|
798
|
-
#connect(p, n) {
|
|
799
|
-
this.#prev[n] = p;
|
|
800
|
-
this.#next[p] = n;
|
|
801
|
-
}
|
|
802
|
-
#moveToTail(index) {
|
|
803
|
-
if (index !== this.#tail) {
|
|
804
|
-
if (index === this.#head) this.#head = this.#next[index];
|
|
805
|
-
else this.#connect(this.#prev[index], this.#next[index]);
|
|
806
|
-
this.#connect(this.#tail, index);
|
|
807
|
-
this.#tail = index;
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
delete(k) {
|
|
811
|
-
let deleted = false;
|
|
812
|
-
if (0 !== this.#size) {
|
|
813
|
-
const index = this.#keyMap.get(k);
|
|
814
|
-
if (void 0 !== index) {
|
|
815
|
-
deleted = true;
|
|
816
|
-
if (1 === this.#size) this.clear();
|
|
817
|
-
else {
|
|
818
|
-
this.#removeItemSize(index);
|
|
819
|
-
const v = this.#valList[index];
|
|
820
|
-
if (this.#isBackgroundFetch(v)) v.__abortController.abort(new Error('deleted'));
|
|
821
|
-
else if (this.#hasDispose || this.#hasDisposeAfter) {
|
|
822
|
-
if (this.#hasDispose) this.#dispose?.(v, k, 'delete');
|
|
823
|
-
if (this.#hasDisposeAfter) this.#disposed?.push([
|
|
824
|
-
v,
|
|
825
|
-
k,
|
|
826
|
-
'delete'
|
|
827
|
-
]);
|
|
828
|
-
}
|
|
829
|
-
this.#keyMap.delete(k);
|
|
830
|
-
this.#keyList[index] = void 0;
|
|
831
|
-
this.#valList[index] = void 0;
|
|
832
|
-
if (index === this.#tail) this.#tail = this.#prev[index];
|
|
833
|
-
else if (index === this.#head) this.#head = this.#next[index];
|
|
834
|
-
else {
|
|
835
|
-
const pi = this.#prev[index];
|
|
836
|
-
this.#next[pi] = this.#next[index];
|
|
837
|
-
const ni = this.#next[index];
|
|
838
|
-
this.#prev[ni] = this.#prev[index];
|
|
839
|
-
}
|
|
840
|
-
this.#size--;
|
|
841
|
-
this.#free.push(index);
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
if (this.#hasDisposeAfter && this.#disposed?.length) {
|
|
846
|
-
const dt = this.#disposed;
|
|
847
|
-
let task;
|
|
848
|
-
while(task = dt?.shift())this.#disposeAfter?.(...task);
|
|
849
|
-
}
|
|
850
|
-
return deleted;
|
|
851
|
-
}
|
|
852
|
-
clear() {
|
|
853
|
-
for (const index of this.#rindexes({
|
|
854
|
-
allowStale: true
|
|
855
|
-
})){
|
|
856
|
-
const v = this.#valList[index];
|
|
857
|
-
if (this.#isBackgroundFetch(v)) v.__abortController.abort(new Error('deleted'));
|
|
858
|
-
else {
|
|
859
|
-
const k = this.#keyList[index];
|
|
860
|
-
if (this.#hasDispose) this.#dispose?.(v, k, 'delete');
|
|
861
|
-
if (this.#hasDisposeAfter) this.#disposed?.push([
|
|
862
|
-
v,
|
|
863
|
-
k,
|
|
864
|
-
'delete'
|
|
865
|
-
]);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
this.#keyMap.clear();
|
|
869
|
-
this.#valList.fill(void 0);
|
|
870
|
-
this.#keyList.fill(void 0);
|
|
871
|
-
if (this.#ttls && this.#starts) {
|
|
872
|
-
this.#ttls.fill(0);
|
|
873
|
-
this.#starts.fill(0);
|
|
874
|
-
}
|
|
875
|
-
if (this.#sizes) this.#sizes.fill(0);
|
|
876
|
-
this.#head = 0;
|
|
877
|
-
this.#tail = 0;
|
|
878
|
-
this.#free.length = 0;
|
|
879
|
-
this.#calculatedSize = 0;
|
|
880
|
-
this.#size = 0;
|
|
881
|
-
if (this.#hasDisposeAfter && this.#disposed) {
|
|
882
|
-
const dt = this.#disposed;
|
|
883
|
-
let task;
|
|
884
|
-
while(task = dt?.shift())this.#disposeAfter?.(...task);
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
exports.LRUCache = LRUCache;
|
|
889
|
-
})();
|