@modern-js/utils 1.3.4 → 1.3.7-alpha.prebundle.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.eslintrc.js +9 -0
- package/CHANGELOG.md +18 -0
- package/compiled/browserslist/index.d.ts +178 -0
- package/compiled/browserslist/index.js +1 -0
- package/compiled/browserslist/license +20 -0
- package/compiled/browserslist/package.json +1 -0
- package/compiled/chalk/index.d.ts +415 -0
- package/compiled/chalk/index.js +1 -0
- package/compiled/chalk/license +9 -0
- package/compiled/chalk/package.json +1 -0
- package/compiled/chokidar/anymatch/index.d.ts +19 -0
- package/compiled/chokidar/fsevents.node +0 -0
- package/compiled/chokidar/index.js +40 -0
- package/compiled/chokidar/license +21 -0
- package/compiled/chokidar/package.json +1 -0
- package/compiled/chokidar/types/index.d.ts +188 -0
- package/compiled/commander/index.js +1 -0
- package/compiled/commander/license +22 -0
- package/compiled/commander/package.json +1 -0
- package/compiled/commander/typings/index.d.ts +774 -0
- package/compiled/debug/index.d.ts +54 -0
- package/compiled/debug/index.js +1 -0
- package/compiled/debug/license +20 -0
- package/compiled/debug/ms/index.d.ts +25 -0
- package/compiled/debug/package.json +1 -0
- package/compiled/execa/index.d.ts +564 -0
- package/compiled/execa/index.js +1 -0
- package/compiled/execa/license +9 -0
- package/compiled/execa/package.json +1 -0
- package/compiled/filesize/filesize.d.ts +131 -0
- package/compiled/filesize/index.js +9 -0
- package/compiled/filesize/license +28 -0
- package/compiled/filesize/package.json +1 -0
- package/compiled/fs-extra/index.d.ts +563 -0
- package/compiled/fs-extra/index.js +1 -0
- package/compiled/fs-extra/license +15 -0
- package/compiled/fs-extra/package.json +1 -0
- package/compiled/glob/index.d.ts +91 -0
- package/compiled/glob/index.js +1 -0
- package/compiled/glob/license +21 -0
- package/compiled/glob/minimatch/index.d.ts +204 -0
- package/compiled/glob/package.json +1 -0
- package/compiled/gzip-size/index.d.ts +96 -0
- package/compiled/gzip-size/index.js +1 -0
- package/compiled/gzip-size/license +9 -0
- package/compiled/gzip-size/package.json +1 -0
- package/compiled/import-lazy/index.d.ts +26 -0
- package/compiled/import-lazy/index.js +1 -0
- package/compiled/import-lazy/license +9 -0
- package/compiled/import-lazy/package.json +1 -0
- package/compiled/js-yaml/index.d.ts +154 -0
- package/compiled/js-yaml/index.js +1 -0
- package/compiled/js-yaml/license +21 -0
- package/compiled/js-yaml/package.json +1 -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 +1446 -0
- package/compiled/lodash/common/lang.d.ts +1693 -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 +1220 -0
- package/compiled/lodash/index.d.ts +46 -0
- package/compiled/lodash/index.js +9 -0
- package/compiled/lodash/license +47 -0
- package/compiled/lodash/package.json +1 -0
- package/compiled/pkg-up/index.d.ts +48 -0
- package/compiled/pkg-up/index.js +1 -0
- package/compiled/pkg-up/license +9 -0
- package/compiled/pkg-up/package.json +1 -0
- package/compiled/recursive-readdir/index.d.ts +21 -0
- package/compiled/recursive-readdir/index.js +1 -0
- package/compiled/recursive-readdir/license +21 -0
- package/compiled/recursive-readdir/package.json +1 -0
- package/compiled/signale/index.d.ts +162 -0
- package/compiled/signale/index.js +1 -0
- package/compiled/signale/package.json +1 -0
- package/compiled/strip-ansi/index.d.ts +17 -0
- package/compiled/strip-ansi/index.js +1 -0
- package/compiled/strip-ansi/license +9 -0
- package/compiled/strip-ansi/package.json +1 -0
- package/compiled/upath/index.js +1 -0
- package/compiled/upath/license +22 -0
- package/compiled/upath/package.json +1 -0
- package/compiled/upath/upath.d.ts +241 -0
- package/dist/{types/FileSizeReporter.d.ts → FileSizeReporter.d.ts} +5 -5
- package/dist/FileSizeReporter.js +151 -0
- package/dist/{types/alias.d.ts → alias.d.ts} +12 -14
- package/dist/alias.js +62 -0
- package/dist/applyOptionsChain.d.ts +6 -0
- package/dist/applyOptionsChain.js +30 -0
- package/dist/clearConsole.d.ts +1 -0
- package/dist/clearConsole.js +9 -0
- package/dist/{types/compatRequire.d.ts → compatRequire.d.ts} +1 -1
- package/dist/compatRequire.js +28 -0
- package/dist/compiled/upath/index.d.ts +225 -0
- package/dist/compiled/upath/index.js +1 -0
- package/dist/compiled.d.ts +21 -0
- package/dist/compiled.js +33 -0
- package/dist/constants.d.ts +209 -0
- package/dist/constants.js +264 -0
- package/dist/{js/modern/debug.js → debug.d.ts} +1 -3
- package/dist/debug.js +11 -0
- package/dist/emptyDir.d.ts +1 -0
- package/dist/emptyDir.js +19 -0
- package/dist/{types/ensureAbsolutePath.d.ts → ensureAbsolutePath.d.ts} +1 -1
- package/dist/ensureAbsolutePath.js +15 -0
- package/dist/{types/findExists.d.ts → findExists.d.ts} +1 -1
- package/dist/findExists.js +21 -0
- package/dist/{types/format.d.ts → format.d.ts} +5 -5
- package/dist/format.js +113 -0
- package/dist/{types/generateMetaTags.d.ts → generateMetaTags.d.ts} +3 -3
- package/dist/generateMetaTags.js +48 -0
- package/dist/{types/getBrowserslist.d.ts → getBrowserslist.d.ts} +1 -1
- package/dist/getBrowserslist.js +7 -0
- package/dist/{types/getCacheIdentifier.d.ts → getCacheIdentifier.d.ts} +3 -3
- package/dist/getCacheIdentifier.js +24 -0
- package/dist/{types/getEntryOptions.d.ts → getEntryOptions.d.ts} +1 -1
- package/dist/getEntryOptions.js +26 -0
- package/dist/{types/getPackageManager.d.ts → getPackageManager.d.ts} +1 -1
- package/dist/getPackageManager.js +47 -0
- package/dist/{types/getPort.d.ts → getPort.d.ts} +1 -1
- package/dist/getPort.js +62 -0
- package/dist/{types/import.d.ts → import.d.ts} +2 -2
- package/dist/import.js +10 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +43 -0
- package/dist/{types/is → is}/index.d.ts +1 -4
- package/dist/is/index.js +82 -0
- package/dist/{types/is → is}/node-env.d.ts +1 -1
- package/dist/is/node-env.js +12 -0
- package/dist/is/platform.d.ts +2 -0
- package/dist/is/platform.js +10 -0
- package/dist/is/type.d.ts +8 -0
- package/dist/is/type.js +38 -0
- package/dist/logger.d.ts +63 -0
- package/dist/logger.js +128 -0
- package/dist/{types/monorepo.d.ts → monorepo.d.ts} +3 -3
- package/dist/monorepo.js +80 -0
- package/dist/{types/nodeEnv.d.ts → nodeEnv.d.ts} +1 -1
- package/dist/nodeEnv.js +49 -0
- package/dist/{types/path.d.ts → path.d.ts} +1 -1
- package/dist/path.js +14 -0
- package/dist/{types/pkgUp.d.ts → pkgUp.d.ts} +1 -1
- package/dist/pkgUp.js +8 -0
- package/dist/{types/prettyInstructions.d.ts → prettyInstructions.d.ts} +2 -2
- package/dist/prettyInstructions.js +64 -0
- package/dist/{types/printBuildError.d.ts → printBuildError.d.ts} +1 -1
- package/dist/printBuildError.js +43 -0
- package/dist/{types/readTsConfig.d.ts → readTsConfig.d.ts} +1 -1
- package/dist/readTsConfig.js +19 -0
- package/dist/{types/removeSlash.d.ts → removeSlash.d.ts} +1 -1
- package/dist/removeSlash.js +9 -0
- package/dist/{types/runtimeExports.d.ts → runtimeExports.d.ts} +3 -3
- package/dist/runtimeExports.js +53 -0
- package/dist/src/FileSizeReporter.d.ts +16 -0
- package/dist/src/FileSizeReporter.js +152 -0
- package/dist/src/alias.d.ts +21 -0
- package/dist/src/alias.js +62 -0
- package/dist/src/applyOptionsChain.d.ts +6 -0
- package/dist/src/applyOptionsChain.js +30 -0
- package/dist/src/clearConsole.d.ts +1 -0
- package/dist/src/clearConsole.js +9 -0
- package/dist/src/compatRequire.d.ts +8 -0
- package/dist/src/compatRequire.js +28 -0
- package/dist/src/compiled.d.ts +7 -0
- package/dist/src/compiled.js +19 -0
- package/dist/src/constants.d.ts +209 -0
- package/dist/src/constants.js +264 -0
- package/dist/{types → src}/debug.d.ts +1 -2
- package/dist/src/debug.js +14 -0
- package/dist/src/emptyDir.d.ts +1 -0
- package/dist/src/emptyDir.js +22 -0
- package/dist/{js/modern/ensureAbsolutePath.js → src/ensureAbsolutePath.d.ts} +1 -3
- package/dist/src/ensureAbsolutePath.js +15 -0
- package/dist/src/findExists.d.ts +6 -0
- package/dist/src/findExists.js +21 -0
- package/dist/src/format.d.ts +16 -0
- package/dist/src/format.js +115 -0
- package/dist/src/generateMetaTags.d.ts +16 -0
- package/dist/src/generateMetaTags.js +48 -0
- package/dist/src/getBrowserslist.d.ts +2 -0
- package/dist/src/getBrowserslist.js +7 -0
- package/dist/src/getCacheIdentifier.d.ts +7 -0
- package/dist/src/getCacheIdentifier.js +24 -0
- package/dist/src/getEntryOptions.d.ts +1 -0
- package/dist/src/getEntryOptions.js +26 -0
- package/dist/src/getPackageManager.d.ts +1 -0
- package/dist/src/getPackageManager.js +47 -0
- package/dist/src/getPort.d.ts +7 -0
- package/dist/src/getPort.js +62 -0
- package/dist/src/import.d.ts +5 -0
- package/dist/src/import.js +10 -0
- package/dist/{types → src}/index.d.ts +2 -3
- package/dist/src/index.js +57 -0
- package/dist/src/is/index.d.ts +34 -0
- package/dist/src/is/index.js +82 -0
- package/dist/src/is/node-env.d.ts +4 -0
- package/dist/src/is/node-env.js +12 -0
- package/dist/src/is/platform.d.ts +2 -0
- package/dist/src/is/platform.js +10 -0
- package/dist/src/is/type.d.ts +8 -0
- package/dist/src/is/type.js +38 -0
- package/dist/src/logger.d.ts +63 -0
- package/dist/src/logger.js +129 -0
- package/dist/src/monorepo.d.ts +11 -0
- package/dist/src/monorepo.js +81 -0
- package/dist/src/nodeEnv.d.ts +3 -0
- package/dist/src/nodeEnv.js +52 -0
- package/dist/src/path.d.ts +3 -0
- package/dist/src/path.js +14 -0
- package/dist/src/prettyInstructions.d.ts +6 -0
- package/dist/src/prettyInstructions.js +64 -0
- package/dist/src/printBuildError.d.ts +8 -0
- package/dist/src/printBuildError.js +43 -0
- package/dist/src/readTsConfig.d.ts +2 -0
- package/dist/src/readTsConfig.js +19 -0
- package/dist/src/removeSlash.d.ts +3 -0
- package/dist/src/removeSlash.js +9 -0
- package/dist/src/runtimeExports.d.ts +4 -0
- package/dist/src/runtimeExports.js +53 -0
- package/dist/{types → src}/wait.d.ts +1 -1
- package/dist/src/wait.js +7 -0
- package/dist/{types → src}/watch.d.ts +3 -3
- package/dist/src/watch.js +65 -0
- package/dist/wait.d.ts +2 -0
- package/dist/wait.js +7 -0
- package/dist/watch.d.ts +8 -0
- package/dist/watch.js +64 -0
- package/jest.config.js +0 -1
- package/package.json +55 -39
- package/tests/debug.test.ts +2 -2
- package/tests/is.test.ts +27 -0
- package/tests/isPlatform.test.ts +19 -0
- package/tests/isType.test.ts +70 -2
- package/tests/prettyInstructions.test.ts +1 -1
- package/tsconfig.json +3 -5
- package/dist/js/modern/FileSizeReporter.js +0 -156
- package/dist/js/modern/alias.js +0 -74
- package/dist/js/modern/applyOptionsChain.js +0 -27
- package/dist/js/modern/chalk.js +0 -2
- package/dist/js/modern/clearConsole.js +0 -5
- package/dist/js/modern/compatRequire.js +0 -26
- package/dist/js/modern/constants.js +0 -338
- package/dist/js/modern/emptyDir.js +0 -6
- package/dist/js/modern/findExists.js +0 -16
- package/dist/js/modern/format.js +0 -137
- package/dist/js/modern/generateMetaTags.js +0 -49
- package/dist/js/modern/getBrowserslist.js +0 -5
- package/dist/js/modern/getCacheIdentifier.js +0 -20
- package/dist/js/modern/getEntryOptions.js +0 -24
- package/dist/js/modern/getPackageManager.js +0 -37
- package/dist/js/modern/getPort.js +0 -52
- package/dist/js/modern/import.js +0 -11
- package/dist/js/modern/index.js +0 -34
- package/dist/js/modern/is/index.js +0 -77
- package/dist/js/modern/is/node-env.js +0 -5
- package/dist/js/modern/is/platform.js +0 -2
- package/dist/js/modern/is/type.js +0 -28
- package/dist/js/modern/logger.js +0 -152
- package/dist/js/modern/monorepo.js +0 -84
- package/dist/js/modern/nodeEnv.js +0 -31
- package/dist/js/modern/path.js +0 -5
- package/dist/js/modern/pkgUp.js +0 -2
- package/dist/js/modern/prettyInstructions.js +0 -79
- package/dist/js/modern/printBuildError.js +0 -40
- package/dist/js/modern/readTsConfig.js +0 -13
- package/dist/js/modern/removeSlash.js +0 -3
- package/dist/js/modern/runtimeExports.js +0 -52
- package/dist/js/modern/wait.js +0 -5
- package/dist/js/modern/watch.js +0 -43
- package/dist/js/node/FileSizeReporter.js +0 -175
- package/dist/js/node/alias.js +0 -97
- package/dist/js/node/applyOptionsChain.js +0 -37
- package/dist/js/node/chalk.js +0 -15
- package/dist/js/node/clearConsole.js +0 -14
- package/dist/js/node/compatRequire.js +0 -41
- package/dist/js/node/constants.js +0 -358
- package/dist/js/node/debug.js +0 -19
- package/dist/js/node/emptyDir.js +0 -18
- package/dist/js/node/ensureAbsolutePath.js +0 -20
- package/dist/js/node/findExists.js +0 -27
- package/dist/js/node/format.js +0 -141
- package/dist/js/node/generateMetaTags.js +0 -58
- package/dist/js/node/getBrowserslist.js +0 -17
- package/dist/js/node/getCacheIdentifier.js +0 -27
- package/dist/js/node/getEntryOptions.js +0 -35
- package/dist/js/node/getPackageManager.js +0 -51
- package/dist/js/node/getPort.js +0 -67
- package/dist/js/node/import.js +0 -19
- package/dist/js/node/index.js +0 -465
- package/dist/js/node/is/index.js +0 -150
- package/dist/js/node/is/node-env.js +0 -23
- package/dist/js/node/is/platform.js +0 -14
- package/dist/js/node/is/type.js +0 -49
- package/dist/js/node/logger.js +0 -162
- package/dist/js/node/monorepo.js +0 -118
- package/dist/js/node/nodeEnv.js +0 -45
- package/dist/js/node/path.js +0 -24
- package/dist/js/node/pkgUp.js +0 -15
- package/dist/js/node/prettyInstructions.js +0 -95
- package/dist/js/node/printBuildError.js +0 -52
- package/dist/js/node/readTsConfig.js +0 -28
- package/dist/js/node/removeSlash.js +0 -18
- package/dist/js/node/runtimeExports.js +0 -68
- package/dist/js/node/wait.js +0 -12
- package/dist/js/node/watch.js +0 -61
- package/dist/js/treeshaking/FileSizeReporter.js +0 -185
- package/dist/js/treeshaking/alias.js +0 -72
- package/dist/js/treeshaking/applyOptionsChain.js +0 -31
- package/dist/js/treeshaking/chalk.js +0 -2
- package/dist/js/treeshaking/clearConsole.js +0 -5
- package/dist/js/treeshaking/compatRequire.js +0 -29
- package/dist/js/treeshaking/constants.js +0 -338
- package/dist/js/treeshaking/debug.js +0 -10
- package/dist/js/treeshaking/emptyDir.js +0 -37
- package/dist/js/treeshaking/ensureAbsolutePath.js +0 -11
- package/dist/js/treeshaking/findExists.js +0 -33
- package/dist/js/treeshaking/format.js +0 -167
- package/dist/js/treeshaking/generateMetaTags.js +0 -55
- package/dist/js/treeshaking/getBrowserslist.js +0 -7
- package/dist/js/treeshaking/getCacheIdentifier.js +0 -35
- package/dist/js/treeshaking/getEntryOptions.js +0 -26
- package/dist/js/treeshaking/getPackageManager.js +0 -101
- package/dist/js/treeshaking/getPort.js +0 -103
- package/dist/js/treeshaking/import.js +0 -11
- package/dist/js/treeshaking/index.js +0 -34
- package/dist/js/treeshaking/is/index.js +0 -81
- package/dist/js/treeshaking/is/node-env.js +0 -13
- package/dist/js/treeshaking/is/platform.js +0 -6
- package/dist/js/treeshaking/is/type.js +0 -30
- package/dist/js/treeshaking/logger.js +0 -188
- package/dist/js/treeshaking/monorepo.js +0 -95
- package/dist/js/treeshaking/nodeEnv.js +0 -108
- package/dist/js/treeshaking/path.js +0 -11
- package/dist/js/treeshaking/pkgUp.js +0 -2
- package/dist/js/treeshaking/prettyInstructions.js +0 -100
- package/dist/js/treeshaking/printBuildError.js +0 -40
- package/dist/js/treeshaking/readTsConfig.js +0 -13
- package/dist/js/treeshaking/removeSlash.js +0 -9
- package/dist/js/treeshaking/runtimeExports.js +0 -61
- package/dist/js/treeshaking/wait.js +0 -8
- package/dist/js/treeshaking/watch.js +0 -112
- package/dist/types/applyOptionsChain.d.ts +0 -6
- package/dist/types/chalk.d.ts +0 -2
- package/dist/types/clearConsole.d.ts +0 -1
- package/dist/types/constants.d.ts +0 -219
- package/dist/types/emptyDir.d.ts +0 -1
- package/dist/types/is/platform.d.ts +0 -2
- package/dist/types/is/type.d.ts +0 -8
- package/dist/types/logger.d.ts +0 -63
@@ -0,0 +1,162 @@
|
|
1
|
+
// Type definitions for signale 1.4
|
2
|
+
// Project: https://github.com/klaussinani/signale
|
3
|
+
// Definitions by: Resi Respati <https://github.com/resir014>
|
4
|
+
// Joydip Roy <https://github.com/rjoydip>
|
5
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
6
|
+
// TypeScript Version: 2.7
|
7
|
+
|
8
|
+
/// <reference types="node" />
|
9
|
+
|
10
|
+
declare namespace signale {
|
11
|
+
type DefaultMethods =
|
12
|
+
| 'await'
|
13
|
+
| 'complete'
|
14
|
+
| 'error'
|
15
|
+
| 'debug'
|
16
|
+
| 'fatal'
|
17
|
+
| 'fav'
|
18
|
+
| 'info'
|
19
|
+
| 'note'
|
20
|
+
| 'pause'
|
21
|
+
| 'pending'
|
22
|
+
| 'star'
|
23
|
+
| 'start'
|
24
|
+
| 'success'
|
25
|
+
| 'warn'
|
26
|
+
| 'watch'
|
27
|
+
| 'log';
|
28
|
+
|
29
|
+
interface CommandType {
|
30
|
+
/** The icon corresponding to the logger. */
|
31
|
+
badge: string;
|
32
|
+
/**
|
33
|
+
* The color of the label, can be any of the foreground colors supported by
|
34
|
+
* [chalk](https://github.com/chalk/chalk#colors).
|
35
|
+
*/
|
36
|
+
color: string;
|
37
|
+
/** The label used to identify the type of the logger. */
|
38
|
+
label: string;
|
39
|
+
logLevel?: string | undefined;
|
40
|
+
stream?: NodeJS.WriteStream | NodeJS.WriteStream[] | undefined;
|
41
|
+
}
|
42
|
+
|
43
|
+
interface SignaleConfig {
|
44
|
+
/** Display the scope name of the logger. */
|
45
|
+
displayScope?: boolean | undefined;
|
46
|
+
/** Display the badge of the logger. */
|
47
|
+
displayBadge?: boolean | undefined;
|
48
|
+
/** Display the current local date in `YYYY-MM-DD` format. */
|
49
|
+
displayDate?: boolean | undefined;
|
50
|
+
/** Display the name of the file that the logger is reporting from. */
|
51
|
+
displayFilename?: boolean | undefined;
|
52
|
+
/** Display the label of the logger. */
|
53
|
+
displayLabel?: boolean | undefined;
|
54
|
+
/** Display the current local time in `HH:MM:SS` format. */
|
55
|
+
displayTimestamp?: boolean | undefined;
|
56
|
+
/** Underline the logger label. */
|
57
|
+
underlineLabel?: boolean | undefined;
|
58
|
+
/** Underline the logger message. */
|
59
|
+
underlineMessage?: boolean | undefined;
|
60
|
+
underlinePrefix?: boolean | undefined;
|
61
|
+
underlineSuffix?: boolean | undefined;
|
62
|
+
uppercaseLabel?: boolean | undefined;
|
63
|
+
}
|
64
|
+
|
65
|
+
interface SignaleOptions<TTypes extends string = DefaultMethods> {
|
66
|
+
/** Sets the configuration of an instance overriding any existing global or local configuration. */
|
67
|
+
config?: SignaleConfig | undefined;
|
68
|
+
disabled?: boolean | undefined;
|
69
|
+
/**
|
70
|
+
* Name of the scope.
|
71
|
+
*/
|
72
|
+
scope?: string | undefined;
|
73
|
+
/**
|
74
|
+
* Holds the configuration of the custom and default loggers.
|
75
|
+
*/
|
76
|
+
types?: Partial<Record<TTypes, CommandType>> | undefined;
|
77
|
+
interactive?: boolean | undefined;
|
78
|
+
logLevel?: string | undefined;
|
79
|
+
timers?: Map<string, Date> | undefined;
|
80
|
+
/**
|
81
|
+
* Destination to which the data is written, can be any valid
|
82
|
+
* [Writable stream](https://nodejs.org/api/stream.html#stream_writable_streams).
|
83
|
+
*/
|
84
|
+
stream?: NodeJS.WriteStream | NodeJS.WriteStream[] | undefined;
|
85
|
+
secrets?: Array<string | number> | undefined;
|
86
|
+
}
|
87
|
+
|
88
|
+
interface SignaleConstructor {
|
89
|
+
new <TTypes extends string = DefaultMethods>(options?: SignaleOptions<TTypes>): Signale<TTypes>;
|
90
|
+
}
|
91
|
+
|
92
|
+
interface SignaleBase<TTypes extends string = DefaultMethods> {
|
93
|
+
/**
|
94
|
+
* Sets the configuration of an instance overriding any existing global or local configuration.
|
95
|
+
*
|
96
|
+
* @param configObj Can hold any of the documented options.
|
97
|
+
*/
|
98
|
+
config(configObj: SignaleConfig): Signale<TTypes>;
|
99
|
+
/**
|
100
|
+
* Defines the scope name of the logger.
|
101
|
+
*
|
102
|
+
* @param name Can be one or more comma delimited strings.
|
103
|
+
*/
|
104
|
+
scope(...name: string[]): Signale<TTypes>;
|
105
|
+
/** Clears the scope name of the logger. */
|
106
|
+
unscope(): void;
|
107
|
+
/**
|
108
|
+
* Sets a timers and accepts an optional label. If none provided the timer will receive a unique label automatically.
|
109
|
+
*
|
110
|
+
* @param label Label corresponding to the timer. Each timer must have its own unique label.
|
111
|
+
* @returns a string corresponding to the timer label.
|
112
|
+
*/
|
113
|
+
time(label?: string): string;
|
114
|
+
/**
|
115
|
+
* Deactivates the timer to which the given label corresponds. If no label
|
116
|
+
* is provided the most recent timer, that was created without providing a
|
117
|
+
* label, will be deactivated.
|
118
|
+
*
|
119
|
+
* @param label Label corresponding to the timer, each timer has its own unique label.
|
120
|
+
* @param span Total running time.
|
121
|
+
*/
|
122
|
+
timeEnd(label?: string, span?: number): { label: string; span?: number | undefined };
|
123
|
+
/**
|
124
|
+
* Disables the logging functionality of all loggers belonging to a specific instance.
|
125
|
+
*/
|
126
|
+
disable(): void;
|
127
|
+
/**
|
128
|
+
* Enables the logging functionality of all loggers belonging to a specific instance.
|
129
|
+
*/
|
130
|
+
enable(): void;
|
131
|
+
/**
|
132
|
+
* Checks whether the logging functionality of a specific instance is enabled.
|
133
|
+
*
|
134
|
+
* @returns a boolean that describes whether or not the logger is enabled.
|
135
|
+
*/
|
136
|
+
isEnabled(): boolean;
|
137
|
+
/**
|
138
|
+
* Adds new secrets/sensitive-information to the targeted Signale instance.
|
139
|
+
*
|
140
|
+
* @param secrets Array holding the secrets/sensitive-information to be filtered out.
|
141
|
+
*/
|
142
|
+
addSecrets(secrets: string[] | number[]): void;
|
143
|
+
/**
|
144
|
+
* Removes all secrets/sensitive-information from the targeted Signale instance.
|
145
|
+
*/
|
146
|
+
clearSecrets(): void;
|
147
|
+
}
|
148
|
+
|
149
|
+
type LoggerFunc = (message?: any, ...optionalArgs: any[]) => void;
|
150
|
+
type Signale<TTypes extends string = DefaultMethods> = SignaleBase<TTypes> &
|
151
|
+
Record<TTypes, LoggerFunc> &
|
152
|
+
Record<DefaultMethods, LoggerFunc>;
|
153
|
+
}
|
154
|
+
|
155
|
+
declare const signale: signale.Signale<signale.DefaultMethods> & {
|
156
|
+
Signale: signale.SignaleConstructor;
|
157
|
+
SignaleConfig: signale.SignaleConfig;
|
158
|
+
SignaleOptions: signale.SignaleOptions;
|
159
|
+
DefaultMethods: signale.DefaultMethods;
|
160
|
+
};
|
161
|
+
|
162
|
+
export = signale;
|
@@ -0,0 +1 @@
|
|
1
|
+
(()=>{var e={305:(e,t,r)=>{"use strict";var n=r(837);var i=r(589);var s=function errorEx(e,t){if(!e||e.constructor!==String){t=e||{};e=Error.name}var r=function ErrorEXError(n){if(!this){return new ErrorEXError(n)}n=n instanceof Error?n.message:n||this.message;Error.call(this,n);Error.captureStackTrace(this,r);this.name=e;Object.defineProperty(this,"message",{configurable:true,enumerable:false,get:function(){var e=n.split(/\r?\n/g);for(var r in t){if(!t.hasOwnProperty(r)){continue}var s=t[r];if("message"in s){e=s.message(this[r],e)||e;if(!i(e)){e=[e]}}}return e.join("\n")},set:function(e){n=e}});var s=null;var o=Object.getOwnPropertyDescriptor(this,"stack");var c=o.get;var a=o.value;delete o.value;delete o.writable;o.set=function(e){s=e};o.get=function(){var e=(s||(c?c.call(this):a)).split(/\r?\n+/g);if(!s){e[0]=this.name+": "+this.message}var r=1;for(var n in t){if(!t.hasOwnProperty(n)){continue}var i=t[n];if("line"in i){var o=i.line(this[n]);if(o){e.splice(r++,0," "+o)}}if("stack"in i){i.stack(this[n],e)}}return e.join("\n")};Object.defineProperty(this,"stack",o)};if(Object.setPrototypeOf){Object.setPrototypeOf(r.prototype,Error.prototype);Object.setPrototypeOf(r,Error)}else{n.inherits(r,Error)}return r};s.append=function(e,t){return{message:function(r,n){r=r||t;if(r){n[0]+=" "+e.replace("%s",r.toString())}return n}}};s.line=function(e,t){return{line:function(r){r=r||t;if(r){return e.replace("%s",r.toString())}return null}}};e.exports=s},434:e=>{"use strict";var t=/[|\\{}()[\]^$+*?.]/g;e.exports=function(e){if(typeof e!=="string"){throw new TypeError("Expected a string")}return e.replace(t,"\\$&")}},877:(e,t,r)=>{"use strict";const n=r(434);const i=process.platform;const s={tick:"✔",cross:"✖",star:"★",square:"▇",squareSmall:"◻",squareSmallFilled:"◼",play:"▶",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",circleQuestionMark:"?⃝",bullet:"●",dot:"․",line:"─",ellipsis:"…",pointer:"❯",pointerSmall:"›",info:"ℹ",warning:"⚠",hamburger:"☰",smiley:"㋡",mustache:"෴",heart:"♥",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",questionMarkPrefix:"?⃝",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneSeventh:"⅐",oneEighth:"⅛",oneNinth:"⅑",oneTenth:"⅒",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞"};const o={tick:"√",cross:"×",star:"*",square:"█",squareSmall:"[ ]",squareSmallFilled:"[█]",play:"►",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",circleQuestionMark:"(?)",bullet:"*",dot:".",line:"─",ellipsis:"...",pointer:">",pointerSmall:"»",info:"i",warning:"‼",hamburger:"≡",smiley:"☺",mustache:"┌─┐",heart:s.heart,arrowUp:s.arrowUp,arrowDown:s.arrowDown,arrowLeft:s.arrowLeft,arrowRight:s.arrowRight,radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",questionMarkPrefix:"?",oneHalf:"1/2",oneThird:"1/3",oneQuarter:"1/4",oneFifth:"1/5",oneSixth:"1/6",oneSeventh:"1/7",oneEighth:"1/8",oneNinth:"1/9",oneTenth:"1/10",twoThirds:"2/3",twoFifths:"2/5",threeQuarters:"3/4",threeFifths:"3/5",threeEighths:"3/8",fourFifths:"4/5",fiveSixths:"5/6",fiveEighths:"5/8",sevenEighths:"7/8"};if(i==="linux"){s.questionMarkPrefix="?"}const c=i==="win32"?o:s;const fn=e=>{if(c===s){return e}Object.keys(s).forEach((t=>{if(s[t]===c[t]){return}e=e.replace(new RegExp(n(s[t]),"g"),c[t])}));return e};e.exports=Object.assign(fn,c)},834:(e,t,r)=>{"use strict";const n=r(17);const i=r(69);e.exports=(e,t)=>{t=t||{};const r=n.resolve(t.cwd||"");const s=n.parse(r).root;const o=[].concat(e);return new Promise((e=>{(function find(t){i(o,{cwd:t}).then((r=>{if(r){e(n.join(t,r))}else if(t===s){e(null)}else{find(n.dirname(t))}}))})(r)}))};e.exports.sync=(e,t)=>{t=t||{};let r=n.resolve(t.cwd||"");const s=n.parse(r).root;const o=[].concat(e);while(true){const e=i.sync(o,{cwd:r});if(e){return n.join(r,e)}else if(r===s){return null}r=n.dirname(r)}}},132:e=>{"use strict";e.exports=clone;var t=Object.getPrototypeOf||function(e){return e.__proto__};function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var r={__proto__:t(e)};else var r=Object.create(null);Object.getOwnPropertyNames(e).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}));return r}},127:(e,t,r)=>{var n=r(147);var i=r(738);var s=r(876);var o=r(132);var c=r(837);var a;var l;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){a=Symbol.for("graceful-fs.queue");l=Symbol.for("graceful-fs.previous")}else{a="___graceful-fs.queue";l="___graceful-fs.previous"}function noop(){}function publishQueue(e,t){Object.defineProperty(e,a,{get:function(){return t}})}var f=noop;if(c.debuglog)f=c.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))f=function(){var e=c.format.apply(c,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!n[a]){var u=global[a]||[];publishQueue(n,u);n.close=function(e){function close(t,r){return e.call(n,t,(function(e){if(!e){resetQueue()}if(typeof r==="function")r.apply(this,arguments)}))}Object.defineProperty(close,l,{value:e});return close}(n.close);n.closeSync=function(e){function closeSync(t){e.apply(n,arguments);resetQueue()}Object.defineProperty(closeSync,l,{value:e});return closeSync}(n.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",(function(){f(n[a]);r(491).equal(n[a].length,0)}))}}if(!global[a]){publishQueue(global,n[a])}e.exports=patch(o(n));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched){e.exports=patch(n);n.__patched=true}function patch(e){i(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,r,n){if(typeof r==="function")n=r,r=null;return go$readFile(e,r,n);function go$readFile(e,r,n,i){return t(e,r,(function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,r,n],t,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}}))}}var r=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,n,i){if(typeof n==="function")i=n,n=null;return go$writeFile(e,t,n,i);function go$writeFile(e,t,n,i,s){return r(e,t,n,(function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$writeFile,[e,t,n,i],r,s||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}}))}}var n=e.appendFile;if(n)e.appendFile=appendFile;function appendFile(e,t,r,i){if(typeof r==="function")i=r,r=null;return go$appendFile(e,t,r,i);function go$appendFile(e,t,r,i,s){return n(e,t,r,(function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$appendFile,[e,t,r,i],n,s||Date.now(),Date.now()]);else{if(typeof i==="function")i.apply(this,arguments)}}))}}var o=e.copyFile;if(o)e.copyFile=copyFile;function copyFile(e,t,r,n){if(typeof r==="function"){n=r;r=0}return go$copyFile(e,t,r,n);function go$copyFile(e,t,r,n,i){return o(e,t,r,(function(s){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))enqueue([go$copyFile,[e,t,r,n],s,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}}))}}var c=e.readdir;e.readdir=readdir;var a=/^v[0-5]\./;function readdir(e,t,r){if(typeof t==="function")r=t,t=null;var n=a.test(process.version)?function go$readdir(e,t,r,n){return c(e,fs$readdirCallback(e,t,r,n))}:function go$readdir(e,t,r,n){return c(e,t,fs$readdirCallback(e,t,r,n))};return n(e,t,r);function fs$readdirCallback(e,t,r,i){return function(s,o){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))enqueue([n,[e,t,r],s,i||Date.now(),Date.now()]);else{if(o&&o.sort)o.sort();if(typeof r==="function")r.call(this,s,o)}}}}if(process.version.substr(0,4)==="v0.8"){var l=s(e);ReadStream=l.ReadStream;WriteStream=l.WriteStream}var f=e.ReadStream;if(f){ReadStream.prototype=Object.create(f.prototype);ReadStream.prototype.open=ReadStream$open}var u=e.WriteStream;if(u){WriteStream.prototype=Object.create(u.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var h=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return h},set:function(e){h=e},enumerable:true,configurable:true});var p=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return p},set:function(e){p=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return f.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r);e.read()}}))}function WriteStream(e,t){if(this instanceof WriteStream)return u.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r)}}))}function createReadStream(t,r){return new e.ReadStream(t,r)}function createWriteStream(t,r){return new e.WriteStream(t,r)}var d=e.open;e.open=open;function open(e,t,r,n){if(typeof r==="function")n=r,r=null;return go$open(e,t,r,n);function go$open(e,t,r,n,i){return d(e,t,r,(function(s,o){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))enqueue([go$open,[e,t,r,n],s,i||Date.now(),Date.now()]);else{if(typeof n==="function")n.apply(this,arguments)}}))}}return e}function enqueue(e){f("ENQUEUE",e[0].name,e[1]);n[a].push(e);retry()}var h;function resetQueue(){var e=Date.now();for(var t=0;t<n[a].length;++t){if(n[a][t].length>2){n[a][t][3]=e;n[a][t][4]=e}}retry()}function retry(){clearTimeout(h);h=undefined;if(n[a].length===0)return;var e=n[a].shift();var t=e[0];var r=e[1];var i=e[2];var s=e[3];var o=e[4];if(s===undefined){f("RETRY",t.name,r);t.apply(null,r)}else if(Date.now()-s>=6e4){f("TIMEOUT",t.name,r);var c=r.pop();if(typeof c==="function")c.call(null,i)}else{var l=Date.now()-o;var u=Math.max(o-s,1);var p=Math.min(u*1.2,100);if(l>=p){f("RETRY",t.name,r);t.apply(null,r.concat([s]))}else{n[a].push(e)}}if(h===undefined){h=setTimeout(retry,0)}}},876:(e,t,r)=>{var n=r(781).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,r){if(!(this instanceof ReadStream))return new ReadStream(t,r);n.call(this);var i=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var s=Object.keys(r);for(var o=0,c=s.length;o<c;o++){var a=s[o];this[a]=r[a]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.end===undefined){this.end=Infinity}else if("number"!==typeof this.end){throw TypeError("end must be a Number")}if(this.start>this.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick((function(){i._read()}));return}e.open(this.path,this.flags,this.mode,(function(e,t){if(e){i.emit("error",e);i.readable=false;return}i.fd=t;i.emit("open",t);i._read()}))}function WriteStream(t,r){if(!(this instanceof WriteStream))return new WriteStream(t,r);n.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var i=Object.keys(r);for(var s=0,o=i.length;s<o;s++){var c=i[s];this[c]=r[c]}if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.start<0){throw new Error("start must be >= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},738:(e,t,r)=>{var n=r(57);var i=process.cwd;var s=null;var o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!s)s=i.call(process);return s};try{process.cwd()}catch(e){}if(typeof process.chdir==="function"){var c=process.chdir;process.chdir=function(e){s=null;c.call(process,e)};if(Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,c)}e.exports=patch;function patch(e){if(n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(e.chmod&&!e.lchmod){e.lchmod=function(e,t,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(e.chown&&!e.lchown){e.lchown=function(e,t,r,n){if(n)process.nextTick(n)};e.lchownSync=function(){}}if(o==="win32"){e.rename=typeof e.rename!=="function"?e.rename:function(t){function rename(r,n,i){var s=Date.now();var o=0;t(r,n,(function CB(c){if(c&&(c.code==="EACCES"||c.code==="EPERM")&&Date.now()-s<6e4){setTimeout((function(){e.stat(n,(function(e,s){if(e&&e.code==="ENOENT")t(r,n,CB);else i(c)}))}),o);if(o<100)o+=10;return}if(i)i(c)}))}if(Object.setPrototypeOf)Object.setPrototypeOf(rename,t);return rename}(e.rename)}e.read=typeof e.read!=="function"?e.read:function(t){function read(r,n,i,s,o,c){var a;if(c&&typeof c==="function"){var l=0;a=function(f,u,h){if(f&&f.code==="EAGAIN"&&l<10){l++;return t.call(e,r,n,i,s,o,a)}c.apply(this,arguments)}}return t.call(e,r,n,i,s,o,a)}if(Object.setPrototypeOf)Object.setPrototypeOf(read,t);return read}(e.read);e.readSync=typeof e.readSync!=="function"?e.readSync:function(t){return function(r,n,i,s,o){var c=0;while(true){try{return t.call(e,r,n,i,s,o)}catch(e){if(e.code==="EAGAIN"&&c<10){c++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){if(t){if(i)i(t);return}e.fchmod(n,r,(function(t){e.close(n,(function(e){if(i)i(t||e)}))}))}))};e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r);var s=true;var o;try{o=e.fchmodSync(i,r);s=false}finally{if(s){try{e.closeSync(i)}catch(e){}}else{e.closeSync(i)}}return o}}function patchLutimes(e){if(n.hasOwnProperty("O_SYMLINK")&&e.futimes){e.lutimes=function(t,r,i,s){e.open(t,n.O_SYMLINK,(function(t,n){if(t){if(s)s(t);return}e.futimes(n,r,i,(function(t){e.close(n,(function(e){if(s)s(t||e)}))}))}))};e.lutimesSync=function(t,r,i){var s=e.openSync(t,n.O_SYMLINK);var o;var c=true;try{o=e.futimesSync(s,r,i);c=false}finally{if(c){try{e.closeSync(s)}catch(e){}}else{e.closeSync(s)}}return o}}else if(e.futimes){e.lutimes=function(e,t,r,n){if(n)process.nextTick(n)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(r,n,i){return t.call(e,r,n,(function(e){if(chownErOk(e))e=null;if(i)i.apply(this,arguments)}))}}function chmodFixSync(t){if(!t)return t;return function(r,n){try{return t.call(e,r,n)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(r,n,i,s){return t.call(e,r,n,i,(function(e){if(chownErOk(e))e=null;if(s)s.apply(this,arguments)}))}}function chownFixSync(t){if(!t)return t;return function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(r,n,i){if(typeof n==="function"){i=n;n=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(i)i.apply(this,arguments)}return n?t.call(e,r,n,callback):t.call(e,r,callback)}}function statFixSync(t){if(!t)return t;return function(r,n){var i=n?t.call(e,r,n):t.call(e,r);if(i){if(i.uid<0)i.uid+=4294967296;if(i.gid<0)i.gid+=4294967296}return i}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},589:e=>{"use strict";e.exports=function isArrayish(e){if(!e){return false}return e instanceof Array||Array.isArray(e)||e.length>=0&&e.splice instanceof Function}},9:e=>{"use strict";e.exports=parseJson;function parseJson(e,t,r){r=r||20;try{return JSON.parse(e,t)}catch(t){if(typeof e!=="string"){const t=Array.isArray(e)&&e.length===0;const r="Cannot parse "+(t?"an empty array":String(e));throw new TypeError(r)}const n=t.message.match(/^Unexpected token.*position\s+(\d+)/i);const i=n?+n[1]:t.message.match(/^Unexpected end of JSON.*/i)?e.length-1:null;if(i!=null){const n=i<=r?0:i-r;const s=i+r>=e.length?e.length:i+r;t.message+=` while parsing near '${n===0?"":"..."}${e.slice(n,s)}${s===e.length?"":"..."}'`}else{t.message+=` while parsing '${e.slice(0,r*2)}'`}throw t}}},324:(e,t,r)=>{"use strict";const n=r(17);const i=r(127);const s=r(308);const o=r(264);const c=r(119);const parse=(e,t)=>o(s(e),n.relative(".",t));e.exports=e=>c(i.readFile)(e,"utf8").then((t=>parse(t,e)));e.exports.sync=e=>parse(i.readFileSync(e,"utf8"),e)},69:(e,t,r)=>{"use strict";const n=r(17);const i=r(383);const s=r(367);e.exports=(e,t)=>{t=Object.assign({cwd:process.cwd()},t);return s(e,(e=>i(n.resolve(t.cwd,e))),t)};e.exports.sync=(e,t)=>{t=Object.assign({cwd:process.cwd()},t);for(const r of e){if(i.sync(n.resolve(t.cwd,r))){return r}}}},273:(e,t,r)=>{"use strict";const n=r(965);e.exports=e=>{if(e<1){throw new TypeError("Expected `concurrency` to be a number from 1 and up")}const t=[];let r=0;const next=()=>{r--;if(t.length>0){t.shift()()}};return i=>new Promise(((s,o)=>{const run=()=>{r++;n(i).then((e=>{s(e);next()}),(e=>{o(e);next()}))};if(r<e){run()}else{t.push(run)}}))}},367:(e,t,r)=>{"use strict";const n=r(273);class EndError extends Error{constructor(e){super();this.value=e}}const finder=e=>Promise.all(e).then((e=>e[1]===true&&Promise.reject(new EndError(e[0]))));e.exports=(e,t,r)=>{r=Object.assign({concurrency:Infinity,preserveOrder:true},r);const i=n(r.concurrency);const s=Array.from(e).map((e=>[e,i((()=>Promise.resolve(e).then(t)))]));const o=n(r.preserveOrder?1:Infinity);return Promise.all(s.map((e=>o((()=>finder(e)))))).then((()=>{})).catch((e=>e instanceof EndError?e.value:Promise.reject(e)))}},965:e=>{"use strict";e.exports=e=>new Promise((t=>{t(e())}))},264:(e,t,r)=>{"use strict";const n=r(305);const i=r(9);const s=n("JSONError",{fileName:n.append("in %s")});e.exports=(e,t,r)=>{if(typeof t==="string"){r=t;t=null}try{try{return JSON.parse(e,t)}catch(r){i(e,t);throw r}}catch(e){e.message=e.message.replace(/\n/g,"");const t=new s(e);if(r){t.fileName=r}throw t}}},383:(e,t,r)=>{"use strict";const n=r(147);e.exports=e=>new Promise((t=>{n.access(e,(e=>{t(!e)}))}));e.exports.sync=e=>{try{n.accessSync(e);return true}catch(e){return false}}},119:e=>{"use strict";const processFn=(e,t)=>function(){const r=t.promiseModule;const n=new Array(arguments.length);for(let e=0;e<arguments.length;e++){n[e]=arguments[e]}return new r(((r,i)=>{if(t.errorFirst){n.push((function(e,n){if(t.multiArgs){const t=new Array(arguments.length-1);for(let e=1;e<arguments.length;e++){t[e-1]=arguments[e]}if(e){t.unshift(e);i(t)}else{r(t)}}else if(e){i(e)}else{r(n)}}))}else{n.push((function(e){if(t.multiArgs){const e=new Array(arguments.length-1);for(let t=0;t<arguments.length;t++){e[t]=arguments[t]}r(e)}else{r(e)}}))}e.apply(this,n)}))};e.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:true,promiseModule:Promise},t);const filter=e=>{const match=t=>typeof t==="string"?e===t:t.test(e);return t.include?t.include.some(match):!t.exclude.some(match)};let r;if(typeof e==="function"){r=function(){if(t.excludeMain){return e.apply(this,arguments)}return processFn(e,t).apply(this,arguments)}}else{r=Object.create(Object.getPrototypeOf(e))}for(const n in e){const i=e[n];r[n]=typeof i==="function"&&filter(n)?processFn(i,t):i}return r}},817:(e,t,r)=>{"use strict";const n=r(17);const i=r(834);const s=r(324);const o=new WeakMap;const filepath=e=>o.get(e);const findNextCwd=e=>n.resolve(n.dirname(e),"..");const addFp=(e,t)=>{o.set(e,t);return e};const pkgConf=(e,t)=>{if(!e){return Promise.reject(new TypeError("Expected a namespace"))}t=t||{};return i("package.json",t.cwd?{cwd:t.cwd}:{}).then((r=>{if(!r){return addFp(Object.assign({},t.defaults),r)}return s(r).then((n=>{if(t.skipOnFalse&&n[e]===false){const n=Object.assign({},t,{cwd:findNextCwd(r)});return pkgConf(e,n)}return addFp(Object.assign({},t.defaults,n[e]),r)}))}))};const sync=(e,t)=>{if(!e){throw new TypeError("Expected a namespace")}t=t||{};const r=i.sync("package.json",t.cwd?{cwd:t.cwd}:{});if(!r){return addFp(Object.assign({},t.defaults),r)}const n=s.sync(r);if(t.skipOnFalse&&n[e]===false){const n=Object.assign({},t,{cwd:findNextCwd(r)});return sync(e,n)}return addFp(Object.assign({},t.defaults,n[e]),r)};e.exports=pkgConf;e.exports.filepath=filepath;e.exports.sync=sync},567:(e,t,r)=>{"use strict";const n=r(852);e.exports=Object.assign(new n,{Signale:n})},852:(e,t,r)=>{"use strict";const n=r(837);const i=r(17);const s=r(521);const o=r(234);const c=r(877);const a=r(817);const l=r(684);const f=r(616);const{green:u,grey:h,red:p,underline:d,yellow:g}=o;let m=false;const y=l.options.default;const b=l.name;class Signale{constructor(e={}){this._interactive=e.interactive||false;this._config=Object.assign(this.packageConfiguration,e.config);this._customTypes=Object.assign({},e.types);this._disabled=e.disabled||false;this._scopeName=e.scope||"";this._timers=e.timers||new Map;this._types=this._mergeTypes(f,this._customTypes);this._stream=e.stream||process.stdout;this._longestLabel=this._getLongestLabel();this._secrets=e.secrets||[];this._generalLogLevel=this._validateLogLevel(e.logLevel);Object.keys(this._types).forEach((e=>{this[e]=this._logger.bind(this,e)}))}get _now(){return Date.now()}get scopeName(){return this._scopeName}get currentOptions(){return Object.assign({},{config:this._config,disabled:this._disabled,types:this._customTypes,interactive:this._interactive,timers:this._timers,stream:this._stream,secrets:this._secrets,logLevel:this._generalLogLevel})}get date(){return(new Date).toLocaleDateString()}get timestamp(){return(new Date).toLocaleTimeString()}get filename(){const e=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const{stack:t}=new Error;Error.prepareStackTrace=e;const r=t.map((e=>e.getFileName()));const n=r.find((e=>e!==r[0]));return n?i.basename(n):"anonymous"}get packageConfiguration(){return a.sync(b,{defaults:y})}get _longestUnderlinedLabel(){return d(this._longestLabel)}get _logLevels(){return{info:0,timer:1,debug:2,warn:3,error:4}}set configuration(e){this._config=Object.assign(this.packageConfiguration,e)}_arrayify(e){return Array.isArray(e)?e:[e]}_timeSpan(e){return this._now-e}_getLongestLabel(){const{_types:e}=this;const t=Object.keys(e).map((t=>e[t].label));return t.reduce(((e,t)=>e.length>t.length?e:t))}_validateLogLevel(e){return Object.keys(this._logLevels).includes(e)?e:"info"}_mergeTypes(e,t){const r=Object.assign({},e);Object.keys(t).forEach((e=>{r[e]=Object.assign({},r[e],t[e])}));return r}_filterSecrets(e){const{_secrets:t}=this;if(t.length===0){return e}let r=e;t.forEach((e=>{r=r.replace(new RegExp(e,"g"),"[secure]")}));return r}_formatStream(e){return this._arrayify(e)}_formatDate(){return`[${this.date}]`}_formatFilename(){return`[${this.filename}]`}_formatScopeName(){if(Array.isArray(this._scopeName)){const e=this._scopeName.filter((e=>e.length!==0));return`${e.map((e=>`[${e.trim()}]`)).join(" ")}`}return`[${this._scopeName}]`}_formatTimestamp(){return`[${this.timestamp}]`}_formatMessage(e){return n.format(...this._arrayify(e))}_meta(){const e=[];if(this._config.displayDate){e.push(this._formatDate())}if(this._config.displayTimestamp){e.push(this._formatTimestamp())}if(this._config.displayFilename){e.push(this._formatFilename())}if(this._scopeName.length!==0&&this._config.displayScope){e.push(this._formatScopeName())}if(e.length!==0){e.push(`${c.pointerSmall}`);return e.map((e=>h(e)))}return e}_hasAdditional({suffix:e,prefix:t},r){return e||t?"":this._formatMessage(r)}_buildSignale(e,...t){let[r,n]=[{},{}];if(t.length===1&&typeof t[0]==="object"&&t[0]!==null){if(t[0]instanceof Error){[r]=t}else{const[{prefix:e,message:i,suffix:s}]=t;n=Object.assign({},{suffix:s,prefix:e});r=i?this._formatMessage(i):this._hasAdditional(n,t)}}else{r=this._formatMessage(t)}const i=this._meta();if(n.prefix){if(this._config.underlinePrefix){i.push(d(n.prefix))}else{i.push(n.prefix)}}if(this._config.displayBadge&&e.badge){i.push(o[e.color](this._padEnd(e.badge,e.badge.length+1)))}if(this._config.displayLabel&&e.label){const t=this._config.uppercaseLabel?e.label.toUpperCase():e.label;if(this._config.underlineLabel){i.push(o[e.color](this._padEnd(d(t),this._longestUnderlinedLabel.length+1)))}else{i.push(o[e.color](this._padEnd(t,this._longestLabel.length+1)))}}if(r instanceof Error&&r.stack){const[e,...t]=r.stack.split("\n");if(this._config.underlineMessage){i.push(d(e))}else{i.push(e)}i.push(h(t.map((e=>e.replace(/^/,"\n"))).join("")));return i.join(" ")}if(this._config.underlineMessage){i.push(d(r))}else{i.push(r)}if(n.suffix){if(this._config.underlineSuffix){i.push(d(n.suffix))}else{i.push(n.suffix)}}return i.join(" ")}_write(e,t){if(this._interactive&&e.isTTY&&m){s.moveCursor(e,0,-1);s.clearLine(e);s.cursorTo(e,0)}e.write(t+"\n");m=this._interactive}_log(e,t=this._stream,r){if(this.isEnabled()&&this._logLevels[r]>=this._logLevels[this._generalLogLevel]){this._formatStream(t).forEach((t=>{this._write(t,e)}))}}_logger(e,...t){const{stream:r,logLevel:n}=this._types[e];const i=this._buildSignale(this._types[e],...t);this._log(this._filterSecrets(i),r,this._validateLogLevel(n))}_padEnd(e,t){e=String(e);t=parseInt(t,10)||0;if(e.length>=t){return e}if(String.prototype.padEnd){return e.padEnd(t)}t-=e.length;return e+" ".repeat(t)}addSecrets(e){if(!Array.isArray(e)){throw new TypeError("Argument must be an array.")}this._secrets.push(...e)}clearSecrets(){this._secrets=[]}config(e){this.configuration=e}disable(){this._disabled=true}enable(){this._disabled=false}isEnabled(){return!this._disabled}scope(...e){if(e.length===0){throw new Error("No scope name was defined.")}return new Signale(Object.assign(this.currentOptions,{scope:e}))}unscope(){this._scopeName=""}time(e){if(!e){e=`timer_${this._timers.size}`}this._timers.set(e,this._now);const t=this._meta();t.push(u(this._padEnd(this._types.start.badge,2)));if(this._config.underlineLabel){t.push(u(this._padEnd(d(e),this._longestUnderlinedLabel.length+1)))}else{t.push(u(this._padEnd(e,this._longestLabel.length+1)))}t.push("Initialized timer...");this._log(t.join(" "),this._stream,"timer");return e}timeEnd(e){if(!e&&this._timers.size){const is=e=>e.includes("timer_");e=[...this._timers.keys()].reduceRight(((e,t)=>is(e)?e:is(t)?t:null))}if(this._timers.has(e)){const t=this._timeSpan(this._timers.get(e));this._timers.delete(e);const r=this._meta();r.push(p(this._padEnd(this._types.pause.badge,2)));if(this._config.underlineLabel){r.push(p(this._padEnd(d(e),this._longestUnderlinedLabel.length+1)))}else{r.push(p(this._padEnd(e,this._longestLabel.length+1)))}r.push("Timer run for:");r.push(g(t<1e3?t+"ms":(t/1e3).toFixed(2)+"s"));this._log(r.join(" "),this._stream,"timer");return{label:e,span:t}}}}e.exports=Signale},616:(e,t,r)=>{"use strict";const n=r(877);e.exports={error:{badge:n.cross,color:"red",label:"error",logLevel:"error"},fatal:{badge:n.cross,color:"red",label:"fatal",logLevel:"error"},fav:{badge:n("❤"),color:"magenta",label:"favorite",logLevel:"info"},info:{badge:n.info,color:"blue",label:"info",logLevel:"info"},star:{badge:n.star,color:"yellow",label:"star",logLevel:"info"},success:{badge:n.tick,color:"green",label:"success",logLevel:"info"},wait:{badge:n.ellipsis,color:"blue",label:"waiting",logLevel:"info"},warn:{badge:n.warning,color:"yellow",label:"warning",logLevel:"warn"},complete:{badge:n.checkboxOn,color:"cyan",label:"complete",logLevel:"info"},pending:{badge:n.checkboxOff,color:"magenta",label:"pending",logLevel:"info"},note:{badge:n.bullet,color:"blue",label:"note",logLevel:"info"},start:{badge:n.play,color:"green",label:"start",logLevel:"info"},pause:{badge:n.squareSmallFilled,color:"yellow",label:"pause",logLevel:"info"},debug:{badge:n("⬤"),color:"red",label:"debug",logLevel:"debug"},await:{badge:n.ellipsis,color:"blue",label:"awaiting",logLevel:"info"},watch:{badge:n.ellipsis,color:"yellow",label:"watching",logLevel:"info"},log:{badge:"",color:"",label:"",logLevel:"info"}}},308:e=>{"use strict";e.exports=e=>{if(typeof e!=="string"){throw new TypeError("Expected a string, got "+typeof e)}if(e.charCodeAt(0)===65279){return e.slice(1)}return e}},234:e=>{"use strict";e.exports=require("../chalk")},684:e=>{"use strict";e.exports=require("./package.json")},491:e=>{"use strict";e.exports=require("assert")},57:e=>{"use strict";e.exports=require("constants")},147:e=>{"use strict";e.exports=require("fs")},17:e=>{"use strict";e.exports=require("path")},521:e=>{"use strict";e.exports=require("readline")},781:e=>{"use strict";e.exports=require("stream")},837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var s=true;try{e[r](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(567);module.exports=r})();
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"signale","author":{"name":"Klaus Sinani","email":"klaussinani@gmail.com","url":"https://klaussinani.github.io"},"version":"1.4.0","license":"MIT","options":{"default":{"displayScope":true,"displayBadge":true,"displayDate":false,"displayFilename":false,"displayLabel":true,"displayTimestamp":false,"underlineLabel":true,"underlineMessage":false,"underlinePrefix":false,"underlineSuffix":false,"uppercaseLabel":false}}}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
|
3
|
+
|
4
|
+
@example
|
5
|
+
```
|
6
|
+
import stripAnsi = require('./strip-ansi');
|
7
|
+
|
8
|
+
stripAnsi('\u001B[4mUnicorn\u001B[0m');
|
9
|
+
//=> 'Unicorn'
|
10
|
+
|
11
|
+
stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
|
12
|
+
//=> 'Click'
|
13
|
+
```
|
14
|
+
*/
|
15
|
+
declare function stripAnsi(string: string): string;
|
16
|
+
|
17
|
+
export = stripAnsi;
|
@@ -0,0 +1 @@
|
|
1
|
+
(()=>{"use strict";var e={275:e=>{e.exports=({onlyFirst:e=false}={})=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,e?undefined:"g")}},647:(e,r,_)=>{const t=_(275);e.exports=e=>typeof e==="string"?e.replace(t(),""):e}};var r={};function __nccwpck_require__(_){var t=r[_];if(t!==undefined){return t.exports}var a=r[_]={exports:{}};var n=true;try{e[_](a,a.exports,__nccwpck_require__);n=false}finally{if(n)delete r[_]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var _=__nccwpck_require__(647);module.exports=_})();
|
@@ -0,0 +1,9 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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 @@
|
|
1
|
+
{"name":"strip-ansi","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"version":"6.0.1","license":"MIT"}
|
@@ -0,0 +1 @@
|
|
1
|
+
(()=>{var e={472:(e,t,r)=>{var n="2.0.1";var i,u,a,f,l,s,o,c,h,p,_,x=[].slice,d=[].indexOf||function(e){for(var t=0,r=this.length;t<r;t++){if(t in this&&this[t]===e)return t}return-1},m={}.hasOwnProperty;o=r(17);a=function(e){return typeof e==="function"};f=function(e){return typeof e==="string"||!!e&&typeof e==="object"&&Object.prototype.toString.call(e)==="[object String]"};_=t;_.VERSION=typeof n!=="undefined"&&n!==null?n:"NO-VERSION";p=function(e){e=e.replace(/\\/g,"/");e=e.replace(/(?<!^)\/+/g,"/");return e};for(c in o){h=o[c];if(a(h)){_[c]=function(e){return function(){var t,r;t=1<=arguments.length?x.call(arguments,0):[];t=t.map((function(e){if(f(e)){return p(e)}else{return e}}));r=o[e].apply(o,t);if(f(r)){return p(r)}else{return r}}}(c)}else{_[c]=h}}_.sep="/";u={toUnix:p,normalizeSafe:function(e){var t;e=p(e);t=_.normalize(e);if(e.startsWith("./")&&!t.startsWith("./")&&!t.startsWith("..")){t="./"+t}else if(e.startsWith("//")&&!t.startsWith("//")){if(e.startsWith("//./")){t="//."+t}else{t="/"+t}}return t},normalizeTrim:function(e){e=_.normalizeSafe(e);if(e.endsWith("/")){return e.slice(0,+(e.length-2)+1||9e9)}else{return e}},joinSafe:function(){var e,t,r;e=1<=arguments.length?x.call(arguments,0):[];r=_.join.apply(null,e);if(e.length>0){t=p(e[0]);if(t.startsWith("./")&&!r.startsWith("./")&&!r.startsWith("..")){r="./"+r}else if(t.startsWith("//")&&!r.startsWith("//")){if(t.startsWith("//./")){r="//."+r}else{r="/"+r}}}return r},addExt:function(e,t){if(!t){return e}else{if(t[0]!=="."){t="."+t}return e+(e.endsWith(t)?"":t)}},trimExt:function(e,t,r){var n;if(r==null){r=7}n=_.extname(e);if(l(n,t,r)){return e.slice(0,+(e.length-n.length-1)+1||9e9)}else{return e}},removeExt:function(e,t){if(!t){return e}else{t=t[0]==="."?t:"."+t;if(_.extname(e)===t){return _.trimExt(e,[],t.length)}else{return e}}},changeExt:function(e,t,r,n){if(n==null){n=7}return _.trimExt(e,r,n)+(!t?"":t[0]==="."?t:"."+t)},defaultExt:function(e,t,r,n){var i;if(n==null){n=7}i=_.extname(e);if(l(i,r,n)){return e}else{return _.addExt(e,t)}}};l=function(e,t,r){if(t==null){t=[]}return e&&e.length<=r&&d.call(t.map((function(e){return(e&&e[0]!=="."?".":"")+e})),e)<0};for(s in u){if(!m.call(u,s))continue;i=u[s];if(_[s]!==void 0){throw new Error("path."+s+" already exists.")}else{_[s]=i}}},17:e=>{"use strict";e.exports=require("path")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var u=true;try{e[r](i,i.exports,__nccwpck_require__);u=false}finally{if(u)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(472);module.exports=r})();
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright(c) 2014-2020 Angelos Pikoulas (agelos.pikoulas@gmail.com)
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
4
|
+
obtaining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without
|
6
|
+
restriction, including without limitation the rights to use,
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the
|
9
|
+
Software is furnished to do so, subject to the following
|
10
|
+
conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"upath","author":{"name":"Angelos Pikoulas","email":"agelos.pikoulas@gmail.com"},"version":"2.0.1","license":"MIT","types":"./upath.d.ts"}
|
@@ -0,0 +1,241 @@
|
|
1
|
+
declare namespace upath {
|
2
|
+
|
3
|
+
/**
|
4
|
+
* A parsed path object generated by path.parse() or consumed by path.format().
|
5
|
+
*/
|
6
|
+
export interface ParsedPath {
|
7
|
+
/**
|
8
|
+
* The root of the path such as '/' or 'c:\'
|
9
|
+
*/
|
10
|
+
root: string;
|
11
|
+
/**
|
12
|
+
* The full directory path such as '/home/user/dir' or 'c:\path\dir'
|
13
|
+
*/
|
14
|
+
dir: string;
|
15
|
+
/**
|
16
|
+
* The file name including extension (if any) such as 'index.html'
|
17
|
+
*/
|
18
|
+
base: string;
|
19
|
+
/**
|
20
|
+
* The file extension (if any) such as '.html'
|
21
|
+
*/
|
22
|
+
ext: string;
|
23
|
+
/**
|
24
|
+
* The file name without extension (if any) such as 'index'
|
25
|
+
*/
|
26
|
+
name: string;
|
27
|
+
}
|
28
|
+
|
29
|
+
/**
|
30
|
+
* Version of the library
|
31
|
+
*/
|
32
|
+
export var VERSION: string;
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Just converts all `to/` and consolidates duplicates, without performing any normalization.
|
36
|
+
*
|
37
|
+
* @param p string path to convert to unix.
|
38
|
+
*/
|
39
|
+
export function toUnix(p: string): string;
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Exactly like path.normalize(path), but it keeps the first meaningful ./.
|
43
|
+
*
|
44
|
+
* Note that the unix / is returned everywhere, so windows \ is always converted to unix /.
|
45
|
+
*
|
46
|
+
* @param p string path to normalize.
|
47
|
+
*/
|
48
|
+
export function normalizeSafe(p: string): string;
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Exactly like path.normalizeSafe(path), but it trims any useless ending /.
|
52
|
+
*
|
53
|
+
* @param p string path to normalize
|
54
|
+
*/
|
55
|
+
export function normalizeTrim(p: string): string;
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Exactly like path.join(), but it keeps the first meaningful ./.
|
59
|
+
*
|
60
|
+
* Note that the unix / is returned everywhere, so windows \ is always converted to unix /.
|
61
|
+
*
|
62
|
+
* @param paths string paths to join
|
63
|
+
*/
|
64
|
+
export function joinSafe(...p: any[]): string;
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Adds .ext to filename, but only if it doesn't already have the exact extension.
|
68
|
+
*
|
69
|
+
* @param file string filename to add extension to
|
70
|
+
* @param ext string extension to add
|
71
|
+
*/
|
72
|
+
export function addExt(file: string, ext: string): string;
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Trims a filename's extension.
|
76
|
+
*
|
77
|
+
* Extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7).
|
78
|
+
*
|
79
|
+
* An Array of ignoreExts (eg ['.min']) prevents these from being considered as extension, thus are not trimmed.
|
80
|
+
*
|
81
|
+
* @param filename string filename to trim it's extension
|
82
|
+
* @param ignoreExts array extensions to ignore
|
83
|
+
* @param maxSize number max length of the extension
|
84
|
+
*/
|
85
|
+
export function trimExt(filename: string, ignoreExts?: string[], maxSize?: number): string;
|
86
|
+
|
87
|
+
/**
|
88
|
+
* Removes the specific ext extension from filename, if it has it. Otherwise it leaves it as is. As in all upath functions, it be .ext or ext.
|
89
|
+
*
|
90
|
+
* @param file string filename to remove extension to
|
91
|
+
* @param ext string extension to remove
|
92
|
+
*/
|
93
|
+
export function removeExt(filename: string, ext: string): string;
|
94
|
+
|
95
|
+
/**
|
96
|
+
* Changes a filename's extension to ext. If it has no (valid) extension, it adds it.
|
97
|
+
*
|
98
|
+
* Valid extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7).
|
99
|
+
*
|
100
|
+
* An Array of ignoreExts (eg ['.min']) prevents these from being considered as extension, thus are not changed - the new extension is added instead.
|
101
|
+
*
|
102
|
+
* @param filename string filename to change it's extension
|
103
|
+
* @param ext string extension to change to
|
104
|
+
* @param ignoreExts array extensions to ignore
|
105
|
+
* @param maxSize number max length of the extension
|
106
|
+
*/
|
107
|
+
export function changeExt(filename: string, ext: string, ignoreExts?: string[], maxSize?: number): string;
|
108
|
+
|
109
|
+
/**
|
110
|
+
* Adds .ext to filename, only if it doesn't already have any old extension.
|
111
|
+
*
|
112
|
+
* (Old) extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7).
|
113
|
+
*
|
114
|
+
* An Array of ignoreExts (eg ['.min']) will force adding default .ext even if one of these is present.
|
115
|
+
*
|
116
|
+
* @param filename string filename to default to it's extension
|
117
|
+
* @param ext string extension to default to
|
118
|
+
* @param ignoreExts array extensions to ignore
|
119
|
+
* @param maxSize number max length of the extension
|
120
|
+
*/
|
121
|
+
export function defaultExt(filename: string, ext: string, ignoreExts?: string[], maxSize?: number): string;
|
122
|
+
|
123
|
+
/**
|
124
|
+
* Normalize a string path, reducing '..' and '.' parts.
|
125
|
+
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
|
126
|
+
*
|
127
|
+
* @param p string path to normalize.
|
128
|
+
*/
|
129
|
+
export function normalize(p: string): string;
|
130
|
+
/**
|
131
|
+
* Join all arguments together and normalize the resulting path.
|
132
|
+
* Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
|
133
|
+
*
|
134
|
+
* @param paths string paths to join.
|
135
|
+
*/
|
136
|
+
export function join(...paths: any[]): string;
|
137
|
+
/**
|
138
|
+
* Join all arguments together and normalize the resulting path.
|
139
|
+
* Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
|
140
|
+
*
|
141
|
+
* @param paths string paths to join.
|
142
|
+
*/
|
143
|
+
export function join(...paths: string[]): string;
|
144
|
+
/**
|
145
|
+
* The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
|
146
|
+
*
|
147
|
+
* Starting from leftmost {from} parameter, resolves {to} to an absolute path.
|
148
|
+
*
|
149
|
+
* If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory.
|
150
|
+
*
|
151
|
+
* @param pathSegments string paths to join. Non-string arguments are ignored.
|
152
|
+
*/
|
153
|
+
export function resolve(...pathSegments: any[]): string;
|
154
|
+
/**
|
155
|
+
* Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
|
156
|
+
*
|
157
|
+
* @param path path to test.
|
158
|
+
*/
|
159
|
+
export function isAbsolute(path: string): boolean;
|
160
|
+
/**
|
161
|
+
* Solve the relative path from {from} to {to}.
|
162
|
+
* At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
|
163
|
+
*
|
164
|
+
* @param from
|
165
|
+
* @param to
|
166
|
+
*/
|
167
|
+
export function relative(from: string, to: string): string;
|
168
|
+
/**
|
169
|
+
* Return the directory name of a path. Similar to the Unix dirname command.
|
170
|
+
*
|
171
|
+
* @param p the path to evaluate.
|
172
|
+
*/
|
173
|
+
export function dirname(p: string): string;
|
174
|
+
/**
|
175
|
+
* Return the last portion of a path. Similar to the Unix basename command.
|
176
|
+
* Often used to extract the file name from a fully qualified path.
|
177
|
+
*
|
178
|
+
* @param p the path to evaluate.
|
179
|
+
* @param ext optionally, an extension to remove from the result.
|
180
|
+
*/
|
181
|
+
export function basename(p: string, ext?: string): string;
|
182
|
+
/**
|
183
|
+
* Return the extension of the path, from the last '.' to end of string in the last portion of the path.
|
184
|
+
* If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
|
185
|
+
*
|
186
|
+
* @param p the path to evaluate.
|
187
|
+
*/
|
188
|
+
export function extname(p: string): string;
|
189
|
+
/**
|
190
|
+
* The platform-specific file separator. '\\' or '/'.
|
191
|
+
*/
|
192
|
+
export var sep: string;
|
193
|
+
/**
|
194
|
+
* The platform-specific file delimiter. ';' or ':'.
|
195
|
+
*/
|
196
|
+
export var delimiter: string;
|
197
|
+
/**
|
198
|
+
* Returns an object from a path string - the opposite of format().
|
199
|
+
*
|
200
|
+
* @param pathString path to evaluate.
|
201
|
+
*/
|
202
|
+
export function parse(pathString: string): ParsedPath;
|
203
|
+
/**
|
204
|
+
* Returns a path string from an object - the opposite of parse().
|
205
|
+
*
|
206
|
+
* @param pathString path to evaluate.
|
207
|
+
*/
|
208
|
+
export function format(pathObject: ParsedPath): string;
|
209
|
+
|
210
|
+
export module posix {
|
211
|
+
export function normalize(p: string): string;
|
212
|
+
export function join(...paths: any[]): string;
|
213
|
+
export function resolve(...pathSegments: any[]): string;
|
214
|
+
export function isAbsolute(p: string): boolean;
|
215
|
+
export function relative(from: string, to: string): string;
|
216
|
+
export function dirname(p: string): string;
|
217
|
+
export function basename(p: string, ext?: string): string;
|
218
|
+
export function extname(p: string): string;
|
219
|
+
export var sep: string;
|
220
|
+
export var delimiter: string;
|
221
|
+
export function parse(p: string): ParsedPath;
|
222
|
+
export function format(pP: ParsedPath): string;
|
223
|
+
}
|
224
|
+
|
225
|
+
export module win32 {
|
226
|
+
export function normalize(p: string): string;
|
227
|
+
export function join(...paths: any[]): string;
|
228
|
+
export function resolve(...pathSegments: any[]): string;
|
229
|
+
export function isAbsolute(p: string): boolean;
|
230
|
+
export function relative(from: string, to: string): string;
|
231
|
+
export function dirname(p: string): string;
|
232
|
+
export function basename(p: string, ext?: string): string;
|
233
|
+
export function extname(p: string): string;
|
234
|
+
export var sep: string;
|
235
|
+
export var delimiter: string;
|
236
|
+
export function parse(p: string): ParsedPath;
|
237
|
+
export function format(pP: ParsedPath): string;
|
238
|
+
}
|
239
|
+
}
|
240
|
+
|
241
|
+
export = upath;
|
@@ -6,11 +6,11 @@
|
|
6
6
|
* https://github.com/facebook/create-react-app/blob/master/LICENSE
|
7
7
|
*/
|
8
8
|
declare function printFileSizesAfterBuild(webpackStats: any, previousSizeMap: {
|
9
|
-
|
10
|
-
|
9
|
+
root: string;
|
10
|
+
sizes: Record<string, number[]>;
|
11
11
|
}, buildFolder: string, maxBundleGzipSize: number, maxChunkGzipSize: number): void;
|
12
12
|
declare function measureFileSizesBeforeBuild(buildFolder: string): Promise<{
|
13
|
-
|
14
|
-
|
13
|
+
root: string;
|
14
|
+
sizes: Record<string, number[]>;
|
15
15
|
}>;
|
16
|
-
export { measureFileSizesBeforeBuild, printFileSizesAfterBuild };
|
16
|
+
export { measureFileSizesBeforeBuild, printFileSizesAfterBuild };
|