@umijs/utils 3.5.20 → 4.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/compiled/address/index.js +1 -0
- package/compiled/address/lib/address.d.ts +28 -0
- package/compiled/address/package.json +1 -0
- package/compiled/axios/LICENSE +19 -0
- package/compiled/axios/index.d.ts +206 -0
- package/compiled/axios/index.js +1 -0
- package/compiled/axios/package.json +1 -0
- package/compiled/chalk/LICENSE +9 -0
- package/compiled/chalk/index.d.ts +415 -0
- package/compiled/chalk/index.js +1 -0
- package/compiled/chalk/package.json +1 -0
- package/compiled/cheerio/LICENSE +21 -0
- package/compiled/cheerio/domelementtype/lib/index.d.ts +48 -0
- package/compiled/cheerio/domhandler/lib/index.d.ts +85 -0
- package/compiled/cheerio/domhandler/lib/node.d.ts +169 -0
- package/compiled/cheerio/htmlparser2/lib/Parser.d.ts +159 -0
- package/compiled/cheerio/htmlparser2/lib/Tokenizer.d.ts +182 -0
- package/compiled/cheerio/htmlparser2/lib/index.d.ts +39 -0
- package/compiled/cheerio/index.js +16 -0
- package/compiled/cheerio/lib/api/attributes.d.ts +317 -0
- package/compiled/cheerio/lib/api/css.d.ts +41 -0
- package/compiled/cheerio/lib/api/forms.d.ts +31 -0
- package/compiled/cheerio/lib/api/manipulation.d.ts +496 -0
- package/compiled/cheerio/lib/api/traversing.d.ts +644 -0
- package/compiled/cheerio/lib/cheerio.d.ts +53 -0
- package/compiled/cheerio/lib/index.d.ts +91 -0
- package/compiled/cheerio/lib/load.d.ts +73 -0
- package/compiled/cheerio/lib/options.d.ts +31 -0
- package/compiled/cheerio/lib/static.d.ts +88 -0
- package/compiled/cheerio/lib/types.d.ts +20 -0
- package/compiled/cheerio/package.json +1 -0
- package/compiled/color/LICENSE +21 -0
- package/compiled/color/color-convert/conversions.d.ts +149 -0
- package/compiled/color/color-convert/index.d.ts +113 -0
- package/compiled/color/color-convert/route.d.ts +294 -0
- package/compiled/color/color-name/index.d.ts +161 -0
- package/compiled/color/index.d.ts +142 -0
- package/compiled/color/index.js +1 -0
- package/compiled/color/package.json +4 -0
- package/compiled/cross-spawn/LICENSE +21 -0
- package/compiled/cross-spawn/index.d.ts +36 -0
- package/compiled/cross-spawn/index.js +1 -0
- package/compiled/cross-spawn/package.json +1 -0
- package/compiled/debug/LICENSE +19 -0
- package/compiled/debug/index.d.ts +54 -0
- package/compiled/debug/index.js +1 -0
- package/compiled/debug/ms/index.d.ts +25 -0
- package/compiled/debug/package.json +1 -0
- package/compiled/fs-extra/LICENSE +15 -0
- package/compiled/fs-extra/index.d.ts +332 -0
- package/compiled/fs-extra/index.js +1 -0
- package/compiled/fs-extra/package.json +1 -0
- package/compiled/glob/LICENSE +21 -0
- package/compiled/glob/index.d.ts +89 -0
- package/compiled/glob/index.js +1 -0
- package/compiled/glob/minimatch/index.d.ts +204 -0
- package/compiled/glob/package.json +1 -0
- package/compiled/import-lazy/LICENSE +9 -0
- package/compiled/import-lazy/index.d.ts +26 -0
- package/compiled/import-lazy/index.js +1 -0
- package/compiled/import-lazy/package.json +1 -0
- package/compiled/lodash/LICENSE +47 -0
- package/compiled/lodash/common/array.d.ts +2126 -0
- package/compiled/lodash/common/collection.d.ts +1930 -0
- package/compiled/lodash/common/common.d.ts +280 -0
- package/compiled/lodash/common/date.d.ts +23 -0
- package/compiled/lodash/common/function.d.ts +1430 -0
- package/compiled/lodash/common/lang.d.ts +1692 -0
- package/compiled/lodash/common/math.d.ts +405 -0
- package/compiled/lodash/common/number.d.ts +131 -0
- package/compiled/lodash/common/object.d.ts +2519 -0
- package/compiled/lodash/common/seq.d.ts +210 -0
- package/compiled/lodash/common/string.d.ts +788 -0
- package/compiled/lodash/common/util.d.ts +1219 -0
- package/compiled/lodash/index.d.ts +46 -0
- package/compiled/lodash/index.js +9 -0
- package/compiled/lodash/package.json +1 -0
- package/compiled/mustache/LICENSE +11 -0
- package/compiled/mustache/index.d.ts +437 -0
- package/compiled/mustache/index.js +5 -0
- package/compiled/mustache/package.json +1 -0
- package/compiled/pkg-up/LICENSE +9 -0
- package/compiled/pkg-up/index.d.ts +48 -0
- package/compiled/pkg-up/index.js +1 -0
- package/compiled/pkg-up/package.json +1 -0
- package/compiled/portfinder/LICENSE +22 -0
- package/compiled/portfinder/index.js +1 -0
- package/compiled/portfinder/lib/portfinder.d.ts +47 -0
- package/compiled/portfinder/package.json +1 -0
- package/compiled/prettier/LICENSE +7 -0
- package/compiled/prettier/index.d.ts +867 -0
- package/compiled/prettier/index.js +475 -0
- package/compiled/prettier/package.json +5 -0
- package/compiled/prompts/LICENSE +21 -0
- package/compiled/prompts/index.d.ts +120 -0
- package/compiled/prompts/index.js +1 -0
- package/compiled/prompts/package.json +1 -0
- package/compiled/resolve/LICENSE +21 -0
- package/compiled/resolve/index.d.ts +166 -0
- package/compiled/resolve/index.js +1 -0
- package/compiled/resolve/package.json +1 -0
- package/compiled/rimraf/LICENSE +15 -0
- package/compiled/rimraf/glob/index.d.ts +89 -0
- package/compiled/rimraf/index.d.ts +49 -0
- package/compiled/rimraf/index.js +1 -0
- package/compiled/rimraf/minimatch/index.d.ts +204 -0
- package/compiled/rimraf/package.json +1 -0
- package/compiled/semver/LICENSE +15 -0
- package/compiled/semver/classes/comparator.d.ts +17 -0
- package/compiled/semver/classes/range.d.ts +21 -0
- package/compiled/semver/classes/semver.d.ts +62 -0
- package/compiled/semver/functions/clean.d.ts +8 -0
- package/compiled/semver/functions/cmp.d.ts +16 -0
- package/compiled/semver/functions/coerce.d.ts +12 -0
- package/compiled/semver/functions/compare-build.d.ts +16 -0
- package/compiled/semver/functions/compare-loose.d.ts +5 -0
- package/compiled/semver/functions/compare.d.ts +20 -0
- package/compiled/semver/functions/diff.d.ts +13 -0
- package/compiled/semver/functions/eq.d.ts +9 -0
- package/compiled/semver/functions/gt.d.ts +9 -0
- package/compiled/semver/functions/gte.d.ts +9 -0
- package/compiled/semver/functions/inc.d.ts +15 -0
- package/compiled/semver/functions/lt.d.ts +9 -0
- package/compiled/semver/functions/lte.d.ts +8 -0
- package/compiled/semver/functions/major.d.ts +9 -0
- package/compiled/semver/functions/minor.d.ts +9 -0
- package/compiled/semver/functions/neq.d.ts +9 -0
- package/compiled/semver/functions/parse.d.ts +12 -0
- package/compiled/semver/functions/patch.d.ts +9 -0
- package/compiled/semver/functions/prerelease.d.ts +12 -0
- package/compiled/semver/functions/rcompare.d.ts +15 -0
- package/compiled/semver/functions/rsort.d.ts +9 -0
- package/compiled/semver/functions/satisfies.d.ts +14 -0
- package/compiled/semver/functions/sort.d.ts +9 -0
- package/compiled/semver/functions/valid.d.ts +11 -0
- package/compiled/semver/index.d.ts +133 -0
- package/compiled/semver/index.js +1 -0
- package/compiled/semver/internals/identifiers.d.ts +13 -0
- package/compiled/semver/package.json +1 -0
- package/compiled/semver/ranges/gtr.d.ts +14 -0
- package/compiled/semver/ranges/intersects.d.ts +13 -0
- package/compiled/semver/ranges/ltr.d.ts +14 -0
- package/compiled/semver/ranges/max-satisfying.d.ts +14 -0
- package/compiled/semver/ranges/min-satisfying.d.ts +14 -0
- package/compiled/semver/ranges/min-version.d.ts +10 -0
- package/compiled/semver/ranges/outside.d.ts +15 -0
- package/compiled/semver/ranges/simplify.d.ts +14 -0
- package/compiled/semver/ranges/subset.d.ts +13 -0
- package/compiled/semver/ranges/to-comparators.d.ts +9 -0
- package/compiled/semver/ranges/valid.d.ts +12 -0
- package/compiled/strip-ansi/LICENSE +9 -0
- package/compiled/strip-ansi/index.d.ts +17 -0
- package/compiled/strip-ansi/index.js +1 -0
- package/compiled/strip-ansi/package.json +1 -0
- package/compiled/yargs-parser/index.d.ts +112 -0
- package/compiled/yargs-parser/index.js +1 -0
- package/compiled/yargs-parser/package.json +1 -0
- package/dist/BaseGenerator/BaseGenerator.d.ts +18 -0
- package/dist/BaseGenerator/BaseGenerator.js +58 -0
- package/{lib → dist}/Generator/Generator.d.ts +3 -3
- package/dist/Generator/Generator.js +74 -0
- package/dist/importLazy.d.ts +6 -0
- package/dist/importLazy.js +17 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +79 -0
- package/dist/logger.d.ts +14 -0
- package/dist/logger.js +39 -0
- package/dist/randomColor/randomColor.d.ts +6 -0
- package/dist/randomColor/randomColor.js +19 -0
- package/dist/register.d.ts +6 -0
- package/dist/register.js +47 -0
- package/dist/winPath.d.ts +1 -0
- package/dist/winPath.js +11 -0
- package/package.json +92 -12
- package/lib/BabelRegister/BabelRegister.d.ts +0 -9
- package/lib/BabelRegister/BabelRegister.js +0 -66
- package/lib/Generator/Generator.js +0 -120
- package/lib/cheerio/cheerio.d.ts +0 -2
- package/lib/cheerio/cheerio.js +0 -37
- package/lib/cleanRequireCache/cleanRequireCache.d.ts +0 -1
- package/lib/cleanRequireCache/cleanRequireCache.js +0 -40
- package/lib/compatESModuleRequire/compatESModuleRequire.d.ts +0 -7
- package/lib/compatESModuleRequire/compatESModuleRequire.js +0 -22
- package/lib/delay/delay.d.ts +0 -1
- package/lib/delay/delay.js +0 -22
- package/lib/getFile/getFile.d.ts +0 -22
- package/lib/getFile/getFile.js +0 -85
- package/lib/index.d.ts +0 -66
- package/lib/index.js +0 -619
- package/lib/isLernaPackage/isLernaPackage.d.ts +0 -1
- package/lib/isLernaPackage/isLernaPackage.js +0 -42
- package/lib/mergeConfig/mergeConfig.d.ts +0 -8
- package/lib/mergeConfig/mergeConfig.js +0 -42
- package/lib/parseRequireDeps/parseRequireDeps.d.ts +0 -1
- package/lib/parseRequireDeps/parseRequireDeps.js +0 -98
- package/lib/randomColor/randomColor.d.ts +0 -6
- package/lib/randomColor/randomColor.js +0 -42
- package/lib/routes.d.ts +0 -11
- package/lib/routes.js +0 -53
- package/lib/ssr.d.ts +0 -12
- package/lib/ssr.js +0 -41
- package/lib/types.d.ts +0 -7
- package/lib/types.js +0 -17
- package/lib/winEOL/winEOL.d.ts +0 -7
- package/lib/winEOL/winEOL.js +0 -39
- package/lib/winPath/winPath.d.ts +0 -1
- package/lib/winPath/winPath.js +0 -28
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Type definitions for cross-spawn 6.0
|
|
2
|
+
// Project: https://github.com/moxystudio/node-cross-spawn
|
|
3
|
+
// Definitions by: Alorel <https://github.com/Alorel>
|
|
4
|
+
// ExE Boss <https://github.com/ExE-Boss>
|
|
5
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
6
|
+
|
|
7
|
+
/// <reference types="node" />
|
|
8
|
+
|
|
9
|
+
import * as child_process from 'child_process';
|
|
10
|
+
|
|
11
|
+
declare namespace spawn {
|
|
12
|
+
/**
|
|
13
|
+
* The `spawn()` method spawns a new process using the given `command`, with
|
|
14
|
+
* command line arguments in `args`. If omitted, `args` defaults to an empty array.
|
|
15
|
+
*/
|
|
16
|
+
const spawn: typeof child_process.spawn;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The `spawn.sync()` method spawns a new process using the given `command`, with
|
|
20
|
+
* command line arguments in `args`. If omitted, `args` defaults to an empty array.
|
|
21
|
+
*/
|
|
22
|
+
const sync: typeof child_process.spawnSync;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The `spawn()` method spawns a new process using the given `command`, with
|
|
27
|
+
* command line arguments in `args`. If omitted, `args` defaults to an empty array.
|
|
28
|
+
*/
|
|
29
|
+
declare function spawn(command: string, options: child_process.SpawnOptions): child_process.ChildProcess;
|
|
30
|
+
declare function spawn(
|
|
31
|
+
command: string,
|
|
32
|
+
args?: ReadonlyArray<string>,
|
|
33
|
+
options?: child_process.SpawnOptions,
|
|
34
|
+
): child_process.ChildProcess;
|
|
35
|
+
|
|
36
|
+
export = spawn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){var n={504:function(n,t,e){"use strict";const r=e(129);const s=e(19);const o=e(12);function spawn(n,t,e){const c=s(n,t,e);const i=r.spawn(c.command,c.args,c.options);o.hookChildProcess(i,c);return i}function spawnSync(n,t,e){const c=s(n,t,e);const i=r.spawnSync(c.command,c.args,c.options);i.error=i.error||o.verifyENOENTSync(i.status,c);return i}n.exports=spawn;n.exports.spawn=spawn;n.exports.sync=spawnSync;n.exports._parse=s;n.exports._enoent=o},12:function(n){"use strict";const t=process.platform==="win32";function notFoundError(n,t){return Object.assign(new Error(`${t} ${n.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${n.command}`,path:n.command,spawnargs:n.args})}function hookChildProcess(n,e){if(!t){return}const r=n.emit;n.emit=function(t,s){if(t==="exit"){const t=verifyENOENT(s,e,"spawn");if(t){return r.call(n,"error",t)}}return r.apply(n,arguments)}}function verifyENOENT(n,e){if(t&&n===1&&!e.file){return notFoundError(e.original,"spawn")}return null}function verifyENOENTSync(n,e){if(t&&n===1&&!e.file){return notFoundError(e.original,"spawnSync")}return null}n.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},19:function(n,t,e){"use strict";const r=e(622);const s=e(765);const o=e(869);const c=e(922);const i=process.platform==="win32";const a=/\.(?:com|exe)$/i;const u=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(n){n.file=s(n);const t=n.file&&c(n.file);if(t){n.args.unshift(n.file);n.command=t;return s(n)}return n.file}function parseNonShell(n){if(!i){return n}const t=detectShebang(n);const e=!a.test(t);if(n.options.forceShell||e){const e=u.test(t);n.command=r.normalize(n.command);n.command=o.command(n.command);n.args=n.args.map((n=>o.argument(n,e)));const s=[n.command].concat(n.args).join(" ");n.args=["/d","/s","/c",`"${s}"`];n.command=process.env.comspec||"cmd.exe";n.options.windowsVerbatimArguments=true}return n}function parse(n,t,e){if(t&&!Array.isArray(t)){e=t;t=null}t=t?t.slice(0):[];e=Object.assign({},e);const r={command:n,args:t,options:e,file:undefined,original:{command:n,args:t}};return e.shell?r:parseNonShell(r)}n.exports=parse},869:function(n){"use strict";const t=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(n){n=n.replace(t,"^$1");return n}function escapeArgument(n,e){n=`${n}`;n=n.replace(/(\\*)"/g,'$1$1\\"');n=n.replace(/(\\*)$/,"$1$1");n=`"${n}"`;n=n.replace(t,"^$1");if(e){n=n.replace(t,"^$1")}return n}n.exports.command=escapeCommand;n.exports.argument=escapeArgument},922:function(n,t,e){"use strict";const r=e(747);const s=e(635);function readShebang(n){const t=150;const e=Buffer.alloc(t);let o;try{o=r.openSync(n,"r");r.readSync(o,e,0,t,0);r.closeSync(o)}catch(n){}return s(e.toString())}n.exports=readShebang},765:function(n,t,e){"use strict";const r=e(622);const s=e(480);const o=e(646);function resolveCommandAttempt(n,t){const e=n.options.env||process.env;const c=process.cwd();const i=n.options.cwd!=null;const a=i&&process.chdir!==undefined&&!process.chdir.disabled;if(a){try{process.chdir(n.options.cwd)}catch(n){}}let u;try{u=s.sync(n.command,{path:e[o({env:e})],pathExt:t?r.delimiter:undefined})}catch(n){}finally{if(a){process.chdir(c)}}if(u){u=r.resolve(i?n.options.cwd:"",u)}return u}function resolveCommand(n){return resolveCommandAttempt(n)||resolveCommandAttempt(n,true)}n.exports=resolveCommand},668:function(n,t,e){var r=e(747);var s;if(process.platform==="win32"||global.TESTING_WINDOWS){s=e(332)}else{s=e(484)}n.exports=isexe;isexe.sync=sync;function isexe(n,t,e){if(typeof t==="function"){e=t;t={}}if(!e){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(e,r){isexe(n,t||{},(function(n,t){if(n){r(n)}else{e(t)}}))}))}s(n,t||{},(function(n,r){if(n){if(n.code==="EACCES"||t&&t.ignoreErrors){n=null;r=false}}e(n,r)}))}function sync(n,t){try{return s.sync(n,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES"){return false}else{throw n}}}},484:function(n,t,e){n.exports=isexe;isexe.sync=sync;var r=e(747);function isexe(n,t,e){r.stat(n,(function(n,r){e(n,n?false:checkStat(r,t))}))}function sync(n,t){return checkStat(r.statSync(n),t)}function checkStat(n,t){return n.isFile()&&checkMode(n,t)}function checkMode(n,t){var e=n.mode;var r=n.uid;var s=n.gid;var o=t.uid!==undefined?t.uid:process.getuid&&process.getuid();var c=t.gid!==undefined?t.gid:process.getgid&&process.getgid();var i=parseInt("100",8);var a=parseInt("010",8);var u=parseInt("001",8);var f=i|a;var p=e&u||e&a&&s===c||e&i&&r===o||e&f&&o===0;return p}},332:function(n,t,e){n.exports=isexe;isexe.sync=sync;var r=e(747);function checkPathExt(n,t){var e=t.pathExt!==undefined?t.pathExt:process.env.PATHEXT;if(!e){return true}e=e.split(";");if(e.indexOf("")!==-1){return true}for(var r=0;r<e.length;r++){var s=e[r].toLowerCase();if(s&&n.substr(-s.length).toLowerCase()===s){return true}}return false}function checkStat(n,t,e){if(!n.isSymbolicLink()&&!n.isFile()){return false}return checkPathExt(t,e)}function isexe(n,t,e){r.stat(n,(function(r,s){e(r,r?false:checkStat(s,n,t))}))}function sync(n,t){return checkStat(r.statSync(n),n,t)}},646:function(n){"use strict";const pathKey=(n={})=>{const t=n.env||process.env;const e=n.platform||process.platform;if(e!=="win32"){return"PATH"}return Object.keys(t).reverse().find((n=>n.toUpperCase()==="PATH"))||"Path"};n.exports=pathKey;n.exports.default=pathKey},635:function(n,t,e){"use strict";const r=e(20);n.exports=(n="")=>{const t=n.match(r);if(!t){return null}const[e,s]=t[0].replace(/#! ?/,"").split(" ");const o=e.split("/").pop();if(o==="env"){return s}return s?`${o} ${s}`:o}},20:function(n){"use strict";n.exports=/^#!(.*)/},480:function(n,t,e){const r=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const s=e(622);const o=r?";":":";const c=e(668);const getNotFoundError=n=>Object.assign(new Error(`not found: ${n}`),{code:"ENOENT"});const getPathInfo=(n,t)=>{const e=t.colon||o;const s=n.match(/\//)||r&&n.match(/\\/)?[""]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(e)];const c=r?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const i=r?c.split(e):[""];if(r){if(n.indexOf(".")!==-1&&i[0]!=="")i.unshift("")}return{pathEnv:s,pathExt:i,pathExtExe:c}};const which=(n,t,e)=>{if(typeof t==="function"){e=t;t={}}if(!t)t={};const{pathEnv:r,pathExt:o,pathExtExe:i}=getPathInfo(n,t);const a=[];const step=e=>new Promise(((o,c)=>{if(e===r.length)return t.all&&a.length?o(a):c(getNotFoundError(n));const i=r[e];const u=/^".*"$/.test(i)?i.slice(1,-1):i;const f=s.join(u,n);const p=!u&&/^\.[\\\/]/.test(n)?n.slice(0,2)+f:f;o(subStep(p,e,0))}));const subStep=(n,e,r)=>new Promise(((s,u)=>{if(r===o.length)return s(step(e+1));const f=o[r];c(n+f,{pathExt:i},((o,c)=>{if(!o&&c){if(t.all)a.push(n+f);else return s(n+f)}return s(subStep(n,e,r+1))}))}));return e?step(0).then((n=>e(null,n)),e):step(0)};const whichSync=(n,t)=>{t=t||{};const{pathEnv:e,pathExt:r,pathExtExe:o}=getPathInfo(n,t);const i=[];for(let a=0;a<e.length;a++){const u=e[a];const f=/^".*"$/.test(u)?u.slice(1,-1):u;const p=s.join(f,n);const l=!f&&/^\.[\\\/]/.test(n)?n.slice(0,2)+p:p;for(let n=0;n<r.length;n++){const e=l+r[n];try{const n=c.sync(e,{pathExt:o});if(n){if(t.all)i.push(e);else return e}}catch(n){}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw getNotFoundError(n)};n.exports=which;which.sync=whichSync},129:function(n){"use strict";n.exports=require("child_process")},747:function(n){"use strict";n.exports=require("fs")},622:function(n){"use strict";n.exports=require("path")}};var t={};function __nccwpck_require__(e){var r=t[e];if(r!==undefined){return r.exports}var s=t[e]={exports:{}};var o=true;try{n[e](s,s.exports,__nccwpck_require__);o=false}finally{if(o)delete t[e]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var e=__nccwpck_require__(504);module.exports=e})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"cross-spawn","author":"André Cruz <andre@moxy.studio>","license":"MIT"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
|
6
|
+
and associated documentation files (the 'Software'), to deal in the Software without restriction,
|
|
7
|
+
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
8
|
+
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
12
|
+
portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
15
|
+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
16
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
17
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
18
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
19
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Type definitions for debug 4.1
|
|
2
|
+
// Project: https://github.com/visionmedia/debug
|
|
3
|
+
// Definitions by: Seon-Wook Park <https://github.com/swook>
|
|
4
|
+
// Gal Talmor <https://github.com/galtalmor>
|
|
5
|
+
// John McLaughlin <https://github.com/zamb3zi>
|
|
6
|
+
// Brasten Sager <https://github.com/brasten>
|
|
7
|
+
// Nicolas Penin <https://github.com/npenin>
|
|
8
|
+
// Kristian Brünn <https://github.com/kristianmitk>
|
|
9
|
+
// Caleb Gregory <https://github.com/calebgregory>
|
|
10
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
11
|
+
|
|
12
|
+
declare var debug: debug.Debug & { debug: debug.Debug; default: debug.Debug };
|
|
13
|
+
|
|
14
|
+
export = debug;
|
|
15
|
+
export as namespace debug;
|
|
16
|
+
|
|
17
|
+
declare namespace debug {
|
|
18
|
+
interface Debug {
|
|
19
|
+
(namespace: string): Debugger;
|
|
20
|
+
coerce: (val: any) => any;
|
|
21
|
+
disable: () => string;
|
|
22
|
+
enable: (namespaces: string) => void;
|
|
23
|
+
enabled: (namespaces: string) => boolean;
|
|
24
|
+
formatArgs: (this: Debugger, args: any[]) => void;
|
|
25
|
+
log: (...args: any[]) => any;
|
|
26
|
+
selectColor: (namespace: string) => string | number;
|
|
27
|
+
humanize: typeof import('./ms');
|
|
28
|
+
|
|
29
|
+
names: RegExp[];
|
|
30
|
+
skips: RegExp[];
|
|
31
|
+
|
|
32
|
+
formatters: Formatters;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type IDebug = Debug;
|
|
36
|
+
|
|
37
|
+
interface Formatters {
|
|
38
|
+
[formatter: string]: (v: any) => string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
type IDebugger = Debugger;
|
|
42
|
+
|
|
43
|
+
interface Debugger {
|
|
44
|
+
(formatter: any, ...args: any[]): void;
|
|
45
|
+
|
|
46
|
+
color: string;
|
|
47
|
+
diff: number;
|
|
48
|
+
enabled: boolean;
|
|
49
|
+
log: (...args: any[]) => any;
|
|
50
|
+
namespace: string;
|
|
51
|
+
destroy: () => boolean;
|
|
52
|
+
extend: (namespace: string, delimiter?: string) => Debugger;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){var e={739:function(e,t,r){t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.destroy=(()=>{let e=false;return()=>{if(!e){e=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let s=0;let n=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{if(e==="%%"){return}s++;if(e==="%c"){n=s}}));t.splice(n,0,r)}t.log=console.debug||console.log||(()=>{});function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(849)(t);const{formatters:s}=e.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},849:function(e,t,r){function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=r(273);createDebug.destroy=destroy;Object.keys(e).forEach((t=>{createDebug[t]=e[t]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r);t|=0}return createDebug.colors[Math.abs(t)%createDebug.colors.length]}createDebug.selectColor=selectColor;function createDebug(e){let t;let r=null;let s;let n;function debug(...e){if(!debug.enabled){return}const r=debug;const s=Number(new Date);const n=s-(t||s);r.diff=n;r.prev=t;r.curr=s;t=s;e[0]=createDebug.coerce(e[0]);if(typeof e[0]!=="string"){e.unshift("%O")}let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,s)=>{if(t==="%%"){return"%"}o++;const n=createDebug.formatters[s];if(typeof n==="function"){const s=e[o];t=n.call(r,s);e.splice(o,1);o--}return t}));createDebug.formatArgs.call(r,e);const a=r.log||createDebug.log;a.apply(r,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(r!==null){return r}if(s!==createDebug.namespaces){s=createDebug.namespaces;n=createDebug.enabled(e)}return n},set:e=>{r=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,t){const r=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);r.log=this.log;return r}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];let t;const r=(typeof e==="string"?e:"").split(/[\s,]+/);const s=r.length;for(t=0;t<s;t++){if(!r[t]){continue}e=r[t].replace(/\*/g,".*?");if(e[0]==="-"){createDebug.skips.push(new RegExp("^"+e.substr(1)+"$"))}else{createDebug.names.push(new RegExp("^"+e+"$"))}}}function disable(){const e=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map((e=>"-"+e))].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let t;let r;for(t=0,r=createDebug.skips.length;t<r;t++){if(createDebug.skips[t].test(e)){return false}}for(t=0,r=createDebug.names.length;t<r;t++){if(createDebug.names[t].test(e)){return true}}return false}function toNamespace(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}function coerce(e){if(e instanceof Error){return e.stack||e.message}return e}function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}createDebug.enable(createDebug.load());return createDebug}e.exports=setup},783:function(e,t,r){if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(739)}else{e.exports=r(875)}},875:function(e,t,r){const s=r(867);const n=r(669);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.destroy=n.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");t.colors=[6,2,3,4,5,1];try{const e=r(821);if(e&&(e.stderr||e).level>=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let s=process.env[t];if(/^(yes|on|true|enabled)$/i.test(s)){s=true}else if(/^(no|off|false|disabled)$/i.test(s)){s=false}else if(s==="null"){s=null}else{s=Number(s)}e[r]=s;return e}),{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):s.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:r,useColors:s}=this;if(s){const s=this.color;const n="[3"+(s<8?s:"8;5;"+s);const o=` ${n};1m${r} [0m`;t[0]=o+t[0].split("\n").join("\n"+o);t.push(n+"m+"+e.exports.humanize(this.diff)+"[0m")}else{t[0]=getDate()+r+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(n.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let s=0;s<r.length;s++){e.inspectOpts[r[s]]=t.inspectOpts[r[s]]}}e.exports=r(849)(t);const{formatters:o}=e.exports;o.o=function(e){this.inspectOpts.colors=this.useColors;return n.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")};o.O=function(e){this.inspectOpts.colors=this.useColors;return n.inspect(e,this.inspectOpts)}},419:function(e){"use strict";e.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":e.length===1?"-":"--";const s=t.indexOf(r+e);const n=t.indexOf("--");return s!==-1&&(n===-1||s<n)}},273:function(e){var t=1e3;var r=t*60;var s=r*60;var n=s*24;var o=n*7;var a=n*365.25;e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0){return parse(e)}else if(r==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!c){return}var u=parseFloat(c[1]);var i=(c[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return u*a;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*n;case"hours":case"hour":case"hrs":case"hr":case"h":return u*s;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return undefined}}function fmtShort(e){var o=Math.abs(e);if(o>=n){return Math.round(e/n)+"d"}if(o>=s){return Math.round(e/s)+"h"}if(o>=r){return Math.round(e/r)+"m"}if(o>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var o=Math.abs(e);if(o>=n){return plural(e,o,n,"day")}if(o>=s){return plural(e,o,s,"hour")}if(o>=r){return plural(e,o,r,"minute")}if(o>=t){return plural(e,o,t,"second")}return e+" ms"}function plural(e,t,r,s){var n=t>=r*1.5;return Math.round(e/r)+" "+s+(n?"s":"")}},821:function(e,t,r){"use strict";const s=r(87);const n=r(867);const o=r(419);const{env:a}=process;let c;if(o("no-color")||o("no-colors")||o("color=false")||o("color=never")){c=0}else if(o("color")||o("colors")||o("color=true")||o("color=always")){c=1}if("FORCE_COLOR"in a){if(a.FORCE_COLOR==="true"){c=1}else if(a.FORCE_COLOR==="false"){c=0}else{c=a.FORCE_COLOR.length===0?1:Math.min(parseInt(a.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e,t){if(c===0){return 0}if(o("color=16m")||o("color=full")||o("color=truecolor")){return 3}if(o("color=256")){return 2}if(e&&!t&&c===undefined){return 0}const r=c||0;if(a.TERM==="dumb"){return r}if(process.platform==="win32"){const e=s.release().split(".");if(Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in a){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in a))||a.CI_NAME==="codeship"){return 1}return r}if("TEAMCITY_VERSION"in a){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0}if(a.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(a.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)){return 1}if("COLORTERM"in a){return 1}return r}function getSupportLevel(e){const t=supportsColor(e,e&&e.isTTY);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,n.isatty(1))),stderr:translateLevel(supportsColor(true,n.isatty(2)))}},87:function(e){"use strict";e.exports=require("os")},867:function(e){"use strict";e.exports=require("tty")},669:function(e){"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r](n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(783);module.exports=r})();
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Type definitions for ms v0.7.1
|
|
2
|
+
// Project: https://github.com/zeit/ms
|
|
3
|
+
// Definitions by: Zhiyuan Wang <https://github.com/danny8002>
|
|
4
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Short/Long format for `value`.
|
|
10
|
+
*
|
|
11
|
+
* @param {Number} value
|
|
12
|
+
* @param {{long: boolean}} options
|
|
13
|
+
* @return {String}
|
|
14
|
+
*/
|
|
15
|
+
declare function ms(value: number, options?: { long: boolean }): string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Parse the given `value` and return milliseconds.
|
|
19
|
+
*
|
|
20
|
+
* @param {String} value
|
|
21
|
+
* @return {Number}
|
|
22
|
+
*/
|
|
23
|
+
declare function ms(value: string): number;
|
|
24
|
+
|
|
25
|
+
export = ms;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"debug","author":"TJ Holowaychuk <tj@vision-media.ca>","license":"MIT"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2011-2017 JP Richardson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
|
|
6
|
+
(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
|
|
7
|
+
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
11
|
+
|
|
12
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
|
13
|
+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
|
14
|
+
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
15
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
// Type definitions for fs-extra 8.1
|
|
2
|
+
// Project: https://github.com/jprichardson/node-fs-extra
|
|
3
|
+
// Definitions by: Alan Agius <https://github.com/alan-agius4>,
|
|
4
|
+
// midknight41 <https://github.com/midknight41>,
|
|
5
|
+
// Brendan Forster <https://github.com/shiftkey>,
|
|
6
|
+
// Mees van Dijk <https://github.com/mees->,
|
|
7
|
+
// Justin Rockwood <https://github.com/jrockwood>,
|
|
8
|
+
// Sang Dang <https://github.com/sangdth>,
|
|
9
|
+
// Florian Keller <https://github.com/ffflorian>
|
|
10
|
+
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
|
11
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
12
|
+
// TypeScript Version: 2.2
|
|
13
|
+
|
|
14
|
+
/// <reference types="node" />
|
|
15
|
+
|
|
16
|
+
import * as fs from 'fs';
|
|
17
|
+
import Stats = fs.Stats;
|
|
18
|
+
|
|
19
|
+
export * from "fs";
|
|
20
|
+
|
|
21
|
+
export function copy(src: string, dest: string, options?: CopyOptions): Promise<void>;
|
|
22
|
+
export function copy(src: string, dest: string, callback: (err: Error) => void): void;
|
|
23
|
+
export function copy(src: string, dest: string, options: CopyOptions, callback: (err: Error) => void): void;
|
|
24
|
+
export function copySync(src: string, dest: string, options?: CopyOptionsSync): void;
|
|
25
|
+
|
|
26
|
+
export function copyFile(src: string, dest: string, flags?: number): Promise<void>;
|
|
27
|
+
export function copyFile(src: string, dest: string, callback: (err: Error) => void): void;
|
|
28
|
+
export function copyFile(src: string, dest: string, flags: number, callback: (err: Error) => void): void;
|
|
29
|
+
|
|
30
|
+
export function move(src: string, dest: string, options?: MoveOptions): Promise<void>;
|
|
31
|
+
export function move(src: string, dest: string, callback: (err: Error) => void): void;
|
|
32
|
+
export function move(src: string, dest: string, options: MoveOptions, callback: (err: Error) => void): void;
|
|
33
|
+
export function moveSync(src: string, dest: string, options?: MoveOptions): void;
|
|
34
|
+
|
|
35
|
+
export function createFile(file: string): Promise<void>;
|
|
36
|
+
export function createFile(file: string, callback: (err: Error) => void): void;
|
|
37
|
+
export function createFileSync(file: string): void;
|
|
38
|
+
|
|
39
|
+
export function createSymlink(src: string, dest: string, type: SymlinkType): Promise<void>;
|
|
40
|
+
export function createSymlink(src: string, dest: string, type: SymlinkType, callback?: (err: Error) => void): void;
|
|
41
|
+
export function createSymlinkSync(src: string, dest: string, type: SymlinkType): void;
|
|
42
|
+
|
|
43
|
+
export function ensureDir(path: string, options?: EnsureOptions | number): Promise<void>;
|
|
44
|
+
export function ensureDir(path: string, options?: EnsureOptions | number, callback?: (err: Error) => void): void;
|
|
45
|
+
export function ensureDirSync(path: string, options?: EnsureOptions | number): void;
|
|
46
|
+
|
|
47
|
+
export function mkdirs(dir: string): Promise<void>;
|
|
48
|
+
export function mkdirs(dir: string, callback: (err: Error) => void): void;
|
|
49
|
+
export function mkdirp(dir: string): Promise<void>;
|
|
50
|
+
export function mkdirp(dir: string, callback: (err: Error) => void): void;
|
|
51
|
+
export function mkdirsSync(dir: string): void;
|
|
52
|
+
export function mkdirpSync(dir: string): void;
|
|
53
|
+
|
|
54
|
+
export function outputFile(file: string, data: any, options?: WriteFileOptions | string): Promise<void>;
|
|
55
|
+
export function outputFile(file: string, data: any, callback: (err: Error) => void): void;
|
|
56
|
+
export function outputFile(file: string, data: any, options: WriteFileOptions | string, callback: (err: Error) => void): void;
|
|
57
|
+
export function outputFileSync(file: string, data: any, options?: WriteFileOptions | string): void;
|
|
58
|
+
|
|
59
|
+
export function readJson(file: string, options?: ReadOptions): Promise<any>;
|
|
60
|
+
export function readJson(file: string, callback: (err: Error, jsonObject: any) => void): void;
|
|
61
|
+
export function readJson(file: string, options: ReadOptions, callback: (err: Error, jsonObject: any) => void): void;
|
|
62
|
+
export function readJSON(file: string, options?: ReadOptions): Promise<any>;
|
|
63
|
+
export function readJSON(file: string, callback: (err: Error, jsonObject: any) => void): void;
|
|
64
|
+
export function readJSON(file: string, options: ReadOptions, callback: (err: Error, jsonObject: any) => void): void;
|
|
65
|
+
|
|
66
|
+
export function readJsonSync(file: string, options?: ReadOptions): any;
|
|
67
|
+
export function readJSONSync(file: string, options?: ReadOptions): any;
|
|
68
|
+
|
|
69
|
+
export function remove(dir: string): Promise<void>;
|
|
70
|
+
export function remove(dir: string, callback: (err: Error) => void): void;
|
|
71
|
+
export function removeSync(dir: string): void;
|
|
72
|
+
|
|
73
|
+
export function outputJSON(file: string, data: any, options?: WriteOptions): Promise<void>;
|
|
74
|
+
export function outputJSON(file: string, data: any, options: WriteOptions, callback: (err: Error) => void): void;
|
|
75
|
+
export function outputJSON(file: string, data: any, callback: (err: Error) => void): void;
|
|
76
|
+
export function outputJson(file: string, data: any, options?: WriteOptions): Promise<void>;
|
|
77
|
+
export function outputJson(file: string, data: any, options: WriteOptions, callback: (err: Error) => void): void;
|
|
78
|
+
export function outputJson(file: string, data: any, callback: (err: Error) => void): void;
|
|
79
|
+
export function outputJsonSync(file: string, data: any, options?: WriteOptions): void;
|
|
80
|
+
export function outputJSONSync(file: string, data: any, options?: WriteOptions): void;
|
|
81
|
+
|
|
82
|
+
export function writeJSON(file: string, object: any, options?: WriteOptions): Promise<void>;
|
|
83
|
+
export function writeJSON(file: string, object: any, callback: (err: Error) => void): void;
|
|
84
|
+
export function writeJSON(file: string, object: any, options: WriteOptions, callback: (err: Error) => void): void;
|
|
85
|
+
export function writeJson(file: string, object: any, options?: WriteOptions): Promise<void>;
|
|
86
|
+
export function writeJson(file: string, object: any, callback: (err: Error) => void): void;
|
|
87
|
+
export function writeJson(file: string, object: any, options: WriteOptions, callback: (err: Error) => void): void;
|
|
88
|
+
|
|
89
|
+
export function writeJsonSync(file: string, object: any, options?: WriteOptions): void;
|
|
90
|
+
export function writeJSONSync(file: string, object: any, options?: WriteOptions): void;
|
|
91
|
+
|
|
92
|
+
export function ensureFile(path: string): Promise<void>;
|
|
93
|
+
export function ensureFile(path: string, callback: (err: Error) => void): void;
|
|
94
|
+
export function ensureFileSync(path: string): void;
|
|
95
|
+
|
|
96
|
+
export function ensureLink(src: string, dest: string): Promise<void>;
|
|
97
|
+
export function ensureLink(src: string, dest: string, callback: (err: Error) => void): void;
|
|
98
|
+
export function ensureLinkSync(src: string, dest: string): void;
|
|
99
|
+
|
|
100
|
+
export function ensureSymlink(src: string, dest: string, type?: SymlinkType): Promise<void>;
|
|
101
|
+
export function ensureSymlink(src: string, dest: string, type: SymlinkType, callback: (err: Error) => void): void;
|
|
102
|
+
export function ensureSymlink(src: string, dest: string, callback: (err: Error) => void): void;
|
|
103
|
+
export function ensureSymlinkSync(src: string, dest: string, type?: SymlinkType): void;
|
|
104
|
+
|
|
105
|
+
export function emptyDir(path: string): Promise<void>;
|
|
106
|
+
export function emptyDir(path: string, callback: (err: Error) => void): void;
|
|
107
|
+
export function emptyDirSync(path: string): void;
|
|
108
|
+
|
|
109
|
+
export function pathExists(path: string): Promise<boolean>;
|
|
110
|
+
export function pathExists(path: string, callback: (err: Error, exists: boolean) => void): void;
|
|
111
|
+
export function pathExistsSync(path: string): boolean;
|
|
112
|
+
|
|
113
|
+
// fs async methods
|
|
114
|
+
// copied from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v6/index.d.ts
|
|
115
|
+
|
|
116
|
+
export function access(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
117
|
+
export function access(path: string | Buffer, mode: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
118
|
+
export function access(path: string | Buffer, mode?: number): Promise<void>;
|
|
119
|
+
|
|
120
|
+
export function appendFile(file: string | Buffer | number, data: any, options: { encoding?: string | undefined; mode?: number | string | undefined; flag?: string | undefined; },
|
|
121
|
+
callback: (err: NodeJS.ErrnoException) => void): void;
|
|
122
|
+
export function appendFile(file: string | Buffer | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
123
|
+
export function appendFile(file: string | Buffer | number, data: any, options?: { encoding?: string | undefined; mode?: number | string | undefined; flag?: string | undefined; }): Promise<void>;
|
|
124
|
+
|
|
125
|
+
export function chmod(path: string | Buffer, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
126
|
+
export function chmod(path: string | Buffer, mode: string | number): Promise<void>;
|
|
127
|
+
|
|
128
|
+
export function chown(path: string | Buffer, uid: number, gid: number): Promise<void>;
|
|
129
|
+
export function chown(path: string | Buffer, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
130
|
+
|
|
131
|
+
export function close(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
132
|
+
export function close(fd: number): Promise<void>;
|
|
133
|
+
|
|
134
|
+
export function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
135
|
+
export function fchmod(fd: number, mode: string | number): Promise<void>;
|
|
136
|
+
|
|
137
|
+
export function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
138
|
+
export function fchown(fd: number, uid: number, gid: number): Promise<void>;
|
|
139
|
+
|
|
140
|
+
export function fdatasync(fd: number, callback: () => void): void;
|
|
141
|
+
export function fdatasync(fd: number): Promise<void>;
|
|
142
|
+
|
|
143
|
+
export function fstat(fd: number, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void;
|
|
144
|
+
export function fstat(fd: number): Promise<Stats>;
|
|
145
|
+
|
|
146
|
+
export function fsync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
147
|
+
export function fsync(fd: number): Promise<void>;
|
|
148
|
+
|
|
149
|
+
export function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
150
|
+
export function ftruncate(fd: number, len: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
151
|
+
export function ftruncate(fd: number, len?: number): Promise<void>;
|
|
152
|
+
|
|
153
|
+
export function futimes(fd: number, atime: number, mtime: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
154
|
+
export function futimes(fd: number, atime: Date, mtime: Date, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
155
|
+
export function futimes(fd: number, atime: number, mtime: number): Promise<void>;
|
|
156
|
+
export function futimes(fd: number, atime: Date, mtime: Date): Promise<void>;
|
|
157
|
+
|
|
158
|
+
export function lchown(path: string | Buffer, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
159
|
+
export function lchown(path: string | Buffer, uid: number, gid: number): Promise<void>;
|
|
160
|
+
|
|
161
|
+
export function link(srcpath: string | Buffer, dstpath: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
162
|
+
export function link(srcpath: string | Buffer, dstpath: string | Buffer): Promise<void>;
|
|
163
|
+
|
|
164
|
+
export function lstat(path: string | Buffer, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void;
|
|
165
|
+
export function lstat(path: string | Buffer): Promise<Stats>;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
|
|
169
|
+
*
|
|
170
|
+
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
171
|
+
*/
|
|
172
|
+
export function mkdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
173
|
+
/**
|
|
174
|
+
* Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
|
|
175
|
+
*
|
|
176
|
+
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
177
|
+
*/
|
|
178
|
+
export function mkdir(path: string | Buffer, mode: number | string, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
179
|
+
export function mkdir(path: string | Buffer): Promise<void>;
|
|
180
|
+
|
|
181
|
+
export function open(path: string | Buffer, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
|
|
182
|
+
export function open(path: string | Buffer, flags: string | number, mode: number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
|
|
183
|
+
export function open(path: string | Buffer, flags: string | number, mode?: number): Promise<number>;
|
|
184
|
+
|
|
185
|
+
export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number | null,
|
|
186
|
+
callback: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void;
|
|
187
|
+
export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number | null): Promise<ReadResult>;
|
|
188
|
+
|
|
189
|
+
export function readFile(file: string | Buffer | number, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
|
|
190
|
+
export function readFile(file: string | Buffer | number, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
|
|
191
|
+
export function readFile(
|
|
192
|
+
file: string | Buffer | number,
|
|
193
|
+
options: { flag?: string | undefined; } | { encoding: string; flag?: string | undefined; },
|
|
194
|
+
callback: (err: NodeJS.ErrnoException, data: Buffer) => void
|
|
195
|
+
): void;
|
|
196
|
+
export function readFile(file: string | Buffer | number, options: { flag?: string | undefined; } | { encoding: string; flag?: string | undefined; }): Promise<string>;
|
|
197
|
+
// tslint:disable-next-line:unified-signatures
|
|
198
|
+
export function readFile(file: string | Buffer | number, encoding: string): Promise<string>;
|
|
199
|
+
export function readFile(file: string | Buffer | number): Promise<Buffer>;
|
|
200
|
+
|
|
201
|
+
export function readdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
|
|
202
|
+
export function readdir(path: string | Buffer): Promise<string[]>;
|
|
203
|
+
|
|
204
|
+
export function readlink(path: string | Buffer, callback: (err: NodeJS.ErrnoException, linkString: string) => any): void;
|
|
205
|
+
export function readlink(path: string | Buffer): Promise<string>;
|
|
206
|
+
|
|
207
|
+
export function realpath(path: string | Buffer, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void;
|
|
208
|
+
export function realpath(path: string | Buffer, cache: { [path: string]: string }, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void;
|
|
209
|
+
export function realpath(path: string | Buffer, cache?: { [path: string]: string }): Promise<string>;
|
|
210
|
+
|
|
211
|
+
export function rename(oldPath: string, newPath: string, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
212
|
+
export function rename(oldPath: string, newPath: string): Promise<void>;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Asynchronous rmdir - removes the directory specified in {path}
|
|
216
|
+
*
|
|
217
|
+
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
218
|
+
*/
|
|
219
|
+
export function rmdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
220
|
+
export function rmdir(path: string | Buffer): Promise<void>;
|
|
221
|
+
|
|
222
|
+
export function stat(path: string | Buffer, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void;
|
|
223
|
+
export function stat(path: string | Buffer): Promise<Stats>;
|
|
224
|
+
|
|
225
|
+
export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type: FsSymlinkType | undefined, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
226
|
+
export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
227
|
+
export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type?: FsSymlinkType): Promise<void>;
|
|
228
|
+
|
|
229
|
+
export function truncate(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
230
|
+
export function truncate(path: string | Buffer, len: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
231
|
+
export function truncate(path: string | Buffer, len?: number): Promise<void>;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Asynchronous unlink - deletes the file specified in {path}
|
|
235
|
+
*
|
|
236
|
+
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
237
|
+
*/
|
|
238
|
+
export function unlink(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
239
|
+
export function unlink(path: string | Buffer): Promise<void>;
|
|
240
|
+
|
|
241
|
+
export function utimes(path: string | Buffer, atime: number, mtime: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
242
|
+
export function utimes(path: string | Buffer, atime: Date, mtime: Date, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
243
|
+
export function utimes(path: string | Buffer, atime: number, mtime: number): Promise<void>;
|
|
244
|
+
export function utimes(path: string | Buffer, atime: Date, mtime: Date): Promise<void>;
|
|
245
|
+
|
|
246
|
+
export function write(fd: number, buffer: Buffer, offset: number, length: number, position: number | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void;
|
|
247
|
+
export function write(fd: number, buffer: Buffer, offset: number, length: number, callback: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void;
|
|
248
|
+
export function write(fd: number, data: any, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
|
|
249
|
+
export function write(fd: number, data: any, offset: number, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
|
|
250
|
+
export function write(fd: number, data: any, offset: number, encoding: string, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
|
|
251
|
+
export function write(fd: number, buffer: Buffer, offset?: number, length?: number, position?: number | null): Promise<WriteResult>;
|
|
252
|
+
export function write(fd: number, data: any, offset?: number, encoding?: string): Promise<WriteResult>;
|
|
253
|
+
|
|
254
|
+
export function writeFile(file: string | Buffer | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
255
|
+
export function writeFile(file: string | Buffer | number, data: any, options?: WriteFileOptions | string): Promise<void>;
|
|
256
|
+
export function writeFile(file: string | Buffer | number, data: any, options: WriteFileOptions | string, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
260
|
+
*
|
|
261
|
+
* @param callback The created folder path is passed as a string to the callback's second parameter.
|
|
262
|
+
*/
|
|
263
|
+
export function mkdtemp(prefix: string): Promise<string>;
|
|
264
|
+
export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException, folder: string) => void): void;
|
|
265
|
+
|
|
266
|
+
export interface PathEntry {
|
|
267
|
+
path: string;
|
|
268
|
+
stats: Stats;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export interface PathEntryStream {
|
|
272
|
+
read(): PathEntry | null;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export type CopyFilterSync = (src: string, dest: string) => boolean;
|
|
276
|
+
export type CopyFilterAsync = (src: string, dest: string) => Promise<boolean>;
|
|
277
|
+
|
|
278
|
+
export type SymlinkType = "dir" | "file";
|
|
279
|
+
export type FsSymlinkType = "dir" | "file" | "junction";
|
|
280
|
+
|
|
281
|
+
export interface CopyOptions {
|
|
282
|
+
dereference?: boolean | undefined;
|
|
283
|
+
overwrite?: boolean | undefined;
|
|
284
|
+
preserveTimestamps?: boolean | undefined;
|
|
285
|
+
errorOnExist?: boolean | undefined;
|
|
286
|
+
filter?: CopyFilterSync | CopyFilterAsync | undefined;
|
|
287
|
+
recursive?: boolean | undefined;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export interface CopyOptionsSync extends CopyOptions {
|
|
291
|
+
filter?: CopyFilterSync | undefined;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export interface EnsureOptions {
|
|
295
|
+
mode?: number | undefined;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export interface MoveOptions {
|
|
299
|
+
overwrite?: boolean | undefined;
|
|
300
|
+
limit?: number | undefined;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export interface ReadOptions {
|
|
304
|
+
throws?: boolean | undefined;
|
|
305
|
+
fs?: object | undefined;
|
|
306
|
+
reviver?: any;
|
|
307
|
+
encoding?: string | undefined;
|
|
308
|
+
flag?: string | undefined;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export interface WriteFileOptions {
|
|
312
|
+
encoding?: string | undefined;
|
|
313
|
+
flag?: string | undefined;
|
|
314
|
+
mode?: number | undefined;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export interface WriteOptions extends WriteFileOptions {
|
|
318
|
+
fs?: object | undefined;
|
|
319
|
+
replacer?: any;
|
|
320
|
+
spaces?: number | string | undefined;
|
|
321
|
+
EOL?: string | undefined;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export interface ReadResult {
|
|
325
|
+
bytesRead: number;
|
|
326
|
+
buffer: Buffer;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export interface WriteResult {
|
|
330
|
+
bytesWritten: number;
|
|
331
|
+
buffer: Buffer;
|
|
332
|
+
}
|