@idlebox/node 1.2.7 → 1.2.10
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/dist/node-alpha.d.ts +10 -2
- package/dist/node-beta.d.ts +10 -2
- package/dist/node-public.d.ts +10 -2
- package/dist/node.d.ts +10 -2
- package/dist/tsdoc-metadata.json +1 -1
- package/fix_esm_loader.cjs +1 -0
- package/lib/child_process/execa.cjs +22 -8
- package/lib/child_process/execa.cjs.map +1 -1
- package/lib/child_process/execa.js +22 -8
- package/lib/child_process/execa.js.map +1 -1
- package/lib/environment/npmConfig.cjs +18 -0
- package/lib/environment/npmConfig.cjs.map +1 -0
- package/lib/environment/npmConfig.js +14 -0
- package/lib/environment/npmConfig.js.map +1 -0
- package/lib/fs/tempFolder.cjs +12 -6
- package/lib/fs/tempFolder.cjs.map +1 -1
- package/lib/fs/tempFolder.js +12 -6
- package/lib/fs/tempFolder.js.map +1 -1
- package/lib/index.generated.cjs +166 -0
- package/lib/index.generated.cjs.map +1 -0
- package/lib/index.generated.js +109 -0
- package/lib/index.generated.js.map +1 -0
- package/package.json +12 -12
package/dist/node-alpha.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export declare function commandInPath(cmd: string, alterExt?: string[]): Promise
|
|
|
49
49
|
|
|
50
50
|
export declare function commmandInPathSync(cmd: string, alterExt?: string[]): string | undefined;
|
|
51
51
|
|
|
52
|
-
export declare function createTempFolder(
|
|
52
|
+
export declare function createTempFolder(fullPath: string): IDisposable;
|
|
53
53
|
|
|
54
54
|
export declare function deleteEnvironment(name: string, env?: NodeJS.ProcessEnv): void;
|
|
55
55
|
|
|
@@ -207,6 +207,8 @@ export declare function getAllPathUpToRoot(from: string, append?: string): strin
|
|
|
207
207
|
|
|
208
208
|
export declare function getEnvironment(name: string, env?: NodeJS.ProcessEnv): IEnvironmentResult;
|
|
209
209
|
|
|
210
|
+
export declare function getNpmConfigValue(field: string): Promise<string>;
|
|
211
|
+
|
|
210
212
|
export declare class HexDumpLoggerStream extends Transform {
|
|
211
213
|
private readonly logFn;
|
|
212
214
|
private readonly prefix;
|
|
@@ -229,8 +231,10 @@ declare interface IChildProcessStatus {
|
|
|
229
231
|
|
|
230
232
|
export declare interface ICommand {
|
|
231
233
|
exec: string[];
|
|
234
|
+
addonPath?: string[];
|
|
232
235
|
cwd?: string;
|
|
233
236
|
sync?: boolean;
|
|
237
|
+
env?: ProcessEnv;
|
|
234
238
|
}
|
|
235
239
|
|
|
236
240
|
export declare interface IEnvironmentResult {
|
|
@@ -287,6 +291,10 @@ export declare function prettyPrintError(type: string, e: Error): void;
|
|
|
287
291
|
|
|
288
292
|
export declare function printLine(char?: string): void;
|
|
289
293
|
|
|
294
|
+
declare type ProcessEnv = Record<string, string> & {
|
|
295
|
+
Path?: never;
|
|
296
|
+
};
|
|
297
|
+
|
|
290
298
|
export declare class RawCollectingStream extends Writable {
|
|
291
299
|
private buffer?;
|
|
292
300
|
private _promise?;
|
|
@@ -329,7 +337,7 @@ export declare function setErrorLogRoot(_root: string): void;
|
|
|
329
337
|
|
|
330
338
|
export declare function sha256(data: Buffer): string;
|
|
331
339
|
|
|
332
|
-
export declare function spawnGetEverything({ exec, cwd }: ICommand): Promise<string | undefined>;
|
|
340
|
+
export declare function spawnGetEverything({ exec, cwd, env, addonPath }: ICommand): Promise<string | undefined>;
|
|
333
341
|
|
|
334
342
|
export declare function spawnGetOutput(opt: ICommand & Sync): string;
|
|
335
343
|
|
package/dist/node-beta.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export declare function commandInPath(cmd: string, alterExt?: string[]): Promise
|
|
|
49
49
|
|
|
50
50
|
export declare function commmandInPathSync(cmd: string, alterExt?: string[]): string | undefined;
|
|
51
51
|
|
|
52
|
-
export declare function createTempFolder(
|
|
52
|
+
export declare function createTempFolder(fullPath: string): IDisposable;
|
|
53
53
|
|
|
54
54
|
export declare function deleteEnvironment(name: string, env?: NodeJS.ProcessEnv): void;
|
|
55
55
|
|
|
@@ -207,6 +207,8 @@ export declare function getAllPathUpToRoot(from: string, append?: string): strin
|
|
|
207
207
|
|
|
208
208
|
export declare function getEnvironment(name: string, env?: NodeJS.ProcessEnv): IEnvironmentResult;
|
|
209
209
|
|
|
210
|
+
export declare function getNpmConfigValue(field: string): Promise<string>;
|
|
211
|
+
|
|
210
212
|
export declare class HexDumpLoggerStream extends Transform {
|
|
211
213
|
private readonly logFn;
|
|
212
214
|
private readonly prefix;
|
|
@@ -229,8 +231,10 @@ declare interface IChildProcessStatus {
|
|
|
229
231
|
|
|
230
232
|
export declare interface ICommand {
|
|
231
233
|
exec: string[];
|
|
234
|
+
addonPath?: string[];
|
|
232
235
|
cwd?: string;
|
|
233
236
|
sync?: boolean;
|
|
237
|
+
env?: ProcessEnv;
|
|
234
238
|
}
|
|
235
239
|
|
|
236
240
|
export declare interface IEnvironmentResult {
|
|
@@ -287,6 +291,10 @@ export declare function prettyPrintError(type: string, e: Error): void;
|
|
|
287
291
|
|
|
288
292
|
export declare function printLine(char?: string): void;
|
|
289
293
|
|
|
294
|
+
declare type ProcessEnv = Record<string, string> & {
|
|
295
|
+
Path?: never;
|
|
296
|
+
};
|
|
297
|
+
|
|
290
298
|
export declare class RawCollectingStream extends Writable {
|
|
291
299
|
private buffer?;
|
|
292
300
|
private _promise?;
|
|
@@ -329,7 +337,7 @@ export declare function setErrorLogRoot(_root: string): void;
|
|
|
329
337
|
|
|
330
338
|
export declare function sha256(data: Buffer): string;
|
|
331
339
|
|
|
332
|
-
export declare function spawnGetEverything({ exec, cwd }: ICommand): Promise<string | undefined>;
|
|
340
|
+
export declare function spawnGetEverything({ exec, cwd, env, addonPath }: ICommand): Promise<string | undefined>;
|
|
333
341
|
|
|
334
342
|
export declare function spawnGetOutput(opt: ICommand & Sync): string;
|
|
335
343
|
|
package/dist/node-public.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export declare function commandInPath(cmd: string, alterExt?: string[]): Promise
|
|
|
49
49
|
|
|
50
50
|
export declare function commmandInPathSync(cmd: string, alterExt?: string[]): string | undefined;
|
|
51
51
|
|
|
52
|
-
export declare function createTempFolder(
|
|
52
|
+
export declare function createTempFolder(fullPath: string): IDisposable;
|
|
53
53
|
|
|
54
54
|
export declare function deleteEnvironment(name: string, env?: NodeJS.ProcessEnv): void;
|
|
55
55
|
|
|
@@ -207,6 +207,8 @@ export declare function getAllPathUpToRoot(from: string, append?: string): strin
|
|
|
207
207
|
|
|
208
208
|
export declare function getEnvironment(name: string, env?: NodeJS.ProcessEnv): IEnvironmentResult;
|
|
209
209
|
|
|
210
|
+
export declare function getNpmConfigValue(field: string): Promise<string>;
|
|
211
|
+
|
|
210
212
|
export declare class HexDumpLoggerStream extends Transform {
|
|
211
213
|
private readonly logFn;
|
|
212
214
|
private readonly prefix;
|
|
@@ -229,8 +231,10 @@ declare interface IChildProcessStatus {
|
|
|
229
231
|
|
|
230
232
|
export declare interface ICommand {
|
|
231
233
|
exec: string[];
|
|
234
|
+
addonPath?: string[];
|
|
232
235
|
cwd?: string;
|
|
233
236
|
sync?: boolean;
|
|
237
|
+
env?: ProcessEnv;
|
|
234
238
|
}
|
|
235
239
|
|
|
236
240
|
export declare interface IEnvironmentResult {
|
|
@@ -287,6 +291,10 @@ export declare function prettyPrintError(type: string, e: Error): void;
|
|
|
287
291
|
|
|
288
292
|
export declare function printLine(char?: string): void;
|
|
289
293
|
|
|
294
|
+
declare type ProcessEnv = Record<string, string> & {
|
|
295
|
+
Path?: never;
|
|
296
|
+
};
|
|
297
|
+
|
|
290
298
|
export declare class RawCollectingStream extends Writable {
|
|
291
299
|
private buffer?;
|
|
292
300
|
private _promise?;
|
|
@@ -329,7 +337,7 @@ export declare function setErrorLogRoot(_root: string): void;
|
|
|
329
337
|
|
|
330
338
|
export declare function sha256(data: Buffer): string;
|
|
331
339
|
|
|
332
|
-
export declare function spawnGetEverything({ exec, cwd }: ICommand): Promise<string | undefined>;
|
|
340
|
+
export declare function spawnGetEverything({ exec, cwd, env, addonPath }: ICommand): Promise<string | undefined>;
|
|
333
341
|
|
|
334
342
|
export declare function spawnGetOutput(opt: ICommand & Sync): string;
|
|
335
343
|
|
package/dist/node.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export declare function commandInPath(cmd: string, alterExt?: string[]): Promise
|
|
|
49
49
|
|
|
50
50
|
export declare function commmandInPathSync(cmd: string, alterExt?: string[]): string | undefined;
|
|
51
51
|
|
|
52
|
-
export declare function createTempFolder(
|
|
52
|
+
export declare function createTempFolder(fullPath: string): IDisposable;
|
|
53
53
|
|
|
54
54
|
export declare function deleteEnvironment(name: string, env?: NodeJS.ProcessEnv): void;
|
|
55
55
|
|
|
@@ -207,6 +207,8 @@ export declare function getAllPathUpToRoot(from: string, append?: string): strin
|
|
|
207
207
|
|
|
208
208
|
export declare function getEnvironment(name: string, env?: NodeJS.ProcessEnv): IEnvironmentResult;
|
|
209
209
|
|
|
210
|
+
export declare function getNpmConfigValue(field: string): Promise<string>;
|
|
211
|
+
|
|
210
212
|
export declare class HexDumpLoggerStream extends Transform {
|
|
211
213
|
private readonly logFn;
|
|
212
214
|
private readonly prefix;
|
|
@@ -229,8 +231,10 @@ declare interface IChildProcessStatus {
|
|
|
229
231
|
|
|
230
232
|
export declare interface ICommand {
|
|
231
233
|
exec: string[];
|
|
234
|
+
addonPath?: string[];
|
|
232
235
|
cwd?: string;
|
|
233
236
|
sync?: boolean;
|
|
237
|
+
env?: ProcessEnv;
|
|
234
238
|
}
|
|
235
239
|
|
|
236
240
|
export declare interface IEnvironmentResult {
|
|
@@ -287,6 +291,10 @@ export declare function prettyPrintError(type: string, e: Error): void;
|
|
|
287
291
|
|
|
288
292
|
export declare function printLine(char?: string): void;
|
|
289
293
|
|
|
294
|
+
declare type ProcessEnv = Record<string, string> & {
|
|
295
|
+
Path?: never;
|
|
296
|
+
};
|
|
297
|
+
|
|
290
298
|
export declare class RawCollectingStream extends Writable {
|
|
291
299
|
private buffer?;
|
|
292
300
|
private _promise?;
|
|
@@ -329,7 +337,7 @@ export declare function setErrorLogRoot(_root: string): void;
|
|
|
329
337
|
|
|
330
338
|
export declare function sha256(data: Buffer): string;
|
|
331
339
|
|
|
332
|
-
export declare function spawnGetEverything({ exec, cwd }: ICommand): Promise<string | undefined>;
|
|
340
|
+
export declare function spawnGetEverything({ exec, cwd, env, addonPath }: ICommand): Promise<string | undefined>;
|
|
333
341
|
|
|
334
342
|
export declare function spawnGetOutput(opt: ICommand & Sync): string;
|
|
335
343
|
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@gongt/fix-esm').require(__dirname + '/lib/index.generated.cjs');
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.spawnGetEverything = exports.spawnGetOutput = exports.spawnWithoutOutput = void 0;
|
|
4
|
+
const common_1 = require("@idlebox/common");
|
|
4
5
|
const execa_1 = require("execa");
|
|
5
6
|
const error_1 = require("./error.cjs");
|
|
7
|
+
function sanitizeEnv(env, addonPath) {
|
|
8
|
+
if (!env)
|
|
9
|
+
return undefined;
|
|
10
|
+
if (addonPath) {
|
|
11
|
+
env.PATH = addonPath.join(common_1.sepList) + common_1.sepList + (env.PATH ?? process.env.PATH);
|
|
12
|
+
}
|
|
13
|
+
if (common_1.isWindows) {
|
|
14
|
+
env.Path = env.PATH.replace(/:/g, common_1.sepList);
|
|
15
|
+
delete env.PATH;
|
|
16
|
+
}
|
|
17
|
+
return env;
|
|
18
|
+
}
|
|
6
19
|
function handleError(result) {
|
|
7
20
|
if (result.exitCode !== 0) {
|
|
8
21
|
throw new Error('command exit with code ' + result.exitCode);
|
|
@@ -12,12 +25,13 @@ function handleError(result) {
|
|
|
12
25
|
}
|
|
13
26
|
return result;
|
|
14
27
|
}
|
|
15
|
-
function spawnWithoutOutput({ exec, cwd, sync }) {
|
|
28
|
+
function spawnWithoutOutput({ exec, cwd, sync, env, addonPath }) {
|
|
16
29
|
const [cmd, ...args] = exec;
|
|
17
30
|
const opts = {
|
|
18
31
|
stdio: ['ignore', process.stderr, process.stderr],
|
|
19
32
|
cwd,
|
|
20
33
|
reject: false,
|
|
34
|
+
env: sanitizeEnv(env, addonPath),
|
|
21
35
|
};
|
|
22
36
|
if (sync) {
|
|
23
37
|
(0, error_1.checkChildProcessResult)((0, execa_1.execaSync)(cmd, args, opts));
|
|
@@ -31,7 +45,7 @@ function spawnWithoutOutput({ exec, cwd, sync }) {
|
|
|
31
45
|
}
|
|
32
46
|
}
|
|
33
47
|
exports.spawnWithoutOutput = spawnWithoutOutput;
|
|
34
|
-
function spawnGetOutput({ exec, cwd, sync }) {
|
|
48
|
+
function spawnGetOutput({ exec, cwd, sync, env, addonPath }) {
|
|
35
49
|
const [cmd, ...args] = exec;
|
|
36
50
|
const opts = {
|
|
37
51
|
stdio: ['ignore', 'pipe', process.stderr],
|
|
@@ -39,6 +53,7 @@ function spawnGetOutput({ exec, cwd, sync }) {
|
|
|
39
53
|
reject: false,
|
|
40
54
|
stripFinalNewline: true,
|
|
41
55
|
encoding: 'utf8',
|
|
56
|
+
env: sanitizeEnv(env, addonPath),
|
|
42
57
|
};
|
|
43
58
|
if (sync) {
|
|
44
59
|
const result = handleError((0, execa_1.execaSync)(cmd, args, opts));
|
|
@@ -53,7 +68,7 @@ function spawnGetOutput({ exec, cwd, sync }) {
|
|
|
53
68
|
}
|
|
54
69
|
}
|
|
55
70
|
exports.spawnGetOutput = spawnGetOutput;
|
|
56
|
-
function spawnGetEverything({ exec, cwd }) {
|
|
71
|
+
async function spawnGetEverything({ exec, cwd, env, addonPath }) {
|
|
57
72
|
const [cmd, ...args] = exec;
|
|
58
73
|
const opts = {
|
|
59
74
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
@@ -62,12 +77,11 @@ function spawnGetEverything({ exec, cwd }) {
|
|
|
62
77
|
stripFinalNewline: true,
|
|
63
78
|
encoding: 'utf8',
|
|
64
79
|
all: true,
|
|
80
|
+
env: sanitizeEnv(env, addonPath),
|
|
65
81
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return result.all;
|
|
70
|
-
});
|
|
82
|
+
const result = await (0, execa_1.execa)(cmd, args, opts);
|
|
83
|
+
handleError(result);
|
|
84
|
+
return result.all;
|
|
71
85
|
}
|
|
72
86
|
exports.spawnGetEverything = spawnGetEverything;
|
|
73
87
|
//# sourceMappingURL=execa.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execa.js","sourceRoot":"","sources":["../../src/child_process/execa.ts"],"names":[],"mappings":";;;AAAA,iCAAuE;AACvE,uCAAkD;
|
|
1
|
+
{"version":3,"file":"execa.js","sourceRoot":"","sources":["../../src/child_process/execa.ts"],"names":[],"mappings":";;;AAAA,4CAAqD;AACrD,iCAAuE;AACvE,uCAAkD;AAqBlD,SAAS,WAAW,CAAC,GAAgB,EAAE,SAAoB;IAC1D,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IAE3B,IAAI,SAAS,EAAE;QACd,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,gBAAO,CAAC,GAAG,gBAAO,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KAC9E;IACD,IAAI,kBAAS,EAAE;QACb,GAAW,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,gBAAO,CAAC,CAAC;QACpD,OAAO,GAAG,CAAC,IAAI,CAAC;KAChB;IACD,OAAO,GAAG,CAAC;AACZ,CAAC;AAED,SAAS,WAAW,CAAoC,MAAS;IAChE,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,EAAE;QAC1B,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;KAC7D;SAAM,IAAI,MAAM,CAAC,MAAM,EAAE;QACzB,M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EAAE;QACT,MAAM,MAAM,GAAG,WAAW,CAAC,IAAA,iBAAS,EAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QACvD,OAAO,MAAM,CAAC,MAAM,CAAC;KACrB;SAAM;QACN,OAAO,IAAA,aAAK,EAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC;aAC3B,IAAI,CAAC,WAAW,CAAC;aACjB,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YAChB,OAAO,MAAM,CAAC,MAAM,CAAC;QACtB,CAAC,CAAC,CAAC;KACJ;AACF,CAAC;AArBD,wCAqBC;AAEM,KAAK,UAAU,kBAAkB,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAY;IAC/E,MAAM,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAC5B,MAAM,IAAI,GAAgB;QACzB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;QACjC,GAAG;QACH,MAAM,EAAE,KAAK;QACb,iBAAiB,EAAE,IAAI;QACvB,QAAQ,EAAE,MAAM;QAChB,GAAG,EAAE,IAAI;QACT,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,SAAS,CAAC;KAChC,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,IAAA,aAAK,EAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5C,WAAW,CAAC,MAAM,CAAC,CAAC;IACpB,OAAO,MAAM,CAAC,GAAG,CAAC;AACnB,CAAC;AAfD,gDAeC"}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
+
import { isWindows, sepList } from '@idlebox/common';
|
|
1
2
|
import { execa, execaSync } from 'execa';
|
|
2
3
|
import { checkChildProcessResult } from "./error.js";
|
|
4
|
+
function sanitizeEnv(env, addonPath) {
|
|
5
|
+
if (!env)
|
|
6
|
+
return undefined;
|
|
7
|
+
if (addonPath) {
|
|
8
|
+
env.PATH = addonPath.join(sepList) + sepList + (env.PATH ?? process.env.PATH);
|
|
9
|
+
}
|
|
10
|
+
if (isWindows) {
|
|
11
|
+
env.Path = env.PATH.replace(/:/g, sepList);
|
|
12
|
+
delete env.PATH;
|
|
13
|
+
}
|
|
14
|
+
return env;
|
|
15
|
+
}
|
|
3
16
|
function handleError(result) {
|
|
4
17
|
if (result.exitCode !== 0) {
|
|
5
18
|
throw new Error('command exit with code ' + result.exitCode);
|
|
@@ -9,12 +22,13 @@ function handleError(result) {
|
|
|
9
22
|
}
|
|
10
23
|
return result;
|
|
11
24
|
}
|
|
12
|
-
export function spawnWithoutOutput({ exec, cwd, sync }) {
|
|
25
|
+
export function spawnWithoutOutput({ exec, cwd, sync, env, addonPath }) {
|
|
13
26
|
const [cmd, ...args] = exec;
|
|
14
27
|
const opts = {
|
|
15
28
|
stdio: ['ignore', process.stderr, process.stderr],
|
|
16
29
|
cwd,
|
|
17
30
|
reject: false,
|
|
31
|
+
env: sanitizeEnv(env, addonPath),
|
|
18
32
|
};
|
|
19
33
|
if (sync) {
|
|
20
34
|
checkChildProcessResult(execaSync(cmd, args, opts));
|
|
@@ -27,7 +41,7 @@ export function spawnWithoutOutput({ exec, cwd, sync }) {
|
|
|
27
41
|
});
|
|
28
42
|
}
|
|
29
43
|
}
|
|
30
|
-
export function spawnGetOutput({ exec, cwd, sync }) {
|
|
44
|
+
export function spawnGetOutput({ exec, cwd, sync, env, addonPath }) {
|
|
31
45
|
const [cmd, ...args] = exec;
|
|
32
46
|
const opts = {
|
|
33
47
|
stdio: ['ignore', 'pipe', process.stderr],
|
|
@@ -35,6 +49,7 @@ export function spawnGetOutput({ exec, cwd, sync }) {
|
|
|
35
49
|
reject: false,
|
|
36
50
|
stripFinalNewline: true,
|
|
37
51
|
encoding: 'utf8',
|
|
52
|
+
env: sanitizeEnv(env, addonPath),
|
|
38
53
|
};
|
|
39
54
|
if (sync) {
|
|
40
55
|
const result = handleError(execaSync(cmd, args, opts));
|
|
@@ -48,7 +63,7 @@ export function spawnGetOutput({ exec, cwd, sync }) {
|
|
|
48
63
|
});
|
|
49
64
|
}
|
|
50
65
|
}
|
|
51
|
-
export function spawnGetEverything({ exec, cwd }) {
|
|
66
|
+
export async function spawnGetEverything({ exec, cwd, env, addonPath }) {
|
|
52
67
|
const [cmd, ...args] = exec;
|
|
53
68
|
const opts = {
|
|
54
69
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
@@ -57,11 +72,10 @@ export function spawnGetEverything({ exec, cwd }) {
|
|
|
57
72
|
stripFinalNewline: true,
|
|
58
73
|
encoding: 'utf8',
|
|
59
74
|
all: true,
|
|
75
|
+
env: sanitizeEnv(env, addonPath),
|
|
60
76
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return result.all;
|
|
65
|
-
});
|
|
77
|
+
const result = await execa(cmd, args, opts);
|
|
78
|
+
handleError(result);
|
|
79
|
+
return result.all;
|
|
66
80
|
}
|
|
67
81
|
//# sourceMappingURL=execa.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execa.js","sourceRoot":"","sources":["../../src/child_process/execa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAmB,SAAS,EAAe,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,mBAAgB;
|
|
1
|
+
{"version":3,"file":"execa.js","sourceRoot":"","sources":["../../src/child_process/execa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAmB,SAAS,EAAe,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,mBAAgB;AAqBlD,SAAS,WAAW,CAAC,GAAgB,EAAE,SAAoB;IAC1D,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IAE3B,IAAI,SAAS,EAAE;QACd,GAAG,CAAC,IAAI,GAAG,SA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,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,SAAS,CAAC;KAChC,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5C,WAAW,CAAC,MAAM,CAAC,CAAC;IACpB,OAAO,MAAM,CAAC,GAAG,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNpmConfigValue = void 0;
|
|
4
|
+
const common_1 = require("@idlebox/common");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const execa_1 = require("../child_process/execa.cjs");
|
|
7
|
+
async function getNpmConfigValue(field) {
|
|
8
|
+
const env_name = 'npm_config_' + (0, common_1.linux_case)(field);
|
|
9
|
+
if (typeof process.env[env_name] === 'string') {
|
|
10
|
+
return process.env[env_name];
|
|
11
|
+
}
|
|
12
|
+
return await (0, execa_1.spawnGetOutput)({
|
|
13
|
+
exec: ['npm', 'config', 'get', field],
|
|
14
|
+
addonPath: [(0, path_1.dirname)(process.argv0)],
|
|
15
|
+
}).catch(() => '');
|
|
16
|
+
}
|
|
17
|
+
exports.getNpmConfigValue = getNpmConfigValue;
|
|
18
|
+
//# sourceMappingURL=npmConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npmConfig.js","sourceRoot":"","sources":["../../src/environment/npmConfig.ts"],"names":[],"mappings":";;;AAAA,4CAA6C;AAC7C,+BAA+B;AAC/B,sDAAwD;AAEjD,KAAK,UAAU,iBAAiB,CAAC,KAAa;IACpD,MAAM,QAAQ,GAAG,aAAa,GAAG,IAAA,mBAAU,EAAC,KAAK,CAAC,CAAC;IACnD,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,QAAQ,EAAE;QAC9C,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC;KAC9B;IAED,OAAO,MAAM,IAAA,sBAAc,EAAC;QAC3B,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC;QACrC,SAAS,EAAE,CAAC,IAAA,cAAO,EAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KACnC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AACpB,CAAC;AAVD,8CAUC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { linux_case } from '@idlebox/common';
|
|
2
|
+
import { dirname } from 'path';
|
|
3
|
+
import { spawnGetOutput } from "../child_process/execa.js";
|
|
4
|
+
export async function getNpmConfigValue(field) {
|
|
5
|
+
const env_name = 'npm_config_' + linux_case(field);
|
|
6
|
+
if (typeof process.env[env_name] === 'string') {
|
|
7
|
+
return process.env[env_name];
|
|
8
|
+
}
|
|
9
|
+
return await spawnGetOutput({
|
|
10
|
+
exec: ['npm', 'config', 'get', field],
|
|
11
|
+
addonPath: [dirname(process.argv0)],
|
|
12
|
+
}).catch(() => '');
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=npmConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npmConfig.js","sourceRoot":"","sources":["../../src/environment/npmConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,kCAA+B;AAExD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,KAAa;IACpD,MAAM,QAAQ,GAAG,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IACnD,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,QAAQ,EAAE;QAC9C,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC;KAC9B;IAED,OAAO,MAAM,cAAc,CAAC;QAC3B,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC;QACrC,SAAS,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KACnC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AACpB,CAAC"}
|
package/lib/fs/tempFolder.cjs
CHANGED
|
@@ -5,16 +5,22 @@ const fs_1 = require("fs");
|
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const exists_1 = require("./exists.cjs");
|
|
7
7
|
let registered = false;
|
|
8
|
-
const tempFolders =
|
|
9
|
-
function createTempFolder(
|
|
10
|
-
if ((0, exists_1.existsSync)(
|
|
11
|
-
throw new Error('temp folder already exists: ' +
|
|
8
|
+
const tempFolders = new Set();
|
|
9
|
+
function createTempFolder(fullPath) {
|
|
10
|
+
if ((0, exists_1.existsSync)(fullPath)) {
|
|
11
|
+
throw new Error('temp folder already exists: ' + fullPath);
|
|
12
12
|
}
|
|
13
13
|
if (!registered) {
|
|
14
14
|
process.on('beforeExit', onBeforeExit);
|
|
15
15
|
}
|
|
16
|
-
tempFolders.
|
|
17
|
-
(0, fs_1.mkdirSync)(
|
|
16
|
+
tempFolders.add(fullPath);
|
|
17
|
+
(0, fs_1.mkdirSync)(fullPath);
|
|
18
|
+
return {
|
|
19
|
+
dispose() {
|
|
20
|
+
tempFolders.delete(fullPath);
|
|
21
|
+
rmdirpSync(fullPath);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
18
24
|
}
|
|
19
25
|
exports.createTempFolder = createTempFolder;
|
|
20
26
|
function rmdirpSync(p) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tempFolder.js","sourceRoot":"","sources":["../../src/fs/tempFolder.ts"],"names":[],"mappings":";;;AAAA,2BAA6E;AAC7E,+BAA+B;
|
|
1
|
+
{"version":3,"file":"tempFolder.js","source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C,CAAC,CAAC;aACb;YACD,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,IAAI,CAAC;KACZ;IAAC,MAAM;QACP,OAAO,KAAK,CAAC;KACb;AACF,CAAC;AAED,SAAS,YAAY;IACpB,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE;QAC/B,UAAU,CAAC,IAAI,CAAC,CAAC;KACjB;AACF,CAAC"}
|
package/lib/fs/tempFolder.js
CHANGED
|
@@ -2,16 +2,22 @@ import { mkdirSync, readdirSync, rmdirSync, statSync, unlinkSync } from 'fs';
|
|
|
2
2
|
import { resolve } from 'path';
|
|
3
3
|
import { existsSync } from "./exists.js";
|
|
4
4
|
let registered = false;
|
|
5
|
-
const tempFolders =
|
|
6
|
-
export function createTempFolder(
|
|
7
|
-
if (existsSync(
|
|
8
|
-
throw new Error('temp folder already exists: ' +
|
|
5
|
+
const tempFolders = new Set();
|
|
6
|
+
export function createTempFolder(fullPath) {
|
|
7
|
+
if (existsSync(fullPath)) {
|
|
8
|
+
throw new Error('temp folder already exists: ' + fullPath);
|
|
9
9
|
}
|
|
10
10
|
if (!registered) {
|
|
11
11
|
process.on('beforeExit', onBeforeExit);
|
|
12
12
|
}
|
|
13
|
-
tempFolders.
|
|
14
|
-
mkdirSync(
|
|
13
|
+
tempFolders.add(fullPath);
|
|
14
|
+
mkdirSync(fullPath);
|
|
15
|
+
return {
|
|
16
|
+
dispose() {
|
|
17
|
+
tempFolders.delete(fullPath);
|
|
18
|
+
rmdirpSync(fullPath);
|
|
19
|
+
},
|
|
20
|
+
};
|
|
15
21
|
}
|
|
16
22
|
function rmdirpSync(p) {
|
|
17
23
|
try {
|
package/lib/fs/tempFolder.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tempFolder.js","sourceRoot":"","sources":["../../src/fs/tempFolder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAA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,CAAC,CAAC,EAAE;gBAClC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE;oBAClC,IAAI,GAAG,KAAK,CAAC;iBACb;aACD;YACD,IAAI,IAAI,EAAE;gBACT,SAAS,CAAC,CAAC,CAAC,CAAC;aACb;YACD,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,IAAI,CAAC;KACZ;IAAC,MAAM;QACP,OAAO,KAAK,CAAC;KACb;AACF,CAAC;AAED,SAAS,YAAY;IACpB,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE;QAC/B,UAAU,CAAC,IAAI,CAAC,CAAC;KACjB;AACF,CAAC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// DO NOT EDIT THIS FILE
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
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;
|
|
7
|
+
exports.HexDumpLoggerStream = exports.LoggerStream = exports.drainStream = void 0;
|
|
8
|
+
var resolvePath_1 = require("./path-resolve/resolvePath.cjs");
|
|
9
|
+
Object.defineProperty(exports, "resolvePath", { enumerable: true, get: function () { return resolvePath_1.resolvePath; } });
|
|
10
|
+
var resolvePath_2 = require("./path-resolve/resolvePath.cjs");
|
|
11
|
+
Object.defineProperty(exports, "normalizePath", { enumerable: true, get: function () { return resolvePath_2.normalizePath; } });
|
|
12
|
+
var resolvePath_3 = require("./path-resolve/resolvePath.cjs");
|
|
13
|
+
Object.defineProperty(exports, "osTempDir", { enumerable: true, get: function () { return resolvePath_3.osTempDir; } });
|
|
14
|
+
var resolvePath_4 = require("./path-resolve/resolvePath.cjs");
|
|
15
|
+
Object.defineProperty(exports, "relativePath", { enumerable: true, get: function () { return resolvePath_4.relativePath; } });
|
|
16
|
+
/* error/pretty.ts */
|
|
17
|
+
// Identifiers
|
|
18
|
+
var pretty_1 = require("./error/pretty.cjs");
|
|
19
|
+
Object.defineProperty(exports, "setErrorLogRoot", { enumerable: true, get: function () { return pretty_1.setErrorLogRoot; } });
|
|
20
|
+
var pretty_2 = require("./error/pretty.cjs");
|
|
21
|
+
Object.defineProperty(exports, "prettyPrintError", { enumerable: true, get: function () { return pretty_2.prettyPrintError; } });
|
|
22
|
+
var pretty_3 = require("./error/pretty.cjs");
|
|
23
|
+
Object.defineProperty(exports, "prettyFormatError", { enumerable: true, get: function () { return pretty_3.prettyFormatError; } });
|
|
24
|
+
var asyncLoad_1 = require("./asyncLoad.cjs");
|
|
25
|
+
Object.defineProperty(exports, "ExitError", { enumerable: true, get: function () { return asyncLoad_1.ExitError; } });
|
|
26
|
+
var asyncLoad_2 = require("./asyncLoad.cjs");
|
|
27
|
+
Object.defineProperty(exports, "runMain", { enumerable: true, get: function () { return asyncLoad_2.runMain; } });
|
|
28
|
+
/* child_process/error.ts */
|
|
29
|
+
// Identifiers
|
|
30
|
+
var error_1 = require("./child_process/error.cjs");
|
|
31
|
+
Object.defineProperty(exports, "checkChildProcessResult", { enumerable: true, get: function () { return error_1.checkChildProcessResult; } });
|
|
32
|
+
var execa_1 = require("./child_process/execa.cjs");
|
|
33
|
+
Object.defineProperty(exports, "spawnWithoutOutput", { enumerable: true, get: function () { return execa_1.spawnWithoutOutput; } });
|
|
34
|
+
var execa_2 = require("./child_process/execa.cjs");
|
|
35
|
+
Object.defineProperty(exports, "spawnGetOutput", { enumerable: true, get: function () { return execa_2.spawnGetOutput; } });
|
|
36
|
+
var execa_3 = require("./child_process/execa.cjs");
|
|
37
|
+
Object.defineProperty(exports, "spawnGetEverything", { enumerable: true, get: function () { return execa_3.spawnGetEverything; } });
|
|
38
|
+
/* cli-io/output.ts */
|
|
39
|
+
// Identifiers
|
|
40
|
+
var output_1 = require("./cli-io/output.cjs");
|
|
41
|
+
Object.defineProperty(exports, "printLine", { enumerable: true, get: function () { return output_1.printLine; } });
|
|
42
|
+
var lateError_1 = require("./child_process/lateError.cjs");
|
|
43
|
+
Object.defineProperty(exports, "execLazyError", { enumerable: true, get: function () { return lateError_1.execLazyError; } });
|
|
44
|
+
/* fs/exists.ts */
|
|
45
|
+
// Identifiers
|
|
46
|
+
var exists_1 = require("./fs/exists.cjs");
|
|
47
|
+
Object.defineProperty(exports, "existsSync", { enumerable: true, get: function () { return exists_1.existsSync; } });
|
|
48
|
+
var exists_2 = require("./fs/exists.cjs");
|
|
49
|
+
Object.defineProperty(exports, "exists", { enumerable: true, get: function () { return exists_2.exists; } });
|
|
50
|
+
var getEnvironment_1 = require("./environment/getEnvironment.cjs");
|
|
51
|
+
Object.defineProperty(exports, "getEnvironment", { enumerable: true, get: function () { return getEnvironment_1.getEnvironment; } });
|
|
52
|
+
var getEnvironment_2 = require("./environment/getEnvironment.cjs");
|
|
53
|
+
Object.defineProperty(exports, "deleteEnvironment", { enumerable: true, get: function () { return getEnvironment_2.deleteEnvironment; } });
|
|
54
|
+
var getEnvironment_3 = require("./environment/getEnvironment.cjs");
|
|
55
|
+
Object.defineProperty(exports, "cleanupEnvironment", { enumerable: true, get: function () { return getEnvironment_3.cleanupEnvironment; } });
|
|
56
|
+
/* environment/pathEnvironment.ts */
|
|
57
|
+
// Identifiers
|
|
58
|
+
var pathEnvironment_1 = require("./environment/pathEnvironment.cjs");
|
|
59
|
+
Object.defineProperty(exports, "PATH_SEPARATOR", { enumerable: true, get: function () { return pathEnvironment_1.PATH_SEPARATOR; } });
|
|
60
|
+
var pathEnvironment_2 = require("./environment/pathEnvironment.cjs");
|
|
61
|
+
Object.defineProperty(exports, "PathEnvironment", { enumerable: true, get: function () { return pathEnvironment_2.PathEnvironment; } });
|
|
62
|
+
/* environment/findBinary.ts */
|
|
63
|
+
// Identifiers
|
|
64
|
+
var findBinary_1 = require("./environment/findBinary.cjs");
|
|
65
|
+
Object.defineProperty(exports, "findBinary", { enumerable: true, get: function () { return findBinary_1.findBinary; } });
|
|
66
|
+
/* child_process/respawn.ts */
|
|
67
|
+
// Identifiers
|
|
68
|
+
var respawn_1 = require("./child_process/respawn.cjs");
|
|
69
|
+
Object.defineProperty(exports, "spawnRecreateEventHandlers", { enumerable: true, get: function () { return respawn_1.spawnRecreateEventHandlers; } });
|
|
70
|
+
var respawn_2 = require("./child_process/respawn.cjs");
|
|
71
|
+
Object.defineProperty(exports, "trySpawnInScope", { enumerable: true, get: function () { return respawn_2.trySpawnInScope; } });
|
|
72
|
+
var respawn_3 = require("./child_process/respawn.cjs");
|
|
73
|
+
Object.defineProperty(exports, "respawnInScope", { enumerable: true, get: function () { return respawn_3.respawnInScope; } });
|
|
74
|
+
/* crypto/md5.ts */
|
|
75
|
+
// Identifiers
|
|
76
|
+
var md5_1 = require("./crypto/md5.cjs");
|
|
77
|
+
Object.defineProperty(exports, "md5", { enumerable: true, get: function () { return md5_1.md5; } });
|
|
78
|
+
/* crypto/sha256.ts */
|
|
79
|
+
// Identifiers
|
|
80
|
+
var sha256_1 = require("./crypto/sha256.cjs");
|
|
81
|
+
Object.defineProperty(exports, "sha256", { enumerable: true, get: function () { return sha256_1.sha256; } });
|
|
82
|
+
/* environment/npmConfig.ts */
|
|
83
|
+
// Identifiers
|
|
84
|
+
var npmConfig_1 = require("./environment/npmConfig.cjs");
|
|
85
|
+
Object.defineProperty(exports, "getNpmConfigValue", { enumerable: true, get: function () { return npmConfig_1.getNpmConfigValue; } });
|
|
86
|
+
/* error/code.ts */
|
|
87
|
+
// Identifiers
|
|
88
|
+
var code_1 = require("./error/code.cjs");
|
|
89
|
+
Object.defineProperty(exports, "ERRNO_LINUX", { enumerable: true, get: function () { return code_1.ERRNO_LINUX; } });
|
|
90
|
+
/* events/dumpEventEmitter.ts */
|
|
91
|
+
// Identifiers
|
|
92
|
+
var dumpEventEmitter_1 = require("./events/dumpEventEmitter.cjs");
|
|
93
|
+
Object.defineProperty(exports, "dumpEventEmitterEmit", { enumerable: true, get: function () { return dumpEventEmitter_1.dumpEventEmitterEmit; } });
|
|
94
|
+
/* fs/commandExists.ts */
|
|
95
|
+
// Identifiers
|
|
96
|
+
var commandExists_1 = require("./fs/commandExists.cjs");
|
|
97
|
+
Object.defineProperty(exports, "commandInPath", { enumerable: true, get: function () { return commandExists_1.commandInPath; } });
|
|
98
|
+
var commandExists_2 = require("./fs/commandExists.cjs");
|
|
99
|
+
Object.defineProperty(exports, "commmandInPathSync", { enumerable: true, get: function () { return commandExists_2.commmandInPathSync; } });
|
|
100
|
+
/* fs/tempFolder.ts */
|
|
101
|
+
// Identifiers
|
|
102
|
+
var tempFolder_1 = require("./fs/tempFolder.cjs");
|
|
103
|
+
Object.defineProperty(exports, "createTempFolder", { enumerable: true, get: function () { return tempFolder_1.createTempFolder; } });
|
|
104
|
+
/* fs/weiteChanged.ts */
|
|
105
|
+
// Identifiers
|
|
106
|
+
var weiteChanged_1 = require("./fs/weiteChanged.cjs");
|
|
107
|
+
Object.defineProperty(exports, "writeFileIfChangeSync", { enumerable: true, get: function () { return weiteChanged_1.writeFileIfChangeSync; } });
|
|
108
|
+
var weiteChanged_2 = require("./fs/weiteChanged.cjs");
|
|
109
|
+
Object.defineProperty(exports, "writeFileIfChange", { enumerable: true, get: function () { return weiteChanged_2.writeFileIfChange; } });
|
|
110
|
+
/* log/terminal.ts */
|
|
111
|
+
// Identifiers
|
|
112
|
+
var terminal_1 = require("./log/terminal.cjs");
|
|
113
|
+
Object.defineProperty(exports, "WrappedTerminalConsole", { enumerable: true, get: function () { return terminal_1.WrappedTerminalConsole; } });
|
|
114
|
+
/* path-resolve/findUp.ts */
|
|
115
|
+
// Identifiers
|
|
116
|
+
var findUp_1 = require("./path-resolve/findUp.cjs");
|
|
117
|
+
Object.defineProperty(exports, "findUpUntil", { enumerable: true, get: function () { return findUp_1.findUpUntil; } });
|
|
118
|
+
var findUp_2 = require("./path-resolve/findUp.cjs");
|
|
119
|
+
Object.defineProperty(exports, "findUpUntilSync", { enumerable: true, get: function () { return findUp_2.findUpUntilSync; } });
|
|
120
|
+
/* path-resolve/findPackageRoot.ts */
|
|
121
|
+
// Identifiers
|
|
122
|
+
var findPackageRoot_1 = require("./path-resolve/findPackageRoot.cjs");
|
|
123
|
+
Object.defineProperty(exports, "findPackageRoot", { enumerable: true, get: function () { return findPackageRoot_1.findPackageRoot; } });
|
|
124
|
+
/* path-resolve/getAllUp.ts */
|
|
125
|
+
// Identifiers
|
|
126
|
+
var getAllUp_1 = require("./path-resolve/getAllUp.cjs");
|
|
127
|
+
Object.defineProperty(exports, "getAllPathUpToRoot", { enumerable: true, get: function () { return getAllUp_1.getAllPathUpToRoot; } });
|
|
128
|
+
/* path-resolve/lrelative.ts */
|
|
129
|
+
// Identifiers
|
|
130
|
+
var lrelative_1 = require("./path-resolve/lrelative.cjs");
|
|
131
|
+
Object.defineProperty(exports, "lrelative", { enumerable: true, get: function () { return lrelative_1.lrelative; } });
|
|
132
|
+
/* path-resolve/nodeResolvePathArray.ts */
|
|
133
|
+
// Identifiers
|
|
134
|
+
var nodeResolvePathArray_1 = require("./path-resolve/nodeResolvePathArray.cjs");
|
|
135
|
+
Object.defineProperty(exports, "nodeResolvePathArray", { enumerable: true, get: function () { return nodeResolvePathArray_1.nodeResolvePathArray; } });
|
|
136
|
+
/* stream/blackHoleStream.ts */
|
|
137
|
+
// Identifiers
|
|
138
|
+
var blackHoleStream_1 = require("./stream/blackHoleStream.cjs");
|
|
139
|
+
Object.defineProperty(exports, "BlackHoleStream", { enumerable: true, get: function () { return blackHoleStream_1.BlackHoleStream; } });
|
|
140
|
+
/* stream/streamPromise.ts */
|
|
141
|
+
// Identifiers
|
|
142
|
+
var streamPromise_1 = require("./stream/streamPromise.cjs");
|
|
143
|
+
Object.defineProperty(exports, "streamPromise", { enumerable: true, get: function () { return streamPromise_1.streamPromise; } });
|
|
144
|
+
var streamPromise_2 = require("./stream/streamPromise.cjs");
|
|
145
|
+
Object.defineProperty(exports, "streamHasEnd", { enumerable: true, get: function () { return streamPromise_2.streamHasEnd; } });
|
|
146
|
+
/* stream/collectingStream.ts */
|
|
147
|
+
// Identifiers
|
|
148
|
+
var collectingStream_1 = require("./stream/collectingStream.cjs");
|
|
149
|
+
Object.defineProperty(exports, "streamToBuffer", { enumerable: true, get: function () { return collectingStream_1.streamToBuffer; } });
|
|
150
|
+
var collectingStream_2 = require("./stream/collectingStream.cjs");
|
|
151
|
+
Object.defineProperty(exports, "RawCollectingStream", { enumerable: true, get: function () { return collectingStream_2.RawCollectingStream; } });
|
|
152
|
+
var collectingStream_3 = require("./stream/collectingStream.cjs");
|
|
153
|
+
Object.defineProperty(exports, "CollectingStream", { enumerable: true, get: function () { return collectingStream_3.CollectingStream; } });
|
|
154
|
+
/* stream/disposableStream.ts */
|
|
155
|
+
// Identifiers
|
|
156
|
+
var disposableStream_1 = require("./stream/disposableStream.cjs");
|
|
157
|
+
Object.defineProperty(exports, "disposableStream", { enumerable: true, get: function () { return disposableStream_1.disposableStream; } });
|
|
158
|
+
/* stream/drainStream.ts */
|
|
159
|
+
// Identifiers
|
|
160
|
+
var drainStream_1 = require("./stream/drainStream.cjs");
|
|
161
|
+
Object.defineProperty(exports, "drainStream", { enumerable: true, get: function () { return drainStream_1.drainStream; } });
|
|
162
|
+
var loggerStream_1 = require("./stream/loggerStream.cjs");
|
|
163
|
+
Object.defineProperty(exports, "LoggerStream", { enumerable: true, get: function () { return loggerStream_1.LoggerStream; } });
|
|
164
|
+
var loggerStream_2 = require("./stream/loggerStream.cjs");
|
|
165
|
+
Object.defineProperty(exports, "HexDumpLoggerStream", { enumerable: true, get: function () { return loggerStream_2.HexDumpLoggerStream; } });
|
|
166
|
+
//# sourceMappingURL=index.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.generated.js","sourceRoot":"","sources":["../src/index.generated.ts"],"names":[],"mappings":";AAAA,wBAAwB;AACxB,aAAa;AACb,oBAAoB;;;;AAMlB,8DAAuD;AAA/C,0GAAA,WAAW,OAAA;AAEnB,8DAAyD;AAAjD,4GAAA,aAAa,OAAA;AACrB,8DAAqD;AAA7C,wGAAA,SAAS,OAAA;AACjB,8DAAwD;AAAhD,2GAAA,YAAY,OAAA;AACtB,qBAAqB;AACpB,cAAc;AACb,6CAA+C;AAAvC,yGAAA,eAAe,OAAA;AACvB,6CAAgD;AAAxC,0GAAA,gBAAgB,OAAA;AACxB,6CAAiD;AAAzC,2GAAA,iBAAiB,OAAA;AAIzB,6CAAsC;AAA9B,sGAAA,SAAS,OAAA;AACjB,6CAAoC;AAA5B,oGAAA,OAAO,OAAA;AACjB,4BAA4B;AAC3B,cAAc;AACb,mDAA8D;AAAtD,gHAAA,uBAAuB,OAAA;AAM/B,mDAAyD;AAAjD,2GAAA,kBAAkB,OAAA;AAC1B,mDAAqD;AAA7C,uGAAA,cAAc,OAAA;AACtB,mDAAyD;AAAjD,2GAAA,kBAAkB,OAAA;AAC5B,sBAAsB;AACrB,cAAc;AACb,8CAA0C;AAAlC,mGAAA,SAAS,OAAA;AAIjB,2DAA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AqB;AACpB,cAAc;AACb,+CAAsD;AAA9C,kHAAA,sBAAsB,OAAA;AAChC,4BAA4B;AAC3B,cAAc;AACb,oDAAkD;AAA1C,qGAAA,WAAW,OAAA;AACnB,oDAAsD;AAA9C,yGAAA,eAAe,OAAA;AACzB,qCAAqC;AACpC,cAAc;AACb,sEAA+D;AAAvD,kHAAA,eAAe,OAAA;AACzB,8BAA8B;AAC7B,cAAc;AACb,wDAA2D;AAAnD,8GAAA,kBAAkB,OAAA;AAC5B,+BAA+B;AAC9B,cAAc;AACb,0DAAmD;AAA3C,sGAAA,SAAS,OAAA;AACnB,0CAA0C;AACzC,cAAc;AACb,gFAAyE;AAAjE,4HAAA,oBAAoB,OAAA;AAC9B,+BAA+B;AAC9B,cAAc;AACb,gEAAyD;AAAjD,kHAAA,eAAe,OAAA;AACzB,6BAA6B;AAC5B,cAAc;AACb,4DAAqD;AAA7C,8GAAA,aAAa,OAAA;AACrB,4DAAoD;AAA5C,6GAAA,YAAY,OAAA;AACtB,gCAAgC;AAC/B,cAAc;AACb,kEAAyD;AAAjD,kHAAA,cAAc,OAAA;AACtB,kEAA8D;AAAtD,uHAAA,mBAAmB,OAAA;AAC3B,kEAA2D;AAAnD,oHAAA,gBAAgB,OAAA;AAC1B,gCAAgC;AAC/B,cAAc;AACb,kEAA2D;AAAnD,oHAAA,gBAAgB,OAAA;AAC1B,2BAA2B;AAC1B,cAAc;AACb,wDAAiD;AAAzC,0GAAA,WAAW,OAAA;AAInB,0DAAmD;AAA3C,4GAAA,YAAY,OAAA;AACpB,0DAA0D;AAAlD,mHAAA,mBAAmB,OAAA"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// DO NOT EDIT THIS FILE
|
|
2
|
+
// @ts-ignore
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
export { resolvePath } from "./path-resolve/resolvePath.js";
|
|
5
|
+
export { normalizePath } from "./path-resolve/resolvePath.js";
|
|
6
|
+
export { osTempDir } from "./path-resolve/resolvePath.js";
|
|
7
|
+
export { relativePath } from "./path-resolve/resolvePath.js";
|
|
8
|
+
/* error/pretty.ts */
|
|
9
|
+
// Identifiers
|
|
10
|
+
export { setErrorLogRoot } from "./error/pretty.js";
|
|
11
|
+
export { prettyPrintError } from "./error/pretty.js";
|
|
12
|
+
export { prettyFormatError } from "./error/pretty.js";
|
|
13
|
+
export { ExitError } from "./asyncLoad.js";
|
|
14
|
+
export { runMain } from "./asyncLoad.js";
|
|
15
|
+
/* child_process/error.ts */
|
|
16
|
+
// Identifiers
|
|
17
|
+
export { checkChildProcessResult } from "./child_process/error.js";
|
|
18
|
+
export { spawnWithoutOutput } from "./child_process/execa.js";
|
|
19
|
+
export { spawnGetOutput } from "./child_process/execa.js";
|
|
20
|
+
export { spawnGetEverything } from "./child_process/execa.js";
|
|
21
|
+
/* cli-io/output.ts */
|
|
22
|
+
// Identifiers
|
|
23
|
+
export { printLine } from "./cli-io/output.js";
|
|
24
|
+
export { execLazyError } from "./child_process/lateError.js";
|
|
25
|
+
/* fs/exists.ts */
|
|
26
|
+
// Identifiers
|
|
27
|
+
export { existsSync } from "./fs/exists.js";
|
|
28
|
+
export { exists } from "./fs/exists.js";
|
|
29
|
+
export { getEnvironment } from "./environment/getEnvironment.js";
|
|
30
|
+
export { deleteEnvironment } from "./environment/getEnvironment.js";
|
|
31
|
+
export { cleanupEnvironment } from "./environment/getEnvironment.js";
|
|
32
|
+
/* environment/pathEnvironment.ts */
|
|
33
|
+
// Identifiers
|
|
34
|
+
export { PATH_SEPARATOR } from "./environment/pathEnvironment.js";
|
|
35
|
+
export { PathEnvironment } from "./environment/pathEnvironment.js";
|
|
36
|
+
/* environment/findBinary.ts */
|
|
37
|
+
// Identifiers
|
|
38
|
+
export { findBinary } from "./environment/findBinary.js";
|
|
39
|
+
/* child_process/respawn.ts */
|
|
40
|
+
// Identifiers
|
|
41
|
+
export { spawnRecreateEventHandlers } from "./child_process/respawn.js";
|
|
42
|
+
export { trySpawnInScope } from "./child_process/respawn.js";
|
|
43
|
+
export { respawnInScope } from "./child_process/respawn.js";
|
|
44
|
+
/* crypto/md5.ts */
|
|
45
|
+
// Identifiers
|
|
46
|
+
export { md5 } from "./crypto/md5.js";
|
|
47
|
+
/* crypto/sha256.ts */
|
|
48
|
+
// Identifiers
|
|
49
|
+
export { sha256 } from "./crypto/sha256.js";
|
|
50
|
+
/* environment/npmConfig.ts */
|
|
51
|
+
// Identifiers
|
|
52
|
+
export { getNpmConfigValue } from "./environment/npmConfig.js";
|
|
53
|
+
/* error/code.ts */
|
|
54
|
+
// Identifiers
|
|
55
|
+
export { ERRNO_LINUX } from "./error/code.js";
|
|
56
|
+
/* events/dumpEventEmitter.ts */
|
|
57
|
+
// Identifiers
|
|
58
|
+
export { dumpEventEmitterEmit } from "./events/dumpEventEmitter.js";
|
|
59
|
+
/* fs/commandExists.ts */
|
|
60
|
+
// Identifiers
|
|
61
|
+
export { commandInPath } from "./fs/commandExists.js";
|
|
62
|
+
export { commmandInPathSync } from "./fs/commandExists.js";
|
|
63
|
+
/* fs/tempFolder.ts */
|
|
64
|
+
// Identifiers
|
|
65
|
+
export { createTempFolder } from "./fs/tempFolder.js";
|
|
66
|
+
/* fs/weiteChanged.ts */
|
|
67
|
+
// Identifiers
|
|
68
|
+
export { writeFileIfChangeSync } from "./fs/weiteChanged.js";
|
|
69
|
+
export { writeFileIfChange } from "./fs/weiteChanged.js";
|
|
70
|
+
/* log/terminal.ts */
|
|
71
|
+
// Identifiers
|
|
72
|
+
export { WrappedTerminalConsole } from "./log/terminal.js";
|
|
73
|
+
/* path-resolve/findUp.ts */
|
|
74
|
+
// Identifiers
|
|
75
|
+
export { findUpUntil } from "./path-resolve/findUp.js";
|
|
76
|
+
export { findUpUntilSync } from "./path-resolve/findUp.js";
|
|
77
|
+
/* path-resolve/findPackageRoot.ts */
|
|
78
|
+
// Identifiers
|
|
79
|
+
export { findPackageRoot } from "./path-resolve/findPackageRoot.js";
|
|
80
|
+
/* path-resolve/getAllUp.ts */
|
|
81
|
+
// Identifiers
|
|
82
|
+
export { getAllPathUpToRoot } from "./path-resolve/getAllUp.js";
|
|
83
|
+
/* path-resolve/lrelative.ts */
|
|
84
|
+
// Identifiers
|
|
85
|
+
export { lrelative } from "./path-resolve/lrelative.js";
|
|
86
|
+
/* path-resolve/nodeResolvePathArray.ts */
|
|
87
|
+
// Identifiers
|
|
88
|
+
export { nodeResolvePathArray } from "./path-resolve/nodeResolvePathArray.js";
|
|
89
|
+
/* stream/blackHoleStream.ts */
|
|
90
|
+
// Identifiers
|
|
91
|
+
export { BlackHoleStream } from "./stream/blackHoleStream.js";
|
|
92
|
+
/* stream/streamPromise.ts */
|
|
93
|
+
// Identifiers
|
|
94
|
+
export { streamPromise } from "./stream/streamPromise.js";
|
|
95
|
+
export { streamHasEnd } from "./stream/streamPromise.js";
|
|
96
|
+
/* stream/collectingStream.ts */
|
|
97
|
+
// Identifiers
|
|
98
|
+
export { streamToBuffer } from "./stream/collectingStream.js";
|
|
99
|
+
export { RawCollectingStream } from "./stream/collectingStream.js";
|
|
100
|
+
export { CollectingStream } from "./stream/collectingStream.js";
|
|
101
|
+
/* stream/disposableStream.ts */
|
|
102
|
+
// Identifiers
|
|
103
|
+
export { disposableStream } from "./stream/disposableStream.js";
|
|
104
|
+
/* stream/drainStream.ts */
|
|
105
|
+
// Identifiers
|
|
106
|
+
export { drainStream } from "./stream/drainStream.js";
|
|
107
|
+
export { LoggerStream } from "./stream/loggerStream.js";
|
|
108
|
+
export { HexDumpLoggerStream } from "./stream/loggerStream.js";
|
|
109
|
+
//# sourceMappingURL=index.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.generated.js","sourceRoot":"","sources":["../src/index.generated.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,aAAa;AACb,oBAAoB;AAMlB,OAAO,EAAC,WAAW,EAAC,sCAAmC;AAEvD,OAAO,EAAC,aAAa,EAAC,sCAAmC;AACzD,OAAO,EAAC,SAAS,EA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kC;AAC7D,gCAAgC;AAC/B,cAAc;AACb,OAAO,EAAC,gBAAgB,EAAC,qCAAkC;AAC7D,2BAA2B;AAC1B,cAAc;AACb,OAAO,EAAC,WAAW,EAAC,gCAA6B;AAIjD,OAAO,EAAC,YAAY,EAAC,iCAA8B;AACnD,OAAO,EAAC,mBAAmB,EAAC,iCAA8B"}
|
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idlebox/node",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.10",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"main": "./
|
|
7
|
-
"module": "./lib/
|
|
6
|
+
"main": "./fix_esm_loader.cjs",
|
|
7
|
+
"module": "./lib/index.generated.js",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"import": "./lib/
|
|
11
|
-
"require": "./
|
|
10
|
+
"import": "./lib/index.generated.js",
|
|
11
|
+
"require": "./fix_esm_loader.cjs"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"types": "dist/node-public.d.ts",
|
|
15
15
|
"repository": "https://github.com/GongT/baobao",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@gongt/fix-esm": "^0.0.
|
|
18
|
-
"@idlebox/common": "^1.3.
|
|
17
|
+
"@gongt/fix-esm": "^0.0.8",
|
|
18
|
+
"@idlebox/common": "^1.3.12",
|
|
19
19
|
"execa": "^6.1.0",
|
|
20
20
|
"source-map-support": "^0.5.21",
|
|
21
21
|
"tslib": "^2.4.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@build-script/heft-duel-stack": "^1.0.
|
|
24
|
+
"@build-script/heft-duel-stack": "^1.0.4",
|
|
25
25
|
"@build-script/single-dog-asset": "^1.0.22",
|
|
26
|
-
"@build-script/typescript-transformer-dual-package": "^2.0.
|
|
27
|
-
"@gongt/kexec": "
|
|
28
|
-
"@rushstack/heft": "^0.
|
|
29
|
-
"@types/node": "^18.
|
|
26
|
+
"@build-script/typescript-transformer-dual-package": "^2.0.2",
|
|
27
|
+
"@gongt/kexec": "^3.0.0",
|
|
28
|
+
"@rushstack/heft": "^0.47.2",
|
|
29
|
+
"@types/node": "^18.7.2",
|
|
30
30
|
"chai": "^4.3.6",
|
|
31
31
|
"fs-extra": "^10.1.0",
|
|
32
32
|
"gulp": "^4.0.2",
|