tnp-helpers 13.1.37 → 13.1.39

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.
Files changed (181) hide show
  1. package/assets/shared/shared_folder_info.txt +1 -1
  2. package/browser/README.md +24 -24
  3. package/browser/esm2020/lib/angular.helper.mjs +87 -87
  4. package/browser/esm2020/lib/base-component.mjs +49 -49
  5. package/browser/esm2020/lib/base-formly-component.mjs +112 -112
  6. package/browser/esm2020/lib/condition-wait.mjs +45 -45
  7. package/browser/esm2020/lib/constants.mjs +8 -8
  8. package/browser/esm2020/lib/dual-component-ctrl.mjs +118 -118
  9. package/browser/esm2020/lib/firedev-models.mjs +3 -3
  10. package/browser/esm2020/lib/helpers-array-obj.mjs +82 -82
  11. package/browser/esm2020/lib/helpers-browser.mjs +46 -46
  12. package/browser/esm2020/lib/helpers-console-gui.mjs +9 -9
  13. package/browser/esm2020/lib/helpers-environment.mjs +32 -32
  14. package/browser/esm2020/lib/helpers-numbers.mjs +7 -7
  15. package/browser/esm2020/lib/helpers-strings-regexes.mjs +50 -50
  16. package/browser/esm2020/lib/helpers-strings.mjs +252 -252
  17. package/browser/esm2020/lib/helpers.mjs +285 -285
  18. package/browser/esm2020/lib/index.mjs +15 -15
  19. package/browser/esm2020/lib/long-press.directive.mjs +112 -112
  20. package/browser/esm2020/lib/project.mjs +429 -429
  21. package/browser/esm2020/lib/resize-service.mjs +21 -21
  22. package/browser/esm2020/public-api.mjs +1 -1
  23. package/browser/esm2020/tnp-helpers.mjs +4 -4
  24. package/browser/fesm2015/tnp-helpers.mjs +1686 -1686
  25. package/browser/fesm2020/tnp-helpers.mjs +1676 -1676
  26. package/browser/lib/angular.helper.d.ts +35 -35
  27. package/browser/lib/base-component.d.ts +16 -16
  28. package/browser/lib/base-formly-component.d.ts +30 -30
  29. package/browser/lib/condition-wait.d.ts +7 -7
  30. package/browser/lib/constants.d.ts +6 -6
  31. package/browser/lib/dual-component-ctrl.d.ts +24 -24
  32. package/browser/lib/firedev-models.d.ts +12 -12
  33. package/browser/lib/helpers-array-obj.d.ts +14 -14
  34. package/browser/lib/helpers-browser.d.ts +10 -10
  35. package/browser/lib/helpers-console-gui.d.ts +5 -5
  36. package/browser/lib/helpers-environment.d.ts +4 -4
  37. package/browser/lib/helpers-numbers.d.ts +2 -2
  38. package/browser/lib/helpers-strings-regexes.d.ts +27 -27
  39. package/browser/lib/helpers-strings.d.ts +49 -49
  40. package/browser/lib/helpers.d.ts +33 -33
  41. package/browser/lib/index.d.ts +11 -11
  42. package/browser/lib/long-press.directive.d.ts +24 -24
  43. package/browser/lib/project.d.ts +93 -93
  44. package/browser/lib/resize-service.d.ts +8 -8
  45. package/browser/tnp-helpers.d.ts +4 -4
  46. package/client/README.md +24 -24
  47. package/client/esm2020/lib/angular.helper.mjs +87 -87
  48. package/client/esm2020/lib/base-component.mjs +49 -49
  49. package/client/esm2020/lib/base-formly-component.mjs +112 -112
  50. package/client/esm2020/lib/condition-wait.mjs +45 -45
  51. package/client/esm2020/lib/constants.mjs +8 -8
  52. package/client/esm2020/lib/dual-component-ctrl.mjs +118 -118
  53. package/client/esm2020/lib/firedev-models.mjs +3 -3
  54. package/client/esm2020/lib/helpers-array-obj.mjs +82 -82
  55. package/client/esm2020/lib/helpers-browser.mjs +46 -46
  56. package/client/esm2020/lib/helpers-console-gui.mjs +9 -9
  57. package/client/esm2020/lib/helpers-environment.mjs +32 -32
  58. package/client/esm2020/lib/helpers-numbers.mjs +7 -7
  59. package/client/esm2020/lib/helpers-strings-regexes.mjs +50 -50
  60. package/client/esm2020/lib/helpers-strings.mjs +252 -252
  61. package/client/esm2020/lib/helpers.mjs +285 -285
  62. package/client/esm2020/lib/index.mjs +15 -15
  63. package/client/esm2020/lib/long-press.directive.mjs +112 -112
  64. package/client/esm2020/lib/project.mjs +429 -429
  65. package/client/esm2020/lib/resize-service.mjs +21 -21
  66. package/client/esm2020/public-api.mjs +1 -1
  67. package/client/esm2020/tnp-helpers.mjs +4 -4
  68. package/client/fesm2015/tnp-helpers.mjs +1686 -1686
  69. package/client/fesm2020/tnp-helpers.mjs +1676 -1676
  70. package/client/lib/angular.helper.d.ts +35 -35
  71. package/client/lib/base-component.d.ts +16 -16
  72. package/client/lib/base-formly-component.d.ts +30 -30
  73. package/client/lib/condition-wait.d.ts +7 -7
  74. package/client/lib/constants.d.ts +6 -6
  75. package/client/lib/dual-component-ctrl.d.ts +24 -24
  76. package/client/lib/firedev-models.d.ts +12 -12
  77. package/client/lib/helpers-array-obj.d.ts +14 -14
  78. package/client/lib/helpers-browser.d.ts +10 -10
  79. package/client/lib/helpers-console-gui.d.ts +5 -5
  80. package/client/lib/helpers-environment.d.ts +4 -4
  81. package/client/lib/helpers-numbers.d.ts +2 -2
  82. package/client/lib/helpers-strings-regexes.d.ts +27 -27
  83. package/client/lib/helpers-strings.d.ts +49 -49
  84. package/client/lib/helpers.d.ts +33 -33
  85. package/client/lib/index.d.ts +11 -11
  86. package/client/lib/long-press.directive.d.ts +24 -24
  87. package/client/lib/project.d.ts +93 -93
  88. package/client/lib/resize-service.d.ts +8 -8
  89. package/client/package.json +33 -32
  90. package/client/tnp-helpers.d.ts +4 -4
  91. package/index.d.ts +1 -1
  92. package/lib/angular.helper.d.ts +35 -35
  93. package/lib/angular.helper.js +3 -3
  94. package/lib/base-component.d.ts +13 -13
  95. package/lib/base-component.js +3 -3
  96. package/lib/base-formly-component.d.ts +27 -27
  97. package/lib/base-formly-component.js +3 -3
  98. package/lib/condition-wait.d.ts +8 -8
  99. package/lib/constants.d.ts +7 -7
  100. package/lib/dual-component-ctrl.d.ts +24 -24
  101. package/lib/dual-component-ctrl.js +3 -3
  102. package/lib/firedev-models.d.ts +13 -13
  103. package/lib/git-project.d.ts +52 -52
  104. package/lib/helpers-array-obj.d.ts +15 -15
  105. package/lib/helpers-browser.d.ts +11 -11
  106. package/lib/helpers-cli-tool.backend.d.ts +55 -55
  107. package/lib/helpers-console-gui.d.ts +17 -17
  108. package/lib/helpers-dependencies.backend.d.ts +11 -11
  109. package/lib/helpers-environment.d.ts +5 -5
  110. package/lib/helpers-file-folders.backend.d.ts +85 -85
  111. package/lib/helpers-git.backend.d.ts +50 -50
  112. package/lib/helpers-json5.backend.d.ts +16 -16
  113. package/lib/helpers-morphi-framework.backend.d.ts +4 -4
  114. package/lib/helpers-network.backend.d.ts +8 -8
  115. package/lib/helpers-npm.backend.d.ts +3 -3
  116. package/lib/helpers-numbers.d.ts +3 -3
  117. package/lib/helpers-path.backend.d.ts +7 -7
  118. package/lib/helpers-process.backend.d.ts +58 -58
  119. package/lib/helpers-process.backend.js +1 -1
  120. package/lib/helpers-process.backend.js.map +1 -1
  121. package/lib/helpers-strings-regexes.d.ts +28 -28
  122. package/lib/helpers-strings.d.ts +50 -50
  123. package/lib/helpers-system-terminal.backend.d.ts +5 -5
  124. package/lib/helpers-vscode.backend.d.ts +5 -5
  125. package/lib/helpers.d.ts +74 -74
  126. package/lib/index.d.ts +12 -12
  127. package/lib/long-press.directive.d.ts +22 -22
  128. package/lib/merge-helpers.backend.d.ts +23 -23
  129. package/lib/project.d.ts +96 -96
  130. package/lib/resize-service.d.ts +6 -6
  131. package/lib/ts-code/index.d.ts +1 -1
  132. package/lib/ts-code/ts-code-extractor.d.ts +14 -14
  133. package/lib/ts-code/ts-code-modifier.backend.d.ts +12 -12
  134. package/package.json +5 -5
  135. package/package.json_devDependencies.json +222 -222
  136. package/package.json_tnp.json5 +49 -46
  137. package/tmp-environment.json +39 -37
  138. package/websql/README.md +24 -24
  139. package/websql/esm2020/lib/angular.helper.mjs +87 -87
  140. package/websql/esm2020/lib/base-component.mjs +49 -49
  141. package/websql/esm2020/lib/base-formly-component.mjs +112 -112
  142. package/websql/esm2020/lib/condition-wait.mjs +45 -45
  143. package/websql/esm2020/lib/constants.mjs +8 -8
  144. package/websql/esm2020/lib/dual-component-ctrl.mjs +118 -118
  145. package/websql/esm2020/lib/firedev-models.mjs +3 -3
  146. package/websql/esm2020/lib/helpers-array-obj.mjs +82 -82
  147. package/websql/esm2020/lib/helpers-browser.mjs +46 -46
  148. package/websql/esm2020/lib/helpers-console-gui.mjs +9 -9
  149. package/websql/esm2020/lib/helpers-environment.mjs +32 -32
  150. package/websql/esm2020/lib/helpers-numbers.mjs +7 -7
  151. package/websql/esm2020/lib/helpers-strings-regexes.mjs +50 -50
  152. package/websql/esm2020/lib/helpers-strings.mjs +252 -252
  153. package/websql/esm2020/lib/helpers.mjs +285 -285
  154. package/websql/esm2020/lib/index.mjs +15 -15
  155. package/websql/esm2020/lib/long-press.directive.mjs +112 -112
  156. package/websql/esm2020/lib/project.mjs +429 -429
  157. package/websql/esm2020/lib/resize-service.mjs +21 -21
  158. package/websql/esm2020/public-api.mjs +1 -1
  159. package/websql/esm2020/tnp-helpers.mjs +4 -4
  160. package/websql/fesm2015/tnp-helpers.mjs +1686 -1686
  161. package/websql/fesm2020/tnp-helpers.mjs +1676 -1676
  162. package/websql/lib/angular.helper.d.ts +35 -35
  163. package/websql/lib/base-component.d.ts +16 -16
  164. package/websql/lib/base-formly-component.d.ts +30 -30
  165. package/websql/lib/condition-wait.d.ts +7 -7
  166. package/websql/lib/constants.d.ts +6 -6
  167. package/websql/lib/dual-component-ctrl.d.ts +24 -24
  168. package/websql/lib/firedev-models.d.ts +12 -12
  169. package/websql/lib/helpers-array-obj.d.ts +14 -14
  170. package/websql/lib/helpers-browser.d.ts +10 -10
  171. package/websql/lib/helpers-console-gui.d.ts +5 -5
  172. package/websql/lib/helpers-environment.d.ts +4 -4
  173. package/websql/lib/helpers-numbers.d.ts +2 -2
  174. package/websql/lib/helpers-strings-regexes.d.ts +27 -27
  175. package/websql/lib/helpers-strings.d.ts +49 -49
  176. package/websql/lib/helpers.d.ts +33 -33
  177. package/websql/lib/index.d.ts +11 -11
  178. package/websql/lib/long-press.directive.d.ts +24 -24
  179. package/websql/lib/project.d.ts +93 -93
  180. package/websql/lib/resize-service.d.ts +8 -8
  181. package/websql/tnp-helpers.d.ts +4 -4
@@ -1,25 +1,25 @@
1
- import { BaseFormlyComponent } from './base-formly-component';
2
- export declare abstract class DualComponentController<T = any> {
3
- protected cmp: BaseFormlyComponent;
4
- isFormlyMode: boolean;
5
- constructor(cmp: BaseFormlyComponent, isFormlyMode?: boolean);
6
- protected getValTemplateOptions(propertyName: string): any;
7
- protected getValContext(propertyName: string): any;
8
- get disabled(): boolean;
9
- get required(): boolean;
10
- get type(): string | boolean;
11
- get label(): string;
12
- get placeholder(): string;
13
- get defaultValue(): T;
14
- get formControl(): any;
15
- get key(): string;
16
- get path(): string;
17
- __model: any;
18
- get model(): any;
19
- set model(v: any);
20
- __mode: any;
21
- get mode(): any;
22
- set mode(v: any);
23
- get value(): T;
24
- set value(v: T);
1
+ import { BaseFormlyComponent } from './base-formly-component';
2
+ export declare abstract class DualComponentController<T = any> {
3
+ protected cmp: BaseFormlyComponent;
4
+ isFormlyMode: boolean;
5
+ constructor(cmp: BaseFormlyComponent, isFormlyMode?: boolean);
6
+ protected getValTemplateOptions(propertyName: string): any;
7
+ protected getValContext(propertyName: string): any;
8
+ get disabled(): boolean;
9
+ get required(): boolean;
10
+ get type(): string | boolean;
11
+ get label(): string;
12
+ get placeholder(): string;
13
+ get defaultValue(): T;
14
+ get formControl(): any;
15
+ get key(): string;
16
+ get path(): string;
17
+ __model: any;
18
+ get model(): any;
19
+ set model(v: any);
20
+ __mode: any;
21
+ get mode(): any;
22
+ set mode(v: any);
23
+ get value(): T;
24
+ set value(v: T);
25
25
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dummy1685234695197 = void 0;
4
- function dummy1685234695197() { }
5
- exports.dummy1685234695197 = dummy1685234695197;
3
+ exports.dummy1685882846257 = void 0;
4
+ function dummy1685882846257() { }
5
+ exports.dummy1685882846257 = dummy1685882846257;
6
6
  //# sourceMappingURL=dual-component-ctrl.js.map
@@ -1,13 +1,13 @@
1
- export declare namespace FiredevModels {
2
- interface VSCodeSettings {
3
- 'files.exclude': {
4
- [files: string]: boolean;
5
- };
6
- 'workbench.colorTheme': 'Default Light+' | 'Kimbie Dark';
7
- 'workbench.colorCustomizations': {
8
- 'activityBar.background'?: string;
9
- 'activityBar.foreground'?: string;
10
- 'statusBar.background'?: string;
11
- };
12
- }
13
- }
1
+ export declare namespace FiredevModels {
2
+ interface VSCodeSettings {
3
+ 'files.exclude': {
4
+ [files: string]: boolean;
5
+ };
6
+ 'workbench.colorTheme': 'Default Light+' | 'Kimbie Dark';
7
+ 'workbench.colorCustomizations': {
8
+ 'activityBar.background'?: string;
9
+ 'activityBar.foreground'?: string;
10
+ 'statusBar.background'?: string;
11
+ };
12
+ }
13
+ }
@@ -1,52 +1,52 @@
1
- import { child_process } from 'tnp-core';
2
- import { Project } from './project';
3
- import { RunOptions, ExecuteOptions } from 'tnp-core';
4
- export declare abstract class ProjectGit {
5
- runCommandGetString(this: Project, command: string): string;
6
- execute(this: Project, command: string, options?: ExecuteOptions & {
7
- showCommand?: boolean;
8
- }): Promise<unknown>;
9
- run(this: Project, command: string, options?: RunOptions): {
10
- sync(): string;
11
- async(detach?: boolean, mockFun?: (stdoutCallback: (dataForStdout: any) => any, stdErrcCallback: (dataForStder: any) => any, shouldProcesBeDead?: () => boolean) => number | Promise<number>): child_process.ChildProcess;
12
- asyncAsPromise(): any;
13
- unitlOutputContains(stdoutMsg: string | string[], stderMsg?: string | string[]): Promise<any>;
14
- };
15
- get git(this: Project): {
16
- clone(url: string, destinationFolderName?: string): void;
17
- restoreLastVersion(localFilePath: string): void;
18
- resetFiles(...relativePathes: string[]): void;
19
- readonly isGitRepo: boolean;
20
- readonly isGitRoot: boolean;
21
- readonly originURL: string;
22
- updateOrigin(askToRetry?: boolean): Promise<void>;
23
- commit(args?: string): void;
24
- pushCurrentBranch(force?: boolean, origin?: string): void;
25
- readonly thereAreSomeUncommitedChange: boolean;
26
- thereAreSomeUncommitedChangeExcept(filesList?: string[]): boolean;
27
- pullCurrentBranch(askToRetry?: boolean): Promise<void>;
28
- readonly currentBranchName: string;
29
- getBranchesNamesBy(pattern: string | RegExp): string[];
30
- resetHard(): void;
31
- countComits(): number;
32
- hasAnyCommits(): boolean;
33
- readonly isInMergeProcess: boolean;
34
- lastCommitDate(): Date;
35
- lastCommitHash(): string;
36
- lastCommitMessage(): string;
37
- penultimageCommitHash(): string;
38
- checkTagExists(tag: string): boolean;
39
- /**
40
- *
41
- * @param majorVersion example: v1, v2 etc.
42
- * @returns tag name
43
- */
44
- lastTagNameForMajorVersion(majorVersion: any): string;
45
- lastTagHash(): string;
46
- readonly lastTagVersionName: string;
47
- /**
48
- * TODO does this make any sense
49
- */
50
- renameOrigin(newNameOrUlr: string): void;
51
- };
52
- }
1
+ import { child_process } from 'tnp-core';
2
+ import { Project } from './project';
3
+ import { RunOptions, ExecuteOptions } from 'tnp-core';
4
+ export declare abstract class ProjectGit {
5
+ runCommandGetString(this: Project, command: string): string;
6
+ execute(this: Project, command: string, options?: ExecuteOptions & {
7
+ showCommand?: boolean;
8
+ }): Promise<unknown>;
9
+ run(this: Project, command: string, options?: RunOptions): {
10
+ sync(): string;
11
+ async(detach?: boolean, mockFun?: (stdoutCallback: (dataForStdout: any) => any, stdErrcCallback: (dataForStder: any) => any, shouldProcesBeDead?: () => boolean) => number | Promise<number>): child_process.ChildProcess;
12
+ asyncAsPromise(): any;
13
+ unitlOutputContains(stdoutMsg: string | string[], stderMsg?: string | string[]): Promise<any>;
14
+ };
15
+ get git(this: Project): {
16
+ clone(url: string, destinationFolderName?: string): void;
17
+ restoreLastVersion(localFilePath: string): void;
18
+ resetFiles(...relativePathes: string[]): void;
19
+ readonly isGitRepo: boolean;
20
+ readonly isGitRoot: boolean;
21
+ readonly originURL: string;
22
+ updateOrigin(askToRetry?: boolean): Promise<void>;
23
+ commit(args?: string): void;
24
+ pushCurrentBranch(force?: boolean, origin?: string): void;
25
+ readonly thereAreSomeUncommitedChange: boolean;
26
+ thereAreSomeUncommitedChangeExcept(filesList?: string[]): boolean;
27
+ pullCurrentBranch(askToRetry?: boolean): Promise<void>;
28
+ readonly currentBranchName: string;
29
+ getBranchesNamesBy(pattern: string | RegExp): string[];
30
+ resetHard(): void;
31
+ countComits(): number;
32
+ hasAnyCommits(): boolean;
33
+ readonly isInMergeProcess: boolean;
34
+ lastCommitDate(): Date;
35
+ lastCommitHash(): string;
36
+ lastCommitMessage(): string;
37
+ penultimageCommitHash(): string;
38
+ checkTagExists(tag: string): boolean;
39
+ /**
40
+ *
41
+ * @param majorVersion example: v1, v2 etc.
42
+ * @returns tag name
43
+ */
44
+ lastTagNameForMajorVersion(majorVersion: any): string;
45
+ lastTagHash(): string;
46
+ readonly lastTagVersionName: string;
47
+ /**
48
+ * TODO does this make any sense
49
+ */
50
+ renameOrigin(newNameOrUlr: string): void;
51
+ };
52
+ }
@@ -1,15 +1,15 @@
1
- export declare class HelpersArrayObj {
2
- from(s: string | string[]): string[];
3
- second(arr: any): any;
4
- arrayMoveElementBefore<T = any>(arr: any[], a: any, b: any, prop?: keyof T): any[];
5
- arrayMoveElementAfterB<T = any>(arr: any[], a: any, b: any, prop?: keyof T): any[];
6
- uniqArray<T = any>(array: any[], uniqueProperty?: (keyof T)): T[];
7
- sortKeys(obj: any): any;
8
- /**
9
- * Fuzzy search
10
- */
11
- fuzzy<T = any>(query: string, list: T[], valueFn?: (modelFromList: T) => string): {
12
- matches: string[];
13
- results: T[];
14
- };
15
- }
1
+ export declare class HelpersArrayObj {
2
+ from(s: string | string[]): string[];
3
+ second(arr: any): any;
4
+ arrayMoveElementBefore<T = any>(arr: any[], a: any, b: any, prop?: keyof T): any[];
5
+ arrayMoveElementAfterB<T = any>(arr: any[], a: any, b: any, prop?: keyof T): any[];
6
+ uniqArray<T = any>(array: any[], uniqueProperty?: (keyof T)): T[];
7
+ sortKeys(obj: any): any;
8
+ /**
9
+ * Fuzzy search
10
+ */
11
+ fuzzy<T = any>(query: string, list: T[], valueFn?: (modelFromList: T) => string): {
12
+ matches: string[];
13
+ results: T[];
14
+ };
15
+ }
@@ -1,11 +1,11 @@
1
- export declare class HelpersBrowaser {
2
- private static callbacks;
3
- static onInit(callback: (ins: HelpersBrowaser) => any): void;
4
- get win(): Window & typeof globalThis;
5
- private get tabIdSessionStorage();
6
- readonly tabId: number;
7
- private static inst;
8
- init: void;
9
- private constructor();
10
- static get instance(): HelpersBrowaser;
11
- }
1
+ export declare class HelpersBrowaser {
2
+ private static callbacks;
3
+ static onInit(callback: (ins: HelpersBrowaser) => any): void;
4
+ get win(): Window & typeof globalThis;
5
+ private get tabIdSessionStorage();
6
+ readonly tabId: number;
7
+ private static inst;
8
+ init: void;
9
+ private constructor();
10
+ static get instance(): HelpersBrowaser;
11
+ }
@@ -1,55 +1,55 @@
1
- import type { Project } from './project';
2
- export declare class HelpersCliTool {
3
- /**
4
- * return simplified version of command:
5
- * example: tnp HELLO:WORLD
6
- * will be: tnp helloworld
7
- *
8
- * or: `tnp ${$START}`
9
- * will be `tnp start`
10
- *
11
- * @param commandStringOrClass
12
- */
13
- simplifiedCmd(commandStringOrClass: string | Function, shortVersion?: boolean): any;
14
- argsFromBegin<T = any>(argumentsCommands: string | string[], argsFunc: (restOfCommandArgs: any) => T): {
15
- resolved: T[];
16
- /**
17
- * arguments string without resolved
18
- */
19
- commandString: string;
20
- };
21
- cleanCommand<T extends {
22
- [k: string]: string | boolean | string[] | boolean[];
23
- }>(command: string | string[], minimistOption: T): string;
24
- argsFrom<T = any>(args: string | string[]): T;
25
- removeStartEndCommandChars(command: string): string;
26
- resolveProject<T = Project>(args: string | string[], CurrentProject: Project, ProjectClass: typeof Project): T;
27
- /**
28
- * Resolve child project when accessing from parent workspace, container etc...
29
- * @param args string or string[] from cli args
30
- * @param CurrentProject project from process.cwd()
31
- */
32
- resolveChildProject(args: string | string[], CurrentProject: Project): Project;
33
- resolveProjectsFromArgs(args: string | string[], CurrentProject: Project, ProjectClass: typeof Project): Project[];
34
- /**
35
- * Check if your function name fits into command line param
36
- *
37
- * @param name name of function
38
- * @param restOfArgs arguments from command line
39
- */
40
- match(name: string, restOfArgs: string[]): {
41
- isMatch: boolean;
42
- restOfArgs: string[];
43
- };
44
- /**
45
- * @todo TODO replace with funciton below
46
- */
47
- globalArgumentsParserTnp(argsv: string[]): string;
48
- /**
49
- * @todo TODO replace with funciton above
50
- */
51
- globalArgumentsParser(argsv: string[]): string[];
52
- removeArg(arg: string, argsv: string[]): string[];
53
- removeArgTnp(arg: string, argsv: string[]): string[];
54
- removeArgFromString(argsString: string, argsToClear: string[]): string;
55
- }
1
+ import type { Project } from './project';
2
+ export declare class HelpersCliTool {
3
+ /**
4
+ * return simplified version of command:
5
+ * example: tnp HELLO:WORLD
6
+ * will be: tnp helloworld
7
+ *
8
+ * or: `tnp ${$START}`
9
+ * will be `tnp start`
10
+ *
11
+ * @param commandStringOrClass
12
+ */
13
+ simplifiedCmd(commandStringOrClass: string | Function, shortVersion?: boolean): any;
14
+ argsFromBegin<T = any>(argumentsCommands: string | string[], argsFunc: (restOfCommandArgs: any) => T): {
15
+ resolved: T[];
16
+ /**
17
+ * arguments string without resolved
18
+ */
19
+ commandString: string;
20
+ };
21
+ cleanCommand<T extends {
22
+ [k: string]: string | boolean | string[] | boolean[];
23
+ }>(command: string | string[], minimistOption: T): string;
24
+ argsFrom<T = any>(args: string | string[]): T;
25
+ removeStartEndCommandChars(command: string): string;
26
+ resolveProject<T = Project>(args: string | string[], CurrentProject: Project, ProjectClass: typeof Project): T;
27
+ /**
28
+ * Resolve child project when accessing from parent workspace, container etc...
29
+ * @param args string or string[] from cli args
30
+ * @param CurrentProject project from process.cwd()
31
+ */
32
+ resolveChildProject(args: string | string[], CurrentProject: Project): Project;
33
+ resolveProjectsFromArgs(args: string | string[], CurrentProject: Project, ProjectClass: typeof Project): Project[];
34
+ /**
35
+ * Check if your function name fits into command line param
36
+ *
37
+ * @param name name of function
38
+ * @param restOfArgs arguments from command line
39
+ */
40
+ match(name: string, restOfArgs: string[]): {
41
+ isMatch: boolean;
42
+ restOfArgs: string[];
43
+ };
44
+ /**
45
+ * @todo TODO replace with funciton below
46
+ */
47
+ globalArgumentsParserTnp(argsv: string[]): string;
48
+ /**
49
+ * @todo TODO replace with funciton above
50
+ */
51
+ globalArgumentsParser(argsv: string[]): string[];
52
+ removeArg(arg: string, argsv: string[]): string[];
53
+ removeArgTnp(arg: string, argsv: string[]): string[];
54
+ removeArgFromString(argsString: string, argsToClear: string[]): string;
55
+ }
@@ -1,17 +1,17 @@
1
- export declare class HelpersConsoleGuiQuestion {
2
- yesNo(questionMessage: string): Promise<boolean>;
3
- }
4
- export declare class HelpersConsoleGui {
5
- constructor();
6
- question: HelpersConsoleGuiQuestion;
7
- select: <T = string>(questionMessage: string, choices: {
8
- name: string;
9
- value: T;
10
- }[]) => Promise<T>;
11
- multiselect: <T = string>(questionMessage: string, choices: {
12
- name: string;
13
- value: T;
14
- }[]) => Promise<T[]>;
15
- wait: (howManySecondsWait: number) => Promise<void>;
16
- pressAnyKey: (message?: string) => Promise<void>;
17
- }
1
+ export declare class HelpersConsoleGuiQuestion {
2
+ yesNo(questionMessage: string): Promise<boolean>;
3
+ }
4
+ export declare class HelpersConsoleGui {
5
+ constructor();
6
+ question: HelpersConsoleGuiQuestion;
7
+ select: <T = string>(questionMessage: string, choices: {
8
+ name: string;
9
+ value: T;
10
+ }[]) => Promise<T>;
11
+ multiselect: <T = string>(questionMessage: string, choices: {
12
+ name: string;
13
+ value: T;
14
+ }[]) => Promise<T[]>;
15
+ wait: (howManySecondsWait: number) => Promise<void>;
16
+ pressAnyKey: (message?: string) => Promise<void>;
17
+ }
@@ -1,11 +1,11 @@
1
- import { Project } from './project';
2
- export declare class HelpersDependencies {
3
- sort<P extends Project = Project>(deps: {
4
- project: P;
5
- copyto: P[];
6
- }[]): {
7
- project: P;
8
- copyto: P[];
9
- }[];
10
- recrusiveFind<P extends Project = Project>(currentProj: P, allAvailableProjects: P[], deps?: P[], orgProj?: P): P[];
11
- }
1
+ import { Project } from './project';
2
+ export declare class HelpersDependencies {
3
+ sort<P extends Project = Project>(deps: {
4
+ project: P;
5
+ copyto: P[];
6
+ }[]): {
7
+ project: P;
8
+ copyto: P[];
9
+ }[];
10
+ recrusiveFind<P extends Project = Project>(currentProj: P, allAvailableProjects: P[], deps?: P[], orgProj?: P): P[];
11
+ }
@@ -1,5 +1,5 @@
1
- export declare class HelpersEnvironment {
2
- environmentName(filename: any, local_env_name: any): any;
3
- isValidGitRepuUrl(url: string): boolean;
4
- isValidIp(ip: string): boolean;
5
- }
1
+ export declare class HelpersEnvironment {
2
+ environmentName(filename: any, local_env_name: any): any;
3
+ isValidGitRepuUrl(url: string): boolean;
4
+ isValidIp(ip: string): boolean;
5
+ }
@@ -1,85 +1,85 @@
1
- import { fse } from 'tnp-core';
2
- import { Models } from 'tnp-models';
3
- import type { Project } from './project';
4
- export interface GetRecrusiveFilesFromOptions {
5
- }
6
- export declare class HelpersFileFolders {
7
- /**
8
- * Calculate file or string checksum
9
- */
10
- checksum(absolutePathToFileOrContent: string, algorithm?: 'md5' | 'sha1'): string;
11
- getValueFromJSON(filepath: string, lodashGetPath: string, defaultValue?: any): any;
12
- readValueFromJson(filepath: string, lodashGetPath: string, defaultValue?: any): any;
13
- setValueToJSON(filepath: string, lodashGetPath: string, value: any): void;
14
- /**
15
- * file size in bytes
16
- */
17
- size(filePath: string): number;
18
- pathFromLink(filePath: string): string;
19
- renameFolder(from: string, to: string, cwd?: string): void;
20
- getTempFolder(): string;
21
- isPlainFileOrFolder(filePath: any): boolean;
22
- requireUncached(module: any): any;
23
- /**
24
- * get default export object from js file
25
- * @param jsFilePath
26
- */
27
- require(jsFilePath: string): any;
28
- tryRecreateDir(dirpath: string): void;
29
- tryCopyFrom(source: string, destination: string, options?: {}): void;
30
- removeIfExists(absoluteFileOrFolderPath: string): void;
31
- removeFileIfExists(absoluteFilePath: string, options?: {
32
- modifiedFiles?: Models.other.ModifiedFiles;
33
- }): void;
34
- removeFolderIfExists(absoluteFolderPath: string, options?: {
35
- modifiedFiles?: Models.other.ModifiedFiles;
36
- }): void;
37
- tryRemoveDir(dirpath: string, contentOnly?: boolean, omitWarningNotExisted?: boolean): void;
38
- move(from: string, to: string): void;
39
- findChildren<T>(location: any, createFn: (childLocation: string) => T): T[];
40
- findChildrenNavi<T>(location: any, createFn: (childLocation: string) => T): T[];
41
- getRecrusiveFilesFrom(dir: string, ommitFolders?: string[], options?: GetRecrusiveFilesFromOptions): string[];
42
- checkIfNameAllowedForFiredevProj(folderName: string): boolean;
43
- getLinesFromFiles(filename: string, lineCount?: number): Promise<string[]>;
44
- /**
45
- * Get the most recent changes file in direcory
46
- * @param dir absoulute path to file
47
- */
48
- getMostRecentFileName(dir: any): string;
49
- getMostRecentFilesNames(dir: any): string[];
50
- removeExcept(fromPath: string, exceptFolderAndFiles: string[]): void;
51
- copy(sourceDir: string, destinationDir: string, options?: {
52
- filter?: any;
53
- overwrite?: boolean;
54
- recursive?: boolean;
55
- asSeparatedFiles?: boolean;
56
- asSeparatedFilesAllowNotCopied?: boolean;
57
- asSeparatedFilesSymlinkAsFile?: boolean;
58
- /**
59
- * folders to omit: example: ['src','node_modules']
60
- *
61
- * This option works only with omitFoldersBaseFolder
62
- */
63
- omitFolders?: string[];
64
- /**
65
- * absolute path for base folder for omitFolder option
66
- */
67
- omitFoldersBaseFolder?: string;
68
- copySymlinksAsFiles?: boolean;
69
- copySymlinksAsFilesDeleteUnexistedLinksFromSourceFirst?: boolean;
70
- useTempFolder?: boolean;
71
- } & fse.CopyOptionsSync): void;
72
- filterDontCopy(basePathFoldersTosSkip: string[], projectOrBasepath: Project | string): (src: string, dest: string) => boolean;
73
- filterOnlyCopy(basePathFoldersOnlyToInclude: string[], projectOrBasepath: Project | string): (src: string, dest: string) => boolean;
74
- copyFile(sourcePath: string, destinationPath: string, options?: {
75
- transformTextFn?: (input: string) => string;
76
- debugMode?: boolean;
77
- fast?: boolean;
78
- dontCopySameContent?: boolean;
79
- modifiedFiles?: Models.other.ModifiedFiles;
80
- }): boolean;
81
- /**
82
- * get real absolute path
83
- */
84
- resolve(fileOrFolderPath: string): string;
85
- }
1
+ import { fse } from 'tnp-core';
2
+ import { Models } from 'tnp-models';
3
+ import type { Project } from './project';
4
+ export interface GetRecrusiveFilesFromOptions {
5
+ }
6
+ export declare class HelpersFileFolders {
7
+ /**
8
+ * Calculate file or string checksum
9
+ */
10
+ checksum(absolutePathToFileOrContent: string, algorithm?: 'md5' | 'sha1'): string;
11
+ getValueFromJSON(filepath: string, lodashGetPath: string, defaultValue?: any): any;
12
+ readValueFromJson(filepath: string, lodashGetPath: string, defaultValue?: any): any;
13
+ setValueToJSON(filepath: string, lodashGetPath: string, value: any): void;
14
+ /**
15
+ * file size in bytes
16
+ */
17
+ size(filePath: string): number;
18
+ pathFromLink(filePath: string): string;
19
+ renameFolder(from: string, to: string, cwd?: string): void;
20
+ getTempFolder(): string;
21
+ isPlainFileOrFolder(filePath: any): boolean;
22
+ requireUncached(module: any): any;
23
+ /**
24
+ * get default export object from js file
25
+ * @param jsFilePath
26
+ */
27
+ require(jsFilePath: string): any;
28
+ tryRecreateDir(dirpath: string): void;
29
+ tryCopyFrom(source: string, destination: string, options?: {}): void;
30
+ removeIfExists(absoluteFileOrFolderPath: string): void;
31
+ removeFileIfExists(absoluteFilePath: string, options?: {
32
+ modifiedFiles?: Models.other.ModifiedFiles;
33
+ }): void;
34
+ removeFolderIfExists(absoluteFolderPath: string, options?: {
35
+ modifiedFiles?: Models.other.ModifiedFiles;
36
+ }): void;
37
+ tryRemoveDir(dirpath: string, contentOnly?: boolean, omitWarningNotExisted?: boolean): void;
38
+ move(from: string, to: string): void;
39
+ findChildren<T>(location: any, createFn: (childLocation: string) => T): T[];
40
+ findChildrenNavi<T>(location: any, createFn: (childLocation: string) => T): T[];
41
+ getRecrusiveFilesFrom(dir: string, ommitFolders?: string[], options?: GetRecrusiveFilesFromOptions): string[];
42
+ checkIfNameAllowedForFiredevProj(folderName: string): boolean;
43
+ getLinesFromFiles(filename: string, lineCount?: number): Promise<string[]>;
44
+ /**
45
+ * Get the most recent changes file in direcory
46
+ * @param dir absoulute path to file
47
+ */
48
+ getMostRecentFileName(dir: any): string;
49
+ getMostRecentFilesNames(dir: any): string[];
50
+ removeExcept(fromPath: string, exceptFolderAndFiles: string[]): void;
51
+ copy(sourceDir: string, destinationDir: string, options?: {
52
+ filter?: any;
53
+ overwrite?: boolean;
54
+ recursive?: boolean;
55
+ asSeparatedFiles?: boolean;
56
+ asSeparatedFilesAllowNotCopied?: boolean;
57
+ asSeparatedFilesSymlinkAsFile?: boolean;
58
+ /**
59
+ * folders to omit: example: ['src','node_modules']
60
+ *
61
+ * This option works only with omitFoldersBaseFolder
62
+ */
63
+ omitFolders?: string[];
64
+ /**
65
+ * absolute path for base folder for omitFolder option
66
+ */
67
+ omitFoldersBaseFolder?: string;
68
+ copySymlinksAsFiles?: boolean;
69
+ copySymlinksAsFilesDeleteUnexistedLinksFromSourceFirst?: boolean;
70
+ useTempFolder?: boolean;
71
+ } & fse.CopyOptionsSync): void;
72
+ filterDontCopy(basePathFoldersTosSkip: string[], projectOrBasepath: Project | string): (src: string, dest: string) => boolean;
73
+ filterOnlyCopy(basePathFoldersOnlyToInclude: string[], projectOrBasepath: Project | string): (src: string, dest: string) => boolean;
74
+ copyFile(sourcePath: string, destinationPath: string, options?: {
75
+ transformTextFn?: (input: string) => string;
76
+ debugMode?: boolean;
77
+ fast?: boolean;
78
+ dontCopySameContent?: boolean;
79
+ modifiedFiles?: Models.other.ModifiedFiles;
80
+ }): boolean;
81
+ /**
82
+ * get real absolute path
83
+ */
84
+ resolve(fileOrFolderPath: string): string;
85
+ }