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.
- package/browser/fesm2022/tnp-helpers.mjs +441 -78
- package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
- package/browser/lib/base/classes/base-cli-worker/base-cli-worker-config.d.ts +4 -0
- package/browser/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.d.ts +3 -2
- package/browser/lib/base/classes/base-cli-worker/base-cli-worker.d.ts +27 -0
- package/browser/lib/base/classes/base-cli-worker/base-cli-worker.models.d.ts +5 -2
- package/browser/lib/base/classes/base-cli-worker/base-cli-worker.utils.d.ts +2 -0
- package/browser/lib/base/classes/base-cli-worker/index.d.ts +2 -1
- package/browser/lib/base/classes/base-docker.d.ts +3 -7
- package/browser/lib/base/classes/base-global-command-line.d.ts +26 -15
- package/browser/lib/base/classes/base-node-modules.d.ts +1 -0
- package/browser/lib/base/classes/base-vscode.d.ts +1 -1
- package/browser/lib/build-info._auto-generated_.d.ts +1 -1
- package/browser/lib/helpers/helpers.d.ts +0 -5
- package/browser/lib/utils.d.ts +27 -1
- package/browser/package.json +1 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker-config.d.ts +4 -0
- package/lib/base/classes/base-cli-worker/base-cli-worker-config.js +4 -0
- package/lib/base/classes/base-cli-worker/base-cli-worker-config.js.map +1 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.d.ts +3 -2
- package/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.js +21 -6
- package/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.js.map +1 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker.d.ts +27 -0
- package/lib/base/classes/base-cli-worker/base-cli-worker.js +56 -3
- package/lib/base/classes/base-cli-worker/base-cli-worker.js.map +1 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker.models.d.ts +5 -2
- package/lib/base/classes/base-cli-worker/base-cli-worker.models.js +2 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker.models.js.map +1 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker.utils.d.ts +2 -0
- package/lib/base/classes/base-cli-worker/base-cli-worker.utils.js +11 -0
- package/lib/base/classes/base-cli-worker/base-cli-worker.utils.js.map +1 -1
- package/lib/base/classes/base-cli-worker/index.d.ts +1 -0
- package/lib/base/classes/base-cli-worker/index.js +1 -0
- package/lib/base/classes/base-cli-worker/index.js.map +1 -1
- package/lib/base/classes/base-docker.d.ts +3 -7
- package/lib/base/classes/base-docker.js +6 -19
- package/lib/base/classes/base-docker.js.map +1 -1
- package/lib/base/classes/base-git.js +23 -8
- package/lib/base/classes/base-git.js.map +1 -1
- package/lib/base/classes/base-global-command-line.backend.d.ts +13 -1
- package/lib/base/classes/base-global-command-line.backend.js +416 -11
- package/lib/base/classes/base-global-command-line.backend.js.map +1 -1
- package/lib/base/classes/base-global-command-line.d.ts +12 -1
- package/lib/base/classes/base-global-command-line.js +81 -3
- package/lib/base/classes/base-global-command-line.js.map +1 -1
- package/lib/base/classes/base-ignore-hide.js +4 -0
- package/lib/base/classes/base-ignore-hide.js.map +1 -1
- package/lib/base/classes/base-node-modules.d.ts +1 -0
- package/lib/base/classes/base-node-modules.js +22 -1
- package/lib/base/classes/base-node-modules.js.map +1 -1
- package/lib/base/classes/base-npm-helpers.js +1 -1
- package/lib/base/classes/base-npm-helpers.js.map +1 -1
- package/lib/base/classes/base-powershell.d.ts +1 -0
- package/lib/base/classes/base-powershell.js +13 -0
- package/lib/base/classes/base-powershell.js.map +1 -1
- package/lib/base/classes/base-process/base-process-api.service.d.ts +7 -0
- package/lib/base/classes/base-process/base-process.context.d.ts +19 -0
- package/lib/base/classes/base-process/base-process.context.js +22 -0
- package/lib/base/classes/base-process/base-process.context.js.map +1 -0
- package/lib/base/classes/base-process/base-process.controller.d.ts +17 -0
- package/lib/base/classes/base-process/base-process.controller.js +91 -0
- package/lib/base/classes/base-process/base-process.controller.js.map +1 -0
- package/lib/base/classes/base-process/base-process.d.ts +8 -0
- package/lib/base/classes/base-process/base-process.defaults-values.d.ts +2 -0
- package/lib/base/classes/base-process/base-process.defaults-values.js +9 -0
- package/lib/base/classes/base-process/base-process.defaults-values.js.map +1 -0
- package/lib/base/classes/base-process/base-process.js +62 -0
- package/lib/base/classes/base-process/base-process.js.map +1 -0
- package/lib/base/classes/base-process/base-process.models.d.ts +6 -0
- package/lib/base/classes/base-process/base-process.models.js +3 -0
- package/lib/base/classes/base-process/base-process.models.js.map +1 -0
- package/lib/base/classes/base-process/base-process.provider.d.ts +16 -0
- package/lib/base/classes/base-process/base-process.provider.js +69 -0
- package/lib/base/classes/base-process/base-process.provider.js.map +1 -0
- package/lib/base/classes/base-process/base-process.repository copy.d.ts +8 -0
- package/lib/base/classes/base-process/base-process.repository copy.js +32 -0
- package/lib/base/classes/base-process/base-process.repository copy.js.map +1 -0
- package/lib/base/classes/base-process/base-process.repository.d.ts +8 -0
- package/lib/base/classes/base-process/base-process.repository.js +32 -0
- package/lib/base/classes/base-process/base-process.repository.js.map +1 -0
- package/lib/base/classes/base-process/base-process.terminal-ui.d.ts +11 -0
- package/lib/base/classes/base-process/base-process.terminal-ui.js +54 -0
- package/lib/base/classes/base-process/base-process.terminal-ui.js.map +1 -0
- package/lib/base/classes/base-process/base-process.worker.d.ts +16 -0
- package/lib/base/classes/base-process/base-process.worker.js +29 -0
- package/lib/base/classes/base-process/base-process.worker.js.map +1 -0
- package/lib/base/classes/base-process/index.d.ts +1 -0
- package/lib/base/classes/base-process/index.js +22 -0
- package/lib/base/classes/base-process/index.js.map +1 -0
- package/lib/base/classes/base-process/processes.repository.d.ts +0 -0
- package/lib/base/classes/base-process/processes.repository.js +5 -0
- package/lib/base/classes/base-process/processes.repository.js.map +1 -0
- package/lib/base/classes/base-project.d.ts +1 -1
- package/lib/base/classes/base-vscode.d.ts +1 -1
- package/lib/base/classes/base-vscode.js +9 -1
- package/lib/base/classes/base-vscode.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 +1 -2
- package/lib/env/env.angular-node-app.js +3 -4
- package/lib/env/env.angular-node-app.js.map +1 -1
- package/lib/env/env.docs-webapp.d.ts +1 -2
- package/lib/env/env.docs-webapp.js +3 -4
- package/lib/env/env.docs-webapp.js.map +1 -1
- package/lib/env/env.electron-app.d.ts +1 -2
- package/lib/env/env.electron-app.js +3 -4
- package/lib/env/env.electron-app.js.map +1 -1
- package/lib/env/env.mobile-app.d.ts +1 -2
- package/lib/env/env.mobile-app.js +3 -4
- package/lib/env/env.mobile-app.js.map +1 -1
- package/lib/env/env.npm-lib-and-cli-tool.d.ts +1 -2
- package/lib/env/env.npm-lib-and-cli-tool.js +3 -4
- package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
- package/lib/env/env.vscode-plugin.d.ts +1 -2
- package/lib/env/env.vscode-plugin.js +3 -4
- package/lib/env/env.vscode-plugin.js.map +1 -1
- package/lib/env-backend._auto-generated_.d.ts +34 -0
- package/lib/env-backend._auto-generated_.js +38 -0
- package/lib/env-backend._auto-generated_.js.map +1 -0
- package/lib/env-browser._auto-generated_.d.ts +34 -0
- package/lib/env-browser._auto-generated_.js +38 -0
- package/lib/env-browser._auto-generated_.js.map +1 -0
- package/lib/env.backend.d.ts +34 -0
- package/lib/env.backend.js +40 -0
- package/lib/env.backend.js.map +1 -0
- package/lib/env.browser.d.ts +34 -0
- package/lib/helpers/for-backend/helpers-dependencies.backend.d.ts +0 -1
- package/lib/helpers/for-backend/helpers-dependencies.backend.js +0 -27
- package/lib/helpers/for-backend/helpers-dependencies.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-file-folders.js +11 -3
- package/lib/helpers/for-backend/helpers-file-folders.js.map +1 -1
- package/lib/helpers/for-browser/angular.helper.js +2 -2
- package/lib/helpers/helpers.d.ts +0 -8
- package/lib/helpers/helpers.js +1 -55
- package/lib/helpers/helpers.js.map +1 -1
- 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 +27 -1
- package/lib/utils.js +141 -4
- package/lib/utils.js.map +1 -1
- package/lib/validators/validators-git.js.map +1 -1
- package/package.json +1 -1
- package/tmp-environment.json +7 -11
- package/websql/fesm2022/tnp-helpers.mjs +442 -79
- package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
- package/websql/lib/base/classes/base-cli-worker/base-cli-worker-config.d.ts +4 -0
- package/websql/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.d.ts +3 -2
- package/websql/lib/base/classes/base-cli-worker/base-cli-worker.d.ts +27 -0
- package/websql/lib/base/classes/base-cli-worker/base-cli-worker.models.d.ts +5 -2
- package/websql/lib/base/classes/base-cli-worker/base-cli-worker.utils.d.ts +2 -0
- package/websql/lib/base/classes/base-cli-worker/index.d.ts +2 -1
- package/websql/lib/base/classes/base-docker.d.ts +3 -7
- package/websql/lib/base/classes/base-global-command-line.d.ts +26 -15
- package/websql/lib/base/classes/base-node-modules.d.ts +1 -0
- package/websql/lib/base/classes/base-vscode.d.ts +1 -1
- package/websql/lib/build-info._auto-generated_.d.ts +1 -1
- package/websql/lib/helpers/helpers.d.ts +0 -5
- package/websql/lib/utils.d.ts +27 -1
- package/websql/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Subject } from 'rxjs';
|
|
2
|
-
import { CoreModels, Utils, crossPlatformPath, _, CoreHelpers, UtilsTerminal, path, Helpers as Helpers$1, fse,
|
|
1
|
+
import { Subject, BehaviorSubject } from 'rxjs';
|
|
2
|
+
import { CoreModels, Utils, crossPlatformPath, _, CoreHelpers, UtilsTerminal, chalk, path, Helpers as Helpers$1, fse, UtilsNetwork } from 'tnp-core/browser';
|
|
3
3
|
import * as fuzzy from 'fuzzy';
|
|
4
4
|
import { Level } from 'ng2-logger/browser';
|
|
5
5
|
import { CLASS } from 'typescript-class-helpers/browser';
|
|
@@ -96,9 +96,6 @@ var HelpersAngular;
|
|
|
96
96
|
})(HelpersAngular || (HelpersAngular = {}));
|
|
97
97
|
//#endregion
|
|
98
98
|
|
|
99
|
-
//#region imports
|
|
100
|
-
/* */
|
|
101
|
-
/* */
|
|
102
99
|
//#endregion
|
|
103
100
|
//#region utils npm
|
|
104
101
|
var UtilsNpm;
|
|
@@ -2352,9 +2349,195 @@ var UtilsPasswords;
|
|
|
2352
2349
|
//#region utils docker
|
|
2353
2350
|
var UtilsDocker;
|
|
2354
2351
|
(function (UtilsDocker) {
|
|
2352
|
+
//#region utils docker / constants
|
|
2353
|
+
const DOCKER_TAON_PROJECT_LABEL_KEY = 'com.docker.compose.taon.project'; // change to your app name
|
|
2354
|
+
const DOCKER_TAON_PROJECT_LABEL_VALUE = 'true'; // change to your app name
|
|
2355
2355
|
UtilsDocker.DOCKER_LABEL_KEY = 'com.docker.compose.project'; // change to your app name
|
|
2356
|
-
|
|
2357
|
-
|
|
2356
|
+
UtilsDocker.DOCKER_TAON_PROJECT_LABEL = `${DOCKER_TAON_PROJECT_LABEL_KEY}=${DOCKER_TAON_PROJECT_LABEL_VALUE}`;
|
|
2357
|
+
//#endregion
|
|
2358
|
+
//#region utils docker / clean images by docker label
|
|
2359
|
+
UtilsDocker.cleanImagesAndContainersByDockerLabel = async (labelKey, labelValue) => {
|
|
2360
|
+
/* */
|
|
2361
|
+
/* */
|
|
2362
|
+
/* */
|
|
2363
|
+
/* */
|
|
2364
|
+
/* */
|
|
2365
|
+
/* */
|
|
2366
|
+
/* */
|
|
2367
|
+
/* */
|
|
2368
|
+
/* */
|
|
2369
|
+
/* */
|
|
2370
|
+
/* */
|
|
2371
|
+
/* */
|
|
2372
|
+
/* */
|
|
2373
|
+
/* */
|
|
2374
|
+
/* */
|
|
2375
|
+
/* */
|
|
2376
|
+
/* */
|
|
2377
|
+
/* */
|
|
2378
|
+
/* */
|
|
2379
|
+
/* */
|
|
2380
|
+
/* */
|
|
2381
|
+
/* */
|
|
2382
|
+
/* */
|
|
2383
|
+
/* */
|
|
2384
|
+
/* */
|
|
2385
|
+
/* */
|
|
2386
|
+
/* */
|
|
2387
|
+
/* */
|
|
2388
|
+
/* */
|
|
2389
|
+
/* */
|
|
2390
|
+
/* */
|
|
2391
|
+
/* */
|
|
2392
|
+
/* */
|
|
2393
|
+
/* */
|
|
2394
|
+
/* */
|
|
2395
|
+
/* */
|
|
2396
|
+
/* */
|
|
2397
|
+
/* */
|
|
2398
|
+
/* */
|
|
2399
|
+
/* */
|
|
2400
|
+
/* */
|
|
2401
|
+
/* */
|
|
2402
|
+
return (void 0);
|
|
2403
|
+
};
|
|
2404
|
+
//#endregion
|
|
2405
|
+
//#region utils docker / get docker compose up/down command
|
|
2406
|
+
/**
|
|
2407
|
+
* @returns cmd + args array
|
|
2408
|
+
* you can use with child_process.spawn
|
|
2409
|
+
* const [cmd, ...args] = getDockerComposeActionCommand('up');
|
|
2410
|
+
* child.spawn(cmd, args, { ... });
|
|
2411
|
+
*
|
|
2412
|
+
* @param action 'up' | 'down'
|
|
2413
|
+
*/
|
|
2414
|
+
UtilsDocker.getDockerComposeActionCommand = (action, options) => {
|
|
2415
|
+
options = options || {};
|
|
2416
|
+
options.skipBuild = !!options?.skipBuild;
|
|
2417
|
+
const composeFileName = options?.composeFileName || 'docker-compose.yml';
|
|
2418
|
+
return ['docker', 'compose', '-f', composeFileName].concat(action === 'up'
|
|
2419
|
+
? options.skipBuild
|
|
2420
|
+
? ['up']
|
|
2421
|
+
: ['up', '--build']
|
|
2422
|
+
: ['down']);
|
|
2423
|
+
};
|
|
2424
|
+
//#endregion
|
|
2425
|
+
//#region utils docker / get docker compose up/down child process
|
|
2426
|
+
UtilsDocker.getDockerComposeActionChildProcess = (action, options) => {
|
|
2427
|
+
/* */
|
|
2428
|
+
/* */
|
|
2429
|
+
/* */
|
|
2430
|
+
/* */
|
|
2431
|
+
/* */
|
|
2432
|
+
/* */
|
|
2433
|
+
/* */
|
|
2434
|
+
/* */
|
|
2435
|
+
/* */
|
|
2436
|
+
/* */
|
|
2437
|
+
/* */
|
|
2438
|
+
/* */
|
|
2439
|
+
/* */
|
|
2440
|
+
/* */
|
|
2441
|
+
/* */
|
|
2442
|
+
/* */
|
|
2443
|
+
/* */
|
|
2444
|
+
/* */
|
|
2445
|
+
/* */
|
|
2446
|
+
/* */
|
|
2447
|
+
/* */
|
|
2448
|
+
/* */
|
|
2449
|
+
/* */
|
|
2450
|
+
/* */
|
|
2451
|
+
/* */
|
|
2452
|
+
/* */
|
|
2453
|
+
/* */
|
|
2454
|
+
return (void 0);
|
|
2455
|
+
};
|
|
2456
|
+
//#endregion
|
|
2457
|
+
//#region utils docker / remove all taon containers and images from docker
|
|
2458
|
+
UtilsDocker.removeAllTaonContainersAndImagesFromDocker = async () => {
|
|
2459
|
+
/* */
|
|
2460
|
+
/* */
|
|
2461
|
+
/* */
|
|
2462
|
+
/* */
|
|
2463
|
+
/* */
|
|
2464
|
+
return (void 0);
|
|
2465
|
+
};
|
|
2466
|
+
//#endregion
|
|
2467
|
+
//#region utils docker / link podman as docker if necessary
|
|
2468
|
+
/**
|
|
2469
|
+
* @TODO @REFACTOR use async stuff
|
|
2470
|
+
*/
|
|
2471
|
+
UtilsDocker.linkPodmanAsDockerIfNecessary = async () => {
|
|
2472
|
+
/* */
|
|
2473
|
+
/* */
|
|
2474
|
+
/* */
|
|
2475
|
+
/* */
|
|
2476
|
+
/* */
|
|
2477
|
+
/* */
|
|
2478
|
+
/* */
|
|
2479
|
+
/* */
|
|
2480
|
+
/* */
|
|
2481
|
+
/* */
|
|
2482
|
+
/* */
|
|
2483
|
+
/* */
|
|
2484
|
+
/* */
|
|
2485
|
+
/* */
|
|
2486
|
+
/* */
|
|
2487
|
+
/* */
|
|
2488
|
+
/* */
|
|
2489
|
+
/* */
|
|
2490
|
+
/* */
|
|
2491
|
+
/* */
|
|
2492
|
+
/* */
|
|
2493
|
+
/* */
|
|
2494
|
+
/* */
|
|
2495
|
+
/* */
|
|
2496
|
+
/* */
|
|
2497
|
+
/* */
|
|
2498
|
+
/* */
|
|
2499
|
+
/* */
|
|
2500
|
+
/* */
|
|
2501
|
+
/* */
|
|
2502
|
+
/* */
|
|
2503
|
+
/* */
|
|
2504
|
+
/* */
|
|
2505
|
+
/* */
|
|
2506
|
+
/* */
|
|
2507
|
+
/* */
|
|
2508
|
+
/* */
|
|
2509
|
+
/* */
|
|
2510
|
+
/* */
|
|
2511
|
+
/* */
|
|
2512
|
+
/* */
|
|
2513
|
+
/* */
|
|
2514
|
+
/* */
|
|
2515
|
+
/* */
|
|
2516
|
+
/* */
|
|
2517
|
+
/* */
|
|
2518
|
+
/* */
|
|
2519
|
+
/* */
|
|
2520
|
+
/* */
|
|
2521
|
+
/* */
|
|
2522
|
+
/* */
|
|
2523
|
+
/* */
|
|
2524
|
+
/* */
|
|
2525
|
+
/* */
|
|
2526
|
+
/* */
|
|
2527
|
+
/* */
|
|
2528
|
+
/* */
|
|
2529
|
+
/* */
|
|
2530
|
+
/* */
|
|
2531
|
+
/* */
|
|
2532
|
+
/* */
|
|
2533
|
+
/* */
|
|
2534
|
+
/* */
|
|
2535
|
+
/* */
|
|
2536
|
+
/* */
|
|
2537
|
+
/* */
|
|
2538
|
+
/* */
|
|
2539
|
+
/* */
|
|
2540
|
+
/* */
|
|
2358
2541
|
/* */
|
|
2359
2542
|
/* */
|
|
2360
2543
|
/* */
|
|
@@ -4311,6 +4494,15 @@ class HelpersFileFolders {
|
|
|
4311
4494
|
/* */
|
|
4312
4495
|
/* */
|
|
4313
4496
|
/* */
|
|
4497
|
+
/* */
|
|
4498
|
+
/* */
|
|
4499
|
+
/* */
|
|
4500
|
+
/* */
|
|
4501
|
+
/* */
|
|
4502
|
+
/* */
|
|
4503
|
+
/* */
|
|
4504
|
+
/* */
|
|
4505
|
+
/* */
|
|
4314
4506
|
return (void 0);
|
|
4315
4507
|
}
|
|
4316
4508
|
filterDontCopy(basePathFoldersTosSkip, projectOrBasepath) {
|
|
@@ -4590,7 +4782,6 @@ class HelpersTaon extends CoreHelpers {
|
|
|
4590
4782
|
/* */
|
|
4591
4783
|
/* */
|
|
4592
4784
|
/* */
|
|
4593
|
-
/* */
|
|
4594
4785
|
arrays = new HelpersArrayObj(), strings = new HelpersStrings(), numbers = new HelpersNumber(),
|
|
4595
4786
|
//#region @browser
|
|
4596
4787
|
browser = HelpersBrowser.instance, ng = HelpersAngular) {
|
|
@@ -4791,62 +4982,6 @@ class HelpersTaon extends CoreHelpers {
|
|
|
4791
4982
|
/* */
|
|
4792
4983
|
}
|
|
4793
4984
|
//#endregion
|
|
4794
|
-
//#region methods & getters / get local ip addresses
|
|
4795
|
-
/**
|
|
4796
|
-
* TODO fix this methods
|
|
4797
|
-
*/
|
|
4798
|
-
async localIpAddress() {
|
|
4799
|
-
/* */
|
|
4800
|
-
/* */
|
|
4801
|
-
/* */
|
|
4802
|
-
/* */
|
|
4803
|
-
/* */
|
|
4804
|
-
/* */
|
|
4805
|
-
/* */
|
|
4806
|
-
/* */
|
|
4807
|
-
/* */
|
|
4808
|
-
/* */
|
|
4809
|
-
/* */
|
|
4810
|
-
/* */
|
|
4811
|
-
/* */
|
|
4812
|
-
/* */
|
|
4813
|
-
/* */
|
|
4814
|
-
/* */
|
|
4815
|
-
/* */
|
|
4816
|
-
/* */
|
|
4817
|
-
/* */
|
|
4818
|
-
/* */
|
|
4819
|
-
/* */
|
|
4820
|
-
/* */
|
|
4821
|
-
/* */
|
|
4822
|
-
/* */
|
|
4823
|
-
/* */
|
|
4824
|
-
return (void 0);
|
|
4825
|
-
}
|
|
4826
|
-
//#endregion
|
|
4827
|
-
//#region methods & getters / get all local ip addresses
|
|
4828
|
-
allLocalIpAddresses() {
|
|
4829
|
-
/* */
|
|
4830
|
-
/* */
|
|
4831
|
-
/* */
|
|
4832
|
-
/* */
|
|
4833
|
-
/* */
|
|
4834
|
-
/* */
|
|
4835
|
-
/* */
|
|
4836
|
-
/* */
|
|
4837
|
-
/* */
|
|
4838
|
-
/* */
|
|
4839
|
-
/* */
|
|
4840
|
-
/* */
|
|
4841
|
-
/* */
|
|
4842
|
-
/* */
|
|
4843
|
-
/* */
|
|
4844
|
-
/* */
|
|
4845
|
-
/* */
|
|
4846
|
-
/* */
|
|
4847
|
-
return (void 0);
|
|
4848
|
-
}
|
|
4849
|
-
//#endregion
|
|
4850
4985
|
//#region methods & getters / mesure execution in ms
|
|
4851
4986
|
async mesureExectionInMs(description, functionToExecute, ...functionArguments) {
|
|
4852
4987
|
var start = new Date();
|
|
@@ -5150,6 +5285,9 @@ Port = Port_1 = __decorate([
|
|
|
5150
5285
|
class BaseCliWorkerTerminalUI {
|
|
5151
5286
|
constructor(worker) {
|
|
5152
5287
|
this.worker = worker;
|
|
5288
|
+
//#endregion
|
|
5289
|
+
//#region protected methods / info screen
|
|
5290
|
+
this.headerDisplayed = false;
|
|
5153
5291
|
}
|
|
5154
5292
|
//#region protected methods / text for header
|
|
5155
5293
|
async headerText() {
|
|
@@ -5183,8 +5321,7 @@ class BaseCliWorkerTerminalUI {
|
|
|
5183
5321
|
}
|
|
5184
5322
|
//#endregion
|
|
5185
5323
|
//#region protected methods / info message below header
|
|
5186
|
-
async infoMessageBelowHeader() {
|
|
5187
|
-
/* */
|
|
5324
|
+
async infoMessageBelowHeader(options) {
|
|
5188
5325
|
/* */
|
|
5189
5326
|
/* */
|
|
5190
5327
|
/* */
|
|
@@ -5255,22 +5392,31 @@ class BaseCliWorkerTerminalUI {
|
|
|
5255
5392
|
/* */
|
|
5256
5393
|
/* */
|
|
5257
5394
|
/* */
|
|
5258
|
-
/* */
|
|
5259
|
-
/* */
|
|
5260
|
-
/* */
|
|
5261
5395
|
return (void 0);
|
|
5262
5396
|
}
|
|
5263
|
-
//#endregion
|
|
5264
|
-
//#region protected methods / info screen
|
|
5265
5397
|
async infoScreen(options) {
|
|
5266
5398
|
options = options || {};
|
|
5267
5399
|
while (true) {
|
|
5268
5400
|
if (!UtilsTerminal.isVerboseModeTaon()) {
|
|
5269
5401
|
UtilsTerminal.clearConsole();
|
|
5270
5402
|
}
|
|
5271
|
-
await this.header();
|
|
5272
|
-
await this.infoMessageBelowHeader();
|
|
5273
5403
|
const choices = this.getWorkerTerminalActions(options);
|
|
5404
|
+
if (this.headerDisplayed) {
|
|
5405
|
+
await this.infoMessageBelowHeader();
|
|
5406
|
+
}
|
|
5407
|
+
else {
|
|
5408
|
+
this.headerDisplayed = true;
|
|
5409
|
+
await this.header();
|
|
5410
|
+
await UtilsTerminal.pressAnyKeyToContinueAsync({
|
|
5411
|
+
message: `\nWelcome to ${chalk.bold(this.worker.serviceID) +
|
|
5412
|
+
chalk.bold('@') +
|
|
5413
|
+
chalk.bold(this.worker.serviceVersion)} Terminal UI.` +
|
|
5414
|
+
`\n
|
|
5415
|
+
Press any key to continue...`,
|
|
5416
|
+
});
|
|
5417
|
+
UtilsTerminal.clearConsole();
|
|
5418
|
+
await this.infoMessageBelowHeader();
|
|
5419
|
+
}
|
|
5274
5420
|
const choice = await UtilsTerminal.select({
|
|
5275
5421
|
choices,
|
|
5276
5422
|
question: 'Choose action',
|
|
@@ -5316,12 +5462,61 @@ class BaseCliMethodOptions extends BaseClass {
|
|
|
5316
5462
|
}
|
|
5317
5463
|
}
|
|
5318
5464
|
|
|
5465
|
+
//#region imports
|
|
5319
5466
|
//#endregion
|
|
5320
5467
|
//#region constants
|
|
5321
5468
|
const WORKER_INIT_START_TIME_LIMIT = 25; // 15 seconds max to start worker
|
|
5322
5469
|
const START_PORT_FOR_SERVICES = 3600;
|
|
5323
|
-
//#endregion
|
|
5324
5470
|
class BaseCliWorker {
|
|
5471
|
+
/**
|
|
5472
|
+
* Indicates if worker is part of cloud
|
|
5473
|
+
* and should use cloud ip address
|
|
5474
|
+
*/
|
|
5475
|
+
static { this.isCloudEnable = new BehaviorSubject(false); }
|
|
5476
|
+
/**
|
|
5477
|
+
* Cloud ip address of the worker (if part of cloud)
|
|
5478
|
+
*/
|
|
5479
|
+
static { this.cloudIp = new BehaviorSubject(null); }
|
|
5480
|
+
static { this.workers = new Map(); }
|
|
5481
|
+
/**
|
|
5482
|
+
* Name of the worker context
|
|
5483
|
+
*/
|
|
5484
|
+
get contextName() {
|
|
5485
|
+
return this.workerContextTemplate().contextName;
|
|
5486
|
+
}
|
|
5487
|
+
/**
|
|
5488
|
+
* Port where worker is running
|
|
5489
|
+
* (getter only accessible from host machine)
|
|
5490
|
+
*/
|
|
5491
|
+
get port() {
|
|
5492
|
+
return this.processLocalInfoObj.port;
|
|
5493
|
+
}
|
|
5494
|
+
getWorkerInfoGuiUrl(options) {
|
|
5495
|
+
/* */
|
|
5496
|
+
/* */
|
|
5497
|
+
/* */
|
|
5498
|
+
/* */
|
|
5499
|
+
/* */
|
|
5500
|
+
/* */
|
|
5501
|
+
/* */
|
|
5502
|
+
/* */
|
|
5503
|
+
/* */
|
|
5504
|
+
/* */
|
|
5505
|
+
/* */
|
|
5506
|
+
/* */
|
|
5507
|
+
/* */
|
|
5508
|
+
/* */
|
|
5509
|
+
/* */
|
|
5510
|
+
/* */
|
|
5511
|
+
/* */
|
|
5512
|
+
/* */
|
|
5513
|
+
/* */
|
|
5514
|
+
/* */
|
|
5515
|
+
/* */
|
|
5516
|
+
/* */
|
|
5517
|
+
/* */
|
|
5518
|
+
return (void 0);
|
|
5519
|
+
}
|
|
5325
5520
|
//#endregion
|
|
5326
5521
|
//#region constructor
|
|
5327
5522
|
constructor(
|
|
@@ -5348,9 +5543,15 @@ class BaseCliWorker {
|
|
|
5348
5543
|
this.dependencyWorkers = new Map();
|
|
5349
5544
|
// @ts-ignore TODO weird inheritance problem
|
|
5350
5545
|
this.terminalUI = new BaseCliWorkerTerminalUI(this);
|
|
5546
|
+
BaseCliWorker.workers.set(this.serviceID, this);
|
|
5351
5547
|
}
|
|
5352
5548
|
//#endregion
|
|
5353
5549
|
//#region public
|
|
5550
|
+
static getAllWorkersStartedInSystemFromCurrentCli() {
|
|
5551
|
+
/* */
|
|
5552
|
+
/* */
|
|
5553
|
+
return (void 0);
|
|
5554
|
+
}
|
|
5354
5555
|
//#region public fields & getters / process local info json object
|
|
5355
5556
|
get processLocalInfoObj() {
|
|
5356
5557
|
/* */
|
|
@@ -5919,6 +6120,7 @@ class BaseCliWorker {
|
|
|
5919
6120
|
/* */
|
|
5920
6121
|
/* */
|
|
5921
6122
|
/* */
|
|
6123
|
+
/* */
|
|
5922
6124
|
return (void 0);
|
|
5923
6125
|
}
|
|
5924
6126
|
//#endregion
|
|
@@ -6226,6 +6428,32 @@ BaseCliWorkerController = __decorate([
|
|
|
6226
6428
|
})
|
|
6227
6429
|
], BaseCliWorkerController);
|
|
6228
6430
|
|
|
6431
|
+
//#endregion
|
|
6432
|
+
var BaseCliWorkerUtils;
|
|
6433
|
+
(function (BaseCliWorkerUtils) {
|
|
6434
|
+
BaseCliWorkerUtils.getPathToProcessLocalInfoJson = (serviceID) => {
|
|
6435
|
+
/* */
|
|
6436
|
+
/* */
|
|
6437
|
+
/* */
|
|
6438
|
+
/* */
|
|
6439
|
+
/* */
|
|
6440
|
+
/* */
|
|
6441
|
+
/* */
|
|
6442
|
+
/* */
|
|
6443
|
+
return (void 0);
|
|
6444
|
+
};
|
|
6445
|
+
BaseCliWorkerUtils.getAllServicesFromOS = () => {
|
|
6446
|
+
/* */
|
|
6447
|
+
/* */
|
|
6448
|
+
/* */
|
|
6449
|
+
/* */
|
|
6450
|
+
/* */
|
|
6451
|
+
/* */
|
|
6452
|
+
/* */
|
|
6453
|
+
return (void 0);
|
|
6454
|
+
};
|
|
6455
|
+
})(BaseCliWorkerUtils || (BaseCliWorkerUtils = {}));
|
|
6456
|
+
|
|
6229
6457
|
//#endregion
|
|
6230
6458
|
let PortsController = class PortsController extends BaseCliWorkerController {
|
|
6231
6459
|
constructor() {
|
|
@@ -7013,7 +7241,7 @@ const PROJECT_NPM_NAME = 'tnp-helpers';
|
|
|
7013
7241
|
/**
|
|
7014
7242
|
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
7015
7243
|
*/
|
|
7016
|
-
const CURRENT_PACKAGE_VERSION = '19.0.
|
|
7244
|
+
const CURRENT_PACKAGE_VERSION = '19.0.67';
|
|
7017
7245
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
7018
7246
|
|
|
7019
7247
|
//#endregion
|
|
@@ -9740,6 +9968,24 @@ class BaseNodeModules {
|
|
|
9740
9968
|
return (void 0);
|
|
9741
9969
|
}
|
|
9742
9970
|
//#endregion
|
|
9971
|
+
//#region link node_modules to other project
|
|
9972
|
+
copyToProject(project) {
|
|
9973
|
+
/* */
|
|
9974
|
+
/* */
|
|
9975
|
+
/* */
|
|
9976
|
+
/* */
|
|
9977
|
+
/* */
|
|
9978
|
+
/* */
|
|
9979
|
+
/* */
|
|
9980
|
+
/* */
|
|
9981
|
+
/* */
|
|
9982
|
+
/* */
|
|
9983
|
+
/* */
|
|
9984
|
+
/* */
|
|
9985
|
+
/* */
|
|
9986
|
+
return (void 0);
|
|
9987
|
+
}
|
|
9988
|
+
//#endregion
|
|
9743
9989
|
//#region link to project or location
|
|
9744
9990
|
linkToLocation(location) {
|
|
9745
9991
|
/* */
|
|
@@ -9855,6 +10101,9 @@ class BaseNodeModules {
|
|
|
9855
10101
|
/* */
|
|
9856
10102
|
/* */
|
|
9857
10103
|
/* */
|
|
10104
|
+
/* */
|
|
10105
|
+
/* */
|
|
10106
|
+
/* */
|
|
9858
10107
|
return (void 0);
|
|
9859
10108
|
}
|
|
9860
10109
|
//#endregion
|
|
@@ -11305,6 +11554,22 @@ class BaseGit extends BaseFeatureForProject {
|
|
|
11305
11554
|
/* */
|
|
11306
11555
|
/* */
|
|
11307
11556
|
/* */
|
|
11557
|
+
/* */
|
|
11558
|
+
/* */
|
|
11559
|
+
/* */
|
|
11560
|
+
/* */
|
|
11561
|
+
/* */
|
|
11562
|
+
/* */
|
|
11563
|
+
/* */
|
|
11564
|
+
/* */
|
|
11565
|
+
/* */
|
|
11566
|
+
/* */
|
|
11567
|
+
/* */
|
|
11568
|
+
/* */
|
|
11569
|
+
/* */
|
|
11570
|
+
/* */
|
|
11571
|
+
/* */
|
|
11572
|
+
/* */
|
|
11308
11573
|
return (void 0);
|
|
11309
11574
|
}
|
|
11310
11575
|
//#region methods & getters / has action commits to melt
|
|
@@ -12469,8 +12734,11 @@ class BaseIgnoreHideHelpers extends BaseFeatureForProject {
|
|
|
12469
12734
|
'.prettierc',
|
|
12470
12735
|
'angular.json',
|
|
12471
12736
|
'.prettierrc.json',
|
|
12737
|
+
'.eslintrc.js',
|
|
12472
12738
|
'.eslintrc.json',
|
|
12473
12739
|
'.npmrc',
|
|
12740
|
+
'.yarnrc',
|
|
12741
|
+
'.idea',
|
|
12474
12742
|
...this.project.linter.getLintFiles(),
|
|
12475
12743
|
];
|
|
12476
12744
|
}
|
|
@@ -12479,6 +12747,7 @@ class BaseIgnoreHideHelpers extends BaseFeatureForProject {
|
|
|
12479
12747
|
return [
|
|
12480
12748
|
'tsconfig*',
|
|
12481
12749
|
'webpack.*',
|
|
12750
|
+
'.eslintrc*',
|
|
12482
12751
|
'tslint.*',
|
|
12483
12752
|
linkeProjectPrefix ? `${linkeProjectPrefix}*` : void 0,
|
|
12484
12753
|
].filter(f => !!f);
|
|
@@ -13014,7 +13283,18 @@ class BaseVscodeHelpers extends BaseFeatureForProject {
|
|
|
13014
13283
|
}
|
|
13015
13284
|
//#endregion
|
|
13016
13285
|
//#region apply proper global settings
|
|
13017
|
-
async applyProperGlobalSettings() {
|
|
13286
|
+
static async applyProperGlobalSettings() {
|
|
13287
|
+
/* */
|
|
13288
|
+
/* */
|
|
13289
|
+
/* */
|
|
13290
|
+
/* */
|
|
13291
|
+
/* */
|
|
13292
|
+
/* */
|
|
13293
|
+
/* */
|
|
13294
|
+
/* */
|
|
13295
|
+
/* */
|
|
13296
|
+
/* */
|
|
13297
|
+
/* */
|
|
13018
13298
|
/* */
|
|
13019
13299
|
/* */
|
|
13020
13300
|
/* */
|
|
@@ -15354,6 +15634,11 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
15354
15634
|
/* */
|
|
15355
15635
|
return (void 0);
|
|
15356
15636
|
}
|
|
15637
|
+
async upAll(noExit = false) {
|
|
15638
|
+
/* */
|
|
15639
|
+
/* */
|
|
15640
|
+
return (void 0);
|
|
15641
|
+
}
|
|
15357
15642
|
async deepUpForce(noExit = false) {
|
|
15358
15643
|
/* */
|
|
15359
15644
|
/* */
|
|
@@ -15807,7 +16092,7 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
15807
16092
|
//#endregion
|
|
15808
16093
|
//#region commands / push all origins
|
|
15809
16094
|
/**
|
|
15810
|
-
* push force to all
|
|
16095
|
+
* push force to all origins
|
|
15811
16096
|
*/
|
|
15812
16097
|
async pushAllForce() {
|
|
15813
16098
|
/* */
|
|
@@ -17282,6 +17567,8 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
17282
17567
|
/* */
|
|
17283
17568
|
/* */
|
|
17284
17569
|
/* */
|
|
17570
|
+
/* */
|
|
17571
|
+
/* */
|
|
17285
17572
|
return (void 0);
|
|
17286
17573
|
}
|
|
17287
17574
|
//#endregion
|
|
@@ -17774,6 +18061,82 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
17774
18061
|
/* */
|
|
17775
18062
|
return (void 0);
|
|
17776
18063
|
}
|
|
18064
|
+
//#endregion
|
|
18065
|
+
//#region commands / has command
|
|
18066
|
+
async hasCommand() {
|
|
18067
|
+
/* */
|
|
18068
|
+
/* */
|
|
18069
|
+
/* */
|
|
18070
|
+
/* */
|
|
18071
|
+
/* */
|
|
18072
|
+
/* */
|
|
18073
|
+
/* */
|
|
18074
|
+
return (void 0);
|
|
18075
|
+
}
|
|
18076
|
+
hasCommandSync() {
|
|
18077
|
+
/* */
|
|
18078
|
+
/* */
|
|
18079
|
+
/* */
|
|
18080
|
+
/* */
|
|
18081
|
+
/* */
|
|
18082
|
+
/* */
|
|
18083
|
+
/* */
|
|
18084
|
+
/* */
|
|
18085
|
+
/* */
|
|
18086
|
+
return (void 0);
|
|
18087
|
+
}
|
|
18088
|
+
//#endregion
|
|
18089
|
+
//#region commands / public ip address
|
|
18090
|
+
async publicIpAddress() {
|
|
18091
|
+
const ip = await UtilsNetwork.getCurrentPublicIpAddress();
|
|
18092
|
+
console.log(`Your public IP address is: ${ip}`);
|
|
18093
|
+
this._exit();
|
|
18094
|
+
}
|
|
18095
|
+
async publicIp() {
|
|
18096
|
+
/* */
|
|
18097
|
+
/* */
|
|
18098
|
+
return (void 0);
|
|
18099
|
+
}
|
|
18100
|
+
//#endregion
|
|
18101
|
+
//#region commands / open origins in vscode
|
|
18102
|
+
async localIps() {
|
|
18103
|
+
const firstActiveLocalIp = await UtilsNetwork.getFirstIpV4LocalActiveIpAddress();
|
|
18104
|
+
console.log(`Your first active local IP address is: ${firstActiveLocalIp} `);
|
|
18105
|
+
const ips = await UtilsNetwork.getLocalIpAddresses();
|
|
18106
|
+
for (let index = 0; index < ips.length; index++) {
|
|
18107
|
+
const ip = ips[index];
|
|
18108
|
+
// console.log(ip);
|
|
18109
|
+
console.log(`${index + 1}. Local IP address is: ` +
|
|
18110
|
+
`${ip.address}, type: ${ip.type}`);
|
|
18111
|
+
}
|
|
18112
|
+
this._exit();
|
|
18113
|
+
}
|
|
18114
|
+
//#endregion
|
|
18115
|
+
//#region commands / is online
|
|
18116
|
+
async isOnline() {
|
|
18117
|
+
/* */
|
|
18118
|
+
/* */
|
|
18119
|
+
/* */
|
|
18120
|
+
/* */
|
|
18121
|
+
/* */
|
|
18122
|
+
return (void 0);
|
|
18123
|
+
}
|
|
18124
|
+
//#endregion
|
|
18125
|
+
//#region commands / configure bash and shell
|
|
18126
|
+
async configureBash() {
|
|
18127
|
+
// ! TODO @UNCOMMENT
|
|
18128
|
+
// await UtilsTerminal.configureBashOrShell();
|
|
18129
|
+
}
|
|
18130
|
+
async configureShell() {
|
|
18131
|
+
// ! TODO @UNCOMMENT
|
|
18132
|
+
// await UtilsTerminal.configureBashOrShell();
|
|
18133
|
+
}
|
|
18134
|
+
confBash() {
|
|
18135
|
+
this.configureBash();
|
|
18136
|
+
}
|
|
18137
|
+
confShell() {
|
|
18138
|
+
this.configureShell();
|
|
18139
|
+
}
|
|
17777
18140
|
}
|
|
17778
18141
|
|
|
17779
18142
|
//#region imports
|
|
@@ -19545,5 +19908,5 @@ const Helpers = HelpersTaon.Instance;
|
|
|
19545
19908
|
* Generated bundle index. Do not edit.
|
|
19546
19909
|
*/
|
|
19547
19910
|
|
|
19548
|
-
export { BaseCLiWorkerStartMode, BaseCLiWorkerStartParams, BaseCliMethodOptions, BaseCliWorker, BaseCliWorkerConfig, BaseCliWorkerController, BaseCliWorkerTerminalUI, BaseCommandLineFeature, BaseCompilerForProject, BaseDebounceCompilerForProject, BaseFeatureForProject, BaseFileFoldersOperations, BaseGit, BaseGlobalCommandLine, BaseIgnoreHideHelpers, BaseJsonFileReader, BaseLibraryBuild, BaseLinkedProjects, BaseLinter, BaseNodeModules, BaseNpmHelpers, BasePackageJson, BaseProcessManger, BaseProject, BaseProjectResolver, BaseProjectTypeArr, BaseQuickFixes, BaseReleaseProcess, BaseVscodeHelpers, CommandConfig, CommandProcess, CommandProcessState, CommitData, CoreAngularProject, CoreProject, CoreTypescriptProject, Helpers, HelpersAngular, LinkedPorjectsConfig, LinkedProject, PackageJsonDependencyObjArr, Port, PortStatusArr, PortsController, PortsWorker, ProgressData, UtilsDocker, UtilsHttp, UtilsJava, UtilsMd, UtilsNpm, UtilsPasswords, UtilsQuickFixes, UtilsTaonWorker, UtilsTypescript, UtilsVSCode, UtilsZip, UtilsZipBrowser, executeCommand, getBaseCliWorkerDatabaseConfig };
|
|
19911
|
+
export { BaseCLiWorkerStartMode, BaseCLiWorkerStartParams, BaseCliMethodOptions, BaseCliWorker, BaseCliWorkerConfig, BaseCliWorkerConfigGetContextOptions, BaseCliWorkerController, BaseCliWorkerTerminalUI, BaseCliWorkerUtils, BaseCommandLineFeature, BaseCompilerForProject, BaseDebounceCompilerForProject, BaseFeatureForProject, BaseFileFoldersOperations, BaseGit, BaseGlobalCommandLine, BaseIgnoreHideHelpers, BaseJsonFileReader, BaseLibraryBuild, BaseLinkedProjects, BaseLinter, BaseNodeModules, BaseNpmHelpers, BasePackageJson, BaseProcessManger, BaseProject, BaseProjectResolver, BaseProjectTypeArr, BaseQuickFixes, BaseReleaseProcess, BaseVscodeHelpers, CommandConfig, CommandProcess, CommandProcessState, CommitData, CoreAngularProject, CoreProject, CoreTypescriptProject, Helpers, HelpersAngular, LinkedPorjectsConfig, LinkedProject, PackageJsonDependencyObjArr, Port, PortStatusArr, PortsController, PortsWorker, ProgressData, UtilsDocker, UtilsHttp, UtilsJava, UtilsMd, UtilsNpm, UtilsPasswords, UtilsQuickFixes, UtilsTaonWorker, UtilsTypescript, UtilsVSCode, UtilsZip, UtilsZipBrowser, executeCommand, getBaseCliWorkerDatabaseConfig };
|
|
19549
19912
|
//# sourceMappingURL=tnp-helpers.mjs.map
|