immosquare-cleaner 0.1.42 → 0.1.43
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/immosquare-cleaner/version.rb +1 -1
- data/node_modules/.bin/ncu +1 -1
- data/node_modules/.bin/npm-check-updates +1 -1
- data/node_modules/.bin/rimraf +1 -1
- data/node_modules/@eslint/config-array/dist/cjs/index.cjs +5 -0
- data/node_modules/@eslint/config-array/dist/esm/index.js +5 -0
- data/node_modules/@eslint/config-array/package.json +1 -1
- data/node_modules/@eslint/js/package.json +1 -1
- data/node_modules/ansi-regex/index.d.ts +13 -9
- data/node_modules/ansi-regex/index.js +5 -3
- data/node_modules/ansi-regex/license +1 -1
- data/node_modules/ansi-regex/package.json +6 -9
- data/node_modules/ansi-regex/readme.md +8 -2
- data/node_modules/brace-expansion/README.md +0 -6
- data/node_modules/brace-expansion/index.js +84 -86
- data/node_modules/brace-expansion/package.json +4 -3
- data/node_modules/chalk/license +1 -1
- data/node_modules/chalk/package.json +23 -38
- data/node_modules/chalk/readme.md +85 -69
- data/node_modules/chalk/source/index.js +84 -80
- data/node_modules/eslint/lib/cli.js +0 -20
- data/node_modules/eslint/lib/languages/js/source-code/source-code.js +19 -0
- data/node_modules/eslint/lib/linter/apply-disable-directives.js +24 -12
- data/node_modules/eslint/lib/linter/linter.js +44 -20
- data/node_modules/eslint/lib/linter/report-translator.js +10 -10
- data/node_modules/eslint/lib/linter/rule-fixer.js +38 -15
- data/node_modules/eslint/lib/shared/flags.js +2 -2
- data/node_modules/eslint/package.json +5 -4
- data/node_modules/glob/LICENSE +7 -1
- data/node_modules/glob/README.md +284 -1120
- data/node_modules/glob/common.js +238 -0
- data/node_modules/glob/glob.js +790 -0
- data/node_modules/glob/package.json +34 -76
- data/node_modules/glob/sync.js +486 -0
- data/node_modules/lru-cache/LICENSE +1 -1
- data/node_modules/lru-cache/README.md +104 -1055
- data/node_modules/lru-cache/index.js +246 -1139
- data/node_modules/lru-cache/package.json +11 -75
- data/node_modules/minimatch/LICENSE +1 -1
- data/node_modules/minimatch/README.md +65 -289
- data/node_modules/minimatch/package.json +14 -67
- data/node_modules/npm-check-updates/README.md +9 -12
- data/node_modules/npm-check-updates/build/cli.js +21 -21
- data/node_modules/npm-check-updates/build/cli.js.map +1 -1
- data/node_modules/npm-check-updates/build/index-CWktU8PK.js +58 -0
- data/node_modules/npm-check-updates/build/index-CWktU8PK.js.map +1 -0
- data/node_modules/npm-check-updates/build/index.d.ts +1 -3
- data/node_modules/npm-check-updates/build/index.js +207 -223
- data/node_modules/npm-check-updates/build/index.js.map +1 -1
- data/node_modules/npm-check-updates/package.json +101 -105
- data/node_modules/rimraf/LICENSE +1 -1
- data/node_modules/rimraf/README.md +70 -188
- data/node_modules/rimraf/bin.js +50 -0
- data/node_modules/rimraf/package.json +16 -74
- data/node_modules/rimraf/rimraf.js +364 -0
- data/node_modules/semver/README.md +27 -221
- data/node_modules/semver/bin/semver.js +84 -107
- data/node_modules/semver/package.json +14 -63
- data/node_modules/semver/semver.js +1643 -0
- data/node_modules/strip-ansi/index.d.ts +4 -2
- data/node_modules/strip-ansi/index.js +3 -13
- data/node_modules/strip-ansi/license +1 -1
- data/node_modules/strip-ansi/package.json +7 -10
- data/node_modules/strip-ansi/readme.md +7 -2
- data/node_modules/strip-json-comments/index.d.ts +13 -18
- data/node_modules/strip-json-comments/index.js +38 -68
- data/node_modules/strip-json-comments/package.json +5 -13
- data/node_modules/strip-json-comments/readme.md +18 -15
- data/node_modules/yallist/package.json +1 -1
- data/node_modules/yallist/yallist.js +3 -3
- data/package.json +3 -3
- metadata +14 -736
- data/node_modules/@eslint/config-array/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/@eslint/config-array/node_modules/minimatch/README.md +0 -230
- data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
- data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
- data/node_modules/@eslint/config-array/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
- data/node_modules/@eslint/config-array/node_modules/minimatch/package.json +0 -33
- data/node_modules/chalk/source/index.d.ts +0 -320
- data/node_modules/chalk/source/utilities.js +0 -33
- data/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- data/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- data/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- data/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
- data/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- data/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- data/node_modules/eslint/node_modules/chalk/license +0 -9
- data/node_modules/eslint/node_modules/chalk/package.json +0 -68
- data/node_modules/eslint/node_modules/chalk/readme.md +0 -341
- data/node_modules/eslint/node_modules/chalk/source/index.js +0 -229
- data/node_modules/eslint/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/eslint/node_modules/minimatch/README.md +0 -230
- data/node_modules/eslint/node_modules/minimatch/minimatch.js +0 -947
- data/node_modules/eslint/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/eslint/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
- data/node_modules/eslint/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
- data/node_modules/eslint/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
- data/node_modules/eslint/node_modules/minimatch/package.json +0 -33
- data/node_modules/eslint/node_modules/strip-ansi/index.d.ts +0 -17
- data/node_modules/eslint/node_modules/strip-ansi/index.js +0 -4
- data/node_modules/eslint/node_modules/strip-ansi/license +0 -9
- data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.d.ts +0 -37
- data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.js +0 -10
- data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/license +0 -9
- data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/package.json +0 -55
- data/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +0 -78
- data/node_modules/eslint/node_modules/strip-ansi/package.json +0 -54
- data/node_modules/eslint/node_modules/strip-ansi/readme.md +0 -46
- data/node_modules/glob/dist/commonjs/glob.d.ts +0 -344
- data/node_modules/glob/dist/commonjs/glob.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/glob.js +0 -243
- data/node_modules/glob/dist/commonjs/glob.js.map +0 -1
- data/node_modules/glob/dist/commonjs/has-magic.d.ts +0 -14
- data/node_modules/glob/dist/commonjs/has-magic.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/has-magic.js +0 -27
- data/node_modules/glob/dist/commonjs/has-magic.js.map +0 -1
- data/node_modules/glob/dist/commonjs/ignore.d.ts +0 -20
- data/node_modules/glob/dist/commonjs/ignore.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/ignore.js +0 -108
- data/node_modules/glob/dist/commonjs/ignore.js.map +0 -1
- data/node_modules/glob/dist/commonjs/index.d.ts +0 -96
- data/node_modules/glob/dist/commonjs/index.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/index.js +0 -68
- data/node_modules/glob/dist/commonjs/index.js.map +0 -1
- data/node_modules/glob/dist/commonjs/package.json +0 -1
- data/node_modules/glob/dist/commonjs/pattern.d.ts +0 -77
- data/node_modules/glob/dist/commonjs/pattern.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/pattern.js +0 -219
- data/node_modules/glob/dist/commonjs/pattern.js.map +0 -1
- data/node_modules/glob/dist/commonjs/processor.d.ts +0 -59
- data/node_modules/glob/dist/commonjs/processor.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/processor.js +0 -302
- data/node_modules/glob/dist/commonjs/processor.js.map +0 -1
- data/node_modules/glob/dist/commonjs/walker.d.ts +0 -96
- data/node_modules/glob/dist/commonjs/walker.d.ts.map +0 -1
- data/node_modules/glob/dist/commonjs/walker.js +0 -358
- data/node_modules/glob/dist/commonjs/walker.js.map +0 -1
- data/node_modules/glob/dist/esm/bin.d.mts +0 -3
- data/node_modules/glob/dist/esm/bin.d.mts.map +0 -1
- data/node_modules/glob/dist/esm/bin.mjs +0 -275
- data/node_modules/glob/dist/esm/bin.mjs.map +0 -1
- data/node_modules/glob/dist/esm/glob.d.ts +0 -344
- data/node_modules/glob/dist/esm/glob.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/glob.js +0 -239
- data/node_modules/glob/dist/esm/glob.js.map +0 -1
- data/node_modules/glob/dist/esm/has-magic.d.ts +0 -14
- data/node_modules/glob/dist/esm/has-magic.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/has-magic.js +0 -23
- data/node_modules/glob/dist/esm/has-magic.js.map +0 -1
- data/node_modules/glob/dist/esm/ignore.d.ts +0 -20
- data/node_modules/glob/dist/esm/ignore.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/ignore.js +0 -104
- data/node_modules/glob/dist/esm/ignore.js.map +0 -1
- data/node_modules/glob/dist/esm/index.d.ts +0 -96
- data/node_modules/glob/dist/esm/index.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/index.js +0 -56
- data/node_modules/glob/dist/esm/index.js.map +0 -1
- data/node_modules/glob/dist/esm/package.json +0 -1
- data/node_modules/glob/dist/esm/pattern.d.ts +0 -77
- data/node_modules/glob/dist/esm/pattern.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/pattern.js +0 -215
- data/node_modules/glob/dist/esm/pattern.js.map +0 -1
- data/node_modules/glob/dist/esm/processor.d.ts +0 -59
- data/node_modules/glob/dist/esm/processor.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/processor.js +0 -295
- data/node_modules/glob/dist/esm/processor.js.map +0 -1
- data/node_modules/glob/dist/esm/walker.d.ts +0 -96
- data/node_modules/glob/dist/esm/walker.d.ts.map +0 -1
- data/node_modules/glob/dist/esm/walker.js +0 -352
- data/node_modules/glob/dist/esm/walker.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/glob/node_modules/minimatch/README.md +0 -454
- data/node_modules/glob/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +0 -2
- data/node_modules/glob/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +0 -14
- data/node_modules/glob/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/ast.d.ts +0 -19
- data/node_modules/glob/node_modules/minimatch/dist/cjs/ast.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/ast.js +0 -589
- data/node_modules/glob/node_modules/minimatch/dist/cjs/ast.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +0 -8
- data/node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.js +0 -152
- data/node_modules/glob/node_modules/minimatch/dist/cjs/brace-expressions.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/escape.d.ts +0 -12
- data/node_modules/glob/node_modules/minimatch/dist/cjs/escape.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/escape.js +0 -22
- data/node_modules/glob/node_modules/minimatch/dist/cjs/escape.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/index.d.ts +0 -94
- data/node_modules/glob/node_modules/minimatch/dist/cjs/index.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/index.js +0 -1011
- data/node_modules/glob/node_modules/minimatch/dist/cjs/index.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/package.json +0 -3
- data/node_modules/glob/node_modules/minimatch/dist/cjs/unescape.d.ts +0 -17
- data/node_modules/glob/node_modules/minimatch/dist/cjs/unescape.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/cjs/unescape.js +0 -24
- data/node_modules/glob/node_modules/minimatch/dist/cjs/unescape.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +0 -2
- data/node_modules/glob/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +0 -10
- data/node_modules/glob/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/ast.d.ts +0 -19
- data/node_modules/glob/node_modules/minimatch/dist/mjs/ast.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/ast.js +0 -585
- data/node_modules/glob/node_modules/minimatch/dist/mjs/ast.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +0 -8
- data/node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.js +0 -148
- data/node_modules/glob/node_modules/minimatch/dist/mjs/brace-expressions.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/escape.d.ts +0 -12
- data/node_modules/glob/node_modules/minimatch/dist/mjs/escape.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/escape.js +0 -18
- data/node_modules/glob/node_modules/minimatch/dist/mjs/escape.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/index.d.ts +0 -94
- data/node_modules/glob/node_modules/minimatch/dist/mjs/index.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/index.js +0 -995
- data/node_modules/glob/node_modules/minimatch/dist/mjs/index.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/package.json +0 -3
- data/node_modules/glob/node_modules/minimatch/dist/mjs/unescape.d.ts +0 -17
- data/node_modules/glob/node_modules/minimatch/dist/mjs/unescape.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minimatch/dist/mjs/unescape.js +0 -20
- data/node_modules/glob/node_modules/minimatch/dist/mjs/unescape.js.map +0 -1
- data/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -135
- data/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -203
- data/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -46
- data/node_modules/glob/node_modules/minimatch/package.json +0 -86
- data/node_modules/glob/node_modules/minipass/LICENSE +0 -15
- data/node_modules/glob/node_modules/minipass/README.md +0 -825
- data/node_modules/glob/node_modules/minipass/dist/commonjs/index.d.ts +0 -549
- data/node_modules/glob/node_modules/minipass/dist/commonjs/index.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minipass/dist/commonjs/index.js +0 -1028
- data/node_modules/glob/node_modules/minipass/dist/commonjs/index.js.map +0 -1
- data/node_modules/glob/node_modules/minipass/dist/commonjs/package.json +0 -1
- data/node_modules/glob/node_modules/minipass/dist/esm/index.d.ts +0 -549
- data/node_modules/glob/node_modules/minipass/dist/esm/index.d.ts.map +0 -1
- data/node_modules/glob/node_modules/minipass/dist/esm/index.js +0 -1018
- data/node_modules/glob/node_modules/minipass/dist/esm/index.js.map +0 -1
- data/node_modules/glob/node_modules/minipass/dist/esm/package.json +0 -1
- data/node_modules/glob/node_modules/minipass/package.json +0 -82
- data/node_modules/lru-cache/index.d.ts +0 -869
- data/node_modules/lru-cache/index.mjs +0 -1227
- data/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +0 -2
- data/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +0 -1
- data/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +0 -14
- data/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +0 -1
- data/node_modules/minimatch/dist/cjs/ast.d.ts +0 -19
- data/node_modules/minimatch/dist/cjs/ast.d.ts.map +0 -1
- data/node_modules/minimatch/dist/cjs/ast.js +0 -589
- data/node_modules/minimatch/dist/cjs/ast.js.map +0 -1
- data/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +0 -8
- data/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +0 -1
- data/node_modules/minimatch/dist/cjs/brace-expressions.js +0 -152
- data/node_modules/minimatch/dist/cjs/brace-expressions.js.map +0 -1
- data/node_modules/minimatch/dist/cjs/escape.d.ts +0 -12
- data/node_modules/minimatch/dist/cjs/escape.d.ts.map +0 -1
- data/node_modules/minimatch/dist/cjs/escape.js +0 -22
- data/node_modules/minimatch/dist/cjs/escape.js.map +0 -1
- data/node_modules/minimatch/dist/cjs/index.d.ts +0 -94
- data/node_modules/minimatch/dist/cjs/index.d.ts.map +0 -1
- data/node_modules/minimatch/dist/cjs/index.js +0 -1011
- data/node_modules/minimatch/dist/cjs/index.js.map +0 -1
- data/node_modules/minimatch/dist/cjs/package.json +0 -3
- data/node_modules/minimatch/dist/cjs/unescape.d.ts +0 -17
- data/node_modules/minimatch/dist/cjs/unescape.d.ts.map +0 -1
- data/node_modules/minimatch/dist/cjs/unescape.js +0 -24
- data/node_modules/minimatch/dist/cjs/unescape.js.map +0 -1
- data/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +0 -2
- data/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +0 -1
- data/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +0 -10
- data/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +0 -1
- data/node_modules/minimatch/dist/mjs/ast.d.ts +0 -19
- data/node_modules/minimatch/dist/mjs/ast.d.ts.map +0 -1
- data/node_modules/minimatch/dist/mjs/ast.js +0 -585
- data/node_modules/minimatch/dist/mjs/ast.js.map +0 -1
- data/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +0 -8
- data/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +0 -1
- data/node_modules/minimatch/dist/mjs/brace-expressions.js +0 -148
- data/node_modules/minimatch/dist/mjs/brace-expressions.js.map +0 -1
- data/node_modules/minimatch/dist/mjs/escape.d.ts +0 -12
- data/node_modules/minimatch/dist/mjs/escape.d.ts.map +0 -1
- data/node_modules/minimatch/dist/mjs/escape.js +0 -18
- data/node_modules/minimatch/dist/mjs/escape.js.map +0 -1
- data/node_modules/minimatch/dist/mjs/index.d.ts +0 -94
- data/node_modules/minimatch/dist/mjs/index.d.ts.map +0 -1
- data/node_modules/minimatch/dist/mjs/index.js +0 -995
- data/node_modules/minimatch/dist/mjs/index.js.map +0 -1
- data/node_modules/minimatch/dist/mjs/package.json +0 -3
- data/node_modules/minimatch/dist/mjs/unescape.d.ts +0 -17
- data/node_modules/minimatch/dist/mjs/unescape.d.ts.map +0 -1
- data/node_modules/minimatch/dist/mjs/unescape.js +0 -20
- data/node_modules/minimatch/dist/mjs/unescape.js.map +0 -1
- data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js +0 -66
- data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js.map +0 -1
- data/node_modules/npm-check-updates/build/package.json +0 -183
- data/node_modules/npm-check-updates/build/src/bin/cli.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/bin/cli.js +0 -182
- data/node_modules/npm-check-updates/build/src/bin/cli.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/cli-options.d.ts +0 -9
- data/node_modules/npm-check-updates/build/src/cli-options.js +0 -795
- data/node_modules/npm-check-updates/build/src/cli-options.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/index.d.ts +0 -17
- data/node_modules/npm-check-updates/build/src/index.js +0 -316
- data/node_modules/npm-check-updates/build/src/index.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/cache.d.ts +0 -17
- data/node_modules/npm-check-updates/build/src/lib/cache.js +0 -105
- data/node_modules/npm-check-updates/build/src/lib/cache.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/chalk.d.ts +0 -7
- data/node_modules/npm-check-updates/build/src/lib/chalk.js +0 -66
- data/node_modules/npm-check-updates/build/src/lib/chalk.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/determinePackageManager.d.ts +0 -8
- data/node_modules/npm-check-updates/build/src/lib/determinePackageManager.js +0 -32
- data/node_modules/npm-check-updates/build/src/lib/determinePackageManager.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/doctor.d.ts +0 -8
- data/node_modules/npm-check-updates/build/src/lib/doctor.js +0 -290
- data/node_modules/npm-check-updates/build/src/lib/doctor.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/exists.d.ts +0 -3
- data/node_modules/npm-check-updates/build/src/lib/exists.js +0 -10
- data/node_modules/npm-check-updates/build/src/lib/exists.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/figgy-pudding/index.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/lib/figgy-pudding/index.js +0 -112
- data/node_modules/npm-check-updates/build/src/lib/figgy-pudding/index.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/filterAndReject.d.ts +0 -12
- data/node_modules/npm-check-updates/build/src/lib/filterAndReject.js +0 -80
- data/node_modules/npm-check-updates/build/src/lib/filterAndReject.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/filterObject.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/lib/filterObject.js +0 -10
- data/node_modules/npm-check-updates/build/src/lib/filterObject.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/findLockfile.d.ts +0 -12
- data/node_modules/npm-check-updates/build/src/lib/findLockfile.js +0 -54
- data/node_modules/npm-check-updates/build/src/lib/findLockfile.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/findPackage.d.ts +0 -16
- data/node_modules/npm-check-updates/build/src/lib/findPackage.js +0 -78
- data/node_modules/npm-check-updates/build/src/lib/findPackage.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getAllPackages.d.ts +0 -10
- data/node_modules/npm-check-updates/build/src/lib/getAllPackages.js +0 -126
- data/node_modules/npm-check-updates/build/src/lib/getAllPackages.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getCurrentDependencies.d.ts +0 -15
- data/node_modules/npm-check-updates/build/src/lib/getCurrentDependencies.js +0 -76
- data/node_modules/npm-check-updates/build/src/lib/getCurrentDependencies.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getIgnoredUpgrades.d.ts +0 -8
- data/node_modules/npm-check-updates/build/src/lib/getIgnoredUpgrades.js +0 -37
- data/node_modules/npm-check-updates/build/src/lib/getIgnoredUpgrades.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getInstalledPackages.d.ts +0 -12
- data/node_modules/npm-check-updates/build/src/lib/getInstalledPackages.js +0 -35
- data/node_modules/npm-check-updates/build/src/lib/getInstalledPackages.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getNcuRc.d.ts +0 -22
- data/node_modules/npm-check-updates/build/src/lib/getNcuRc.js +0 -60
- data/node_modules/npm-check-updates/build/src/lib/getNcuRc.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getPackageManager.d.ts +0 -13
- data/node_modules/npm-check-updates/build/src/lib/getPackageManager.js +0 -30
- data/node_modules/npm-check-updates/build/src/lib/getPackageManager.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getPeerDependencies.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/lib/getPeerDependencies.js +0 -31
- data/node_modules/npm-check-updates/build/src/lib/getPeerDependencies.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getPeerDependenciesFromRegistry.d.ts +0 -12
- data/node_modules/npm-check-updates/build/src/lib/getPeerDependenciesFromRegistry.js +0 -35
- data/node_modules/npm-check-updates/build/src/lib/getPeerDependenciesFromRegistry.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getPreferredWildcard.d.ts +0 -10
- data/node_modules/npm-check-updates/build/src/lib/getPreferredWildcard.js +0 -30
- data/node_modules/npm-check-updates/build/src/lib/getPreferredWildcard.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/getRepoUrl.d.ts +0 -11
- data/node_modules/npm-check-updates/build/src/lib/getRepoUrl.js +0 -81
- data/node_modules/npm-check-updates/build/src/lib/getRepoUrl.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/initOptions.d.ts +0 -7
- data/node_modules/npm-check-updates/build/src/lib/initOptions.js +0 -207
- data/node_modules/npm-check-updates/build/src/lib/initOptions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/isUpgradeable.d.ts +0 -14
- data/node_modules/npm-check-updates/build/src/lib/isUpgradeable.js +0 -68
- data/node_modules/npm-check-updates/build/src/lib/isUpgradeable.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/keyValueBy.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/lib/keyValueBy.js +0 -23
- data/node_modules/npm-check-updates/build/src/lib/keyValueBy.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.d.ts +0 -3
- data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js +0 -108
- data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/loadPackageInfoFromFile.d.ts +0 -5
- data/node_modules/npm-check-updates/build/src/lib/loadPackageInfoFromFile.js +0 -27
- data/node_modules/npm-check-updates/build/src/lib/loadPackageInfoFromFile.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/logging.d.ts +0 -77
- data/node_modules/npm-check-updates/build/src/lib/logging.js +0 -287
- data/node_modules/npm-check-updates/build/src/lib/logging.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/mergeOptions.d.ts +0 -69
- data/node_modules/npm-check-updates/build/src/lib/mergeOptions.js +0 -23
- data/node_modules/npm-check-updates/build/src/lib/mergeOptions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/programError.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/lib/programError.js +0 -19
- data/node_modules/npm-check-updates/build/src/lib/programError.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/queryVersions.d.ts +0 -13
- data/node_modules/npm-check-updates/build/src/lib/queryVersions.js +0 -118
- data/node_modules/npm-check-updates/build/src/lib/queryVersions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/resolveDepSections.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/lib/resolveDepSections.js +0 -20
- data/node_modules/npm-check-updates/build/src/lib/resolveDepSections.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/runGlobal.d.ts +0 -5
- data/node_modules/npm-check-updates/build/src/lib/runGlobal.js +0 -76
- data/node_modules/npm-check-updates/build/src/lib/runGlobal.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/runLocal.d.ts +0 -18
- data/node_modules/npm-check-updates/build/src/lib/runLocal.js +0 -239
- data/node_modules/npm-check-updates/build/src/lib/runLocal.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/table.d.ts +0 -7
- data/node_modules/npm-check-updates/build/src/lib/table.js +0 -27
- data/node_modules/npm-check-updates/build/src/lib/table.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/upgradeDependencies.d.ts +0 -14
- data/node_modules/npm-check-updates/build/src/lib/upgradeDependencies.js +0 -103
- data/node_modules/npm-check-updates/build/src/lib/upgradeDependencies.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/upgradePackageData.d.ts +0 -14
- data/node_modules/npm-check-updates/build/src/lib/upgradePackageData.js +0 -50
- data/node_modules/npm-check-updates/build/src/lib/upgradePackageData.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/upgradePackageDefinitions.d.ts +0 -13
- data/node_modules/npm-check-updates/build/src/lib/upgradePackageDefinitions.js +0 -58
- data/node_modules/npm-check-updates/build/src/lib/upgradePackageDefinitions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/version-util.d.ts +0 -180
- data/node_modules/npm-check-updates/build/src/lib/version-util.js +0 -518
- data/node_modules/npm-check-updates/build/src/lib/version-util.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/lib/wrap.d.ts +0 -3
- data/node_modules/npm-check-updates/build/src/lib/wrap.js +0 -45
- data/node_modules/npm-check-updates/build/src/lib/wrap.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/bun.d.ts +0 -18
- data/node_modules/npm-check-updates/build/src/package-managers/bun.js +0 -89
- data/node_modules/npm-check-updates/build/src/package-managers/bun.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/filters.d.ts +0 -35
- data/node_modules/npm-check-updates/build/src/package-managers/filters.js +0 -96
- data/node_modules/npm-check-updates/build/src/package-managers/filters.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/gitTags.d.ts +0 -16
- data/node_modules/npm-check-updates/build/src/package-managers/gitTags.js +0 -112
- data/node_modules/npm-check-updates/build/src/package-managers/gitTags.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/index.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/package-managers/index.js +0 -40
- data/node_modules/npm-check-updates/build/src/package-managers/index.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/npm.d.ts +0 -147
- data/node_modules/npm-check-updates/build/src/package-managers/npm.js +0 -688
- data/node_modules/npm-check-updates/build/src/package-managers/npm.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/pnpm.d.ts +0 -25
- data/node_modules/npm-check-updates/build/src/package-managers/pnpm.js +0 -103
- data/node_modules/npm-check-updates/build/src/package-managers/pnpm.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/staticRegistry.d.ts +0 -10
- data/node_modules/npm-check-updates/build/src/package-managers/staticRegistry.js +0 -52
- data/node_modules/npm-check-updates/build/src/package-managers/staticRegistry.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/package-managers/yarn.d.ts +0 -60
- data/node_modules/npm-check-updates/build/src/package-managers/yarn.js +0 -248
- data/node_modules/npm-check-updates/build/src/package-managers/yarn.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/scripts/build-options.d.ts +0 -1
- data/node_modules/npm-check-updates/build/src/scripts/build-options.js +0 -121
- data/node_modules/npm-check-updates/build/src/scripts/build-options.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/CLIOption.d.ts +0 -16
- data/node_modules/npm-check-updates/build/src/types/CLIOption.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/CLIOption.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/Cacher.d.ts +0 -10
- data/node_modules/npm-check-updates/build/src/types/Cacher.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/Cacher.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/ExtendedHelp.d.ts +0 -5
- data/node_modules/npm-check-updates/build/src/types/ExtendedHelp.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/ExtendedHelp.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/FilterFunction.d.ts +0 -3
- data/node_modules/npm-check-updates/build/src/types/FilterFunction.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/FilterFunction.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/FilterPattern.d.ts +0 -3
- data/node_modules/npm-check-updates/build/src/types/FilterPattern.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/FilterPattern.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/FilterResultsFunction.d.ts +0 -9
- data/node_modules/npm-check-updates/build/src/types/FilterResultsFunction.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/FilterResultsFunction.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/GetVersion.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/types/GetVersion.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/GetVersion.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/GroupFunction.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/types/GroupFunction.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/GroupFunction.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/IgnoredUpgrade.d.ts +0 -8
- data/node_modules/npm-check-updates/build/src/types/IgnoredUpgrade.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/IgnoredUpgrade.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/IndexType.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/types/IndexType.js +0 -4
- data/node_modules/npm-check-updates/build/src/types/IndexType.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/Maybe.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/types/Maybe.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/Maybe.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/MockedVersions.d.ts +0 -5
- data/node_modules/npm-check-updates/build/src/types/MockedVersions.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/MockedVersions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/NpmConfig.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/types/NpmConfig.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/NpmConfig.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/NpmOptions.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/types/NpmOptions.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/NpmOptions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/Options.d.ts +0 -17
- data/node_modules/npm-check-updates/build/src/types/Options.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/Options.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/PackageFile.d.ts +0 -24
- data/node_modules/npm-check-updates/build/src/types/PackageFile.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/PackageFile.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/PackageFileRepository.d.ts +0 -5
- data/node_modules/npm-check-updates/build/src/types/PackageFileRepository.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/PackageFileRepository.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/PackageInfo.d.ts +0 -8
- data/node_modules/npm-check-updates/build/src/types/PackageInfo.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/PackageInfo.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/PackageManager.d.ts +0 -18
- data/node_modules/npm-check-updates/build/src/types/PackageManager.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/PackageManager.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/PackageManagerName.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/types/PackageManagerName.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/PackageManagerName.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/Packument.d.ts +0 -13
- data/node_modules/npm-check-updates/build/src/types/Packument.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/Packument.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/RunOptions.d.ts +0 -137
- data/node_modules/npm-check-updates/build/src/types/RunOptions.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/RunOptions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/SpawnOptions.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/types/SpawnOptions.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/SpawnOptions.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/StaticRegistry.d.ts +0 -4
- data/node_modules/npm-check-updates/build/src/types/StaticRegistry.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/StaticRegistry.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/Target.d.ts +0 -9
- data/node_modules/npm-check-updates/build/src/types/Target.js +0 -6
- data/node_modules/npm-check-updates/build/src/types/Target.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/TargetFunction.d.ts +0 -3
- data/node_modules/npm-check-updates/build/src/types/TargetFunction.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/TargetFunction.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/UpgradeGroup.d.ts +0 -1
- data/node_modules/npm-check-updates/build/src/types/UpgradeGroup.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/UpgradeGroup.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/Version.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/types/Version.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/Version.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/VersionLevel.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/types/VersionLevel.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/VersionLevel.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/VersionResult.d.ts +0 -7
- data/node_modules/npm-check-updates/build/src/types/VersionResult.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/VersionResult.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/VersionSpec.d.ts +0 -2
- data/node_modules/npm-check-updates/build/src/types/VersionSpec.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/VersionSpec.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/chalk/license +0 -9
- data/node_modules/npm-check-updates/node_modules/chalk/package.json +0 -83
- data/node_modules/npm-check-updates/node_modules/chalk/readme.md +0 -325
- data/node_modules/npm-check-updates/node_modules/chalk/source/index.d.ts +0 -320
- data/node_modules/npm-check-updates/node_modules/chalk/source/index.js +0 -225
- data/node_modules/npm-check-updates/node_modules/chalk/source/utilities.js +0 -33
- data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/supports-color/browser.js +0 -30
- data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- data/node_modules/npm-check-updates/node_modules/chalk/source/vendor/supports-color/index.js +0 -182
- data/node_modules/npm-check-updates/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/npm-check-updates/node_modules/minimatch/README.md +0 -454
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +0 -2
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +0 -14
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/ast.d.ts +0 -19
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/ast.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/ast.js +0 -589
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/ast.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +0 -8
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/brace-expressions.js +0 -152
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/brace-expressions.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/escape.d.ts +0 -12
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/escape.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/escape.js +0 -22
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/escape.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/index.d.ts +0 -94
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/index.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/index.js +0 -1011
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/index.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/package.json +0 -3
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/unescape.d.ts +0 -17
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/unescape.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/unescape.js +0 -24
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/cjs/unescape.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +0 -2
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +0 -10
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/ast.d.ts +0 -19
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/ast.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/ast.js +0 -585
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/ast.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +0 -8
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/brace-expressions.js +0 -148
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/brace-expressions.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/escape.d.ts +0 -12
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/escape.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/escape.js +0 -18
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/escape.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/index.d.ts +0 -94
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/index.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/index.js +0 -995
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/index.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/package.json +0 -3
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.d.ts +0 -17
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.d.ts.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.js +0 -20
- data/node_modules/npm-check-updates/node_modules/minimatch/dist/mjs/unescape.js.map +0 -1
- data/node_modules/npm-check-updates/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/npm-check-updates/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -135
- data/node_modules/npm-check-updates/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -203
- data/node_modules/npm-check-updates/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -46
- data/node_modules/npm-check-updates/node_modules/minimatch/package.json +0 -86
- data/node_modules/npm-check-updates/node_modules/strip-ansi/index.d.ts +0 -15
- data/node_modules/npm-check-updates/node_modules/strip-ansi/index.js +0 -14
- data/node_modules/npm-check-updates/node_modules/strip-ansi/license +0 -9
- data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/index.d.ts +0 -33
- data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/index.js +0 -8
- data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/license +0 -9
- data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/package.json +0 -58
- data/node_modules/npm-check-updates/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +0 -72
- data/node_modules/npm-check-updates/node_modules/strip-ansi/package.json +0 -57
- data/node_modules/npm-check-updates/node_modules/strip-ansi/readme.md +0 -41
- data/node_modules/rimraf/dist/commonjs/default-tmp.d.ts +0 -3
- data/node_modules/rimraf/dist/commonjs/default-tmp.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/default-tmp.js +0 -61
- data/node_modules/rimraf/dist/commonjs/default-tmp.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts +0 -3
- data/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/fix-eperm.js +0 -58
- data/node_modules/rimraf/dist/commonjs/fix-eperm.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/fs.d.ts +0 -17
- data/node_modules/rimraf/dist/commonjs/fs.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/fs.js +0 -46
- data/node_modules/rimraf/dist/commonjs/fs.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts +0 -3
- data/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/ignore-enoent.js +0 -21
- data/node_modules/rimraf/dist/commonjs/ignore-enoent.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/index.d.ts +0 -50
- data/node_modules/rimraf/dist/commonjs/index.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/index.js +0 -76
- data/node_modules/rimraf/dist/commonjs/index.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/opt-arg.d.ts +0 -35
- data/node_modules/rimraf/dist/commonjs/opt-arg.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/opt-arg.js +0 -53
- data/node_modules/rimraf/dist/commonjs/opt-arg.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/package.json +0 -1
- data/node_modules/rimraf/dist/commonjs/path-arg.d.ts +0 -4
- data/node_modules/rimraf/dist/commonjs/path-arg.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/path-arg.js +0 -54
- data/node_modules/rimraf/dist/commonjs/path-arg.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/platform.d.ts +0 -3
- data/node_modules/rimraf/dist/commonjs/platform.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/platform.js +0 -4
- data/node_modules/rimraf/dist/commonjs/platform.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts +0 -5
- data/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/readdir-or-error.js +0 -19
- data/node_modules/rimraf/dist/commonjs/readdir-or-error.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/retry-busy.d.ts +0 -8
- data/node_modules/rimraf/dist/commonjs/retry-busy.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/retry-busy.js +0 -68
- data/node_modules/rimraf/dist/commonjs/retry-busy.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts +0 -3
- data/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-manual.js +0 -12
- data/node_modules/rimraf/dist/commonjs/rimraf-manual.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts +0 -4
- data/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js +0 -192
- data/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts +0 -4
- data/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-native.js +0 -24
- data/node_modules/rimraf/dist/commonjs/rimraf-native.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts +0 -4
- data/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-posix.js +0 -123
- data/node_modules/rimraf/dist/commonjs/rimraf-posix.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts +0 -4
- data/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/rimraf-windows.js +0 -182
- data/node_modules/rimraf/dist/commonjs/rimraf-windows.js.map +0 -1
- data/node_modules/rimraf/dist/commonjs/use-native.d.ts +0 -4
- data/node_modules/rimraf/dist/commonjs/use-native.d.ts.map +0 -1
- data/node_modules/rimraf/dist/commonjs/use-native.js +0 -22
- data/node_modules/rimraf/dist/commonjs/use-native.js.map +0 -1
- data/node_modules/rimraf/dist/esm/bin.d.mts +0 -8
- data/node_modules/rimraf/dist/esm/bin.d.mts.map +0 -1
- data/node_modules/rimraf/dist/esm/bin.mjs +0 -256
- data/node_modules/rimraf/dist/esm/bin.mjs.map +0 -1
- data/node_modules/rimraf/dist/esm/default-tmp.d.ts +0 -3
- data/node_modules/rimraf/dist/esm/default-tmp.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/default-tmp.js +0 -55
- data/node_modules/rimraf/dist/esm/default-tmp.js.map +0 -1
- data/node_modules/rimraf/dist/esm/fix-eperm.d.ts +0 -3
- data/node_modules/rimraf/dist/esm/fix-eperm.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/fix-eperm.js +0 -53
- data/node_modules/rimraf/dist/esm/fix-eperm.js.map +0 -1
- data/node_modules/rimraf/dist/esm/fs.d.ts +0 -17
- data/node_modules/rimraf/dist/esm/fs.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/fs.js +0 -31
- data/node_modules/rimraf/dist/esm/fs.js.map +0 -1
- data/node_modules/rimraf/dist/esm/ignore-enoent.d.ts +0 -3
- data/node_modules/rimraf/dist/esm/ignore-enoent.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/ignore-enoent.js +0 -16
- data/node_modules/rimraf/dist/esm/ignore-enoent.js.map +0 -1
- data/node_modules/rimraf/dist/esm/index.d.ts +0 -50
- data/node_modules/rimraf/dist/esm/index.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/index.js +0 -68
- data/node_modules/rimraf/dist/esm/index.js.map +0 -1
- data/node_modules/rimraf/dist/esm/opt-arg.d.ts +0 -35
- data/node_modules/rimraf/dist/esm/opt-arg.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/opt-arg.js +0 -46
- data/node_modules/rimraf/dist/esm/opt-arg.js.map +0 -1
- data/node_modules/rimraf/dist/esm/package.json +0 -1
- data/node_modules/rimraf/dist/esm/path-arg.d.ts +0 -4
- data/node_modules/rimraf/dist/esm/path-arg.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/path-arg.js +0 -49
- data/node_modules/rimraf/dist/esm/path-arg.js.map +0 -1
- data/node_modules/rimraf/dist/esm/platform.d.ts +0 -3
- data/node_modules/rimraf/dist/esm/platform.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/platform.js +0 -2
- data/node_modules/rimraf/dist/esm/platform.js.map +0 -1
- data/node_modules/rimraf/dist/esm/readdir-or-error.d.ts +0 -5
- data/node_modules/rimraf/dist/esm/readdir-or-error.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/readdir-or-error.js +0 -14
- data/node_modules/rimraf/dist/esm/readdir-or-error.js.map +0 -1
- data/node_modules/rimraf/dist/esm/retry-busy.d.ts +0 -8
- data/node_modules/rimraf/dist/esm/retry-busy.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/retry-busy.js +0 -63
- data/node_modules/rimraf/dist/esm/retry-busy.js.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-manual.d.ts +0 -3
- data/node_modules/rimraf/dist/esm/rimraf-manual.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-manual.js +0 -6
- data/node_modules/rimraf/dist/esm/rimraf-manual.js.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts +0 -4
- data/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-move-remove.js +0 -187
- data/node_modules/rimraf/dist/esm/rimraf-move-remove.js.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-native.d.ts +0 -4
- data/node_modules/rimraf/dist/esm/rimraf-native.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-native.js +0 -19
- data/node_modules/rimraf/dist/esm/rimraf-native.js.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-posix.d.ts +0 -4
- data/node_modules/rimraf/dist/esm/rimraf-posix.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-posix.js +0 -118
- data/node_modules/rimraf/dist/esm/rimraf-posix.js.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-windows.d.ts +0 -4
- data/node_modules/rimraf/dist/esm/rimraf-windows.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/rimraf-windows.js +0 -177
- data/node_modules/rimraf/dist/esm/rimraf-windows.js.map +0 -1
- data/node_modules/rimraf/dist/esm/use-native.d.ts +0 -4
- data/node_modules/rimraf/dist/esm/use-native.d.ts.map +0 -1
- data/node_modules/rimraf/dist/esm/use-native.js +0 -16
- data/node_modules/rimraf/dist/esm/use-native.js.map +0 -1
- data/node_modules/semver/classes/comparator.js +0 -141
- data/node_modules/semver/classes/index.js +0 -5
- data/node_modules/semver/classes/range.js +0 -539
- data/node_modules/semver/classes/semver.js +0 -302
- data/node_modules/semver/functions/clean.js +0 -6
- data/node_modules/semver/functions/cmp.js +0 -52
- data/node_modules/semver/functions/coerce.js +0 -52
- data/node_modules/semver/functions/compare-build.js +0 -7
- data/node_modules/semver/functions/compare-loose.js +0 -3
- data/node_modules/semver/functions/compare.js +0 -5
- data/node_modules/semver/functions/diff.js +0 -65
- data/node_modules/semver/functions/eq.js +0 -3
- data/node_modules/semver/functions/gt.js +0 -3
- data/node_modules/semver/functions/gte.js +0 -3
- data/node_modules/semver/functions/inc.js +0 -19
- data/node_modules/semver/functions/lt.js +0 -3
- data/node_modules/semver/functions/lte.js +0 -3
- data/node_modules/semver/functions/major.js +0 -3
- data/node_modules/semver/functions/minor.js +0 -3
- data/node_modules/semver/functions/neq.js +0 -3
- data/node_modules/semver/functions/parse.js +0 -16
- data/node_modules/semver/functions/patch.js +0 -3
- data/node_modules/semver/functions/prerelease.js +0 -6
- data/node_modules/semver/functions/rcompare.js +0 -3
- data/node_modules/semver/functions/rsort.js +0 -3
- data/node_modules/semver/functions/satisfies.js +0 -10
- data/node_modules/semver/functions/sort.js +0 -3
- data/node_modules/semver/functions/valid.js +0 -6
- data/node_modules/semver/index.js +0 -89
- data/node_modules/semver/internal/constants.js +0 -35
- data/node_modules/semver/internal/debug.js +0 -9
- data/node_modules/semver/internal/identifiers.js +0 -23
- data/node_modules/semver/internal/parse-options.js +0 -15
- data/node_modules/semver/internal/re.js +0 -212
- data/node_modules/semver/node_modules/lru-cache/LICENSE +0 -15
- data/node_modules/semver/node_modules/lru-cache/README.md +0 -166
- data/node_modules/semver/node_modules/lru-cache/index.js +0 -334
- data/node_modules/semver/node_modules/lru-cache/package.json +0 -34
- data/node_modules/semver/preload.js +0 -2
- data/node_modules/semver/ranges/gtr.js +0 -4
- data/node_modules/semver/ranges/intersects.js +0 -7
- data/node_modules/semver/ranges/ltr.js +0 -4
- data/node_modules/semver/ranges/max-satisfying.js +0 -25
- data/node_modules/semver/ranges/min-satisfying.js +0 -24
- data/node_modules/semver/ranges/min-version.js +0 -61
- data/node_modules/semver/ranges/outside.js +0 -80
- data/node_modules/semver/ranges/simplify.js +0 -47
- data/node_modules/semver/ranges/subset.js +0 -247
- data/node_modules/semver/ranges/to-comparators.js +0 -8
- data/node_modules/semver/ranges/valid.js +0 -11
- /data/node_modules/{eslint/node_modules/chalk → chalk}/index.d.ts +0 -0
- /data/node_modules/{eslint/node_modules/chalk → chalk}/source/templates.js +0 -0
- /data/node_modules/{eslint/node_modules/chalk → chalk}/source/util.js +0 -0
- /data/node_modules/{@eslint/config-array/node_modules/minimatch → minimatch}/minimatch.js +0 -0
@@ -1,192 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// https://youtu.be/uhRWMGBjlO8?t=537
|
3
|
-
//
|
4
|
-
// 1. readdir
|
5
|
-
// 2. for each entry
|
6
|
-
// a. if a non-empty directory, recurse
|
7
|
-
// b. if an empty directory, move to random hidden file name in $TEMP
|
8
|
-
// c. unlink/rmdir $TEMP
|
9
|
-
//
|
10
|
-
// This works around the fact that unlink/rmdir is non-atomic and takes
|
11
|
-
// a non-deterministic amount of time to complete.
|
12
|
-
//
|
13
|
-
// However, it is HELLA SLOW, like 2-10x slower than a naive recursive rm.
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
exports.rimrafMoveRemoveSync = exports.rimrafMoveRemove = void 0;
|
16
|
-
const path_1 = require("path");
|
17
|
-
const default_tmp_js_1 = require("./default-tmp.js");
|
18
|
-
const ignore_enoent_js_1 = require("./ignore-enoent.js");
|
19
|
-
const fs_js_1 = require("./fs.js");
|
20
|
-
const { lstat, rename, unlink, rmdir, chmod } = fs_js_1.promises;
|
21
|
-
const readdir_or_error_js_1 = require("./readdir-or-error.js");
|
22
|
-
// crypto.randomBytes is much slower, and Math.random() is enough here
|
23
|
-
const uniqueFilename = (path) => `.${(0, path_1.basename)(path)}.${Math.random()}`;
|
24
|
-
const unlinkFixEPERM = async (path) => unlink(path).catch((er) => {
|
25
|
-
if (er.code === 'EPERM') {
|
26
|
-
return chmod(path, 0o666).then(() => unlink(path), er2 => {
|
27
|
-
if (er2.code === 'ENOENT') {
|
28
|
-
return;
|
29
|
-
}
|
30
|
-
throw er;
|
31
|
-
});
|
32
|
-
}
|
33
|
-
else if (er.code === 'ENOENT') {
|
34
|
-
return;
|
35
|
-
}
|
36
|
-
throw er;
|
37
|
-
});
|
38
|
-
const unlinkFixEPERMSync = (path) => {
|
39
|
-
try {
|
40
|
-
(0, fs_js_1.unlinkSync)(path);
|
41
|
-
}
|
42
|
-
catch (er) {
|
43
|
-
if (er?.code === 'EPERM') {
|
44
|
-
try {
|
45
|
-
return (0, fs_js_1.chmodSync)(path, 0o666);
|
46
|
-
}
|
47
|
-
catch (er2) {
|
48
|
-
if (er2?.code === 'ENOENT') {
|
49
|
-
return;
|
50
|
-
}
|
51
|
-
throw er;
|
52
|
-
}
|
53
|
-
}
|
54
|
-
else if (er?.code === 'ENOENT') {
|
55
|
-
return;
|
56
|
-
}
|
57
|
-
throw er;
|
58
|
-
}
|
59
|
-
};
|
60
|
-
const rimrafMoveRemove = async (path, opt) => {
|
61
|
-
if (opt?.signal?.aborted) {
|
62
|
-
throw opt.signal.reason;
|
63
|
-
}
|
64
|
-
try {
|
65
|
-
return await rimrafMoveRemoveDir(path, opt, await lstat(path));
|
66
|
-
}
|
67
|
-
catch (er) {
|
68
|
-
if (er?.code === 'ENOENT')
|
69
|
-
return true;
|
70
|
-
throw er;
|
71
|
-
}
|
72
|
-
};
|
73
|
-
exports.rimrafMoveRemove = rimrafMoveRemove;
|
74
|
-
const rimrafMoveRemoveDir = async (path, opt, ent) => {
|
75
|
-
if (opt?.signal?.aborted) {
|
76
|
-
throw opt.signal.reason;
|
77
|
-
}
|
78
|
-
if (!opt.tmp) {
|
79
|
-
return rimrafMoveRemoveDir(path, { ...opt, tmp: await (0, default_tmp_js_1.defaultTmp)(path) }, ent);
|
80
|
-
}
|
81
|
-
if (path === opt.tmp && (0, path_1.parse)(path).root !== path) {
|
82
|
-
throw new Error('cannot delete temp directory used for deletion');
|
83
|
-
}
|
84
|
-
const entries = ent.isDirectory() ? await (0, readdir_or_error_js_1.readdirOrError)(path) : null;
|
85
|
-
if (!Array.isArray(entries)) {
|
86
|
-
// this can only happen if lstat/readdir lied, or if the dir was
|
87
|
-
// swapped out with a file at just the right moment.
|
88
|
-
/* c8 ignore start */
|
89
|
-
if (entries) {
|
90
|
-
if (entries.code === 'ENOENT') {
|
91
|
-
return true;
|
92
|
-
}
|
93
|
-
if (entries.code !== 'ENOTDIR') {
|
94
|
-
throw entries;
|
95
|
-
}
|
96
|
-
}
|
97
|
-
/* c8 ignore stop */
|
98
|
-
if (opt.filter && !(await opt.filter(path, ent))) {
|
99
|
-
return false;
|
100
|
-
}
|
101
|
-
await (0, ignore_enoent_js_1.ignoreENOENT)(tmpUnlink(path, opt.tmp, unlinkFixEPERM));
|
102
|
-
return true;
|
103
|
-
}
|
104
|
-
const removedAll = (await Promise.all(entries.map(ent => rimrafMoveRemoveDir((0, path_1.resolve)(path, ent.name), opt, ent)))).reduce((a, b) => a && b, true);
|
105
|
-
if (!removedAll) {
|
106
|
-
return false;
|
107
|
-
}
|
108
|
-
// we don't ever ACTUALLY try to unlink /, because that can never work
|
109
|
-
// but when preserveRoot is false, we could be operating on it.
|
110
|
-
// No need to check if preserveRoot is not false.
|
111
|
-
if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) {
|
112
|
-
return false;
|
113
|
-
}
|
114
|
-
if (opt.filter && !(await opt.filter(path, ent))) {
|
115
|
-
return false;
|
116
|
-
}
|
117
|
-
await (0, ignore_enoent_js_1.ignoreENOENT)(tmpUnlink(path, opt.tmp, rmdir));
|
118
|
-
return true;
|
119
|
-
};
|
120
|
-
const tmpUnlink = async (path, tmp, rm) => {
|
121
|
-
const tmpFile = (0, path_1.resolve)(tmp, uniqueFilename(path));
|
122
|
-
await rename(path, tmpFile);
|
123
|
-
return await rm(tmpFile);
|
124
|
-
};
|
125
|
-
const rimrafMoveRemoveSync = (path, opt) => {
|
126
|
-
if (opt?.signal?.aborted) {
|
127
|
-
throw opt.signal.reason;
|
128
|
-
}
|
129
|
-
try {
|
130
|
-
return rimrafMoveRemoveDirSync(path, opt, (0, fs_js_1.lstatSync)(path));
|
131
|
-
}
|
132
|
-
catch (er) {
|
133
|
-
if (er?.code === 'ENOENT')
|
134
|
-
return true;
|
135
|
-
throw er;
|
136
|
-
}
|
137
|
-
};
|
138
|
-
exports.rimrafMoveRemoveSync = rimrafMoveRemoveSync;
|
139
|
-
const rimrafMoveRemoveDirSync = (path, opt, ent) => {
|
140
|
-
if (opt?.signal?.aborted) {
|
141
|
-
throw opt.signal.reason;
|
142
|
-
}
|
143
|
-
if (!opt.tmp) {
|
144
|
-
return rimrafMoveRemoveDirSync(path, { ...opt, tmp: (0, default_tmp_js_1.defaultTmpSync)(path) }, ent);
|
145
|
-
}
|
146
|
-
const tmp = opt.tmp;
|
147
|
-
if (path === opt.tmp && (0, path_1.parse)(path).root !== path) {
|
148
|
-
throw new Error('cannot delete temp directory used for deletion');
|
149
|
-
}
|
150
|
-
const entries = ent.isDirectory() ? (0, readdir_or_error_js_1.readdirOrErrorSync)(path) : null;
|
151
|
-
if (!Array.isArray(entries)) {
|
152
|
-
// this can only happen if lstat/readdir lied, or if the dir was
|
153
|
-
// swapped out with a file at just the right moment.
|
154
|
-
/* c8 ignore start */
|
155
|
-
if (entries) {
|
156
|
-
if (entries.code === 'ENOENT') {
|
157
|
-
return true;
|
158
|
-
}
|
159
|
-
if (entries.code !== 'ENOTDIR') {
|
160
|
-
throw entries;
|
161
|
-
}
|
162
|
-
}
|
163
|
-
/* c8 ignore stop */
|
164
|
-
if (opt.filter && !opt.filter(path, ent)) {
|
165
|
-
return false;
|
166
|
-
}
|
167
|
-
(0, ignore_enoent_js_1.ignoreENOENTSync)(() => tmpUnlinkSync(path, tmp, unlinkFixEPERMSync));
|
168
|
-
return true;
|
169
|
-
}
|
170
|
-
let removedAll = true;
|
171
|
-
for (const ent of entries) {
|
172
|
-
const p = (0, path_1.resolve)(path, ent.name);
|
173
|
-
removedAll = rimrafMoveRemoveDirSync(p, opt, ent) && removedAll;
|
174
|
-
}
|
175
|
-
if (!removedAll) {
|
176
|
-
return false;
|
177
|
-
}
|
178
|
-
if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) {
|
179
|
-
return false;
|
180
|
-
}
|
181
|
-
if (opt.filter && !opt.filter(path, ent)) {
|
182
|
-
return false;
|
183
|
-
}
|
184
|
-
(0, ignore_enoent_js_1.ignoreENOENTSync)(() => tmpUnlinkSync(path, tmp, fs_js_1.rmdirSync));
|
185
|
-
return true;
|
186
|
-
};
|
187
|
-
const tmpUnlinkSync = (path, tmp, rmSync) => {
|
188
|
-
const tmpFile = (0, path_1.resolve)(tmp, uniqueFilename(path));
|
189
|
-
(0, fs_js_1.renameSync)(path, tmpFile);
|
190
|
-
return rmSync(tmpFile);
|
191
|
-
};
|
192
|
-
//# sourceMappingURL=rimraf-move-remove.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"rimraf-move-remove.js","sourceRoot":"","sources":["../../src/rimraf-move-remove.ts"],"names":[],"mappings":";AAAA,qCAAqC;AACrC,EAAE;AACF,aAAa;AACb,oBAAoB;AACpB,yCAAyC;AACzC,uEAAuE;AACvE,0BAA0B;AAC1B,EAAE;AACF,uEAAuE;AACvE,kDAAkD;AAClD,EAAE;AACF,0EAA0E;;;AAE1E,+BAA+C;AAC/C,qDAA6D;AAE7D,yDAAmE;AAEnE,mCAOgB;AAChB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,gBAAU,CAAA;AAI1D,+DAA0E;AAE1E,sEAAsE;AACtE,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,IAAA,eAAQ,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAA;AAE9E,MAAM,cAAc,GAAG,KAAK,EAAE,IAAY,EAAE,EAAE,CAC5C,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAA6B,EAAE,EAAE;IACnD,IAAI,EAAE,CAAC,IAAI,KAAK,OAAO,EAAE;QACvB,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,IAA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,MAAM,OAAO,GAAG,IAAA,cAAO,EAAC,GAAG,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC,CAAA;IAClD,IAAA,kBAAU,EAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACzB,OAAO,MAAM,CAAC,OAAO,CAAC,CAAA;AACxB,CAAC,CAAA","sourcesContent":["// https://youtu.be/uhRWMGBjlO8?t=537\n//\n// 1. readdir\n// 2. for each entry\n// a. if a non-empty directory, recurse\n// b. if an empty directory, move to random hidden file name in $TEMP\n// c. unlink/rmdir $TEMP\n//\n// This works around the fact that unlink/rmdir is non-atomic and takes\n// a non-deterministic amount of time to complete.\n//\n// However, it is HELLA SLOW, like 2-10x slower than a naive recursive rm.\n\nimport { basename, parse, resolve } from 'path'\nimport { defaultTmp, defaultTmpSync } from './default-tmp.js'\n\nimport { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'\n\nimport {\n chmodSync,\n lstatSync,\n promises as fsPromises,\n renameSync,\n rmdirSync,\n unlinkSync,\n} from './fs.js'\nconst { lstat, rename, unlink, rmdir, chmod } = fsPromises\n\nimport { Dirent, Stats } from 'fs'\nimport { RimrafAsyncOptions, RimrafSyncOptions } from './index.js'\nimport { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js'\n\n// crypto.randomBytes is much slower, and Math.random() is enough here\nconst uniqueFilename = (path: string) => `.${basename(path)}.${Math.random()}`\n\nconst unlinkFixEPERM = async (path: string) =>\n unlink(path).catch((er: Error & { code?: string }) => {\n if (er.code === 'EPERM') {\n return chmod(path, 0o666).then(\n () => unlink(path),\n er2 => {\n if (er2.code === 'ENOENT') {\n return\n }\n throw er\n }\n )\n } else if (er.code === 'ENOENT') {\n return\n }\n throw er\n })\n\nconst unlinkFixEPERMSync = (path: string) => {\n try {\n unlinkSync(path)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'EPERM') {\n try {\n return chmodSync(path, 0o666)\n } catch (er2) {\n if ((er2 as NodeJS.ErrnoException)?.code === 'ENOENT') {\n return\n }\n throw er\n }\n } else if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') {\n return\n }\n throw er\n }\n}\n\nexport const rimrafMoveRemove = async (\n path: string,\n opt: RimrafAsyncOptions\n) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return await rimrafMoveRemoveDir(path, opt, await lstat(path))\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nconst rimrafMoveRemoveDir = async (\n path: string,\n opt: RimrafAsyncOptions,\n ent: Dirent | Stats\n): Promise<boolean> => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n if (!opt.tmp) {\n return rimrafMoveRemoveDir(\n path,\n { ...opt, tmp: await defaultTmp(path) },\n ent\n )\n }\n if (path === opt.tmp && parse(path).root !== path) {\n throw new Error('cannot delete temp directory used for deletion')\n }\n\n const entries = ent.isDirectory() ? await readdirOrError(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n await ignoreENOENT(tmpUnlink(path, opt.tmp, unlinkFixEPERM))\n return true\n }\n\n const removedAll = (\n await Promise.all(\n entries.map(ent => rimrafMoveRemoveDir(resolve(path, ent.name), opt, ent))\n )\n ).reduce((a, b) => a && b, true)\n if (!removedAll) {\n return false\n }\n\n // we don't ever ACTUALLY try to unlink /, because that can never work\n // but when preserveRoot is false, we could be operating on it.\n // No need to check if preserveRoot is not false.\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n await ignoreENOENT(tmpUnlink(path, opt.tmp, rmdir))\n return true\n}\n\nconst tmpUnlink = async (\n path: string,\n tmp: string,\n rm: (p: string) => Promise<any>\n) => {\n const tmpFile = resolve(tmp, uniqueFilename(path))\n await rename(path, tmpFile)\n return await rm(tmpFile)\n}\n\nexport const rimrafMoveRemoveSync = (path: string, opt: RimrafSyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return rimrafMoveRemoveDirSync(path, opt, lstatSync(path))\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nconst rimrafMoveRemoveDirSync = (\n path: string,\n opt: RimrafSyncOptions,\n ent: Dirent | Stats\n): boolean => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n if (!opt.tmp) {\n return rimrafMoveRemoveDirSync(\n path,\n { ...opt, tmp: defaultTmpSync(path) },\n ent\n )\n }\n const tmp: string = opt.tmp\n\n if (path === opt.tmp && parse(path).root !== path) {\n throw new Error('cannot delete temp directory used for deletion')\n }\n\n const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n ignoreENOENTSync(() => tmpUnlinkSync(path, tmp, unlinkFixEPERMSync))\n return true\n }\n\n let removedAll = true\n for (const ent of entries) {\n const p = resolve(path, ent.name)\n removedAll = rimrafMoveRemoveDirSync(p, opt, ent) && removedAll\n }\n if (!removedAll) {\n return false\n }\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n ignoreENOENTSync(() => tmpUnlinkSync(path, tmp, rmdirSync))\n return true\n}\n\nconst tmpUnlinkSync = (\n path: string,\n tmp: string,\n rmSync: (p: string) => void\n) => {\n const tmpFile = resolve(tmp, uniqueFilename(path))\n renameSync(path, tmpFile)\n return rmSync(tmpFile)\n}\n"]}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { RimrafAsyncOptions, RimrafSyncOptions } from './index.js';
|
2
|
-
export declare const rimrafNative: (path: string, opt: RimrafAsyncOptions) => Promise<boolean>;
|
3
|
-
export declare const rimrafNativeSync: (path: string, opt: RimrafSyncOptions) => boolean;
|
4
|
-
//# sourceMappingURL=rimraf-native.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"rimraf-native.d.ts","sourceRoot":"","sources":["../../src/rimraf-native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAIlE,eAAO,MAAM,YAAY,SACjB,MAAM,OACP,kBAAkB,KACtB,QAAQ,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,gBAAgB,SACrB,MAAM,OACP,iBAAiB,KACrB,OAOF,CAAA"}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.rimrafNativeSync = exports.rimrafNative = void 0;
|
4
|
-
const fs_js_1 = require("./fs.js");
|
5
|
-
const { rm } = fs_js_1.promises;
|
6
|
-
const rimrafNative = async (path, opt) => {
|
7
|
-
await rm(path, {
|
8
|
-
...opt,
|
9
|
-
force: true,
|
10
|
-
recursive: true,
|
11
|
-
});
|
12
|
-
return true;
|
13
|
-
};
|
14
|
-
exports.rimrafNative = rimrafNative;
|
15
|
-
const rimrafNativeSync = (path, opt) => {
|
16
|
-
(0, fs_js_1.rmSync)(path, {
|
17
|
-
...opt,
|
18
|
-
force: true,
|
19
|
-
recursive: true,
|
20
|
-
});
|
21
|
-
return true;
|
22
|
-
};
|
23
|
-
exports.rimrafNativeSync = rimrafNativeSync;
|
24
|
-
//# sourceMappingURL=rimraf-native.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"rimraf-native.js","sourceRoot":"","sources":["../../src/rimraf-native.ts"],"names":[],"mappings":";;;AACA,mCAA0C;AAC1C,MAAM,EAAE,EAAE,EAAE,GAAG,gBAAQ,CAAA;AAEhB,MAAM,YAAY,GAAG,KAAK,EAC/B,IAAY,EACZ,GAAuB,EACL,EAAE;IACpB,MAAM,EAAE,CAAC,IAAI,EAAE;QACb,GAAG,GAAG;QACN,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;KAChB,CAAC,CAAA;IACF,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAVY,QAAA,YAAY,gBAUxB;AAEM,MAAM,gBAAgB,GAAG,CAC9B,IAAY,EACZ,GAAsB,EACb,EAAE;IACX,IAAA,cAAM,EAAC,IAAI,EAAE;QACX,GAAG,GAAG;QACN,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;KAChB,CAAC,CAAA;IACF,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAVY,QAAA,gBAAgB,oBAU5B","sourcesContent":["import { RimrafAsyncOptions, RimrafSyncOptions } from './index.js'\nimport { promises, rmSync } from './fs.js'\nconst { rm } = promises\n\nexport const rimrafNative = async (\n path: string,\n opt: RimrafAsyncOptions\n): Promise<boolean> => {\n await rm(path, {\n ...opt,\n force: true,\n recursive: true,\n })\n return true\n}\n\nexport const rimrafNativeSync = (\n path: string,\n opt: RimrafSyncOptions\n): boolean => {\n rmSync(path, {\n ...opt,\n force: true,\n recursive: true,\n })\n return true\n}\n"]}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { RimrafAsyncOptions, RimrafSyncOptions } from './index.js';
|
2
|
-
export declare const rimrafPosix: (path: string, opt: RimrafAsyncOptions) => Promise<boolean>;
|
3
|
-
export declare const rimrafPosixSync: (path: string, opt: RimrafSyncOptions) => boolean;
|
4
|
-
//# sourceMappingURL=rimraf-posix.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"rimraf-posix.d.ts","sourceRoot":"","sources":["../../src/rimraf-posix.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAGlE,eAAO,MAAM,WAAW,SAAgB,MAAM,OAAO,kBAAkB,qBAUtE,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,MAAM,OAAO,iBAAiB,YAUnE,CAAA"}
|
@@ -1,123 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// the simple recursive removal, where unlink and rmdir are atomic
|
3
|
-
// Note that this approach does NOT work on Windows!
|
4
|
-
// We stat first and only unlink if the Dirent isn't a directory,
|
5
|
-
// because sunos will let root unlink a directory, and some
|
6
|
-
// SUPER weird breakage happens as a result.
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
exports.rimrafPosixSync = exports.rimrafPosix = void 0;
|
9
|
-
const fs_js_1 = require("./fs.js");
|
10
|
-
const { lstat, rmdir, unlink } = fs_js_1.promises;
|
11
|
-
const path_1 = require("path");
|
12
|
-
const readdir_or_error_js_1 = require("./readdir-or-error.js");
|
13
|
-
const ignore_enoent_js_1 = require("./ignore-enoent.js");
|
14
|
-
const rimrafPosix = async (path, opt) => {
|
15
|
-
if (opt?.signal?.aborted) {
|
16
|
-
throw opt.signal.reason;
|
17
|
-
}
|
18
|
-
try {
|
19
|
-
return await rimrafPosixDir(path, opt, await lstat(path));
|
20
|
-
}
|
21
|
-
catch (er) {
|
22
|
-
if (er?.code === 'ENOENT')
|
23
|
-
return true;
|
24
|
-
throw er;
|
25
|
-
}
|
26
|
-
};
|
27
|
-
exports.rimrafPosix = rimrafPosix;
|
28
|
-
const rimrafPosixSync = (path, opt) => {
|
29
|
-
if (opt?.signal?.aborted) {
|
30
|
-
throw opt.signal.reason;
|
31
|
-
}
|
32
|
-
try {
|
33
|
-
return rimrafPosixDirSync(path, opt, (0, fs_js_1.lstatSync)(path));
|
34
|
-
}
|
35
|
-
catch (er) {
|
36
|
-
if (er?.code === 'ENOENT')
|
37
|
-
return true;
|
38
|
-
throw er;
|
39
|
-
}
|
40
|
-
};
|
41
|
-
exports.rimrafPosixSync = rimrafPosixSync;
|
42
|
-
const rimrafPosixDir = async (path, opt, ent) => {
|
43
|
-
if (opt?.signal?.aborted) {
|
44
|
-
throw opt.signal.reason;
|
45
|
-
}
|
46
|
-
const entries = ent.isDirectory() ? await (0, readdir_or_error_js_1.readdirOrError)(path) : null;
|
47
|
-
if (!Array.isArray(entries)) {
|
48
|
-
// this can only happen if lstat/readdir lied, or if the dir was
|
49
|
-
// swapped out with a file at just the right moment.
|
50
|
-
/* c8 ignore start */
|
51
|
-
if (entries) {
|
52
|
-
if (entries.code === 'ENOENT') {
|
53
|
-
return true;
|
54
|
-
}
|
55
|
-
if (entries.code !== 'ENOTDIR') {
|
56
|
-
throw entries;
|
57
|
-
}
|
58
|
-
}
|
59
|
-
/* c8 ignore stop */
|
60
|
-
if (opt.filter && !(await opt.filter(path, ent))) {
|
61
|
-
return false;
|
62
|
-
}
|
63
|
-
await (0, ignore_enoent_js_1.ignoreENOENT)(unlink(path));
|
64
|
-
return true;
|
65
|
-
}
|
66
|
-
const removedAll = (await Promise.all(entries.map(ent => rimrafPosixDir((0, path_1.resolve)(path, ent.name), opt, ent)))).reduce((a, b) => a && b, true);
|
67
|
-
if (!removedAll) {
|
68
|
-
return false;
|
69
|
-
}
|
70
|
-
// we don't ever ACTUALLY try to unlink /, because that can never work
|
71
|
-
// but when preserveRoot is false, we could be operating on it.
|
72
|
-
// No need to check if preserveRoot is not false.
|
73
|
-
if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) {
|
74
|
-
return false;
|
75
|
-
}
|
76
|
-
if (opt.filter && !(await opt.filter(path, ent))) {
|
77
|
-
return false;
|
78
|
-
}
|
79
|
-
await (0, ignore_enoent_js_1.ignoreENOENT)(rmdir(path));
|
80
|
-
return true;
|
81
|
-
};
|
82
|
-
const rimrafPosixDirSync = (path, opt, ent) => {
|
83
|
-
if (opt?.signal?.aborted) {
|
84
|
-
throw opt.signal.reason;
|
85
|
-
}
|
86
|
-
const entries = ent.isDirectory() ? (0, readdir_or_error_js_1.readdirOrErrorSync)(path) : null;
|
87
|
-
if (!Array.isArray(entries)) {
|
88
|
-
// this can only happen if lstat/readdir lied, or if the dir was
|
89
|
-
// swapped out with a file at just the right moment.
|
90
|
-
/* c8 ignore start */
|
91
|
-
if (entries) {
|
92
|
-
if (entries.code === 'ENOENT') {
|
93
|
-
return true;
|
94
|
-
}
|
95
|
-
if (entries.code !== 'ENOTDIR') {
|
96
|
-
throw entries;
|
97
|
-
}
|
98
|
-
}
|
99
|
-
/* c8 ignore stop */
|
100
|
-
if (opt.filter && !opt.filter(path, ent)) {
|
101
|
-
return false;
|
102
|
-
}
|
103
|
-
(0, ignore_enoent_js_1.ignoreENOENTSync)(() => (0, fs_js_1.unlinkSync)(path));
|
104
|
-
return true;
|
105
|
-
}
|
106
|
-
let removedAll = true;
|
107
|
-
for (const ent of entries) {
|
108
|
-
const p = (0, path_1.resolve)(path, ent.name);
|
109
|
-
removedAll = rimrafPosixDirSync(p, opt, ent) && removedAll;
|
110
|
-
}
|
111
|
-
if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) {
|
112
|
-
return false;
|
113
|
-
}
|
114
|
-
if (!removedAll) {
|
115
|
-
return false;
|
116
|
-
}
|
117
|
-
if (opt.filter && !opt.filter(path, ent)) {
|
118
|
-
return false;
|
119
|
-
}
|
120
|
-
(0, ignore_enoent_js_1.ignoreENOENTSync)(() => (0, fs_js_1.rmdirSync)(path));
|
121
|
-
return true;
|
122
|
-
};
|
123
|
-
//# sourceMappingURL=rimraf-posix.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"rimraf-posix.js","sourceRoot":"","sources":["../../src/rimraf-posix.ts"],"names":[],"mappings":";AAAA,kEAAkE;AAClE,oDAAoD;AACpD,iEAAiE;AACjE,2DAA2D;AAC3D,4CAA4C;;;AAE5C,mCAAoE;AACpE,MAAM,E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AkB,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,UAAU,CAAA;KAC3D;IACD,IAAI,GAAG,CAAC,YAAY,KAAK,KAAK,IAAI,IAAI,KAAK,IAAA,YAAK,EAAC,IAAI,CAAC,CAAC,IAAI,EAAE;QAC3D,OAAO,KAAK,CAAA;KACb;IAED,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,KAAK,CAAA;KACb;IAED,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;QACxC,OAAO,KAAK,CAAA;KACb;IAED,IAAA,mCAAgB,EAAC,GAAG,EAAE,CAAC,IAAA,iBAAS,EAAC,IAAI,CAAC,CAAC,CAAA;IACvC,OAAO,IAAI,CAAA;AACb,CAAC,CAAA","sourcesContent":["// the simple recursive removal, where unlink and rmdir are atomic\n// Note that this approach does NOT work on Windows!\n// We stat first and only unlink if the Dirent isn't a directory,\n// because sunos will let root unlink a directory, and some\n// SUPER weird breakage happens as a result.\n\nimport { lstatSync, promises, rmdirSync, unlinkSync } from './fs.js'\nconst { lstat, rmdir, unlink } = promises\n\nimport { parse, resolve } from 'path'\n\nimport { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js'\n\nimport { Dirent, Stats } from 'fs'\nimport { RimrafAsyncOptions, RimrafSyncOptions } from './index.js'\nimport { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'\n\nexport const rimrafPosix = async (path: string, opt: RimrafAsyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return await rimrafPosixDir(path, opt, await lstat(path))\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nexport const rimrafPosixSync = (path: string, opt: RimrafSyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return rimrafPosixDirSync(path, opt, lstatSync(path))\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nconst rimrafPosixDir = async (\n path: string,\n opt: RimrafAsyncOptions,\n ent: Dirent | Stats\n): Promise<boolean> => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n const entries = ent.isDirectory() ? await readdirOrError(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n await ignoreENOENT(unlink(path))\n return true\n }\n\n const removedAll = (\n await Promise.all(\n entries.map(ent => rimrafPosixDir(resolve(path, ent.name), opt, ent))\n )\n ).reduce((a, b) => a && b, true)\n\n if (!removedAll) {\n return false\n }\n\n // we don't ever ACTUALLY try to unlink /, because that can never work\n // but when preserveRoot is false, we could be operating on it.\n // No need to check if preserveRoot is not false.\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n\n await ignoreENOENT(rmdir(path))\n return true\n}\n\nconst rimrafPosixDirSync = (\n path: string,\n opt: RimrafSyncOptions,\n ent: Dirent | Stats\n): boolean => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n ignoreENOENTSync(() => unlinkSync(path))\n return true\n }\n let removedAll: boolean = true\n for (const ent of entries) {\n const p = resolve(path, ent.name)\n removedAll = rimrafPosixDirSync(p, opt, ent) && removedAll\n }\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n\n if (!removedAll) {\n return false\n }\n\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n\n ignoreENOENTSync(() => rmdirSync(path))\n return true\n}\n"]}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { RimrafAsyncOptions, RimrafSyncOptions } from './index.js';
|
2
|
-
export declare const rimrafWindows: (path: string, opt: RimrafAsyncOptions) => Promise<boolean>;
|
3
|
-
export declare const rimrafWindowsSync: (path: string, opt: RimrafSyncOptions) => boolean;
|
4
|
-
//# sourceMappingURL=rimraf-windows.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"rimraf-windows.d.ts","sourceRoot":"","sources":["../../src/rimraf-windows.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AA2DlE,eAAO,MAAM,aAAa,SAAgB,MAAM,OAAO,kBAAkB,qBAUxE,CAAA;AAED,eAAO,MAAM,iBAAiB,SAAU,MAAM,OAAO,iBAAiB,YAUrE,CAAA"}
|
@@ -1,182 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// This is the same as rimrafPosix, with the following changes:
|
3
|
-
//
|
4
|
-
// 1. EBUSY, ENFILE, EMFILE trigger retries and/or exponential backoff
|
5
|
-
// 2. All non-directories are removed first and then all directories are
|
6
|
-
// removed in a second sweep.
|
7
|
-
// 3. If we hit ENOTEMPTY in the second sweep, fall back to move-remove on
|
8
|
-
// the that folder.
|
9
|
-
//
|
10
|
-
// Note: "move then remove" is 2-10 times slower, and just as unreliable.
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.rimrafWindowsSync = exports.rimrafWindows = void 0;
|
13
|
-
const path_1 = require("path");
|
14
|
-
const fix_eperm_js_1 = require("./fix-eperm.js");
|
15
|
-
const fs_js_1 = require("./fs.js");
|
16
|
-
const ignore_enoent_js_1 = require("./ignore-enoent.js");
|
17
|
-
const readdir_or_error_js_1 = require("./readdir-or-error.js");
|
18
|
-
const retry_busy_js_1 = require("./retry-busy.js");
|
19
|
-
const rimraf_move_remove_js_1 = require("./rimraf-move-remove.js");
|
20
|
-
const { unlink, rmdir, lstat } = fs_js_1.promises;
|
21
|
-
const rimrafWindowsFile = (0, retry_busy_js_1.retryBusy)((0, fix_eperm_js_1.fixEPERM)(unlink));
|
22
|
-
const rimrafWindowsFileSync = (0, retry_busy_js_1.retryBusySync)((0, fix_eperm_js_1.fixEPERMSync)(fs_js_1.unlinkSync));
|
23
|
-
const rimrafWindowsDirRetry = (0, retry_busy_js_1.retryBusy)((0, fix_eperm_js_1.fixEPERM)(rmdir));
|
24
|
-
const rimrafWindowsDirRetrySync = (0, retry_busy_js_1.retryBusySync)((0, fix_eperm_js_1.fixEPERMSync)(fs_js_1.rmdirSync));
|
25
|
-
const rimrafWindowsDirMoveRemoveFallback = async (path, opt) => {
|
26
|
-
/* c8 ignore start */
|
27
|
-
if (opt?.signal?.aborted) {
|
28
|
-
throw opt.signal.reason;
|
29
|
-
}
|
30
|
-
/* c8 ignore stop */
|
31
|
-
// already filtered, remove from options so we don't call unnecessarily
|
32
|
-
const { filter, ...options } = opt;
|
33
|
-
try {
|
34
|
-
return await rimrafWindowsDirRetry(path, options);
|
35
|
-
}
|
36
|
-
catch (er) {
|
37
|
-
if (er?.code === 'ENOTEMPTY') {
|
38
|
-
return await (0, rimraf_move_remove_js_1.rimrafMoveRemove)(path, options);
|
39
|
-
}
|
40
|
-
throw er;
|
41
|
-
}
|
42
|
-
};
|
43
|
-
const rimrafWindowsDirMoveRemoveFallbackSync = (path, opt) => {
|
44
|
-
if (opt?.signal?.aborted) {
|
45
|
-
throw opt.signal.reason;
|
46
|
-
}
|
47
|
-
// already filtered, remove from options so we don't call unnecessarily
|
48
|
-
const { filter, ...options } = opt;
|
49
|
-
try {
|
50
|
-
return rimrafWindowsDirRetrySync(path, options);
|
51
|
-
}
|
52
|
-
catch (er) {
|
53
|
-
const fer = er;
|
54
|
-
if (fer?.code === 'ENOTEMPTY') {
|
55
|
-
return (0, rimraf_move_remove_js_1.rimrafMoveRemoveSync)(path, options);
|
56
|
-
}
|
57
|
-
throw er;
|
58
|
-
}
|
59
|
-
};
|
60
|
-
const START = Symbol('start');
|
61
|
-
const CHILD = Symbol('child');
|
62
|
-
const FINISH = Symbol('finish');
|
63
|
-
const rimrafWindows = async (path, opt) => {
|
64
|
-
if (opt?.signal?.aborted) {
|
65
|
-
throw opt.signal.reason;
|
66
|
-
}
|
67
|
-
try {
|
68
|
-
return await rimrafWindowsDir(path, opt, await lstat(path), START);
|
69
|
-
}
|
70
|
-
catch (er) {
|
71
|
-
if (er?.code === 'ENOENT')
|
72
|
-
return true;
|
73
|
-
throw er;
|
74
|
-
}
|
75
|
-
};
|
76
|
-
exports.rimrafWindows = rimrafWindows;
|
77
|
-
const rimrafWindowsSync = (path, opt) => {
|
78
|
-
if (opt?.signal?.aborted) {
|
79
|
-
throw opt.signal.reason;
|
80
|
-
}
|
81
|
-
try {
|
82
|
-
return rimrafWindowsDirSync(path, opt, (0, fs_js_1.lstatSync)(path), START);
|
83
|
-
}
|
84
|
-
catch (er) {
|
85
|
-
if (er?.code === 'ENOENT')
|
86
|
-
return true;
|
87
|
-
throw er;
|
88
|
-
}
|
89
|
-
};
|
90
|
-
exports.rimrafWindowsSync = rimrafWindowsSync;
|
91
|
-
const rimrafWindowsDir = async (path, opt, ent, state = START) => {
|
92
|
-
if (opt?.signal?.aborted) {
|
93
|
-
throw opt.signal.reason;
|
94
|
-
}
|
95
|
-
const entries = ent.isDirectory() ? await (0, readdir_or_error_js_1.readdirOrError)(path) : null;
|
96
|
-
if (!Array.isArray(entries)) {
|
97
|
-
// this can only happen if lstat/readdir lied, or if the dir was
|
98
|
-
// swapped out with a file at just the right moment.
|
99
|
-
/* c8 ignore start */
|
100
|
-
if (entries) {
|
101
|
-
if (entries.code === 'ENOENT') {
|
102
|
-
return true;
|
103
|
-
}
|
104
|
-
if (entries.code !== 'ENOTDIR') {
|
105
|
-
throw entries;
|
106
|
-
}
|
107
|
-
}
|
108
|
-
/* c8 ignore stop */
|
109
|
-
if (opt.filter && !(await opt.filter(path, ent))) {
|
110
|
-
return false;
|
111
|
-
}
|
112
|
-
// is a file
|
113
|
-
await (0, ignore_enoent_js_1.ignoreENOENT)(rimrafWindowsFile(path, opt));
|
114
|
-
return true;
|
115
|
-
}
|
116
|
-
const s = state === START ? CHILD : state;
|
117
|
-
const removedAll = (await Promise.all(entries.map(ent => rimrafWindowsDir((0, path_1.resolve)(path, ent.name), opt, ent, s)))).reduce((a, b) => a && b, true);
|
118
|
-
if (state === START) {
|
119
|
-
return rimrafWindowsDir(path, opt, ent, FINISH);
|
120
|
-
}
|
121
|
-
else if (state === FINISH) {
|
122
|
-
if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) {
|
123
|
-
return false;
|
124
|
-
}
|
125
|
-
if (!removedAll) {
|
126
|
-
return false;
|
127
|
-
}
|
128
|
-
if (opt.filter && !(await opt.filter(path, ent))) {
|
129
|
-
return false;
|
130
|
-
}
|
131
|
-
await (0, ignore_enoent_js_1.ignoreENOENT)(rimrafWindowsDirMoveRemoveFallback(path, opt));
|
132
|
-
}
|
133
|
-
return true;
|
134
|
-
};
|
135
|
-
const rimrafWindowsDirSync = (path, opt, ent, state = START) => {
|
136
|
-
const entries = ent.isDirectory() ? (0, readdir_or_error_js_1.readdirOrErrorSync)(path) : null;
|
137
|
-
if (!Array.isArray(entries)) {
|
138
|
-
// this can only happen if lstat/readdir lied, or if the dir was
|
139
|
-
// swapped out with a file at just the right moment.
|
140
|
-
/* c8 ignore start */
|
141
|
-
if (entries) {
|
142
|
-
if (entries.code === 'ENOENT') {
|
143
|
-
return true;
|
144
|
-
}
|
145
|
-
if (entries.code !== 'ENOTDIR') {
|
146
|
-
throw entries;
|
147
|
-
}
|
148
|
-
}
|
149
|
-
/* c8 ignore stop */
|
150
|
-
if (opt.filter && !opt.filter(path, ent)) {
|
151
|
-
return false;
|
152
|
-
}
|
153
|
-
// is a file
|
154
|
-
(0, ignore_enoent_js_1.ignoreENOENTSync)(() => rimrafWindowsFileSync(path, opt));
|
155
|
-
return true;
|
156
|
-
}
|
157
|
-
let removedAll = true;
|
158
|
-
for (const ent of entries) {
|
159
|
-
const s = state === START ? CHILD : state;
|
160
|
-
const p = (0, path_1.resolve)(path, ent.name);
|
161
|
-
removedAll = rimrafWindowsDirSync(p, opt, ent, s) && removedAll;
|
162
|
-
}
|
163
|
-
if (state === START) {
|
164
|
-
return rimrafWindowsDirSync(path, opt, ent, FINISH);
|
165
|
-
}
|
166
|
-
else if (state === FINISH) {
|
167
|
-
if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) {
|
168
|
-
return false;
|
169
|
-
}
|
170
|
-
if (!removedAll) {
|
171
|
-
return false;
|
172
|
-
}
|
173
|
-
if (opt.filter && !opt.filter(path, ent)) {
|
174
|
-
return false;
|
175
|
-
}
|
176
|
-
(0, ignore_enoent_js_1.ignoreENOENTSync)(() => {
|
177
|
-
rimrafWindowsDirMoveRemoveFallbackSync(path, opt);
|
178
|
-
});
|
179
|
-
}
|
180
|
-
return true;
|
181
|
-
};
|
182
|
-
//# sourceMappingURL=rimraf-windows.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"rimraf-windows.js","sourceRoot":"","sources":["../../src/rimraf-windows.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,wEAAwE;AACxE,gCAAgC;AAChC,0EAA0E;AAC1E,sBAAsB;AACtB,EAAE;AACF,yEAAyE;;;AAGzE,+BAAqC;AAErC,iDAAuD;AACvD,mCAAoE;AACpE,yDAAmE;AACnE,+DAA0E;AAC1E,mDAA0D;AAC1D,mEAAgF;AAChF,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,gBAAQ,CAAA;AAE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,GAAG,EAAE;YACpB,sCAAsC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QACnD,CAAC,CAAC,CAAA;KACH;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA","sourcesContent":["// This is the same as rimrafPosix, with the following changes:\n//\n// 1. EBUSY, ENFILE, EMFILE trigger retries and/or exponential backoff\n// 2. All non-directories are removed first and then all directories are\n// removed in a second sweep.\n// 3. If we hit ENOTEMPTY in the second sweep, fall back to move-remove on\n// the that folder.\n//\n// Note: \"move then remove\" is 2-10 times slower, and just as unreliable.\n\nimport { Dirent, Stats } from 'fs'\nimport { parse, resolve } from 'path'\nimport { RimrafAsyncOptions, RimrafSyncOptions } from './index.js'\nimport { fixEPERM, fixEPERMSync } from './fix-eperm.js'\nimport { lstatSync, promises, rmdirSync, unlinkSync } from './fs.js'\nimport { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'\nimport { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js'\nimport { retryBusy, retryBusySync } from './retry-busy.js'\nimport { rimrafMoveRemove, rimrafMoveRemoveSync } from './rimraf-move-remove.js'\nconst { unlink, rmdir, lstat } = promises\n\nconst rimrafWindowsFile = retryBusy(fixEPERM(unlink))\nconst rimrafWindowsFileSync = retryBusySync(fixEPERMSync(unlinkSync))\nconst rimrafWindowsDirRetry = retryBusy(fixEPERM(rmdir))\nconst rimrafWindowsDirRetrySync = retryBusySync(fixEPERMSync(rmdirSync))\n\nconst rimrafWindowsDirMoveRemoveFallback = async (\n path: string,\n opt: RimrafAsyncOptions\n): Promise<boolean> => {\n /* c8 ignore start */\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n /* c8 ignore stop */\n // already filtered, remove from options so we don't call unnecessarily\n const { filter, ...options } = opt\n try {\n return await rimrafWindowsDirRetry(path, options)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOTEMPTY') {\n return await rimrafMoveRemove(path, options)\n }\n throw er\n }\n}\n\nconst rimrafWindowsDirMoveRemoveFallbackSync = (\n path: string,\n opt: RimrafSyncOptions\n): boolean => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n // already filtered, remove from options so we don't call unnecessarily\n const { filter, ...options } = opt\n try {\n return rimrafWindowsDirRetrySync(path, options)\n } catch (er) {\n const fer = er as NodeJS.ErrnoException\n if (fer?.code === 'ENOTEMPTY') {\n return rimrafMoveRemoveSync(path, options)\n }\n throw er\n }\n}\n\nconst START = Symbol('start')\nconst CHILD = Symbol('child')\nconst FINISH = Symbol('finish')\n\nexport const rimrafWindows = async (path: string, opt: RimrafAsyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return await rimrafWindowsDir(path, opt, await lstat(path), START)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nexport const rimrafWindowsSync = (path: string, opt: RimrafSyncOptions) => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n try {\n return rimrafWindowsDirSync(path, opt, lstatSync(path), START)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') return true\n throw er\n }\n}\n\nconst rimrafWindowsDir = async (\n path: string,\n opt: RimrafAsyncOptions,\n ent: Dirent | Stats,\n state = START\n): Promise<boolean> => {\n if (opt?.signal?.aborted) {\n throw opt.signal.reason\n }\n\n const entries = ent.isDirectory() ? await readdirOrError(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n // is a file\n await ignoreENOENT(rimrafWindowsFile(path, opt))\n return true\n }\n\n const s = state === START ? CHILD : state\n const removedAll = (\n await Promise.all(\n entries.map(ent => rimrafWindowsDir(resolve(path, ent.name), opt, ent, s))\n )\n ).reduce((a, b) => a && b, true)\n\n if (state === START) {\n return rimrafWindowsDir(path, opt, ent, FINISH)\n } else if (state === FINISH) {\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n if (!removedAll) {\n return false\n }\n if (opt.filter && !(await opt.filter(path, ent))) {\n return false\n }\n await ignoreENOENT(rimrafWindowsDirMoveRemoveFallback(path, opt))\n }\n return true\n}\n\nconst rimrafWindowsDirSync = (\n path: string,\n opt: RimrafSyncOptions,\n ent: Dirent | Stats,\n state = START\n): boolean => {\n const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null\n if (!Array.isArray(entries)) {\n // this can only happen if lstat/readdir lied, or if the dir was\n // swapped out with a file at just the right moment.\n /* c8 ignore start */\n if (entries) {\n if (entries.code === 'ENOENT') {\n return true\n }\n if (entries.code !== 'ENOTDIR') {\n throw entries\n }\n }\n /* c8 ignore stop */\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n // is a file\n ignoreENOENTSync(() => rimrafWindowsFileSync(path, opt))\n return true\n }\n\n let removedAll = true\n for (const ent of entries) {\n const s = state === START ? CHILD : state\n const p = resolve(path, ent.name)\n removedAll = rimrafWindowsDirSync(p, opt, ent, s) && removedAll\n }\n\n if (state === START) {\n return rimrafWindowsDirSync(path, opt, ent, FINISH)\n } else if (state === FINISH) {\n if (opt.preserveRoot === false && path === parse(path).root) {\n return false\n }\n if (!removedAll) {\n return false\n }\n if (opt.filter && !opt.filter(path, ent)) {\n return false\n }\n ignoreENOENTSync(() => {\n rimrafWindowsDirMoveRemoveFallbackSync(path, opt)\n })\n }\n return true\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"use-native.d.ts","sourceRoot":"","sources":["../../src/use-native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAa9D,eAAO,MAAM,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,kBAAkB,KAAK,OAGb,CAAA;AACzC,eAAO,MAAM,aAAa,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,KAAK,OAGZ,CAAA"}
|