@idlebox/node 1.2.15 → 1.2.17
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/lib/cjs/__create_index.generated.cjs +169 -0
- package/lib/cjs/__create_index.generated.cjs.map +10 -0
- package/lib/cjs/__create_index.generated.d.cts +388 -0
- package/lib/cjs/environment/pathEnvironment.cjs +1 -1
- package/lib/cjs/environment/pathEnvironment.cjs.map +1 -1
- package/lib/cjs/stream/blackHoleStream.cjs.map +1 -1
- package/lib/cjs/stream/collectingStream.cjs.map +1 -1
- package/lib/cjs/stream/loggerStream.cjs.map +1 -1
- package/lib/esm/__create_index.generated.d.mts +388 -0
- package/lib/esm/__create_index.generated.mjs +109 -0
- package/lib/esm/__create_index.generated.mjs.map +10 -0
- package/lib/esm/environment/pathEnvironment.mjs +1 -1
- package/lib/esm/environment/pathEnvironment.mjs.map +1 -1
- package/lib/esm/stream/blackHoleStream.mjs.map +1 -1
- package/lib/esm/stream/collectingStream.mjs.map +1 -1
- package/lib/esm/stream/loggerStream.mjs.map +1 -1
- package/package.json +2 -2
- package/src/environment/pathEnvironment.ts +4 -4
- package/src/stream/blackHoleStream.ts +1 -1
- package/src/stream/collectingStream.ts +2 -2
- package/src/stream/loggerStream.ts +2 -2
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
require('@gongt/fix-esm').register();
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
// DO NOT EDIT THIS FILE
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.disposableStream = exports.CollectingStream = exports.RawCollectingStream = exports.streamToBuffer = exports.streamHasEnd = exports.streamPromise = exports.BlackHoleStream = exports.nodeResolvePathArray = exports.lrelative = exports.getAllPathUpToRoot = exports.findPackageRoot = exports.findUpUntilSync = exports.findUpUntil = exports.WrappedTerminalConsole = exports.writeFileIfChange = exports.writeFileIfChangeSync = exports.createTempFolder = exports.commmandInPathSync = exports.commandInPath = exports.dumpEventEmitterEmit = exports.ERRNO_LINUX = exports.getNpmConfigValue = exports.sha256 = exports.md5 = exports.respawnInScope = exports.trySpawnInScope = exports.spawnRecreateEventHandlers = exports.findBinary = exports.PathEnvironment = exports.PATH_SEPARATOR = exports.cleanupEnvironment = exports.deleteEnvironment = exports.getEnvironment = exports.exists = exports.existsSync = exports.execLazyError = exports.printLine = exports.spawnGetEverything = exports.spawnGetOutput = exports.spawnWithoutOutput = exports.checkChildProcessResult = exports.runMain = exports.ExitError = exports.prettyFormatError = exports.prettyPrintError = exports.setErrorLogRoot = exports.relativePath = exports.osTempDir = exports.normalizePath = exports.resolvePath = void 0;
|
|
10
|
+
exports.HexDumpLoggerStream = exports.LoggerStream = exports.drainStream = void 0;
|
|
11
|
+
var resolvePath_js_1 = require("./path-resolve/resolvePath.cjs");
|
|
12
|
+
Object.defineProperty(exports, "resolvePath", { enumerable: true, get: function () { return resolvePath_js_1.resolvePath; } });
|
|
13
|
+
var resolvePath_js_2 = require("./path-resolve/resolvePath.cjs");
|
|
14
|
+
Object.defineProperty(exports, "normalizePath", { enumerable: true, get: function () { return resolvePath_js_2.normalizePath; } });
|
|
15
|
+
var resolvePath_js_3 = require("./path-resolve/resolvePath.cjs");
|
|
16
|
+
Object.defineProperty(exports, "osTempDir", { enumerable: true, get: function () { return resolvePath_js_3.osTempDir; } });
|
|
17
|
+
var resolvePath_js_4 = require("./path-resolve/resolvePath.cjs");
|
|
18
|
+
Object.defineProperty(exports, "relativePath", { enumerable: true, get: function () { return resolvePath_js_4.relativePath; } });
|
|
19
|
+
/* error/pretty.ts */
|
|
20
|
+
// Identifiers
|
|
21
|
+
var pretty_js_1 = require("./error/pretty.cjs");
|
|
22
|
+
Object.defineProperty(exports, "setErrorLogRoot", { enumerable: true, get: function () { return pretty_js_1.setErrorLogRoot; } });
|
|
23
|
+
var pretty_js_2 = require("./error/pretty.cjs");
|
|
24
|
+
Object.defineProperty(exports, "prettyPrintError", { enumerable: true, get: function () { return pretty_js_2.prettyPrintError; } });
|
|
25
|
+
var pretty_js_3 = require("./error/pretty.cjs");
|
|
26
|
+
Object.defineProperty(exports, "prettyFormatError", { enumerable: true, get: function () { return pretty_js_3.prettyFormatError; } });
|
|
27
|
+
var asyncLoad_js_1 = require("./asyncLoad.cjs");
|
|
28
|
+
Object.defineProperty(exports, "ExitError", { enumerable: true, get: function () { return asyncLoad_js_1.ExitError; } });
|
|
29
|
+
var asyncLoad_js_2 = require("./asyncLoad.cjs");
|
|
30
|
+
Object.defineProperty(exports, "runMain", { enumerable: true, get: function () { return asyncLoad_js_2.runMain; } });
|
|
31
|
+
/* child_process/error.ts */
|
|
32
|
+
// Identifiers
|
|
33
|
+
var error_js_1 = require("./child_process/error.cjs");
|
|
34
|
+
Object.defineProperty(exports, "checkChildProcessResult", { enumerable: true, get: function () { return error_js_1.checkChildProcessResult; } });
|
|
35
|
+
var execa_js_1 = require("./child_process/execa.cjs");
|
|
36
|
+
Object.defineProperty(exports, "spawnWithoutOutput", { enumerable: true, get: function () { return execa_js_1.spawnWithoutOutput; } });
|
|
37
|
+
var execa_js_2 = require("./child_process/execa.cjs");
|
|
38
|
+
Object.defineProperty(exports, "spawnGetOutput", { enumerable: true, get: function () { return execa_js_2.spawnGetOutput; } });
|
|
39
|
+
var execa_js_3 = require("./child_process/execa.cjs");
|
|
40
|
+
Object.defineProperty(exports, "spawnGetEverything", { enumerable: true, get: function () { return execa_js_3.spawnGetEverything; } });
|
|
41
|
+
/* cli-io/output.ts */
|
|
42
|
+
// Identifiers
|
|
43
|
+
var output_js_1 = require("./cli-io/output.cjs");
|
|
44
|
+
Object.defineProperty(exports, "printLine", { enumerable: true, get: function () { return output_js_1.printLine; } });
|
|
45
|
+
var lateError_js_1 = require("./child_process/lateError.cjs");
|
|
46
|
+
Object.defineProperty(exports, "execLazyError", { enumerable: true, get: function () { return lateError_js_1.execLazyError; } });
|
|
47
|
+
/* fs/exists.ts */
|
|
48
|
+
// Identifiers
|
|
49
|
+
var exists_js_1 = require("./fs/exists.cjs");
|
|
50
|
+
Object.defineProperty(exports, "existsSync", { enumerable: true, get: function () { return exists_js_1.existsSync; } });
|
|
51
|
+
var exists_js_2 = require("./fs/exists.cjs");
|
|
52
|
+
Object.defineProperty(exports, "exists", { enumerable: true, get: function () { return exists_js_2.exists; } });
|
|
53
|
+
var getEnvironment_js_1 = require("./environment/getEnvironment.cjs");
|
|
54
|
+
Object.defineProperty(exports, "getEnvironment", { enumerable: true, get: function () { return getEnvironment_js_1.getEnvironment; } });
|
|
55
|
+
var getEnvironment_js_2 = require("./environment/getEnvironment.cjs");
|
|
56
|
+
Object.defineProperty(exports, "deleteEnvironment", { enumerable: true, get: function () { return getEnvironment_js_2.deleteEnvironment; } });
|
|
57
|
+
var getEnvironment_js_3 = require("./environment/getEnvironment.cjs");
|
|
58
|
+
Object.defineProperty(exports, "cleanupEnvironment", { enumerable: true, get: function () { return getEnvironment_js_3.cleanupEnvironment; } });
|
|
59
|
+
/* environment/pathEnvironment.ts */
|
|
60
|
+
// Identifiers
|
|
61
|
+
var pathEnvironment_js_1 = require("./environment/pathEnvironment.cjs");
|
|
62
|
+
Object.defineProperty(exports, "PATH_SEPARATOR", { enumerable: true, get: function () { return pathEnvironment_js_1.PATH_SEPARATOR; } });
|
|
63
|
+
var pathEnvironment_js_2 = require("./environment/pathEnvironment.cjs");
|
|
64
|
+
Object.defineProperty(exports, "PathEnvironment", { enumerable: true, get: function () { return pathEnvironment_js_2.PathEnvironment; } });
|
|
65
|
+
/* environment/findBinary.ts */
|
|
66
|
+
// Identifiers
|
|
67
|
+
var findBinary_js_1 = require("./environment/findBinary.cjs");
|
|
68
|
+
Object.defineProperty(exports, "findBinary", { enumerable: true, get: function () { return findBinary_js_1.findBinary; } });
|
|
69
|
+
/* child_process/respawn.ts */
|
|
70
|
+
// Identifiers
|
|
71
|
+
var respawn_js_1 = require("./child_process/respawn.cjs");
|
|
72
|
+
Object.defineProperty(exports, "spawnRecreateEventHandlers", { enumerable: true, get: function () { return respawn_js_1.spawnRecreateEventHandlers; } });
|
|
73
|
+
var respawn_js_2 = require("./child_process/respawn.cjs");
|
|
74
|
+
Object.defineProperty(exports, "trySpawnInScope", { enumerable: true, get: function () { return respawn_js_2.trySpawnInScope; } });
|
|
75
|
+
var respawn_js_3 = require("./child_process/respawn.cjs");
|
|
76
|
+
Object.defineProperty(exports, "respawnInScope", { enumerable: true, get: function () { return respawn_js_3.respawnInScope; } });
|
|
77
|
+
/* crypto/md5.ts */
|
|
78
|
+
// Identifiers
|
|
79
|
+
var md5_js_1 = require("./crypto/md5.cjs");
|
|
80
|
+
Object.defineProperty(exports, "md5", { enumerable: true, get: function () { return md5_js_1.md5; } });
|
|
81
|
+
/* crypto/sha256.ts */
|
|
82
|
+
// Identifiers
|
|
83
|
+
var sha256_js_1 = require("./crypto/sha256.cjs");
|
|
84
|
+
Object.defineProperty(exports, "sha256", { enumerable: true, get: function () { return sha256_js_1.sha256; } });
|
|
85
|
+
/* environment/npmConfig.ts */
|
|
86
|
+
// Identifiers
|
|
87
|
+
var npmConfig_js_1 = require("./environment/npmConfig.cjs");
|
|
88
|
+
Object.defineProperty(exports, "getNpmConfigValue", { enumerable: true, get: function () { return npmConfig_js_1.getNpmConfigValue; } });
|
|
89
|
+
/* error/code.ts */
|
|
90
|
+
// Identifiers
|
|
91
|
+
var code_js_1 = require("./error/code.cjs");
|
|
92
|
+
Object.defineProperty(exports, "ERRNO_LINUX", { enumerable: true, get: function () { return code_js_1.ERRNO_LINUX; } });
|
|
93
|
+
/* events/dumpEventEmitter.ts */
|
|
94
|
+
// Identifiers
|
|
95
|
+
var dumpEventEmitter_js_1 = require("./events/dumpEventEmitter.cjs");
|
|
96
|
+
Object.defineProperty(exports, "dumpEventEmitterEmit", { enumerable: true, get: function () { return dumpEventEmitter_js_1.dumpEventEmitterEmit; } });
|
|
97
|
+
/* fs/commandExists.ts */
|
|
98
|
+
// Identifiers
|
|
99
|
+
var commandExists_js_1 = require("./fs/commandExists.cjs");
|
|
100
|
+
Object.defineProperty(exports, "commandInPath", { enumerable: true, get: function () { return commandExists_js_1.commandInPath; } });
|
|
101
|
+
var commandExists_js_2 = require("./fs/commandExists.cjs");
|
|
102
|
+
Object.defineProperty(exports, "commmandInPathSync", { enumerable: true, get: function () { return commandExists_js_2.commmandInPathSync; } });
|
|
103
|
+
/* fs/tempFolder.ts */
|
|
104
|
+
// Identifiers
|
|
105
|
+
var tempFolder_js_1 = require("./fs/tempFolder.cjs");
|
|
106
|
+
Object.defineProperty(exports, "createTempFolder", { enumerable: true, get: function () { return tempFolder_js_1.createTempFolder; } });
|
|
107
|
+
/* fs/weiteChanged.ts */
|
|
108
|
+
// Identifiers
|
|
109
|
+
var weiteChanged_js_1 = require("./fs/weiteChanged.cjs");
|
|
110
|
+
Object.defineProperty(exports, "writeFileIfChangeSync", { enumerable: true, get: function () { return weiteChanged_js_1.writeFileIfChangeSync; } });
|
|
111
|
+
var weiteChanged_js_2 = require("./fs/weiteChanged.cjs");
|
|
112
|
+
Object.defineProperty(exports, "writeFileIfChange", { enumerable: true, get: function () { return weiteChanged_js_2.writeFileIfChange; } });
|
|
113
|
+
/* log/terminal.ts */
|
|
114
|
+
// Identifiers
|
|
115
|
+
var terminal_js_1 = require("./log/terminal.cjs");
|
|
116
|
+
Object.defineProperty(exports, "WrappedTerminalConsole", { enumerable: true, get: function () { return terminal_js_1.WrappedTerminalConsole; } });
|
|
117
|
+
/* path-resolve/findUp.ts */
|
|
118
|
+
// Identifiers
|
|
119
|
+
var findUp_js_1 = require("./path-resolve/findUp.cjs");
|
|
120
|
+
Object.defineProperty(exports, "findUpUntil", { enumerable: true, get: function () { return findUp_js_1.findUpUntil; } });
|
|
121
|
+
var findUp_js_2 = require("./path-resolve/findUp.cjs");
|
|
122
|
+
Object.defineProperty(exports, "findUpUntilSync", { enumerable: true, get: function () { return findUp_js_2.findUpUntilSync; } });
|
|
123
|
+
/* path-resolve/findPackageRoot.ts */
|
|
124
|
+
// Identifiers
|
|
125
|
+
var findPackageRoot_js_1 = require("./path-resolve/findPackageRoot.cjs");
|
|
126
|
+
Object.defineProperty(exports, "findPackageRoot", { enumerable: true, get: function () { return findPackageRoot_js_1.findPackageRoot; } });
|
|
127
|
+
/* path-resolve/getAllUp.ts */
|
|
128
|
+
// Identifiers
|
|
129
|
+
var getAllUp_js_1 = require("./path-resolve/getAllUp.cjs");
|
|
130
|
+
Object.defineProperty(exports, "getAllPathUpToRoot", { enumerable: true, get: function () { return getAllUp_js_1.getAllPathUpToRoot; } });
|
|
131
|
+
/* path-resolve/lrelative.ts */
|
|
132
|
+
// Identifiers
|
|
133
|
+
var lrelative_js_1 = require("./path-resolve/lrelative.cjs");
|
|
134
|
+
Object.defineProperty(exports, "lrelative", { enumerable: true, get: function () { return lrelative_js_1.lrelative; } });
|
|
135
|
+
/* path-resolve/nodeResolvePathArray.ts */
|
|
136
|
+
// Identifiers
|
|
137
|
+
var nodeResolvePathArray_js_1 = require("./path-resolve/nodeResolvePathArray.cjs");
|
|
138
|
+
Object.defineProperty(exports, "nodeResolvePathArray", { enumerable: true, get: function () { return nodeResolvePathArray_js_1.nodeResolvePathArray; } });
|
|
139
|
+
/* stream/blackHoleStream.ts */
|
|
140
|
+
// Identifiers
|
|
141
|
+
var blackHoleStream_js_1 = require("./stream/blackHoleStream.cjs");
|
|
142
|
+
Object.defineProperty(exports, "BlackHoleStream", { enumerable: true, get: function () { return blackHoleStream_js_1.BlackHoleStream; } });
|
|
143
|
+
/* stream/streamPromise.ts */
|
|
144
|
+
// Identifiers
|
|
145
|
+
var streamPromise_js_1 = require("./stream/streamPromise.cjs");
|
|
146
|
+
Object.defineProperty(exports, "streamPromise", { enumerable: true, get: function () { return streamPromise_js_1.streamPromise; } });
|
|
147
|
+
var streamPromise_js_2 = require("./stream/streamPromise.cjs");
|
|
148
|
+
Object.defineProperty(exports, "streamHasEnd", { enumerable: true, get: function () { return streamPromise_js_2.streamHasEnd; } });
|
|
149
|
+
/* stream/collectingStream.ts */
|
|
150
|
+
// Identifiers
|
|
151
|
+
var collectingStream_js_1 = require("./stream/collectingStream.cjs");
|
|
152
|
+
Object.defineProperty(exports, "streamToBuffer", { enumerable: true, get: function () { return collectingStream_js_1.streamToBuffer; } });
|
|
153
|
+
var collectingStream_js_2 = require("./stream/collectingStream.cjs");
|
|
154
|
+
Object.defineProperty(exports, "RawCollectingStream", { enumerable: true, get: function () { return collectingStream_js_2.RawCollectingStream; } });
|
|
155
|
+
var collectingStream_js_3 = require("./stream/collectingStream.cjs");
|
|
156
|
+
Object.defineProperty(exports, "CollectingStream", { enumerable: true, get: function () { return collectingStream_js_3.CollectingStream; } });
|
|
157
|
+
/* stream/disposableStream.ts */
|
|
158
|
+
// Identifiers
|
|
159
|
+
var disposableStream_js_1 = require("./stream/disposableStream.cjs");
|
|
160
|
+
Object.defineProperty(exports, "disposableStream", { enumerable: true, get: function () { return disposableStream_js_1.disposableStream; } });
|
|
161
|
+
/* stream/drainStream.ts */
|
|
162
|
+
// Identifiers
|
|
163
|
+
var drainStream_js_1 = require("./stream/drainStream.cjs");
|
|
164
|
+
Object.defineProperty(exports, "drainStream", { enumerable: true, get: function () { return drainStream_js_1.drainStream; } });
|
|
165
|
+
var loggerStream_js_1 = require("./stream/loggerStream.cjs");
|
|
166
|
+
Object.defineProperty(exports, "LoggerStream", { enumerable: true, get: function () { return loggerStream_js_1.LoggerStream; } });
|
|
167
|
+
var loggerStream_js_2 = require("./stream/loggerStream.cjs");
|
|
168
|
+
Object.defineProperty(exports, "HexDumpLoggerStream", { enumerable: true, get: function () { return loggerStream_js_2.HexDumpLoggerStream; } });
|
|
169
|
+
//# sourceMappingURL=__create_index.generated.cjs.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"file": "__create_index.generated.cjs",
|
|
4
|
+
"sourceRoot": "",
|
|
5
|
+
"s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AA,oBAAoB,OAAA;AAC7B,+BAA+B;AAC9B,cAAc;AACd,mEAA4D;AAApD,qHAAA,eAAe,OAAA;AACxB,6BAA6B;AAC5B,cAAc;AACd,+DAAwD;AAAhD,iHAAA,aAAa,OAAA;AACrB,+DAAuD;AAA/C,gHAAA,YAAY,OAAA;AACrB,gCAAgC;AAC/B,cAAc;AACd,qEAA4D;AAApD,qHAAA,cAAc,OAAA;AACtB,qEAAiE;AAAzD,0HAAA,mBAAmB,OAAA;AAC3B,qEAA8D;AAAtD,uHAAA,gBAAgB,OAAA;AACzB,gCAAgC;AAC/B,cAAc;AACd,qEAA8D;AAAtD,uHAAA,gBAAgB,OAAA;AACzB,2BAA2B;AAC1B,cAAc;AACd,2DAAoD;AAA5C,6GAAA,WAAW,OAAA;AAInB,6DAAsD;AAA9C,+GAAA,YAAY,OAAA;AACpB,6DAA6D;AAArD,sHAAA,mBAAmB,OAAA"
|
|
10
|
+
}
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
|
|
3
|
+
import { EventEmitter } from 'events';
|
|
4
|
+
import { ExecaReturnValue } from 'execa';
|
|
5
|
+
import { IDisposable } from '@idlebox/common';
|
|
6
|
+
import { Options } from 'execa';
|
|
7
|
+
import { PathArray } from '@idlebox/common';
|
|
8
|
+
import { Readable } from 'stream';
|
|
9
|
+
import { Transform } from 'stream';
|
|
10
|
+
import { WrappedConsole } from '@idlebox/common';
|
|
11
|
+
import { WrappedConsoleOptions } from '@idlebox/common';
|
|
12
|
+
import { Writable } from 'stream';
|
|
13
|
+
|
|
14
|
+
export declare interface Async {
|
|
15
|
+
sync?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare type AsyncMainFunction = () => Promise<void | number>;
|
|
19
|
+
|
|
20
|
+
export declare class BlackHoleStream extends Writable {
|
|
21
|
+
_write(_chunk: Buffer, _encoding: string, callback: (error?: Error | null) => void): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** @throws */
|
|
25
|
+
export declare function checkChildProcessResult(result: IChildProcessStatus): void;
|
|
26
|
+
|
|
27
|
+
export declare function cleanupEnvironment(name: string, env?: NodeJS.ProcessEnv): void;
|
|
28
|
+
|
|
29
|
+
export declare class CollectingStream extends Writable {
|
|
30
|
+
private buffer?;
|
|
31
|
+
private _promise?;
|
|
32
|
+
constructor(sourceStream?: NodeJS.ReadableStream);
|
|
33
|
+
_write(chunk: Buffer, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
34
|
+
getOutput(): string;
|
|
35
|
+
promise(): Promise<string>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare const colorMap: {
|
|
39
|
+
info: string;
|
|
40
|
+
success: string;
|
|
41
|
+
debug: string;
|
|
42
|
+
error: string;
|
|
43
|
+
trace: string;
|
|
44
|
+
warn: string;
|
|
45
|
+
assert: string;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export declare function commandInPath(cmd: string, alterExt?: string[]): Promise<string | undefined>;
|
|
49
|
+
|
|
50
|
+
export declare function commmandInPathSync(cmd: string, alterExt?: string[]): string | undefined;
|
|
51
|
+
|
|
52
|
+
export declare function createTempFolder(fullPath: string): IDisposable;
|
|
53
|
+
|
|
54
|
+
export declare function deleteEnvironment(name: string, env?: NodeJS.ProcessEnv): void;
|
|
55
|
+
|
|
56
|
+
export declare function disposableStream<T extends Writable | Readable>(stream: T): T & IDisposable;
|
|
57
|
+
|
|
58
|
+
export declare function drainStream(stream: NodeJS.ReadableStream, size: number, start?: number, extra?: number): Promise<Buffer>;
|
|
59
|
+
|
|
60
|
+
export declare function dumpEventEmitterEmit(ev: EventEmitter): void;
|
|
61
|
+
|
|
62
|
+
export declare enum ERRNO_LINUX {
|
|
63
|
+
EPERM = 1,
|
|
64
|
+
ENOENT = 2,
|
|
65
|
+
ESRCH = 3,
|
|
66
|
+
EINTR = 4,
|
|
67
|
+
EIO = 5,
|
|
68
|
+
ENXIO = 6,
|
|
69
|
+
E2BIG = 7,
|
|
70
|
+
ENOEXEC = 8,
|
|
71
|
+
EBADF = 9,
|
|
72
|
+
ECHILD = 10,
|
|
73
|
+
EAGAIN = 11,
|
|
74
|
+
ENOMEM = 12,
|
|
75
|
+
EACCES = 13,
|
|
76
|
+
EFAULT = 14,
|
|
77
|
+
ENOTBLK = 15,
|
|
78
|
+
EBUSY = 16,
|
|
79
|
+
EEXIST = 17,
|
|
80
|
+
EXDEV = 18,
|
|
81
|
+
ENODEV = 19,
|
|
82
|
+
ENOTDIR = 20,
|
|
83
|
+
EISDIR = 21,
|
|
84
|
+
EINVAL = 22,
|
|
85
|
+
ENFILE = 23,
|
|
86
|
+
EMFILE = 24,
|
|
87
|
+
ENOTTY = 25,
|
|
88
|
+
ETXTBSY = 26,
|
|
89
|
+
EFBIG = 27,
|
|
90
|
+
ENOSPC = 28,
|
|
91
|
+
ESPIPE = 29,
|
|
92
|
+
EROFS = 30,
|
|
93
|
+
EMLINK = 31,
|
|
94
|
+
EPIPE = 32,
|
|
95
|
+
EDOM = 33,
|
|
96
|
+
ERANGE = 34,
|
|
97
|
+
ENOMSG = 35,
|
|
98
|
+
EIDRM = 36,
|
|
99
|
+
ECHRNG = 37,
|
|
100
|
+
EL2NSYNC = 38,
|
|
101
|
+
EL3HLT = 39,
|
|
102
|
+
EL3RST = 40,
|
|
103
|
+
ELNRNG = 41,
|
|
104
|
+
EUNATCH = 42,
|
|
105
|
+
ENOCSI = 43,
|
|
106
|
+
EL2HLT = 44,
|
|
107
|
+
EDEADLK = 45,
|
|
108
|
+
ENOLCK = 46,
|
|
109
|
+
EBADE = 50,
|
|
110
|
+
EBADR = 51,
|
|
111
|
+
EXFULL = 52,
|
|
112
|
+
ENOANO = 53,
|
|
113
|
+
EBADRQC = 54,
|
|
114
|
+
EBADSLT = 55,
|
|
115
|
+
EDEADLOCK = 56,
|
|
116
|
+
EBFONT = 57,
|
|
117
|
+
ENOSTR = 60,
|
|
118
|
+
ENODATA = 61,
|
|
119
|
+
ETIME = 62,
|
|
120
|
+
ENOSR = 63,
|
|
121
|
+
ENONET = 64,
|
|
122
|
+
ENOPKG = 65,
|
|
123
|
+
EREMOTE = 66,
|
|
124
|
+
ENOLINK = 67,
|
|
125
|
+
EADV = 68,
|
|
126
|
+
ESRMNT = 69,
|
|
127
|
+
ECOMM = 70,
|
|
128
|
+
EPROTO = 71,
|
|
129
|
+
EMULTIHOP = 74,
|
|
130
|
+
ELBIN = 75,
|
|
131
|
+
EDOTDOT = 76,
|
|
132
|
+
EBADMSG = 77,
|
|
133
|
+
EFTYPE = 79,
|
|
134
|
+
ENOTUNIQ = 80,
|
|
135
|
+
EBADFD = 81,
|
|
136
|
+
EREMCHG = 82,
|
|
137
|
+
ELIBACC = 83,
|
|
138
|
+
ELIBBAD = 84,
|
|
139
|
+
ELIBSCN = 85,
|
|
140
|
+
ELIBMAX = 86,
|
|
141
|
+
ELIBEXEC = 87,
|
|
142
|
+
ENOSYS = 88,
|
|
143
|
+
ENMFILE = 89,
|
|
144
|
+
ENOTEMPTY = 90,
|
|
145
|
+
ENAMETOOLONG = 91,
|
|
146
|
+
ELOOP = 92,
|
|
147
|
+
EOPNOTSUPP = 95,
|
|
148
|
+
EPFNOSUPPORT = 96,
|
|
149
|
+
ECONNRESET = 104,
|
|
150
|
+
ENOBUFS = 105,
|
|
151
|
+
EAFNOSUPPORT = 106,
|
|
152
|
+
EPROTOTYPE = 107,
|
|
153
|
+
ENOTSOCK = 108,
|
|
154
|
+
ENOPROTOOPT = 109,
|
|
155
|
+
ESHUTDOWN = 110,
|
|
156
|
+
ECONNREFUSED = 111,
|
|
157
|
+
EADDRINUSE = 112,
|
|
158
|
+
ECONNABORTED = 113,
|
|
159
|
+
ENETUNREACH = 114,
|
|
160
|
+
ENETDOWN = 115,
|
|
161
|
+
ETIMEDOUT = 116,
|
|
162
|
+
EHOSTDOWN = 117,
|
|
163
|
+
EHOSTUNREACH = 118,
|
|
164
|
+
EINPROGRESS = 119,
|
|
165
|
+
EALREADY = 120,
|
|
166
|
+
EDESTADDRREQ = 121,
|
|
167
|
+
EMSGSIZE = 122,
|
|
168
|
+
EPROTONOSUPPORT = 123,
|
|
169
|
+
ESOCKTNOSUPPORT = 124,
|
|
170
|
+
EADDRNOTAVAIL = 125,
|
|
171
|
+
ENETRESET = 126,
|
|
172
|
+
EISCONN = 127,
|
|
173
|
+
ENOTCONN = 128,
|
|
174
|
+
ETOOMANYREFS = 129,
|
|
175
|
+
EPROCLIM = 130,
|
|
176
|
+
EUSERS = 131,
|
|
177
|
+
EDQUOT = 132,
|
|
178
|
+
ESTALE = 133,
|
|
179
|
+
ENOTSUP = 134,
|
|
180
|
+
ENOMEDIUM = 135,
|
|
181
|
+
ENOSHARE = 136,
|
|
182
|
+
ECASECLASH = 137,
|
|
183
|
+
EILSEQ = 138,
|
|
184
|
+
EOVERFLOW = 139
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export declare function execLazyError(cmd: string, args: string[], spawnOptions?: Omit<Options, 'reject' | 'stdio' | 'encoding' | 'all' | 'stderr'> & ISpawnAdditionOptions): Promise<ExecaReturnValue<string>>;
|
|
188
|
+
|
|
189
|
+
export declare function exists(path: string): Promise<boolean>;
|
|
190
|
+
|
|
191
|
+
export declare function existsSync(path: string): boolean;
|
|
192
|
+
|
|
193
|
+
export declare class ExitError extends Error {
|
|
194
|
+
readonly code: number;
|
|
195
|
+
constructor(message: string, code?: number);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export declare function findBinary(what: string, pathvar?: PathArray, cwd?: string): string;
|
|
199
|
+
|
|
200
|
+
export declare function findPackageRoot(packageName: string, require?: NodeRequire): string;
|
|
201
|
+
|
|
202
|
+
export declare function findUpUntil(from: string, file: string): Promise<string | null>;
|
|
203
|
+
|
|
204
|
+
export declare function findUpUntilSync(from: string, file: string): string | null;
|
|
205
|
+
|
|
206
|
+
export declare function getAllPathUpToRoot(from: string, append?: string): string[];
|
|
207
|
+
|
|
208
|
+
export declare function getEnvironment(name: string, env?: NodeJS.ProcessEnv): IEnvironmentResult;
|
|
209
|
+
|
|
210
|
+
export declare function getNpmConfigValue(field: string): Promise<string>;
|
|
211
|
+
|
|
212
|
+
export declare class HexDumpLoggerStream extends Transform {
|
|
213
|
+
private readonly logFn;
|
|
214
|
+
private readonly prefix;
|
|
215
|
+
constructor(logFn: LogFunction, prefix?: string);
|
|
216
|
+
_transform(chunk: Buffer, encoding: BufferEncoding, callback: Function): void;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
declare interface IChildProcessStatus {
|
|
220
|
+
signal?: NodeJS.Signals | string | null;
|
|
221
|
+
status?: number | null;
|
|
222
|
+
error?: Error;
|
|
223
|
+
signalCode?: NodeJS.Signals | string | null;
|
|
224
|
+
exitCode?: number | null;
|
|
225
|
+
signalDescription?: string;
|
|
226
|
+
command?: string;
|
|
227
|
+
killed?: boolean;
|
|
228
|
+
failed?: boolean;
|
|
229
|
+
timedOut?: boolean;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export declare interface ICommand {
|
|
233
|
+
exec: string[];
|
|
234
|
+
addonPath?: string[];
|
|
235
|
+
cwd?: string;
|
|
236
|
+
sync?: boolean;
|
|
237
|
+
env?: ProcessEnv;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export declare interface IEnvironmentResult {
|
|
241
|
+
value: string | undefined;
|
|
242
|
+
name: string;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export declare interface ISpawnAdditionOptions {
|
|
246
|
+
verbose?: boolean;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export declare interface JoinPathFunction {
|
|
250
|
+
(from: string, to: string): string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export declare type LogFunction = (message: string, ...args: any[]) => void;
|
|
254
|
+
|
|
255
|
+
export declare class LoggerStream extends Transform {
|
|
256
|
+
private readonly logFn;
|
|
257
|
+
private readonly prefix;
|
|
258
|
+
constructor(logFn: LogFunction, prefix?: string);
|
|
259
|
+
_transform(chunk: Buffer, encoding: BufferEncoding, callback: Function): void;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export declare function lrelative(from: string, to: string): string;
|
|
263
|
+
|
|
264
|
+
export declare function md5(data: Buffer): string;
|
|
265
|
+
|
|
266
|
+
export declare function nodeResolvePathArray(from: string, file?: string): string[];
|
|
267
|
+
|
|
268
|
+
export declare const normalizePath: NormalizePathFunction;
|
|
269
|
+
|
|
270
|
+
export declare interface NormalizePathFunction {
|
|
271
|
+
(path: string): string;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export declare function osTempDir(name?: string): string;
|
|
275
|
+
|
|
276
|
+
export declare const PATH_SEPARATOR: string;
|
|
277
|
+
|
|
278
|
+
export declare class PathEnvironment extends PathArray {
|
|
279
|
+
private readonly name;
|
|
280
|
+
private readonly env;
|
|
281
|
+
constructor(varName?: string, env?: NodeJS.ProcessEnv);
|
|
282
|
+
add(p: string): this;
|
|
283
|
+
clear(): void;
|
|
284
|
+
delete(p: string): boolean;
|
|
285
|
+
save(): void;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export declare function prettyFormatError(e: Error): string;
|
|
289
|
+
|
|
290
|
+
export declare function prettyPrintError(type: string, e: Error): void;
|
|
291
|
+
|
|
292
|
+
export declare function printLine(char?: string): void;
|
|
293
|
+
|
|
294
|
+
declare type ProcessEnv = Record<string, string> & {
|
|
295
|
+
Path?: never;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
export declare class RawCollectingStream extends Writable {
|
|
299
|
+
private buffer?;
|
|
300
|
+
private _promise?;
|
|
301
|
+
constructor(sourceStream?: NodeJS.ReadableStream);
|
|
302
|
+
_write(chunk: Buffer, _encoding: string, callback: (error?: Error | null) => void): void;
|
|
303
|
+
getOutput(): Buffer;
|
|
304
|
+
promise(): Promise<Buffer>;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export declare const relativePath: JoinPathFunction;
|
|
308
|
+
|
|
309
|
+
export declare const resolvePath: ResolvePathFunction;
|
|
310
|
+
|
|
311
|
+
export declare interface ResolvePathFunction {
|
|
312
|
+
(...pathSegments: string[]): string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Self restart in a pid/cgroup namespace on linux.
|
|
317
|
+
* Your application must inside mainFunc, not before or after it.
|
|
318
|
+
*
|
|
319
|
+
* ```typescript
|
|
320
|
+
* import {respawnInScope} from '@idlebox/node'
|
|
321
|
+
* respawnInScope(() => {
|
|
322
|
+
* import('./real-application');
|
|
323
|
+
* });
|
|
324
|
+
* ```
|
|
325
|
+
*/
|
|
326
|
+
export declare function respawnInScope(mainFunc: Function): unknown | never;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* should do this before:
|
|
330
|
+
* ```
|
|
331
|
+
* setErrorLogRoot(require('path').dirname(__dirname));
|
|
332
|
+
* ```
|
|
333
|
+
**/
|
|
334
|
+
export declare function runMain(main: AsyncMainFunction): void;
|
|
335
|
+
|
|
336
|
+
export declare function setErrorLogRoot(_root: string): void;
|
|
337
|
+
|
|
338
|
+
export declare function sha256(data: Buffer): string;
|
|
339
|
+
|
|
340
|
+
export declare function spawnGetEverything({ exec, cwd, env, addonPath }: ICommand): Promise<string | undefined>;
|
|
341
|
+
|
|
342
|
+
export declare function spawnGetOutput(opt: ICommand & Sync): string;
|
|
343
|
+
|
|
344
|
+
export declare function spawnGetOutput(opt: ICommand & Async): Promise<string>;
|
|
345
|
+
|
|
346
|
+
export declare function spawnRecreateEventHandlers(): void;
|
|
347
|
+
|
|
348
|
+
export declare function spawnWithoutOutput(opt: ICommand & Sync): void;
|
|
349
|
+
|
|
350
|
+
export declare function spawnWithoutOutput(opt: ICommand & Async): Promise<void>;
|
|
351
|
+
|
|
352
|
+
export declare function streamHasEnd(S: NodeJS.ReadableStream | NodeJS.WritableStream): any;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* wait read/write stream end/close, as promise
|
|
356
|
+
* reject when stream emit error
|
|
357
|
+
*/
|
|
358
|
+
export declare function streamPromise(stream: NodeJS.ReadableStream | NodeJS.WritableStream): Promise<void>;
|
|
359
|
+
|
|
360
|
+
export declare function streamToBuffer(stream: NodeJS.ReadableStream, raw: false): Promise<string>;
|
|
361
|
+
|
|
362
|
+
export declare function streamToBuffer(stream: NodeJS.ReadableStream, raw: true): Promise<Buffer>;
|
|
363
|
+
|
|
364
|
+
export declare interface Sync {
|
|
365
|
+
sync: true;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
declare interface TerminalConsoleOptions {
|
|
369
|
+
color?: boolean | Partial<typeof colorMap>;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Spawn a command, replace current node process
|
|
374
|
+
* If can't do that (eg. on Windows), spawn as normal, but quit self after it quit.
|
|
375
|
+
*/
|
|
376
|
+
export declare function trySpawnInScope(cmds: string[]): never;
|
|
377
|
+
|
|
378
|
+
export declare class WrappedTerminalConsole extends WrappedConsole {
|
|
379
|
+
private readonly colors;
|
|
380
|
+
constructor(title: string, { color, ...opt }?: WrappedConsoleOptions & TerminalConsoleOptions);
|
|
381
|
+
protected processColorLabel(msg: any[], pos: number, level: string, prefix: string): void;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export declare function writeFileIfChange(file: string, data: string | Buffer): Promise<boolean>;
|
|
385
|
+
|
|
386
|
+
export declare function writeFileIfChangeSync(file: string, data: string | Buffer): boolean;
|
|
387
|
+
|
|
388
|
+
export { }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PathEnvironment = exports.PATH_SEPARATOR = void 0;
|
|
4
|
-
const common_1 = require("@idlebox/common");
|
|
5
4
|
const os_1 = require("os");
|
|
5
|
+
const common_1 = require("@idlebox/common");
|
|
6
6
|
const getEnvironment_1 = require("./getEnvironment.cjs");
|
|
7
7
|
exports.PATH_SEPARATOR = (0, os_1.platform)() === 'win32' ? ';' : ':';
|
|
8
8
|
class PathEnvironment extends common_1.PathArray {
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
"../../../src/environment/pathEnvironment.ts"
|
|
7
7
|
],
|
|
8
8
|
"names": [],
|
|
9
|
-
"mappings": ";;;AAAA,4CAA4C;AAC5C,
|
|
9
|
+
"mappings": ";;;AAAA,2BAA8B;AAC9B,4CAA4C;AAC5C,yDAAsE;AAEzD,QAAA,cAAc,GAAG,IAAA,aAAQ,GAAE,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AACjE,MAAa,eAAgB,SAAQ,kBAAS;IAC5B,IAAI,CAAS;IACb,GAAG,CAAoB;IAExC,YAAY,OAAO,GAAG,IAAA,aAAQ,GAAE,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,MAAyB,OAAO,CAAC,GAAG;QACnG,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAA,+BAAc,EAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACrD,KAAK,CAAC,EAAE,EAAE,sBAAc,CAAC,CAAC;QAE1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QAEf,IAAI,KAAK;YAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAA,mCAAkB,EAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAEQ,GAAG,CAAC,CAAS;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC;QACxB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACb,IAAI,KAAK,KAAK,IAAI,CAAC,IAAI,EAAE;YACxB,IAAI,CAAC,IAAI,EAAE,CAAC;SACZ;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IACQ,KAAK;QACb,MAAM,MAAM,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;YACZ,GAAG,IAAI,EAAE,CAAC;YAEV,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC;iBAC9C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;iBAC9C,IAAI,CAAC,GAAG,CAAC,CAAC;YACZ,GAAG,IAAI,EAAE,CAAC;YAEV,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;SACvC;QAED,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3B,QAAQ,EAAE,CAAC;IACZ,CAAC;CACD;AA3BD,kDA2BC"
|
|
10
10
|
}
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
|
|
3
|
+
import { EventEmitter } from 'events';
|
|
4
|
+
import { ExecaReturnValue } from 'execa';
|
|
5
|
+
import { IDisposable } from '@idlebox/common';
|
|
6
|
+
import { Options } from 'execa';
|
|
7
|
+
import { PathArray } from '@idlebox/common';
|
|
8
|
+
import { Readable } from 'stream';
|
|
9
|
+
import { Transform } from 'stream';
|
|
10
|
+
import { WrappedConsole } from '@idlebox/common';
|
|
11
|
+
import { WrappedConsoleOptions } from '@idlebox/common';
|
|
12
|
+
import { Writable } from 'stream';
|
|
13
|
+
|
|
14
|
+
export declare interface Async {
|
|
15
|
+
sync?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare type AsyncMainFunction = () => Promise<void | number>;
|
|
19
|
+
|
|
20
|
+
export declare class BlackHoleStream extends Writable {
|
|
21
|
+
_write(_chunk: Buffer, _encoding: string, callback: (error?: Error | null) => void): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** @throws */
|
|
25
|
+
export declare function checkChildProcessResult(result: IChildProcessStatus): void;
|
|
26
|
+
|
|
27
|
+
export declare function cleanupEnvironment(name: string, env?: NodeJS.ProcessEnv): void;
|
|
28
|
+
|
|
29
|
+
export declare class CollectingStream extends Writable {
|
|
30
|
+
private buffer?;
|
|
31
|
+
private _promise?;
|
|
32
|
+
constructor(sourceStream?: NodeJS.ReadableStream);
|
|
33
|
+
_write(chunk: Buffer, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
34
|
+
getOutput(): string;
|
|
35
|
+
promise(): Promise<string>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare const colorMap: {
|
|
39
|
+
info: string;
|
|
40
|
+
success: string;
|
|
41
|
+
debug: string;
|
|
42
|
+
error: string;
|
|
43
|
+
trace: string;
|
|
44
|
+
warn: string;
|
|
45
|
+
assert: string;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export declare function commandInPath(cmd: string, alterExt?: string[]): Promise<string | undefined>;
|
|
49
|
+
|
|
50
|
+
export declare function commmandInPathSync(cmd: string, alterExt?: string[]): string | undefined;
|
|
51
|
+
|
|
52
|
+
export declare function createTempFolder(fullPath: string): IDisposable;
|
|
53
|
+
|
|
54
|
+
export declare function deleteEnvironment(name: string, env?: NodeJS.ProcessEnv): void;
|
|
55
|
+
|
|
56
|
+
export declare function disposableStream<T extends Writable | Readable>(stream: T): T & IDisposable;
|
|
57
|
+
|
|
58
|
+
export declare function drainStream(stream: NodeJS.ReadableStream, size: number, start?: number, extra?: number): Promise<Buffer>;
|
|
59
|
+
|
|
60
|
+
export declare function dumpEventEmitterEmit(ev: EventEmitter): void;
|
|
61
|
+
|
|
62
|
+
export declare enum ERRNO_LINUX {
|
|
63
|
+
EPERM = 1,
|
|
64
|
+
ENOENT = 2,
|
|
65
|
+
ESRCH = 3,
|
|
66
|
+
EINTR = 4,
|
|
67
|
+
EIO = 5,
|
|
68
|
+
ENXIO = 6,
|
|
69
|
+
E2BIG = 7,
|
|
70
|
+
ENOEXEC = 8,
|
|
71
|
+
EBADF = 9,
|
|
72
|
+
ECHILD = 10,
|
|
73
|
+
EAGAIN = 11,
|
|
74
|
+
ENOMEM = 12,
|
|
75
|
+
EACCES = 13,
|
|
76
|
+
EFAULT = 14,
|
|
77
|
+
ENOTBLK = 15,
|
|
78
|
+
EBUSY = 16,
|
|
79
|
+
EEXIST = 17,
|
|
80
|
+
EXDEV = 18,
|
|
81
|
+
ENODEV = 19,
|
|
82
|
+
ENOTDIR = 20,
|
|
83
|
+
EISDIR = 21,
|
|
84
|
+
EINVAL = 22,
|
|
85
|
+
ENFILE = 23,
|
|
86
|
+
EMFILE = 24,
|
|
87
|
+
ENOTTY = 25,
|
|
88
|
+
ETXTBSY = 26,
|
|
89
|
+
EFBIG = 27,
|
|
90
|
+
ENOSPC = 28,
|
|
91
|
+
ESPIPE = 29,
|
|
92
|
+
EROFS = 30,
|
|
93
|
+
EMLINK = 31,
|
|
94
|
+
EPIPE = 32,
|
|
95
|
+
EDOM = 33,
|
|
96
|
+
ERANGE = 34,
|
|
97
|
+
ENOMSG = 35,
|
|
98
|
+
EIDRM = 36,
|
|
99
|
+
ECHRNG = 37,
|
|
100
|
+
EL2NSYNC = 38,
|
|
101
|
+
EL3HLT = 39,
|
|
102
|
+
EL3RST = 40,
|
|
103
|
+
ELNRNG = 41,
|
|
104
|
+
EUNATCH = 42,
|
|
105
|
+
ENOCSI = 43,
|
|
106
|
+
EL2HLT = 44,
|
|
107
|
+
EDEADLK = 45,
|
|
108
|
+
ENOLCK = 46,
|
|
109
|
+
EBADE = 50,
|
|
110
|
+
EBADR = 51,
|
|
111
|
+
EXFULL = 52,
|
|
112
|
+
ENOANO = 53,
|
|
113
|
+
EBADRQC = 54,
|
|
114
|
+
EBADSLT = 55,
|
|
115
|
+
EDEADLOCK = 56,
|
|
116
|
+
EBFONT = 57,
|
|
117
|
+
ENOSTR = 60,
|
|
118
|
+
ENODATA = 61,
|
|
119
|
+
ETIME = 62,
|
|
120
|
+
ENOSR = 63,
|
|
121
|
+
ENONET = 64,
|
|
122
|
+
ENOPKG = 65,
|
|
123
|
+
EREMOTE = 66,
|
|
124
|
+
ENOLINK = 67,
|
|
125
|
+
EADV = 68,
|
|
126
|
+
ESRMNT = 69,
|
|
127
|
+
ECOMM = 70,
|
|
128
|
+
EPROTO = 71,
|
|
129
|
+
EMULTIHOP = 74,
|
|
130
|
+
ELBIN = 75,
|
|
131
|
+
EDOTDOT = 76,
|
|
132
|
+
EBADMSG = 77,
|
|
133
|
+
EFTYPE = 79,
|
|
134
|
+
ENOTUNIQ = 80,
|
|
135
|
+
EBADFD = 81,
|
|
136
|
+
EREMCHG = 82,
|
|
137
|
+
ELIBACC = 83,
|
|
138
|
+
ELIBBAD = 84,
|
|
139
|
+
ELIBSCN = 85,
|
|
140
|
+
ELIBMAX = 86,
|
|
141
|
+
ELIBEXEC = 87,
|
|
142
|
+
ENOSYS = 88,
|
|
143
|
+
ENMFILE = 89,
|
|
144
|
+
ENOTEMPTY = 90,
|
|
145
|
+
ENAMETOOLONG = 91,
|
|
146
|
+
ELOOP = 92,
|
|
147
|
+
EOPNOTSUPP = 95,
|
|
148
|
+
EPFNOSUPPORT = 96,
|
|
149
|
+
ECONNRESET = 104,
|
|
150
|
+
ENOBUFS = 105,
|
|
151
|
+
EAFNOSUPPORT = 106,
|
|
152
|
+
EPROTOTYPE = 107,
|
|
153
|
+
ENOTSOCK = 108,
|
|
154
|
+
ENOPROTOOPT = 109,
|
|
155
|
+
ESHUTDOWN = 110,
|
|
156
|
+
ECONNREFUSED = 111,
|
|
157
|
+
EADDRINUSE = 112,
|
|
158
|
+
ECONNABORTED = 113,
|
|
159
|
+
ENETUNREACH = 114,
|
|
160
|
+
ENETDOWN = 115,
|
|
161
|
+
ETIMEDOUT = 116,
|
|
162
|
+
EHOSTDOWN = 117,
|
|
163
|
+
EHOSTUNREACH = 118,
|
|
164
|
+
EINPROGRESS = 119,
|
|
165
|
+
EALREADY = 120,
|
|
166
|
+
EDESTADDRREQ = 121,
|
|
167
|
+
EMSGSIZE = 122,
|
|
168
|
+
EPROTONOSUPPORT = 123,
|
|
169
|
+
ESOCKTNOSUPPORT = 124,
|
|
170
|
+
EADDRNOTAVAIL = 125,
|
|
171
|
+
ENETRESET = 126,
|
|
172
|
+
EISCONN = 127,
|
|
173
|
+
ENOTCONN = 128,
|
|
174
|
+
ETOOMANYREFS = 129,
|
|
175
|
+
EPROCLIM = 130,
|
|
176
|
+
EUSERS = 131,
|
|
177
|
+
EDQUOT = 132,
|
|
178
|
+
ESTALE = 133,
|
|
179
|
+
ENOTSUP = 134,
|
|
180
|
+
ENOMEDIUM = 135,
|
|
181
|
+
ENOSHARE = 136,
|
|
182
|
+
ECASECLASH = 137,
|
|
183
|
+
EILSEQ = 138,
|
|
184
|
+
EOVERFLOW = 139
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export declare function execLazyError(cmd: string, args: string[], spawnOptions?: Omit<Options, 'reject' | 'stdio' | 'encoding' | 'all' | 'stderr'> & ISpawnAdditionOptions): Promise<ExecaReturnValue<string>>;
|
|
188
|
+
|
|
189
|
+
export declare function exists(path: string): Promise<boolean>;
|
|
190
|
+
|
|
191
|
+
export declare function existsSync(path: string): boolean;
|
|
192
|
+
|
|
193
|
+
export declare class ExitError extends Error {
|
|
194
|
+
readonly code: number;
|
|
195
|
+
constructor(message: string, code?: number);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export declare function findBinary(what: string, pathvar?: PathArray, cwd?: string): string;
|
|
199
|
+
|
|
200
|
+
export declare function findPackageRoot(packageName: string, require?: NodeRequire): string;
|
|
201
|
+
|
|
202
|
+
export declare function findUpUntil(from: string, file: string): Promise<string | null>;
|
|
203
|
+
|
|
204
|
+
export declare function findUpUntilSync(from: string, file: string): string | null;
|
|
205
|
+
|
|
206
|
+
export declare function getAllPathUpToRoot(from: string, append?: string): string[];
|
|
207
|
+
|
|
208
|
+
export declare function getEnvironment(name: string, env?: NodeJS.ProcessEnv): IEnvironmentResult;
|
|
209
|
+
|
|
210
|
+
export declare function getNpmConfigValue(field: string): Promise<string>;
|
|
211
|
+
|
|
212
|
+
export declare class HexDumpLoggerStream extends Transform {
|
|
213
|
+
private readonly logFn;
|
|
214
|
+
private readonly prefix;
|
|
215
|
+
constructor(logFn: LogFunction, prefix?: string);
|
|
216
|
+
_transform(chunk: Buffer, encoding: BufferEncoding, callback: Function): void;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
declare interface IChildProcessStatus {
|
|
220
|
+
signal?: NodeJS.Signals | string | null;
|
|
221
|
+
status?: number | null;
|
|
222
|
+
error?: Error;
|
|
223
|
+
signalCode?: NodeJS.Signals | string | null;
|
|
224
|
+
exitCode?: number | null;
|
|
225
|
+
signalDescription?: string;
|
|
226
|
+
command?: string;
|
|
227
|
+
killed?: boolean;
|
|
228
|
+
failed?: boolean;
|
|
229
|
+
timedOut?: boolean;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export declare interface ICommand {
|
|
233
|
+
exec: string[];
|
|
234
|
+
addonPath?: string[];
|
|
235
|
+
cwd?: string;
|
|
236
|
+
sync?: boolean;
|
|
237
|
+
env?: ProcessEnv;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export declare interface IEnvironmentResult {
|
|
241
|
+
value: string | undefined;
|
|
242
|
+
name: string;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export declare interface ISpawnAdditionOptions {
|
|
246
|
+
verbose?: boolean;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export declare interface JoinPathFunction {
|
|
250
|
+
(from: string, to: string): string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export declare type LogFunction = (message: string, ...args: any[]) => void;
|
|
254
|
+
|
|
255
|
+
export declare class LoggerStream extends Transform {
|
|
256
|
+
private readonly logFn;
|
|
257
|
+
private readonly prefix;
|
|
258
|
+
constructor(logFn: LogFunction, prefix?: string);
|
|
259
|
+
_transform(chunk: Buffer, encoding: BufferEncoding, callback: Function): void;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export declare function lrelative(from: string, to: string): string;
|
|
263
|
+
|
|
264
|
+
export declare function md5(data: Buffer): string;
|
|
265
|
+
|
|
266
|
+
export declare function nodeResolvePathArray(from: string, file?: string): string[];
|
|
267
|
+
|
|
268
|
+
export declare const normalizePath: NormalizePathFunction;
|
|
269
|
+
|
|
270
|
+
export declare interface NormalizePathFunction {
|
|
271
|
+
(path: string): string;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export declare function osTempDir(name?: string): string;
|
|
275
|
+
|
|
276
|
+
export declare const PATH_SEPARATOR: string;
|
|
277
|
+
|
|
278
|
+
export declare class PathEnvironment extends PathArray {
|
|
279
|
+
private readonly name;
|
|
280
|
+
private readonly env;
|
|
281
|
+
constructor(varName?: string, env?: NodeJS.ProcessEnv);
|
|
282
|
+
add(p: string): this;
|
|
283
|
+
clear(): void;
|
|
284
|
+
delete(p: string): boolean;
|
|
285
|
+
save(): void;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export declare function prettyFormatError(e: Error): string;
|
|
289
|
+
|
|
290
|
+
export declare function prettyPrintError(type: string, e: Error): void;
|
|
291
|
+
|
|
292
|
+
export declare function printLine(char?: string): void;
|
|
293
|
+
|
|
294
|
+
declare type ProcessEnv = Record<string, string> & {
|
|
295
|
+
Path?: never;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
export declare class RawCollectingStream extends Writable {
|
|
299
|
+
private buffer?;
|
|
300
|
+
private _promise?;
|
|
301
|
+
constructor(sourceStream?: NodeJS.ReadableStream);
|
|
302
|
+
_write(chunk: Buffer, _encoding: string, callback: (error?: Error | null) => void): void;
|
|
303
|
+
getOutput(): Buffer;
|
|
304
|
+
promise(): Promise<Buffer>;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export declare const relativePath: JoinPathFunction;
|
|
308
|
+
|
|
309
|
+
export declare const resolvePath: ResolvePathFunction;
|
|
310
|
+
|
|
311
|
+
export declare interface ResolvePathFunction {
|
|
312
|
+
(...pathSegments: string[]): string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Self restart in a pid/cgroup namespace on linux.
|
|
317
|
+
* Your application must inside mainFunc, not before or after it.
|
|
318
|
+
*
|
|
319
|
+
* ```typescript
|
|
320
|
+
* import {respawnInScope} from '@idlebox/node'
|
|
321
|
+
* respawnInScope(() => {
|
|
322
|
+
* import('./real-application');
|
|
323
|
+
* });
|
|
324
|
+
* ```
|
|
325
|
+
*/
|
|
326
|
+
export declare function respawnInScope(mainFunc: Function): unknown | never;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* should do this before:
|
|
330
|
+
* ```
|
|
331
|
+
* setErrorLogRoot(require('path').dirname(__dirname));
|
|
332
|
+
* ```
|
|
333
|
+
**/
|
|
334
|
+
export declare function runMain(main: AsyncMainFunction): void;
|
|
335
|
+
|
|
336
|
+
export declare function setErrorLogRoot(_root: string): void;
|
|
337
|
+
|
|
338
|
+
export declare function sha256(data: Buffer): string;
|
|
339
|
+
|
|
340
|
+
export declare function spawnGetEverything({ exec, cwd, env, addonPath }: ICommand): Promise<string | undefined>;
|
|
341
|
+
|
|
342
|
+
export declare function spawnGetOutput(opt: ICommand & Sync): string;
|
|
343
|
+
|
|
344
|
+
export declare function spawnGetOutput(opt: ICommand & Async): Promise<string>;
|
|
345
|
+
|
|
346
|
+
export declare function spawnRecreateEventHandlers(): void;
|
|
347
|
+
|
|
348
|
+
export declare function spawnWithoutOutput(opt: ICommand & Sync): void;
|
|
349
|
+
|
|
350
|
+
export declare function spawnWithoutOutput(opt: ICommand & Async): Promise<void>;
|
|
351
|
+
|
|
352
|
+
export declare function streamHasEnd(S: NodeJS.ReadableStream | NodeJS.WritableStream): any;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* wait read/write stream end/close, as promise
|
|
356
|
+
* reject when stream emit error
|
|
357
|
+
*/
|
|
358
|
+
export declare function streamPromise(stream: NodeJS.ReadableStream | NodeJS.WritableStream): Promise<void>;
|
|
359
|
+
|
|
360
|
+
export declare function streamToBuffer(stream: NodeJS.ReadableStream, raw: false): Promise<string>;
|
|
361
|
+
|
|
362
|
+
export declare function streamToBuffer(stream: NodeJS.ReadableStream, raw: true): Promise<Buffer>;
|
|
363
|
+
|
|
364
|
+
export declare interface Sync {
|
|
365
|
+
sync: true;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
declare interface TerminalConsoleOptions {
|
|
369
|
+
color?: boolean | Partial<typeof colorMap>;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Spawn a command, replace current node process
|
|
374
|
+
* If can't do that (eg. on Windows), spawn as normal, but quit self after it quit.
|
|
375
|
+
*/
|
|
376
|
+
export declare function trySpawnInScope(cmds: string[]): never;
|
|
377
|
+
|
|
378
|
+
export declare class WrappedTerminalConsole extends WrappedConsole {
|
|
379
|
+
private readonly colors;
|
|
380
|
+
constructor(title: string, { color, ...opt }?: WrappedConsoleOptions & TerminalConsoleOptions);
|
|
381
|
+
protected processColorLabel(msg: any[], pos: number, level: string, prefix: string): void;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export declare function writeFileIfChange(file: string, data: string | Buffer): Promise<boolean>;
|
|
385
|
+
|
|
386
|
+
export declare function writeFileIfChangeSync(file: string, data: string | Buffer): boolean;
|
|
387
|
+
|
|
388
|
+
export { }
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// DO NOT EDIT THIS FILE
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
export { resolvePath } from "./path-resolve/resolvePath.mjs";
|
|
5
|
+
export { normalizePath } from "./path-resolve/resolvePath.mjs";
|
|
6
|
+
export { osTempDir } from "./path-resolve/resolvePath.mjs";
|
|
7
|
+
export { relativePath } from "./path-resolve/resolvePath.mjs";
|
|
8
|
+
/* error/pretty.ts */
|
|
9
|
+
// Identifiers
|
|
10
|
+
export { setErrorLogRoot } from "./error/pretty.mjs";
|
|
11
|
+
export { prettyPrintError } from "./error/pretty.mjs";
|
|
12
|
+
export { prettyFormatError } from "./error/pretty.mjs";
|
|
13
|
+
export { ExitError } from "./asyncLoad.mjs";
|
|
14
|
+
export { runMain } from "./asyncLoad.mjs";
|
|
15
|
+
/* child_process/error.ts */
|
|
16
|
+
// Identifiers
|
|
17
|
+
export { checkChildProcessResult } from "./child_process/error.mjs";
|
|
18
|
+
export { spawnWithoutOutput } from "./child_process/execa.mjs";
|
|
19
|
+
export { spawnGetOutput } from "./child_process/execa.mjs";
|
|
20
|
+
export { spawnGetEverything } from "./child_process/execa.mjs";
|
|
21
|
+
/* cli-io/output.ts */
|
|
22
|
+
// Identifiers
|
|
23
|
+
export { printLine } from "./cli-io/output.mjs";
|
|
24
|
+
export { execLazyError } from "./child_process/lateError.mjs";
|
|
25
|
+
/* fs/exists.ts */
|
|
26
|
+
// Identifiers
|
|
27
|
+
export { existsSync } from "./fs/exists.mjs";
|
|
28
|
+
export { exists } from "./fs/exists.mjs";
|
|
29
|
+
export { getEnvironment } from "./environment/getEnvironment.mjs";
|
|
30
|
+
export { deleteEnvironment } from "./environment/getEnvironment.mjs";
|
|
31
|
+
export { cleanupEnvironment } from "./environment/getEnvironment.mjs";
|
|
32
|
+
/* environment/pathEnvironment.ts */
|
|
33
|
+
// Identifiers
|
|
34
|
+
export { PATH_SEPARATOR } from "./environment/pathEnvironment.mjs";
|
|
35
|
+
export { PathEnvironment } from "./environment/pathEnvironment.mjs";
|
|
36
|
+
/* environment/findBinary.ts */
|
|
37
|
+
// Identifiers
|
|
38
|
+
export { findBinary } from "./environment/findBinary.mjs";
|
|
39
|
+
/* child_process/respawn.ts */
|
|
40
|
+
// Identifiers
|
|
41
|
+
export { spawnRecreateEventHandlers } from "./child_process/respawn.mjs";
|
|
42
|
+
export { trySpawnInScope } from "./child_process/respawn.mjs";
|
|
43
|
+
export { respawnInScope } from "./child_process/respawn.mjs";
|
|
44
|
+
/* crypto/md5.ts */
|
|
45
|
+
// Identifiers
|
|
46
|
+
export { md5 } from "./crypto/md5.mjs";
|
|
47
|
+
/* crypto/sha256.ts */
|
|
48
|
+
// Identifiers
|
|
49
|
+
export { sha256 } from "./crypto/sha256.mjs";
|
|
50
|
+
/* environment/npmConfig.ts */
|
|
51
|
+
// Identifiers
|
|
52
|
+
export { getNpmConfigValue } from "./environment/npmConfig.mjs";
|
|
53
|
+
/* error/code.ts */
|
|
54
|
+
// Identifiers
|
|
55
|
+
export { ERRNO_LINUX } from "./error/code.mjs";
|
|
56
|
+
/* events/dumpEventEmitter.ts */
|
|
57
|
+
// Identifiers
|
|
58
|
+
export { dumpEventEmitterEmit } from "./events/dumpEventEmitter.mjs";
|
|
59
|
+
/* fs/commandExists.ts */
|
|
60
|
+
// Identifiers
|
|
61
|
+
export { commandInPath } from "./fs/commandExists.mjs";
|
|
62
|
+
export { commmandInPathSync } from "./fs/commandExists.mjs";
|
|
63
|
+
/* fs/tempFolder.ts */
|
|
64
|
+
// Identifiers
|
|
65
|
+
export { createTempFolder } from "./fs/tempFolder.mjs";
|
|
66
|
+
/* fs/weiteChanged.ts */
|
|
67
|
+
// Identifiers
|
|
68
|
+
export { writeFileIfChangeSync } from "./fs/weiteChanged.mjs";
|
|
69
|
+
export { writeFileIfChange } from "./fs/weiteChanged.mjs";
|
|
70
|
+
/* log/terminal.ts */
|
|
71
|
+
// Identifiers
|
|
72
|
+
export { WrappedTerminalConsole } from "./log/terminal.mjs";
|
|
73
|
+
/* path-resolve/findUp.ts */
|
|
74
|
+
// Identifiers
|
|
75
|
+
export { findUpUntil } from "./path-resolve/findUp.mjs";
|
|
76
|
+
export { findUpUntilSync } from "./path-resolve/findUp.mjs";
|
|
77
|
+
/* path-resolve/findPackageRoot.ts */
|
|
78
|
+
// Identifiers
|
|
79
|
+
export { findPackageRoot } from "./path-resolve/findPackageRoot.mjs";
|
|
80
|
+
/* path-resolve/getAllUp.ts */
|
|
81
|
+
// Identifiers
|
|
82
|
+
export { getAllPathUpToRoot } from "./path-resolve/getAllUp.mjs";
|
|
83
|
+
/* path-resolve/lrelative.ts */
|
|
84
|
+
// Identifiers
|
|
85
|
+
export { lrelative } from "./path-resolve/lrelative.mjs";
|
|
86
|
+
/* path-resolve/nodeResolvePathArray.ts */
|
|
87
|
+
// Identifiers
|
|
88
|
+
export { nodeResolvePathArray } from "./path-resolve/nodeResolvePathArray.mjs";
|
|
89
|
+
/* stream/blackHoleStream.ts */
|
|
90
|
+
// Identifiers
|
|
91
|
+
export { BlackHoleStream } from "./stream/blackHoleStream.mjs";
|
|
92
|
+
/* stream/streamPromise.ts */
|
|
93
|
+
// Identifiers
|
|
94
|
+
export { streamPromise } from "./stream/streamPromise.mjs";
|
|
95
|
+
export { streamHasEnd } from "./stream/streamPromise.mjs";
|
|
96
|
+
/* stream/collectingStream.ts */
|
|
97
|
+
// Identifiers
|
|
98
|
+
export { streamToBuffer } from "./stream/collectingStream.mjs";
|
|
99
|
+
export { RawCollectingStream } from "./stream/collectingStream.mjs";
|
|
100
|
+
export { CollectingStream } from "./stream/collectingStream.mjs";
|
|
101
|
+
/* stream/disposableStream.ts */
|
|
102
|
+
// Identifiers
|
|
103
|
+
export { disposableStream } from "./stream/disposableStream.mjs";
|
|
104
|
+
/* stream/drainStream.ts */
|
|
105
|
+
// Identifiers
|
|
106
|
+
export { drainStream } from "./stream/drainStream.mjs";
|
|
107
|
+
export { LoggerStream } from "./stream/loggerStream.mjs";
|
|
108
|
+
export { HexDumpLoggerStream } from "./stream/loggerStream.mjs";
|
|
109
|
+
//# sourceMappingURL=__create_index.generated.mjs.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"file": "__create_index.generated.mjs",
|
|
4
|
+
"sourceRoot": "",
|
|
5
|
+
"sources": [
|
|
6
|
+
"../../src/__create_index.generated.ts"
|
|
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AAa,EAAC,mCAAkC;AACxD,OAAO,EAAC,YAAY,EAAC,mCAAkC;AACxD,gCAAgC;AAC/B,cAAc;AACd,OAAO,EAAC,cAAc,EAAC,sCAAqC;AAC5D,OAAO,EAAC,mBAAmB,EAAC,sCAAqC;AACjE,OAAO,EAAC,gBAAgB,EAAC,sCAAqC;AAC/D,gCAAgC;AAC/B,cAAc;AACd,OAAO,EAAC,gBAAgB,EAAC,sCAAqC;AAC/D,2BAA2B;AAC1B,cAAc;AACd,OAAO,EAAC,WAAW,EAAC,iCAAgC;AAIpD,OAAO,EAAC,YAAY,EAAC,kCAAiC;AACtD,OAAO,EAAC,mBAAmB,EAAC,kCAAiC"
|
|
10
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PathArray } from '@idlebox/common';
|
|
2
1
|
import { platform } from 'os';
|
|
2
|
+
import { PathArray } from '@idlebox/common';
|
|
3
3
|
import { cleanupEnvironment, getEnvironment } from "./getEnvironment.mjs";
|
|
4
4
|
export const PATH_SEPARATOR = platform() === 'win32' ? ';' : ':';
|
|
5
5
|
export class PathEnvironment extends PathArray {
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
"../../../src/environment/pathEnvironment.ts"
|
|
7
7
|
],
|
|
8
8
|
"names": [],
|
|
9
|
-
"mappings": "AAAA,OAAO,EAAE,
|
|
9
|
+
"mappings": "AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,6BAAyB;AAEtE,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AACjE,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5B,IAAI,CAAS;IACb,GAAG,CAAoB;IAExC,YAAY,OAAO,GAAG,QAAQ,EAAE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V,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;SACvC;QAED,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3B,QAAQ,EAAE,CAAC;IACZ,CAAC;CACD"
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idlebox/node",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.17",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./lib/cjs/__create_index.generated.cjs",
|
|
7
7
|
"module": "./lib/esm/__create_index.generated.mjs",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"source-map-support": "^0.5.21",
|
|
19
19
|
"tslib": "^2.4.1",
|
|
20
20
|
"@gongt/fix-esm": "^0.0.11",
|
|
21
|
-
"@idlebox/common": "^1.3.
|
|
21
|
+
"@idlebox/common": "^1.3.19"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@gongt/kexec": "^3.0.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PathArray } from '@idlebox/common';
|
|
2
1
|
import { platform } from 'os';
|
|
2
|
+
import { PathArray } from '@idlebox/common';
|
|
3
3
|
import { cleanupEnvironment, getEnvironment } from './getEnvironment';
|
|
4
4
|
|
|
5
5
|
export const PATH_SEPARATOR = platform() === 'win32' ? ';' : ':';
|
|
@@ -18,7 +18,7 @@ export class PathEnvironment extends PathArray {
|
|
|
18
18
|
cleanupEnvironment(varName);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
add(p: string) {
|
|
21
|
+
override add(p: string) {
|
|
22
22
|
const pSize = this.size;
|
|
23
23
|
super.add(p);
|
|
24
24
|
if (pSize !== this.size) {
|
|
@@ -26,12 +26,12 @@ export class PathEnvironment extends PathArray {
|
|
|
26
26
|
}
|
|
27
27
|
return this;
|
|
28
28
|
}
|
|
29
|
-
clear() {
|
|
29
|
+
override clear() {
|
|
30
30
|
const change = this.size > 0;
|
|
31
31
|
super.clear();
|
|
32
32
|
if (change) this.save();
|
|
33
33
|
}
|
|
34
|
-
delete(p: string) {
|
|
34
|
+
override delete(p: string) {
|
|
35
35
|
if (super.delete(p)) {
|
|
36
36
|
this.save();
|
|
37
37
|
return true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Writable } from 'stream';
|
|
2
2
|
|
|
3
3
|
export class BlackHoleStream extends Writable {
|
|
4
|
-
_write(_chunk: Buffer, _encoding: string, callback: (error?: Error | null) => void): void {
|
|
4
|
+
override _write(_chunk: Buffer, _encoding: string, callback: (error?: Error | null) => void): void {
|
|
5
5
|
callback();
|
|
6
6
|
}
|
|
7
7
|
}
|
|
@@ -25,7 +25,7 @@ export class RawCollectingStream extends Writable {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
_write(chunk: Buffer, _encoding: string, callback: (error?: Error | null) => void): void {
|
|
28
|
+
override _write(chunk: Buffer, _encoding: string, callback: (error?: Error | null) => void): void {
|
|
29
29
|
this.buffer = Buffer.concat([this.buffer!, chunk]);
|
|
30
30
|
callback();
|
|
31
31
|
}
|
|
@@ -59,7 +59,7 @@ export class CollectingStream extends Writable {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
_write(chunk: Buffer, encoding: BufferEncoding, callback: (error?: Error | null) => void): void {
|
|
62
|
+
override _write(chunk: Buffer, encoding: BufferEncoding, callback: (error?: Error | null) => void): void {
|
|
63
63
|
if (!encoding) {
|
|
64
64
|
encoding = 'utf8';
|
|
65
65
|
} else if ((encoding as any) === 'buffer' || encoding === 'binary') {
|
|
@@ -10,7 +10,7 @@ export class LoggerStream extends Transform {
|
|
|
10
10
|
this.prefix = prefix ? prefix + ' %s' : '%s';
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
_transform(chunk: Buffer, encoding: BufferEncoding, callback: Function): void {
|
|
13
|
+
override _transform(chunk: Buffer, encoding: BufferEncoding, callback: Function): void {
|
|
14
14
|
if ((encoding as any) === 'buffer' || encoding === 'binary') {
|
|
15
15
|
encoding = undefined as any;
|
|
16
16
|
}
|
|
@@ -39,7 +39,7 @@ export class HexDumpLoggerStream extends Transform {
|
|
|
39
39
|
this.prefix = prefix ? prefix + ' ' : '';
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
_transform(chunk: Buffer, encoding: BufferEncoding, callback: Function): void {
|
|
42
|
+
override _transform(chunk: Buffer, encoding: BufferEncoding, callback: Function): void {
|
|
43
43
|
let itr = 0;
|
|
44
44
|
while (chunk.length - itr > 0) {
|
|
45
45
|
const l = Array.from(chunk.slice(itr, itr + 16))
|