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/websql';
|
|
3
3
|
import { isImportDeclaration, isNamedImports, isExportDeclaration, isNamedExports, createSourceFile, ScriptTarget, ScriptKind } from 'typescript';
|
|
4
4
|
import * as fuzzy from 'fuzzy';
|
|
5
5
|
import { Level } from 'ng2-logger/websql';
|
|
@@ -97,9 +97,6 @@ var HelpersAngular;
|
|
|
97
97
|
})(HelpersAngular || (HelpersAngular = {}));
|
|
98
98
|
//#endregion
|
|
99
99
|
|
|
100
|
-
//#region imports
|
|
101
|
-
/* */
|
|
102
|
-
/* */
|
|
103
100
|
//#endregion
|
|
104
101
|
//#region utils npm
|
|
105
102
|
var UtilsNpm;
|
|
@@ -1141,7 +1138,7 @@ var UtilsTypescript;
|
|
|
1141
1138
|
const tagRegex = new RegExp(tags
|
|
1142
1139
|
.map(t => (Array.isArray(t) ? t[0] : t))
|
|
1143
1140
|
.filter(Boolean)
|
|
1144
|
-
.map(Utils.escapeStringForRegEx)
|
|
1141
|
+
.map(t => Utils.escapeStringForRegEx(t))
|
|
1145
1142
|
.join('|'), 'i');
|
|
1146
1143
|
let a = 0;
|
|
1147
1144
|
for (const statement of sourceFile.statements) {
|
|
@@ -2333,9 +2330,195 @@ var UtilsPasswords;
|
|
|
2333
2330
|
//#region utils docker
|
|
2334
2331
|
var UtilsDocker;
|
|
2335
2332
|
(function (UtilsDocker) {
|
|
2333
|
+
//#region utils docker / constants
|
|
2334
|
+
const DOCKER_TAON_PROJECT_LABEL_KEY = 'com.docker.compose.taon.project'; // change to your app name
|
|
2335
|
+
const DOCKER_TAON_PROJECT_LABEL_VALUE = 'true'; // change to your app name
|
|
2336
2336
|
UtilsDocker.DOCKER_LABEL_KEY = 'com.docker.compose.project'; // change to your app name
|
|
2337
|
-
|
|
2338
|
-
|
|
2337
|
+
UtilsDocker.DOCKER_TAON_PROJECT_LABEL = `${DOCKER_TAON_PROJECT_LABEL_KEY}=${DOCKER_TAON_PROJECT_LABEL_VALUE}`;
|
|
2338
|
+
//#endregion
|
|
2339
|
+
//#region utils docker / clean images by docker label
|
|
2340
|
+
UtilsDocker.cleanImagesAndContainersByDockerLabel = async (labelKey, labelValue) => {
|
|
2341
|
+
/* */
|
|
2342
|
+
/* */
|
|
2343
|
+
/* */
|
|
2344
|
+
/* */
|
|
2345
|
+
/* */
|
|
2346
|
+
/* */
|
|
2347
|
+
/* */
|
|
2348
|
+
/* */
|
|
2349
|
+
/* */
|
|
2350
|
+
/* */
|
|
2351
|
+
/* */
|
|
2352
|
+
/* */
|
|
2353
|
+
/* */
|
|
2354
|
+
/* */
|
|
2355
|
+
/* */
|
|
2356
|
+
/* */
|
|
2357
|
+
/* */
|
|
2358
|
+
/* */
|
|
2359
|
+
/* */
|
|
2360
|
+
/* */
|
|
2361
|
+
/* */
|
|
2362
|
+
/* */
|
|
2363
|
+
/* */
|
|
2364
|
+
/* */
|
|
2365
|
+
/* */
|
|
2366
|
+
/* */
|
|
2367
|
+
/* */
|
|
2368
|
+
/* */
|
|
2369
|
+
/* */
|
|
2370
|
+
/* */
|
|
2371
|
+
/* */
|
|
2372
|
+
/* */
|
|
2373
|
+
/* */
|
|
2374
|
+
/* */
|
|
2375
|
+
/* */
|
|
2376
|
+
/* */
|
|
2377
|
+
/* */
|
|
2378
|
+
/* */
|
|
2379
|
+
/* */
|
|
2380
|
+
/* */
|
|
2381
|
+
/* */
|
|
2382
|
+
/* */
|
|
2383
|
+
return (void 0);
|
|
2384
|
+
};
|
|
2385
|
+
//#endregion
|
|
2386
|
+
//#region utils docker / get docker compose up/down command
|
|
2387
|
+
/**
|
|
2388
|
+
* @returns cmd + args array
|
|
2389
|
+
* you can use with child_process.spawn
|
|
2390
|
+
* const [cmd, ...args] = getDockerComposeActionCommand('up');
|
|
2391
|
+
* child.spawn(cmd, args, { ... });
|
|
2392
|
+
*
|
|
2393
|
+
* @param action 'up' | 'down'
|
|
2394
|
+
*/
|
|
2395
|
+
UtilsDocker.getDockerComposeActionCommand = (action, options) => {
|
|
2396
|
+
options = options || {};
|
|
2397
|
+
options.skipBuild = !!options?.skipBuild;
|
|
2398
|
+
const composeFileName = options?.composeFileName || 'docker-compose.yml';
|
|
2399
|
+
return ['docker', 'compose', '-f', composeFileName].concat(action === 'up'
|
|
2400
|
+
? options.skipBuild
|
|
2401
|
+
? ['up']
|
|
2402
|
+
: ['up', '--build']
|
|
2403
|
+
: ['down']);
|
|
2404
|
+
};
|
|
2405
|
+
//#endregion
|
|
2406
|
+
//#region utils docker / get docker compose up/down child process
|
|
2407
|
+
UtilsDocker.getDockerComposeActionChildProcess = (action, options) => {
|
|
2408
|
+
/* */
|
|
2409
|
+
/* */
|
|
2410
|
+
/* */
|
|
2411
|
+
/* */
|
|
2412
|
+
/* */
|
|
2413
|
+
/* */
|
|
2414
|
+
/* */
|
|
2415
|
+
/* */
|
|
2416
|
+
/* */
|
|
2417
|
+
/* */
|
|
2418
|
+
/* */
|
|
2419
|
+
/* */
|
|
2420
|
+
/* */
|
|
2421
|
+
/* */
|
|
2422
|
+
/* */
|
|
2423
|
+
/* */
|
|
2424
|
+
/* */
|
|
2425
|
+
/* */
|
|
2426
|
+
/* */
|
|
2427
|
+
/* */
|
|
2428
|
+
/* */
|
|
2429
|
+
/* */
|
|
2430
|
+
/* */
|
|
2431
|
+
/* */
|
|
2432
|
+
/* */
|
|
2433
|
+
/* */
|
|
2434
|
+
/* */
|
|
2435
|
+
return (void 0);
|
|
2436
|
+
};
|
|
2437
|
+
//#endregion
|
|
2438
|
+
//#region utils docker / remove all taon containers and images from docker
|
|
2439
|
+
UtilsDocker.removeAllTaonContainersAndImagesFromDocker = async () => {
|
|
2440
|
+
/* */
|
|
2441
|
+
/* */
|
|
2442
|
+
/* */
|
|
2443
|
+
/* */
|
|
2444
|
+
/* */
|
|
2445
|
+
return (void 0);
|
|
2446
|
+
};
|
|
2447
|
+
//#endregion
|
|
2448
|
+
//#region utils docker / link podman as docker if necessary
|
|
2449
|
+
/**
|
|
2450
|
+
* @TODO @REFACTOR use async stuff
|
|
2451
|
+
*/
|
|
2452
|
+
UtilsDocker.linkPodmanAsDockerIfNecessary = async () => {
|
|
2453
|
+
/* */
|
|
2454
|
+
/* */
|
|
2455
|
+
/* */
|
|
2456
|
+
/* */
|
|
2457
|
+
/* */
|
|
2458
|
+
/* */
|
|
2459
|
+
/* */
|
|
2460
|
+
/* */
|
|
2461
|
+
/* */
|
|
2462
|
+
/* */
|
|
2463
|
+
/* */
|
|
2464
|
+
/* */
|
|
2465
|
+
/* */
|
|
2466
|
+
/* */
|
|
2467
|
+
/* */
|
|
2468
|
+
/* */
|
|
2469
|
+
/* */
|
|
2470
|
+
/* */
|
|
2471
|
+
/* */
|
|
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
|
+
/* */
|
|
2339
2522
|
/* */
|
|
2340
2523
|
/* */
|
|
2341
2524
|
/* */
|
|
@@ -4292,6 +4475,15 @@ class HelpersFileFolders {
|
|
|
4292
4475
|
/* */
|
|
4293
4476
|
/* */
|
|
4294
4477
|
/* */
|
|
4478
|
+
/* */
|
|
4479
|
+
/* */
|
|
4480
|
+
/* */
|
|
4481
|
+
/* */
|
|
4482
|
+
/* */
|
|
4483
|
+
/* */
|
|
4484
|
+
/* */
|
|
4485
|
+
/* */
|
|
4486
|
+
/* */
|
|
4295
4487
|
return (void 0);
|
|
4296
4488
|
}
|
|
4297
4489
|
filterDontCopy(basePathFoldersTosSkip, projectOrBasepath) {
|
|
@@ -4571,7 +4763,6 @@ class HelpersTaon extends CoreHelpers {
|
|
|
4571
4763
|
/* */
|
|
4572
4764
|
/* */
|
|
4573
4765
|
/* */
|
|
4574
|
-
/* */
|
|
4575
4766
|
arrays = new HelpersArrayObj(), strings = new HelpersStrings(), numbers = new HelpersNumber(),
|
|
4576
4767
|
//#region @browser
|
|
4577
4768
|
browser = HelpersBrowser.instance, ng = HelpersAngular) {
|
|
@@ -4772,62 +4963,6 @@ class HelpersTaon extends CoreHelpers {
|
|
|
4772
4963
|
/* */
|
|
4773
4964
|
}
|
|
4774
4965
|
//#endregion
|
|
4775
|
-
//#region methods & getters / get local ip addresses
|
|
4776
|
-
/**
|
|
4777
|
-
* TODO fix this methods
|
|
4778
|
-
*/
|
|
4779
|
-
async localIpAddress() {
|
|
4780
|
-
/* */
|
|
4781
|
-
/* */
|
|
4782
|
-
/* */
|
|
4783
|
-
/* */
|
|
4784
|
-
/* */
|
|
4785
|
-
/* */
|
|
4786
|
-
/* */
|
|
4787
|
-
/* */
|
|
4788
|
-
/* */
|
|
4789
|
-
/* */
|
|
4790
|
-
/* */
|
|
4791
|
-
/* */
|
|
4792
|
-
/* */
|
|
4793
|
-
/* */
|
|
4794
|
-
/* */
|
|
4795
|
-
/* */
|
|
4796
|
-
/* */
|
|
4797
|
-
/* */
|
|
4798
|
-
/* */
|
|
4799
|
-
/* */
|
|
4800
|
-
/* */
|
|
4801
|
-
/* */
|
|
4802
|
-
/* */
|
|
4803
|
-
/* */
|
|
4804
|
-
/* */
|
|
4805
|
-
return (void 0);
|
|
4806
|
-
}
|
|
4807
|
-
//#endregion
|
|
4808
|
-
//#region methods & getters / get all local ip addresses
|
|
4809
|
-
allLocalIpAddresses() {
|
|
4810
|
-
/* */
|
|
4811
|
-
/* */
|
|
4812
|
-
/* */
|
|
4813
|
-
/* */
|
|
4814
|
-
/* */
|
|
4815
|
-
/* */
|
|
4816
|
-
/* */
|
|
4817
|
-
/* */
|
|
4818
|
-
/* */
|
|
4819
|
-
/* */
|
|
4820
|
-
/* */
|
|
4821
|
-
/* */
|
|
4822
|
-
/* */
|
|
4823
|
-
/* */
|
|
4824
|
-
/* */
|
|
4825
|
-
/* */
|
|
4826
|
-
/* */
|
|
4827
|
-
/* */
|
|
4828
|
-
return (void 0);
|
|
4829
|
-
}
|
|
4830
|
-
//#endregion
|
|
4831
4966
|
//#region methods & getters / mesure execution in ms
|
|
4832
4967
|
async mesureExectionInMs(description, functionToExecute, ...functionArguments) {
|
|
4833
4968
|
var start = new Date();
|
|
@@ -5162,6 +5297,9 @@ Port = Port_1 = __decorate([
|
|
|
5162
5297
|
class BaseCliWorkerTerminalUI {
|
|
5163
5298
|
constructor(worker) {
|
|
5164
5299
|
this.worker = worker;
|
|
5300
|
+
//#endregion
|
|
5301
|
+
//#region protected methods / info screen
|
|
5302
|
+
this.headerDisplayed = false;
|
|
5165
5303
|
}
|
|
5166
5304
|
//#region protected methods / text for header
|
|
5167
5305
|
async headerText() {
|
|
@@ -5195,8 +5333,7 @@ class BaseCliWorkerTerminalUI {
|
|
|
5195
5333
|
}
|
|
5196
5334
|
//#endregion
|
|
5197
5335
|
//#region protected methods / info message below header
|
|
5198
|
-
async infoMessageBelowHeader() {
|
|
5199
|
-
/* */
|
|
5336
|
+
async infoMessageBelowHeader(options) {
|
|
5200
5337
|
/* */
|
|
5201
5338
|
/* */
|
|
5202
5339
|
/* */
|
|
@@ -5267,22 +5404,31 @@ class BaseCliWorkerTerminalUI {
|
|
|
5267
5404
|
/* */
|
|
5268
5405
|
/* */
|
|
5269
5406
|
/* */
|
|
5270
|
-
/* */
|
|
5271
|
-
/* */
|
|
5272
|
-
/* */
|
|
5273
5407
|
return (void 0);
|
|
5274
5408
|
}
|
|
5275
|
-
//#endregion
|
|
5276
|
-
//#region protected methods / info screen
|
|
5277
5409
|
async infoScreen(options) {
|
|
5278
5410
|
options = options || {};
|
|
5279
5411
|
while (true) {
|
|
5280
5412
|
if (!UtilsTerminal.isVerboseModeTaon()) {
|
|
5281
5413
|
UtilsTerminal.clearConsole();
|
|
5282
5414
|
}
|
|
5283
|
-
await this.header();
|
|
5284
|
-
await this.infoMessageBelowHeader();
|
|
5285
5415
|
const choices = this.getWorkerTerminalActions(options);
|
|
5416
|
+
if (this.headerDisplayed) {
|
|
5417
|
+
await this.infoMessageBelowHeader();
|
|
5418
|
+
}
|
|
5419
|
+
else {
|
|
5420
|
+
this.headerDisplayed = true;
|
|
5421
|
+
await this.header();
|
|
5422
|
+
await UtilsTerminal.pressAnyKeyToContinueAsync({
|
|
5423
|
+
message: `\nWelcome to ${chalk.bold(this.worker.serviceID) +
|
|
5424
|
+
chalk.bold('@') +
|
|
5425
|
+
chalk.bold(this.worker.serviceVersion)} Terminal UI.` +
|
|
5426
|
+
`\n
|
|
5427
|
+
Press any key to continue...`,
|
|
5428
|
+
});
|
|
5429
|
+
UtilsTerminal.clearConsole();
|
|
5430
|
+
await this.infoMessageBelowHeader();
|
|
5431
|
+
}
|
|
5286
5432
|
const choice = await UtilsTerminal.select({
|
|
5287
5433
|
choices,
|
|
5288
5434
|
question: 'Choose action',
|
|
@@ -5328,12 +5474,61 @@ class BaseCliMethodOptions extends BaseClass {
|
|
|
5328
5474
|
}
|
|
5329
5475
|
}
|
|
5330
5476
|
|
|
5477
|
+
//#region imports
|
|
5331
5478
|
//#endregion
|
|
5332
5479
|
//#region constants
|
|
5333
5480
|
const WORKER_INIT_START_TIME_LIMIT = 25; // 15 seconds max to start worker
|
|
5334
5481
|
const START_PORT_FOR_SERVICES = 3600;
|
|
5335
|
-
//#endregion
|
|
5336
5482
|
class BaseCliWorker {
|
|
5483
|
+
/**
|
|
5484
|
+
* Indicates if worker is part of cloud
|
|
5485
|
+
* and should use cloud ip address
|
|
5486
|
+
*/
|
|
5487
|
+
static { this.isCloudEnable = new BehaviorSubject(false); }
|
|
5488
|
+
/**
|
|
5489
|
+
* Cloud ip address of the worker (if part of cloud)
|
|
5490
|
+
*/
|
|
5491
|
+
static { this.cloudIp = new BehaviorSubject(null); }
|
|
5492
|
+
static { this.workers = new Map(); }
|
|
5493
|
+
/**
|
|
5494
|
+
* Name of the worker context
|
|
5495
|
+
*/
|
|
5496
|
+
get contextName() {
|
|
5497
|
+
return this.workerContextTemplate().contextName;
|
|
5498
|
+
}
|
|
5499
|
+
/**
|
|
5500
|
+
* Port where worker is running
|
|
5501
|
+
* (getter only accessible from host machine)
|
|
5502
|
+
*/
|
|
5503
|
+
get port() {
|
|
5504
|
+
return this.processLocalInfoObj.port;
|
|
5505
|
+
}
|
|
5506
|
+
getWorkerInfoGuiUrl(options) {
|
|
5507
|
+
/* */
|
|
5508
|
+
/* */
|
|
5509
|
+
/* */
|
|
5510
|
+
/* */
|
|
5511
|
+
/* */
|
|
5512
|
+
/* */
|
|
5513
|
+
/* */
|
|
5514
|
+
/* */
|
|
5515
|
+
/* */
|
|
5516
|
+
/* */
|
|
5517
|
+
/* */
|
|
5518
|
+
/* */
|
|
5519
|
+
/* */
|
|
5520
|
+
/* */
|
|
5521
|
+
/* */
|
|
5522
|
+
/* */
|
|
5523
|
+
/* */
|
|
5524
|
+
/* */
|
|
5525
|
+
/* */
|
|
5526
|
+
/* */
|
|
5527
|
+
/* */
|
|
5528
|
+
/* */
|
|
5529
|
+
/* */
|
|
5530
|
+
return (void 0);
|
|
5531
|
+
}
|
|
5337
5532
|
//#endregion
|
|
5338
5533
|
//#region constructor
|
|
5339
5534
|
constructor(
|
|
@@ -5360,9 +5555,15 @@ class BaseCliWorker {
|
|
|
5360
5555
|
this.dependencyWorkers = new Map();
|
|
5361
5556
|
// @ts-ignore TODO weird inheritance problem
|
|
5362
5557
|
this.terminalUI = new BaseCliWorkerTerminalUI(this);
|
|
5558
|
+
BaseCliWorker.workers.set(this.serviceID, this);
|
|
5363
5559
|
}
|
|
5364
5560
|
//#endregion
|
|
5365
5561
|
//#region public
|
|
5562
|
+
static getAllWorkersStartedInSystemFromCurrentCli() {
|
|
5563
|
+
/* */
|
|
5564
|
+
/* */
|
|
5565
|
+
return (void 0);
|
|
5566
|
+
}
|
|
5366
5567
|
//#region public fields & getters / process local info json object
|
|
5367
5568
|
get processLocalInfoObj() {
|
|
5368
5569
|
/* */
|
|
@@ -5931,6 +6132,7 @@ class BaseCliWorker {
|
|
|
5931
6132
|
/* */
|
|
5932
6133
|
/* */
|
|
5933
6134
|
/* */
|
|
6135
|
+
/* */
|
|
5934
6136
|
return (void 0);
|
|
5935
6137
|
}
|
|
5936
6138
|
//#endregion
|
|
@@ -6238,6 +6440,32 @@ BaseCliWorkerController = __decorate([
|
|
|
6238
6440
|
})
|
|
6239
6441
|
], BaseCliWorkerController);
|
|
6240
6442
|
|
|
6443
|
+
//#endregion
|
|
6444
|
+
var BaseCliWorkerUtils;
|
|
6445
|
+
(function (BaseCliWorkerUtils) {
|
|
6446
|
+
BaseCliWorkerUtils.getPathToProcessLocalInfoJson = (serviceID) => {
|
|
6447
|
+
/* */
|
|
6448
|
+
/* */
|
|
6449
|
+
/* */
|
|
6450
|
+
/* */
|
|
6451
|
+
/* */
|
|
6452
|
+
/* */
|
|
6453
|
+
/* */
|
|
6454
|
+
/* */
|
|
6455
|
+
return (void 0);
|
|
6456
|
+
};
|
|
6457
|
+
BaseCliWorkerUtils.getAllServicesFromOS = () => {
|
|
6458
|
+
/* */
|
|
6459
|
+
/* */
|
|
6460
|
+
/* */
|
|
6461
|
+
/* */
|
|
6462
|
+
/* */
|
|
6463
|
+
/* */
|
|
6464
|
+
/* */
|
|
6465
|
+
return (void 0);
|
|
6466
|
+
};
|
|
6467
|
+
})(BaseCliWorkerUtils || (BaseCliWorkerUtils = {}));
|
|
6468
|
+
|
|
6241
6469
|
//#endregion
|
|
6242
6470
|
let PortsController = class PortsController extends BaseCliWorkerController {
|
|
6243
6471
|
constructor() {
|
|
@@ -7025,7 +7253,7 @@ const PROJECT_NPM_NAME = 'tnp-helpers';
|
|
|
7025
7253
|
/**
|
|
7026
7254
|
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
7027
7255
|
*/
|
|
7028
|
-
const CURRENT_PACKAGE_VERSION = '19.0.
|
|
7256
|
+
const CURRENT_PACKAGE_VERSION = '19.0.67';
|
|
7029
7257
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
7030
7258
|
|
|
7031
7259
|
//#endregion
|
|
@@ -9734,6 +9962,24 @@ class BaseNodeModules {
|
|
|
9734
9962
|
return (void 0);
|
|
9735
9963
|
}
|
|
9736
9964
|
//#endregion
|
|
9965
|
+
//#region link node_modules to other project
|
|
9966
|
+
copyToProject(project) {
|
|
9967
|
+
/* */
|
|
9968
|
+
/* */
|
|
9969
|
+
/* */
|
|
9970
|
+
/* */
|
|
9971
|
+
/* */
|
|
9972
|
+
/* */
|
|
9973
|
+
/* */
|
|
9974
|
+
/* */
|
|
9975
|
+
/* */
|
|
9976
|
+
/* */
|
|
9977
|
+
/* */
|
|
9978
|
+
/* */
|
|
9979
|
+
/* */
|
|
9980
|
+
return (void 0);
|
|
9981
|
+
}
|
|
9982
|
+
//#endregion
|
|
9737
9983
|
//#region link to project or location
|
|
9738
9984
|
linkToLocation(location) {
|
|
9739
9985
|
/* */
|
|
@@ -9849,6 +10095,9 @@ class BaseNodeModules {
|
|
|
9849
10095
|
/* */
|
|
9850
10096
|
/* */
|
|
9851
10097
|
/* */
|
|
10098
|
+
/* */
|
|
10099
|
+
/* */
|
|
10100
|
+
/* */
|
|
9852
10101
|
return (void 0);
|
|
9853
10102
|
}
|
|
9854
10103
|
//#endregion
|
|
@@ -11299,6 +11548,22 @@ class BaseGit extends BaseFeatureForProject {
|
|
|
11299
11548
|
/* */
|
|
11300
11549
|
/* */
|
|
11301
11550
|
/* */
|
|
11551
|
+
/* */
|
|
11552
|
+
/* */
|
|
11553
|
+
/* */
|
|
11554
|
+
/* */
|
|
11555
|
+
/* */
|
|
11556
|
+
/* */
|
|
11557
|
+
/* */
|
|
11558
|
+
/* */
|
|
11559
|
+
/* */
|
|
11560
|
+
/* */
|
|
11561
|
+
/* */
|
|
11562
|
+
/* */
|
|
11563
|
+
/* */
|
|
11564
|
+
/* */
|
|
11565
|
+
/* */
|
|
11566
|
+
/* */
|
|
11302
11567
|
return (void 0);
|
|
11303
11568
|
}
|
|
11304
11569
|
//#region methods & getters / has action commits to melt
|
|
@@ -12463,8 +12728,11 @@ class BaseIgnoreHideHelpers extends BaseFeatureForProject {
|
|
|
12463
12728
|
'.prettierc',
|
|
12464
12729
|
'angular.json',
|
|
12465
12730
|
'.prettierrc.json',
|
|
12731
|
+
'.eslintrc.js',
|
|
12466
12732
|
'.eslintrc.json',
|
|
12467
12733
|
'.npmrc',
|
|
12734
|
+
'.yarnrc',
|
|
12735
|
+
'.idea',
|
|
12468
12736
|
...this.project.linter.getLintFiles(),
|
|
12469
12737
|
];
|
|
12470
12738
|
}
|
|
@@ -12473,6 +12741,7 @@ class BaseIgnoreHideHelpers extends BaseFeatureForProject {
|
|
|
12473
12741
|
return [
|
|
12474
12742
|
'tsconfig*',
|
|
12475
12743
|
'webpack.*',
|
|
12744
|
+
'.eslintrc*',
|
|
12476
12745
|
'tslint.*',
|
|
12477
12746
|
linkeProjectPrefix ? `${linkeProjectPrefix}*` : void 0,
|
|
12478
12747
|
].filter(f => !!f);
|
|
@@ -13008,7 +13277,18 @@ class BaseVscodeHelpers extends BaseFeatureForProject {
|
|
|
13008
13277
|
}
|
|
13009
13278
|
//#endregion
|
|
13010
13279
|
//#region apply proper global settings
|
|
13011
|
-
async applyProperGlobalSettings() {
|
|
13280
|
+
static async applyProperGlobalSettings() {
|
|
13281
|
+
/* */
|
|
13282
|
+
/* */
|
|
13283
|
+
/* */
|
|
13284
|
+
/* */
|
|
13285
|
+
/* */
|
|
13286
|
+
/* */
|
|
13287
|
+
/* */
|
|
13288
|
+
/* */
|
|
13289
|
+
/* */
|
|
13290
|
+
/* */
|
|
13291
|
+
/* */
|
|
13012
13292
|
/* */
|
|
13013
13293
|
/* */
|
|
13014
13294
|
/* */
|
|
@@ -15348,6 +15628,11 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
15348
15628
|
/* */
|
|
15349
15629
|
return (void 0);
|
|
15350
15630
|
}
|
|
15631
|
+
async upAll(noExit = false) {
|
|
15632
|
+
/* */
|
|
15633
|
+
/* */
|
|
15634
|
+
return (void 0);
|
|
15635
|
+
}
|
|
15351
15636
|
async deepUpForce(noExit = false) {
|
|
15352
15637
|
/* */
|
|
15353
15638
|
/* */
|
|
@@ -15801,7 +16086,7 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
15801
16086
|
//#endregion
|
|
15802
16087
|
//#region commands / push all origins
|
|
15803
16088
|
/**
|
|
15804
|
-
* push force to all
|
|
16089
|
+
* push force to all origins
|
|
15805
16090
|
*/
|
|
15806
16091
|
async pushAllForce() {
|
|
15807
16092
|
/* */
|
|
@@ -17276,6 +17561,8 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
17276
17561
|
/* */
|
|
17277
17562
|
/* */
|
|
17278
17563
|
/* */
|
|
17564
|
+
/* */
|
|
17565
|
+
/* */
|
|
17279
17566
|
return (void 0);
|
|
17280
17567
|
}
|
|
17281
17568
|
//#endregion
|
|
@@ -17768,6 +18055,82 @@ class BaseGlobalCommandLine extends BaseCommandLineFeature {
|
|
|
17768
18055
|
/* */
|
|
17769
18056
|
return (void 0);
|
|
17770
18057
|
}
|
|
18058
|
+
//#endregion
|
|
18059
|
+
//#region commands / has command
|
|
18060
|
+
async hasCommand() {
|
|
18061
|
+
/* */
|
|
18062
|
+
/* */
|
|
18063
|
+
/* */
|
|
18064
|
+
/* */
|
|
18065
|
+
/* */
|
|
18066
|
+
/* */
|
|
18067
|
+
/* */
|
|
18068
|
+
return (void 0);
|
|
18069
|
+
}
|
|
18070
|
+
hasCommandSync() {
|
|
18071
|
+
/* */
|
|
18072
|
+
/* */
|
|
18073
|
+
/* */
|
|
18074
|
+
/* */
|
|
18075
|
+
/* */
|
|
18076
|
+
/* */
|
|
18077
|
+
/* */
|
|
18078
|
+
/* */
|
|
18079
|
+
/* */
|
|
18080
|
+
return (void 0);
|
|
18081
|
+
}
|
|
18082
|
+
//#endregion
|
|
18083
|
+
//#region commands / public ip address
|
|
18084
|
+
async publicIpAddress() {
|
|
18085
|
+
const ip = await UtilsNetwork.getCurrentPublicIpAddress();
|
|
18086
|
+
console.log(`Your public IP address is: ${ip}`);
|
|
18087
|
+
this._exit();
|
|
18088
|
+
}
|
|
18089
|
+
async publicIp() {
|
|
18090
|
+
/* */
|
|
18091
|
+
/* */
|
|
18092
|
+
return (void 0);
|
|
18093
|
+
}
|
|
18094
|
+
//#endregion
|
|
18095
|
+
//#region commands / open origins in vscode
|
|
18096
|
+
async localIps() {
|
|
18097
|
+
const firstActiveLocalIp = await UtilsNetwork.getFirstIpV4LocalActiveIpAddress();
|
|
18098
|
+
console.log(`Your first active local IP address is: ${firstActiveLocalIp} `);
|
|
18099
|
+
const ips = await UtilsNetwork.getLocalIpAddresses();
|
|
18100
|
+
for (let index = 0; index < ips.length; index++) {
|
|
18101
|
+
const ip = ips[index];
|
|
18102
|
+
// console.log(ip);
|
|
18103
|
+
console.log(`${index + 1}. Local IP address is: ` +
|
|
18104
|
+
`${ip.address}, type: ${ip.type}`);
|
|
18105
|
+
}
|
|
18106
|
+
this._exit();
|
|
18107
|
+
}
|
|
18108
|
+
//#endregion
|
|
18109
|
+
//#region commands / is online
|
|
18110
|
+
async isOnline() {
|
|
18111
|
+
/* */
|
|
18112
|
+
/* */
|
|
18113
|
+
/* */
|
|
18114
|
+
/* */
|
|
18115
|
+
/* */
|
|
18116
|
+
return (void 0);
|
|
18117
|
+
}
|
|
18118
|
+
//#endregion
|
|
18119
|
+
//#region commands / configure bash and shell
|
|
18120
|
+
async configureBash() {
|
|
18121
|
+
// ! TODO @UNCOMMENT
|
|
18122
|
+
// await UtilsTerminal.configureBashOrShell();
|
|
18123
|
+
}
|
|
18124
|
+
async configureShell() {
|
|
18125
|
+
// ! TODO @UNCOMMENT
|
|
18126
|
+
// await UtilsTerminal.configureBashOrShell();
|
|
18127
|
+
}
|
|
18128
|
+
confBash() {
|
|
18129
|
+
this.configureBash();
|
|
18130
|
+
}
|
|
18131
|
+
confShell() {
|
|
18132
|
+
this.configureShell();
|
|
18133
|
+
}
|
|
17771
18134
|
}
|
|
17772
18135
|
|
|
17773
18136
|
//#region imports
|
|
@@ -19539,5 +19902,5 @@ const Helpers = HelpersTaon.Instance;
|
|
|
19539
19902
|
* Generated bundle index. Do not edit.
|
|
19540
19903
|
*/
|
|
19541
19904
|
|
|
19542
|
-
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 };
|
|
19905
|
+
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 };
|
|
19543
19906
|
//# sourceMappingURL=tnp-helpers.mjs.map
|