tnp-helpers 19.0.66 → 19.0.67

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 (161) hide show
  1. package/browser/fesm2022/tnp-helpers.mjs +441 -78
  2. package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
  3. package/browser/lib/base/classes/base-cli-worker/base-cli-worker-config.d.ts +4 -0
  4. package/browser/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.d.ts +3 -2
  5. package/browser/lib/base/classes/base-cli-worker/base-cli-worker.d.ts +27 -0
  6. package/browser/lib/base/classes/base-cli-worker/base-cli-worker.models.d.ts +5 -2
  7. package/browser/lib/base/classes/base-cli-worker/base-cli-worker.utils.d.ts +2 -0
  8. package/browser/lib/base/classes/base-cli-worker/index.d.ts +2 -1
  9. package/browser/lib/base/classes/base-docker.d.ts +3 -7
  10. package/browser/lib/base/classes/base-global-command-line.d.ts +26 -15
  11. package/browser/lib/base/classes/base-node-modules.d.ts +1 -0
  12. package/browser/lib/base/classes/base-vscode.d.ts +1 -1
  13. package/browser/lib/build-info._auto-generated_.d.ts +1 -1
  14. package/browser/lib/helpers/helpers.d.ts +0 -5
  15. package/browser/lib/utils.d.ts +27 -1
  16. package/browser/package.json +1 -1
  17. package/lib/base/classes/base-cli-worker/base-cli-worker-config.d.ts +4 -0
  18. package/lib/base/classes/base-cli-worker/base-cli-worker-config.js +4 -0
  19. package/lib/base/classes/base-cli-worker/base-cli-worker-config.js.map +1 -1
  20. package/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.d.ts +3 -2
  21. package/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.js +21 -6
  22. package/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.js.map +1 -1
  23. package/lib/base/classes/base-cli-worker/base-cli-worker.d.ts +27 -0
  24. package/lib/base/classes/base-cli-worker/base-cli-worker.js +56 -3
  25. package/lib/base/classes/base-cli-worker/base-cli-worker.js.map +1 -1
  26. package/lib/base/classes/base-cli-worker/base-cli-worker.models.d.ts +5 -2
  27. package/lib/base/classes/base-cli-worker/base-cli-worker.models.js +2 -1
  28. package/lib/base/classes/base-cli-worker/base-cli-worker.models.js.map +1 -1
  29. package/lib/base/classes/base-cli-worker/base-cli-worker.utils.d.ts +2 -0
  30. package/lib/base/classes/base-cli-worker/base-cli-worker.utils.js +11 -0
  31. package/lib/base/classes/base-cli-worker/base-cli-worker.utils.js.map +1 -1
  32. package/lib/base/classes/base-cli-worker/index.d.ts +1 -0
  33. package/lib/base/classes/base-cli-worker/index.js +1 -0
  34. package/lib/base/classes/base-cli-worker/index.js.map +1 -1
  35. package/lib/base/classes/base-docker.d.ts +3 -7
  36. package/lib/base/classes/base-docker.js +6 -19
  37. package/lib/base/classes/base-docker.js.map +1 -1
  38. package/lib/base/classes/base-git.js +23 -8
  39. package/lib/base/classes/base-git.js.map +1 -1
  40. package/lib/base/classes/base-global-command-line.backend.d.ts +13 -1
  41. package/lib/base/classes/base-global-command-line.backend.js +416 -11
  42. package/lib/base/classes/base-global-command-line.backend.js.map +1 -1
  43. package/lib/base/classes/base-global-command-line.d.ts +12 -1
  44. package/lib/base/classes/base-global-command-line.js +81 -3
  45. package/lib/base/classes/base-global-command-line.js.map +1 -1
  46. package/lib/base/classes/base-ignore-hide.js +4 -0
  47. package/lib/base/classes/base-ignore-hide.js.map +1 -1
  48. package/lib/base/classes/base-node-modules.d.ts +1 -0
  49. package/lib/base/classes/base-node-modules.js +22 -1
  50. package/lib/base/classes/base-node-modules.js.map +1 -1
  51. package/lib/base/classes/base-npm-helpers.js +1 -1
  52. package/lib/base/classes/base-npm-helpers.js.map +1 -1
  53. package/lib/base/classes/base-powershell.d.ts +1 -0
  54. package/lib/base/classes/base-powershell.js +13 -0
  55. package/lib/base/classes/base-powershell.js.map +1 -1
  56. package/lib/base/classes/base-process/base-process-api.service.d.ts +7 -0
  57. package/lib/base/classes/base-process/base-process.context.d.ts +19 -0
  58. package/lib/base/classes/base-process/base-process.context.js +22 -0
  59. package/lib/base/classes/base-process/base-process.context.js.map +1 -0
  60. package/lib/base/classes/base-process/base-process.controller.d.ts +17 -0
  61. package/lib/base/classes/base-process/base-process.controller.js +91 -0
  62. package/lib/base/classes/base-process/base-process.controller.js.map +1 -0
  63. package/lib/base/classes/base-process/base-process.d.ts +8 -0
  64. package/lib/base/classes/base-process/base-process.defaults-values.d.ts +2 -0
  65. package/lib/base/classes/base-process/base-process.defaults-values.js +9 -0
  66. package/lib/base/classes/base-process/base-process.defaults-values.js.map +1 -0
  67. package/lib/base/classes/base-process/base-process.js +62 -0
  68. package/lib/base/classes/base-process/base-process.js.map +1 -0
  69. package/lib/base/classes/base-process/base-process.models.d.ts +6 -0
  70. package/lib/base/classes/base-process/base-process.models.js +3 -0
  71. package/lib/base/classes/base-process/base-process.models.js.map +1 -0
  72. package/lib/base/classes/base-process/base-process.provider.d.ts +16 -0
  73. package/lib/base/classes/base-process/base-process.provider.js +69 -0
  74. package/lib/base/classes/base-process/base-process.provider.js.map +1 -0
  75. package/lib/base/classes/base-process/base-process.repository copy.d.ts +8 -0
  76. package/lib/base/classes/base-process/base-process.repository copy.js +32 -0
  77. package/lib/base/classes/base-process/base-process.repository copy.js.map +1 -0
  78. package/lib/base/classes/base-process/base-process.repository.d.ts +8 -0
  79. package/lib/base/classes/base-process/base-process.repository.js +32 -0
  80. package/lib/base/classes/base-process/base-process.repository.js.map +1 -0
  81. package/lib/base/classes/base-process/base-process.terminal-ui.d.ts +11 -0
  82. package/lib/base/classes/base-process/base-process.terminal-ui.js +54 -0
  83. package/lib/base/classes/base-process/base-process.terminal-ui.js.map +1 -0
  84. package/lib/base/classes/base-process/base-process.worker.d.ts +16 -0
  85. package/lib/base/classes/base-process/base-process.worker.js +29 -0
  86. package/lib/base/classes/base-process/base-process.worker.js.map +1 -0
  87. package/lib/base/classes/base-process/index.d.ts +1 -0
  88. package/lib/base/classes/base-process/index.js +22 -0
  89. package/lib/base/classes/base-process/index.js.map +1 -0
  90. package/lib/base/classes/base-process/processes.repository.d.ts +0 -0
  91. package/lib/base/classes/base-process/processes.repository.js +5 -0
  92. package/lib/base/classes/base-process/processes.repository.js.map +1 -0
  93. package/lib/base/classes/base-project.d.ts +1 -1
  94. package/lib/base/classes/base-vscode.d.ts +1 -1
  95. package/lib/base/classes/base-vscode.js +9 -1
  96. package/lib/base/classes/base-vscode.js.map +1 -1
  97. package/lib/base/tcp-udp-ports/not-assignable-port.entity.js +2 -2
  98. package/lib/build-info._auto-generated_.d.ts +1 -1
  99. package/lib/build-info._auto-generated_.js +1 -1
  100. package/lib/env/env.angular-node-app.d.ts +1 -2
  101. package/lib/env/env.angular-node-app.js +3 -4
  102. package/lib/env/env.angular-node-app.js.map +1 -1
  103. package/lib/env/env.docs-webapp.d.ts +1 -2
  104. package/lib/env/env.docs-webapp.js +3 -4
  105. package/lib/env/env.docs-webapp.js.map +1 -1
  106. package/lib/env/env.electron-app.d.ts +1 -2
  107. package/lib/env/env.electron-app.js +3 -4
  108. package/lib/env/env.electron-app.js.map +1 -1
  109. package/lib/env/env.mobile-app.d.ts +1 -2
  110. package/lib/env/env.mobile-app.js +3 -4
  111. package/lib/env/env.mobile-app.js.map +1 -1
  112. package/lib/env/env.npm-lib-and-cli-tool.d.ts +1 -2
  113. package/lib/env/env.npm-lib-and-cli-tool.js +3 -4
  114. package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
  115. package/lib/env/env.vscode-plugin.d.ts +1 -2
  116. package/lib/env/env.vscode-plugin.js +3 -4
  117. package/lib/env/env.vscode-plugin.js.map +1 -1
  118. package/lib/env-backend._auto-generated_.d.ts +34 -0
  119. package/lib/env-backend._auto-generated_.js +38 -0
  120. package/lib/env-backend._auto-generated_.js.map +1 -0
  121. package/lib/env-browser._auto-generated_.d.ts +34 -0
  122. package/lib/env-browser._auto-generated_.js +38 -0
  123. package/lib/env-browser._auto-generated_.js.map +1 -0
  124. package/lib/env.backend.d.ts +34 -0
  125. package/lib/env.backend.js +40 -0
  126. package/lib/env.backend.js.map +1 -0
  127. package/lib/env.browser.d.ts +34 -0
  128. package/lib/helpers/for-backend/helpers-dependencies.backend.d.ts +0 -1
  129. package/lib/helpers/for-backend/helpers-dependencies.backend.js +0 -27
  130. package/lib/helpers/for-backend/helpers-dependencies.backend.js.map +1 -1
  131. package/lib/helpers/for-backend/helpers-file-folders.js +11 -3
  132. package/lib/helpers/for-backend/helpers-file-folders.js.map +1 -1
  133. package/lib/helpers/for-browser/angular.helper.js +2 -2
  134. package/lib/helpers/helpers.d.ts +0 -8
  135. package/lib/helpers/helpers.js +1 -55
  136. package/lib/helpers/helpers.js.map +1 -1
  137. package/lib/old/base-component.js +2 -2
  138. package/lib/old/base-formly-component.js +2 -2
  139. package/lib/old/dual-component-ctrl.js +2 -2
  140. package/lib/utils.d.ts +27 -1
  141. package/lib/utils.js +141 -4
  142. package/lib/utils.js.map +1 -1
  143. package/lib/validators/validators-git.js.map +1 -1
  144. package/package.json +1 -1
  145. package/tmp-environment.json +7 -11
  146. package/websql/fesm2022/tnp-helpers.mjs +442 -79
  147. package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
  148. package/websql/lib/base/classes/base-cli-worker/base-cli-worker-config.d.ts +4 -0
  149. package/websql/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.d.ts +3 -2
  150. package/websql/lib/base/classes/base-cli-worker/base-cli-worker.d.ts +27 -0
  151. package/websql/lib/base/classes/base-cli-worker/base-cli-worker.models.d.ts +5 -2
  152. package/websql/lib/base/classes/base-cli-worker/base-cli-worker.utils.d.ts +2 -0
  153. package/websql/lib/base/classes/base-cli-worker/index.d.ts +2 -1
  154. package/websql/lib/base/classes/base-docker.d.ts +3 -7
  155. package/websql/lib/base/classes/base-global-command-line.d.ts +26 -15
  156. package/websql/lib/base/classes/base-node-modules.d.ts +1 -0
  157. package/websql/lib/base/classes/base-vscode.d.ts +1 -1
  158. package/websql/lib/build-info._auto-generated_.d.ts +1 -1
  159. package/websql/lib/helpers/helpers.d.ts +0 -5
  160. package/websql/lib/utils.d.ts +27 -1
  161. package/websql/package.json +1 -1
@@ -1,6 +1,10 @@
1
1
  // @ts-nocheck
2
2
  export declare class BaseCliWorkerConfig {
3
3
  static from(opt: Partial<BaseCliWorkerConfig>): BaseCliWorkerConfig;
4
+ /**
5
+ * path to file where config is stored
6
+ */
7
+ pathToFile: string;
4
8
  /**
5
9
  * port taken by service
6
10
  */
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
2
  import { CoreModels } from 'tnp-core/websql';
3
- import type { BaseCliWorker } from './base-cli-worker';
3
+ import type { BaseCliWorker, BaseCliWorkerGuiUrlOptions } from './base-cli-worker';
4
4
  import type { BaseCliWorkerController } from './base-cli-worker-controller';
5
5
  export type BaseWorkerTerminalActionReturnType = {
6
6
  [uniqeActionName: string]: {
@@ -18,7 +18,7 @@ export declare class BaseCliWorkerTerminalUI<WORKER extends BaseCliWorker<BaseCl
18
18
  * override whole terminal header
19
19
  */
20
20
  protected header(): Promise<void>;
21
- infoMessageBelowHeader(): Promise<void>;
21
+ infoMessageBelowHeader(options?: BaseCliWorkerGuiUrlOptions): Promise<void>;
22
22
  protected get backAction(): {
23
23
  back: {
24
24
  name: string;
@@ -34,6 +34,7 @@ export declare class BaseCliWorkerTerminalUI<WORKER extends BaseCliWorker<BaseCl
34
34
  exitIsOnlyReturn?: boolean;
35
35
  chooseAction?: boolean;
36
36
  }): BaseWorkerTerminalActionReturnType;
37
+ private headerDisplayed;
37
38
  infoScreen(options?: {
38
39
  exitIsOnlyReturn?: boolean;
39
40
  }): Promise<void>;
@@ -1,9 +1,15 @@
1
1
  // @ts-nocheck
2
+ import { BehaviorSubject } from 'rxjs';
2
3
  import { EndpointContext, Taon } from 'taon/websql';
3
4
  import { BaseCliWorkerConfig } from './base-cli-worker-config';
4
5
  import type { BaseCliWorkerController } from './base-cli-worker-controller';
5
6
  import { BaseCliWorkerTerminalUI } from './base-cli-worker-terminal-ui';
6
7
  import { BaseCliMethodOptions } from './base-cli-worker.models';
8
+ export interface BaseCliWorkerGuiUrlOptions {
9
+ domain?: string;
10
+ port?: number | null;
11
+ useHttps?: boolean;
12
+ }
7
13
  export declare abstract class BaseCliWorker<REMOTE_CTRL extends BaseCliWorkerController<any>, TERMINAL_UI extends BaseCliWorkerTerminalUI<any> = any> {
8
14
  /**
9
15
  * unique id for service
@@ -17,6 +23,16 @@ export declare abstract class BaseCliWorker<REMOTE_CTRL extends BaseCliWorkerCon
17
23
  * unique id for service
18
24
  */
19
25
  readonly serviceVersion: string;
26
+ /**
27
+ * Indicates if worker is part of cloud
28
+ * and should use cloud ip address
29
+ */
30
+ static readonly isCloudEnable: Pick<BehaviorSubject<boolean>, 'next' | 'getValue'>;
31
+ /**
32
+ * Cloud ip address of the worker (if part of cloud)
33
+ */
34
+ static readonly cloudIp: Pick<BehaviorSubject<string | null>, 'next' | 'getValue'>;
35
+ private static workers;
20
36
  readonly SPECIAL_WORKER_READY_MESSAGE = "$$$ WORKER_READY $$$";
21
37
  /**
22
38
  * dependency workers that should be started before this worker
@@ -24,6 +40,16 @@ export declare abstract class BaseCliWorker<REMOTE_CTRL extends BaseCliWorkerCon
24
40
  readonly dependencyWorkers: Map<string, BaseCliWorker<any, any>>;
25
41
  readonly terminalUI: TERMINAL_UI;
26
42
  readonly workerContextTemplate: ReturnType<typeof Taon.createContextTemplate>;
43
+ /**
44
+ * Name of the worker context
45
+ */
46
+ get contextName(): string;
47
+ /**
48
+ * Port where worker is running
49
+ * (getter only accessible from host machine)
50
+ */
51
+ get port(): number | undefined;
52
+ getWorkerInfoGuiUrl(options?: BaseCliWorkerGuiUrlOptions): string;
27
53
  readonly controllerClass: new () => REMOTE_CTRL;
28
54
  constructor(
29
55
  /**
@@ -38,6 +64,7 @@ export declare abstract class BaseCliWorker<REMOTE_CTRL extends BaseCliWorkerCon
38
64
  * unique id for service
39
65
  */
40
66
  serviceVersion: string);
67
+ static getAllWorkersStartedInSystemFromCurrentCli(): BaseCliWorker<any, any>[];
41
68
  get processLocalInfoObj(): BaseCliWorkerConfig;
42
69
  getRemoteControllerFor<ctrl = REMOTE_CTRL>(options?: {
43
70
  methodOptions: Partial<BaseCliMethodOptions>;
@@ -6,12 +6,15 @@ interface BaseCliWorkerOptionCallable {
6
6
  */
7
7
  calledFrom: string;
8
8
  }
9
- declare class BaseCliWorkerConfigGetContextOptions {
9
+ export declare class BaseCliWorkerConfigGetContextOptions {
10
10
  /**
11
11
  * default localhost
12
12
  */
13
13
  ipAddressOfTaonInstance?: string;
14
- port?: number;
14
+ /**
15
+ * if null nothing is used as port (ip address will be clean)
16
+ */
17
+ port?: number | null;
15
18
  }
16
19
  /**
17
20
  * Default mode: DETACHED_CHILD_PROCESS
@@ -1,4 +1,6 @@
1
1
  // @ts-nocheck
2
+ import { BaseCliWorkerConfig } from './base-cli-worker-config';
2
3
  export declare namespace BaseCliWorkerUtils {
3
4
  const getPathToProcessLocalInfoJson: (serviceID: string) => string;
5
+ const getAllServicesFromOS: () => BaseCliWorkerConfig[];
4
6
  }
@@ -4,4 +4,5 @@ export * from './base-cli-worker.models';
4
4
  export * from './base-cli-worker-database-config';
5
5
  export * from './base-cli-worker-controller';
6
6
  export * from './base-cli-worker-config';
7
- export * from './base-cli-worker-terminal-ui';
7
+ export * from './base-cli-worker-terminal-ui';
8
+ export * from './base-cli-worker.utils';
@@ -1,5 +1,6 @@
1
1
  // @ts-nocheck
2
- import type { ChildProcess, StdioOptions } from 'child_process';
2
+ import type { ChildProcess } from 'child_process';
3
+ import { UtilsDocker } from '../../utils';
3
4
  import { BaseFeatureForProject } from './base-feature-for-project';
4
5
  import { BaseProject } from './base-project';
5
6
  export declare class BaseDocker<PROJECT extends BaseProject = any> extends BaseFeatureForProject<PROJECT> {
@@ -7,11 +8,6 @@ export declare class BaseDocker<PROJECT extends BaseProject = any> extends BaseF
7
8
  * Updates ports in .env file based on available ports range.
8
9
  */
9
10
  updateDockerComposePorts(): Promise<void>;
10
- getDockerComposeUpExecChildProcess(action: 'up' | 'down', options?: {
11
- composeFileName?: string;
12
- cwd?: string;
13
- env?: NodeJS.ProcessEnv;
14
- stdio?: StdioOptions;
15
- }): ChildProcess;
11
+ getDockerComposeActionChildProcess(action: UtilsDocker.DockerComposeActionType, options?: UtilsDocker.DockerComposeActionOptions): ChildProcess;
16
12
  removeAllImagesBy_Env_COMPOSE_PROJECT_NAME(): Promise<void>;
17
13
  }
@@ -35,6 +35,7 @@ export declare class BaseGlobalCommandLine<PARAMS = any, PROJECT extends BasePro
35
35
  update(): Promise<any>;
36
36
  private updateProject;
37
37
  deepUp(noExit?: boolean): Promise<any>;
38
+ upAll(noExit?: boolean): Promise<any>;
38
39
  deepUpForce(noExit?: boolean): Promise<any>;
39
40
  deepUpdateForce(noExit?: boolean): Promise<any>;
40
41
  deepUpdate(noExit?: boolean): Promise<any>;
@@ -68,18 +69,18 @@ export declare class BaseGlobalCommandLine<PARAMS = any, PROJECT extends BasePro
68
69
  */
69
70
  stashAll(): Promise<any>;
70
71
  /**
71
- * push force to all orgins
72
+ * push force to all origins
72
73
  */
73
- pushAllForce(): Promise<any>;
74
- pAllForce(): Promise<any>;
75
- pAllf(): Promise<any>;
76
- pAll(): Promise<any>;
74
+ pushAllForce(): Promise<void>;
75
+ pAllForce(): Promise<void>;
76
+ pAllf(): Promise<void>;
77
+ pAll(): Promise<void>;
77
78
  /**
78
79
  * push to all origins
79
80
  */
80
- pushAll(force?: boolean): Promise<any>;
81
- forcePush(): Promise<any>;
82
- pushForce(): Promise<any>;
81
+ pushAll(force?: boolean): Promise<void>;
82
+ forcePush(): Promise<void>;
83
+ pushForce(): Promise<void>;
83
84
  /**
84
85
  * Commit and push this for single repo
85
86
  */
@@ -89,14 +90,14 @@ export declare class BaseGlobalCommandLine<PARAMS = any, PROJECT extends BasePro
89
90
  origin?: string;
90
91
  commitMessageRequired?: boolean;
91
92
  noExit?: boolean;
92
- }): Promise<any>;
93
- _preventPushPullFromNotCorrectBranch(): Promise<any>;
94
- qPush(): Promise<any>;
95
- quickPush(): Promise<any>;
96
- repushauto(): Promise<any>;
97
- rePush(skipQuesion?: boolean): Promise<any>;
93
+ }): Promise<void>;
94
+ _preventPushPullFromNotCorrectBranch(): Promise<void>;
95
+ qPush(): Promise<void>;
96
+ quickPush(): Promise<void>;
97
+ repushauto(): Promise<void>;
98
+ rePush(skipQuesion?: boolean): Promise<void>;
98
99
  push(options?: PushProcessOptions): Promise<void>;
99
- melt(): Promise<any>;
100
+ melt(): Promise<void>;
100
101
  meltUp(): Promise<any>;
101
102
  meltAll(): Promise<any>;
102
103
  private __meltCommitsFunc;
@@ -251,4 +252,14 @@ export declare class BaseGlobalCommandLine<PARAMS = any, PROJECT extends BasePro
251
252
  zsStart(): any;
252
253
  startZscaller(): any;
253
254
  killZscaller(): any;
255
+ hasCommand(): Promise<void>;
256
+ hasCommandSync(): void;
257
+ publicIpAddress(): Promise<void>;
258
+ publicIp(): Promise<void>;
259
+ localIps(): Promise<void>;
260
+ isOnline(): Promise<any>;
261
+ configureBash(): Promise<void>;
262
+ configureShell(): Promise<void>;
263
+ confBash(): void;
264
+ confShell(): void;
254
265
  }
@@ -37,6 +37,7 @@ export declare class BaseNodeModules<NPM_HELPERS extends BaseNpmHelpers = BaseNp
37
37
  get realPath(): string;
38
38
  protected preventWrongLinkDestination(dest: string): string;
39
39
  linkToProject(project: Partial<BaseProject>): any;
40
+ copyToProject(project: BaseProject): void;
40
41
  linkToLocation(location: string): void;
41
42
  makeSureInstalled(options?: Omit<CoreModels.NpmInstallOptions, 'pkg'>): Promise<void>;
42
43
  remove(options?: {
@@ -38,7 +38,7 @@ export declare class BaseVscodeHelpers<PROJECT extends BaseProject = any> extend
38
38
  */
39
39
  protected stripVersion(folderName: string): string;
40
40
  get installedExtensions(): string[];
41
- applyProperGlobalSettings(): Promise<void>;
41
+ static applyProperGlobalSettings(): Promise<void>;
42
42
  /**
43
43
  * by default left menu color and bottom status bar are the same
44
44
  */
@@ -18,4 +18,4 @@ export declare const PROJECT_NPM_NAME = "tnp-helpers";
18
18
  /**
19
19
  * Autogenerated by current cli tool. Use *tnp release* to bump version.
20
20
  */
21
- export declare const CURRENT_PACKAGE_VERSION = "19.0.66";
21
+ export declare const CURRENT_PACKAGE_VERSION = "19.0.67";
@@ -59,11 +59,6 @@ export declare class HelpersTaon extends CoreHelpers {
59
59
  uniqArray<T = any>(array: any[], uniqueProperty?: keyof T): T[];
60
60
  slash(pathFromWindowsOrUnixType: string): any;
61
61
  isElevated(): Promise<void>;
62
- /**
63
- * TODO fix this methods
64
- */
65
- localIpAddress(): Promise<any>;
66
- allLocalIpAddresses(): URL[];
67
62
  mesureExectionInMs(description: string, functionToExecute: Function, ...functionArguments: any[]): Promise<number>;
68
63
  mesureExectionInMsSync(description: string, functionToExecute: () => void): number;
69
64
  waitForCondition(conditionFn: (any: any) => boolean, howOfftenCheckInMs?: number): Promise<unknown>;
@@ -1,4 +1,5 @@
1
1
  // @ts-nocheck
2
+ import { ChildProcess, StdioOptions } from 'node:child_process';
2
3
  import type * as ts from 'typescript';
3
4
  export declare namespace UtilsNpm {
4
5
  const isSpecialVersion: (version: string) => boolean;
@@ -194,5 +195,30 @@ export declare namespace UtilsPasswords {
194
195
  }
195
196
  export declare namespace UtilsDocker {
196
197
  const DOCKER_LABEL_KEY = "com.docker.compose.project";
197
- const cleanImagesByDockerLabel: (labelKey: string, labelValue: string) => Promise<void>;
198
+ const DOCKER_TAON_PROJECT_LABEL = "com.docker.compose.taon.project=true";
199
+ const cleanImagesAndContainersByDockerLabel: (labelKey: string, labelValue: string) => Promise<void>;
200
+ interface DockerComposeActionOptions {
201
+ composeFileName?: string;
202
+ cwd?: string;
203
+ env?: NodeJS.ProcessEnv;
204
+ skipBuild?: boolean;
205
+ stdio?: StdioOptions;
206
+ useFirstYmlFound?: boolean;
207
+ }
208
+ type DockerComposeActionType = 'up' | 'down';
209
+ /**
210
+ * @returns cmd + args array
211
+ * you can use with child_process.spawn
212
+ * const [cmd, ...args] = getDockerComposeActionCommand('up');
213
+ * child.spawn(cmd, args, { ... });
214
+ *
215
+ * @param action 'up' | 'down'
216
+ */
217
+ const getDockerComposeActionCommand: (action: DockerComposeActionType, options?: Omit<DockerComposeActionOptions, "cwd" | "env" | "stdio" | "useFirstYmlFound">) => string[];
218
+ const getDockerComposeActionChildProcess: (action: DockerComposeActionType, options?: DockerComposeActionOptions) => ChildProcess;
219
+ const removeAllTaonContainersAndImagesFromDocker: () => Promise<void>;
220
+ /**
221
+ * @TODO @REFACTOR use async stuff
222
+ */
223
+ const linkPodmanAsDockerIfNecessary: () => Promise<void>;
198
224
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tnp-helpers/websql",
3
- "version": "19.0.66",
3
+ "version": "19.0.67",
4
4
  "module": "fesm2022/tnp-helpers.mjs",
5
5
  "typings": "index.d.ts",
6
6
  "exports": {