js-build-tools 3.0.4 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +166 -426
- package/babel.config.js +1 -1
- package/dist/build.js +33 -34
- package/dist/build.min.js +1 -1
- package/dist/bundle.js +14 -9
- package/dist/bundle.min.js +1 -1
- package/dist/bundleLint.js +15 -11
- package/dist/bundleLint.min.js +1 -1
- package/dist/bundleMinify.js +11 -5
- package/dist/bundleMinify.min.js +1 -1
- package/dist/compileReadme.js +7 -10
- package/dist/compileReadme.min.js +1 -1
- package/dist/copyFonts.js +11 -5
- package/dist/copyFonts.min.js +1 -1
- package/dist/default.js +13 -9
- package/dist/default.min.js +1 -1
- package/dist/dist.js +7 -4
- package/dist/dist.min.js +1 -1
- package/dist/distLint.js +15 -11
- package/dist/distLint.min.js +1 -1
- package/dist/distMinify.js +11 -5
- package/dist/distMinify.min.js +1 -1
- package/dist/images.js +7 -4
- package/dist/images.min.js +1 -1
- package/dist/partials/addToReadme.js +16 -11
- package/dist/partials/beginWatcher.js +11 -7
- package/dist/partials/clean.js +11 -5
- package/dist/partials/copyFor.js +7 -7
- package/dist/partials/distFor.js +21 -11
- package/dist/partials/distForSrc.js +9 -3
- package/dist/partials/distSeries.js +17 -13
- package/dist/partials/imagesFor.js +16 -17
- package/dist/partials/minifyFor.js +12 -11
- package/dist/partials/readmeTemplate.js +13 -9
- package/dist/partials/removeDirectory.js +7 -7
- package/dist/partials/runOnChange.js +18 -16
- package/dist/partials/sassFor.js +19 -12
- package/dist/partials/tsFor.js +17 -14
- package/dist/partials.js +101 -39
- package/dist/partials.min.js +1 -1
- package/dist/sass.js +7 -4
- package/dist/sass.min.js +1 -1
- package/dist/test-helpers/setUp.js +50 -47
- package/dist/testFull.js +12 -7
- package/dist/testFull.min.js +1 -1
- package/dist/testHelpers.js +9 -13
- package/dist/testHelpers.min.js +1 -1
- package/dist/testQuick.js +12 -7
- package/dist/testQuick.min.js +1 -1
- package/dist/typeScript.js +6 -4
- package/dist/typeScript.min.js +1 -1
- package/dist/utilities/dotGet.js +14 -12
- package/dist/utilities/dotNotate.js +10 -8
- package/dist/utilities/dotSet.js +13 -11
- package/dist/utilities/isObject.js +5 -1
- package/dist/utilities/strAfter.js +11 -7
- package/dist/utilities/strBefore.js +11 -7
- package/dist/watchFull.js +7 -7
- package/dist/watchFull.min.js +1 -1
- package/dist/watchTest.js +13 -9
- package/dist/watchTest.min.js +1 -1
- package/functions/{build.js → build.mjs} +14 -16
- package/functions/{build.test.js → build.test.mjs} +9 -8
- package/functions/{bundle.js → bundle.mjs} +5 -7
- package/functions/{bundle.test.js → bundle.test.mjs} +5 -4
- package/functions/{bundleLint.js → bundleLint.mjs} +4 -6
- package/functions/{bundleLint.test.js → bundleLint.test.mjs} +5 -4
- package/functions/bundleMinify.mjs +9 -0
- package/functions/bundleMinify.test.mjs +15 -0
- package/functions/compileReadme.mjs +9 -0
- package/functions/{compileReadme.test.js → compileReadme.test.mjs} +4 -4
- package/functions/copyFonts.mjs +9 -0
- package/functions/{copyFonts.test.js → copyFonts.test.mjs} +4 -3
- package/functions/default.mjs +12 -0
- package/functions/{default.test.js → default.test.mjs} +8 -7
- package/functions/{dist.js → dist.mjs} +2 -4
- package/functions/{dist.test.js → dist.test.mjs} +4 -3
- package/functions/{distLint.js → distLint.mjs} +4 -6
- package/functions/{distLint.test.js → distLint.test.mjs} +5 -4
- package/functions/distMinify.mjs +9 -0
- package/functions/distMinify.test.mjs +15 -0
- package/functions/{images.js → images.mjs} +2 -4
- package/functions/{images.test.js → images.test.mjs} +4 -3
- package/functions/partials/{addToReadme.js → addToReadme.mjs} +5 -7
- package/functions/partials/{addToReadme.test.js → addToReadme.test.mjs} +4 -3
- package/functions/partials/beginWatcher.mjs +9 -0
- package/functions/partials/{beginWatcher.test.js → beginWatcher.test.mjs} +4 -3
- package/functions/partials/clean.mjs +13 -0
- package/functions/partials/{clean.test.js → clean.test.mjs} +4 -3
- package/functions/partials/{copyFor.js → copyFor.mjs} +2 -4
- package/functions/partials/{copyFor.test.js → copyFor.test.mjs} +4 -3
- package/functions/partials/distFor.mjs +22 -0
- package/functions/partials/{distFor.test.js → distFor.test.mjs} +49 -8
- package/functions/partials/{distForSrc.js → distForSrc.mjs} +2 -4
- package/functions/partials/{distForSrc.test.js → distForSrc.test.mjs} +3 -2
- package/functions/partials/{distSeries.js → distSeries.mjs} +6 -8
- package/functions/partials/{distSeries.test.js → distSeries.test.mjs} +7 -6
- package/functions/partials/{imagesFor.js → imagesFor.mjs} +5 -13
- package/functions/partials/{imagesFor.test.js → imagesFor.test.mjs} +4 -3
- package/functions/partials/minifyFor.mjs +15 -0
- package/functions/partials/{minifyFor.test.js → minifyFor.test.mjs} +5 -4
- package/functions/partials/readmeTemplate.mjs +12 -0
- package/functions/partials/{readmeTemplate.test.js → readmeTemplate.test.mjs} +4 -3
- package/functions/partials/{removeDirectory.js → removeDirectory.mjs} +2 -4
- package/functions/partials/{removeDirectory.test.js → removeDirectory.test.mjs} +28 -28
- package/functions/partials/{runOnChange.js → runOnChange.mjs} +6 -8
- package/functions/partials/{runOnChange.test.js → runOnChange.test.mjs} +12 -11
- package/functions/partials/sassFor.mjs +22 -0
- package/functions/partials/{sassFor.test.js → sassFor.test.mjs} +5 -4
- package/functions/partials/{tsFor.js → tsFor.mjs} +4 -6
- package/functions/partials/{tsFor.test.js → tsFor.test.mjs} +5 -4
- package/functions/partials.mjs +23 -0
- package/functions/{partials.test.js → partials.test.mjs} +1 -1
- package/functions/sass.mjs +4 -0
- package/functions/{sass.test.js → sass.test.mjs} +4 -3
- package/functions/test-helpers/{setUp.js → setUp.mjs} +25 -27
- package/functions/test-helpers/setUp.test.mjs +19 -0
- package/functions/{testFull.js → testFull.mjs} +4 -6
- package/functions/testFull.test.mjs +17 -0
- package/functions/{testHelpers.js → testHelpers.mjs} +1 -6
- package/functions/testHelpers.test.mjs +7 -0
- package/functions/{testQuick.js → testQuick.mjs} +4 -6
- package/functions/testQuick.test.mjs +17 -0
- package/functions/{typeScript.js → typeScript.mjs} +2 -4
- package/functions/typeScript.test.mjs +11 -0
- package/functions/utilities/{dotGet.js → dotGet.mjs} +4 -6
- package/functions/utilities/{dotNotate.js → dotNotate.mjs} +2 -4
- package/functions/utilities/{dotSet.js → dotSet.mjs} +4 -6
- package/functions/utilities/{isObject.js → isObject.mjs} +1 -3
- package/functions/utilities/{strAfter.js → strAfter.mjs} +11 -13
- package/functions/utilities/{strBefore.js → strBefore.mjs} +11 -13
- package/functions/{watchFull.js → watchFull.mjs} +2 -4
- package/functions/{watchFull.test.js → watchFull.test.mjs} +8 -7
- package/functions/watchTest.mjs +10 -0
- package/functions/{watchTest.test.js → watchTest.test.mjs} +7 -6
- package/gulp.config.js +20 -19
- package/gulp.config.mjs +252 -0
- package/gulpfile.base.js +20 -20
- package/gulpfile.base.mjs +27 -0
- package/package.json +27 -13
- package/functions/bundleMinify.js +0 -11
- package/functions/bundleMinify.test.js +0 -14
- package/functions/compileReadme.js +0 -11
- package/functions/copyFonts.js +0 -11
- package/functions/default.js +0 -14
- package/functions/distMinify.js +0 -11
- package/functions/distMinify.test.js +0 -14
- package/functions/partials/beginWatcher.js +0 -11
- package/functions/partials/clean.js +0 -15
- package/functions/partials/distFor.js +0 -17
- package/functions/partials/minifyFor.js +0 -15
- package/functions/partials/readmeTemplate.js +0 -14
- package/functions/partials/sassFor.js +0 -21
- package/functions/partials.js +0 -40
- package/functions/sass.js +0 -6
- package/functions/test-helpers/setUp.test.js +0 -18
- package/functions/testFull.test.js +0 -16
- package/functions/testHelpers.test.js +0 -7
- package/functions/testQuick.test.js +0 -16
- package/functions/typeScript.test.js +0 -10
- package/functions/watchTest.js +0 -12
- package/vendor/array-union/index.js +0 -31
- package/vendor/easy-transform-stream/index.js +0 -54
- package/vendor/globby/gitignore.js +0 -96
- package/vendor/globby/index.js +0 -191
- package/vendor/globby/node_modules/slash/index.js +0 -16
- package/vendor/globby/stream-utils.js +0 -58
- package/vendor/globby/to-path.js +0 -20
- package/vendor/gulp-imagemin/index.js +0 -124
- package/vendor/gulp-imagemin/node_modules/chalk/source/index.js +0 -265
- package/vendor/gulp-imagemin/node_modules/chalk/source/utilities.js +0 -36
- package/vendor/gulp-imagemin/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -217
- package/vendor/gulp-imagemin/node_modules/chalk/source/vendor/supports-color/index.js +0 -154
- package/vendor/gulp-plugin-extras/index.js +0 -42
- package/vendor/gulp-plugin-extras/node_modules/chalk/source/index.js +0 -265
- package/vendor/gulp-plugin-extras/node_modules/chalk/source/utilities.js +0 -36
- package/vendor/gulp-plugin-extras/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -217
- package/vendor/gulp-plugin-extras/node_modules/chalk/source/vendor/supports-color/index.js +0 -154
- package/vendor/gulp-plugin-extras/plugin-error.js +0 -145
- package/vendor/ignore/index.js +0 -468
- package/vendor/imagemin/index.js +0 -90
- package/vendor/imagemin-gifsicle/index.js +0 -33
- package/vendor/imagemin-mozjpeg/index.js +0 -100
- package/vendor/imagemin-mozjpeg/node_modules/execa/index.js +0 -260
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/command.js +0 -47
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/error.js +0 -102
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/kill.js +0 -123
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/promise.js +0 -47
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/stdio.js +0 -50
- package/vendor/imagemin-mozjpeg/node_modules/execa/lib/stream.js +0 -124
- package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/core.js +0 -238
- package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/main.js +0 -89
- package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/realtime.js +0 -24
- package/vendor/imagemin-mozjpeg/node_modules/human-signals/build/src/signals.js +0 -44
- package/vendor/imagemin-mozjpeg/node_modules/is-stream/index.js +0 -25
- package/vendor/imagemin-mozjpeg/node_modules/mimic-fn/index.js +0 -70
- package/vendor/imagemin-mozjpeg/node_modules/npm-run-path/index.js +0 -52
- package/vendor/imagemin-mozjpeg/node_modules/onetime/index.js +0 -43
- package/vendor/imagemin-mozjpeg/node_modules/path-key/index.js +0 -20
- package/vendor/imagemin-mozjpeg/node_modules/strip-final-newline/index.js +0 -17
- package/vendor/imagemin-optipng/index.js +0 -44
- package/vendor/imagemin-svgo/index.js +0 -27
- package/vendor/is-jpg/index.js +0 -12
- package/vendor/junk/index.js +0 -49
- package/vendor/mozjpeg/index.js +0 -9
- package/vendor/mozjpeg/lib/index.js +0 -18
- package/vendor/mozjpeg/package.json +0 -49
- package/vendor/mozjpeg/vendor/cjpeg +0 -0
- package/vendor/mozjpeg/vendor/source/mozjpeg.tar.gz +0 -0
- package/vendor/p-pipe/index.js +0 -22
- package/vendor/plur/index.js +0 -32
- package/vendor/pretty-bytes/index.js +0 -71
- package/vendor/slash/index.js +0 -12
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.validateInputSync = exports.makeAllStream = exports.handleInput = exports.getSpawnedResult = void 0;
|
|
7
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
8
|
-
var _index = require("../../is-stream/index.js");
|
|
9
|
-
var _getStream = _interopRequireDefault(require("get-stream"));
|
|
10
|
-
var _mergeStream = _interopRequireDefault(require("merge-stream"));
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
// `input` option
|
|
13
|
-
const handleInput = (spawned, input) => {
|
|
14
|
-
// Checking for stdin is workaround for https://github.com/nodejs/node/issues/26852
|
|
15
|
-
// @todo remove `|| spawned.stdin === undefined` once we drop support for Node.js <=12.2.0
|
|
16
|
-
if (input === undefined || spawned.stdin === undefined) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
if ((0, _index.isStream)(input)) {
|
|
20
|
-
input.pipe(spawned.stdin);
|
|
21
|
-
} else {
|
|
22
|
-
spawned.stdin.end(input);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
// `all` interleaves `stdout` and `stderr`
|
|
27
|
-
exports.handleInput = handleInput;
|
|
28
|
-
const makeAllStream = (spawned, _ref) => {
|
|
29
|
-
let {
|
|
30
|
-
all
|
|
31
|
-
} = _ref;
|
|
32
|
-
if (!all || !spawned.stdout && !spawned.stderr) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const mixed = (0, _mergeStream.default)();
|
|
36
|
-
if (spawned.stdout) {
|
|
37
|
-
mixed.add(spawned.stdout);
|
|
38
|
-
}
|
|
39
|
-
if (spawned.stderr) {
|
|
40
|
-
mixed.add(spawned.stderr);
|
|
41
|
-
}
|
|
42
|
-
return mixed;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
// On failure, `result.stdout|stderr|all` should contain the currently buffered stream
|
|
46
|
-
exports.makeAllStream = makeAllStream;
|
|
47
|
-
const getBufferedData = async (stream, streamPromise) => {
|
|
48
|
-
if (!stream) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
stream.destroy();
|
|
52
|
-
try {
|
|
53
|
-
return await streamPromise;
|
|
54
|
-
} catch (error) {
|
|
55
|
-
return error.bufferedData;
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const getStreamPromise = (stream, _ref2) => {
|
|
59
|
-
let {
|
|
60
|
-
encoding,
|
|
61
|
-
buffer,
|
|
62
|
-
maxBuffer
|
|
63
|
-
} = _ref2;
|
|
64
|
-
if (!stream || !buffer) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
if (encoding) {
|
|
68
|
-
return (0, _getStream.default)(stream, {
|
|
69
|
-
encoding,
|
|
70
|
-
maxBuffer
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
return _getStream.default.buffer(stream, {
|
|
74
|
-
maxBuffer
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)
|
|
79
|
-
const getSpawnedResult = async (_ref3, _ref4, processDone) => {
|
|
80
|
-
let {
|
|
81
|
-
stdout,
|
|
82
|
-
stderr,
|
|
83
|
-
all
|
|
84
|
-
} = _ref3;
|
|
85
|
-
let {
|
|
86
|
-
encoding,
|
|
87
|
-
buffer,
|
|
88
|
-
maxBuffer
|
|
89
|
-
} = _ref4;
|
|
90
|
-
const stdoutPromise = getStreamPromise(stdout, {
|
|
91
|
-
encoding,
|
|
92
|
-
buffer,
|
|
93
|
-
maxBuffer
|
|
94
|
-
});
|
|
95
|
-
const stderrPromise = getStreamPromise(stderr, {
|
|
96
|
-
encoding,
|
|
97
|
-
buffer,
|
|
98
|
-
maxBuffer
|
|
99
|
-
});
|
|
100
|
-
const allPromise = getStreamPromise(all, {
|
|
101
|
-
encoding,
|
|
102
|
-
buffer,
|
|
103
|
-
maxBuffer: maxBuffer * 2
|
|
104
|
-
});
|
|
105
|
-
try {
|
|
106
|
-
return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);
|
|
107
|
-
} catch (error) {
|
|
108
|
-
return Promise.all([{
|
|
109
|
-
error,
|
|
110
|
-
signal: error.signal,
|
|
111
|
-
timedOut: error.timedOut
|
|
112
|
-
}, getBufferedData(stdout, stdoutPromise), getBufferedData(stderr, stderrPromise), getBufferedData(all, allPromise)]);
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
exports.getSpawnedResult = getSpawnedResult;
|
|
116
|
-
const validateInputSync = _ref5 => {
|
|
117
|
-
let {
|
|
118
|
-
input
|
|
119
|
-
} = _ref5;
|
|
120
|
-
if ((0, _index.isStream)(input)) {
|
|
121
|
-
throw new TypeError('The `input` option cannot be a stream in sync mode');
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
exports.validateInputSync = validateInputSync;
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SIGNALS = void 0;
|
|
7
|
-
const SIGNALS = exports.SIGNALS = [{
|
|
8
|
-
name: "SIGHUP",
|
|
9
|
-
number: 1,
|
|
10
|
-
action: "terminate",
|
|
11
|
-
description: "Terminal closed",
|
|
12
|
-
standard: "posix"
|
|
13
|
-
}, {
|
|
14
|
-
name: "SIGINT",
|
|
15
|
-
number: 2,
|
|
16
|
-
action: "terminate",
|
|
17
|
-
description: "User interruption with CTRL-C",
|
|
18
|
-
standard: "ansi"
|
|
19
|
-
}, {
|
|
20
|
-
name: "SIGQUIT",
|
|
21
|
-
number: 3,
|
|
22
|
-
action: "core",
|
|
23
|
-
description: "User interruption with CTRL-\\",
|
|
24
|
-
standard: "posix"
|
|
25
|
-
}, {
|
|
26
|
-
name: "SIGILL",
|
|
27
|
-
number: 4,
|
|
28
|
-
action: "core",
|
|
29
|
-
description: "Invalid machine instruction",
|
|
30
|
-
standard: "ansi"
|
|
31
|
-
}, {
|
|
32
|
-
name: "SIGTRAP",
|
|
33
|
-
number: 5,
|
|
34
|
-
action: "core",
|
|
35
|
-
description: "Debugger breakpoint",
|
|
36
|
-
standard: "posix"
|
|
37
|
-
}, {
|
|
38
|
-
name: "SIGABRT",
|
|
39
|
-
number: 6,
|
|
40
|
-
action: "core",
|
|
41
|
-
description: "Aborted",
|
|
42
|
-
standard: "ansi"
|
|
43
|
-
}, {
|
|
44
|
-
name: "SIGIOT",
|
|
45
|
-
number: 6,
|
|
46
|
-
action: "core",
|
|
47
|
-
description: "Aborted",
|
|
48
|
-
standard: "bsd"
|
|
49
|
-
}, {
|
|
50
|
-
name: "SIGBUS",
|
|
51
|
-
number: 7,
|
|
52
|
-
action: "core",
|
|
53
|
-
description: "Bus error due to misaligned, non-existing address or paging error",
|
|
54
|
-
standard: "bsd"
|
|
55
|
-
}, {
|
|
56
|
-
name: "SIGEMT",
|
|
57
|
-
number: 7,
|
|
58
|
-
action: "terminate",
|
|
59
|
-
description: "Command should be emulated but is not implemented",
|
|
60
|
-
standard: "other"
|
|
61
|
-
}, {
|
|
62
|
-
name: "SIGFPE",
|
|
63
|
-
number: 8,
|
|
64
|
-
action: "core",
|
|
65
|
-
description: "Floating point arithmetic error",
|
|
66
|
-
standard: "ansi"
|
|
67
|
-
}, {
|
|
68
|
-
name: "SIGKILL",
|
|
69
|
-
number: 9,
|
|
70
|
-
action: "terminate",
|
|
71
|
-
description: "Forced termination",
|
|
72
|
-
standard: "posix",
|
|
73
|
-
forced: true
|
|
74
|
-
}, {
|
|
75
|
-
name: "SIGUSR1",
|
|
76
|
-
number: 10,
|
|
77
|
-
action: "terminate",
|
|
78
|
-
description: "Application-specific signal",
|
|
79
|
-
standard: "posix"
|
|
80
|
-
}, {
|
|
81
|
-
name: "SIGSEGV",
|
|
82
|
-
number: 11,
|
|
83
|
-
action: "core",
|
|
84
|
-
description: "Segmentation fault",
|
|
85
|
-
standard: "ansi"
|
|
86
|
-
}, {
|
|
87
|
-
name: "SIGUSR2",
|
|
88
|
-
number: 12,
|
|
89
|
-
action: "terminate",
|
|
90
|
-
description: "Application-specific signal",
|
|
91
|
-
standard: "posix"
|
|
92
|
-
}, {
|
|
93
|
-
name: "SIGPIPE",
|
|
94
|
-
number: 13,
|
|
95
|
-
action: "terminate",
|
|
96
|
-
description: "Broken pipe or socket",
|
|
97
|
-
standard: "posix"
|
|
98
|
-
}, {
|
|
99
|
-
name: "SIGALRM",
|
|
100
|
-
number: 14,
|
|
101
|
-
action: "terminate",
|
|
102
|
-
description: "Timeout or timer",
|
|
103
|
-
standard: "posix"
|
|
104
|
-
}, {
|
|
105
|
-
name: "SIGTERM",
|
|
106
|
-
number: 15,
|
|
107
|
-
action: "terminate",
|
|
108
|
-
description: "Termination",
|
|
109
|
-
standard: "ansi"
|
|
110
|
-
}, {
|
|
111
|
-
name: "SIGSTKFLT",
|
|
112
|
-
number: 16,
|
|
113
|
-
action: "terminate",
|
|
114
|
-
description: "Stack is empty or overflowed",
|
|
115
|
-
standard: "other"
|
|
116
|
-
}, {
|
|
117
|
-
name: "SIGCHLD",
|
|
118
|
-
number: 17,
|
|
119
|
-
action: "ignore",
|
|
120
|
-
description: "Child process terminated, paused or unpaused",
|
|
121
|
-
standard: "posix"
|
|
122
|
-
}, {
|
|
123
|
-
name: "SIGCLD",
|
|
124
|
-
number: 17,
|
|
125
|
-
action: "ignore",
|
|
126
|
-
description: "Child process terminated, paused or unpaused",
|
|
127
|
-
standard: "other"
|
|
128
|
-
}, {
|
|
129
|
-
name: "SIGCONT",
|
|
130
|
-
number: 18,
|
|
131
|
-
action: "unpause",
|
|
132
|
-
description: "Unpaused",
|
|
133
|
-
standard: "posix",
|
|
134
|
-
forced: true
|
|
135
|
-
}, {
|
|
136
|
-
name: "SIGSTOP",
|
|
137
|
-
number: 19,
|
|
138
|
-
action: "pause",
|
|
139
|
-
description: "Paused",
|
|
140
|
-
standard: "posix",
|
|
141
|
-
forced: true
|
|
142
|
-
}, {
|
|
143
|
-
name: "SIGTSTP",
|
|
144
|
-
number: 20,
|
|
145
|
-
action: "pause",
|
|
146
|
-
description: "Paused using CTRL-Z or \"suspend\"",
|
|
147
|
-
standard: "posix"
|
|
148
|
-
}, {
|
|
149
|
-
name: "SIGTTIN",
|
|
150
|
-
number: 21,
|
|
151
|
-
action: "pause",
|
|
152
|
-
description: "Background process cannot read terminal input",
|
|
153
|
-
standard: "posix"
|
|
154
|
-
}, {
|
|
155
|
-
name: "SIGBREAK",
|
|
156
|
-
number: 21,
|
|
157
|
-
action: "terminate",
|
|
158
|
-
description: "User interruption with CTRL-BREAK",
|
|
159
|
-
standard: "other"
|
|
160
|
-
}, {
|
|
161
|
-
name: "SIGTTOU",
|
|
162
|
-
number: 22,
|
|
163
|
-
action: "pause",
|
|
164
|
-
description: "Background process cannot write to terminal output",
|
|
165
|
-
standard: "posix"
|
|
166
|
-
}, {
|
|
167
|
-
name: "SIGURG",
|
|
168
|
-
number: 23,
|
|
169
|
-
action: "ignore",
|
|
170
|
-
description: "Socket received out-of-band data",
|
|
171
|
-
standard: "bsd"
|
|
172
|
-
}, {
|
|
173
|
-
name: "SIGXCPU",
|
|
174
|
-
number: 24,
|
|
175
|
-
action: "core",
|
|
176
|
-
description: "Process timed out",
|
|
177
|
-
standard: "bsd"
|
|
178
|
-
}, {
|
|
179
|
-
name: "SIGXFSZ",
|
|
180
|
-
number: 25,
|
|
181
|
-
action: "core",
|
|
182
|
-
description: "File too big",
|
|
183
|
-
standard: "bsd"
|
|
184
|
-
}, {
|
|
185
|
-
name: "SIGVTALRM",
|
|
186
|
-
number: 26,
|
|
187
|
-
action: "terminate",
|
|
188
|
-
description: "Timeout or timer",
|
|
189
|
-
standard: "bsd"
|
|
190
|
-
}, {
|
|
191
|
-
name: "SIGPROF",
|
|
192
|
-
number: 27,
|
|
193
|
-
action: "terminate",
|
|
194
|
-
description: "Timeout or timer",
|
|
195
|
-
standard: "bsd"
|
|
196
|
-
}, {
|
|
197
|
-
name: "SIGWINCH",
|
|
198
|
-
number: 28,
|
|
199
|
-
action: "ignore",
|
|
200
|
-
description: "Terminal window size changed",
|
|
201
|
-
standard: "bsd"
|
|
202
|
-
}, {
|
|
203
|
-
name: "SIGIO",
|
|
204
|
-
number: 29,
|
|
205
|
-
action: "terminate",
|
|
206
|
-
description: "I/O is available",
|
|
207
|
-
standard: "other"
|
|
208
|
-
}, {
|
|
209
|
-
name: "SIGPOLL",
|
|
210
|
-
number: 29,
|
|
211
|
-
action: "terminate",
|
|
212
|
-
description: "Watched event",
|
|
213
|
-
standard: "other"
|
|
214
|
-
}, {
|
|
215
|
-
name: "SIGINFO",
|
|
216
|
-
number: 29,
|
|
217
|
-
action: "ignore",
|
|
218
|
-
description: "Request for process information",
|
|
219
|
-
standard: "other"
|
|
220
|
-
}, {
|
|
221
|
-
name: "SIGPWR",
|
|
222
|
-
number: 30,
|
|
223
|
-
action: "terminate",
|
|
224
|
-
description: "Device running out of power",
|
|
225
|
-
standard: "systemv"
|
|
226
|
-
}, {
|
|
227
|
-
name: "SIGSYS",
|
|
228
|
-
number: 31,
|
|
229
|
-
action: "core",
|
|
230
|
-
description: "Invalid system call",
|
|
231
|
-
standard: "other"
|
|
232
|
-
}, {
|
|
233
|
-
name: "SIGUNUSED",
|
|
234
|
-
number: 31,
|
|
235
|
-
action: "terminate",
|
|
236
|
-
description: "Invalid system call",
|
|
237
|
-
standard: "other"
|
|
238
|
-
}];
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.signalsByNumber = exports.signalsByName = void 0;
|
|
7
|
-
require("core-js/modules/esnext.async-iterator.find.js");
|
|
8
|
-
require("core-js/modules/esnext.async-iterator.reduce.js");
|
|
9
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
10
|
-
require("core-js/modules/esnext.iterator.find.js");
|
|
11
|
-
require("core-js/modules/esnext.iterator.reduce.js");
|
|
12
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
13
|
-
var _os = require("os");
|
|
14
|
-
var _realtime = require("./realtime.js");
|
|
15
|
-
var _signals = require("./signals.js");
|
|
16
|
-
const getSignalsByName = function () {
|
|
17
|
-
const signals = (0, _signals.getSignals)();
|
|
18
|
-
return signals.reduce(getSignalByName, {});
|
|
19
|
-
};
|
|
20
|
-
const getSignalByName = function (signalByNameMemo, _ref) {
|
|
21
|
-
let {
|
|
22
|
-
name,
|
|
23
|
-
number,
|
|
24
|
-
description,
|
|
25
|
-
supported,
|
|
26
|
-
action,
|
|
27
|
-
forced,
|
|
28
|
-
standard
|
|
29
|
-
} = _ref;
|
|
30
|
-
return {
|
|
31
|
-
...signalByNameMemo,
|
|
32
|
-
[name]: {
|
|
33
|
-
name,
|
|
34
|
-
number,
|
|
35
|
-
description,
|
|
36
|
-
supported,
|
|
37
|
-
action,
|
|
38
|
-
forced,
|
|
39
|
-
standard
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
const signalsByName = exports.signalsByName = getSignalsByName();
|
|
44
|
-
const getSignalsByNumber = function () {
|
|
45
|
-
const signals = (0, _signals.getSignals)();
|
|
46
|
-
const length = _realtime.SIGRTMAX + 1;
|
|
47
|
-
const signalsA = Array.from({
|
|
48
|
-
length
|
|
49
|
-
}, (value, number) => getSignalByNumber(number, signals));
|
|
50
|
-
return Object.assign({}, ...signalsA);
|
|
51
|
-
};
|
|
52
|
-
const getSignalByNumber = function (number, signals) {
|
|
53
|
-
const signal = findSignalByNumber(number, signals);
|
|
54
|
-
if (signal === undefined) {
|
|
55
|
-
return {};
|
|
56
|
-
}
|
|
57
|
-
const {
|
|
58
|
-
name,
|
|
59
|
-
description,
|
|
60
|
-
supported,
|
|
61
|
-
action,
|
|
62
|
-
forced,
|
|
63
|
-
standard
|
|
64
|
-
} = signal;
|
|
65
|
-
return {
|
|
66
|
-
[number]: {
|
|
67
|
-
name,
|
|
68
|
-
number,
|
|
69
|
-
description,
|
|
70
|
-
supported,
|
|
71
|
-
action,
|
|
72
|
-
forced,
|
|
73
|
-
standard
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
const findSignalByNumber = function (number, signals) {
|
|
78
|
-
const signal = signals.find(_ref2 => {
|
|
79
|
-
let {
|
|
80
|
-
name
|
|
81
|
-
} = _ref2;
|
|
82
|
-
return _os.constants.signals[name] === number;
|
|
83
|
-
});
|
|
84
|
-
if (signal !== undefined) {
|
|
85
|
-
return signal;
|
|
86
|
-
}
|
|
87
|
-
return signals.find(signalA => signalA.number === number);
|
|
88
|
-
};
|
|
89
|
-
const signalsByNumber = exports.signalsByNumber = getSignalsByNumber();
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getRealtimeSignals = exports.SIGRTMAX = void 0;
|
|
7
|
-
const getRealtimeSignals = function () {
|
|
8
|
-
const length = SIGRTMAX - SIGRTMIN + 1;
|
|
9
|
-
return Array.from({
|
|
10
|
-
length
|
|
11
|
-
}, getRealtimeSignal);
|
|
12
|
-
};
|
|
13
|
-
exports.getRealtimeSignals = getRealtimeSignals;
|
|
14
|
-
const getRealtimeSignal = function (value, index) {
|
|
15
|
-
return {
|
|
16
|
-
name: "SIGRT".concat(index + 1),
|
|
17
|
-
number: SIGRTMIN + index,
|
|
18
|
-
action: "terminate",
|
|
19
|
-
description: "Application-specific signal (realtime)",
|
|
20
|
-
standard: "posix"
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
const SIGRTMIN = 34;
|
|
24
|
-
const SIGRTMAX = exports.SIGRTMAX = 64;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getSignals = void 0;
|
|
7
|
-
require("core-js/modules/esnext.async-iterator.map.js");
|
|
8
|
-
require("core-js/modules/esnext.iterator.map.js");
|
|
9
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
10
|
-
var _os = require("os");
|
|
11
|
-
var _core = require("./core.js");
|
|
12
|
-
var _realtime = require("./realtime.js");
|
|
13
|
-
const getSignals = function () {
|
|
14
|
-
const realtimeSignals = (0, _realtime.getRealtimeSignals)();
|
|
15
|
-
const signals = [..._core.SIGNALS, ...realtimeSignals].map(normalizeSignal);
|
|
16
|
-
return signals;
|
|
17
|
-
};
|
|
18
|
-
exports.getSignals = getSignals;
|
|
19
|
-
const normalizeSignal = function (_ref) {
|
|
20
|
-
let {
|
|
21
|
-
name,
|
|
22
|
-
number: defaultNumber,
|
|
23
|
-
description,
|
|
24
|
-
action,
|
|
25
|
-
forced = false,
|
|
26
|
-
standard
|
|
27
|
-
} = _ref;
|
|
28
|
-
const {
|
|
29
|
-
signals: {
|
|
30
|
-
[name]: constantSignal
|
|
31
|
-
}
|
|
32
|
-
} = _os.constants;
|
|
33
|
-
const supported = constantSignal !== undefined;
|
|
34
|
-
const number = supported ? constantSignal : defaultNumber;
|
|
35
|
-
return {
|
|
36
|
-
name,
|
|
37
|
-
number,
|
|
38
|
-
description,
|
|
39
|
-
supported,
|
|
40
|
-
action,
|
|
41
|
-
forced,
|
|
42
|
-
standard
|
|
43
|
-
};
|
|
44
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isDuplexStream = isDuplexStream;
|
|
7
|
-
exports.isReadableStream = isReadableStream;
|
|
8
|
-
exports.isStream = isStream;
|
|
9
|
-
exports.isTransformStream = isTransformStream;
|
|
10
|
-
exports.isWritableStream = isWritableStream;
|
|
11
|
-
function isStream(stream) {
|
|
12
|
-
return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function';
|
|
13
|
-
}
|
|
14
|
-
function isWritableStream(stream) {
|
|
15
|
-
return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object';
|
|
16
|
-
}
|
|
17
|
-
function isReadableStream(stream) {
|
|
18
|
-
return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object';
|
|
19
|
-
}
|
|
20
|
-
function isDuplexStream(stream) {
|
|
21
|
-
return isWritableStream(stream) && isReadableStream(stream);
|
|
22
|
-
}
|
|
23
|
-
function isTransformStream(stream) {
|
|
24
|
-
return isDuplexStream(stream) && typeof stream._transform === 'function';
|
|
25
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = mimicFunction;
|
|
7
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
8
|
-
const copyProperty = (to, from, property, ignoreNonConfigurable) => {
|
|
9
|
-
// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.
|
|
10
|
-
// `Function#prototype` is non-writable and non-configurable so can never be modified.
|
|
11
|
-
if (property === 'length' || property === 'prototype') {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// `Function#arguments` and `Function#caller` should not be copied. They were reported to be present in `Reflect.ownKeys` for some devices in React Native (#41), so we explicitly ignore them here.
|
|
16
|
-
if (property === 'arguments' || property === 'caller') {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const toDescriptor = Object.getOwnPropertyDescriptor(to, property);
|
|
20
|
-
const fromDescriptor = Object.getOwnPropertyDescriptor(from, property);
|
|
21
|
-
if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
Object.defineProperty(to, property, fromDescriptor);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
// `Object.defineProperty()` throws if the property exists, is not configurable and either:
|
|
28
|
-
// - one its descriptors is changed
|
|
29
|
-
// - it is non-writable and its value is changed
|
|
30
|
-
const canCopyProperty = function (toDescriptor, fromDescriptor) {
|
|
31
|
-
return toDescriptor === undefined || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value);
|
|
32
|
-
};
|
|
33
|
-
const changePrototype = (to, from) => {
|
|
34
|
-
const fromPrototype = Object.getPrototypeOf(from);
|
|
35
|
-
if (fromPrototype === Object.getPrototypeOf(to)) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
Object.setPrototypeOf(to, fromPrototype);
|
|
39
|
-
};
|
|
40
|
-
const wrappedToString = (withName, fromBody) => "/* Wrapped ".concat(withName, "*/\n").concat(fromBody);
|
|
41
|
-
const toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');
|
|
42
|
-
const toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');
|
|
43
|
-
|
|
44
|
-
// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.
|
|
45
|
-
// We use `bind()` instead of a closure for the same reason.
|
|
46
|
-
// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.
|
|
47
|
-
const changeToString = (to, from, name) => {
|
|
48
|
-
const withName = name === '' ? '' : "with ".concat(name.trim(), "() ");
|
|
49
|
-
const newToString = wrappedToString.bind(null, withName, from.toString());
|
|
50
|
-
// Ensure `to.toString.toString` is non-enumerable and has the same `same`
|
|
51
|
-
Object.defineProperty(newToString, 'name', toStringName);
|
|
52
|
-
Object.defineProperty(to, 'toString', {
|
|
53
|
-
...toStringDescriptor,
|
|
54
|
-
value: newToString
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
function mimicFunction(to, from) {
|
|
58
|
-
let {
|
|
59
|
-
ignoreNonConfigurable = false
|
|
60
|
-
} = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
61
|
-
const {
|
|
62
|
-
name
|
|
63
|
-
} = to;
|
|
64
|
-
for (const property of Reflect.ownKeys(from)) {
|
|
65
|
-
copyProperty(to, from, property, ignoreNonConfigurable);
|
|
66
|
-
}
|
|
67
|
-
changePrototype(to, from);
|
|
68
|
-
changeToString(to, from, name);
|
|
69
|
-
return to;
|
|
70
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.npmRunPath = npmRunPath;
|
|
7
|
-
exports.npmRunPathEnv = npmRunPathEnv;
|
|
8
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
|
-
require("core-js/modules/web.url.js");
|
|
10
|
-
require("core-js/modules/web.url-search-params.js");
|
|
11
|
-
var _nodeProcess = _interopRequireDefault(require("node:process"));
|
|
12
|
-
var _nodePath = _interopRequireDefault(require("node:path"));
|
|
13
|
-
var _nodeUrl = _interopRequireDefault(require("node:url"));
|
|
14
|
-
var _index = _interopRequireDefault(require("../path-key/index.js"));
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
function npmRunPath() {
|
|
17
|
-
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18
|
-
const {
|
|
19
|
-
cwd = _nodeProcess.default.cwd(),
|
|
20
|
-
path: path_ = _nodeProcess.default.env[(0, _index.default)()],
|
|
21
|
-
execPath = _nodeProcess.default.execPath
|
|
22
|
-
} = options;
|
|
23
|
-
let previous;
|
|
24
|
-
const execPathString = execPath instanceof URL ? _nodeUrl.default.fileURLToPath(execPath) : execPath;
|
|
25
|
-
const cwdString = cwd instanceof URL ? _nodeUrl.default.fileURLToPath(cwd) : cwd;
|
|
26
|
-
let cwdPath = _nodePath.default.resolve(cwdString);
|
|
27
|
-
const result = [];
|
|
28
|
-
while (previous !== cwdPath) {
|
|
29
|
-
result.push(_nodePath.default.join(cwdPath, 'node_modules/.bin'));
|
|
30
|
-
previous = cwdPath;
|
|
31
|
-
cwdPath = _nodePath.default.resolve(cwdPath, '..');
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Ensure the running `node` binary is used.
|
|
35
|
-
result.push(_nodePath.default.resolve(cwdString, execPathString, '..'));
|
|
36
|
-
return [...result, path_].join(_nodePath.default.delimiter);
|
|
37
|
-
}
|
|
38
|
-
function npmRunPathEnv() {
|
|
39
|
-
let {
|
|
40
|
-
env = _nodeProcess.default.env,
|
|
41
|
-
...options
|
|
42
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
43
|
-
env = {
|
|
44
|
-
...env
|
|
45
|
-
};
|
|
46
|
-
const path = (0, _index.default)({
|
|
47
|
-
env
|
|
48
|
-
});
|
|
49
|
-
options.path = env[path];
|
|
50
|
-
env[path] = npmRunPath(options);
|
|
51
|
-
return env;
|
|
52
|
-
}
|