@gradientedge/cdk-utils 8.32.0 → 8.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/api-destined-function/layers/nodejs/node_modules/.yarn-integrity +15 -17
- package/app/api-destined-function/layers/nodejs/package.json +3 -3
- package/app/api-destined-function/node_modules/.yarn-integrity +296 -53
- package/app/api-destined-function/node_modules/@types/uuid/README.md +1 -1
- package/app/api-destined-function/node_modules/@types/uuid/index.d.ts +1 -1
- package/app/api-destined-function/node_modules/@types/uuid/package.json +3 -3
- package/app/api-destined-function/node_modules/brace-expansion/README.md +6 -0
- package/app/api-destined-function/node_modules/brace-expansion/index.js +86 -84
- package/app/api-destined-function/node_modules/brace-expansion/package.json +3 -4
- package/app/api-destined-function/node_modules/glob/LICENSE +1 -7
- package/app/api-destined-function/node_modules/glob/README.md +992 -284
- package/app/api-destined-function/node_modules/glob/dist/cjs/glob.d.ts +328 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/glob.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/glob.js +228 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/glob.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/has-magic.d.ts +14 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/has-magic.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/has-magic.js +27 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/has-magic.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/ignore.d.ts +20 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/ignore.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/ignore.js +103 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/ignore.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/index-cjs.d.ts +75 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/index-cjs.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/index-cjs.js +7 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/index-cjs.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/index.d.ts +96 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/index.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/index.js +68 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/index.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/package.json +3 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/pattern.d.ts +77 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/pattern.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/pattern.js +219 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/pattern.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/processor.d.ts +59 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/processor.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/processor.js +309 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/processor.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/walker.d.ts +95 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/walker.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/walker.js +360 -0
- package/app/api-destined-function/node_modules/glob/dist/cjs/walker.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/glob.d.ts +328 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/glob.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/glob.js +224 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/glob.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/has-magic.d.ts +14 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/has-magic.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/has-magic.js +23 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/has-magic.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/ignore.d.ts +20 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/ignore.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/ignore.js +99 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/ignore.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/index.d.ts +96 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/index.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/index.js +55 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/index.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/package.json +3 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/pattern.d.ts +77 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/pattern.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/pattern.js +215 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/pattern.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/processor.d.ts +59 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/processor.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/processor.js +302 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/processor.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/walker.d.ts +95 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/walker.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/walker.js +351 -0
- package/app/api-destined-function/node_modules/glob/dist/mjs/walker.js.map +1 -0
- package/app/api-destined-function/node_modules/glob/package.json +76 -30
- package/app/api-destined-function/node_modules/{inflight → lru-cache}/LICENSE +1 -1
- package/app/api-destined-function/node_modules/lru-cache/README.md +1117 -0
- package/app/api-destined-function/node_modules/lru-cache/index.d.ts +869 -0
- package/app/api-destined-function/node_modules/lru-cache/index.js +1227 -0
- package/app/api-destined-function/node_modules/lru-cache/index.mjs +1227 -0
- package/app/api-destined-function/node_modules/lru-cache/package.json +96 -0
- package/app/api-destined-function/node_modules/minimatch/LICENSE +1 -1
- package/app/api-destined-function/node_modules/minimatch/README.md +305 -55
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +8 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/brace-expressions.js +152 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/brace-expressions.js.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/escape.d.ts +12 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/escape.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/escape.js +22 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/escape.js.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/index-cjs.d.ts +42 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/index-cjs.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/index-cjs.js +7 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/index-cjs.js.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/index.d.ts +92 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/index.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/index.js +1304 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/index.js.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/package.json +3 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/unescape.d.ts +17 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/unescape.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/unescape.js +24 -0
- package/app/api-destined-function/node_modules/minimatch/dist/cjs/unescape.js.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +8 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/brace-expressions.js +148 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/brace-expressions.js.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/escape.d.ts +12 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/escape.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/escape.js +18 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/escape.js.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/index.d.ts +92 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/index.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/index.js +1289 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/index.js.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/package.json +3 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/unescape.d.ts +17 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/unescape.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/unescape.js +20 -0
- package/app/api-destined-function/node_modules/minimatch/dist/mjs/unescape.js.map +1 -0
- package/app/api-destined-function/node_modules/minimatch/package.json +67 -11
- package/app/api-destined-function/node_modules/{once → minipass}/LICENSE +1 -1
- package/app/api-destined-function/node_modules/minipass/README.md +769 -0
- package/app/api-destined-function/node_modules/minipass/index.d.ts +150 -0
- package/app/api-destined-function/node_modules/minipass/index.js +702 -0
- package/app/api-destined-function/node_modules/minipass/index.mjs +702 -0
- package/app/api-destined-function/node_modules/minipass/package.json +76 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/package.json +4 -3
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/bin.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/bin.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/bin.js +7 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/bin.js.map +1 -1
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/find-made.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/find-made.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/index-cjs.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/index-cjs.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/index.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/index.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/mkdirp-manual.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/mkdirp-native.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/mkdirp-native.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/opts-arg.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/opts-arg.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/path-arg.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/path-arg.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/use-native.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/cjs/src/use-native.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/find-made.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/find-made.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/index.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/index.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/mkdirp-manual.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/mkdirp-manual.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/mkdirp-native.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/mkdirp-native.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/opts-arg.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/opts-arg.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/path-arg.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/path-arg.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/use-native.d.ts +1 -0
- package/app/api-destined-function/node_modules/mkdirp/dist/mjs/use-native.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/mkdirp/package.json +4 -3
- package/app/api-destined-function/node_modules/path-scurry/LICENSE.md +55 -0
- package/app/api-destined-function/node_modules/path-scurry/README.md +559 -0
- package/app/api-destined-function/node_modules/path-scurry/dist/cjs/index.d.ts +1055 -0
- package/app/api-destined-function/node_modules/path-scurry/dist/cjs/index.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/path-scurry/dist/cjs/index.js +1865 -0
- package/app/api-destined-function/node_modules/path-scurry/dist/cjs/index.js.map +1 -0
- package/app/api-destined-function/node_modules/path-scurry/dist/cjs/package.json +3 -0
- package/app/api-destined-function/node_modules/path-scurry/dist/mjs/index.d.ts +1055 -0
- package/app/api-destined-function/node_modules/path-scurry/dist/mjs/index.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/path-scurry/dist/mjs/index.js +1827 -0
- package/app/api-destined-function/node_modules/path-scurry/dist/mjs/index.js.map +1 -0
- package/app/api-destined-function/node_modules/path-scurry/dist/mjs/package.json +3 -0
- package/app/api-destined-function/node_modules/path-scurry/package.json +87 -0
- package/app/api-destined-function/node_modules/rimraf/LICENSE +1 -1
- package/app/api-destined-function/node_modules/rimraf/README.md +185 -72
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/package.json +84 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/bin.d.ts +8 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/bin.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/bin.js +260 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/bin.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/default-tmp.d.ts +3 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/default-tmp.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/default-tmp.js +61 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/default-tmp.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/fix-eperm.d.ts +3 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/fix-eperm.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/fix-eperm.js +58 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/fix-eperm.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/fs.d.ts +17 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/fs.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/fs.js +46 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/fs.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/ignore-enoent.d.ts +3 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/ignore-enoent.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/ignore-enoent.js +21 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/ignore-enoent.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/index-cjs.d.ts +57 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/index-cjs.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/index-cjs.js +7 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/index-cjs.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/index.d.ts +71 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/index.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/index.js +92 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/index.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/opt-arg.d.ts +17 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/opt-arg.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/opt-arg.js +36 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/opt-arg.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/path-arg.d.ts +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/path-arg.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/path-arg.js +54 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/path-arg.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/platform.d.ts +3 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/platform.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/platform.js +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/platform.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/readdir-or-error.d.ts +5 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/readdir-or-error.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/readdir-or-error.js +19 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/readdir-or-error.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/retry-busy.d.ts +8 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/retry-busy.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/retry-busy.js +68 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/retry-busy.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-manual.d.ts +3 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-manual.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-manual.js +12 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-manual.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.d.ts +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.js +192 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-move-remove.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-native.d.ts +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-native.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-native.js +24 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-native.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-posix.d.ts +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-posix.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-posix.js +123 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-posix.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-windows.d.ts +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-windows.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-windows.js +182 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/rimraf-windows.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/use-native.d.ts +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/use-native.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/use-native.js +19 -0
- package/app/api-destined-function/node_modules/rimraf/dist/cjs/src/use-native.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/default-tmp.d.ts +3 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/default-tmp.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/default-tmp.js +55 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/default-tmp.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/fix-eperm.d.ts +3 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/fix-eperm.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/fix-eperm.js +53 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/fix-eperm.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/fs.d.ts +17 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/fs.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/fs.js +31 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/fs.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/ignore-enoent.d.ts +3 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/ignore-enoent.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/ignore-enoent.js +16 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/ignore-enoent.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/index.d.ts +71 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/index.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/index.js +84 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/index.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/opt-arg.d.ts +17 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/opt-arg.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/opt-arg.js +31 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/opt-arg.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/package.json +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/path-arg.d.ts +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/path-arg.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/path-arg.js +49 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/path-arg.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/platform.d.ts +3 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/platform.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/platform.js +2 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/platform.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/readdir-or-error.d.ts +5 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/readdir-or-error.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/readdir-or-error.js +14 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/readdir-or-error.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/retry-busy.d.ts +8 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/retry-busy.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/retry-busy.js +63 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/retry-busy.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-manual.d.ts +3 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-manual.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-manual.js +6 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-manual.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-move-remove.d.ts +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-move-remove.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-move-remove.js +187 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-move-remove.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-native.d.ts +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-native.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-native.js +19 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-native.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-posix.d.ts +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-posix.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-posix.js +118 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-posix.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-windows.d.ts +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-windows.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-windows.js +177 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/rimraf-windows.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/use-native.d.ts +4 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/use-native.d.ts.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/use-native.js +13 -0
- package/app/api-destined-function/node_modules/rimraf/dist/mjs/use-native.js.map +1 -0
- package/app/api-destined-function/node_modules/rimraf/package.json +67 -15
- package/app/api-destined-function/package.json +3 -3
- package/dist/src/lib/common/stack.js +1 -1
- package/package.json +11 -11
- package/src/lib/common/stack.ts +1 -1
- package/app/api-destined-function/node_modules/concat-map/.travis.yml +0 -4
- package/app/api-destined-function/node_modules/concat-map/LICENSE +0 -18
- package/app/api-destined-function/node_modules/concat-map/README.markdown +0 -62
- package/app/api-destined-function/node_modules/concat-map/example/map.js +0 -6
- package/app/api-destined-function/node_modules/concat-map/index.js +0 -13
- package/app/api-destined-function/node_modules/concat-map/package.json +0 -43
- package/app/api-destined-function/node_modules/glob/common.js +0 -236
- package/app/api-destined-function/node_modules/glob/glob.js +0 -787
- package/app/api-destined-function/node_modules/glob/sync.js +0 -483
- package/app/api-destined-function/node_modules/inflight/README.md +0 -37
- package/app/api-destined-function/node_modules/inflight/inflight.js +0 -54
- package/app/api-destined-function/node_modules/inflight/package.json +0 -29
- package/app/api-destined-function/node_modules/inherits/LICENSE +0 -16
- package/app/api-destined-function/node_modules/inherits/README.md +0 -42
- package/app/api-destined-function/node_modules/inherits/inherits.js +0 -9
- package/app/api-destined-function/node_modules/inherits/inherits_browser.js +0 -27
- package/app/api-destined-function/node_modules/inherits/package.json +0 -29
- package/app/api-destined-function/node_modules/minimatch/minimatch.js +0 -952
- package/app/api-destined-function/node_modules/once/README.md +0 -79
- package/app/api-destined-function/node_modules/once/once.js +0 -42
- package/app/api-destined-function/node_modules/once/package.json +0 -33
- package/app/api-destined-function/node_modules/path-is-absolute/index.js +0 -20
- package/app/api-destined-function/node_modules/path-is-absolute/license +0 -21
- package/app/api-destined-function/node_modules/path-is-absolute/package.json +0 -43
- package/app/api-destined-function/node_modules/path-is-absolute/readme.md +0 -59
- package/app/api-destined-function/node_modules/rimraf/bin.js +0 -68
- package/app/api-destined-function/node_modules/rimraf/rimraf.js +0 -360
- package/app/api-destined-function/node_modules/wrappy/LICENSE +0 -15
- package/app/api-destined-function/node_modules/wrappy/README.md +0 -36
- package/app/api-destined-function/node_modules/wrappy/package.json +0 -29
- package/app/api-destined-function/node_modules/wrappy/wrappy.js +0 -33
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// note: max backoff is the maximum that any *single* backoff will do
|
|
2
|
+
export const MAXBACKOFF = 200;
|
|
3
|
+
export const RATE = 1.2;
|
|
4
|
+
export const MAXRETRIES = 10;
|
|
5
|
+
export const codes = new Set(['EMFILE', 'ENFILE', 'EBUSY']);
|
|
6
|
+
export const retryBusy = (fn) => {
|
|
7
|
+
const method = async (path, opt, backoff = 1, total = 0) => {
|
|
8
|
+
const mbo = opt.maxBackoff || MAXBACKOFF;
|
|
9
|
+
const rate = opt.backoff || RATE;
|
|
10
|
+
const max = opt.maxRetries || MAXRETRIES;
|
|
11
|
+
let retries = 0;
|
|
12
|
+
while (true) {
|
|
13
|
+
try {
|
|
14
|
+
return await fn(path);
|
|
15
|
+
}
|
|
16
|
+
catch (er) {
|
|
17
|
+
const fer = er;
|
|
18
|
+
if (fer?.path === path && fer?.code && codes.has(fer.code)) {
|
|
19
|
+
backoff = Math.ceil(backoff * rate);
|
|
20
|
+
total = backoff + total;
|
|
21
|
+
if (total < mbo) {
|
|
22
|
+
return new Promise((res, rej) => {
|
|
23
|
+
setTimeout(() => {
|
|
24
|
+
method(path, opt, backoff, total).then(res, rej);
|
|
25
|
+
}, backoff);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
if (retries < max) {
|
|
29
|
+
retries++;
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
throw er;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
return method;
|
|
38
|
+
};
|
|
39
|
+
// just retries, no async so no backoff
|
|
40
|
+
export const retryBusySync = (fn) => {
|
|
41
|
+
const method = (path, opt) => {
|
|
42
|
+
const max = opt.maxRetries || MAXRETRIES;
|
|
43
|
+
let retries = 0;
|
|
44
|
+
while (true) {
|
|
45
|
+
try {
|
|
46
|
+
return fn(path);
|
|
47
|
+
}
|
|
48
|
+
catch (er) {
|
|
49
|
+
const fer = er;
|
|
50
|
+
if (fer?.path === path &&
|
|
51
|
+
fer?.code &&
|
|
52
|
+
codes.has(fer.code) &&
|
|
53
|
+
retries < max) {
|
|
54
|
+
retries++;
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
throw er;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
return method;
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=retry-busy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry-busy.js","sourceRoot":"","sources":["../../src/retry-busy.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAIrE,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;AAC7B,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAA;AACvB,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAA;AAC5B,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAA;AAE3D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAkC,EAAE,EAAE;IAC9D,MAAM,MAAM,GAAG,KAAK,EAClB,IAAY,EACZ,GAAuB,EACvB,OAAO,GAAG,CAAC,E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AG,CAAC,IAAY,EAAE,GAAkB,EAAE,EAAE;QAClD,MAAM,GAAG,GAAG,GAAG,CAAC,UAAU,IAAI,UAAU,CAAA;QACxC,IAAI,OAAO,GAAG,CAAC,CAAA;QACf,OAAO,IAAI,EAAE;YACX,IAAI;gBACF,OAAO,EAAE,CAAC,IAAI,CAAC,CAAA;aAChB;YAAC,OAAO,EAAE,EAAE;gBACX,MAAM,GAAG,GAAG,EAA2B,CAAA;gBACvC,IACE,GAAG,EAAE,IAAI,KAAK,IAAI;oBAClB,GAAG,EAAE,IAAI;oBACT,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;oBACnB,OAAO,GAAG,GAAG,EACb;oBACA,OAAO,EAAE,CAAA;oBACT,SAAQ;iBACT;gBACD,MAAM,EAAE,CAAA;aACT;SACF;IACH,CAAC,CAAA;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rimraf-manual.d.ts","sourceRoot":"","sources":["../../src/rimraf-manual.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,kFAAqD,CAAA;AAC9E,eAAO,MAAM,gBAAgB,wEAC+B,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import platform from './platform.js';
|
|
2
|
+
import { rimrafPosix, rimrafPosixSync } from './rimraf-posix.js';
|
|
3
|
+
import { rimrafWindows, rimrafWindowsSync } from './rimraf-windows.js';
|
|
4
|
+
export const rimrafManual = platform === 'win32' ? rimrafWindows : rimrafPosix;
|
|
5
|
+
export const rimrafManualSync = platform === 'win32' ? rimrafWindowsSync : rimrafPosixSync;
|
|
6
|
+
//# sourceMappingURL=rimraf-manual.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rimraf-manual.js","sourceRoot":"","sources":["../../src/rimraf-manual.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAEpC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEtE,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAA;AAC9E,MAAM,CAAC,MAAM,gBAAgB,GAC3B,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RimrafAsyncOptions, RimrafSyncOptions } from '.';
|
|
2
|
+
export declare const rimrafMoveRemove: (path: string, opt: RimrafAsyncOptions) => Promise<boolean>;
|
|
3
|
+
export declare const rimrafMoveRemoveSync: (path: string, opt: RimrafSyncOptions) => boolean;
|
|
4
|
+
//# sourceMappingURL=rimraf-move-remove.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rimraf-move-remove.d.ts","sourceRoot":"","sources":["../../src/rimraf-move-remove.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AA4CzD,eAAO,MAAM,gBAAgB,SACrB,MAAM,OACP,kBAAkB,qBAWxB,CAAA;AA0ED,eAAO,MAAM,oBAAoB,SAAU,MAAM,OAAO,iBAAiB,YAUxE,CAAA"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
// https://youtu.be/uhRWMGBjlO8?t=537
|
|
2
|
+
//
|
|
3
|
+
// 1. readdir
|
|
4
|
+
// 2. for each entry
|
|
5
|
+
// a. if a non-empty directory, recurse
|
|
6
|
+
// b. if an empty directory, move to random hidden file name in $TEMP
|
|
7
|
+
// c. unlink/rmdir $TEMP
|
|
8
|
+
//
|
|
9
|
+
// This works around the fact that unlink/rmdir is non-atomic and takes
|
|
10
|
+
// a non-deterministic amount of time to complete.
|
|
11
|
+
//
|
|
12
|
+
// However, it is HELLA SLOW, like 2-10x slower than a naive recursive rm.
|
|
13
|
+
import { basename, parse, resolve } from 'path';
|
|
14
|
+
import { defaultTmp, defaultTmpSync } from './default-tmp.js';
|
|
15
|
+
import { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js';
|
|
16
|
+
import { chmodSync, lstatSync, promises as fsPromises, renameSync, rmdirSync, unlinkSync, } from './fs.js';
|
|
17
|
+
const { lstat, rename, unlink, rmdir, chmod } = fsPromises;
|
|
18
|
+
import { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js';
|
|
19
|
+
// crypto.randomBytes is much slower, and Math.random() is enough here
|
|
20
|
+
const uniqueFilename = (path) => `.${basename(path)}.${Math.random()}`;
|
|
21
|
+
const unlinkFixEPERM = async (path) => unlink(path).catch((er) => {
|
|
22
|
+
if (er.code === 'EPERM') {
|
|
23
|
+
return chmod(path, 0o666).then(() => unlink(path), er2 => {
|
|
24
|
+
if (er2.code === 'ENOENT') {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
throw er;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
else if (er.code === 'ENOENT') {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
throw er;
|
|
34
|
+
});
|
|
35
|
+
const unlinkFixEPERMSync = (path) => {
|
|
36
|
+
try {
|
|
37
|
+
unlinkSync(path);
|
|
38
|
+
}
|
|
39
|
+
catch (er) {
|
|
40
|
+
if (er?.code === 'EPERM') {
|
|
41
|
+
try {
|
|
42
|
+
return chmodSync(path, 0o666);
|
|
43
|
+
}
|
|
44
|
+
catch (er2) {
|
|
45
|
+
if (er2?.code === 'ENOENT') {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
throw er;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else if (er?.code === 'ENOENT') {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
throw er;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
export const rimrafMoveRemove = async (path, opt) => {
|
|
58
|
+
if (opt?.signal?.aborted) {
|
|
59
|
+
throw opt.signal.reason;
|
|
60
|
+
}
|
|
61
|
+
try {
|
|
62
|
+
return await rimrafMoveRemoveDir(path, opt, await lstat(path));
|
|
63
|
+
}
|
|
64
|
+
catch (er) {
|
|
65
|
+
if (er?.code === 'ENOENT')
|
|
66
|
+
return true;
|
|
67
|
+
throw er;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const rimrafMoveRemoveDir = async (path, opt, ent) => {
|
|
71
|
+
if (opt?.signal?.aborted) {
|
|
72
|
+
throw opt.signal.reason;
|
|
73
|
+
}
|
|
74
|
+
if (!opt.tmp) {
|
|
75
|
+
return rimrafMoveRemoveDir(path, { ...opt, tmp: await defaultTmp(path) }, ent);
|
|
76
|
+
}
|
|
77
|
+
if (path === opt.tmp && parse(path).root !== path) {
|
|
78
|
+
throw new Error('cannot delete temp directory used for deletion');
|
|
79
|
+
}
|
|
80
|
+
const entries = ent.isDirectory() ? await readdirOrError(path) : null;
|
|
81
|
+
if (!Array.isArray(entries)) {
|
|
82
|
+
// this can only happen if lstat/readdir lied, or if the dir was
|
|
83
|
+
// swapped out with a file at just the right moment.
|
|
84
|
+
/* c8 ignore start */
|
|
85
|
+
if (entries) {
|
|
86
|
+
if (entries.code === 'ENOENT') {
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
if (entries.code !== 'ENOTDIR') {
|
|
90
|
+
throw entries;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/* c8 ignore stop */
|
|
94
|
+
if (opt.filter && !(await opt.filter(path, ent))) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
await ignoreENOENT(tmpUnlink(path, opt.tmp, unlinkFixEPERM));
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
const removedAll = (await Promise.all(entries.map(ent => rimrafMoveRemoveDir(resolve(path, ent.name), opt, ent)))).reduce((a, b) => a && b, true);
|
|
101
|
+
if (!removedAll) {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
// we don't ever ACTUALLY try to unlink /, because that can never work
|
|
105
|
+
// but when preserveRoot is false, we could be operating on it.
|
|
106
|
+
// No need to check if preserveRoot is not false.
|
|
107
|
+
if (opt.preserveRoot === false && path === parse(path).root) {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
if (opt.filter && !(await opt.filter(path, ent))) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
await ignoreENOENT(tmpUnlink(path, opt.tmp, rmdir));
|
|
114
|
+
return true;
|
|
115
|
+
};
|
|
116
|
+
const tmpUnlink = async (path, tmp, rm) => {
|
|
117
|
+
const tmpFile = resolve(tmp, uniqueFilename(path));
|
|
118
|
+
await rename(path, tmpFile);
|
|
119
|
+
return await rm(tmpFile);
|
|
120
|
+
};
|
|
121
|
+
export const rimrafMoveRemoveSync = (path, opt) => {
|
|
122
|
+
if (opt?.signal?.aborted) {
|
|
123
|
+
throw opt.signal.reason;
|
|
124
|
+
}
|
|
125
|
+
try {
|
|
126
|
+
return rimrafMoveRemoveDirSync(path, opt, lstatSync(path));
|
|
127
|
+
}
|
|
128
|
+
catch (er) {
|
|
129
|
+
if (er?.code === 'ENOENT')
|
|
130
|
+
return true;
|
|
131
|
+
throw er;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const rimrafMoveRemoveDirSync = (path, opt, ent) => {
|
|
135
|
+
if (opt?.signal?.aborted) {
|
|
136
|
+
throw opt.signal.reason;
|
|
137
|
+
}
|
|
138
|
+
if (!opt.tmp) {
|
|
139
|
+
return rimrafMoveRemoveDirSync(path, { ...opt, tmp: defaultTmpSync(path) }, ent);
|
|
140
|
+
}
|
|
141
|
+
const tmp = opt.tmp;
|
|
142
|
+
if (path === opt.tmp && parse(path).root !== path) {
|
|
143
|
+
throw new Error('cannot delete temp directory used for deletion');
|
|
144
|
+
}
|
|
145
|
+
const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null;
|
|
146
|
+
if (!Array.isArray(entries)) {
|
|
147
|
+
// this can only happen if lstat/readdir lied, or if the dir was
|
|
148
|
+
// swapped out with a file at just the right moment.
|
|
149
|
+
/* c8 ignore start */
|
|
150
|
+
if (entries) {
|
|
151
|
+
if (entries.code === 'ENOENT') {
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
if (entries.code !== 'ENOTDIR') {
|
|
155
|
+
throw entries;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/* c8 ignore stop */
|
|
159
|
+
if (opt.filter && !opt.filter(path, ent)) {
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
ignoreENOENTSync(() => tmpUnlinkSync(path, tmp, unlinkFixEPERMSync));
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
165
|
+
let removedAll = true;
|
|
166
|
+
for (const ent of entries) {
|
|
167
|
+
const p = resolve(path, ent.name);
|
|
168
|
+
removedAll = rimrafMoveRemoveDirSync(p, opt, ent) && removedAll;
|
|
169
|
+
}
|
|
170
|
+
if (!removedAll) {
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
if (opt.preserveRoot === false && path === parse(path).root) {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
if (opt.filter && !opt.filter(path, ent)) {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
ignoreENOENTSync(() => tmpUnlinkSync(path, tmp, rmdirSync));
|
|
180
|
+
return true;
|
|
181
|
+
};
|
|
182
|
+
const tmpUnlinkSync = (path, tmp, rmSync) => {
|
|
183
|
+
const tmpFile = resolve(tmp, uniqueFilename(path));
|
|
184
|
+
renameSync(path, tmpFile);
|
|
185
|
+
return rmSync(tmpFile);
|
|
186
|
+
};
|
|
187
|
+
//# sourceMappingURL=rimraf-move-remove.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|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afNative: (path: string, opt: RimrafAsyncOptions) => Promise<boolean>;
|
|
3
|
+
export declare const rimrafNativeSync: (path: string, opt: RimrafSyncOptions) => boolean;
|
|
4
|
+
//# sourceMappingURL=rimraf-native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rimraf-native.d.ts","sourceRoot":"","sources":["../../src/rimraf-native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AAIzD,eAAO,MAAM,YAAY,SACjB,MAAM,OACP,kBAAkB,KACtB,QAAQ,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,gBAAgB,SACrB,MAAM,OACP,iBAAiB,KACrB,OAOF,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { promises, rmSync } from './fs.js';
|
|
2
|
+
const { rm } = promises;
|
|
3
|
+
export const rimrafNative = async (path, opt) => {
|
|
4
|
+
await rm(path, {
|
|
5
|
+
...opt,
|
|
6
|
+
force: true,
|
|
7
|
+
recursive: true,
|
|
8
|
+
});
|
|
9
|
+
return true;
|
|
10
|
+
};
|
|
11
|
+
export const rimrafNativeSync = (path, opt) => {
|
|
12
|
+
rmSync(path, {
|
|
13
|
+
...opt,
|
|
14
|
+
force: true,
|
|
15
|
+
recursive: true,
|
|
16
|
+
});
|
|
17
|
+
return true;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=rimraf-native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rimraf-native.js","sourceRoot":"","sources":["../../src/rimraf-native.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAC1C,MAAM,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAA;AAEvB,MAAM,CAAC,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;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,IAAY,EACZ,GAAsB,EACb,EAAE;IACX,MAAM,CAAC,IAAI,EAAE;QACX,GAAG,GAAG;QACN,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;KAChB,CAAC,CAAA;IACF,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RimrafAsyncOptions, RimrafSyncOptions } from '.';
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rimraf-posix.d.ts","sourceRoot":"","sources":["../../src/rimraf-posix.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AAGzD,eAAO,MAAM,WAAW,SAAgB,MAAM,OAAO,kBAAkB,qBAUtE,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,MAAM,OAAO,iBAAiB,YAUnE,CAAA"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// the simple recursive removal, where unlink and rmdir are atomic
|
|
2
|
+
// Note that this approach does NOT work on Windows!
|
|
3
|
+
// We stat first and only unlink if the Dirent isn't a directory,
|
|
4
|
+
// because sunos will let root unlink a directory, and some
|
|
5
|
+
// SUPER weird breakage happens as a result.
|
|
6
|
+
import { lstatSync, promises, rmdirSync, unlinkSync } from './fs.js';
|
|
7
|
+
const { lstat, rmdir, unlink } = promises;
|
|
8
|
+
import { parse, resolve } from 'path';
|
|
9
|
+
import { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js';
|
|
10
|
+
import { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js';
|
|
11
|
+
export const rimrafPosix = async (path, opt) => {
|
|
12
|
+
if (opt?.signal?.aborted) {
|
|
13
|
+
throw opt.signal.reason;
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
return await rimrafPosixDir(path, opt, await lstat(path));
|
|
17
|
+
}
|
|
18
|
+
catch (er) {
|
|
19
|
+
if (er?.code === 'ENOENT')
|
|
20
|
+
return true;
|
|
21
|
+
throw er;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export const rimrafPosixSync = (path, opt) => {
|
|
25
|
+
if (opt?.signal?.aborted) {
|
|
26
|
+
throw opt.signal.reason;
|
|
27
|
+
}
|
|
28
|
+
try {
|
|
29
|
+
return rimrafPosixDirSync(path, opt, lstatSync(path));
|
|
30
|
+
}
|
|
31
|
+
catch (er) {
|
|
32
|
+
if (er?.code === 'ENOENT')
|
|
33
|
+
return true;
|
|
34
|
+
throw er;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const rimrafPosixDir = async (path, opt, ent) => {
|
|
38
|
+
if (opt?.signal?.aborted) {
|
|
39
|
+
throw opt.signal.reason;
|
|
40
|
+
}
|
|
41
|
+
const entries = ent.isDirectory() ? await readdirOrError(path) : null;
|
|
42
|
+
if (!Array.isArray(entries)) {
|
|
43
|
+
// this can only happen if lstat/readdir lied, or if the dir was
|
|
44
|
+
// swapped out with a file at just the right moment.
|
|
45
|
+
/* c8 ignore start */
|
|
46
|
+
if (entries) {
|
|
47
|
+
if (entries.code === 'ENOENT') {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
if (entries.code !== 'ENOTDIR') {
|
|
51
|
+
throw entries;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/* c8 ignore stop */
|
|
55
|
+
if (opt.filter && !(await opt.filter(path, ent))) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
await ignoreENOENT(unlink(path));
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
const removedAll = (await Promise.all(entries.map(ent => rimrafPosixDir(resolve(path, ent.name), opt, ent)))).reduce((a, b) => a && b, true);
|
|
62
|
+
if (!removedAll) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
// we don't ever ACTUALLY try to unlink /, because that can never work
|
|
66
|
+
// but when preserveRoot is false, we could be operating on it.
|
|
67
|
+
// No need to check if preserveRoot is not false.
|
|
68
|
+
if (opt.preserveRoot === false && path === parse(path).root) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
if (opt.filter && !(await opt.filter(path, ent))) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
await ignoreENOENT(rmdir(path));
|
|
75
|
+
return true;
|
|
76
|
+
};
|
|
77
|
+
const rimrafPosixDirSync = (path, opt, ent) => {
|
|
78
|
+
if (opt?.signal?.aborted) {
|
|
79
|
+
throw opt.signal.reason;
|
|
80
|
+
}
|
|
81
|
+
const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null;
|
|
82
|
+
if (!Array.isArray(entries)) {
|
|
83
|
+
// this can only happen if lstat/readdir lied, or if the dir was
|
|
84
|
+
// swapped out with a file at just the right moment.
|
|
85
|
+
/* c8 ignore start */
|
|
86
|
+
if (entries) {
|
|
87
|
+
if (entries.code === 'ENOENT') {
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
if (entries.code !== 'ENOTDIR') {
|
|
91
|
+
throw entries;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/* c8 ignore stop */
|
|
95
|
+
if (opt.filter && !opt.filter(path, ent)) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
ignoreENOENTSync(() => unlinkSync(path));
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
let removedAll = true;
|
|
102
|
+
for (const ent of entries) {
|
|
103
|
+
const p = resolve(path, ent.name);
|
|
104
|
+
removedAll = rimrafPosixDirSync(p, opt, ent) && removedAll;
|
|
105
|
+
}
|
|
106
|
+
if (opt.preserveRoot === false && path === parse(path).root) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
if (!removedAll) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
if (opt.filter && !opt.filter(path, ent)) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
ignoreENOENTSync(() => rmdirSync(path));
|
|
116
|
+
return true;
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=rimraf-posix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAA;AAEzC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAErC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAI1E,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAEnE,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,EAAE,IAAY,EAAE,GAAuB,EAAE,EAAE;IACzE,IAAI,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;QACxB,MAAM,GAAG,CAAC,MAAM,CAAC,MAAM,CAAA;KACxB;IACD,IAAI;QACF,OAAO,MAAM,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,IAAI,CAAC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AA;AACb,CAAC,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RimrafAsyncOptions, RimrafSyncOptions } from '.';
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rimraf-windows.d.ts","sourceRoot":"","sources":["../../src/rimraf-windows.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAA;AA2DzD,eAAO,MAAM,aAAa,SAAgB,MAAM,OAAO,kBAAkB,qBAUxE,CAAA;AAED,eAAO,MAAM,iBAAiB,SAAU,MAAM,OAAO,iBAAiB,YAUrE,CAAA"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// This is the same as rimrafPosix, with the following changes:
|
|
2
|
+
//
|
|
3
|
+
// 1. EBUSY, ENFILE, EMFILE trigger retries and/or exponential backoff
|
|
4
|
+
// 2. All non-directories are removed first and then all directories are
|
|
5
|
+
// removed in a second sweep.
|
|
6
|
+
// 3. If we hit ENOTEMPTY in the second sweep, fall back to move-remove on
|
|
7
|
+
// the that folder.
|
|
8
|
+
//
|
|
9
|
+
// Note: "move then remove" is 2-10 times slower, and just as unreliable.
|
|
10
|
+
import { parse, resolve } from 'path';
|
|
11
|
+
import { fixEPERM, fixEPERMSync } from './fix-eperm.js';
|
|
12
|
+
import { lstatSync, promises, rmdirSync, unlinkSync } from './fs.js';
|
|
13
|
+
import { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js';
|
|
14
|
+
import { readdirOrError, readdirOrErrorSync } from './readdir-or-error.js';
|
|
15
|
+
import { retryBusy, retryBusySync } from './retry-busy.js';
|
|
16
|
+
import { rimrafMoveRemove, rimrafMoveRemoveSync } from './rimraf-move-remove.js';
|
|
17
|
+
const { unlink, rmdir, lstat } = promises;
|
|
18
|
+
const rimrafWindowsFile = retryBusy(fixEPERM(unlink));
|
|
19
|
+
const rimrafWindowsFileSync = retryBusySync(fixEPERMSync(unlinkSync));
|
|
20
|
+
const rimrafWindowsDirRetry = retryBusy(fixEPERM(rmdir));
|
|
21
|
+
const rimrafWindowsDirRetrySync = retryBusySync(fixEPERMSync(rmdirSync));
|
|
22
|
+
const rimrafWindowsDirMoveRemoveFallback = async (path, opt) => {
|
|
23
|
+
/* c8 ignore start */
|
|
24
|
+
if (opt?.signal?.aborted) {
|
|
25
|
+
throw opt.signal.reason;
|
|
26
|
+
}
|
|
27
|
+
/* c8 ignore stop */
|
|
28
|
+
// already filtered, remove from options so we don't call unnecessarily
|
|
29
|
+
const { filter, ...options } = opt;
|
|
30
|
+
try {
|
|
31
|
+
return await rimrafWindowsDirRetry(path, options);
|
|
32
|
+
}
|
|
33
|
+
catch (er) {
|
|
34
|
+
if (er?.code === 'ENOTEMPTY') {
|
|
35
|
+
return await rimrafMoveRemove(path, options);
|
|
36
|
+
}
|
|
37
|
+
throw er;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const rimrafWindowsDirMoveRemoveFallbackSync = (path, opt) => {
|
|
41
|
+
if (opt?.signal?.aborted) {
|
|
42
|
+
throw opt.signal.reason;
|
|
43
|
+
}
|
|
44
|
+
// already filtered, remove from options so we don't call unnecessarily
|
|
45
|
+
const { filter, ...options } = opt;
|
|
46
|
+
try {
|
|
47
|
+
return rimrafWindowsDirRetrySync(path, options);
|
|
48
|
+
}
|
|
49
|
+
catch (er) {
|
|
50
|
+
const fer = er;
|
|
51
|
+
if (fer?.code === 'ENOTEMPTY') {
|
|
52
|
+
return rimrafMoveRemoveSync(path, options);
|
|
53
|
+
}
|
|
54
|
+
throw er;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const START = Symbol('start');
|
|
58
|
+
const CHILD = Symbol('child');
|
|
59
|
+
const FINISH = Symbol('finish');
|
|
60
|
+
export const rimrafWindows = async (path, opt) => {
|
|
61
|
+
if (opt?.signal?.aborted) {
|
|
62
|
+
throw opt.signal.reason;
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
return await rimrafWindowsDir(path, opt, await lstat(path), START);
|
|
66
|
+
}
|
|
67
|
+
catch (er) {
|
|
68
|
+
if (er?.code === 'ENOENT')
|
|
69
|
+
return true;
|
|
70
|
+
throw er;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
export const rimrafWindowsSync = (path, opt) => {
|
|
74
|
+
if (opt?.signal?.aborted) {
|
|
75
|
+
throw opt.signal.reason;
|
|
76
|
+
}
|
|
77
|
+
try {
|
|
78
|
+
return rimrafWindowsDirSync(path, opt, lstatSync(path), START);
|
|
79
|
+
}
|
|
80
|
+
catch (er) {
|
|
81
|
+
if (er?.code === 'ENOENT')
|
|
82
|
+
return true;
|
|
83
|
+
throw er;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const rimrafWindowsDir = async (path, opt, ent, state = START) => {
|
|
87
|
+
if (opt?.signal?.aborted) {
|
|
88
|
+
throw opt.signal.reason;
|
|
89
|
+
}
|
|
90
|
+
const entries = ent.isDirectory() ? await readdirOrError(path) : null;
|
|
91
|
+
if (!Array.isArray(entries)) {
|
|
92
|
+
// this can only happen if lstat/readdir lied, or if the dir was
|
|
93
|
+
// swapped out with a file at just the right moment.
|
|
94
|
+
/* c8 ignore start */
|
|
95
|
+
if (entries) {
|
|
96
|
+
if (entries.code === 'ENOENT') {
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
if (entries.code !== 'ENOTDIR') {
|
|
100
|
+
throw entries;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/* c8 ignore stop */
|
|
104
|
+
if (opt.filter && !(await opt.filter(path, ent))) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
// is a file
|
|
108
|
+
await ignoreENOENT(rimrafWindowsFile(path, opt));
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
const s = state === START ? CHILD : state;
|
|
112
|
+
const removedAll = (await Promise.all(entries.map(ent => rimrafWindowsDir(resolve(path, ent.name), opt, ent, s)))).reduce((a, b) => a && b, true);
|
|
113
|
+
if (state === START) {
|
|
114
|
+
return rimrafWindowsDir(path, opt, ent, FINISH);
|
|
115
|
+
}
|
|
116
|
+
else if (state === FINISH) {
|
|
117
|
+
if (opt.preserveRoot === false && path === parse(path).root) {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
if (!removedAll) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
if (opt.filter && !(await opt.filter(path, ent))) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
await ignoreENOENT(rimrafWindowsDirMoveRemoveFallback(path, opt));
|
|
127
|
+
}
|
|
128
|
+
return true;
|
|
129
|
+
};
|
|
130
|
+
const rimrafWindowsDirSync = (path, opt, ent, state = START) => {
|
|
131
|
+
const entries = ent.isDirectory() ? readdirOrErrorSync(path) : null;
|
|
132
|
+
if (!Array.isArray(entries)) {
|
|
133
|
+
// this can only happen if lstat/readdir lied, or if the dir was
|
|
134
|
+
// swapped out with a file at just the right moment.
|
|
135
|
+
/* c8 ignore start */
|
|
136
|
+
if (entries) {
|
|
137
|
+
if (entries.code === 'ENOENT') {
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
if (entries.code !== 'ENOTDIR') {
|
|
141
|
+
throw entries;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/* c8 ignore stop */
|
|
145
|
+
if (opt.filter && !opt.filter(path, ent)) {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
// is a file
|
|
149
|
+
ignoreENOENTSync(() => rimrafWindowsFileSync(path, opt));
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
let removedAll = true;
|
|
153
|
+
for (const ent of entries) {
|
|
154
|
+
const s = state === START ? CHILD : state;
|
|
155
|
+
const p = resolve(path, ent.name);
|
|
156
|
+
removedAll = rimrafWindowsDirSync(p, opt, ent, s) && removedAll;
|
|
157
|
+
}
|
|
158
|
+
if (state === START) {
|
|
159
|
+
return rimrafWindowsDirSync(path, opt, ent, FINISH);
|
|
160
|
+
}
|
|
161
|
+
else if (state === FINISH) {
|
|
162
|
+
if (opt.preserveRoot === false && path === parse(path).root) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
if (!removedAll) {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
if (opt.filter && !opt.filter(path, ent)) {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
ignoreENOENTSync(() => {
|
|
172
|
+
rimrafWindowsDirMoveRemoveFallbackSync(path, opt);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return true;
|
|
176
|
+
};
|
|
177
|
+
//# sourceMappingURL=rimraf-windows.js.map
|