tnp-core 13.1.19 → 13.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/app.d.ts +1 -1
- package/app.js +6 -6
- package/browser/README.md +24 -24
- package/browser/esm2020/lib/core-config.mjs +5 -5
- package/browser/esm2020/lib/core-imports.mjs +107 -107
- package/browser/esm2020/lib/core-models.mjs +1 -1
- package/browser/esm2020/lib/helpers-isomorphic.mjs +34 -53
- package/browser/esm2020/lib/helpers-messages.mjs +434 -434
- package/browser/esm2020/lib/helpers.mjs +939 -939
- package/browser/esm2020/lib/index.mjs +7 -7
- package/browser/esm2020/lib/progress-data.mjs +50 -50
- package/browser/esm2020/public-api.mjs +1 -1
- package/browser/esm2020/tnp-core.mjs +4 -4
- package/browser/fesm2015/tnp-core.mjs +1553 -1571
- package/browser/fesm2015/tnp-core.mjs.map +1 -1
- package/browser/fesm2020/tnp-core.mjs +1551 -1569
- package/browser/fesm2020/tnp-core.mjs.map +1 -1
- package/browser/lib/core-config.d.ts +5 -5
- package/browser/lib/core-imports.d.ts +6 -6
- package/browser/lib/core-models.d.ts +42 -42
- package/browser/lib/helpers-isomorphic.d.ts +6 -7
- package/browser/lib/helpers-messages.d.ts +11 -11
- package/browser/lib/helpers.d.ts +33 -33
- package/browser/lib/index.d.ts +7 -7
- package/browser/lib/progress-data.d.ts +18 -18
- package/browser/public-api.d.ts +1 -1
- package/browser/tnp-core.d.ts +5 -5
- package/client/README.md +24 -24
- package/client/esm2020/lib/core-config.mjs +5 -5
- package/client/esm2020/lib/core-imports.mjs +107 -107
- package/client/esm2020/lib/core-models.mjs +1 -1
- package/client/esm2020/lib/helpers-isomorphic.mjs +34 -53
- package/client/esm2020/lib/helpers-messages.mjs +434 -434
- package/client/esm2020/lib/helpers.mjs +939 -939
- package/client/esm2020/lib/index.mjs +7 -7
- package/client/esm2020/lib/progress-data.mjs +50 -50
- package/client/esm2020/public-api.mjs +1 -1
- package/client/esm2020/tnp-core.mjs +4 -4
- package/client/fesm2015/tnp-core.mjs +1553 -1571
- package/client/fesm2015/tnp-core.mjs.map +1 -1
- package/client/fesm2020/tnp-core.mjs +1551 -1569
- package/client/fesm2020/tnp-core.mjs.map +1 -1
- package/client/lib/core-config.d.ts +5 -5
- package/client/lib/core-imports.d.ts +6 -6
- package/client/lib/core-models.d.ts +42 -42
- package/client/lib/helpers-isomorphic.d.ts +6 -7
- package/client/lib/helpers-messages.d.ts +11 -11
- package/client/lib/helpers.d.ts +33 -33
- package/client/lib/index.d.ts +7 -7
- package/client/lib/progress-data.d.ts +18 -18
- package/client/public-api.d.ts +1 -1
- package/client/tnp-core.d.ts +5 -5
- package/index.d.ts +1 -1
- package/index.js +5 -5
- package/lib/core-config.d.ts +5 -5
- package/lib/core-config.js +9 -9
- package/lib/core-imports.d.ts +31 -31
- package/lib/core-imports.js +113 -113
- package/lib/core-models.d.ts +42 -42
- package/lib/core-models.js +3 -3
- package/lib/helpers-isomorphic.d.ts +6 -9
- package/lib/helpers-isomorphic.js +56 -74
- package/lib/helpers-isomorphic.js.map +1 -1
- package/lib/helpers-messages.d.ts +11 -11
- package/lib/helpers-messages.js +474 -474
- package/lib/helpers.d.ts +111 -111
- package/lib/helpers.js +1127 -1127
- package/lib/index.d.ts +7 -7
- package/lib/index.js +13 -13
- package/lib/progress-data.d.ts +18 -18
- package/lib/progress-data.js +59 -59
- package/lib/public-api.d.ts +7 -7
- package/lib/public-api.js +13 -13
- package/package.json +2 -2
- package/package.json_devDependencies.json +202 -202
- package/package.json_tnp.json5 +62 -62
- package/tmp-environment.json +13 -12
- package/websql/README.md +24 -24
- package/websql/esm2020/lib/core-config.mjs +5 -5
- package/websql/esm2020/lib/core-imports.mjs +108 -108
- package/websql/esm2020/lib/core-models.mjs +1 -1
- package/websql/esm2020/lib/helpers-isomorphic.mjs +35 -55
- package/websql/esm2020/lib/helpers-messages.mjs +434 -434
- package/websql/esm2020/lib/helpers.mjs +939 -939
- package/websql/esm2020/lib/index.mjs +7 -7
- package/websql/esm2020/lib/progress-data.mjs +50 -50
- package/websql/esm2020/public-api.mjs +1 -1
- package/websql/esm2020/tnp-core.mjs +4 -4
- package/websql/fesm2015/tnp-core.mjs +1548 -1567
- package/websql/fesm2015/tnp-core.mjs.map +1 -1
- package/websql/fesm2020/tnp-core.mjs +1546 -1565
- package/websql/fesm2020/tnp-core.mjs.map +1 -1
- package/websql/lib/core-config.d.ts +5 -5
- package/websql/lib/core-imports.d.ts +8 -8
- package/websql/lib/core-models.d.ts +42 -42
- package/websql/lib/helpers-isomorphic.d.ts +6 -9
- package/websql/lib/helpers-messages.d.ts +11 -11
- package/websql/lib/helpers.d.ts +33 -33
- package/websql/lib/index.d.ts +7 -7
- package/websql/lib/progress-data.d.ts +18 -18
- package/websql/public-api.d.ts +1 -1
- package/websql/tnp-core.d.ts +5 -5
package/lib/helpers.d.ts
CHANGED
@@ -1,111 +1,111 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
import { child_process } from './core-imports';
|
3
|
-
import { HelpersMessages } from './helpers-messages';
|
4
|
-
import { ExecuteOptions, RunOptions } from './core-models';
|
5
|
-
export declare class HelpersCore extends HelpersMessages {
|
6
|
-
private static _instanceCore;
|
7
|
-
static get InstanceCore(): HelpersCore;
|
8
|
-
cleanExit(): void;
|
9
|
-
readonly bigMaxBuffer: number;
|
10
|
-
constructor();
|
11
|
-
removeSlashAtEnd(s: string): string;
|
12
|
-
removeSlashAtBegin(s: string): string;
|
13
|
-
stringify(inputObject: any): string;
|
14
|
-
runSyncOrAsync(fn: Function | [string, object], ...firstArg: any[]): Promise<any>;
|
15
|
-
readonly processes: child_process.ChildProcess[];
|
16
|
-
createSymLink(existedFileOrFolder: string, destinationPath: string, options?: {
|
17
|
-
continueWhenExistedFolderDoesntExists?: boolean;
|
18
|
-
windowsHardLink?: boolean;
|
19
|
-
dontRenameWhenSlashAtEnd?: boolean;
|
20
|
-
allowNotAbsolutePathes?: boolean;
|
21
|
-
/**
|
22
|
-
* only if you know that symlink can be created
|
23
|
-
*/
|
24
|
-
speedUpProcess?: boolean;
|
25
|
-
}): void;
|
26
|
-
mkdirp(folderPath: string | string[]): void;
|
27
|
-
/**
|
28
|
-
* symlink may have existed or unexisted destiantion url
|
29
|
-
* @param destUrl M
|
30
|
-
*/
|
31
|
-
isSymlinkThatMatchesUrl(possibleSymlink: string, destUrl: string, absoluteFileMatch?: boolean): boolean;
|
32
|
-
isSymlinkFileExitedOrUnexisted(filePath: string): boolean;
|
33
|
-
/**
|
34
|
-
* If symbolnk link that target file does not exits
|
35
|
-
*/
|
36
|
-
isUnexistedLink(filePath: string): boolean;
|
37
|
-
/**
|
38
|
-
* @param existedLink check if source of link exists
|
39
|
-
*/
|
40
|
-
isExistedSymlink(filePath: string): boolean;
|
41
|
-
pathContainLink(p: string): boolean;
|
42
|
-
exists(folderOrFilePath: string | string[]): boolean;
|
43
|
-
command(command: string): {
|
44
|
-
getherOutput(options?: {
|
45
|
-
ommitStder: boolean;
|
46
|
-
cwd: string;
|
47
|
-
biggerBuffer: boolean;
|
48
|
-
gatherColors: boolean;
|
49
|
-
}): Promise<string>;
|
50
|
-
};
|
51
|
-
run(command: string, options?: RunOptions): {
|
52
|
-
sync(): string;
|
53
|
-
async(detach?: boolean): child_process.ChildProcess;
|
54
|
-
asyncAsPromise(): any;
|
55
|
-
unitlOutputContains(stdoutMsg: string | string[], stderMsg?: string | string[]): Promise<any>;
|
56
|
-
};
|
57
|
-
get isRunningIn(): {
|
58
|
-
mochaTest(): boolean;
|
59
|
-
cliMode(): boolean;
|
60
|
-
};
|
61
|
-
getStdio(options?: RunOptions): any;
|
62
|
-
runSyncIn(command: string, options?: RunOptions): string;
|
63
|
-
runAsyncIn(command: string, options?: RunOptions): child_process.ChildProcess;
|
64
|
-
logProc(proc: child_process.ChildProcess, output: boolean, stdio: any, outputLineReplace: (outputLine: string) => string, prefix: string, extractFromLine?: (string | Function)[], command?: string): child_process.ChildProcess;
|
65
|
-
execute(childProcess: child_process.ChildProcess, options?: ExecuteOptions): Promise<unknown>;
|
66
|
-
checkProcess(dirPath: string, command: string): void;
|
67
|
-
modifyLineByLine(data: string | Buffer | Error, outputLineReplace: (outputLine: string) => string, prefix: string, extractFromLine?: (string | Function)[]): string;
|
68
|
-
isFolder(pathToFileOrMaybeFolder: string): boolean;
|
69
|
-
/**
|
70
|
-
* Quick fix for object values
|
71
|
-
*/
|
72
|
-
values(obj: any): any[];
|
73
|
-
/**
|
74
|
-
* does not make sense
|
75
|
-
*/
|
76
|
-
private isFile;
|
77
|
-
/**
|
78
|
-
* wrapper for fs.readFileSync
|
79
|
-
*/
|
80
|
-
readFile(absoluteFilePath: string | string[], defaultValueWhenNotExists?: string): string | undefined;
|
81
|
-
readJson(absoluteFilePath: string | string[], defaultValue?: {}, useJson5?: boolean): any;
|
82
|
-
parse<T = any>(jsonInstring: string, useJson5?: boolean): T;
|
83
|
-
compilationWrapper(fn: () => void, taskName?: string, executionType?: 'Compilation of' | 'Code execution of' | 'Event:'): Promise<void>;
|
84
|
-
/**
|
85
|
-
* wrapper for fs.writeFileSync
|
86
|
-
*/
|
87
|
-
writeFile(absoluteFilePath: string | (string[]), input: string | object, options?: {
|
88
|
-
overrideSameFile?: boolean;
|
89
|
-
preventParentFile?: boolean;
|
90
|
-
}): boolean;
|
91
|
-
/**
|
92
|
-
* wrapper for fs.writeFileSync
|
93
|
-
*/
|
94
|
-
writeJson(absoluteFilePath: string | (string[]), input: object, optoins?: {
|
95
|
-
preventParentFile?: boolean;
|
96
|
-
}): boolean;
|
97
|
-
/**
|
98
|
-
* return absolute paths for folders inside folders
|
99
|
-
*/
|
100
|
-
foldersFrom(pathToFolder: string | string[]): string[];
|
101
|
-
linksToFoldersFrom(pathToFolder: string | string[], outputRealPath?: boolean): string[];
|
102
|
-
/**
|
103
|
-
* return absolute paths for folders inside folders
|
104
|
-
*/
|
105
|
-
linksToFolderFrom(pathToFolder: string | string[]): string[];
|
106
|
-
/**
|
107
|
-
* return absolute paths for folders inside folders
|
108
|
-
*/
|
109
|
-
filesFrom(pathToFolder: string | string[], recrusive?: boolean): string[];
|
110
|
-
openFolderInFileExploer(folderPath: string): void;
|
111
|
-
}
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { child_process } from './core-imports';
|
3
|
+
import { HelpersMessages } from './helpers-messages';
|
4
|
+
import { ExecuteOptions, RunOptions } from './core-models';
|
5
|
+
export declare class HelpersCore extends HelpersMessages {
|
6
|
+
private static _instanceCore;
|
7
|
+
static get InstanceCore(): HelpersCore;
|
8
|
+
cleanExit(): void;
|
9
|
+
readonly bigMaxBuffer: number;
|
10
|
+
constructor();
|
11
|
+
removeSlashAtEnd(s: string): string;
|
12
|
+
removeSlashAtBegin(s: string): string;
|
13
|
+
stringify(inputObject: any): string;
|
14
|
+
runSyncOrAsync(fn: Function | [string, object], ...firstArg: any[]): Promise<any>;
|
15
|
+
readonly processes: child_process.ChildProcess[];
|
16
|
+
createSymLink(existedFileOrFolder: string, destinationPath: string, options?: {
|
17
|
+
continueWhenExistedFolderDoesntExists?: boolean;
|
18
|
+
windowsHardLink?: boolean;
|
19
|
+
dontRenameWhenSlashAtEnd?: boolean;
|
20
|
+
allowNotAbsolutePathes?: boolean;
|
21
|
+
/**
|
22
|
+
* only if you know that symlink can be created
|
23
|
+
*/
|
24
|
+
speedUpProcess?: boolean;
|
25
|
+
}): void;
|
26
|
+
mkdirp(folderPath: string | string[]): void;
|
27
|
+
/**
|
28
|
+
* symlink may have existed or unexisted destiantion url
|
29
|
+
* @param destUrl M
|
30
|
+
*/
|
31
|
+
isSymlinkThatMatchesUrl(possibleSymlink: string, destUrl: string, absoluteFileMatch?: boolean): boolean;
|
32
|
+
isSymlinkFileExitedOrUnexisted(filePath: string): boolean;
|
33
|
+
/**
|
34
|
+
* If symbolnk link that target file does not exits
|
35
|
+
*/
|
36
|
+
isUnexistedLink(filePath: string): boolean;
|
37
|
+
/**
|
38
|
+
* @param existedLink check if source of link exists
|
39
|
+
*/
|
40
|
+
isExistedSymlink(filePath: string): boolean;
|
41
|
+
pathContainLink(p: string): boolean;
|
42
|
+
exists(folderOrFilePath: string | string[]): boolean;
|
43
|
+
command(command: string): {
|
44
|
+
getherOutput(options?: {
|
45
|
+
ommitStder: boolean;
|
46
|
+
cwd: string;
|
47
|
+
biggerBuffer: boolean;
|
48
|
+
gatherColors: boolean;
|
49
|
+
}): Promise<string>;
|
50
|
+
};
|
51
|
+
run(command: string, options?: RunOptions): {
|
52
|
+
sync(): string;
|
53
|
+
async(detach?: boolean): child_process.ChildProcess;
|
54
|
+
asyncAsPromise(): any;
|
55
|
+
unitlOutputContains(stdoutMsg: string | string[], stderMsg?: string | string[]): Promise<any>;
|
56
|
+
};
|
57
|
+
get isRunningIn(): {
|
58
|
+
mochaTest(): boolean;
|
59
|
+
cliMode(): boolean;
|
60
|
+
};
|
61
|
+
getStdio(options?: RunOptions): any;
|
62
|
+
runSyncIn(command: string, options?: RunOptions): string;
|
63
|
+
runAsyncIn(command: string, options?: RunOptions): child_process.ChildProcess;
|
64
|
+
logProc(proc: child_process.ChildProcess, output: boolean, stdio: any, outputLineReplace: (outputLine: string) => string, prefix: string, extractFromLine?: (string | Function)[], command?: string): child_process.ChildProcess;
|
65
|
+
execute(childProcess: child_process.ChildProcess, options?: ExecuteOptions): Promise<unknown>;
|
66
|
+
checkProcess(dirPath: string, command: string): void;
|
67
|
+
modifyLineByLine(data: string | Buffer | Error, outputLineReplace: (outputLine: string) => string, prefix: string, extractFromLine?: (string | Function)[]): string;
|
68
|
+
isFolder(pathToFileOrMaybeFolder: string): boolean;
|
69
|
+
/**
|
70
|
+
* Quick fix for object values
|
71
|
+
*/
|
72
|
+
values(obj: any): any[];
|
73
|
+
/**
|
74
|
+
* does not make sense
|
75
|
+
*/
|
76
|
+
private isFile;
|
77
|
+
/**
|
78
|
+
* wrapper for fs.readFileSync
|
79
|
+
*/
|
80
|
+
readFile(absoluteFilePath: string | string[], defaultValueWhenNotExists?: string): string | undefined;
|
81
|
+
readJson(absoluteFilePath: string | string[], defaultValue?: {}, useJson5?: boolean): any;
|
82
|
+
parse<T = any>(jsonInstring: string, useJson5?: boolean): T;
|
83
|
+
compilationWrapper(fn: () => void, taskName?: string, executionType?: 'Compilation of' | 'Code execution of' | 'Event:'): Promise<void>;
|
84
|
+
/**
|
85
|
+
* wrapper for fs.writeFileSync
|
86
|
+
*/
|
87
|
+
writeFile(absoluteFilePath: string | (string[]), input: string | object, options?: {
|
88
|
+
overrideSameFile?: boolean;
|
89
|
+
preventParentFile?: boolean;
|
90
|
+
}): boolean;
|
91
|
+
/**
|
92
|
+
* wrapper for fs.writeFileSync
|
93
|
+
*/
|
94
|
+
writeJson(absoluteFilePath: string | (string[]), input: object, optoins?: {
|
95
|
+
preventParentFile?: boolean;
|
96
|
+
}): boolean;
|
97
|
+
/**
|
98
|
+
* return absolute paths for folders inside folders
|
99
|
+
*/
|
100
|
+
foldersFrom(pathToFolder: string | string[]): string[];
|
101
|
+
linksToFoldersFrom(pathToFolder: string | string[], outputRealPath?: boolean): string[];
|
102
|
+
/**
|
103
|
+
* return absolute paths for folders inside folders
|
104
|
+
*/
|
105
|
+
linksToFolderFrom(pathToFolder: string | string[]): string[];
|
106
|
+
/**
|
107
|
+
* return absolute paths for folders inside folders
|
108
|
+
*/
|
109
|
+
filesFrom(pathToFolder: string | string[], recrusive?: boolean): string[];
|
110
|
+
openFolderInFileExploer(folderPath: string): void;
|
111
|
+
}
|