forked from olcxjas-softworks/LarpixClient
Add capacitorjs runtime
This commit is contained in:
parent
d0ece489ee
commit
f90c0e6c40
8362 changed files with 1502407 additions and 1 deletions
55
node_modules/rimraf/LICENSE.md
generated
vendored
Normal file
55
node_modules/rimraf/LICENSE.md
generated
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
# Blue Oak Model License
|
||||
|
||||
Version 1.0.0
|
||||
|
||||
## Purpose
|
||||
|
||||
This license gives everyone as much permission to work with
|
||||
this software as possible, while protecting contributors
|
||||
from liability.
|
||||
|
||||
## Acceptance
|
||||
|
||||
In order to receive this license, you must agree to its
|
||||
rules. The rules of this license are both obligations
|
||||
under that agreement and conditions to your license.
|
||||
You must not do anything with this software that triggers
|
||||
a rule that you cannot or will not follow.
|
||||
|
||||
## Copyright
|
||||
|
||||
Each contributor licenses you to do everything with this
|
||||
software that would otherwise infringe that contributor's
|
||||
copyright in it.
|
||||
|
||||
## Notices
|
||||
|
||||
You must ensure that everyone who gets a copy of
|
||||
any part of this software from you, with or without
|
||||
changes, also gets the text of this license or a link to
|
||||
<https://blueoakcouncil.org/license/1.0.0>.
|
||||
|
||||
## Excuse
|
||||
|
||||
If anyone notifies you in writing that you have not
|
||||
complied with [Notices](#notices), you can keep your
|
||||
license by taking all practical steps to comply within 30
|
||||
days after the notice. If you do not do so, your license
|
||||
ends immediately.
|
||||
|
||||
## Patent
|
||||
|
||||
Each contributor licenses you to do everything with this
|
||||
software that would otherwise infringe any patent claims
|
||||
they can license or become able to license.
|
||||
|
||||
## Reliability
|
||||
|
||||
No contributor can revoke this license.
|
||||
|
||||
## No Liability
|
||||
|
||||
***As far as the law allows, this software comes as is,
|
||||
without any warranty or condition, and no contributor
|
||||
will be liable to anyone for any damages related to this
|
||||
software or this license, under any kind of legal claim.***
|
||||
255
node_modules/rimraf/README.md
generated
vendored
Normal file
255
node_modules/rimraf/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
The [UNIX command](<http://en.wikipedia.org/wiki/Rm_(Unix)>) `rm -rf` for node
|
||||
in a cross-platform implementation.
|
||||
|
||||
Install with `npm install rimraf`.
|
||||
|
||||
> [!CAUTION]
|
||||
>
|
||||
> ## Please Be Safe, this tool deletes and moves stuff, by design
|
||||
>
|
||||
> The _intended purpose_ of this tool is to remove files and
|
||||
> directories from the filesystem, aggressively and recursively
|
||||
> removing all items that it can find under a given target.
|
||||
>
|
||||
> It goes without saying that you _must not pass untrusted input
|
||||
> to this function or CLI tool_, just as you would not to the
|
||||
> `rm(1)` command or the `unlink(2)` function. It is very
|
||||
> challenging to guarantee that _any_ user input will be safe to
|
||||
> remove recursively in this way.
|
||||
>
|
||||
> Furthermore, note that if you allow untrusted parties to
|
||||
> provide arguments to the `rimraf` command line tool, they may
|
||||
> also specify the `--tmp=<dir>` folder used by the
|
||||
> `--impl=move-remove` strategy, which can move files to an
|
||||
> arbitrary place on disk.
|
||||
>
|
||||
> Because the intended purpose of this tool is the permanent
|
||||
> destruction of filesystem entries, any security reports that
|
||||
> rely on untrusted input being passed to the function or command
|
||||
> line tool will be rejected.
|
||||
>
|
||||
> **It is your responsibility as a user to never pass untrusted
|
||||
> user input to this module, or your system can be destroyed or
|
||||
> compromised.**
|
||||
|
||||
## Major Changes
|
||||
|
||||
### v5 to v6
|
||||
|
||||
- Require node `20` or `>=22`
|
||||
- Add `--version` to CLI
|
||||
|
||||
### v4 to v5
|
||||
|
||||
- There is no default export anymore. Import the functions directly
|
||||
using, e.g., `import { rimrafSync } from 'rimraf'`.
|
||||
|
||||
### v3 to v4
|
||||
|
||||
- The function returns a `Promise` instead of taking a callback.
|
||||
- Globbing requires the `--glob` CLI option or `glob` option property
|
||||
to be set. (Removed in 4.0 and 4.1, opt-in support added in 4.2.)
|
||||
- Functions take arrays of paths, as well as a single path.
|
||||
- Native implementation used by default when available, except on
|
||||
Windows, where this implementation is faster and more reliable.
|
||||
- New implementation on Windows, falling back to "move then
|
||||
remove" strategy when exponential backoff for `EBUSY` fails to
|
||||
resolve the situation.
|
||||
- Simplified implementation on POSIX, since the Windows
|
||||
affordances are not necessary there.
|
||||
- As of 4.3, return/resolve value is boolean instead of undefined.
|
||||
|
||||
## API
|
||||
|
||||
Hybrid module, load either with `import` or `require()`.
|
||||
|
||||
```js
|
||||
// 'rimraf' export is the one you probably want, but other
|
||||
// strategies exported as well.
|
||||
import { rimraf, rimrafSync, native, nativeSync } from 'rimraf'
|
||||
// or
|
||||
const { rimraf, rimrafSync, native, nativeSync } = require('rimraf')
|
||||
```
|
||||
|
||||
All removal functions return a boolean indicating that all
|
||||
entries were successfully removed.
|
||||
|
||||
The only case in which this will not return `true` is if
|
||||
something was omitted from the removal via a `filter` option.
|
||||
|
||||
### `rimraf(f, [opts]) -> Promise`
|
||||
|
||||
This first parameter is a path or array of paths. The second
|
||||
argument is an options object.
|
||||
|
||||
Options:
|
||||
|
||||
- `preserveRoot`: If set to boolean `false`, then allow the
|
||||
recursive removal of the root directory. Otherwise, this is
|
||||
not allowed.
|
||||
- `tmp`: Windows only. Temp folder to place files and
|
||||
folders for the "move then remove" fallback. Must be on the
|
||||
same physical device as the path being deleted. Defaults to
|
||||
`os.tmpdir()` when that is on the same drive letter as the path
|
||||
being deleted, or `${drive}:\temp` if present, or `${drive}:\`
|
||||
if not.
|
||||
- `maxRetries`: Windows and Native only. Maximum number of
|
||||
retry attempts in case of `EBUSY`, `EMFILE`, and `ENFILE`
|
||||
errors. Default `10` for Windows implementation, `0` for Native
|
||||
implementation.
|
||||
- `backoff`: Windows only. Rate of exponential backoff for async
|
||||
removal in case of `EBUSY`, `EMFILE`, and `ENFILE` errors.
|
||||
Should be a number greater than 1. Default `1.2`
|
||||
- `maxBackoff`: Windows only. Maximum total backoff time in ms to
|
||||
attempt asynchronous retries in case of `EBUSY`, `EMFILE`, and
|
||||
`ENFILE` errors. Default `200`. With the default `1.2` backoff
|
||||
rate, this results in 14 retries, with the final retry being
|
||||
delayed 33ms.
|
||||
- `retryDelay`: Native only. Time to wait between retries, using
|
||||
linear backoff. Default `100`.
|
||||
- `signal` Pass in an AbortSignal to cancel the directory
|
||||
removal. This is useful when removing large folder structures,
|
||||
if you'd like to limit the time spent.
|
||||
|
||||
Using a `signal` option prevents the use of Node's built-in
|
||||
`fs.rm` because that implementation does not support abort
|
||||
signals.
|
||||
|
||||
- `glob` Boolean flag to treat path as glob pattern, or an object
|
||||
specifying [`glob` options](https://github.com/isaacs/node-glob).
|
||||
- `filter` Method that returns a boolean indicating whether that
|
||||
path should be deleted. With async `rimraf` methods, this may
|
||||
return a Promise that resolves to a boolean. (Since Promises
|
||||
are truthy, returning a Promise from a sync filter is the same
|
||||
as just not filtering anything.)
|
||||
|
||||
The first argument to the filter is the path string. The
|
||||
second argument is either a `Dirent` or `Stats` object for that
|
||||
path. (The first path explored will be a `Stats`, the rest
|
||||
will be `Dirent`.)
|
||||
|
||||
If a filter method is provided, it will _only_ remove entries
|
||||
if the filter returns (or resolves to) a truthy value. Omitting
|
||||
a directory will still allow its children to be removed, unless
|
||||
they are also filtered out, but any parents of a filtered entry
|
||||
will not be removed, since the directory will not be empty in
|
||||
that case.
|
||||
|
||||
Using a filter method prevents the use of Node's built-in
|
||||
`fs.rm` because that implementation does not support filtering.
|
||||
|
||||
Any other options are provided to the native Node.js `fs.rm` implementation
|
||||
when that is used.
|
||||
|
||||
This will attempt to choose the best implementation, based on the Node.js
|
||||
version and `process.platform`. To force a specific implementation, use
|
||||
one of the other functions provided.
|
||||
|
||||
### `rimraf.sync(f, [opts])` <br> `rimraf.rimrafSync(f, [opts])`
|
||||
|
||||
Synchronous form of `rimraf()`
|
||||
|
||||
Note that, unlike many file system operations, the synchronous form will
|
||||
typically be significantly _slower_ than the async form, because recursive
|
||||
deletion is extremely parallelizable.
|
||||
|
||||
### `rimraf.native(f, [opts])`
|
||||
|
||||
Uses the built-in `fs.rm` implementation that Node.js provides. This is
|
||||
used by default on Node.js versions greater than or equal to `14.14.0`.
|
||||
|
||||
### `rimraf.native.sync(f, [opts])` <br> `rimraf.nativeSync(f, [opts])`
|
||||
|
||||
Synchronous form of `rimraf.native`
|
||||
|
||||
### `rimraf.manual(f, [opts])`
|
||||
|
||||
Use the JavaScript implementation appropriate for your operating system.
|
||||
|
||||
### `rimraf.manual.sync(f, [opts])` <br> `rimraf.manualSync(f, opts)`
|
||||
|
||||
Synchronous form of `rimraf.manual()`
|
||||
|
||||
### `rimraf.windows(f, [opts])`
|
||||
|
||||
JavaScript implementation of file removal appropriate for Windows
|
||||
platforms. Works around `unlink` and `rmdir` not being atomic
|
||||
operations, and `EPERM` when deleting files with certain
|
||||
permission modes.
|
||||
|
||||
First deletes all non-directory files within the tree, and then
|
||||
removes all directories, which should ideally be empty by that
|
||||
time. When an `ENOTEMPTY` is raised in the second pass, falls
|
||||
back to the `rimraf.moveRemove` strategy as needed.
|
||||
|
||||
### `rimraf.windows.sync(path, [opts])` <br> `rimraf.windowsSync(path, [opts])`
|
||||
|
||||
Synchronous form of `rimraf.windows()`
|
||||
|
||||
### `rimraf.moveRemove(path, [opts])`
|
||||
|
||||
Moves all files and folders to the parent directory of `path`
|
||||
with a temporary filename prior to attempting to remove them.
|
||||
|
||||
Note that, in cases where the operation fails, this _may_ leave
|
||||
files lying around in the parent directory with names like
|
||||
`.file-basename.txt.0.123412341`. Until the Windows kernel
|
||||
provides a way to perform atomic `unlink` and `rmdir` operations,
|
||||
this is, unfortunately, unavoidable.
|
||||
|
||||
To move files to a different temporary directory other than the
|
||||
parent, provide `opts.tmp`. Note that this _must_ be on the same
|
||||
physical device as the folder being deleted, or else the
|
||||
operation will fail.
|
||||
|
||||
This is the slowest strategy, but most reliable on Windows
|
||||
platforms. Used as a last-ditch fallback by `rimraf.windows()`.
|
||||
|
||||
### `rimraf.moveRemove.sync(path, [opts])` <br> `rimraf.moveRemoveSync(path, [opts])`
|
||||
|
||||
Synchronous form of `rimraf.moveRemove()`
|
||||
|
||||
### Command Line Interface
|
||||
|
||||
```
|
||||
rimraf version 6.0.1
|
||||
|
||||
Usage: rimraf <path> [<path> ...]
|
||||
Deletes all files and folders at "path", recursively.
|
||||
|
||||
Options:
|
||||
-- Treat all subsequent arguments as paths
|
||||
-h --help Display this usage info
|
||||
--version Display version
|
||||
--preserve-root Do not remove '/' recursively (default)
|
||||
--no-preserve-root Do not treat '/' specially
|
||||
-G --no-glob Treat arguments as literal paths, not globs (default)
|
||||
-g --glob Treat arguments as glob patterns
|
||||
-v --verbose Be verbose when deleting files, showing them as
|
||||
they are removed. Not compatible with --impl=native
|
||||
-V --no-verbose Be silent when deleting files, showing nothing as
|
||||
they are removed (default)
|
||||
-i --interactive Ask for confirmation before deleting anything
|
||||
Not compatible with --impl=native
|
||||
-I --no-interactive Do not ask for confirmation before deleting
|
||||
|
||||
--impl=<type> Specify the implementation to use:
|
||||
rimraf: choose the best option (default)
|
||||
native: the built-in implementation in Node.js
|
||||
manual: the platform-specific JS implementation
|
||||
posix: the Posix JS implementation
|
||||
windows: the Windows JS implementation (falls back to
|
||||
move-remove on ENOTEMPTY)
|
||||
move-remove: a slow reliable Windows fallback
|
||||
|
||||
Implementation-specific options:
|
||||
--tmp=<path> Temp file folder for 'move-remove' implementation
|
||||
--max-retries=<n> maxRetries for 'native' and 'windows' implementations
|
||||
--retry-delay=<n> retryDelay for 'native' implementation, default 100
|
||||
--backoff=<n> Exponential backoff factor for retries (default: 1.2)
|
||||
```
|
||||
|
||||
## mkdirp
|
||||
|
||||
If you need to _create_ a directory recursively, check out
|
||||
[mkdirp](https://github.com/isaacs/node-mkdirp).
|
||||
3
node_modules/rimraf/dist/commonjs/default-tmp.d.ts
generated
vendored
Normal file
3
node_modules/rimraf/dist/commonjs/default-tmp.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export declare const defaultTmp: (path: string) => Promise<string>;
|
||||
export declare const defaultTmpSync: (path: string) => string;
|
||||
//# sourceMappingURL=default-tmp.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/default-tmp.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/default-tmp.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"default-tmp.d.ts","sourceRoot":"","sources":["../../src/default-tmp.ts"],"names":[],"mappings":"AAiEA,eAAO,MAAM,UAAU,SApCc,MAAM,oBAqCuB,CAAA;AAClE,eAAO,MAAM,cAAc,SAtBQ,MAAM,WAuBiC,CAAA"}
|
||||
58
node_modules/rimraf/dist/commonjs/default-tmp.js
generated
vendored
Normal file
58
node_modules/rimraf/dist/commonjs/default-tmp.js
generated
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.defaultTmpSync = exports.defaultTmp = void 0;
|
||||
// The default temporary folder location for use in the windows algorithm.
|
||||
// It's TEMPting to use dirname(path), since that's guaranteed to be on the
|
||||
// same device. However, this means that:
|
||||
// rimraf(path).then(() => rimraf(dirname(path)))
|
||||
// will often fail with EBUSY, because the parent dir contains
|
||||
// marked-for-deletion directory entries (which do not show up in readdir).
|
||||
// The approach here is to use os.tmpdir() if it's on the same drive letter,
|
||||
// or resolve(path, '\\temp') if it exists, or the root of the drive if not.
|
||||
// On Posix (not that you'd be likely to use the windows algorithm there),
|
||||
// it uses os.tmpdir() always.
|
||||
const os_1 = require("os");
|
||||
const path_1 = require("path");
|
||||
const fs_js_1 = require("./fs.js");
|
||||
const { stat } = fs_js_1.promises;
|
||||
const isDirSync = (path) => {
|
||||
try {
|
||||
return (0, fs_js_1.statSync)(path).isDirectory();
|
||||
}
|
||||
catch {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
const isDir = (path) => stat(path).then(st => st.isDirectory(), () => false);
|
||||
const win32DefaultTmp = async (path) => {
|
||||
const { root } = (0, path_1.parse)(path);
|
||||
const tmp = (0, os_1.tmpdir)();
|
||||
const { root: tmpRoot } = (0, path_1.parse)(tmp);
|
||||
if (root.toLowerCase() === tmpRoot.toLowerCase()) {
|
||||
return tmp;
|
||||
}
|
||||
const driveTmp = (0, path_1.resolve)(root, '/temp');
|
||||
if (await isDir(driveTmp)) {
|
||||
return driveTmp;
|
||||
}
|
||||
return root;
|
||||
};
|
||||
const win32DefaultTmpSync = (path) => {
|
||||
const { root } = (0, path_1.parse)(path);
|
||||
const tmp = (0, os_1.tmpdir)();
|
||||
const { root: tmpRoot } = (0, path_1.parse)(tmp);
|
||||
if (root.toLowerCase() === tmpRoot.toLowerCase()) {
|
||||
return tmp;
|
||||
}
|
||||
const driveTmp = (0, path_1.resolve)(root, '/temp');
|
||||
if (isDirSync(driveTmp)) {
|
||||
return driveTmp;
|
||||
}
|
||||
return root;
|
||||
};
|
||||
// eslint-disable-next-line @typescript-eslint/require-await
|
||||
const posixDefaultTmp = async () => (0, os_1.tmpdir)();
|
||||
const posixDefaultTmpSync = () => (0, os_1.tmpdir)();
|
||||
exports.defaultTmp = process.platform === 'win32' ? win32DefaultTmp : posixDefaultTmp;
|
||||
exports.defaultTmpSync = process.platform === 'win32' ? win32DefaultTmpSync : posixDefaultTmpSync;
|
||||
//# sourceMappingURL=default-tmp.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/default-tmp.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/default-tmp.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"default-tmp.js","sourceRoot":"","sources":["../../src/default-tmp.ts"],"names":[],"mappings":";;;AAAA,0EAA0E;AAC1E,2EAA2E;AAC3E,0CAA0C;AAC1C,iDAAiD;AACjD,8DAA8D;AAC9D,2EAA2E;AAC3E,4EAA4E;AAC5E,4EAA4E;AAC5E,0EAA0E;AAC1E,8BAA8B;AAC9B,2BAA2B;AAC3B,+BAAqC;AACrC,mCAA4C;AAC5C,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAQ,CAAA;AAEzB,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAE;IACjC,IAAI,CAAC;QACH,OAAO,IAAA,gBA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D,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,MAAM,QAAQ,GAAG,IAAA,cAAO,EAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACvC,IAAI,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxB,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,4DAA4D;AAC5D,MAAM,eAAe,GAAG,KAAK,IAAI,EAAE,CAAC,IAAA,WAAM,GAAE,CAAA;AAC5C,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,IAAA,WAAM,GAAE,CAAA;AAE7B,QAAA,UAAU,GACrB,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAA;AACrD,QAAA,cAAc,GACzB,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAA","sourcesContent":["// The default temporary folder location for use in the windows algorithm.\n// It's TEMPting to use dirname(path), since that's guaranteed to be on the\n// same device. However, this means that:\n// rimraf(path).then(() => rimraf(dirname(path)))\n// will often fail with EBUSY, because the parent dir contains\n// marked-for-deletion directory entries (which do not show up in readdir).\n// The approach here is to use os.tmpdir() if it's on the same drive letter,\n// or resolve(path, '\\\\temp') if it exists, or the root of the drive if not.\n// On Posix (not that you'd be likely to use the windows algorithm there),\n// it uses os.tmpdir() always.\nimport { tmpdir } from 'os'\nimport { parse, resolve } from 'path'\nimport { promises, statSync } from './fs.js'\nconst { stat } = promises\n\nconst isDirSync = (path: string) => {\n try {\n return statSync(path).isDirectory()\n } catch {\n return false\n }\n}\n\nconst isDir = (path: string) =>\n stat(path).then(\n st => st.isDirectory(),\n () => false,\n )\n\nconst win32DefaultTmp = async (path: string) => {\n const { root } = parse(path)\n const tmp = tmpdir()\n const { root: tmpRoot } = parse(tmp)\n if (root.toLowerCase() === tmpRoot.toLowerCase()) {\n return tmp\n }\n\n const driveTmp = resolve(root, '/temp')\n if (await isDir(driveTmp)) {\n return driveTmp\n }\n\n return root\n}\n\nconst win32DefaultTmpSync = (path: string) => {\n const { root } = parse(path)\n const tmp = tmpdir()\n const { root: tmpRoot } = parse(tmp)\n if (root.toLowerCase() === tmpRoot.toLowerCase()) {\n return tmp\n }\n\n const driveTmp = resolve(root, '/temp')\n if (isDirSync(driveTmp)) {\n return driveTmp\n }\n\n return root\n}\n\n// eslint-disable-next-line @typescript-eslint/require-await\nconst posixDefaultTmp = async () => tmpdir()\nconst posixDefaultTmpSync = () => tmpdir()\n\nexport const defaultTmp =\n process.platform === 'win32' ? win32DefaultTmp : posixDefaultTmp\nexport const defaultTmpSync =\n process.platform === 'win32' ? win32DefaultTmpSync : posixDefaultTmpSync\n"]}
|
||||
6
node_modules/rimraf/dist/commonjs/error.d.ts
generated
vendored
Normal file
6
node_modules/rimraf/dist/commonjs/error.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export declare const isFsError: (o: unknown) => o is NodeJS.ErrnoException & {
|
||||
code: string;
|
||||
path: string;
|
||||
};
|
||||
export declare const errorCode: (er: unknown) => unknown;
|
||||
//# sourceMappingURL=error.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/error.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/error.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS,GACpB,GAAG,OAAO,KACT,CAAC,IAAI,MAAM,CAAC,cAAc,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACkD,CAAA;AAEhE,eAAO,MAAM,SAAS,GAAI,IAAI,OAAO,YACmB,CAAA"}
|
||||
10
node_modules/rimraf/dist/commonjs/error.js
generated
vendored
Normal file
10
node_modules/rimraf/dist/commonjs/error.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.errorCode = exports.isFsError = void 0;
|
||||
const isRecord = (o) => !!o && typeof o === 'object';
|
||||
const hasString = (o, key) => key in o && typeof o[key] === 'string';
|
||||
const isFsError = (o) => isRecord(o) && hasString(o, 'code') && hasString(o, 'path');
|
||||
exports.isFsError = isFsError;
|
||||
const errorCode = (er) => isRecord(er) && hasString(er, 'code') ? er.code : null;
|
||||
exports.errorCode = errorCode;
|
||||
//# sourceMappingURL=error.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/error.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/error.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":";;;AAAA,MAAM,QAAQ,GAAG,CAAC,CAAU,EAAgC,EAAE,CAC5D,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAA;AAE9B,MAAM,SAAS,GAAG,CAAC,CAA0B,EAAE,GAAW,EAAE,EAAE,CAC5D,GAAG,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAA;AAEjC,MAAM,SAAS,GAAG,CACvB,CAAU,EAIV,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;AALnD,QAAA,SAAS,aAK0C;AAEzD,MAAM,SAAS,GAAG,CAAC,EAAW,EAAE,EAAE,CACvC,QAAQ,CAAC,EAAE,CAAC,IAAI,SAAS,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;AAD3C,QAAA,SAAS,aACkC","sourcesContent":["const isRecord = (o: unknown): o is Record<string, unknown> =>\n !!o && typeof o === 'object'\n\nconst hasString = (o: Record<string, unknown>, key: string) =>\n key in o && typeof o[key] === 'string'\n\nexport const isFsError = (\n o: unknown,\n): o is NodeJS.ErrnoException & {\n code: string\n path: string\n} => isRecord(o) && hasString(o, 'code') && hasString(o, 'path')\n\nexport const errorCode = (er: unknown) =>\n isRecord(er) && hasString(er, 'code') ? er.code : null\n"]}
|
||||
3
node_modules/rimraf/dist/commonjs/fix-eperm.d.ts
generated
vendored
Normal file
3
node_modules/rimraf/dist/commonjs/fix-eperm.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export declare const fixEPERM: (fn: (path: string) => Promise<unknown>) => (path: string) => Promise<void>;
|
||||
export declare const fixEPERMSync: (fn: (path: string) => unknown) => (path: string) => void;
|
||||
//# sourceMappingURL=fix-eperm.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/fix-eperm.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/fix-eperm.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"fix-eperm.d.ts","sourceRoot":"","sources":["../../src/fix-eperm.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,GAClB,IAAI,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,MAChC,MAAM,MAAM,KAAG,OAAO,CAAC,IAAI,CAiBjC,CAAA;AAEH,eAAO,MAAM,YAAY,GACtB,IAAI,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,MAC7B,MAAM,MAAM,KAAG,IAYf,CAAA"}
|
||||
38
node_modules/rimraf/dist/commonjs/fix-eperm.js
generated
vendored
Normal file
38
node_modules/rimraf/dist/commonjs/fix-eperm.js
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.fixEPERMSync = exports.fixEPERM = void 0;
|
||||
const error_js_1 = require("./error.js");
|
||||
const fs_js_1 = require("./fs.js");
|
||||
const ignore_enoent_js_1 = require("./ignore-enoent.js");
|
||||
const { chmod } = fs_js_1.promises;
|
||||
const fixEPERM = (fn) => async (path) => {
|
||||
try {
|
||||
return void (await (0, ignore_enoent_js_1.ignoreENOENT)(fn(path)));
|
||||
}
|
||||
catch (er) {
|
||||
if ((0, error_js_1.errorCode)(er) === 'EPERM') {
|
||||
if (!(await (0, ignore_enoent_js_1.ignoreENOENT)(chmod(path, 0o666).then(() => true), er))) {
|
||||
return;
|
||||
}
|
||||
return void (await fn(path));
|
||||
}
|
||||
throw er;
|
||||
}
|
||||
};
|
||||
exports.fixEPERM = fixEPERM;
|
||||
const fixEPERMSync = (fn) => (path) => {
|
||||
try {
|
||||
return void (0, ignore_enoent_js_1.ignoreENOENTSync)(() => fn(path));
|
||||
}
|
||||
catch (er) {
|
||||
if ((0, error_js_1.errorCode)(er) === 'EPERM') {
|
||||
if (!(0, ignore_enoent_js_1.ignoreENOENTSync)(() => ((0, fs_js_1.chmodSync)(path, 0o666), true), er)) {
|
||||
return;
|
||||
}
|
||||
return void fn(path);
|
||||
}
|
||||
throw er;
|
||||
}
|
||||
};
|
||||
exports.fixEPERMSync = fixEPERMSync;
|
||||
//# sourceMappingURL=fix-eperm.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/fix-eperm.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/fix-eperm.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"fix-eperm.js","sourceRoot":"","sources":["../../src/fix-eperm.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,mCAA6C;AAC7C,yDAAmE;AACnE,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAQ,CAAA;AAEnB,MAAM,QAAQ,GACnB,CAAC,EAAsC,EAAE,EAAE,CAC3C,KAAK,EAAE,IAAY,EAAiB,EAA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'\nimport { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'\nconst { chmod } = promises\n\nexport const fixEPERM =\n (fn: (path: string) => Promise<unknown>) =>\n async (path: string): Promise<void> => {\n try {\n return void (await ignoreENOENT(fn(path)))\n } catch (er) {\n if (errorCode(er) === 'EPERM') {\n if (\n !(await ignoreENOENT(\n chmod(path, 0o666).then(() => true),\n er,\n ))\n ) {\n return\n }\n return void (await fn(path))\n }\n throw er\n }\n }\n\nexport const fixEPERMSync =\n (fn: (path: string) => unknown) =>\n (path: string): void => {\n try {\n return void ignoreENOENTSync(() => fn(path))\n } catch (er) {\n if (errorCode(er) === 'EPERM') {\n if (!ignoreENOENTSync(() => (chmodSync(path, 0o666), true), er)) {\n return\n }\n return void fn(path)\n }\n throw er\n }\n }\n"]}
|
||||
16
node_modules/rimraf/dist/commonjs/fs.d.ts
generated
vendored
Normal file
16
node_modules/rimraf/dist/commonjs/fs.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import fs, { Dirent } from 'fs';
|
||||
import fsPromises from 'fs/promises';
|
||||
export { chmodSync, mkdirSync, renameSync, rmdirSync, rmSync, statSync, lstatSync, unlinkSync, } from 'fs';
|
||||
export declare const readdirSync: (path: fs.PathLike) => Dirent[];
|
||||
export declare const promises: {
|
||||
chmod: typeof fsPromises.chmod;
|
||||
mkdir: typeof fsPromises.mkdir;
|
||||
readdir: (path: fs.PathLike) => Promise<fs.Dirent<string>[]>;
|
||||
rename: typeof fsPromises.rename;
|
||||
rm: typeof fsPromises.rm;
|
||||
rmdir: typeof fsPromises.rmdir;
|
||||
stat: typeof fsPromises.stat;
|
||||
lstat: typeof fsPromises.lstat;
|
||||
unlink: typeof fsPromises.unlink;
|
||||
};
|
||||
//# sourceMappingURL=fs.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/fs.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/fs.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,EAAyB,MAAM,IAAI,CAAA;AACtD,OAAO,UAAU,MAAM,aAAa,CAAA;AAKpC,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,GACX,MAAM,IAAI,CAAA;AAEX,eAAO,MAAM,WAAW,GAAI,MAAM,EAAE,CAAC,QAAQ,KAAG,MAAM,EACf,CAAA;AAEvC,eAAO,MAAM,QAAQ;;;oBAGH,EAAE,CAAC,QAAQ;;;;;;;CAQ5B,CAAA"}
|
||||
33
node_modules/rimraf/dist/commonjs/fs.js
generated
vendored
Normal file
33
node_modules/rimraf/dist/commonjs/fs.js
generated
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.promises = exports.readdirSync = exports.unlinkSync = exports.lstatSync = exports.statSync = exports.rmSync = exports.rmdirSync = exports.renameSync = exports.mkdirSync = exports.chmodSync = void 0;
|
||||
const fs_1 = require("fs");
|
||||
const promises_1 = __importDefault(require("fs/promises"));
|
||||
// sync ones just take the sync version from node
|
||||
// readdir forces withFileTypes: true
|
||||
var fs_2 = require("fs");
|
||||
Object.defineProperty(exports, "chmodSync", { enumerable: true, get: function () { return fs_2.chmodSync; } });
|
||||
Object.defineProperty(exports, "mkdirSync", { enumerable: true, get: function () { return fs_2.mkdirSync; } });
|
||||
Object.defineProperty(exports, "renameSync", { enumerable: true, get: function () { return fs_2.renameSync; } });
|
||||
Object.defineProperty(exports, "rmdirSync", { enumerable: true, get: function () { return fs_2.rmdirSync; } });
|
||||
Object.defineProperty(exports, "rmSync", { enumerable: true, get: function () { return fs_2.rmSync; } });
|
||||
Object.defineProperty(exports, "statSync", { enumerable: true, get: function () { return fs_2.statSync; } });
|
||||
Object.defineProperty(exports, "lstatSync", { enumerable: true, get: function () { return fs_2.lstatSync; } });
|
||||
Object.defineProperty(exports, "unlinkSync", { enumerable: true, get: function () { return fs_2.unlinkSync; } });
|
||||
const readdirSync = (path) => (0, fs_1.readdirSync)(path, { withFileTypes: true });
|
||||
exports.readdirSync = readdirSync;
|
||||
exports.promises = {
|
||||
chmod: promises_1.default.chmod,
|
||||
mkdir: promises_1.default.mkdir,
|
||||
readdir: (path) => promises_1.default.readdir(path, { withFileTypes: true }),
|
||||
rename: promises_1.default.rename,
|
||||
rm: promises_1.default.rm,
|
||||
rmdir: promises_1.default.rmdir,
|
||||
stat: promises_1.default.stat,
|
||||
lstat: promises_1.default.lstat,
|
||||
unlink: promises_1.default.unlink,
|
||||
};
|
||||
//# sourceMappingURL=fs.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/fs.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/fs.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/fs.ts"],"names":[],"mappings":";;;;;;AAAA,2BAAsD;AACtD,2DAAoC;AAEpC,iDAAiD;AACjD,qCAAqC;AAErC,yBASW;AART,+FAAA,SAAS,OAAA;AACT,+FAAA,SAAS,OAAA;AACT,gGAAA,UAAU,OAAA;AACV,+FAAA,SAAS,OAAA;AACT,4FAAA,MAAM,OAAA;AACN,8FAAA,QAAQ,OAAA;AACR,+FAAA,SAAS,OAAA;AACT,gGAAA,UAAU,OAAA;AAGL,MAAM,WAAW,GAAG,CAAC,IAAiB,EAAY,EAAE,CACzD,IAAA,gBAAM,EAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AAD1B,QAAA,WAAW,eACe;AAE1B,QAAA,QAAQ,GAAG;IACtB,KAAK,EAAE,kBAAU,CAAC,KAAK;IACvB,KAAK,EAAE,kBAAU,CAAC,KAAK;IACvB,OAAO,EAAE,CAAC,IAAiB,EAAE,EAAE,CAC7B,kBAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IACnD,MAAM,EAAE,kBAAU,CAAC,MAAM;IACzB,EAAE,EAAE,kBAAU,CAAC,EAAE;IACjB,KAAK,EAAE,kBAAU,CAAC,KAAK;IACvB,IAAI,EAAE,kBAAU,CAAC,IAAI;IACrB,KAAK,EAAE,kBAAU,CAAC,KAAK;IACvB,MAAM,EAAE,kBAAU,CAAC,MAAM;CAC1B,CAAA","sourcesContent":["import fs, { Dirent, readdirSync as rdSync } from 'fs'\nimport fsPromises from 'fs/promises'\n\n// sync ones just take the sync version from node\n// readdir forces withFileTypes: true\n\nexport {\n chmodSync,\n mkdirSync,\n renameSync,\n rmdirSync,\n rmSync,\n statSync,\n lstatSync,\n unlinkSync,\n} from 'fs'\n\nexport const readdirSync = (path: fs.PathLike): Dirent[] =>\n rdSync(path, { withFileTypes: true })\n\nexport const promises = {\n chmod: fsPromises.chmod,\n mkdir: fsPromises.mkdir,\n readdir: (path: fs.PathLike) =>\n fsPromises.readdir(path, { withFileTypes: true }),\n rename: fsPromises.rename,\n rm: fsPromises.rm,\n rmdir: fsPromises.rmdir,\n stat: fsPromises.stat,\n lstat: fsPromises.lstat,\n unlink: fsPromises.unlink,\n}\n"]}
|
||||
3
node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts
generated
vendored
Normal file
3
node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export declare const ignoreENOENT: <T>(p: Promise<T>, rethrow?: unknown) => Promise<void | T>;
|
||||
export declare const ignoreENOENTSync: <T>(fn: () => T, rethrow?: unknown) => T | undefined;
|
||||
//# sourceMappingURL=ignore-enoent.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ignore-enoent.d.ts","sourceRoot":"","sources":["../../src/ignore-enoent.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,GAAU,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,OAAO,sBAMlE,CAAA;AAEJ,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAAE,IAAI,MAAM,CAAC,EAAE,UAAU,OAAO,kBASjE,CAAA"}
|
||||
24
node_modules/rimraf/dist/commonjs/ignore-enoent.js
generated
vendored
Normal file
24
node_modules/rimraf/dist/commonjs/ignore-enoent.js
generated
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ignoreENOENTSync = exports.ignoreENOENT = void 0;
|
||||
const error_js_1 = require("./error.js");
|
||||
const ignoreENOENT = async (p, rethrow) => p.catch(er => {
|
||||
if ((0, error_js_1.errorCode)(er) === 'ENOENT') {
|
||||
return;
|
||||
}
|
||||
throw rethrow ?? er;
|
||||
});
|
||||
exports.ignoreENOENT = ignoreENOENT;
|
||||
const ignoreENOENTSync = (fn, rethrow) => {
|
||||
try {
|
||||
return fn();
|
||||
}
|
||||
catch (er) {
|
||||
if ((0, error_js_1.errorCode)(er) === 'ENOENT') {
|
||||
return;
|
||||
}
|
||||
throw rethrow ?? er;
|
||||
}
|
||||
};
|
||||
exports.ignoreENOENTSync = ignoreENOENTSync;
|
||||
//# sourceMappingURL=ignore-enoent.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/ignore-enoent.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/ignore-enoent.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ignore-enoent.js","sourceRoot":"","sources":["../../src/ignore-enoent.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAE/B,MAAM,YAAY,GAAG,KAAK,EAAK,CAAa,EAAE,OAAiB,EAAE,EAAE,CACxE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;IACX,IAAI,IAAA,oBAAS,EAAC,EAAE,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAM;IACR,CAAC;IACD,MAAM,OAAO,IAAI,EAAE,CAAA;AACrB,CAAC,CAAC,CAAA;AANS,QAAA,YAAY,gBAMrB;AAEG,MAAM,gBAAgB,GAAG,CAAI,EAAW,EAAE,OAAiB,EAAE,EAAE;IACpE,IAAI,CAAC;QACH,OAAO,EAAE,EAAE,CAAA;IACb,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,IAAI,IAAA,oBAAS,EAAC,EAAE,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC/B,OAAM;QACR,CAAC;QACD,MAAM,OAAO,IAAI,EAAE,CAAA;IACrB,CAAC;AACH,CAAC,CAAA;AATY,QAAA,gBAAgB,oBAS5B","sourcesContent":["import { errorCode } from './error.js'\n\nexport const ignoreENOENT = async <T>(p: Promise<T>, rethrow?: unknown) =>\n p.catch(er => {\n if (errorCode(er) === 'ENOENT') {\n return\n }\n throw rethrow ?? er\n })\n\nexport const ignoreENOENTSync = <T>(fn: () => T, rethrow?: unknown) => {\n try {\n return fn()\n } catch (er) {\n if (errorCode(er) === 'ENOENT') {\n return\n }\n throw rethrow ?? er\n }\n}\n"]}
|
||||
50
node_modules/rimraf/dist/commonjs/index.d.ts
generated
vendored
Normal file
50
node_modules/rimraf/dist/commonjs/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
import { RimrafAsyncOptions, RimrafSyncOptions } from './opt-arg.js';
|
||||
export { assertRimrafOptions, isRimrafOptions, type RimrafAsyncOptions, type RimrafOptions, type RimrafSyncOptions, } from './opt-arg.js';
|
||||
export declare const nativeSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const native: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
export declare const manualSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const manual: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
export declare const windowsSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const windows: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
export declare const posixSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const posix: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
export declare const moveRemoveSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const moveRemove: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
export declare const rimrafSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const rimraf: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
rimraf: (path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>;
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
rimrafSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
manual: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
manualSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
native: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
nativeSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
posix: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
posixSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
windows: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
windowsSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
moveRemove: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
moveRemoveSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/index.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/index.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,cAAc,CAAA;AAYrB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,iBAAiB,GACvB,MAAM,cAAc,CAAA;AAqCrB,eAAO,MAAM,UAAU,SAdd,MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAcF,CAAA;AACpD,eAAO,MAAM,MAAM,UAjCT,MAAM,GAAG,MAAM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,OAAO;wBAlBnD,MAAM,GAAG,MAAM,EAAE,QACjB,kBAAkB,KACvB,OAAO,CAAC,OAAO,CAAC;qBAgBZ,MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAAO;;2BAApD,MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAAO;CA6D3D,CAAA"}
|
||||
84
node_modules/rimraf/dist/commonjs/index.js
generated
vendored
Normal file
84
node_modules/rimraf/dist/commonjs/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.rimraf = exports.sync = exports.rimrafSync = exports.moveRemove = exports.moveRemoveSync = exports.posix = exports.posixSync = exports.windows = exports.windowsSync = exports.manual = exports.manualSync = exports.native = exports.nativeSync = exports.isRimrafOptions = exports.assertRimrafOptions = void 0;
|
||||
const glob_1 = require("glob");
|
||||
const opt_arg_js_1 = require("./opt-arg.js");
|
||||
const path_arg_js_1 = __importDefault(require("./path-arg.js"));
|
||||
const rimraf_manual_js_1 = require("./rimraf-manual.js");
|
||||
const rimraf_move_remove_js_1 = require("./rimraf-move-remove.js");
|
||||
const rimraf_native_js_1 = require("./rimraf-native.js");
|
||||
const rimraf_posix_js_1 = require("./rimraf-posix.js");
|
||||
const rimraf_windows_js_1 = require("./rimraf-windows.js");
|
||||
const use_native_js_1 = require("./use-native.js");
|
||||
var opt_arg_js_2 = require("./opt-arg.js");
|
||||
Object.defineProperty(exports, "assertRimrafOptions", { enumerable: true, get: function () { return opt_arg_js_2.assertRimrafOptions; } });
|
||||
Object.defineProperty(exports, "isRimrafOptions", { enumerable: true, get: function () { return opt_arg_js_2.isRimrafOptions; } });
|
||||
const wrap = (fn) => async (path, opt) => {
|
||||
const options = (0, opt_arg_js_1.optArg)(opt);
|
||||
if (options.glob) {
|
||||
path = await (0, glob_1.glob)(path, options.glob);
|
||||
}
|
||||
if (Array.isArray(path)) {
|
||||
return !!(await Promise.all(path.map(p => fn((0, path_arg_js_1.default)(p, options), options)))).reduce((a, b) => a && b, true);
|
||||
}
|
||||
else {
|
||||
return !!(await fn((0, path_arg_js_1.default)(path, options), options));
|
||||
}
|
||||
};
|
||||
const wrapSync = (fn) => (path, opt) => {
|
||||
const options = (0, opt_arg_js_1.optArgSync)(opt);
|
||||
if (options.glob) {
|
||||
path = (0, glob_1.globSync)(path, options.glob);
|
||||
}
|
||||
if (Array.isArray(path)) {
|
||||
return !!path
|
||||
.map(p => fn((0, path_arg_js_1.default)(p, options), options))
|
||||
.reduce((a, b) => a && b, true);
|
||||
}
|
||||
else {
|
||||
return !!fn((0, path_arg_js_1.default)(path, options), options);
|
||||
}
|
||||
};
|
||||
exports.nativeSync = wrapSync(rimraf_native_js_1.rimrafNativeSync);
|
||||
exports.native = Object.assign(wrap(rimraf_native_js_1.rimrafNative), {
|
||||
sync: exports.nativeSync,
|
||||
});
|
||||
exports.manualSync = wrapSync(rimraf_manual_js_1.rimrafManualSync);
|
||||
exports.manual = Object.assign(wrap(rimraf_manual_js_1.rimrafManual), {
|
||||
sync: exports.manualSync,
|
||||
});
|
||||
exports.windowsSync = wrapSync(rimraf_windows_js_1.rimrafWindowsSync);
|
||||
exports.windows = Object.assign(wrap(rimraf_windows_js_1.rimrafWindows), {
|
||||
sync: exports.windowsSync,
|
||||
});
|
||||
exports.posixSync = wrapSync(rimraf_posix_js_1.rimrafPosixSync);
|
||||
exports.posix = Object.assign(wrap(rimraf_posix_js_1.rimrafPosix), { sync: exports.posixSync });
|
||||
exports.moveRemoveSync = wrapSync(rimraf_move_remove_js_1.rimrafMoveRemoveSync);
|
||||
exports.moveRemove = Object.assign(wrap(rimraf_move_remove_js_1.rimrafMoveRemove), {
|
||||
sync: exports.moveRemoveSync,
|
||||
});
|
||||
exports.rimrafSync = wrapSync((path, opt) => (0, use_native_js_1.useNativeSync)(opt) ?
|
||||
(0, rimraf_native_js_1.rimrafNativeSync)(path, opt)
|
||||
: (0, rimraf_manual_js_1.rimrafManualSync)(path, opt));
|
||||
exports.sync = exports.rimrafSync;
|
||||
const rimraf_ = wrap((path, opt) => (0, use_native_js_1.useNative)(opt) ? (0, rimraf_native_js_1.rimrafNative)(path, opt) : (0, rimraf_manual_js_1.rimrafManual)(path, opt));
|
||||
exports.rimraf = Object.assign(rimraf_, {
|
||||
rimraf: rimraf_,
|
||||
sync: exports.rimrafSync,
|
||||
rimrafSync: exports.rimrafSync,
|
||||
manual: exports.manual,
|
||||
manualSync: exports.manualSync,
|
||||
native: exports.native,
|
||||
nativeSync: exports.nativeSync,
|
||||
posix: exports.posix,
|
||||
posixSync: exports.posixSync,
|
||||
windows: exports.windows,
|
||||
windowsSync: exports.windowsSync,
|
||||
moveRemove: exports.moveRemove,
|
||||
moveRemoveSync: exports.moveRemoveSync,
|
||||
});
|
||||
exports.rimraf.rimraf = exports.rimraf;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/index.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
34
node_modules/rimraf/dist/commonjs/opt-arg.d.ts
generated
vendored
Normal file
34
node_modules/rimraf/dist/commonjs/opt-arg.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { Dirent, Stats } from 'fs';
|
||||
import { GlobOptions } from 'glob';
|
||||
export declare const isRimrafOptions: (o: any) => o is RimrafOptions;
|
||||
export declare const assertRimrafOptions: (o: any) => void;
|
||||
export interface RimrafAsyncOptions {
|
||||
preserveRoot?: boolean;
|
||||
tmp?: string;
|
||||
maxRetries?: number;
|
||||
retryDelay?: number;
|
||||
backoff?: number;
|
||||
maxBackoff?: number;
|
||||
signal?: AbortSignal;
|
||||
glob?: boolean | GlobOptions;
|
||||
filter?: ((path: string, ent: Dirent | Stats) => boolean) | ((path: string, ent: Dirent | Stats) => Promise<boolean>);
|
||||
}
|
||||
export interface RimrafSyncOptions extends RimrafAsyncOptions {
|
||||
filter?: (path: string, ent: Dirent | Stats) => boolean;
|
||||
}
|
||||
export type RimrafOptions = RimrafSyncOptions | RimrafAsyncOptions;
|
||||
export declare const optArg: (opt?: RimrafAsyncOptions) => (RimrafAsyncOptions & {
|
||||
glob: GlobOptions & {
|
||||
withFileTypes: false;
|
||||
};
|
||||
}) | (RimrafAsyncOptions & {
|
||||
glob: undefined;
|
||||
});
|
||||
export declare const optArgSync: (opt?: RimrafSyncOptions) => (RimrafSyncOptions & {
|
||||
glob: GlobOptions & {
|
||||
withFileTypes: false;
|
||||
};
|
||||
}) | (RimrafSyncOptions & {
|
||||
glob: undefined;
|
||||
});
|
||||
//# sourceMappingURL=opt-arg.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/opt-arg.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/opt-arg.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"opt-arg.d.ts","sourceRoot":"","sources":["../../src/opt-arg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAKlC,eAAO,MAAM,eAAe,GAAI,GAAG,GAAG,KAAG,CAAC,IAAI,aAWX,CAAA;AAEnC,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAM7C,CAAA;AAED,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAA;IAC5B,MAAM,CAAC,EACH,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,KAAK,OAAO,CAAC,GAChD,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;CAC9D;AAED,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,KAAK,OAAO,CAAA;CACxD;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,CAAA;AAqClE,eAAO,MAAM,MAAM,GAAI,MAAK,kBAAuB;UA/BvC,WAAW,GAAG;QAAE,aAAa,EAAE,KAAK,CAAA;KAAE;;UAEjC,SAAS;EA6B0C,CAAA;AACpE,eAAO,MAAM,UAAU,GAAI,MAAK,iBAAsB;UAhC1C,WAAW,GAAG;QAAE,aAAa,EAAE,KAAK,CAAA;KAAE;;UAEjC,SAAS;EA8B6C,CAAA"}
|
||||
54
node_modules/rimraf/dist/commonjs/opt-arg.js
generated
vendored
Normal file
54
node_modules/rimraf/dist/commonjs/opt-arg.js
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.optArgSync = exports.optArg = exports.assertRimrafOptions = exports.isRimrafOptions = void 0;
|
||||
const typeOrUndef = (val, t) => typeof val === 'undefined' || typeof val === t;
|
||||
const isRimrafOptions = (o) => !!o &&
|
||||
typeof o === 'object' &&
|
||||
typeOrUndef(o.preserveRoot, 'boolean') &&
|
||||
typeOrUndef(o.tmp, 'string') &&
|
||||
typeOrUndef(o.maxRetries, 'number') &&
|
||||
typeOrUndef(o.retryDelay, 'number') &&
|
||||
typeOrUndef(o.backoff, 'number') &&
|
||||
typeOrUndef(o.maxBackoff, 'number') &&
|
||||
(typeOrUndef(o.glob, 'boolean') ||
|
||||
(o.glob && typeof o.glob === 'object')) &&
|
||||
typeOrUndef(o.filter, 'function');
|
||||
exports.isRimrafOptions = isRimrafOptions;
|
||||
const assertRimrafOptions = (o) => {
|
||||
if (!(0, exports.isRimrafOptions)(o)) {
|
||||
throw new Error('invalid rimraf options');
|
||||
}
|
||||
};
|
||||
exports.assertRimrafOptions = assertRimrafOptions;
|
||||
const optArgT = (opt) => {
|
||||
(0, exports.assertRimrafOptions)(opt);
|
||||
const { glob, ...options } = opt;
|
||||
if (!glob) {
|
||||
return options;
|
||||
}
|
||||
const globOpt = glob === true ?
|
||||
opt.signal ?
|
||||
{ signal: opt.signal }
|
||||
: {}
|
||||
: opt.signal ?
|
||||
{
|
||||
signal: opt.signal,
|
||||
...glob,
|
||||
}
|
||||
: glob;
|
||||
return {
|
||||
...options,
|
||||
glob: {
|
||||
...globOpt,
|
||||
// always get absolute paths from glob, to ensure
|
||||
// that we are referencing the correct thing.
|
||||
absolute: true,
|
||||
withFileTypes: false,
|
||||
},
|
||||
};
|
||||
};
|
||||
const optArg = (opt = {}) => optArgT(opt);
|
||||
exports.optArg = optArg;
|
||||
const optArgSync = (opt = {}) => optArgT(opt);
|
||||
exports.optArgSync = optArgSync;
|
||||
//# sourceMappingURL=opt-arg.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/opt-arg.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/opt-arg.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"opt-arg.js","sourceRoot":"","sources":["../../src/opt-arg.ts"],"names":[],"mappings":";;;AAGA,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,CAAS,EAAE,EAAE,CAC1C,OAAO,GAAG,KAAK,WAAW,IAAI,OAAO,GAAG,K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;YACV,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE;YACxB,CAAC,CAAC,EAAE;QACN,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACZ;gBACE,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,GAAG,IAAI;aACR;YACH,CAAC,CAAC,IAAI,CAAA;IACR,OAAO;QACL,GAAG,OAAO;QACV,IAAI,EAAE;YACJ,GAAG,OAAO;YACV,iDAAiD;YACjD,6CAA6C;YAC7C,QAAQ,EAAE,IAAI;YACd,aAAa,EAAE,KAAK;SACrB;KACsD,CAAA;AAC3D,CAAC,CAAA;AAEM,MAAM,MAAM,GAAG,CAAC,MAA0B,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;AAAvD,QAAA,MAAM,UAAiD;AAC7D,MAAM,UAAU,GAAG,CAAC,MAAyB,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;AAA1D,QAAA,UAAU,cAAgD","sourcesContent":["import { Dirent, Stats } from 'fs'\nimport { GlobOptions } from 'glob'\n\nconst typeOrUndef = (val: any, t: string) =>\n typeof val === 'undefined' || typeof val === t\n\nexport const isRimrafOptions = (o: any): o is RimrafOptions =>\n !!o &&\n typeof o === 'object' &&\n typeOrUndef(o.preserveRoot, 'boolean') &&\n typeOrUndef(o.tmp, 'string') &&\n typeOrUndef(o.maxRetries, 'number') &&\n typeOrUndef(o.retryDelay, 'number') &&\n typeOrUndef(o.backoff, 'number') &&\n typeOrUndef(o.maxBackoff, 'number') &&\n (typeOrUndef(o.glob, 'boolean') ||\n (o.glob && typeof o.glob === 'object')) &&\n typeOrUndef(o.filter, 'function')\n\nexport const assertRimrafOptions: (o: any) => void = (\n o: any,\n): asserts o is RimrafOptions => {\n if (!isRimrafOptions(o)) {\n throw new Error('invalid rimraf options')\n }\n}\n\nexport interface RimrafAsyncOptions {\n preserveRoot?: boolean\n tmp?: string\n maxRetries?: number\n retryDelay?: number\n backoff?: number\n maxBackoff?: number\n signal?: AbortSignal\n glob?: boolean | GlobOptions\n filter?:\n | ((path: string, ent: Dirent | Stats) => boolean)\n | ((path: string, ent: Dirent | Stats) => Promise<boolean>)\n}\n\nexport interface RimrafSyncOptions extends RimrafAsyncOptions {\n filter?: (path: string, ent: Dirent | Stats) => boolean\n}\n\nexport type RimrafOptions = RimrafSyncOptions | RimrafAsyncOptions\n\nconst optArgT = <T extends RimrafOptions>(\n opt: T,\n):\n | (T & {\n glob: GlobOptions & { withFileTypes: false }\n })\n | (T & { glob: undefined }) => {\n assertRimrafOptions(opt)\n const { glob, ...options } = opt\n if (!glob) {\n return options as T & { glob: undefined }\n }\n const globOpt =\n glob === true ?\n opt.signal ?\n { signal: opt.signal }\n : {}\n : opt.signal ?\n {\n signal: opt.signal,\n ...glob,\n }\n : glob\n return {\n ...options,\n glob: {\n ...globOpt,\n // always get absolute paths from glob, to ensure\n // that we are referencing the correct thing.\n absolute: true,\n withFileTypes: false,\n },\n } as T & { glob: GlobOptions & { withFileTypes: false } }\n}\n\nexport const optArg = (opt: RimrafAsyncOptions = {}) => optArgT(opt)\nexport const optArgSync = (opt: RimrafSyncOptions = {}) => optArgT(opt)\n"]}
|
||||
3
node_modules/rimraf/dist/commonjs/package.json
generated
vendored
Normal file
3
node_modules/rimraf/dist/commonjs/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"type": "commonjs"
|
||||
}
|
||||
4
node_modules/rimraf/dist/commonjs/path-arg.d.ts
generated
vendored
Normal file
4
node_modules/rimraf/dist/commonjs/path-arg.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import { RimrafAsyncOptions } from './index.js';
|
||||
declare const pathArg: (path: string, opt?: RimrafAsyncOptions) => string;
|
||||
export default pathArg;
|
||||
//# sourceMappingURL=path-arg.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/path-arg.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/path-arg.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"path-arg.d.ts","sourceRoot":"","sources":["../../src/path-arg.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAE/C,QAAA,MAAM,OAAO,GAAI,MAAM,MAAM,EAAE,MAAK,kBAAuB,WAkD1D,CAAA;AAED,eAAe,OAAO,CAAA"}
|
||||
49
node_modules/rimraf/dist/commonjs/path-arg.js
generated
vendored
Normal file
49
node_modules/rimraf/dist/commonjs/path-arg.js
generated
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const path_1 = require("path");
|
||||
const util_1 = require("util");
|
||||
const pathArg = (path, opt = {}) => {
|
||||
const type = typeof path;
|
||||
if (type !== 'string') {
|
||||
const ctor = path && type === 'object' && path.constructor;
|
||||
const received = ctor && ctor.name ? `an instance of ${ctor.name}`
|
||||
: type === 'object' ? (0, util_1.inspect)(path)
|
||||
: `type ${type} ${path}`;
|
||||
const msg = 'The "path" argument must be of type string. ' +
|
||||
`Received ${received}`;
|
||||
throw Object.assign(new TypeError(msg), {
|
||||
path,
|
||||
code: 'ERR_INVALID_ARG_TYPE',
|
||||
});
|
||||
}
|
||||
if (/\0/.test(path)) {
|
||||
// simulate same failure that node raises
|
||||
const msg = 'path must be a string without null bytes';
|
||||
throw Object.assign(new TypeError(msg), {
|
||||
path,
|
||||
code: 'ERR_INVALID_ARG_VALUE',
|
||||
});
|
||||
}
|
||||
path = (0, path_1.resolve)(path);
|
||||
const { root } = (0, path_1.parse)(path);
|
||||
if (path === root && opt.preserveRoot !== false) {
|
||||
const msg = 'refusing to remove root directory without preserveRoot:false';
|
||||
throw Object.assign(new Error(msg), {
|
||||
path,
|
||||
code: 'ERR_PRESERVE_ROOT',
|
||||
});
|
||||
}
|
||||
if (process.platform === 'win32') {
|
||||
const badWinChars = /[*|"<>?:]/;
|
||||
const { root } = (0, path_1.parse)(path);
|
||||
if (badWinChars.test(path.substring(root.length))) {
|
||||
throw Object.assign(new Error('Illegal characters in path.'), {
|
||||
path,
|
||||
code: 'EINVAL',
|
||||
});
|
||||
}
|
||||
}
|
||||
return path;
|
||||
};
|
||||
exports.default = pathArg;
|
||||
//# sourceMappingURL=path-arg.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/path-arg.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/path-arg.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"path-arg.js","sourceRoot":"","sources":["../../src/path-arg.ts"],"names":[],"mappings":";;AAAA,+BAAqC;AACrC,+BAA8B;AAG9B,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,MAA0B,EAAE,EAAE,EAAE;IAC7D,MAAM,IAAI,GAAG,OAAO,IAAI,CAAA;IACxB,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;QACtB,MAAM,IAAI,GAAG,IAAI,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAA;QAC1D,MAAM,QAAQ,GACZ,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,IAAI,EAAE;YACjD,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,cAAO,EAAC,IAAI,CAAC;gBACnC,CAAC,CAAC,QAAQ,IAAI,IAAI,IAAI,EAAE,CAAA;QAC1B,MAAM,GAAG,GACP,8CAA8C;YAC9C,YAAY,QAAQ,EAAE,CAAA;QACxB,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC,EAAE;YACtC,IAAI;YACJ,IAAI,EAAE,sBAAsB;SAC7B,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,yCAAyC;QACzC,MAAM,GAAG,GAAG,0CAA0C,CAAA;QACtD,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC,EAAE;YACtC,IAAI;YACJ,IAAI,EAAE,uBAAuB;SAC9B,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,GAAG,IAAA,cAAO,EAAC,IAAI,CAAC,CAAA;IACpB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,YAAK,EAAC,IAAI,CAAC,CAAA;IAE5B,IAAI,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC,YAAY,KAAK,KAAK,EAAE,CAAC;QAChD,MAAM,GAAG,GACP,8DAA8D,CAAA;QAChE,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,EAAE;YAClC,IAAI;YACJ,IAAI,EAAE,mBAAmB;SAC1B,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,MAAM,WAAW,GAAG,WAAW,CAAA;QAC/B,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,YAAK,EAAC,IAAI,CAAC,CAAA;QAC5B,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;YAClD,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,6BAA6B,CAAC,EAAE;gBAC5D,IAAI;gBACJ,IAAI,EAAE,QAAQ;aACf,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,kBAAe,OAAO,CAAA","sourcesContent":["import { parse, resolve } from 'path'\nimport { inspect } from 'util'\nimport { RimrafAsyncOptions } from './index.js'\n\nconst pathArg = (path: string, opt: RimrafAsyncOptions = {}) => {\n const type = typeof path\n if (type !== 'string') {\n const ctor = path && type === 'object' && path.constructor\n const received =\n ctor && ctor.name ? `an instance of ${ctor.name}`\n : type === 'object' ? inspect(path)\n : `type ${type} ${path}`\n const msg =\n 'The \"path\" argument must be of type string. ' +\n `Received ${received}`\n throw Object.assign(new TypeError(msg), {\n path,\n code: 'ERR_INVALID_ARG_TYPE',\n })\n }\n\n if (/\\0/.test(path)) {\n // simulate same failure that node raises\n const msg = 'path must be a string without null bytes'\n throw Object.assign(new TypeError(msg), {\n path,\n code: 'ERR_INVALID_ARG_VALUE',\n })\n }\n\n path = resolve(path)\n const { root } = parse(path)\n\n if (path === root && opt.preserveRoot !== false) {\n const msg =\n 'refusing to remove root directory without preserveRoot:false'\n throw Object.assign(new Error(msg), {\n path,\n code: 'ERR_PRESERVE_ROOT',\n })\n }\n\n if (process.platform === 'win32') {\n const badWinChars = /[*|\"<>?:]/\n const { root } = parse(path)\n if (badWinChars.test(path.substring(root.length))) {\n throw Object.assign(new Error('Illegal characters in path.'), {\n path,\n code: 'EINVAL',\n })\n }\n }\n\n return path\n}\n\nexport default pathArg\n"]}
|
||||
3
node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts
generated
vendored
Normal file
3
node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export declare const readdirOrError: (path: string) => Promise<import("node:fs").Dirent<string>[] | Error>;
|
||||
export declare const readdirOrErrorSync: (path: string) => import("node:fs").Dirent<string>[] | Error;
|
||||
//# sourceMappingURL=readdir-or-error.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"readdir-or-error.d.ts","sourceRoot":"","sources":["../../src/readdir-or-error.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,wDACH,CAAA;AACxC,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,+CAM9C,CAAA"}
|
||||
19
node_modules/rimraf/dist/commonjs/readdir-or-error.js
generated
vendored
Normal file
19
node_modules/rimraf/dist/commonjs/readdir-or-error.js
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.readdirOrErrorSync = exports.readdirOrError = void 0;
|
||||
// returns an array of entries if readdir() works,
|
||||
// or the error that readdir() raised if not.
|
||||
const fs_js_1 = require("./fs.js");
|
||||
const { readdir } = fs_js_1.promises;
|
||||
const readdirOrError = (path) => readdir(path).catch(er => er);
|
||||
exports.readdirOrError = readdirOrError;
|
||||
const readdirOrErrorSync = (path) => {
|
||||
try {
|
||||
return (0, fs_js_1.readdirSync)(path);
|
||||
}
|
||||
catch (er) {
|
||||
return er;
|
||||
}
|
||||
};
|
||||
exports.readdirOrErrorSync = readdirOrErrorSync;
|
||||
//# sourceMappingURL=readdir-or-error.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/readdir-or-error.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/readdir-or-error.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"readdir-or-error.js","sourceRoot":"","sources":["../../src/readdir-or-error.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAClD,6CAA6C;AAC7C,mCAA+C;AAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,gBAAQ,CAAA;AAErB,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAC7C,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAW,CAAC,CAAA;AAD3B,QAAA,cAAc,kBACa;AACjC,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAE,EAAE;IACjD,IAAI,CAAC;QACH,OAAO,IAAA,mBAAW,EAAC,IAAI,CAAC,CAAA;IAC1B,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,OAAO,EAAW,CAAA;IACpB,CAAC;AACH,CAAC,CAAA;AANY,QAAA,kBAAkB,sBAM9B","sourcesContent":["// returns an array of entries if readdir() works,\n// or the error that readdir() raised if not.\nimport { promises, readdirSync } from './fs.js'\nconst { readdir } = promises\n\nexport const readdirOrError = (path: string) =>\n readdir(path).catch(er => er as Error)\nexport const readdirOrErrorSync = (path: string) => {\n try {\n return readdirSync(path)\n } catch (er) {\n return er as Error\n }\n}\n"]}
|
||||
8
node_modules/rimraf/dist/commonjs/retry-busy.d.ts
generated
vendored
Normal file
8
node_modules/rimraf/dist/commonjs/retry-busy.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { RimrafAsyncOptions, RimrafOptions } from './index.js';
|
||||
export declare const MAXBACKOFF = 200;
|
||||
export declare const RATE = 1.2;
|
||||
export declare const MAXRETRIES = 10;
|
||||
export declare const codes: Set<string>;
|
||||
export declare const retryBusy: <T>(fn: (path: string) => Promise<T>) => (path: string, opt: RimrafAsyncOptions, backoff?: number, total?: number) => Promise<T>;
|
||||
export declare const retryBusySync: <T>(fn: (path: string) => T) => (path: string, opt: RimrafOptions) => T;
|
||||
//# sourceMappingURL=retry-busy.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/retry-busy.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/retry-busy.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"retry-busy.d.ts","sourceRoot":"","sources":["../../src/retry-busy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG9D,eAAO,MAAM,UAAU,MAAM,CAAA;AAC7B,eAAO,MAAM,IAAI,MAAM,CAAA;AACvB,eAAO,MAAM,UAAU,KAAK,CAAA;AAC5B,eAAO,MAAM,KAAK,aAAyC,CAAA;AAE3D,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,YAEnD,MAAM,OACP,kBAAkB,iDA8B1B,CAAA;AAGD,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,YAChC,MAAM,OAAO,aAAa,MAqBjD,CAAA"}
|
||||
65
node_modules/rimraf/dist/commonjs/retry-busy.js
generated
vendored
Normal file
65
node_modules/rimraf/dist/commonjs/retry-busy.js
generated
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
"use strict";
|
||||
// note: max backoff is the maximum that any *single* backoff will do
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.retryBusySync = exports.retryBusy = exports.codes = exports.MAXRETRIES = exports.RATE = exports.MAXBACKOFF = void 0;
|
||||
const promises_1 = require("timers/promises");
|
||||
const error_js_1 = require("./error.js");
|
||||
exports.MAXBACKOFF = 200;
|
||||
exports.RATE = 1.2;
|
||||
exports.MAXRETRIES = 10;
|
||||
exports.codes = new Set(['EMFILE', 'ENFILE', 'EBUSY']);
|
||||
const retryBusy = (fn) => {
|
||||
const method = async (path, opt, backoff = 1, total = 0) => {
|
||||
const mbo = opt.maxBackoff || exports.MAXBACKOFF;
|
||||
const rate = opt.backoff || exports.RATE;
|
||||
const max = opt.maxRetries || exports.MAXRETRIES;
|
||||
let retries = 0;
|
||||
while (true) {
|
||||
try {
|
||||
return await fn(path);
|
||||
}
|
||||
catch (er) {
|
||||
if ((0, error_js_1.isFsError)(er) && er.path === path && exports.codes.has(er.code)) {
|
||||
backoff = Math.ceil(backoff * rate);
|
||||
total = backoff + total;
|
||||
if (total < mbo) {
|
||||
await (0, promises_1.setTimeout)(backoff);
|
||||
return method(path, opt, backoff, total);
|
||||
}
|
||||
if (retries < max) {
|
||||
retries++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
throw er;
|
||||
}
|
||||
}
|
||||
};
|
||||
return method;
|
||||
};
|
||||
exports.retryBusy = retryBusy;
|
||||
// just retries, no async so no backoff
|
||||
const retryBusySync = (fn) => {
|
||||
const method = (path, opt) => {
|
||||
const max = opt.maxRetries || exports.MAXRETRIES;
|
||||
let retries = 0;
|
||||
while (true) {
|
||||
try {
|
||||
return fn(path);
|
||||
}
|
||||
catch (er) {
|
||||
if ((0, error_js_1.isFsError)(er) &&
|
||||
er.path === path &&
|
||||
exports.codes.has(er.code) &&
|
||||
retries < max) {
|
||||
retries++;
|
||||
continue;
|
||||
}
|
||||
throw er;
|
||||
}
|
||||
}
|
||||
};
|
||||
return method;
|
||||
};
|
||||
exports.retryBusySync = retryBusySync;
|
||||
//# sourceMappingURL=retry-busy.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/retry-busy.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/retry-busy.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"retry-busy.js","sourceRoot":"","sources":["../../src/retry-busy.ts"],"names":[],"mappings":";AAAA,qEAAqE;;;AAErE,8CAA4C;AAE5C,yCAAsC;AAEzB,QAAA,UAAU,GAAG,GAAG,CAAA;AAChB,QAAA,IAAI,GAAG,GAAG,CAAA;AACV,QAAA,UAAU,GAAG,EAAE,CAAA;AACf,QAAA,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAA;AAEpD,MAAM,SAAS,GAAG,CAAI,EAAgC,EAAE,EAAE;IAC/D,MAAM,MAAM,GAAG,KAAK,EAClB,IAAY,EACZ,GAAuB,EACvB,OAAO,GAAG,CAAC,EACX,KAAK,GAAG,CAAC,EACT,EAAE;QACF,MAAM,GAAG,GAAG,GAAG,CAAC,UAAU,IAAI,kBAAU,CAAA;QACxC,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,IAAI,YAAI,CAAA;QAChC,MAAM,GAAG,GAAG,GAAG,CAAC,UAAU,IAAI,kBAAU,CAAA;QACxC,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,EAAC,EAAE,CAAC;oBACb,EAAE,CAAC,IAAI,KAAK,IAAI;oBAChB,aAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;oBAClB,OAAO,GAAG,GAAG,EACb,CAAC;oBACD,OAAO,EAAE,CAAA;oBACT,SAAQ;gBACV,CAAC;gBACD,MAAM,EAAE,CAAA;YACV,CAAC;QACH,CAAC;IACH,CAAC,CAAA;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAtBY,QAAA,aAAa,iBAsBzB","sourcesContent":["// note: max backoff is the maximum that any *single* backoff will do\n\nimport { setTimeout } from 'timers/promises'\nimport { RimrafAsyncOptions, RimrafOptions } from './index.js'\nimport { isFsError } from './error.js'\n\nexport const MAXBACKOFF = 200\nexport const RATE = 1.2\nexport const MAXRETRIES = 10\nexport const codes = new Set(['EMFILE', 'ENFILE', 'EBUSY'])\n\nexport const retryBusy = <T>(fn: (path: string) => Promise<T>) => {\n const method = async (\n path: string,\n opt: RimrafAsyncOptions,\n backoff = 1,\n total = 0,\n ) => {\n const mbo = opt.maxBackoff || MAXBACKOFF\n const rate = opt.backoff || RATE\n const max = opt.maxRetries || MAXRETRIES\n let retries = 0\n while (true) {\n try {\n return await fn(path)\n } catch (er) {\n if (isFsError(er) && er.path === path && codes.has(er.code)) {\n backoff = Math.ceil(backoff * rate)\n total = backoff + total\n if (total < mbo) {\n await setTimeout(backoff)\n return method(path, opt, backoff, total)\n }\n if (retries < max) {\n retries++\n continue\n }\n }\n throw er\n }\n }\n }\n\n return method\n}\n\n// just retries, no async so no backoff\nexport const retryBusySync = <T>(fn: (path: string) => T) => {\n const method = (path: string, opt: RimrafOptions) => {\n const max = opt.maxRetries || MAXRETRIES\n let retries = 0\n while (true) {\n try {\n return fn(path)\n } catch (er) {\n if (\n isFsError(er) &&\n er.path === path &&\n codes.has(er.code) &&\n retries < max\n ) {\n retries++\n continue\n }\n throw er\n }\n }\n }\n return method\n}\n"]}
|
||||
3
node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts
generated
vendored
Normal file
3
node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export declare const rimrafManual: (path: string, opt: import("./opt-arg.js").RimrafAsyncOptions) => Promise<boolean>;
|
||||
export declare const rimrafManualSync: (path: string, opt: import("./opt-arg.js").RimrafSyncOptions) => boolean;
|
||||
//# sourceMappingURL=rimraf-manual.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"rimraf-manual.d.ts","sourceRoot":"","sources":["../../src/rimraf-manual.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,oFACmC,CAAA;AAC5D,eAAO,MAAM,gBAAgB,0EACuC,CAAA"}
|
||||
8
node_modules/rimraf/dist/commonjs/rimraf-manual.js
generated
vendored
Normal file
8
node_modules/rimraf/dist/commonjs/rimraf-manual.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.rimrafManualSync = exports.rimrafManual = void 0;
|
||||
const rimraf_posix_js_1 = require("./rimraf-posix.js");
|
||||
const rimraf_windows_js_1 = require("./rimraf-windows.js");
|
||||
exports.rimrafManual = process.platform === 'win32' ? rimraf_windows_js_1.rimrafWindows : rimraf_posix_js_1.rimrafPosix;
|
||||
exports.rimrafManualSync = process.platform === 'win32' ? rimraf_windows_js_1.rimrafWindowsSync : rimraf_posix_js_1.rimrafPosixSync;
|
||||
//# sourceMappingURL=rimraf-manual.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/rimraf-manual.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/rimraf-manual.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"rimraf-manual.js","sourceRoot":"","sources":["../../src/rimraf-manual.ts"],"names":[],"mappings":";;;AAAA,uDAAgE;AAChE,2DAAsE;AAEzD,QAAA,YAAY,GACvB,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,iCAAa,CAAC,CAAC,CAAC,6BAAW,CAAA;AAC/C,QAAA,gBAAgB,GAC3B,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,qCAAiB,CAAC,CAAC,CAAC,iCAAe,CAAA","sourcesContent":["import { rimrafPosix, rimrafPosixSync } from './rimraf-posix.js'\nimport { rimrafWindows, rimrafWindowsSync } from './rimraf-windows.js'\n\nexport const rimrafManual =\n process.platform === 'win32' ? rimrafWindows : rimrafPosix\nexport const rimrafManualSync =\n process.platform === 'win32' ? rimrafWindowsSync : rimrafPosixSync\n"]}
|
||||
4
node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts
generated
vendored
Normal file
4
node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import { RimrafAsyncOptions, RimrafSyncOptions } from './index.js';
|
||||
export declare const rimrafMoveRemove: (path: string, opt: RimrafAsyncOptions) => Promise<boolean>;
|
||||
export declare const rimrafMoveRemoveSync: (path: string, opt: RimrafSyncOptions) => boolean;
|
||||
//# sourceMappingURL=rimraf-move-remove.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"rimraf-move-remove.d.ts","sourceRoot":"","sources":["../../src/rimraf-move-remove.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAalE,eAAO,MAAM,gBAAgB,GAC3B,MAAM,MAAM,EACZ,KAAK,kBAAkB,qBAQxB,CAAA;AA0ED,eAAO,MAAM,oBAAoB,GAC/B,MAAM,MAAM,EACZ,KAAK,iBAAiB,YAQvB,CAAA"}
|
||||
138
node_modules/rimraf/dist/commonjs/rimraf-move-remove.js
generated
vendored
Normal file
138
node_modules/rimraf/dist/commonjs/rimraf-move-remove.js
generated
vendored
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
"use strict";
|
||||
// https://youtu.be/uhRWMGBjlO8?t=537
|
||||
//
|
||||
// 1. readdir
|
||||
// 2. for each entry
|
||||
// a. if a non-empty directory, recurse
|
||||
// b. if an empty directory, move to random hidden file name in $TEMP
|
||||
// c. unlink/rmdir $TEMP
|
||||
//
|
||||
// This works around the fact that unlink/rmdir is non-atomic and takes
|
||||
// a non-deterministic amount of time to complete.
|
||||
//
|
||||
// However, it is HELLA SLOW, like 2-10x slower than a naive recursive rm.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.rimrafMoveRemoveSync = exports.rimrafMoveRemove = void 0;
|
||||
const path_1 = require("path");
|
||||
const default_tmp_js_1 = require("./default-tmp.js");
|
||||
const ignore_enoent_js_1 = require("./ignore-enoent.js");
|
||||
const fs_js_1 = require("./fs.js");
|
||||
const readdir_or_error_js_1 = require("./readdir-or-error.js");
|
||||
const fix_eperm_js_1 = require("./fix-eperm.js");
|
||||
const error_js_1 = require("./error.js");
|
||||
const { lstat, rename, unlink, rmdir } = fs_js_1.promises;
|
||||
// crypto.randomBytes is much slower, and Math.random() is enough here
|
||||
const uniqueFilename = (path) => `.${(0, path_1.basename)(path)}.${Math.random()}`;
|
||||
const unlinkFixEPERM = (0, fix_eperm_js_1.fixEPERM)(unlink);
|
||||
const unlinkFixEPERMSync = (0, fix_eperm_js_1.fixEPERMSync)(fs_js_1.unlinkSync);
|
||||
const rimrafMoveRemove = async (path, opt) => {
|
||||
opt?.signal?.throwIfAborted();
|
||||
return ((await (0, ignore_enoent_js_1.ignoreENOENT)(lstat(path).then(stat => rimrafMoveRemoveDir(path, opt, stat)))) ?? true);
|
||||
};
|
||||
exports.rimrafMoveRemove = rimrafMoveRemove;
|
||||
const rimrafMoveRemoveDir = async (path, opt, ent) => {
|
||||
opt?.signal?.throwIfAborted();
|
||||
if (!opt.tmp) {
|
||||
return rimrafMoveRemoveDir(path, { ...opt, tmp: await (0, default_tmp_js_1.defaultTmp)(path) }, ent);
|
||||
}
|
||||
if (path === opt.tmp && (0, path_1.parse)(path).root !== path) {
|
||||
throw new Error('cannot delete temp directory used for deletion');
|
||||
}
|
||||
const entries = ent.isDirectory() ? await (0, readdir_or_error_js_1.readdirOrError)(path) : null;
|
||||
if (!Array.isArray(entries)) {
|
||||
// this can only happen if lstat/readdir lied, or if the dir was
|
||||
// swapped out with a file at just the right moment.
|
||||
/* c8 ignore start */
|
||||
if (entries) {
|
||||
if ((0, error_js_1.errorCode)(entries) === 'ENOENT') {
|
||||
return true;
|
||||
}
|
||||
if ((0, error_js_1.errorCode)(entries) !== 'ENOTDIR') {
|
||||
throw entries;
|
||||
}
|
||||
}
|
||||
/* c8 ignore stop */
|
||||
if (opt.filter && !(await opt.filter(path, ent))) {
|
||||
return false;
|
||||
}
|
||||
await (0, ignore_enoent_js_1.ignoreENOENT)(tmpUnlink(path, opt.tmp, unlinkFixEPERM));
|
||||
return true;
|
||||
}
|
||||
const removedAll = (await Promise.all(entries.map(ent => rimrafMoveRemoveDir((0, path_1.resolve)(path, ent.name), opt, ent)))).every(v => v === true);
|
||||
if (!removedAll) {
|
||||
return false;
|
||||
}
|
||||
// we don't ever ACTUALLY try to unlink /, because that can never work
|
||||
// but when preserveRoot is false, we could be operating on it.
|
||||
// No need to check if preserveRoot is not false.
|
||||
if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) {
|
||||
return false;
|
||||
}
|
||||
if (opt.filter && !(await opt.filter(path, ent))) {
|
||||
return false;
|
||||
}
|
||||
await (0, ignore_enoent_js_1.ignoreENOENT)(tmpUnlink(path, opt.tmp, rmdir));
|
||||
return true;
|
||||
};
|
||||
const tmpUnlink = async (path, tmp, rm) => {
|
||||
const tmpFile = (0, path_1.resolve)(tmp, uniqueFilename(path));
|
||||
await rename(path, tmpFile);
|
||||
return await rm(tmpFile);
|
||||
};
|
||||
const rimrafMoveRemoveSync = (path, opt) => {
|
||||
opt?.signal?.throwIfAborted();
|
||||
return ((0, ignore_enoent_js_1.ignoreENOENTSync)(() => rimrafMoveRemoveDirSync(path, opt, (0, fs_js_1.lstatSync)(path))) ?? true);
|
||||
};
|
||||
exports.rimrafMoveRemoveSync = rimrafMoveRemoveSync;
|
||||
const rimrafMoveRemoveDirSync = (path, opt, ent) => {
|
||||
opt?.signal?.throwIfAborted();
|
||||
if (!opt.tmp) {
|
||||
return rimrafMoveRemoveDirSync(path, { ...opt, tmp: (0, default_tmp_js_1.defaultTmpSync)(path) }, ent);
|
||||
}
|
||||
const tmp = opt.tmp;
|
||||
if (path === opt.tmp && (0, path_1.parse)(path).root !== path) {
|
||||
throw new Error('cannot delete temp directory used for deletion');
|
||||
}
|
||||
const entries = ent.isDirectory() ? (0, readdir_or_error_js_1.readdirOrErrorSync)(path) : null;
|
||||
if (!Array.isArray(entries)) {
|
||||
// this can only happen if lstat/readdir lied, or if the dir was
|
||||
// swapped out with a file at just the right moment.
|
||||
/* c8 ignore start */
|
||||
if (entries) {
|
||||
if ((0, error_js_1.errorCode)(entries) === 'ENOENT') {
|
||||
return true;
|
||||
}
|
||||
if ((0, error_js_1.errorCode)(entries) !== 'ENOTDIR') {
|
||||
throw entries;
|
||||
}
|
||||
}
|
||||
/* c8 ignore stop */
|
||||
if (opt.filter && !opt.filter(path, ent)) {
|
||||
return false;
|
||||
}
|
||||
(0, ignore_enoent_js_1.ignoreENOENTSync)(() => tmpUnlinkSync(path, tmp, unlinkFixEPERMSync));
|
||||
return true;
|
||||
}
|
||||
let removedAll = true;
|
||||
for (const ent of entries) {
|
||||
const p = (0, path_1.resolve)(path, ent.name);
|
||||
removedAll = rimrafMoveRemoveDirSync(p, opt, ent) && removedAll;
|
||||
}
|
||||
if (!removedAll) {
|
||||
return false;
|
||||
}
|
||||
if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) {
|
||||
return false;
|
||||
}
|
||||
if (opt.filter && !opt.filter(path, ent)) {
|
||||
return false;
|
||||
}
|
||||
(0, ignore_enoent_js_1.ignoreENOENTSync)(() => tmpUnlinkSync(path, tmp, fs_js_1.rmdirSync));
|
||||
return true;
|
||||
};
|
||||
const tmpUnlinkSync = (path, tmp, rmSync) => {
|
||||
const tmpFile = (0, path_1.resolve)(tmp, uniqueFilename(path));
|
||||
(0, fs_js_1.renameSync)(path, tmpFile);
|
||||
return rmSync(tmpFile);
|
||||
};
|
||||
//# sourceMappingURL=rimraf-move-remove.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/rimraf-move-remove.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/rimraf-move-remove.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4
node_modules/rimraf/dist/commonjs/rimraf-native.d.ts
generated
vendored
Normal file
4
node_modules/rimraf/dist/commonjs/rimraf-native.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import { RimrafAsyncOptions, RimrafSyncOptions } from './index.js';
|
||||
export declare const rimrafNative: (path: string, opt: RimrafAsyncOptions) => Promise<boolean>;
|
||||
export declare const rimrafNativeSync: (path: string, opt: RimrafSyncOptions) => boolean;
|
||||
//# sourceMappingURL=rimraf-native.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/rimraf-native.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/rimraf-native.d.ts.map
generated
vendored
Normal file
|
|
@ -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,GACvB,MAAM,MAAM,EACZ,KAAK,kBAAkB,KACtB,OAAO,CAAC,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,gBAAgB,GAC3B,MAAM,MAAM,EACZ,KAAK,iBAAiB,KACrB,OAOF,CAAA"}
|
||||
24
node_modules/rimraf/dist/commonjs/rimraf-native.js
generated
vendored
Normal file
24
node_modules/rimraf/dist/commonjs/rimraf-native.js
generated
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.rimrafNativeSync = exports.rimrafNative = void 0;
|
||||
const fs_js_1 = require("./fs.js");
|
||||
const { rm } = fs_js_1.promises;
|
||||
const rimrafNative = async (path, opt) => {
|
||||
await rm(path, {
|
||||
...opt,
|
||||
force: true,
|
||||
recursive: true,
|
||||
});
|
||||
return true;
|
||||
};
|
||||
exports.rimrafNative = rimrafNative;
|
||||
const rimrafNativeSync = (path, opt) => {
|
||||
(0, fs_js_1.rmSync)(path, {
|
||||
...opt,
|
||||
force: true,
|
||||
recursive: true,
|
||||
});
|
||||
return true;
|
||||
};
|
||||
exports.rimrafNativeSync = rimrafNativeSync;
|
||||
//# sourceMappingURL=rimraf-native.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/rimraf-native.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/rimraf-native.js.map
generated
vendored
Normal file
|
|
@ -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"]}
|
||||
4
node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts
generated
vendored
Normal file
4
node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import { RimrafAsyncOptions, RimrafSyncOptions } from './index.js';
|
||||
export declare const rimrafPosix: (path: string, opt: RimrafAsyncOptions) => Promise<boolean>;
|
||||
export declare const rimrafPosixSync: (path: string, opt: RimrafSyncOptions) => boolean;
|
||||
//# sourceMappingURL=rimraf-posix.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"rimraf-posix.d.ts","sourceRoot":"","sources":["../../src/rimraf-posix.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAKlE,eAAO,MAAM,WAAW,GACtB,MAAM,MAAM,EACZ,KAAK,kBAAkB,qBAQxB,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,EAAE,KAAK,iBAAiB,YAOnE,CAAA"}
|
||||
102
node_modules/rimraf/dist/commonjs/rimraf-posix.js
generated
vendored
Normal file
102
node_modules/rimraf/dist/commonjs/rimraf-posix.js
generated
vendored
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
"use strict";
|
||||
// the simple recursive removal, where unlink and rmdir are atomic
|
||||
// Note that this approach does NOT work on Windows!
|
||||
// We stat first and only unlink if the Dirent isn't a directory,
|
||||
// because sunos will let root unlink a directory, and some
|
||||
// SUPER weird breakage happens as a result.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.rimrafPosixSync = exports.rimrafPosix = void 0;
|
||||
const fs_js_1 = require("./fs.js");
|
||||
const path_1 = require("path");
|
||||
const readdir_or_error_js_1 = require("./readdir-or-error.js");
|
||||
const ignore_enoent_js_1 = require("./ignore-enoent.js");
|
||||
const error_js_1 = require("./error.js");
|
||||
const { lstat, rmdir, unlink } = fs_js_1.promises;
|
||||
const rimrafPosix = async (path, opt) => {
|
||||
opt?.signal?.throwIfAborted();
|
||||
return ((await (0, ignore_enoent_js_1.ignoreENOENT)(lstat(path).then(stat => rimrafPosixDir(path, opt, stat)))) ?? true);
|
||||
};
|
||||
exports.rimrafPosix = rimrafPosix;
|
||||
const rimrafPosixSync = (path, opt) => {
|
||||
opt?.signal?.throwIfAborted();
|
||||
return ((0, ignore_enoent_js_1.ignoreENOENTSync)(() => rimrafPosixDirSync(path, opt, (0, fs_js_1.lstatSync)(path))) ?? true);
|
||||
};
|
||||
exports.rimrafPosixSync = rimrafPosixSync;
|
||||
const rimrafPosixDir = async (path, opt, ent) => {
|
||||
opt?.signal?.throwIfAborted();
|
||||
const entries = ent.isDirectory() ? await (0, readdir_or_error_js_1.readdirOrError)(path) : null;
|
||||
if (!Array.isArray(entries)) {
|
||||
// this can only happen if lstat/readdir lied, or if the dir was
|
||||
// swapped out with a file at just the right moment.
|
||||
/* c8 ignore start */
|
||||
if (entries) {
|
||||
if ((0, error_js_1.errorCode)(entries) === 'ENOENT') {
|
||||
return true;
|
||||
}
|
||||
if ((0, error_js_1.errorCode)(entries) !== 'ENOTDIR') {
|
||||
throw entries;
|
||||
}
|
||||
}
|
||||
/* c8 ignore stop */
|
||||
if (opt.filter && !(await opt.filter(path, ent))) {
|
||||
return false;
|
||||
}
|
||||
await (0, ignore_enoent_js_1.ignoreENOENT)(unlink(path));
|
||||
return true;
|
||||
}
|
||||
const removedAll = (await Promise.all(entries.map(ent => rimrafPosixDir((0, path_1.resolve)(path, ent.name), opt, ent)))).every(v => v === true);
|
||||
if (!removedAll) {
|
||||
return false;
|
||||
}
|
||||
// we don't ever ACTUALLY try to unlink /, because that can never work
|
||||
// but when preserveRoot is false, we could be operating on it.
|
||||
// No need to check if preserveRoot is not false.
|
||||
if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) {
|
||||
return false;
|
||||
}
|
||||
if (opt.filter && !(await opt.filter(path, ent))) {
|
||||
return false;
|
||||
}
|
||||
await (0, ignore_enoent_js_1.ignoreENOENT)(rmdir(path));
|
||||
return true;
|
||||
};
|
||||
const rimrafPosixDirSync = (path, opt, ent) => {
|
||||
opt?.signal?.throwIfAborted();
|
||||
const entries = ent.isDirectory() ? (0, readdir_or_error_js_1.readdirOrErrorSync)(path) : null;
|
||||
if (!Array.isArray(entries)) {
|
||||
// this can only happen if lstat/readdir lied, or if the dir was
|
||||
// swapped out with a file at just the right moment.
|
||||
/* c8 ignore start */
|
||||
if (entries) {
|
||||
if ((0, error_js_1.errorCode)(entries) === 'ENOENT') {
|
||||
return true;
|
||||
}
|
||||
if ((0, error_js_1.errorCode)(entries) !== 'ENOTDIR') {
|
||||
throw entries;
|
||||
}
|
||||
}
|
||||
/* c8 ignore stop */
|
||||
if (opt.filter && !opt.filter(path, ent)) {
|
||||
return false;
|
||||
}
|
||||
(0, ignore_enoent_js_1.ignoreENOENTSync)(() => (0, fs_js_1.unlinkSync)(path));
|
||||
return true;
|
||||
}
|
||||
let removedAll = true;
|
||||
for (const ent of entries) {
|
||||
const p = (0, path_1.resolve)(path, ent.name);
|
||||
removedAll = rimrafPosixDirSync(p, opt, ent) && removedAll;
|
||||
}
|
||||
if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) {
|
||||
return false;
|
||||
}
|
||||
if (!removedAll) {
|
||||
return false;
|
||||
}
|
||||
if (opt.filter && !opt.filter(path, ent)) {
|
||||
return false;
|
||||
}
|
||||
(0, ignore_enoent_js_1.ignoreENOENTSync)(() => (0, fs_js_1.rmdirSync)(path));
|
||||
return true;
|
||||
};
|
||||
//# sourceMappingURL=rimraf-posix.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/rimraf-posix.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/rimraf-posix.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4
node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts
generated
vendored
Normal file
4
node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import { RimrafAsyncOptions, RimrafSyncOptions } from './index.js';
|
||||
export declare const rimrafWindows: (path: string, opt: RimrafAsyncOptions) => Promise<boolean>;
|
||||
export declare const rimrafWindowsSync: (path: string, opt: RimrafSyncOptions) => boolean;
|
||||
//# sourceMappingURL=rimraf-windows.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts.map
generated
vendored
Normal file
|
|
@ -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,GACxB,MAAM,MAAM,EACZ,KAAK,kBAAkB,qBAQxB,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,MAAM,MAAM,EACZ,KAAK,iBAAiB,YAQvB,CAAA"}
|
||||
159
node_modules/rimraf/dist/commonjs/rimraf-windows.js
generated
vendored
Normal file
159
node_modules/rimraf/dist/commonjs/rimraf-windows.js
generated
vendored
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
"use strict";
|
||||
// This is the same as rimrafPosix, with the following changes:
|
||||
//
|
||||
// 1. EBUSY, ENFILE, EMFILE trigger retries and/or exponential backoff
|
||||
// 2. All non-directories are removed first and then all directories are
|
||||
// removed in a second sweep.
|
||||
// 3. If we hit ENOTEMPTY in the second sweep, fall back to move-remove on
|
||||
// the that folder.
|
||||
//
|
||||
// Note: "move then remove" is 2-10 times slower, and just as unreliable.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.rimrafWindowsSync = exports.rimrafWindows = void 0;
|
||||
const path_1 = require("path");
|
||||
const fix_eperm_js_1 = require("./fix-eperm.js");
|
||||
const fs_js_1 = require("./fs.js");
|
||||
const ignore_enoent_js_1 = require("./ignore-enoent.js");
|
||||
const readdir_or_error_js_1 = require("./readdir-or-error.js");
|
||||
const retry_busy_js_1 = require("./retry-busy.js");
|
||||
const rimraf_move_remove_js_1 = require("./rimraf-move-remove.js");
|
||||
const error_js_1 = require("./error.js");
|
||||
const { unlink, rmdir, lstat } = fs_js_1.promises;
|
||||
const rimrafWindowsFile = (0, retry_busy_js_1.retryBusy)((0, fix_eperm_js_1.fixEPERM)(unlink));
|
||||
const rimrafWindowsFileSync = (0, retry_busy_js_1.retryBusySync)((0, fix_eperm_js_1.fixEPERMSync)(fs_js_1.unlinkSync));
|
||||
const rimrafWindowsDirRetry = (0, retry_busy_js_1.retryBusy)((0, fix_eperm_js_1.fixEPERM)(rmdir));
|
||||
const rimrafWindowsDirRetrySync = (0, retry_busy_js_1.retryBusySync)((0, fix_eperm_js_1.fixEPERMSync)(fs_js_1.rmdirSync));
|
||||
const rimrafWindowsDirMoveRemoveFallback = async (path,
|
||||
// already filtered, remove from options so we don't call unnecessarily
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
{ filter, ...opt }) => {
|
||||
/* c8 ignore next */
|
||||
opt?.signal?.throwIfAborted();
|
||||
try {
|
||||
await rimrafWindowsDirRetry(path, opt);
|
||||
return true;
|
||||
}
|
||||
catch (er) {
|
||||
if ((0, error_js_1.errorCode)(er) === 'ENOTEMPTY') {
|
||||
return (0, rimraf_move_remove_js_1.rimrafMoveRemove)(path, opt);
|
||||
}
|
||||
throw er;
|
||||
}
|
||||
};
|
||||
const rimrafWindowsDirMoveRemoveFallbackSync = (path,
|
||||
// already filtered, remove from options so we don't call unnecessarily
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
{ filter, ...opt }) => {
|
||||
opt?.signal?.throwIfAborted();
|
||||
try {
|
||||
rimrafWindowsDirRetrySync(path, opt);
|
||||
return true;
|
||||
}
|
||||
catch (er) {
|
||||
if ((0, error_js_1.errorCode)(er) === 'ENOTEMPTY') {
|
||||
return (0, rimraf_move_remove_js_1.rimrafMoveRemoveSync)(path, opt);
|
||||
}
|
||||
throw er;
|
||||
}
|
||||
};
|
||||
const START = Symbol('start');
|
||||
const CHILD = Symbol('child');
|
||||
const FINISH = Symbol('finish');
|
||||
const rimrafWindows = async (path, opt) => {
|
||||
opt?.signal?.throwIfAborted();
|
||||
return ((await (0, ignore_enoent_js_1.ignoreENOENT)(lstat(path).then(stat => rimrafWindowsDir(path, opt, stat, START)))) ?? true);
|
||||
};
|
||||
exports.rimrafWindows = rimrafWindows;
|
||||
const rimrafWindowsSync = (path, opt) => {
|
||||
opt?.signal?.throwIfAborted();
|
||||
return ((0, ignore_enoent_js_1.ignoreENOENTSync)(() => rimrafWindowsDirSync(path, opt, (0, fs_js_1.lstatSync)(path), START)) ?? true);
|
||||
};
|
||||
exports.rimrafWindowsSync = rimrafWindowsSync;
|
||||
const rimrafWindowsDir = async (path, opt, ent, state = START) => {
|
||||
opt?.signal?.throwIfAborted();
|
||||
const entries = ent.isDirectory() ? await (0, readdir_or_error_js_1.readdirOrError)(path) : null;
|
||||
if (!Array.isArray(entries)) {
|
||||
// this can only happen if lstat/readdir lied, or if the dir was
|
||||
// swapped out with a file at just the right moment.
|
||||
/* c8 ignore start */
|
||||
if (entries) {
|
||||
if ((0, error_js_1.errorCode)(entries) === 'ENOENT') {
|
||||
return true;
|
||||
}
|
||||
if ((0, error_js_1.errorCode)(entries) !== 'ENOTDIR') {
|
||||
throw entries;
|
||||
}
|
||||
}
|
||||
/* c8 ignore stop */
|
||||
if (opt.filter && !(await opt.filter(path, ent))) {
|
||||
return false;
|
||||
}
|
||||
// is a file
|
||||
await (0, ignore_enoent_js_1.ignoreENOENT)(rimrafWindowsFile(path, opt));
|
||||
return true;
|
||||
}
|
||||
const s = state === START ? CHILD : state;
|
||||
const removedAll = (await Promise.all(entries.map(ent => rimrafWindowsDir((0, path_1.resolve)(path, ent.name), opt, ent, s)))).every(v => v === true);
|
||||
if (state === START) {
|
||||
return rimrafWindowsDir(path, opt, ent, FINISH);
|
||||
}
|
||||
else if (state === FINISH) {
|
||||
if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) {
|
||||
return false;
|
||||
}
|
||||
if (!removedAll) {
|
||||
return false;
|
||||
}
|
||||
if (opt.filter && !(await opt.filter(path, ent))) {
|
||||
return false;
|
||||
}
|
||||
await (0, ignore_enoent_js_1.ignoreENOENT)(rimrafWindowsDirMoveRemoveFallback(path, opt));
|
||||
}
|
||||
return true;
|
||||
};
|
||||
const rimrafWindowsDirSync = (path, opt, ent, state = START) => {
|
||||
const entries = ent.isDirectory() ? (0, readdir_or_error_js_1.readdirOrErrorSync)(path) : null;
|
||||
if (!Array.isArray(entries)) {
|
||||
// this can only happen if lstat/readdir lied, or if the dir was
|
||||
// swapped out with a file at just the right moment.
|
||||
/* c8 ignore start */
|
||||
if (entries) {
|
||||
if ((0, error_js_1.errorCode)(entries) === 'ENOENT') {
|
||||
return true;
|
||||
}
|
||||
if ((0, error_js_1.errorCode)(entries) !== 'ENOTDIR') {
|
||||
throw entries;
|
||||
}
|
||||
}
|
||||
/* c8 ignore stop */
|
||||
if (opt.filter && !opt.filter(path, ent)) {
|
||||
return false;
|
||||
}
|
||||
// is a file
|
||||
(0, ignore_enoent_js_1.ignoreENOENTSync)(() => rimrafWindowsFileSync(path, opt));
|
||||
return true;
|
||||
}
|
||||
let removedAll = true;
|
||||
for (const ent of entries) {
|
||||
const s = state === START ? CHILD : state;
|
||||
const p = (0, path_1.resolve)(path, ent.name);
|
||||
removedAll = rimrafWindowsDirSync(p, opt, ent, s) && removedAll;
|
||||
}
|
||||
if (state === START) {
|
||||
return rimrafWindowsDirSync(path, opt, ent, FINISH);
|
||||
}
|
||||
else if (state === FINISH) {
|
||||
if (opt.preserveRoot === false && path === (0, path_1.parse)(path).root) {
|
||||
return false;
|
||||
}
|
||||
if (!removedAll) {
|
||||
return false;
|
||||
}
|
||||
if (opt.filter && !opt.filter(path, ent)) {
|
||||
return false;
|
||||
}
|
||||
(0, ignore_enoent_js_1.ignoreENOENTSync)(() => rimrafWindowsDirMoveRemoveFallbackSync(path, opt));
|
||||
}
|
||||
return true;
|
||||
};
|
||||
//# sourceMappingURL=rimraf-windows.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/rimraf-windows.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/rimraf-windows.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4
node_modules/rimraf/dist/commonjs/use-native.d.ts
generated
vendored
Normal file
4
node_modules/rimraf/dist/commonjs/use-native.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import { RimrafAsyncOptions, RimrafOptions } from './index.js';
|
||||
export declare const useNative: (opt?: RimrafAsyncOptions) => boolean;
|
||||
export declare const useNativeSync: (opt?: RimrafOptions) => boolean;
|
||||
//# sourceMappingURL=use-native.d.ts.map
|
||||
1
node_modules/rimraf/dist/commonjs/use-native.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/use-native.d.ts.map
generated
vendored
Normal file
|
|
@ -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;AAW9D,eAAO,MAAM,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,kBAAkB,KAAK,OAGf,CAAA;AACvC,eAAO,MAAM,aAAa,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,KAAK,OAGd,CAAA"}
|
||||
18
node_modules/rimraf/dist/commonjs/use-native.js
generated
vendored
Normal file
18
node_modules/rimraf/dist/commonjs/use-native.js
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.useNativeSync = exports.useNative = void 0;
|
||||
/* c8 ignore next */
|
||||
const [major = 0, minor = 0] = process.version
|
||||
.replace(/^v/, '')
|
||||
.split('.')
|
||||
.map(v => parseInt(v, 10));
|
||||
const hasNative = major > 14 || (major === 14 && minor >= 14);
|
||||
// we do NOT use native by default on Windows, because Node's native
|
||||
// rm implementation is less advanced. Change this code if that changes.
|
||||
exports.useNative = !hasNative || process.platform === 'win32' ?
|
||||
() => false
|
||||
: opt => !opt?.signal && !opt?.filter;
|
||||
exports.useNativeSync = !hasNative || process.platform === 'win32' ?
|
||||
() => false
|
||||
: opt => !opt?.signal && !opt?.filter;
|
||||
//# sourceMappingURL=use-native.js.map
|
||||
1
node_modules/rimraf/dist/commonjs/use-native.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/commonjs/use-native.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"use-native.js","sourceRoot":"","sources":["../../src/use-native.ts"],"names":[],"mappings":";;;AAEA,oBAAoB;AACpB,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO;KAC3C,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;KACjB,KAAK,CAAC,GAAG,CAAC;KACV,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AAC5B,MAAM,SAAS,GAAG,KAAK,GAAG,EAAE,IAAI,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,IAAI,EAAE,CAAC,CAAA;AAE7D,oEAAoE;AACpE,yEAAyE;AAC5D,QAAA,SAAS,GACpB,CAAC,SAAS,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;IAC1C,GAAG,EAAE,CAAC,KAAK;IACb,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,IAAI,CAAC,GAAG,EAAE,MAAM,CAAA;AAC1B,QAAA,aAAa,GACxB,CAAC,SAAS,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;IAC1C,GAAG,EAAE,CAAC,KAAK;IACb,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,IAAI,CAAC,GAAG,EAAE,MAAM,CAAA","sourcesContent":["import { RimrafAsyncOptions, RimrafOptions } from './index.js'\n\n/* c8 ignore next */\nconst [major = 0, minor = 0] = process.version\n .replace(/^v/, '')\n .split('.')\n .map(v => parseInt(v, 10))\nconst hasNative = major > 14 || (major === 14 && minor >= 14)\n\n// we do NOT use native by default on Windows, because Node's native\n// rm implementation is less advanced. Change this code if that changes.\nexport const useNative: (opt?: RimrafAsyncOptions) => boolean =\n !hasNative || process.platform === 'win32' ?\n () => false\n : opt => !opt?.signal && !opt?.filter\nexport const useNativeSync: (opt?: RimrafOptions) => boolean =\n !hasNative || process.platform === 'win32' ?\n () => false\n : opt => !opt?.signal && !opt?.filter\n"]}
|
||||
3
node_modules/rimraf/dist/esm/bin.d.mts
generated
vendored
Normal file
3
node_modules/rimraf/dist/esm/bin.d.mts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env node
|
||||
export {};
|
||||
//# sourceMappingURL=bin.d.mts.map
|
||||
1
node_modules/rimraf/dist/esm/bin.d.mts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/bin.d.mts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"bin.d.mts","sourceRoot":"","sources":["../../src/bin.mts"],"names":[],"mappings":""}
|
||||
250
node_modules/rimraf/dist/esm/bin.mjs
generated
vendored
Executable file
250
node_modules/rimraf/dist/esm/bin.mjs
generated
vendored
Executable file
|
|
@ -0,0 +1,250 @@
|
|||
#!/usr/bin/env node
|
||||
import { rimraf } from './index.js';
|
||||
import { loadPackageJson } from 'package-json-from-dist';
|
||||
const { version } = loadPackageJson(import.meta.url, '../package.json');
|
||||
const runHelpForUsage = () => console.error('run `rimraf --help` for usage information');
|
||||
const help = `rimraf version ${version}
|
||||
|
||||
Usage: rimraf <path> [<path> ...]
|
||||
Deletes all files and folders at "path", recursively.
|
||||
|
||||
Options:
|
||||
-- Treat all subsequent arguments as paths
|
||||
-h --help Display this usage info
|
||||
--version Display version
|
||||
--preserve-root Do not remove '/' recursively (default)
|
||||
--no-preserve-root Do not treat '/' specially
|
||||
-G --no-glob Treat arguments as literal paths, not globs (default)
|
||||
-g --glob Treat arguments as glob patterns
|
||||
-v --verbose Be verbose when deleting files, showing them as
|
||||
they are removed. Not compatible with --impl=native
|
||||
-V --no-verbose Be silent when deleting files, showing nothing as
|
||||
they are removed (default)
|
||||
-i --interactive Ask for confirmation before deleting anything
|
||||
Not compatible with --impl=native
|
||||
-I --no-interactive Do not ask for confirmation before deleting
|
||||
|
||||
--impl=<type> Specify the implementation to use:
|
||||
rimraf: choose the best option (default)
|
||||
native: the built-in implementation in Node.js
|
||||
manual: the platform-specific JS implementation
|
||||
posix: the Posix JS implementation
|
||||
windows: the Windows JS implementation (falls back to
|
||||
move-remove on ENOTEMPTY)
|
||||
move-remove: a slow reliable Windows fallback
|
||||
|
||||
Implementation-specific options:
|
||||
--tmp=<path> Temp file folder for 'move-remove' implementation
|
||||
--max-retries=<n> maxRetries for 'native' and 'windows' implementations
|
||||
--retry-delay=<n> retryDelay for 'native' implementation, default 100
|
||||
--backoff=<n> Exponential backoff factor for retries (default: 1.2)
|
||||
`;
|
||||
import { parse, relative, resolve } from 'path';
|
||||
const cwd = process.cwd();
|
||||
import { createInterface } from 'readline';
|
||||
const prompt = async (rl, q) => new Promise(res => rl.question(q, res));
|
||||
const interactiveRimraf = async (impl, paths, opt) => {
|
||||
const existingFilter = opt.filter || (() => true);
|
||||
let allRemaining = false;
|
||||
let noneRemaining = false;
|
||||
const queue = [];
|
||||
let processing = false;
|
||||
const processQueue = async () => {
|
||||
if (processing)
|
||||
return;
|
||||
processing = true;
|
||||
let next;
|
||||
while ((next = queue.shift())) {
|
||||
await next();
|
||||
}
|
||||
processing = false;
|
||||
};
|
||||
const oneAtATime = (fn) => async (s, e) => {
|
||||
const p = new Promise(res => {
|
||||
queue.push(async () => {
|
||||
const result = await fn(s, e);
|
||||
res(result);
|
||||
return result;
|
||||
});
|
||||
});
|
||||
void processQueue();
|
||||
return p;
|
||||
};
|
||||
const rl = createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout,
|
||||
});
|
||||
opt.filter = oneAtATime(async (path, ent) => {
|
||||
if (noneRemaining) {
|
||||
return false;
|
||||
}
|
||||
while (!allRemaining) {
|
||||
const a = (await prompt(rl, `rm? ${relative(cwd, path)}\n[(Yes)/No/All/Quit] > `)).trim();
|
||||
if (/^n/i.test(a)) {
|
||||
return false;
|
||||
}
|
||||
else if (/^a/i.test(a)) {
|
||||
allRemaining = true;
|
||||
break;
|
||||
}
|
||||
else if (/^q/i.test(a)) {
|
||||
noneRemaining = true;
|
||||
return false;
|
||||
}
|
||||
else if (a === '' || /^y/i.test(a)) {
|
||||
break;
|
||||
}
|
||||
else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return existingFilter(path, ent);
|
||||
});
|
||||
await impl(paths, opt);
|
||||
rl.close();
|
||||
};
|
||||
const main = async (...args) => {
|
||||
const verboseFilter = (s) => {
|
||||
console.log(relative(cwd, s));
|
||||
return true;
|
||||
};
|
||||
const opt = {};
|
||||
const paths = [];
|
||||
let dashdash = false;
|
||||
let impl = rimraf;
|
||||
let interactive = false;
|
||||
for (const arg of args) {
|
||||
if (dashdash) {
|
||||
paths.push(arg);
|
||||
continue;
|
||||
}
|
||||
if (arg === '--') {
|
||||
dashdash = true;
|
||||
continue;
|
||||
}
|
||||
else if (arg === '-rf' || arg === '-fr') {
|
||||
// this never did anything, but people put it there I guess
|
||||
continue;
|
||||
}
|
||||
else if (arg === '-h' || arg === '--help') {
|
||||
console.log(help);
|
||||
return 0;
|
||||
}
|
||||
else if (arg === '--version') {
|
||||
console.log(version);
|
||||
return 0;
|
||||
}
|
||||
else if (arg === '--interactive' || arg === '-i') {
|
||||
interactive = true;
|
||||
continue;
|
||||
}
|
||||
else if (arg === '--no-interactive' || arg === '-I') {
|
||||
interactive = false;
|
||||
continue;
|
||||
}
|
||||
else if (arg === '--verbose' || arg === '-v') {
|
||||
opt.filter = verboseFilter;
|
||||
continue;
|
||||
}
|
||||
else if (arg === '--no-verbose' || arg === '-V') {
|
||||
opt.filter = undefined;
|
||||
continue;
|
||||
}
|
||||
else if (arg === '-g' || arg === '--glob') {
|
||||
opt.glob = true;
|
||||
continue;
|
||||
}
|
||||
else if (arg === '-G' || arg === '--no-glob') {
|
||||
opt.glob = false;
|
||||
continue;
|
||||
}
|
||||
else if (arg === '--preserve-root') {
|
||||
opt.preserveRoot = true;
|
||||
continue;
|
||||
}
|
||||
else if (arg === '--no-preserve-root') {
|
||||
opt.preserveRoot = false;
|
||||
continue;
|
||||
}
|
||||
else if (/^--tmp=/.test(arg)) {
|
||||
const val = arg.substring('--tmp='.length);
|
||||
opt.tmp = val;
|
||||
continue;
|
||||
}
|
||||
else if (/^--max-retries=/.test(arg)) {
|
||||
const val = +arg.substring('--max-retries='.length);
|
||||
opt.maxRetries = val;
|
||||
continue;
|
||||
}
|
||||
else if (/^--retry-delay=/.test(arg)) {
|
||||
const val = +arg.substring('--retry-delay='.length);
|
||||
opt.retryDelay = val;
|
||||
continue;
|
||||
}
|
||||
else if (/^--backoff=/.test(arg)) {
|
||||
const val = +arg.substring('--backoff='.length);
|
||||
opt.backoff = val;
|
||||
continue;
|
||||
}
|
||||
else if (/^--impl=/.test(arg)) {
|
||||
const val = arg.substring('--impl='.length);
|
||||
switch (val) {
|
||||
case 'rimraf':
|
||||
impl = rimraf;
|
||||
continue;
|
||||
case 'native':
|
||||
case 'manual':
|
||||
case 'posix':
|
||||
case 'windows':
|
||||
impl = rimraf[val];
|
||||
continue;
|
||||
case 'move-remove':
|
||||
impl = rimraf.moveRemove;
|
||||
continue;
|
||||
default:
|
||||
console.error(`unknown implementation: ${val}`);
|
||||
runHelpForUsage();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (/^-/.test(arg)) {
|
||||
console.error(`unknown option: ${arg}`);
|
||||
runHelpForUsage();
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
paths.push(arg);
|
||||
}
|
||||
}
|
||||
if (opt.preserveRoot !== false) {
|
||||
for (const path of paths.map(p => resolve(p))) {
|
||||
if (path === parse(path).root) {
|
||||
console.error(`rimraf: it is dangerous to operate recursively on '/'`);
|
||||
console.error('use --no-preserve-root to override this failsafe');
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!paths.length) {
|
||||
console.error('rimraf: must provide a path to remove');
|
||||
runHelpForUsage();
|
||||
return 1;
|
||||
}
|
||||
if (impl === rimraf.native && (interactive || opt.filter)) {
|
||||
console.error('native implementation does not support -v or -i');
|
||||
runHelpForUsage();
|
||||
return 1;
|
||||
}
|
||||
if (interactive) {
|
||||
await interactiveRimraf(impl, paths, opt);
|
||||
}
|
||||
else {
|
||||
await impl(paths, opt);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
main(...process.argv.slice(2)).then(code => process.exit(code), er => {
|
||||
console.error(er);
|
||||
process.exit(1);
|
||||
});
|
||||
//# sourceMappingURL=bin.mjs.map
|
||||
1
node_modules/rimraf/dist/esm/bin.mjs.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/bin.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/rimraf/dist/esm/default-tmp.d.ts
generated
vendored
Normal file
3
node_modules/rimraf/dist/esm/default-tmp.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export declare const defaultTmp: (path: string) => Promise<string>;
|
||||
export declare const defaultTmpSync: (path: string) => string;
|
||||
//# sourceMappingURL=default-tmp.d.ts.map
|
||||
1
node_modules/rimraf/dist/esm/default-tmp.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/default-tmp.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"default-tmp.d.ts","sourceRoot":"","sources":["../../src/default-tmp.ts"],"names":[],"mappings":"AAiEA,eAAO,MAAM,UAAU,SApCc,MAAM,oBAqCuB,CAAA;AAClE,eAAO,MAAM,cAAc,SAtBQ,MAAM,WAuBiC,CAAA"}
|
||||
55
node_modules/rimraf/dist/esm/default-tmp.js
generated
vendored
Normal file
55
node_modules/rimraf/dist/esm/default-tmp.js
generated
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
// The default temporary folder location for use in the windows algorithm.
|
||||
// It's TEMPting to use dirname(path), since that's guaranteed to be on the
|
||||
// same device. However, this means that:
|
||||
// rimraf(path).then(() => rimraf(dirname(path)))
|
||||
// will often fail with EBUSY, because the parent dir contains
|
||||
// marked-for-deletion directory entries (which do not show up in readdir).
|
||||
// The approach here is to use os.tmpdir() if it's on the same drive letter,
|
||||
// or resolve(path, '\\temp') if it exists, or the root of the drive if not.
|
||||
// On Posix (not that you'd be likely to use the windows algorithm there),
|
||||
// it uses os.tmpdir() always.
|
||||
import { tmpdir } from 'os';
|
||||
import { parse, resolve } from 'path';
|
||||
import { promises, statSync } from './fs.js';
|
||||
const { stat } = promises;
|
||||
const isDirSync = (path) => {
|
||||
try {
|
||||
return statSync(path).isDirectory();
|
||||
}
|
||||
catch {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
const isDir = (path) => stat(path).then(st => st.isDirectory(), () => false);
|
||||
const win32DefaultTmp = async (path) => {
|
||||
const { root } = parse(path);
|
||||
const tmp = tmpdir();
|
||||
const { root: tmpRoot } = parse(tmp);
|
||||
if (root.toLowerCase() === tmpRoot.toLowerCase()) {
|
||||
return tmp;
|
||||
}
|
||||
const driveTmp = resolve(root, '/temp');
|
||||
if (await isDir(driveTmp)) {
|
||||
return driveTmp;
|
||||
}
|
||||
return root;
|
||||
};
|
||||
const win32DefaultTmpSync = (path) => {
|
||||
const { root } = parse(path);
|
||||
const tmp = tmpdir();
|
||||
const { root: tmpRoot } = parse(tmp);
|
||||
if (root.toLowerCase() === tmpRoot.toLowerCase()) {
|
||||
return tmp;
|
||||
}
|
||||
const driveTmp = resolve(root, '/temp');
|
||||
if (isDirSync(driveTmp)) {
|
||||
return driveTmp;
|
||||
}
|
||||
return root;
|
||||
};
|
||||
// eslint-disable-next-line @typescript-eslint/require-await
|
||||
const posixDefaultTmp = async () => tmpdir();
|
||||
const posixDefaultTmpSync = () => tmpdir();
|
||||
export const defaultTmp = process.platform === 'win32' ? win32DefaultTmp : posixDefaultTmp;
|
||||
export const defaultTmpSync = process.platform === 'win32' ? win32DefaultTmpSync : posixDefaultTmpSync;
|
||||
//# sourceMappingURL=default-tmp.js.map
|
||||
1
node_modules/rimraf/dist/esm/default-tmp.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm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CAAA;IACZ,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACvC,IAAI,MAAM,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAE,EAAE;IAC3C,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;IAC5B,MAAM,GAAG,GAAG,MAAM,EAAE,CAAA;IACpB,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;IACpC,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;QACjD,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACvC,IAAI,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxB,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,4DAA4D;AAC5D,MAAM,eAAe,GAAG,KAAK,IAAI,EAAE,CAAC,MAAM,EAAE,CAAA;AAC5C,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,MAAM,EAAE,CAAA;AAE1C,MAAM,CAAC,MAAM,UAAU,GACrB,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAA;AAClE,MAAM,CAAC,MAAM,cAAc,GACzB,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAA","sourcesContent":["// The default temporary folder location for use in the windows algorithm.\n// It's TEMPting to use dirname(path), since that's guaranteed to be on the\n// same device. However, this means that:\n// rimraf(path).then(() => rimraf(dirname(path)))\n// will often fail with EBUSY, because the parent dir contains\n// marked-for-deletion directory entries (which do not show up in readdir).\n// The approach here is to use os.tmpdir() if it's on the same drive letter,\n// or resolve(path, '\\\\temp') if it exists, or the root of the drive if not.\n// On Posix (not that you'd be likely to use the windows algorithm there),\n// it uses os.tmpdir() always.\nimport { tmpdir } from 'os'\nimport { parse, resolve } from 'path'\nimport { promises, statSync } from './fs.js'\nconst { stat } = promises\n\nconst isDirSync = (path: string) => {\n try {\n return statSync(path).isDirectory()\n } catch {\n return false\n }\n}\n\nconst isDir = (path: string) =>\n stat(path).then(\n st => st.isDirectory(),\n () => false,\n )\n\nconst win32DefaultTmp = async (path: string) => {\n const { root } = parse(path)\n const tmp = tmpdir()\n const { root: tmpRoot } = parse(tmp)\n if (root.toLowerCase() === tmpRoot.toLowerCase()) {\n return tmp\n }\n\n const driveTmp = resolve(root, '/temp')\n if (await isDir(driveTmp)) {\n return driveTmp\n }\n\n return root\n}\n\nconst win32DefaultTmpSync = (path: string) => {\n const { root } = parse(path)\n const tmp = tmpdir()\n const { root: tmpRoot } = parse(tmp)\n if (root.toLowerCase() === tmpRoot.toLowerCase()) {\n return tmp\n }\n\n const driveTmp = resolve(root, '/temp')\n if (isDirSync(driveTmp)) {\n return driveTmp\n }\n\n return root\n}\n\n// eslint-disable-next-line @typescript-eslint/require-await\nconst posixDefaultTmp = async () => tmpdir()\nconst posixDefaultTmpSync = () => tmpdir()\n\nexport const defaultTmp =\n process.platform === 'win32' ? win32DefaultTmp : posixDefaultTmp\nexport const defaultTmpSync =\n process.platform === 'win32' ? win32DefaultTmpSync : posixDefaultTmpSync\n"]}
|
||||
6
node_modules/rimraf/dist/esm/error.d.ts
generated
vendored
Normal file
6
node_modules/rimraf/dist/esm/error.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export declare const isFsError: (o: unknown) => o is NodeJS.ErrnoException & {
|
||||
code: string;
|
||||
path: string;
|
||||
};
|
||||
export declare const errorCode: (er: unknown) => unknown;
|
||||
//# sourceMappingURL=error.d.ts.map
|
||||
1
node_modules/rimraf/dist/esm/error.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/error.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS,GACpB,GAAG,OAAO,KACT,CAAC,IAAI,MAAM,CAAC,cAAc,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACkD,CAAA;AAEhE,eAAO,MAAM,SAAS,GAAI,IAAI,OAAO,YACmB,CAAA"}
|
||||
5
node_modules/rimraf/dist/esm/error.js
generated
vendored
Normal file
5
node_modules/rimraf/dist/esm/error.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
const isRecord = (o) => !!o && typeof o === 'object';
|
||||
const hasString = (o, key) => key in o && typeof o[key] === 'string';
|
||||
export const isFsError = (o) => isRecord(o) && hasString(o, 'code') && hasString(o, 'path');
|
||||
export const errorCode = (er) => isRecord(er) && hasString(er, 'code') ? er.code : null;
|
||||
//# sourceMappingURL=error.js.map
|
||||
1
node_modules/rimraf/dist/esm/error.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/error.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,CAAC,CAAU,EAAgC,EAAE,CAC5D,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAA;AAE9B,MAAM,SAAS,GAAG,CAAC,CAA0B,EAAE,GAAW,EAAE,EAAE,CAC5D,GAAG,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAA;AAExC,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,CAAU,EAIV,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;AAEhE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAW,EAAE,EAAE,CACvC,QAAQ,CAAC,EAAE,CAAC,IAAI,SAAS,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA","sourcesContent":["const isRecord = (o: unknown): o is Record<string, unknown> =>\n !!o && typeof o === 'object'\n\nconst hasString = (o: Record<string, unknown>, key: string) =>\n key in o && typeof o[key] === 'string'\n\nexport const isFsError = (\n o: unknown,\n): o is NodeJS.ErrnoException & {\n code: string\n path: string\n} => isRecord(o) && hasString(o, 'code') && hasString(o, 'path')\n\nexport const errorCode = (er: unknown) =>\n isRecord(er) && hasString(er, 'code') ? er.code : null\n"]}
|
||||
3
node_modules/rimraf/dist/esm/fix-eperm.d.ts
generated
vendored
Normal file
3
node_modules/rimraf/dist/esm/fix-eperm.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export declare const fixEPERM: (fn: (path: string) => Promise<unknown>) => (path: string) => Promise<void>;
|
||||
export declare const fixEPERMSync: (fn: (path: string) => unknown) => (path: string) => void;
|
||||
//# sourceMappingURL=fix-eperm.d.ts.map
|
||||
1
node_modules/rimraf/dist/esm/fix-eperm.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/fix-eperm.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"fix-eperm.d.ts","sourceRoot":"","sources":["../../src/fix-eperm.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,GAClB,IAAI,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,MAChC,MAAM,MAAM,KAAG,OAAO,CAAC,IAAI,CAiBjC,CAAA;AAEH,eAAO,MAAM,YAAY,GACtB,IAAI,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,MAC7B,MAAM,MAAM,KAAG,IAYf,CAAA"}
|
||||
33
node_modules/rimraf/dist/esm/fix-eperm.js
generated
vendored
Normal file
33
node_modules/rimraf/dist/esm/fix-eperm.js
generated
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { errorCode } from './error.js';
|
||||
import { chmodSync, promises } from './fs.js';
|
||||
import { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js';
|
||||
const { chmod } = promises;
|
||||
export const fixEPERM = (fn) => async (path) => {
|
||||
try {
|
||||
return void (await ignoreENOENT(fn(path)));
|
||||
}
|
||||
catch (er) {
|
||||
if (errorCode(er) === 'EPERM') {
|
||||
if (!(await ignoreENOENT(chmod(path, 0o666).then(() => true), er))) {
|
||||
return;
|
||||
}
|
||||
return void (await fn(path));
|
||||
}
|
||||
throw er;
|
||||
}
|
||||
};
|
||||
export const fixEPERMSync = (fn) => (path) => {
|
||||
try {
|
||||
return void ignoreENOENTSync(() => fn(path));
|
||||
}
|
||||
catch (er) {
|
||||
if (errorCode(er) === 'EPERM') {
|
||||
if (!ignoreENOENTSync(() => (chmodSync(path, 0o666), true), er)) {
|
||||
return;
|
||||
}
|
||||
return void fn(path);
|
||||
}
|
||||
throw er;
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=fix-eperm.js.map
|
||||
1
node_modules/rimraf/dist/esm/fix-eperm.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/fix-eperm.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"fix-eperm.js","sourceRoot":"","sources":["../../src/fix-eperm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,M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,EAAE,CAAC,IAAI,CAAC,CAAA;QACtB,CAAC;QACD,MAAM,EAAE,CAAA;IACV,CAAC;AACH,CAAC,CAAA","sourcesContent":["import { errorCode } from './error.js'\nimport { chmodSync, promises } from './fs.js'\nimport { ignoreENOENT, ignoreENOENTSync } from './ignore-enoent.js'\nconst { chmod } = promises\n\nexport const fixEPERM =\n (fn: (path: string) => Promise<unknown>) =>\n async (path: string): Promise<void> => {\n try {\n return void (await ignoreENOENT(fn(path)))\n } catch (er) {\n if (errorCode(er) === 'EPERM') {\n if (\n !(await ignoreENOENT(\n chmod(path, 0o666).then(() => true),\n er,\n ))\n ) {\n return\n }\n return void (await fn(path))\n }\n throw er\n }\n }\n\nexport const fixEPERMSync =\n (fn: (path: string) => unknown) =>\n (path: string): void => {\n try {\n return void ignoreENOENTSync(() => fn(path))\n } catch (er) {\n if (errorCode(er) === 'EPERM') {\n if (!ignoreENOENTSync(() => (chmodSync(path, 0o666), true), er)) {\n return\n }\n return void fn(path)\n }\n throw er\n }\n }\n"]}
|
||||
16
node_modules/rimraf/dist/esm/fs.d.ts
generated
vendored
Normal file
16
node_modules/rimraf/dist/esm/fs.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import fs, { Dirent } from 'fs';
|
||||
import fsPromises from 'fs/promises';
|
||||
export { chmodSync, mkdirSync, renameSync, rmdirSync, rmSync, statSync, lstatSync, unlinkSync, } from 'fs';
|
||||
export declare const readdirSync: (path: fs.PathLike) => Dirent[];
|
||||
export declare const promises: {
|
||||
chmod: typeof fsPromises.chmod;
|
||||
mkdir: typeof fsPromises.mkdir;
|
||||
readdir: (path: fs.PathLike) => Promise<fs.Dirent<string>[]>;
|
||||
rename: typeof fsPromises.rename;
|
||||
rm: typeof fsPromises.rm;
|
||||
rmdir: typeof fsPromises.rmdir;
|
||||
stat: typeof fsPromises.stat;
|
||||
lstat: typeof fsPromises.lstat;
|
||||
unlink: typeof fsPromises.unlink;
|
||||
};
|
||||
//# sourceMappingURL=fs.d.ts.map
|
||||
1
node_modules/rimraf/dist/esm/fs.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/fs.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,EAAyB,MAAM,IAAI,CAAA;AACtD,OAAO,UAAU,MAAM,aAAa,CAAA;AAKpC,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,GACX,MAAM,IAAI,CAAA;AAEX,eAAO,MAAM,WAAW,GAAI,MAAM,EAAE,CAAC,QAAQ,KAAG,MAAM,EACf,CAAA;AAEvC,eAAO,MAAM,QAAQ;;;oBAGH,EAAE,CAAC,QAAQ;;;;;;;CAQ5B,CAAA"}
|
||||
18
node_modules/rimraf/dist/esm/fs.js
generated
vendored
Normal file
18
node_modules/rimraf/dist/esm/fs.js
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { readdirSync as rdSync } from 'fs';
|
||||
import fsPromises from 'fs/promises';
|
||||
// sync ones just take the sync version from node
|
||||
// readdir forces withFileTypes: true
|
||||
export { chmodSync, mkdirSync, renameSync, rmdirSync, rmSync, statSync, lstatSync, unlinkSync, } from 'fs';
|
||||
export const readdirSync = (path) => rdSync(path, { withFileTypes: true });
|
||||
export const promises = {
|
||||
chmod: fsPromises.chmod,
|
||||
mkdir: fsPromises.mkdir,
|
||||
readdir: (path) => fsPromises.readdir(path, { withFileTypes: true }),
|
||||
rename: fsPromises.rename,
|
||||
rm: fsPromises.rm,
|
||||
rmdir: fsPromises.rmdir,
|
||||
stat: fsPromises.stat,
|
||||
lstat: fsPromises.lstat,
|
||||
unlink: fsPromises.unlink,
|
||||
};
|
||||
//# sourceMappingURL=fs.js.map
|
||||
1
node_modules/rimraf/dist/esm/fs.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/fs.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/fs.ts"],"names":[],"mappings":"AAAA,OAAW,EAAU,WAAW,IAAI,MAAM,EAAE,MAAM,IAAI,CAAA;AACtD,OAAO,UAAU,MAAM,aAAa,CAAA;AAEpC,iDAAiD;AACjD,qCAAqC;AAErC,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,GACX,MAAM,IAAI,CAAA;AAEX,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAiB,EAAY,EAAE,CACzD,MAAM,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AAEvC,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,KAAK,EAAE,UAAU,CAAC,KAAK;IACvB,KAAK,EAAE,UAAU,CAAC,KAAK;IACvB,OAAO,EAAE,CAAC,IAAiB,EAAE,EAAE,CAC7B,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IACnD,MAAM,EAAE,UAAU,CAAC,MAAM;IACzB,EAAE,EAAE,UAAU,CAAC,EAAE;IACjB,KAAK,EAAE,UAAU,CAAC,KAAK;IACvB,IAAI,EAAE,UAAU,CAAC,IAAI;IACrB,KAAK,EAAE,UAAU,CAAC,KAAK;IACvB,MAAM,EAAE,UAAU,CAAC,MAAM;CAC1B,CAAA","sourcesContent":["import fs, { Dirent, readdirSync as rdSync } from 'fs'\nimport fsPromises from 'fs/promises'\n\n// sync ones just take the sync version from node\n// readdir forces withFileTypes: true\n\nexport {\n chmodSync,\n mkdirSync,\n renameSync,\n rmdirSync,\n rmSync,\n statSync,\n lstatSync,\n unlinkSync,\n} from 'fs'\n\nexport const readdirSync = (path: fs.PathLike): Dirent[] =>\n rdSync(path, { withFileTypes: true })\n\nexport const promises = {\n chmod: fsPromises.chmod,\n mkdir: fsPromises.mkdir,\n readdir: (path: fs.PathLike) =>\n fsPromises.readdir(path, { withFileTypes: true }),\n rename: fsPromises.rename,\n rm: fsPromises.rm,\n rmdir: fsPromises.rmdir,\n stat: fsPromises.stat,\n lstat: fsPromises.lstat,\n unlink: fsPromises.unlink,\n}\n"]}
|
||||
3
node_modules/rimraf/dist/esm/ignore-enoent.d.ts
generated
vendored
Normal file
3
node_modules/rimraf/dist/esm/ignore-enoent.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export declare const ignoreENOENT: <T>(p: Promise<T>, rethrow?: unknown) => Promise<void | T>;
|
||||
export declare const ignoreENOENTSync: <T>(fn: () => T, rethrow?: unknown) => T | undefined;
|
||||
//# sourceMappingURL=ignore-enoent.d.ts.map
|
||||
1
node_modules/rimraf/dist/esm/ignore-enoent.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/ignore-enoent.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ignore-enoent.d.ts","sourceRoot":"","sources":["../../src/ignore-enoent.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,GAAU,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,OAAO,sBAMlE,CAAA;AAEJ,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAAE,IAAI,MAAM,CAAC,EAAE,UAAU,OAAO,kBASjE,CAAA"}
|
||||
19
node_modules/rimraf/dist/esm/ignore-enoent.js
generated
vendored
Normal file
19
node_modules/rimraf/dist/esm/ignore-enoent.js
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { errorCode } from './error.js';
|
||||
export const ignoreENOENT = async (p, rethrow) => p.catch(er => {
|
||||
if (errorCode(er) === 'ENOENT') {
|
||||
return;
|
||||
}
|
||||
throw rethrow ?? er;
|
||||
});
|
||||
export const ignoreENOENTSync = (fn, rethrow) => {
|
||||
try {
|
||||
return fn();
|
||||
}
|
||||
catch (er) {
|
||||
if (errorCode(er) === 'ENOENT') {
|
||||
return;
|
||||
}
|
||||
throw rethrow ?? er;
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=ignore-enoent.js.map
|
||||
1
node_modules/rimraf/dist/esm/ignore-enoent.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/ignore-enoent.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ignore-enoent.js","sourceRoot":"","sources":["../../src/ignore-enoent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEtC,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAK,CAAa,EAAE,OAAiB,EAAE,EAAE,CACxE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;IACX,IAAI,SAAS,CAAC,EAAE,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAM;IACR,CAAC;IACD,MAAM,OAAO,IAAI,EAAE,CAAA;AACrB,CAAC,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAI,EAAW,EAAE,OAAiB,EAAE,EAAE;IACpE,IAAI,CAAC;QACH,OAAO,EAAE,EAAE,CAAA;IACb,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,IAAI,SAAS,CAAC,EAAE,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC/B,OAAM;QACR,CAAC;QACD,MAAM,OAAO,IAAI,EAAE,CAAA;IACrB,CAAC;AACH,CAAC,CAAA","sourcesContent":["import { errorCode } from './error.js'\n\nexport const ignoreENOENT = async <T>(p: Promise<T>, rethrow?: unknown) =>\n p.catch(er => {\n if (errorCode(er) === 'ENOENT') {\n return\n }\n throw rethrow ?? er\n })\n\nexport const ignoreENOENTSync = <T>(fn: () => T, rethrow?: unknown) => {\n try {\n return fn()\n } catch (er) {\n if (errorCode(er) === 'ENOENT') {\n return\n }\n throw rethrow ?? er\n }\n}\n"]}
|
||||
50
node_modules/rimraf/dist/esm/index.d.ts
generated
vendored
Normal file
50
node_modules/rimraf/dist/esm/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
import { RimrafAsyncOptions, RimrafSyncOptions } from './opt-arg.js';
|
||||
export { assertRimrafOptions, isRimrafOptions, type RimrafAsyncOptions, type RimrafOptions, type RimrafSyncOptions, } from './opt-arg.js';
|
||||
export declare const nativeSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const native: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
export declare const manualSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const manual: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
export declare const windowsSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const windows: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
export declare const posixSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const posix: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
export declare const moveRemoveSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const moveRemove: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
export declare const rimrafSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
export declare const rimraf: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
rimraf: (path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>;
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
rimrafSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
manual: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
manualSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
native: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
nativeSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
posix: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
posixSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
windows: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
windowsSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
moveRemove: ((path: string | string[], opt?: RimrafAsyncOptions) => Promise<boolean>) & {
|
||||
sync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
moveRemoveSync: (path: string | string[], opt?: RimrafSyncOptions) => boolean;
|
||||
};
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/rimraf/dist/esm/index.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/index.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","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kBAAkB,KACvB,OAAO,CAAC,OAAO,CAAC;qBAgBZ,MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAAO;;sBAApD,MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAAO;qBAlBnD,MAAM,GAAG,MAAM,EAAE,QACjB,kBAAkB,KACvB,OAAO,CAAC,OAAO,CAAC;qBAgBZ,MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAAO;;wBAApD,MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAAO;wBAlBnD,MAAM,GAAG,MAAM,EAAE,QACjB,kBAAkB,KACvB,OAAO,CAAC,OAAO,CAAC;qBAgBZ,MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAAO;;2BAApD,MAAM,GAAG,MAAM,EAAE,QAAQ,iBAAiB,KAAG,OAAO;CA6D3D,CAAA"}
|
||||
76
node_modules/rimraf/dist/esm/index.js
generated
vendored
Normal file
76
node_modules/rimraf/dist/esm/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
import { glob, globSync } from 'glob';
|
||||
import { optArg, optArgSync, } from './opt-arg.js';
|
||||
import pathArg from './path-arg.js';
|
||||
import { rimrafManual, rimrafManualSync } from './rimraf-manual.js';
|
||||
import { rimrafMoveRemove, rimrafMoveRemoveSync, } from './rimraf-move-remove.js';
|
||||
import { rimrafNative, rimrafNativeSync } from './rimraf-native.js';
|
||||
import { rimrafPosix, rimrafPosixSync } from './rimraf-posix.js';
|
||||
import { rimrafWindows, rimrafWindowsSync } from './rimraf-windows.js';
|
||||
import { useNative, useNativeSync } from './use-native.js';
|
||||
export { assertRimrafOptions, isRimrafOptions, } from './opt-arg.js';
|
||||
const wrap = (fn) => async (path, opt) => {
|
||||
const options = optArg(opt);
|
||||
if (options.glob) {
|
||||
path = await glob(path, options.glob);
|
||||
}
|
||||
if (Array.isArray(path)) {
|
||||
return !!(await Promise.all(path.map(p => fn(pathArg(p, options), options)))).reduce((a, b) => a && b, true);
|
||||
}
|
||||
else {
|
||||
return !!(await fn(pathArg(path, options), options));
|
||||
}
|
||||
};
|
||||
const wrapSync = (fn) => (path, opt) => {
|
||||
const options = optArgSync(opt);
|
||||
if (options.glob) {
|
||||
path = globSync(path, options.glob);
|
||||
}
|
||||
if (Array.isArray(path)) {
|
||||
return !!path
|
||||
.map(p => fn(pathArg(p, options), options))
|
||||
.reduce((a, b) => a && b, true);
|
||||
}
|
||||
else {
|
||||
return !!fn(pathArg(path, options), options);
|
||||
}
|
||||
};
|
||||
export const nativeSync = wrapSync(rimrafNativeSync);
|
||||
export const native = Object.assign(wrap(rimrafNative), {
|
||||
sync: nativeSync,
|
||||
});
|
||||
export const manualSync = wrapSync(rimrafManualSync);
|
||||
export const manual = Object.assign(wrap(rimrafManual), {
|
||||
sync: manualSync,
|
||||
});
|
||||
export const windowsSync = wrapSync(rimrafWindowsSync);
|
||||
export const windows = Object.assign(wrap(rimrafWindows), {
|
||||
sync: windowsSync,
|
||||
});
|
||||
export const posixSync = wrapSync(rimrafPosixSync);
|
||||
export const posix = Object.assign(wrap(rimrafPosix), { sync: posixSync });
|
||||
export const moveRemoveSync = wrapSync(rimrafMoveRemoveSync);
|
||||
export const moveRemove = Object.assign(wrap(rimrafMoveRemove), {
|
||||
sync: moveRemoveSync,
|
||||
});
|
||||
export const rimrafSync = wrapSync((path, opt) => useNativeSync(opt) ?
|
||||
rimrafNativeSync(path, opt)
|
||||
: rimrafManualSync(path, opt));
|
||||
export const sync = rimrafSync;
|
||||
const rimraf_ = wrap((path, opt) => useNative(opt) ? rimrafNative(path, opt) : rimrafManual(path, opt));
|
||||
export const rimraf = Object.assign(rimraf_, {
|
||||
rimraf: rimraf_,
|
||||
sync: rimrafSync,
|
||||
rimrafSync: rimrafSync,
|
||||
manual,
|
||||
manualSync,
|
||||
native,
|
||||
nativeSync,
|
||||
posix,
|
||||
posixSync,
|
||||
windows,
|
||||
windowsSync,
|
||||
moveRemove,
|
||||
moveRemoveSync,
|
||||
});
|
||||
rimraf.rimraf = rimraf;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/rimraf/dist/esm/index.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
34
node_modules/rimraf/dist/esm/opt-arg.d.ts
generated
vendored
Normal file
34
node_modules/rimraf/dist/esm/opt-arg.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { Dirent, Stats } from 'fs';
|
||||
import { GlobOptions } from 'glob';
|
||||
export declare const isRimrafOptions: (o: any) => o is RimrafOptions;
|
||||
export declare const assertRimrafOptions: (o: any) => void;
|
||||
export interface RimrafAsyncOptions {
|
||||
preserveRoot?: boolean;
|
||||
tmp?: string;
|
||||
maxRetries?: number;
|
||||
retryDelay?: number;
|
||||
backoff?: number;
|
||||
maxBackoff?: number;
|
||||
signal?: AbortSignal;
|
||||
glob?: boolean | GlobOptions;
|
||||
filter?: ((path: string, ent: Dirent | Stats) => boolean) | ((path: string, ent: Dirent | Stats) => Promise<boolean>);
|
||||
}
|
||||
export interface RimrafSyncOptions extends RimrafAsyncOptions {
|
||||
filter?: (path: string, ent: Dirent | Stats) => boolean;
|
||||
}
|
||||
export type RimrafOptions = RimrafSyncOptions | RimrafAsyncOptions;
|
||||
export declare const optArg: (opt?: RimrafAsyncOptions) => (RimrafAsyncOptions & {
|
||||
glob: GlobOptions & {
|
||||
withFileTypes: false;
|
||||
};
|
||||
}) | (RimrafAsyncOptions & {
|
||||
glob: undefined;
|
||||
});
|
||||
export declare const optArgSync: (opt?: RimrafSyncOptions) => (RimrafSyncOptions & {
|
||||
glob: GlobOptions & {
|
||||
withFileTypes: false;
|
||||
};
|
||||
}) | (RimrafSyncOptions & {
|
||||
glob: undefined;
|
||||
});
|
||||
//# sourceMappingURL=opt-arg.d.ts.map
|
||||
1
node_modules/rimraf/dist/esm/opt-arg.d.ts.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/opt-arg.d.ts.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"opt-arg.d.ts","sourceRoot":"","sources":["../../src/opt-arg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAKlC,eAAO,MAAM,eAAe,GAAI,GAAG,GAAG,KAAG,CAAC,IAAI,aAWX,CAAA;AAEnC,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAM7C,CAAA;AAED,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAA;IAC5B,MAAM,CAAC,EACH,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,KAAK,OAAO,CAAC,GAChD,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;CAC9D;AAED,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,KAAK,OAAO,CAAA;CACxD;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,CAAA;AAqClE,eAAO,MAAM,MAAM,GAAI,MAAK,kBAAuB;UA/BvC,WAAW,GAAG;QAAE,aAAa,EAAE,KAAK,CAAA;KAAE;;UAEjC,SAAS;EA6B0C,CAAA;AACpE,eAAO,MAAM,UAAU,GAAI,MAAK,iBAAsB;UAhC1C,WAAW,GAAG;QAAE,aAAa,EAAE,KAAK,CAAA;KAAE;;UAEjC,SAAS;EA8B6C,CAAA"}
|
||||
47
node_modules/rimraf/dist/esm/opt-arg.js
generated
vendored
Normal file
47
node_modules/rimraf/dist/esm/opt-arg.js
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
const typeOrUndef = (val, t) => typeof val === 'undefined' || typeof val === t;
|
||||
export const isRimrafOptions = (o) => !!o &&
|
||||
typeof o === 'object' &&
|
||||
typeOrUndef(o.preserveRoot, 'boolean') &&
|
||||
typeOrUndef(o.tmp, 'string') &&
|
||||
typeOrUndef(o.maxRetries, 'number') &&
|
||||
typeOrUndef(o.retryDelay, 'number') &&
|
||||
typeOrUndef(o.backoff, 'number') &&
|
||||
typeOrUndef(o.maxBackoff, 'number') &&
|
||||
(typeOrUndef(o.glob, 'boolean') ||
|
||||
(o.glob && typeof o.glob === 'object')) &&
|
||||
typeOrUndef(o.filter, 'function');
|
||||
export const assertRimrafOptions = (o) => {
|
||||
if (!isRimrafOptions(o)) {
|
||||
throw new Error('invalid rimraf options');
|
||||
}
|
||||
};
|
||||
const optArgT = (opt) => {
|
||||
assertRimrafOptions(opt);
|
||||
const { glob, ...options } = opt;
|
||||
if (!glob) {
|
||||
return options;
|
||||
}
|
||||
const globOpt = glob === true ?
|
||||
opt.signal ?
|
||||
{ signal: opt.signal }
|
||||
: {}
|
||||
: opt.signal ?
|
||||
{
|
||||
signal: opt.signal,
|
||||
...glob,
|
||||
}
|
||||
: glob;
|
||||
return {
|
||||
...options,
|
||||
glob: {
|
||||
...globOpt,
|
||||
// always get absolute paths from glob, to ensure
|
||||
// that we are referencing the correct thing.
|
||||
absolute: true,
|
||||
withFileTypes: false,
|
||||
},
|
||||
};
|
||||
};
|
||||
export const optArg = (opt = {}) => optArgT(opt);
|
||||
export const optArgSync = (opt = {}) => optArgT(opt);
|
||||
//# sourceMappingURL=opt-arg.js.map
|
||||
1
node_modules/rimraf/dist/esm/opt-arg.js.map
generated
vendored
Normal file
1
node_modules/rimraf/dist/esm/opt-arg.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"opt-arg.js","sourceRoot":"","sources":["../../src/opt-arg.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,CAAS,EAAE,EAAE,CAC1C,OAAO,GAAG,KAAK,WAAW,IAAI,OAAO,GAAG,KAAK,CAAC,CAAA;AAEhD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAM,EAAsB,EAAE,CAC5D,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,KAAK,QAAQ;IACrB,WAAW,CAAC,CAAC,CAAC,YAAY,EAAE,SAAS,CAAC;IACtC,WAAW,CAAC,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAC;IAC5B,WAAW,CAAC,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC;IACnC,WAAW,CAAC,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC;IACnC,WAAW,CAAC,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC;IAChC,WAAW,CAAC,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC;IACnC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC;QAC7B,CAAC,CAAC,CAAC,IAAI,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;IACzC,WAAW,CAAC,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,CAAC,MAAM,mBAAmB,GAAqB,CACnD,CAAM,EACsB,EAAE;IAC9B,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;IAC3C,CAAC;AACH,CAAC,CAAA;AAsBD,MAAM,OAAO,GAAG,CACd,GAAM,EAKsB,EAAE;IAC9B,mBAAmB,CAAC,GAAG,CAAC,CAAA;IACxB,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,GAAG,GAAG,CAAA;IAChC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,OAAkC,CAAA;IAC3C,CAAC;IACD,MAAM,OAAO,GACX,IAAI,KAAK,IAAI,CAAC,CAAC;QACb,GAAG,CAAC,MAAM,CAAC,CAAC;YACV,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE;YACxB,CAAC,CAAC,EAAE;QACN,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACZ;gBACE,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,GAAG,IAAI;aACR;YACH,CAAC,CAAC,IAAI,CAAA;IACR,OAAO;QACL,GAAG,OAAO;QACV,IAAI,EAAE;YACJ,GAAG,OAAO;YACV,iDAAiD;YACjD,6CAA6C;YAC7C,QAAQ,EAAE,IAAI;YACd,aAAa,EAAE,KAAK;SACrB;KACsD,CAAA;AAC3D,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,MAA0B,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;AACpE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAyB,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA","sourcesContent":["import { Dirent, Stats } from 'fs'\nimport { GlobOptions } from 'glob'\n\nconst typeOrUndef = (val: any, t: string) =>\n typeof val === 'undefined' || typeof val === t\n\nexport const isRimrafOptions = (o: any): o is RimrafOptions =>\n !!o &&\n typeof o === 'object' &&\n typeOrUndef(o.preserveRoot, 'boolean') &&\n typeOrUndef(o.tmp, 'string') &&\n typeOrUndef(o.maxRetries, 'number') &&\n typeOrUndef(o.retryDelay, 'number') &&\n typeOrUndef(o.backoff, 'number') &&\n typeOrUndef(o.maxBackoff, 'number') &&\n (typeOrUndef(o.glob, 'boolean') ||\n (o.glob && typeof o.glob === 'object')) &&\n typeOrUndef(o.filter, 'function')\n\nexport const assertRimrafOptions: (o: any) => void = (\n o: any,\n): asserts o is RimrafOptions => {\n if (!isRimrafOptions(o)) {\n throw new Error('invalid rimraf options')\n }\n}\n\nexport interface RimrafAsyncOptions {\n preserveRoot?: boolean\n tmp?: string\n maxRetries?: number\n retryDelay?: number\n backoff?: number\n maxBackoff?: number\n signal?: AbortSignal\n glob?: boolean | GlobOptions\n filter?:\n | ((path: string, ent: Dirent | Stats) => boolean)\n | ((path: string, ent: Dirent | Stats) => Promise<boolean>)\n}\n\nexport interface RimrafSyncOptions extends RimrafAsyncOptions {\n filter?: (path: string, ent: Dirent | Stats) => boolean\n}\n\nexport type RimrafOptions = RimrafSyncOptions | RimrafAsyncOptions\n\nconst optArgT = <T extends RimrafOptions>(\n opt: T,\n):\n | (T & {\n glob: GlobOptions & { withFileTypes: false }\n })\n | (T & { glob: undefined }) => {\n assertRimrafOptions(opt)\n const { glob, ...options } = opt\n if (!glob) {\n return options as T & { glob: undefined }\n }\n const globOpt =\n glob === true ?\n opt.signal ?\n { signal: opt.signal }\n : {}\n : opt.signal ?\n {\n signal: opt.signal,\n ...glob,\n }\n : glob\n return {\n ...options,\n glob: {\n ...globOpt,\n // always get absolute paths from glob, to ensure\n // that we are referencing the correct thing.\n absolute: true,\n withFileTypes: false,\n },\n } as T & { glob: GlobOptions & { withFileTypes: false } }\n}\n\nexport const optArg = (opt: RimrafAsyncOptions = {}) => optArgT(opt)\nexport const optArgSync = (opt: RimrafSyncOptions = {}) => optArgT(opt)\n"]}
|
||||
3
node_modules/rimraf/dist/esm/package.json
generated
vendored
Normal file
3
node_modules/rimraf/dist/esm/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"type": "module"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue