tnp-helpers 19.0.22 → 19.0.25
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/browser/fesm2022/tnp-helpers.mjs +157 -3
- package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
- package/browser/lib/base/classes/base-project.d.ts +3 -1
- package/browser/lib/build-info._auto-generated_.d.ts +1 -1
- package/browser/lib/utils.d.ts +9 -0
- package/browser/package.json +1 -1
- package/client/package.json +1 -1
- package/lib/base/classes/base-command-line-feature.backend.js +1 -1
- package/lib/base/classes/base-command-line-feature.backend.js.map +1 -1
- package/lib/base/classes/base-linked-projects.js +24 -1
- package/lib/base/classes/base-linked-projects.js.map +1 -1
- package/lib/base/classes/base-project.d.ts +3 -1
- package/lib/base/classes/base-project.js +5 -1
- package/lib/base/classes/base-project.js.map +1 -1
- package/lib/base/tcp-udp-ports/not-assignable-port.entity.js +2 -2
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/env/env.angular-node-app.d.ts +13 -0
- package/lib/env/env.angular-node-app.js +19 -0
- package/lib/env/env.angular-node-app.js.map +1 -0
- package/lib/env/env.electron-app.d.ts +13 -0
- package/lib/env/env.electron-app.js +19 -0
- package/lib/env/env.electron-app.js.map +1 -0
- package/lib/env/env.mobile-app.d.ts +13 -0
- package/lib/env/env.mobile-app.js +19 -0
- package/lib/env/env.mobile-app.js.map +1 -0
- package/lib/env/env.npm-lib-and-cli-tool.d.ts +13 -0
- package/lib/env/env.npm-lib-and-cli-tool.js +19 -0
- package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -0
- package/lib/env/env.vscode-plugin.d.ts +13 -0
- package/lib/env/env.vscode-plugin.js +19 -0
- package/lib/env/env.vscode-plugin.js.map +1 -0
- package/lib/env/index.d.ts +5 -0
- package/lib/env/index.js +22 -0
- package/lib/env/index.js.map +1 -0
- package/lib/helpers/for-browser/angular.helper.js +2 -2
- package/lib/old/base-component.js +2 -2
- package/lib/old/base-formly-component.js +2 -2
- package/lib/old/dual-component-ctrl.js +2 -2
- package/lib/utils.d.ts +9 -0
- package/lib/utils.js +129 -1
- package/lib/utils.js.map +1 -1
- package/package.json +1 -1
- package/tmp-environment.json +5 -15
- package/websql/fesm2022/tnp-helpers.mjs +157 -3
- package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
- package/websql/lib/base/classes/base-project.d.ts +3 -1
- package/websql/lib/build-info._auto-generated_.d.ts +1 -1
- package/websql/lib/utils.d.ts +9 -0
- package/websql/package.json +1 -1
- package/client/README.md +0 -24
- package/client/fesm2022/tnp-helpers.mjs +0 -14624
- package/client/fesm2022/tnp-helpers.mjs.map +0 -1
- package/client/index.d.ts +0 -6
- package/client/lib/base/classes/base-bower-json.d.ts +0 -35
- package/client/lib/base/classes/base-cli-worker/base-cli-worker-config.d.ts +0 -28
- package/client/lib/base/classes/base-cli-worker/base-cli-worker-controller.d.ts +0 -16
- package/client/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.d.ts +0 -40
- package/client/lib/base/classes/base-cli-worker/base-cli-worker.d.ts +0 -90
- package/client/lib/base/classes/base-cli-worker/index.d.ts +0 -5
- package/client/lib/base/classes/base-compiler-for-project.d.ts +0 -8
- package/client/lib/base/classes/base-db.d.ts +0 -10
- package/client/lib/base/classes/base-debounce-compiler-for-project.d.ts +0 -29
- package/client/lib/base/classes/base-feature-for-project.d.ts +0 -7
- package/client/lib/base/classes/base-git.d.ts +0 -193
- package/client/lib/base/classes/base-json-file-reader.d.ts +0 -72
- package/client/lib/base/classes/base-library-build.d.ts +0 -62
- package/client/lib/base/classes/base-linked-projects.d.ts +0 -23
- package/client/lib/base/classes/base-node-modules.d.ts +0 -62
- package/client/lib/base/classes/base-npm-helpers.d.ts +0 -52
- package/client/lib/base/classes/base-package-json.d.ts +0 -108
- package/client/lib/base/classes/base-process-manager.d.ts +0 -31
- package/client/lib/base/classes/base-project-resolver.d.ts +0 -41
- package/client/lib/base/classes/base-project.d.ts +0 -245
- package/client/lib/base/classes/base-quick-fixes.d.ts +0 -16
- package/client/lib/base/classes/base-release-process.d.ts +0 -73
- package/client/lib/base/classes/base-static-pages.d.ts +0 -15
- package/client/lib/base/classes/base-vscode.d.ts +0 -37
- package/client/lib/base/classes/index.d.ts +0 -18
- package/client/lib/base/commit-data.d.ts +0 -94
- package/client/lib/base/config-database.d.ts +0 -15
- package/client/lib/base/core-project.d.ts +0 -100
- package/client/lib/base/index.d.ts +0 -6
- package/client/lib/base/linked-project.d.ts +0 -41
- package/client/lib/base/project-database.d.ts +0 -13
- package/client/lib/base/tcp-udp-ports/index.d.ts +0 -4
- package/client/lib/base/tcp-udp-ports/ports.controller.d.ts +0 -29
- package/client/lib/base/tcp-udp-ports/ports.entity.d.ts +0 -19
- package/client/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +0 -26
- package/client/lib/base/tcp-udp-ports/tcp-upd-ports-terminal-ui.d.ts +0 -20
- package/client/lib/base/tcp-udp-ports/tcp-upd-ports.worker.d.ts +0 -9
- package/client/lib/base/translate.d.ts +0 -228
- package/client/lib/build-info._auto-generated_.d.ts +0 -4
- package/client/lib/helpers/for-backend/helpers-file-folders.d.ts +0 -112
- package/client/lib/helpers/for-backend/helpers-process.d.ts +0 -88
- package/client/lib/helpers/for-browser/angular.helper.d.ts +0 -37
- package/client/lib/helpers/for-browser/helpers-browser.d.ts +0 -12
- package/client/lib/helpers/helpers-array-obj.d.ts +0 -32
- package/client/lib/helpers/helpers-numbers.d.ts +0 -8
- package/client/lib/helpers/helpers-strings-regexes.d.ts +0 -29
- package/client/lib/helpers/helpers-strings.d.ts +0 -56
- package/client/lib/helpers/helpers.d.ts +0 -93
- package/client/lib/index.d.ts +0 -10
- package/client/lib/models.d.ts +0 -141
- package/client/lib/old/execute-command.d.ts +0 -12
- package/client/lib/old/helpers.d.ts +0 -62
- package/client/lib/old/models.d.ts +0 -81
- package/client/lib/utils.d.ts +0 -153
- package/client/lib/validators/validators-git.d.ts +0 -4
- package/client/lib/validators/validators-network.d.ts +0 -4
- package/client/lib/validators/validators.d.ts +0 -7
- package/client/migrations/1736198527297_init.d.ts +0 -19
- package/client/migrations/1736199486472_addingNotAssignablePorts.d.ts +0 -11
- package/client/migrations/1736454437350_addFreePorts.d.ts +0 -10
- package/client/migrations/index.d.ts +0 -2
- package/client/migrations/migrations_index._auto-generated_.d.ts +0 -12
- package/client/public-api.d.ts +0 -2
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import type { CopyOptionsSync } from 'fs-extra';
|
|
3
|
-
export interface GetRecrusiveFilesFromOptions {
|
|
4
|
-
}
|
|
5
|
-
export declare class HelpersFileFolders {
|
|
6
|
-
/**
|
|
7
|
-
* Calculate file or string checksum
|
|
8
|
-
*/
|
|
9
|
-
checksum(absolutePathToFileOrContent: string, algorithm?: 'md5' | 'sha1'): any;
|
|
10
|
-
getValueFromJSON(filepath: string, lodashGetPath: string, defaultValue?: any): any;
|
|
11
|
-
getValueFromJSONC(filepath: string, lodashGetPath: string, defaultValue?: any): any;
|
|
12
|
-
readValueFromJson(filepath: string, lodashGetPath: string, defaultValue?: any): any;
|
|
13
|
-
readValueFromJsonC(filepath: string, lodashGetPath: string, defaultValue?: any): any;
|
|
14
|
-
setValueToJSON(filepath: string | string[], lodashGetPath: string, value: any): void;
|
|
15
|
-
setValueToJSONC(filepath: string, lodashGetPath: string, value: any): void;
|
|
16
|
-
/**
|
|
17
|
-
* file size in bytes
|
|
18
|
-
*/
|
|
19
|
-
size(filePath: string): number;
|
|
20
|
-
pathFromLink(filePath: string): string;
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated
|
|
23
|
-
*/
|
|
24
|
-
renameFolder(from: string, to: string, cwd?: string): void;
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated
|
|
27
|
-
*/
|
|
28
|
-
renameFiles(from: string, to: string, cwd?: string): void;
|
|
29
|
-
getTempFolder(): any;
|
|
30
|
-
isPlainFileOrFolder(filePath: string): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated
|
|
33
|
-
* use import (or modules only on backend)
|
|
34
|
-
*/
|
|
35
|
-
requireUncached(module: string): any;
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated
|
|
38
|
-
* use import (or modules only on backend)
|
|
39
|
-
*
|
|
40
|
-
* get default export object from js file
|
|
41
|
-
* @param jsFilePath
|
|
42
|
-
*/
|
|
43
|
-
require(jsFilePath: string): any;
|
|
44
|
-
tryRecreateDir(dirpath: string): void;
|
|
45
|
-
/**
|
|
46
|
-
* @deprecated
|
|
47
|
-
*/
|
|
48
|
-
tryCopyFrom(source: string, destination: string, options?: {}): void;
|
|
49
|
-
move(from: string, to: string): void;
|
|
50
|
-
findChildren<T>(location: string, createFn: (childLocation: string) => T, options?: {
|
|
51
|
-
allowAllNames: boolean;
|
|
52
|
-
}): T[];
|
|
53
|
-
/**
|
|
54
|
-
* @deprecated
|
|
55
|
-
*/
|
|
56
|
-
findChildrenNavi<T>(location: string, createFn: (childLocation: string) => T): T[];
|
|
57
|
-
/**
|
|
58
|
-
* get all files from folder
|
|
59
|
-
* absolute paths
|
|
60
|
-
*/
|
|
61
|
-
getRecrusiveFilesFrom(dir: string, ommitFolders?: string[], options?: GetRecrusiveFilesFromOptions): string[];
|
|
62
|
-
checkIfNameAllowedForTaonProj(folderName: string): boolean;
|
|
63
|
-
getLinesFromFiles(filename: string, lineCount?: number): Promise<string[]>;
|
|
64
|
-
/**
|
|
65
|
-
* Get the most recent changes file in direcory
|
|
66
|
-
* @param dir absoulute path to file
|
|
67
|
-
*/
|
|
68
|
-
getMostRecentFileName(dir: string): string;
|
|
69
|
-
getMostRecentFilesNames(dir: string): string[];
|
|
70
|
-
removeExcept(fromPath: string, exceptFolderAndFiles: string[]): void;
|
|
71
|
-
/**
|
|
72
|
-
* Copy folder using os native command
|
|
73
|
-
* (perfect for large folders/files)
|
|
74
|
-
*/
|
|
75
|
-
copyFolderOsNative(from: string, to: string, options?: {
|
|
76
|
-
removeDestination?: boolean;
|
|
77
|
-
}): Promise<void>;
|
|
78
|
-
copy(sourceDir: string | string[], destinationDir: string | string[], options?: {
|
|
79
|
-
filter?: any;
|
|
80
|
-
overwrite?: boolean;
|
|
81
|
-
recursive?: boolean;
|
|
82
|
-
asSeparatedFiles?: boolean;
|
|
83
|
-
asSeparatedFilesAllowNotCopied?: boolean;
|
|
84
|
-
asSeparatedFilesSymlinkAsFile?: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* folders to omit: example: ['src','node_modules']
|
|
87
|
-
*
|
|
88
|
-
* This option works only with omitFoldersBaseFolder
|
|
89
|
-
*/
|
|
90
|
-
omitFolders?: string[];
|
|
91
|
-
/**
|
|
92
|
-
* absolute path for base folder for omitFolder option
|
|
93
|
-
*/
|
|
94
|
-
omitFoldersBaseFolder?: string;
|
|
95
|
-
copySymlinksAsFiles?: boolean;
|
|
96
|
-
copySymlinksAsFilesDeleteUnexistedLinksFromSourceFirst?: boolean;
|
|
97
|
-
useTempFolder?: boolean;
|
|
98
|
-
dontAskOnError?: boolean;
|
|
99
|
-
} & CopyOptionsSync): void;
|
|
100
|
-
filterDontCopy(basePathFoldersTosSkip: string[], projectOrBasepath: string): any;
|
|
101
|
-
filterOnlyCopy(basePathFoldersOnlyToInclude: string[], projectOrBasepath: string): any;
|
|
102
|
-
copyFile(sourcePath: string, destinationPath: string, options?: {
|
|
103
|
-
transformTextFn?: (input: string) => string;
|
|
104
|
-
debugMode?: boolean;
|
|
105
|
-
fast?: boolean;
|
|
106
|
-
dontCopySameContent?: boolean;
|
|
107
|
-
}): boolean;
|
|
108
|
-
/**
|
|
109
|
-
* get real absolute path
|
|
110
|
-
*/
|
|
111
|
-
resolve(fileOrFolderPath: string): string;
|
|
112
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import type { ChildProcess } from 'child_process';
|
|
3
|
-
import { Level } from 'ng2-logger/browser';
|
|
4
|
-
export declare class HelpersProcess {
|
|
5
|
-
restartApplicationItself(nameOfApp: string): Promise<any>;
|
|
6
|
-
osIsMacOs(versino: 'big-sur' | 'catalina'): any;
|
|
7
|
-
generatedFileWrap(content: string): any;
|
|
8
|
-
changeCwdWrapper(dir: string, functionToExecure: Function, logLevel?: Level): Promise<any>;
|
|
9
|
-
changeCwd(dir?: string): any;
|
|
10
|
-
/**
|
|
11
|
-
* // TODO refactor this
|
|
12
|
-
* @deprecated
|
|
13
|
-
*/
|
|
14
|
-
goToDir(dir?: string): any;
|
|
15
|
-
pressKeyOrWait(message?: string, printWaitMessages?: number): Promise<any>;
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated use UtilsTerminal.pressAnyKey
|
|
18
|
-
*/
|
|
19
|
-
pressKeyAndContinue(message?: string): any;
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated use UtilsTerminal.multiselect
|
|
22
|
-
*/
|
|
23
|
-
list<T = string>(question: string, choices: {
|
|
24
|
-
name: string;
|
|
25
|
-
value: T;
|
|
26
|
-
}[] | {
|
|
27
|
-
[choice: string]: {
|
|
28
|
-
name: string;
|
|
29
|
-
};
|
|
30
|
-
}): Promise<any>;
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated use UtilsTerminal.multiselect
|
|
33
|
-
*/
|
|
34
|
-
multipleChoicesAsk(question: string, choices: {
|
|
35
|
-
name: string;
|
|
36
|
-
value: string;
|
|
37
|
-
}[], autocomplete?: boolean, selected?: {
|
|
38
|
-
name: string;
|
|
39
|
-
value: string;
|
|
40
|
-
}[]): Promise<string[]>;
|
|
41
|
-
/**
|
|
42
|
-
* @deprecated use UtilsTerminal.input
|
|
43
|
-
*/
|
|
44
|
-
input(options: {
|
|
45
|
-
defaultValue?: string;
|
|
46
|
-
question: string;
|
|
47
|
-
validate?: (value: string) => boolean;
|
|
48
|
-
}): Promise<string>;
|
|
49
|
-
/**
|
|
50
|
-
* @deprecated use UtilsTerminal.multiselect
|
|
51
|
-
* TODO wierd problem when pressing key like "i"
|
|
52
|
-
*/
|
|
53
|
-
selectChoicesAsk<T = string>(question: string, choices: {
|
|
54
|
-
name: string;
|
|
55
|
-
value: T;
|
|
56
|
-
}[] | {
|
|
57
|
-
[choice: string]: {
|
|
58
|
-
name: string;
|
|
59
|
-
};
|
|
60
|
-
}): Promise<T>;
|
|
61
|
-
autocompleteAsk<T = string>(question: string, choices: {
|
|
62
|
-
name: string;
|
|
63
|
-
value: T;
|
|
64
|
-
}[], pageSize?: number): Promise<T>;
|
|
65
|
-
getWorkingDirOfProcess(PID: number): any;
|
|
66
|
-
outputToVScode(data: {
|
|
67
|
-
label: string;
|
|
68
|
-
option: string;
|
|
69
|
-
}[] | string, disableEncode?: boolean): any;
|
|
70
|
-
actionWrapper(fn: () => void, taskName?: string): Promise<any>;
|
|
71
|
-
terminalLine(): any;
|
|
72
|
-
/**
|
|
73
|
-
* THIS DEOS NOT WORK !
|
|
74
|
-
* ! TOOD FIX THIS
|
|
75
|
-
*/
|
|
76
|
-
killAllNodeExceptCurrentProcess(): Promise<any>;
|
|
77
|
-
killAllNode(): any;
|
|
78
|
-
formatPath(pathToFileOrFolder: string): any;
|
|
79
|
-
/**
|
|
80
|
-
* @deprecated
|
|
81
|
-
*/
|
|
82
|
-
prepareWatchCommand(cmd: any): any;
|
|
83
|
-
/**
|
|
84
|
-
* @deprecated
|
|
85
|
-
*/
|
|
86
|
-
getStringFrom(command: string, descriptionOfCommand?: string): any;
|
|
87
|
-
waitForMessegeInStdout(proc: ChildProcess, message: string): Promise<any>;
|
|
88
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { Subject } from "rxjs";
|
|
3
|
-
export declare namespace HelpersAngular {
|
|
4
|
-
class SerializedSubject<T> {
|
|
5
|
-
id: string;
|
|
6
|
-
constructor(id: string);
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* if you are using this.. please call Helpers.ng.unsubscribe(this.$destroy) in ngOnDestroy();
|
|
10
|
-
*/
|
|
11
|
-
function serialize(destroy$: Subject<any>): SerializedSubject<any>;
|
|
12
|
-
/**
|
|
13
|
-
* if you are using this.. please call Helpers.ng.unsubscribe(this.$destroy) in ngOnDestroy();
|
|
14
|
-
*/
|
|
15
|
-
function deserialize(destroy$: SerializedSubject<any>): Subject<any>;
|
|
16
|
-
function unsubscribe(destroy$: Subject<any>): void;
|
|
17
|
-
/**
|
|
18
|
-
get properties from scss file
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
import styles from './tasks-ngrx-data.component.scss';
|
|
22
|
-
|
|
23
|
-
export class ExampleComponent {
|
|
24
|
-
sassFile = sassFile(styles);
|
|
25
|
-
|
|
26
|
-
async ngOnInit() {
|
|
27
|
-
this.tasksService.getAll();
|
|
28
|
-
console.log(this.sassFile.stringValue('--max-container-size'))
|
|
29
|
-
console.log(this.sassFile.numberValue('--max-container-size'))
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
*/
|
|
33
|
-
function sassFile(styles: string): {
|
|
34
|
-
stringValue: (name: string) => string;
|
|
35
|
-
numberValue: (name: string) => number;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
export declare class HelpersBrowser {
|
|
3
|
-
private static callbacks;
|
|
4
|
-
static onInit(callback: (ins: HelpersBrowser) => any): void;
|
|
5
|
-
get win(): Window & typeof globalThis;
|
|
6
|
-
private get tabIdSessionStorage();
|
|
7
|
-
readonly tabId: number;
|
|
8
|
-
private static inst;
|
|
9
|
-
init: void;
|
|
10
|
-
private constructor();
|
|
11
|
-
static get instance(): HelpersBrowser;
|
|
12
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
export declare class HelpersArrayObj {
|
|
3
|
-
from(s: string | string[]): string[];
|
|
4
|
-
second(arr: any): any;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated
|
|
7
|
-
* use moveObjectBefore
|
|
8
|
-
*/
|
|
9
|
-
arrayMoveElementBefore<T = any>(arr: any[], a: any, b: any, prop?: keyof T): any[];
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated
|
|
12
|
-
* use moveObjectAfter
|
|
13
|
-
*/
|
|
14
|
-
arrayMoveElementAfterB<T = any>(arr: any[], a: any, b: any, prop?: keyof T): any[];
|
|
15
|
-
moveObjectBefore<T = any>(array: T[], target: T, before: T): T[];
|
|
16
|
-
moveObjectAfter<T = any>(array: T[], target: T, after: T): T[];
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated use Utils.uniqArray from tnp-core
|
|
19
|
-
*/
|
|
20
|
-
uniqArray<T = any>(array: any[], uniqueProperty?: keyof T): T[];
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated use Utils.uniqArray from tnp-core
|
|
23
|
-
*/
|
|
24
|
-
sortKeys(obj: any): any;
|
|
25
|
-
/**
|
|
26
|
-
* Fuzzy search
|
|
27
|
-
*/
|
|
28
|
-
fuzzy<T = any>(query: string, list: T[], valueFn?: (modelFromList: T) => string): {
|
|
29
|
-
matches: string[];
|
|
30
|
-
results: T[];
|
|
31
|
-
};
|
|
32
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
export declare class HelpersStringsRegexes {
|
|
3
|
-
escapeStringForRegEx(s: string): string;
|
|
4
|
-
matchExactOnce(s: string, regex: RegExp): string;
|
|
5
|
-
get regex(): {
|
|
6
|
-
/**
|
|
7
|
-
* mathes
|
|
8
|
-
* xxx.xxx.xxx.xxx
|
|
9
|
-
* xxx.xxx.xxx.xxx:port
|
|
10
|
-
* http://xxx.xxx.xxx.xxx:port
|
|
11
|
-
* http://xxx.xxx.xxx.xxx
|
|
12
|
-
* https://xxx.xxx.xxx.xxx:port
|
|
13
|
-
* https://xxx.xxx.xxx.xxx *
|
|
14
|
-
*/
|
|
15
|
-
readonly forStringWithIpHost: RegExp;
|
|
16
|
-
/**
|
|
17
|
-
* mathes
|
|
18
|
-
* http://domain.com:port
|
|
19
|
-
* http://domain.com
|
|
20
|
-
* http://domain:port
|
|
21
|
-
* http://domain
|
|
22
|
-
* https://domain.com:port
|
|
23
|
-
* https://domain.com
|
|
24
|
-
* https://domain:port
|
|
25
|
-
* https://domain
|
|
26
|
-
*/
|
|
27
|
-
readonly forStringWithDomainHost: RegExp;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
export declare class HelpersStrings {
|
|
3
|
-
/**
|
|
4
|
-
* Example:
|
|
5
|
-
*
|
|
6
|
-
* const result = interpolateString("I'm {age} years old!")
|
|
7
|
-
* .withParameters({ age: 29 });
|
|
8
|
-
*
|
|
9
|
-
* const result = interpolateString("The {a} says {n}, {n}, {n}!")
|
|
10
|
-
* .withParameters({ a: 'cow', n: 'moo' });
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @param value string to interpolate
|
|
14
|
-
* @param parameters object with parametes
|
|
15
|
-
*/
|
|
16
|
-
interpolateString<T = any>(value: string): {
|
|
17
|
-
withParameters(parameters: T): string;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @param pixelsCss exmaple: 100px
|
|
22
|
-
* @returns number value
|
|
23
|
-
*/
|
|
24
|
-
numValue(pixelsCss: string): number;
|
|
25
|
-
/**
|
|
26
|
-
* examples:
|
|
27
|
-
* 'aa bb bb' => ['aa','bb','cc'],
|
|
28
|
-
* 'aa' => ['aa']
|
|
29
|
-
* ['aa'] => ['aa']
|
|
30
|
-
*/
|
|
31
|
-
splitIfNeed(stringOrArr: string | string[]): string[];
|
|
32
|
-
removeDoubleOrMoreEmptyLines(s: string): string;
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
35
|
-
* https://stackoverflow.com/a/57129703/1345101
|
|
36
|
-
*
|
|
37
|
-
* Returns the plural of an English word.
|
|
38
|
-
*
|
|
39
|
-
* @export
|
|
40
|
-
* @param {string} word
|
|
41
|
-
* @param {number} [amount]
|
|
42
|
-
* @returns {string}
|
|
43
|
-
*/
|
|
44
|
-
plural(word: string, amount?: number): string;
|
|
45
|
-
/**
|
|
46
|
-
* https://stackoverflow.com/a/57129703/1345101
|
|
47
|
-
*
|
|
48
|
-
* Returns the singular of an English word.
|
|
49
|
-
*
|
|
50
|
-
* @export
|
|
51
|
-
* @param {string} word
|
|
52
|
-
* @param {number} [amount]
|
|
53
|
-
* @returns {string}
|
|
54
|
-
*/
|
|
55
|
-
singular(word: string, amount?: number): string;
|
|
56
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { HelpersArrayObj } from './helpers-array-obj';
|
|
3
|
-
import { HelpersStringsRegexes } from './helpers-strings-regexes';
|
|
4
|
-
import { HelpersStrings } from './helpers-strings';
|
|
5
|
-
import { HelpersProcess } from './for-backend/helpers-process';
|
|
6
|
-
import { HelpersFileFolders } from './for-backend/helpers-file-folders';
|
|
7
|
-
import { Validators } from '../index';
|
|
8
|
-
import { CoreHelpers, CoreModels } from 'tnp-core/browser';
|
|
9
|
-
import { HelpersNumber } from './helpers-numbers';
|
|
10
|
-
import { HelpersBrowser } from './for-browser/helpers-browser';
|
|
11
|
-
import { HelpersAngular } from './for-browser/angular.helper';
|
|
12
|
-
/**
|
|
13
|
-
* Mixing for multiclass inheritance
|
|
14
|
-
*
|
|
15
|
-
* How to use It:
|
|
16
|
-
*
|
|
17
|
-
* class Wolverine {}
|
|
18
|
-
* class Jean {}
|
|
19
|
-
* export class Child {}
|
|
20
|
-
* export interface MyChild implements Wolverine, Jean {}
|
|
21
|
-
* applyMixing(Child,[Wolverine, Jean]);
|
|
22
|
-
*
|
|
23
|
-
* @param derivedCtor Target Class
|
|
24
|
-
* @param baseCtors Base Classes
|
|
25
|
-
*/
|
|
26
|
-
export declare function applyMixins(derivedCtor: any, baseCtors: any[]): void;
|
|
27
|
-
export declare class HelpersTaon extends CoreHelpers {
|
|
28
|
-
arrays: HelpersArrayObj;
|
|
29
|
-
strings: HelpersStrings;
|
|
30
|
-
numbers: HelpersNumber;
|
|
31
|
-
browser: HelpersBrowser;
|
|
32
|
-
ng: typeof HelpersAngular;
|
|
33
|
-
private static _instance;
|
|
34
|
-
static get Instance(): HelpersTaon;
|
|
35
|
-
private constructor();
|
|
36
|
-
CLIWRAP(f: Function, name: string): Function;
|
|
37
|
-
/**
|
|
38
|
-
* Bundle file with node_modules into one file
|
|
39
|
-
* default strategy is cli
|
|
40
|
-
* Please keep: 'ts-node', 'typescript' as dependency in your package.json
|
|
41
|
-
*/
|
|
42
|
-
ncc(pathToJsFile: string, outputFilePath: string, options?: {
|
|
43
|
-
strategy?: 'cli' | 'vscode-ext' | 'node-app' | 'electron-app';
|
|
44
|
-
/**
|
|
45
|
-
* ! beforeWrite needs to return output
|
|
46
|
-
*/
|
|
47
|
-
beforeWrite?: (options: {
|
|
48
|
-
output?: string;
|
|
49
|
-
copyToDestination?: (fileOrFolderAbsPath: string) => void;
|
|
50
|
-
}) => string;
|
|
51
|
-
additionalExternals?: string[];
|
|
52
|
-
additionalReplaceWithNothing?: string[];
|
|
53
|
-
skipFixingSQLlite?: boolean;
|
|
54
|
-
minify?: boolean;
|
|
55
|
-
}): Promise<void>;
|
|
56
|
-
/**
|
|
57
|
-
* @deprecated
|
|
58
|
-
* use Utils.uniqArray from tnp-core
|
|
59
|
-
*/
|
|
60
|
-
uniqArray<T = any>(array: any[], uniqueProperty?: keyof T): T[];
|
|
61
|
-
urlParse(portOrHost: number | string | URL, forceDomain?: boolean): URL;
|
|
62
|
-
slash(pathFromWindowsOrUnixType: string): any;
|
|
63
|
-
isElevated(): Promise<void>;
|
|
64
|
-
/**
|
|
65
|
-
* TODO fix this methods
|
|
66
|
-
*/
|
|
67
|
-
localIpAddress(): Promise<any>;
|
|
68
|
-
allLocalIpAddresses(): URL[];
|
|
69
|
-
mesureExectionInMs(description: string, functionToExecute: Function, ...functionArguments: any[]): Promise<number>;
|
|
70
|
-
mesureExectionInMsSync(description: string, functionToExecute: () => void): number;
|
|
71
|
-
waitForCondition(conditionFn: (any: any) => boolean, howOfftenCheckInMs?: number): Promise<unknown>;
|
|
72
|
-
getMethodName(classObject: any, method: any): string;
|
|
73
|
-
/**
|
|
74
|
-
* @deprecated
|
|
75
|
-
*/
|
|
76
|
-
fixWebpackEnv(env: Object): void;
|
|
77
|
-
/**
|
|
78
|
-
* @deprecated
|
|
79
|
-
*/
|
|
80
|
-
workerCalculateArray(dataToSplit: any[], operation: (dataChunk: any[], workerNumber?: number | undefined) => Promise<void>, options?: {
|
|
81
|
-
maxesForWorkes?: {
|
|
82
|
-
[workerMaxes: number]: number;
|
|
83
|
-
};
|
|
84
|
-
workerLimit?: number;
|
|
85
|
-
globals?: any;
|
|
86
|
-
}): Promise<void>;
|
|
87
|
-
checkEnvironment(deps?: CoreModels.GlobalDependencies): any;
|
|
88
|
-
applyMixins: typeof applyMixins;
|
|
89
|
-
isValidIp: typeof Validators.network.isValidIp;
|
|
90
|
-
isValidGitRepuUrl: typeof Validators.git.isValidRepoUrl;
|
|
91
|
-
}
|
|
92
|
-
export interface HelpersTaon extends HelpersStringsRegexes, HelpersProcess, HelpersFileFolders {
|
|
93
|
-
}
|
package/client/lib/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
export * from './validators/validators';
|
|
3
|
-
export { HelpersAngular } from './helpers/for-browser/angular.helper';
|
|
4
|
-
export * from './utils';
|
|
5
|
-
import { HelpersTaon as Base } from './helpers/helpers';
|
|
6
|
-
export declare const Helpers: Base;
|
|
7
|
-
export * from './base';
|
|
8
|
-
export * from './models';
|
|
9
|
-
export * from './old/execute-command';
|
|
10
|
-
export * from './old/models';
|
package/client/lib/models.d.ts
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { ChildProcess } from 'child_process';
|
|
3
|
-
import { CoreModels } from 'tnp-core/browser';
|
|
4
|
-
import type { BaseProject, TypeOfCommit } from './base';
|
|
5
|
-
import type { BaseProcessManger } from './base/classes/base-process-manager';
|
|
6
|
-
export type BaseProjectType = CoreModels.BaseProjectType;
|
|
7
|
-
export declare const BaseProjectTypeArr: string[];
|
|
8
|
-
/**
|
|
9
|
-
* Angular project type
|
|
10
|
-
*/
|
|
11
|
-
export type NgProject = {
|
|
12
|
-
projectType: 'library' | 'application';
|
|
13
|
-
/**
|
|
14
|
-
* where ng-packagr.json is located, tsconfig etc.
|
|
15
|
-
*/
|
|
16
|
-
root: string;
|
|
17
|
-
/**
|
|
18
|
-
* Source code project
|
|
19
|
-
*/
|
|
20
|
-
sourceRoot: string;
|
|
21
|
-
prefix: string;
|
|
22
|
-
};
|
|
23
|
-
export type LibraryBuildCommandOptions = {
|
|
24
|
-
watch?: boolean;
|
|
25
|
-
};
|
|
26
|
-
export type LibrariesBuildOptions<PROJECT extends BaseProject = BaseProject> = {
|
|
27
|
-
strategy?: 'link' | 'copy';
|
|
28
|
-
/**
|
|
29
|
-
* by default we are copying all libraries to node_modules of itself
|
|
30
|
-
*/
|
|
31
|
-
copylink_to_node_modules?: string[];
|
|
32
|
-
releaseBuild?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* override build options for specific libraries
|
|
35
|
-
* @todo
|
|
36
|
-
*/
|
|
37
|
-
libraries?: PROJECT[];
|
|
38
|
-
outputLineReplace?: (libForOutput: PROJECT, useExternalProvidedLibs: boolean) => (line: string) => string;
|
|
39
|
-
useLastUserConfiguration?: boolean;
|
|
40
|
-
};
|
|
41
|
-
export type TestBuildOptions = {
|
|
42
|
-
onlySpecyficFiles?: string[];
|
|
43
|
-
updateSnapshot?: boolean;
|
|
44
|
-
};
|
|
45
|
-
export interface ChangelogData {
|
|
46
|
-
changes: string[];
|
|
47
|
-
version: string;
|
|
48
|
-
date: string;
|
|
49
|
-
}
|
|
50
|
-
export interface PushProcessOptions {
|
|
51
|
-
force?: boolean;
|
|
52
|
-
typeofCommit?: TypeOfCommit;
|
|
53
|
-
mergeUpdateCommits?: boolean;
|
|
54
|
-
askToConfirmPush?: boolean;
|
|
55
|
-
askToConfirmCommit?: boolean;
|
|
56
|
-
skipLint?: boolean;
|
|
57
|
-
askToConfirmBranchChange?: boolean;
|
|
58
|
-
origin?: string;
|
|
59
|
-
args?: string[];
|
|
60
|
-
setOrigin?: 'ssh' | 'http';
|
|
61
|
-
exitCallBack?: () => void;
|
|
62
|
-
forcePushNoQuestion?: boolean;
|
|
63
|
-
overrideCommitMessage?: string;
|
|
64
|
-
commitMessageRequired?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* only needed when push github
|
|
67
|
-
* and I forgot to add my username before issue
|
|
68
|
-
* taon pfix proper input my-repo#344
|
|
69
|
-
* that should be
|
|
70
|
-
* taon pfix proper input my-username/my-repo#344
|
|
71
|
-
*/
|
|
72
|
-
currentOrigin?: string;
|
|
73
|
-
skipChildren?: boolean;
|
|
74
|
-
noExit?: boolean;
|
|
75
|
-
}
|
|
76
|
-
export declare class CommandConfig {
|
|
77
|
-
static from(config: CommandConfig): CommandConfig;
|
|
78
|
-
private constructor();
|
|
79
|
-
name: string;
|
|
80
|
-
cmd: string;
|
|
81
|
-
headerMessageWhenActive?: string;
|
|
82
|
-
/**
|
|
83
|
-
* If true, the output will be stored in a buffer and displayed when requested.
|
|
84
|
-
* Default: true
|
|
85
|
-
*/
|
|
86
|
-
useDataBuffer?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Process that should be started
|
|
89
|
-
* before this process starts.
|
|
90
|
-
*/
|
|
91
|
-
shouldBeActiveOrAlreadyBuild?: CommandConfig[];
|
|
92
|
-
goToNextCommandWhenOutput?: string | {
|
|
93
|
-
stdoutContains?: string | string[];
|
|
94
|
-
stderrContains?: string | string[];
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
export interface ProcessManagerConfig<PROJECT> {
|
|
98
|
-
title: string;
|
|
99
|
-
header?: string;
|
|
100
|
-
commands: CommandConfig[];
|
|
101
|
-
/**
|
|
102
|
-
* Default: false
|
|
103
|
-
* If false - after first selection of processes, it will be not possible
|
|
104
|
-
* to add new processes to build and build will be done after
|
|
105
|
-
* all processes are done.
|
|
106
|
-
*/
|
|
107
|
-
watch?: boolean;
|
|
108
|
-
}
|
|
109
|
-
export declare enum CommandProcessState {
|
|
110
|
-
NOT_STARTED = "not-started",
|
|
111
|
-
WAITING_TO_START = "waiting-to-start",
|
|
112
|
-
RUNNING = "running",
|
|
113
|
-
FINISHED_AND_RUNNING = "finished-and-running",// only for watch mode
|
|
114
|
-
FINISHED = "finished"
|
|
115
|
-
}
|
|
116
|
-
export interface CommandProcessRunOptions {
|
|
117
|
-
progress?: (n: number, total: number) => void;
|
|
118
|
-
resolveNextProcess?: (currentProcess: CommandProcess) => Promise<CommandProcess>;
|
|
119
|
-
resolveWhenFinish?: boolean;
|
|
120
|
-
}
|
|
121
|
-
export declare class CommandProcess {
|
|
122
|
-
private project;
|
|
123
|
-
private config;
|
|
124
|
-
private manager;
|
|
125
|
-
private state;
|
|
126
|
-
readonly child_process?: ChildProcess;
|
|
127
|
-
protected get cmd(): string;
|
|
128
|
-
get name(): string;
|
|
129
|
-
get headerMessageWhenActive(): string | undefined;
|
|
130
|
-
get pid(): number | undefined;
|
|
131
|
-
get isFinished(): boolean;
|
|
132
|
-
get isRunning(): boolean;
|
|
133
|
-
get isWaitingToStart(): boolean;
|
|
134
|
-
markForStart(): void;
|
|
135
|
-
dependenciesProcesses: CommandProcess[];
|
|
136
|
-
constructor(project: BaseProject, config: CommandConfig, manager: BaseProcessManger);
|
|
137
|
-
start(options?: CommandProcessRunOptions): Promise<void>;
|
|
138
|
-
stop(): Promise<void>;
|
|
139
|
-
}
|
|
140
|
-
export type CfontStyle = 'block' | 'slick' | 'tiny' | 'grid' | 'pallet' | 'shade' | 'chrome' | 'simple' | 'simpleBlock' | '3d' | 'simple3d' | 'huge';
|
|
141
|
-
export type CfontAlign = 'left' | 'center' | 'right' | 'block';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import type { ExtensionContext } from 'vscode';
|
|
3
|
-
import { Log } from './helpers';
|
|
4
|
-
import { ProcesOptions } from './models';
|
|
5
|
-
export type ExecCommandTypeOpt = {
|
|
6
|
-
vscode?: typeof import('vscode');
|
|
7
|
-
log?: Log;
|
|
8
|
-
context?: ExtensionContext;
|
|
9
|
-
cwd?: string;
|
|
10
|
-
};
|
|
11
|
-
export type ExecCommandType = string | string[] | ((opt: ExecCommandTypeOpt) => any);
|
|
12
|
-
export declare function executeCommand(titleOfTask: any, registerName: string, commandToExecute: ExecCommandType, pOptions?: ProcesOptions, isDefaultBuildCommand?: boolean, context?: ExtensionContext, debug?: boolean): any;
|