@umijs/utils 4.0.21 → 4.0.22
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/compiled/filesize/LICENSE +28 -0
- package/compiled/filesize/filesize.d.ts +131 -0
- package/compiled/filesize/index.js +9 -0
- package/compiled/filesize/package.json +1 -0
- package/compiled/gzip-size/LICENSE +9 -0
- package/compiled/gzip-size/index.d.ts +96 -0
- package/compiled/gzip-size/index.js +1 -0
- package/compiled/gzip-size/package.json +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6 -0
- package/package.json +3 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Copyright (c) 2022, Jason Mulligan
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
|
6
|
+
|
|
7
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
8
|
+
list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
11
|
+
this list of conditions and the following disclaimer in the documentation
|
|
12
|
+
and/or other materials provided with the distribution.
|
|
13
|
+
|
|
14
|
+
* Neither the name of filesize nor the names of its
|
|
15
|
+
contributors may be used to endorse or promote products derived from
|
|
16
|
+
this software without specific prior written permission.
|
|
17
|
+
|
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
19
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
20
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
22
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
23
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
24
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
25
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
26
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
+
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// Type definitions for filesize 8.0.3
|
|
2
|
+
// Project: https://github.com/avoidwork/filesize.js, https://filesizejs.com
|
|
3
|
+
// Definitions by: Giedrius Grabauskas <https://github.com/GiedriusGrabauskas>
|
|
4
|
+
// Renaud Chaput <https://github.com/renchap>
|
|
5
|
+
// Roman Nuritdinov <https://github.com/Ky6uk>
|
|
6
|
+
// Sam Hulick <https://github.com/ffxsam>
|
|
7
|
+
// Tomoto S. Washio <https://github.com/tomoto>
|
|
8
|
+
|
|
9
|
+
declare var fileSize: Filesize.Filesize;
|
|
10
|
+
export = fileSize;
|
|
11
|
+
export as namespace filesize;
|
|
12
|
+
|
|
13
|
+
declare namespace Filesize {
|
|
14
|
+
interface SiJedecBits {
|
|
15
|
+
b?: string;
|
|
16
|
+
Kb?: string;
|
|
17
|
+
Mb?: string;
|
|
18
|
+
Gb?: string;
|
|
19
|
+
Tb?: string;
|
|
20
|
+
Pb?: string;
|
|
21
|
+
Eb?: string;
|
|
22
|
+
Zb?: string;
|
|
23
|
+
Yb?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface SiJedecBytes {
|
|
27
|
+
B?: string;
|
|
28
|
+
KB?: string;
|
|
29
|
+
MB?: string;
|
|
30
|
+
GB?: string;
|
|
31
|
+
TB?: string;
|
|
32
|
+
PB?: string;
|
|
33
|
+
EB?: string;
|
|
34
|
+
ZB?: string;
|
|
35
|
+
YB?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type SiJedec = SiJedecBits & SiJedecBytes & { [name: string]: string };
|
|
39
|
+
|
|
40
|
+
interface Options {
|
|
41
|
+
/**
|
|
42
|
+
* Number base, default is 10
|
|
43
|
+
*/
|
|
44
|
+
base?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Enables bit sizes, default is false
|
|
47
|
+
*/
|
|
48
|
+
bits?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Specifies the SI suffix via exponent, e.g. 2 is MB for bytes, default is -1
|
|
51
|
+
*/
|
|
52
|
+
exponent?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Enables full form of unit of measure, default is false
|
|
55
|
+
*/
|
|
56
|
+
fullform?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Array of full form overrides, default is []
|
|
59
|
+
*/
|
|
60
|
+
fullforms?: string[];
|
|
61
|
+
/**
|
|
62
|
+
* BCP 47 language tag to specify a locale, or true to use default locale, default is ""
|
|
63
|
+
*/
|
|
64
|
+
locale?: string | boolean;
|
|
65
|
+
/**
|
|
66
|
+
* ECMA-402 number format option overrides, default is "{}"
|
|
67
|
+
*/
|
|
68
|
+
localeOptions?: Intl.NumberFormatOptions;
|
|
69
|
+
/**
|
|
70
|
+
* Output of function (array, exponent, object, or string), default is string
|
|
71
|
+
*/
|
|
72
|
+
output?: "array" | "exponent" | "object" | "string";
|
|
73
|
+
/**
|
|
74
|
+
* Decimal place end padding, default is false
|
|
75
|
+
*/
|
|
76
|
+
pad?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Sets precision of numerical output, default is 0
|
|
79
|
+
*/
|
|
80
|
+
precision?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Decimal place, default is 2
|
|
83
|
+
*/
|
|
84
|
+
round?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Rounding method, can be round, floor, or ceil, default is round
|
|
87
|
+
*/
|
|
88
|
+
roundingMethod?: "round" | "floor" | "ceil";
|
|
89
|
+
/**
|
|
90
|
+
* Decimal separator character, default is `.`
|
|
91
|
+
*/
|
|
92
|
+
separator?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Character between the result and suffix, default is ` `
|
|
95
|
+
*/
|
|
96
|
+
spacer?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Standard unit of measure, can be iec or jedec, default is iec; can be overruled by base
|
|
99
|
+
*/
|
|
100
|
+
standard?: "iec" | "jedec";
|
|
101
|
+
/**
|
|
102
|
+
* Dictionary of SI/JEDEC symbols to replace for localization, defaults to english if no match is found
|
|
103
|
+
*/
|
|
104
|
+
symbols?: SiJedec;
|
|
105
|
+
/**
|
|
106
|
+
* Enables unix style human readable output, e.g ls -lh, default is false
|
|
107
|
+
*/
|
|
108
|
+
unix?: boolean;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Result type inference from the output option
|
|
112
|
+
interface ResultTypeMap<O> {
|
|
113
|
+
array: [O extends {precision: number} ? string : number, string];
|
|
114
|
+
exponent: number;
|
|
115
|
+
object: {
|
|
116
|
+
value: number,
|
|
117
|
+
symbol: string,
|
|
118
|
+
exponent: number,
|
|
119
|
+
unit: string,
|
|
120
|
+
};
|
|
121
|
+
string: string;
|
|
122
|
+
}
|
|
123
|
+
type DefaultOutput<O extends Options> = Exclude<O["output"], keyof ResultTypeMap<O>> extends never ? never : "string"
|
|
124
|
+
type CanonicalOutput<O extends Options> = Extract<O["output"], keyof ResultTypeMap<O>> | DefaultOutput<O>
|
|
125
|
+
|
|
126
|
+
interface Filesize {
|
|
127
|
+
(bytes: number): string;
|
|
128
|
+
<O extends Options>(bytes: number, options: O): ResultTypeMap<O>[CanonicalOutput<O>];
|
|
129
|
+
partial: <O extends Options>(options: O) => ((bytes: number) => ResultTypeMap<O>[CanonicalOutput<O>]);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(function(){var i={647:function(i){
|
|
2
|
+
/**
|
|
3
|
+
* filesize
|
|
4
|
+
*
|
|
5
|
+
* @copyright 2022 Jason Mulligan <jason.mulligan@avoidwork.com>
|
|
6
|
+
* @license BSD-3-Clause
|
|
7
|
+
* @version 9.0.11
|
|
8
|
+
*/
|
|
9
|
+
(function(e,t){true?i.exports=t():0})(this,(function(){"use strict";function _typeof(i){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(i){return typeof i}:function(i){return i&&"function"==typeof Symbol&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof(i)}var i="array";var e="bit";var t="bits";var r="byte";var o="bytes";var a="";var n="exponent";var f="function";var l="iec";var b="Invalid number";var s="Invalid rounding method";var u="jedec";var v="object";var p=".";var c="round";var d="s";var y="kbit";var _="kB";var m=" ";var g="string";var h="0";var B={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function filesize(w){var x=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},M=x.bits,k=M===void 0?false:M,S=x.pad,E=S===void 0?false:S,z=x.base,N=z===void 0?-1:z,T=x.round,j=T===void 0?2:T,q=x.locale,P=q===void 0?a:q,G=x.localeOptions,K=G===void 0?{}:G,Y=x.separator,Z=Y===void 0?a:Y,I=x.spacer,L=I===void 0?m:I,O=x.symbols,A=O===void 0?{}:O,C=x.standard,D=C===void 0?a:C,F=x.output,H=F===void 0?g:F,J=x.fullform,Q=J===void 0?false:J,R=x.fullforms,U=R===void 0?[]:R,V=x.exponent,W=V===void 0?-1:V,X=x.roundingMethod,$=X===void 0?c:X,ii=x.precision,ei=ii===void 0?0:ii;var ti=W,ri=Number(w),oi=[],ai=0,ni=a;if(N===-1&&D.length===0){N=10;D=u}else if(N===-1&&D.length>0){D=D===l?l:u;N=D===l?2:10}else{N=N===2?2:10;D=N===10?u:D===u?u:l}var fi=N===10?1e3:1024,li=Q===true,bi=ri<0,si=Math[$];if(isNaN(w)){throw new TypeError(b)}if(_typeof(si)!==f){throw new TypeError(s)}if(bi){ri=-ri}if(ti===-1||isNaN(ti)){ti=Math.floor(Math.log(ri)/Math.log(fi));if(ti<0){ti=0}}if(ti>8){if(ei>0){ei+=8-ti}ti=8}if(H===n){return ti}if(ri===0){oi[0]=0;ni=oi[1]=B.symbol[D][k?t:o][ti]}else{ai=ri/(N===2?Math.pow(2,ti*10):Math.pow(1e3,ti));if(k){ai=ai*8;if(ai>=fi&&ti<8){ai=ai/fi;ti++}}var ui=Math.pow(10,ti>0?j:0);oi[0]=si(ai*ui)/ui;if(oi[0]===fi&&ti<8&&W===-1){oi[0]=1;ti++}ni=oi[1]=N===10&&ti===1?k?y:_:B.symbol[D][k?t:o][ti]}if(bi){oi[0]=-oi[0]}if(ei>0){oi[0]=oi[0].toPrecision(ei)}oi[1]=A[oi[1]]||oi[1];if(P===true){oi[0]=oi[0].toLocaleString()}else if(P.length>0){oi[0]=oi[0].toLocaleString(P,K)}else if(Z.length>0){oi[0]=oi[0].toString().replace(p,Z)}if(E&&Number.isInteger(oi[0])===false&&j>0){var vi=Z||p,pi=oi[0].toString().split(vi),ci=pi[1]||a,di=ci.length,yi=j-di;oi[0]="".concat(pi[0]).concat(vi).concat(ci.padEnd(di+yi,h))}if(li){oi[1]=U[ti]?U[ti]:B.fullform[D][ti]+(k?e:r)+(oi[0]===1?a:d)}return H===i?oi:H===v?{value:oi[0],symbol:oi[1],exponent:ti,unit:ni}:oi.join(L)}filesize.partial=function(i){return function(e){return filesize(e,i)}};return filesize}))}};var e={};function __nccwpck_require__(t){var r=e[t];if(r!==undefined){return r.exports}var o=e[t]={exports:{}};var a=true;try{i[t].call(o.exports,o,o.exports,__nccwpck_require__);a=false}finally{if(a)delete e[t]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(647);module.exports=t})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"filesize","version":"9.0.11","author":"Jason Mulligan <jason.mulligan@avoidwork.com>","license":"BSD-3-Clause","types":"filesize.d.ts"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/// <reference types="node"/>
|
|
2
|
+
import * as stream from 'stream';
|
|
3
|
+
import {ZlibOptions} from 'zlib';
|
|
4
|
+
|
|
5
|
+
declare namespace gzipSize {
|
|
6
|
+
type Options = ZlibOptions;
|
|
7
|
+
|
|
8
|
+
interface GzipSizeStream extends stream.PassThrough {
|
|
9
|
+
/**
|
|
10
|
+
Contains the gzip size of the stream after it is finished. Since this happens asynchronously, it is recommended you use the `gzip-size` event instead.
|
|
11
|
+
*/
|
|
12
|
+
gzipSize?: number;
|
|
13
|
+
|
|
14
|
+
addListener(event: 'gzip-size', listener: (size: number) => void): this;
|
|
15
|
+
addListener(
|
|
16
|
+
event: string | symbol,
|
|
17
|
+
listener: (...args: any[]) => void
|
|
18
|
+
): this;
|
|
19
|
+
on(event: 'gzip-size', listener: (size: number) => void): this;
|
|
20
|
+
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
21
|
+
once(event: 'gzip-size', listener: (size: number) => void): this;
|
|
22
|
+
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
23
|
+
removeListener(event: 'gzip-size', listener: (size: number) => void): this;
|
|
24
|
+
removeListener(
|
|
25
|
+
event: string | symbol,
|
|
26
|
+
listener: (...args: any[]) => void
|
|
27
|
+
): this;
|
|
28
|
+
off(event: 'gzip-size', listener: (size: number) => void): this;
|
|
29
|
+
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
30
|
+
emit(event: 'gzip-size', size: number): boolean;
|
|
31
|
+
emit(event: string | symbol, ...args: any[]): boolean;
|
|
32
|
+
prependListener(event: 'gzip-size', listener: (size: number) => void): this;
|
|
33
|
+
prependListener(
|
|
34
|
+
event: string | symbol,
|
|
35
|
+
listener: (...args: any[]) => void
|
|
36
|
+
): this;
|
|
37
|
+
prependOnceListener(
|
|
38
|
+
event: 'gzip-size',
|
|
39
|
+
listener: (size: number) => void
|
|
40
|
+
): this;
|
|
41
|
+
prependOnceListener(
|
|
42
|
+
event: string | symbol,
|
|
43
|
+
listener: (...args: any[]) => void
|
|
44
|
+
): this;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare const gzipSize: {
|
|
49
|
+
/**
|
|
50
|
+
Get the gzipped size of a string or buffer.
|
|
51
|
+
|
|
52
|
+
@returns The gzipped size of `input`.
|
|
53
|
+
*/
|
|
54
|
+
(input: string | Buffer, options?: gzipSize.Options): Promise<number>;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
Synchronously get the gzipped size of a string or buffer.
|
|
58
|
+
|
|
59
|
+
@returns The gzipped size of `input`.
|
|
60
|
+
|
|
61
|
+
@example
|
|
62
|
+
```
|
|
63
|
+
import gzipSize = require('./gzip-size');
|
|
64
|
+
|
|
65
|
+
const text = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.';
|
|
66
|
+
|
|
67
|
+
console.log(text.length);
|
|
68
|
+
//=> 191
|
|
69
|
+
|
|
70
|
+
console.log(gzipSize.sync(text));
|
|
71
|
+
//=> 78
|
|
72
|
+
```
|
|
73
|
+
*/
|
|
74
|
+
sync(input: string | Buffer, options?: gzipSize.Options): number;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
@returns A stream that emits a `gzip-size` event and has a `gzipSize` property.
|
|
78
|
+
*/
|
|
79
|
+
stream(options?: gzipSize.Options): gzipSize.GzipSizeStream;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
Get the gzipped size of a file.
|
|
83
|
+
|
|
84
|
+
@returns The size of the file.
|
|
85
|
+
*/
|
|
86
|
+
file(path: string, options?: gzipSize.Options): Promise<number>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
Synchronously get the gzipped size of a file.
|
|
90
|
+
|
|
91
|
+
@returns The size of the file.
|
|
92
|
+
*/
|
|
93
|
+
fileSync(path: string, options?: gzipSize.Options): number;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export = gzipSize;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){var e={325:function(e,r,t){var n=t(781);var o=["write","end","destroy"];var i=["resume","pause"];var a=["data","close"];var s=Array.prototype.slice;e.exports=duplex;function forEach(e,r){if(e.forEach){return e.forEach(r)}for(var t=0;t<e.length;t++){r(e[t],t)}}function duplex(e,r){var t=new n;var c=false;forEach(o,proxyWriter);forEach(i,proxyReader);forEach(a,proxyStream);r.on("end",handleEnd);e.on("drain",(function(){t.emit("drain")}));e.on("error",reemit);r.on("error",reemit);t.writable=e.writable;t.readable=r.readable;return t;function proxyWriter(r){t[r]=method;function method(){return e[r].apply(e,arguments)}}function proxyReader(e){t[e]=method;function method(){t.emit(e);var n=r[e];if(n){return n.apply(r,arguments)}r.emit(e)}}function proxyStream(e){r.on(e,reemit);function reemit(){var r=s.call(arguments);r.unshift(e);t.emit.apply(t,r)}}function handleEnd(){if(c){return}c=true;var e=s.call(arguments);e.unshift("end");t.emit.apply(t,e)}function reemit(e){t.emit("error",e)}}},423:function(e,r,t){"use strict";const n=t(147);const o=t(781);const i=t(796);const{promisify:a}=t(837);const s=t(325);const getOptions=e=>({level:9,...e});const c=a(i.gzip);e.exports=async(e,r)=>{if(!e){return 0}const t=await c(e,getOptions(r));return t.length};e.exports.sync=(e,r)=>i.gzipSync(e,getOptions(r)).length;e.exports.stream=e=>{const r=new o.PassThrough;const t=new o.PassThrough;const n=s(r,t);let a=0;const c=i.createGzip(getOptions(e)).on("data",(e=>{a+=e.length})).on("error",(()=>{n.gzipSize=0})).on("end",(()=>{n.gzipSize=a;n.emit("gzip-size",a);t.end()}));r.pipe(c);r.pipe(t,{end:false});return n};e.exports.file=(r,t)=>new Promise(((o,i)=>{const a=n.createReadStream(r);a.on("error",i);const s=a.pipe(e.exports.stream(t));s.on("error",i);s.on("gzip-size",o)}));e.exports.fileSync=(r,t)=>e.exports.sync(n.readFileSync(r),t)},147:function(e){"use strict";e.exports=require("fs")},781:function(e){"use strict";e.exports=require("stream")},837:function(e){"use strict";e.exports=require("util")},796:function(e){"use strict";e.exports=require("zlib")}};var r={};function __nccwpck_require__(t){var n=r[t];if(n!==undefined){return n.exports}var o=r[t]={exports:{}};var i=true;try{e[t](o,o.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(423);module.exports=t})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"gzip-size","version":"6.0.0","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT"}
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ import generateFile from './BaseGenerator/generateFile';
|
|
|
24
24
|
import Generator from './Generator/Generator';
|
|
25
25
|
import getGitInfo from './getGitInfo';
|
|
26
26
|
import installDeps from './installDeps';
|
|
27
|
+
import filesize from '../compiled/filesize';
|
|
28
|
+
import gzipSize from '../compiled/gzip-size';
|
|
27
29
|
import * as logger from './logger';
|
|
28
30
|
import * as printHelp from './printHelp';
|
|
29
31
|
import updatePackageJSON from './updatePackageJSON';
|
|
@@ -37,4 +39,4 @@ export * from './randomColor/randomColor';
|
|
|
37
39
|
export * as register from './register';
|
|
38
40
|
export * from './tryPaths';
|
|
39
41
|
export * from './winPath';
|
|
40
|
-
export { address, axios, chalk, cheerio, chokidar, crossSpawn, debug, deepmerge, execa, fsExtra, glob, Generator, BaseGenerator, generateFile, installDeps, lodash, logger, Mustache, pkgUp, portfinder, prompts, resolve, rimraf, semver, stripAnsi, updatePackageJSON, yParser, getGitInfo, printHelp, };
|
|
42
|
+
export { address, axios, chalk, cheerio, chokidar, crossSpawn, debug, deepmerge, execa, fsExtra, glob, Generator, BaseGenerator, generateFile, installDeps, lodash, logger, Mustache, pkgUp, portfinder, prompts, resolve, rimraf, semver, stripAnsi, updatePackageJSON, yParser, getGitInfo, printHelp, filesize, gzipSize, };
|
package/dist/index.js
CHANGED
|
@@ -35,10 +35,12 @@ __export(src_exports, {
|
|
|
35
35
|
debug: () => import_debug.default,
|
|
36
36
|
deepmerge: () => import_deepmerge.default,
|
|
37
37
|
execa: () => execa,
|
|
38
|
+
filesize: () => import_filesize.default,
|
|
38
39
|
fsExtra: () => import_fs_extra.default,
|
|
39
40
|
generateFile: () => import_generateFile.default,
|
|
40
41
|
getGitInfo: () => import_getGitInfo.default,
|
|
41
42
|
glob: () => import_glob.default,
|
|
43
|
+
gzipSize: () => import_gzip_size.default,
|
|
42
44
|
installDeps: () => import_installDeps.default,
|
|
43
45
|
lodash: () => import_lodash.default,
|
|
44
46
|
logger: () => logger,
|
|
@@ -81,6 +83,8 @@ var import_generateFile = __toESM(require("./BaseGenerator/generateFile"));
|
|
|
81
83
|
var import_Generator = __toESM(require("./Generator/Generator"));
|
|
82
84
|
var import_getGitInfo = __toESM(require("./getGitInfo"));
|
|
83
85
|
var import_installDeps = __toESM(require("./installDeps"));
|
|
86
|
+
var import_filesize = __toESM(require("../compiled/filesize"));
|
|
87
|
+
var import_gzip_size = __toESM(require("../compiled/gzip-size"));
|
|
84
88
|
var logger = __toESM(require("./logger"));
|
|
85
89
|
var printHelp = __toESM(require("./printHelp"));
|
|
86
90
|
var import_updatePackageJSON = __toESM(require("./updatePackageJSON"));
|
|
@@ -108,10 +112,12 @@ __reExport(src_exports, require("./winPath"), module.exports);
|
|
|
108
112
|
debug,
|
|
109
113
|
deepmerge,
|
|
110
114
|
execa,
|
|
115
|
+
filesize,
|
|
111
116
|
fsExtra,
|
|
112
117
|
generateFile,
|
|
113
118
|
getGitInfo,
|
|
114
119
|
glob,
|
|
120
|
+
gzipSize,
|
|
115
121
|
installDeps,
|
|
116
122
|
lodash,
|
|
117
123
|
logger,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/utils",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.22",
|
|
4
4
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/utils#readme",
|
|
5
5
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
6
6
|
"repository": {
|
|
@@ -44,8 +44,10 @@
|
|
|
44
44
|
"debug": "4.3.4",
|
|
45
45
|
"deepmerge": "4.2.2",
|
|
46
46
|
"execa": "6.1.0",
|
|
47
|
+
"filesize": "9.0.11",
|
|
47
48
|
"fs-extra": "10.0.1",
|
|
48
49
|
"glob": "8.0.1",
|
|
50
|
+
"gzip-size": "6.0.0",
|
|
49
51
|
"import-lazy": "4.0.0",
|
|
50
52
|
"lodash": "4.17.21",
|
|
51
53
|
"mustache": "4.2.0",
|